mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-08 16:37:15 +00:00
Refactor #5681
This commit is contained in:
parent
3cc675e50f
commit
e1367fd494
89 changed files with 376 additions and 339 deletions
4
components/lib/carousel/Carousel.d.ts
vendored
4
components/lib/carousel/Carousel.d.ts
vendored
|
@ -88,7 +88,7 @@ export interface CarouselPassThroughOptions {
|
|||
* Used to pass attributes to the previous button's DOM element.
|
||||
* @see {@link ButtonPassThroughOptions}
|
||||
*/
|
||||
previousButton?: ButtonPassThroughOptions<CarouselSharedPassThroughMethodOptions>;
|
||||
pcPreviousButton?: ButtonPassThroughOptions<CarouselSharedPassThroughMethodOptions>;
|
||||
/**
|
||||
* Used to pass attributes to the viewport's DOM element.
|
||||
*/
|
||||
|
@ -109,7 +109,7 @@ export interface CarouselPassThroughOptions {
|
|||
* Used to pass attributes to the next button's DOM element.
|
||||
* @see {@link ButtonPassThroughOptions}
|
||||
*/
|
||||
nextButton?: ButtonPassThroughOptions<CarouselSharedPassThroughMethodOptions>;
|
||||
pcNextButton?: ButtonPassThroughOptions<CarouselSharedPassThroughMethodOptions>;
|
||||
/**
|
||||
* Used to pass attributes to the indicator list's DOM element.
|
||||
*/
|
||||
|
|
|
@ -7,18 +7,18 @@
|
|||
<div :class="[cx('content'), contentClass]" :aria-live="allowAutoplay ? 'polite' : 'off'" v-bind="ptm('content')">
|
||||
<Button
|
||||
v-if="showNavigators"
|
||||
:class="cx('previousButton')"
|
||||
:class="cx('pcPreviousButton')"
|
||||
:disabled="backwardIsDisabled"
|
||||
:aria-label="ariaPrevButtonLabel"
|
||||
:unstyled="unstyled"
|
||||
@click="navBackward"
|
||||
v-bind="prevButtonProps"
|
||||
:pt="ptm('previousButton')"
|
||||
:pt="ptm('pcPreviousButton')"
|
||||
data-pc-group-section="navigator"
|
||||
>
|
||||
<template #icon="slotProps">
|
||||
<slot name="previousicon">
|
||||
<component :is="isVertical() ? 'ChevronUpIcon' : 'ChevronLeftIcon'" :class="[cx('previousButtonIcon'), slotProps.icon]" v-bind="ptm('previousButton')['icon']" />
|
||||
<component :is="isVertical() ? 'ChevronUpIcon' : 'ChevronLeftIcon'" :class="[cx('previousButtonIcon'), slotProps.icon]" v-bind="ptm('pcPreviousButton')['icon']" />
|
||||
</slot>
|
||||
</template>
|
||||
</Button>
|
||||
|
@ -61,18 +61,18 @@
|
|||
</div>
|
||||
<Button
|
||||
v-if="showNavigators"
|
||||
:class="cx('nextButton')"
|
||||
:class="cx('pcNextButton')"
|
||||
:disabled="forwardIsDisabled"
|
||||
:aria-label="ariaNextButtonLabel"
|
||||
:unstyled="unstyled"
|
||||
@click="navForward"
|
||||
v-bind="nextButtonProps"
|
||||
:pt="ptm('nextButton')"
|
||||
:pt="ptm('pcNextButton')"
|
||||
data-pc-group-section="navigator"
|
||||
>
|
||||
<template #icon="slotProps">
|
||||
<slot name="nexticon">
|
||||
<component :is="isVertical() ? 'ChevronDownIcon' : 'ChevronRightIcon'" :class="[cx('nextButtonIcon'), slotProps.class]" v-bind="ptm('nextButton')['icon']" />
|
||||
<component :is="isVertical() ? 'ChevronDownIcon' : 'ChevronRightIcon'" :class="[cx('nextButtonIcon'), slotProps.class]" v-bind="ptm('pcNextButton')['icon']" />
|
||||
</slot>
|
||||
</template>
|
||||
</Button>
|
||||
|
|
|
@ -102,7 +102,7 @@ const classes = {
|
|||
header: 'p-carousel-header',
|
||||
contentContainer: 'p-carousel-content-container',
|
||||
content: 'p-carousel-content',
|
||||
previousButton: ({ instance }) => [
|
||||
pcPreviousButton: ({ instance }) => [
|
||||
'p-carousel-prev-button',
|
||||
{
|
||||
'p-disabled': instance.backwardIsDisabled
|
||||
|
@ -126,7 +126,7 @@ const classes = {
|
|||
'p-carousel-item-end': instance.lastIndex() === index
|
||||
}
|
||||
],
|
||||
nextButton: ({ instance }) => [
|
||||
pcNextButton: ({ instance }) => [
|
||||
'p-carousel-next-button',
|
||||
{
|
||||
'p-disabled': instance.forwardIsDisabled
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue