pull/5806/head
tugcekucukoglu 2024-05-27 11:48:42 +03:00
parent a3292d5c93
commit 543b69e119
24 changed files with 59 additions and 59 deletions

View File

@ -48,7 +48,7 @@ const CalendarProps = [
description: 'Icon of the calendar button.' description: 'Icon of the calendar button.'
}, },
{ {
name: 'previousIcon', name: 'prevIcon',
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Icon to show in the previous button.' description: 'Icon to show in the previous button.'
@ -484,7 +484,7 @@ const CalendarSlots = [
description: 'Custom dropdown icon template.' description: 'Custom dropdown icon template.'
}, },
{ {
name: 'previousicon', name: 'prevIcon',
description: 'Custom previous icon template.' description: 'Custom previous icon template.'
}, },
{ {

View File

@ -115,7 +115,7 @@ const CarouselSlots = [
description: 'Custom content for the component item.' description: 'Custom content for the component item.'
}, },
{ {
name: 'previousicon', name: 'previcon',
description: 'Custom previous icon template.' description: 'Custom previous icon template.'
}, },
{ {

View File

@ -48,7 +48,7 @@ const DatePickerProps = [
description: 'Icon of the calendar button.' description: 'Icon of the calendar button.'
}, },
{ {
name: 'previousIcon', name: 'previcon',
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Icon to show in the previous button.' description: 'Icon to show in the previous button.'
@ -484,7 +484,7 @@ const DatePickerSlots = [
description: 'Custom dropdown icon template.' description: 'Custom dropdown icon template.'
}, },
{ {
name: 'previousicon', name: 'previcon',
description: 'Custom previous icon template.' description: 'Custom previous icon template.'
}, },
{ {

View File

@ -30,7 +30,7 @@ const TabViewProps = [
description: 'When enabled, the focused tab is activated.' description: 'When enabled, the focused tab is activated.'
}, },
{ {
name: 'previousButtonProps', name: 'prevButtonProps',
type: 'any', type: 'any',
default: 'null', default: 'null',
description: 'Used to pass all properties of the HTMLButtonElement to the previous button.' description: 'Used to pass all properties of the HTMLButtonElement to the previous button.'

View File

@ -88,7 +88,7 @@ export interface CarouselPassThroughOptions {
* Used to pass attributes to the previous button's DOM element. * Used to pass attributes to the previous button's DOM element.
* @see {@link ButtonPassThroughOptions} * @see {@link ButtonPassThroughOptions}
*/ */
pcPreviousButton?: ButtonPassThroughOptions<CarouselSharedPassThroughMethodOptions>; pcPrevButton?: ButtonPassThroughOptions<CarouselSharedPassThroughMethodOptions>;
/** /**
* Used to pass attributes to the viewport's DOM element. * Used to pass attributes to the viewport's DOM element.
*/ */

View File

@ -7,18 +7,18 @@
<div :class="[cx('content'), contentClass]" :aria-live="allowAutoplay ? 'polite' : 'off'" v-bind="ptm('content')"> <div :class="[cx('content'), contentClass]" :aria-live="allowAutoplay ? 'polite' : 'off'" v-bind="ptm('content')">
<Button <Button
v-if="showNavigators" v-if="showNavigators"
:class="cx('pcPreviousButton')" :class="cx('pcPrevButton')"
:disabled="backwardIsDisabled" :disabled="backwardIsDisabled"
:aria-label="ariaPrevButtonLabel" :aria-label="ariaPrevButtonLabel"
:unstyled="unstyled" :unstyled="unstyled"
@click="navBackward" @click="navBackward"
v-bind="prevButtonProps" v-bind="prevButtonProps"
:pt="ptm('pcPreviousButton')" :pt="ptm('pcPrevButton')"
data-pc-group-section="navigator" data-pc-group-section="navigator"
> >
<template #icon="slotProps"> <template #icon="slotProps">
<slot name="previousicon"> <slot name="previcon">
<component :is="isVertical() ? 'ChevronUpIcon' : 'ChevronLeftIcon'" :class="[cx('previousButtonIcon'), slotProps.icon]" v-bind="ptm('pcPreviousButton')['icon']" /> <component :is="isVertical() ? 'ChevronUpIcon' : 'ChevronLeftIcon'" :class="slotProps.icon" v-bind="ptm('pcPrevButton')['icon']" />
</slot> </slot>
</template> </template>
</Button> </Button>
@ -72,7 +72,7 @@
> >
<template #icon="slotProps"> <template #icon="slotProps">
<slot name="nexticon"> <slot name="nexticon">
<component :is="isVertical() ? 'ChevronDownIcon' : 'ChevronRightIcon'" :class="[cx('nextButtonIcon'), slotProps.class]" v-bind="ptm('pcNextButton')['icon']" /> <component :is="isVertical() ? 'ChevronDownIcon' : 'ChevronRightIcon'" :class="slotProps.class" v-bind="ptm('pcNextButton')['icon']" />
</slot> </slot>
</template> </template>
</Button> </Button>

View File

@ -29,7 +29,7 @@ export enum CarouselClasses {
/** /**
* Class name of the previous button element * Class name of the previous button element
*/ */
pcPreviousButton = 'p-carousel-prev-button', pcPrevButton = 'p-carousel-prev-button',
/** /**
* Class name of the viewport element * Class name of the viewport element
*/ */

View File

@ -103,7 +103,7 @@ const classes = {
header: 'p-carousel-header', header: 'p-carousel-header',
contentContainer: 'p-carousel-content-container', contentContainer: 'p-carousel-content-container',
content: 'p-carousel-content', content: 'p-carousel-content',
pcPreviousButton: ({ instance }) => [ pcPrevButton: ({ instance }) => [
'p-carousel-prev-button', 'p-carousel-prev-button',
{ {
'p-disabled': instance.backwardIsDisabled 'p-disabled': instance.backwardIsDisabled

View File

@ -39,7 +39,7 @@ export default {
type: String, type: String,
default: undefined default: undefined
}, },
previousIcon: { prevIcon: {
type: String, type: String,
default: undefined default: undefined
}, },

View File

@ -175,7 +175,7 @@ export interface DatePickerPassThroughOptions {
* Used to pass attributes to the previous button's DOM element. * Used to pass attributes to the previous button's DOM element.
* @see {@link ButtonPassThroughOptions} * @see {@link ButtonPassThroughOptions}
*/ */
pcPreviousButton?: ButtonPassThroughOptions<DatePickerSharedPassThroughMethodOptions>; pcPrevButton?: ButtonPassThroughOptions<DatePickerSharedPassThroughMethodOptions>;
/** /**
* Used to pass attributes to the title's DOM element. * Used to pass attributes to the title's DOM element.
*/ */
@ -570,9 +570,9 @@ export interface DatePickerProps {
icon?: string | undefined; icon?: string | undefined;
/** /**
* Icon to show in the previous button. * Icon to show in the previous button.
* @deprecated since v3.27.0. Use 'previousicon' slot. * @deprecated since v3.27.0. Use 'previcon' slot.
*/ */
previousIcon?: string | undefined; prevIcon?: string | undefined;
/** /**
* Icon to show in the next button. * Icon to show in the next button.
* @deprecated since v3.27.0. Use 'nexticon' slot. * @deprecated since v3.27.0. Use 'nexticon' slot.
@ -937,7 +937,7 @@ export interface DatePickerSlots {
* Custom previous icon template. * Custom previous icon template.
* @param {Object} scope - previous icon slot's params. * @param {Object} scope - previous icon slot's params.
*/ */
previousicon(scope: { previcon(scope: {
/** /**
* Style class of the previous icon * Style class of the previous icon
*/ */

View File

@ -78,19 +78,19 @@
<Button <Button
v-show="showOtherMonths ? groupIndex === 0 : false" v-show="showOtherMonths ? groupIndex === 0 : false"
:ref="previousButtonRef" :ref="previousButtonRef"
:class="cx('pcPreviousButton')" :class="cx('pcPrevButton')"
:disabled="disabled" :disabled="disabled"
:aria-label="currentView === 'year' ? $primevue.config.locale.prevDecade : currentView === 'month' ? $primevue.config.locale.prevYear : $primevue.config.locale.prevMonth" :aria-label="currentView === 'year' ? $primevue.config.locale.prevDecade : currentView === 'month' ? $primevue.config.locale.prevYear : $primevue.config.locale.prevMonth"
:unstyled="unstyled" :unstyled="unstyled"
@click="onPrevButtonClick" @click="onPrevButtonClick"
@keydown="onContainerButtonKeydown" @keydown="onContainerButtonKeydown"
v-bind="navigatorButtonProps" v-bind="navigatorButtonProps"
:pt="ptm('pcPreviousButton')" :pt="ptm('pcPrevButton')"
data-pc-group-section="navigator" data-pc-group-section="navigator"
> >
<template #icon="slotProps"> <template #icon="slotProps">
<slot name="previousicon"> <slot name="previcon">
<component :is="previousIcon ? 'span' : 'ChevronLeftIcon'" :class="[previousIcon, slotProps.class]" v-bind="ptm('pcPreviousButton')['icon']" /> <component :is="prevIcon ? 'span' : 'ChevronLeftIcon'" :class="[prevIcon, slotProps.class]" v-bind="ptm('pcPrevButton')['icon']" />
</slot> </slot>
</template> </template>
</Button> </Button>

View File

@ -49,7 +49,7 @@ export enum DatePickerClasses {
/** /**
* Class name of the previous button element * Class name of the previous button element
*/ */
pcPreviousButton = 'p-datepicker-prev-button', pcPrevButton = 'p-datepicker-prev-button',
/** /**
* Class name of the title element * Class name of the title element
*/ */

View File

@ -381,7 +381,7 @@ const classes = {
calendarContainer: 'p-datepicker-calendar-container', calendarContainer: 'p-datepicker-calendar-container',
calendar: 'p-datepicker-calendar', calendar: 'p-datepicker-calendar',
header: 'p-datepicker-header', header: 'p-datepicker-header',
pcPreviousButton: 'p-datepicker-prev-button', pcPrevButton: 'p-datepicker-prev-button',
title: 'p-datepicker-title', title: 'p-datepicker-title',
viewMonth: 'p-datepicker-view-month', viewMonth: 'p-datepicker-view-month',
viewYear: 'p-datepicker-view-year', viewYear: 'p-datepicker-view-year',

View File

@ -56,7 +56,7 @@ export interface TabListPassThroughOptions {
/** /**
* Used to pass attributes to the previous button component. * Used to pass attributes to the previous button component.
*/ */
previousButton?: TabListPassThroughOptionType; prevButton?: TabListPassThroughOptionType;
/** /**
* Used to pass attributes to the next button component. * Used to pass attributes to the next button component.
*/ */

View File

@ -4,14 +4,14 @@
v-if="showNavigators && isPrevButtonEnabled" v-if="showNavigators && isPrevButtonEnabled"
ref="prevButton" ref="prevButton"
v-ripple v-ripple
:class="cx('previousButton')" :class="cx('prevButton')"
:aria-label="prevButtonAriaLabel" :aria-label="prevButtonAriaLabel"
:tabindex="$pcTabs.tabindex" :tabindex="$pcTabs.tabindex"
@click="onPrevButtonClick" @click="onPrevButtonClick"
v-bind="ptm('previousButton')" v-bind="ptm('prevButton')"
data-pc-group-section="navigator" data-pc-group-section="navigator"
> >
<component :is="templates.previousicon || 'ChevronLeftIcon'" aria-hidden="true" v-bind="ptm('previousIcon')" /> <component :is="templates.previcon || 'ChevronLeftIcon'" aria-hidden="true" v-bind="ptm('prevIcon')" />
</button> </button>
<div ref="content" :class="cx('content')" @scroll="onScroll" v-bind="ptm('content')"> <div ref="content" :class="cx('content')" @scroll="onScroll" v-bind="ptm('content')">
<div ref="tabs" :class="cx('tabs')" role="tablist" :aria-orientation="$pcTabs.orientation || 'horizontal'" v-bind="ptm('tabs')"> <div ref="tabs" :class="cx('tabs')" role="tablist" :aria-orientation="$pcTabs.orientation || 'horizontal'" v-bind="ptm('tabs')">

View File

@ -29,7 +29,7 @@ export enum TabListClasses {
/** /**
* Class name of the previous button element * Class name of the previous button element
*/ */
previousButton = 'p-tablist-prev-button', prevButton = 'p-tablist-prev-button',
/** /**
* Class name of the next button element * Class name of the next button element
*/ */

View File

@ -10,7 +10,7 @@ const classes = {
], ],
tabs: 'p-tablist-tab-list', tabs: 'p-tablist-tab-list',
inkbar: 'p-tablist-active-bar', inkbar: 'p-tablist-active-bar',
previousButton: 'p-tablist-prev-button p-tablist-nav-button', prevButton: 'p-tablist-prev-button p-tablist-nav-button',
nextButton: 'p-tablist-next-button p-tablist-nav-button' nextButton: 'p-tablist-next-button p-tablist-nav-button'
}; };

View File

@ -146,7 +146,7 @@ export interface TabsSlots {
/** /**
* Previous button icon template for the scrollable component. * Previous button icon template for the scrollable component.
*/ */
previousicon(): VNode[]; previcon(): VNode[];
/** /**
* Next button icon template for the scrollable component. * Next button icon template for the scrollable component.
*/ */

View File

@ -26,7 +26,7 @@ export default {
type: Boolean, type: Boolean,
default: false default: false
}, },
previousButtonProps: { prevButtonProps: {
type: null, type: null,
default: null default: null
}, },

View File

@ -96,11 +96,11 @@ export interface TabViewPassThroughOptions {
/** /**
* Used to pass attributes to the previous button's DOM element. * Used to pass attributes to the previous button's DOM element.
*/ */
previousButton?: TabViewPassThroughOptionType; prevButton?: TabViewPassThroughOptionType;
/** /**
* Used to pass attributes to the previous button icon's DOM element. * Used to pass attributes to the previous button icon's DOM element.
*/ */
previousIcon?: TabViewPassThroughOptionType; prevIcon?: TabViewPassThroughOptionType;
/** /**
* Used to pass attributes to the next button's DOM element. * Used to pass attributes to the next button's DOM element.
*/ */
@ -193,7 +193,7 @@ export interface TabViewProps {
* Used to pass all properties of the HTMLButtonElement to the previous button. * Used to pass all properties of the HTMLButtonElement to the previous button.
* @deprecated since v3.26.0. Use 'pt' property instead. * @deprecated since v3.26.0. Use 'pt' property instead.
*/ */
previousButtonProps?: ButtonHTMLAttributes | undefined; prevButtonProps?: ButtonHTMLAttributes | undefined;
/** /**
* Used to pass all properties of the HTMLButtonElement to the next button. * Used to pass all properties of the HTMLButtonElement to the next button.
* @deprecated since v3.26.0. Use 'pt' property instead. * @deprecated since v3.26.0. Use 'pt' property instead.
@ -201,7 +201,7 @@ export interface TabViewProps {
nextButtonProps?: ButtonHTMLAttributes | undefined; nextButtonProps?: ButtonHTMLAttributes | undefined;
/** /**
* Previous icon of the scrollable tabview. * Previous icon of the scrollable tabview.
* @deprecated since v3.27.0. Use 'previousicon' slot. * @deprecated since v3.27.0. Use 'previcon' slot.
*/ */
prevIcon?: string | undefined; prevIcon?: string | undefined;
/** /**
@ -241,7 +241,7 @@ export interface TabViewSlots {
/** /**
* Previous button icon template for the scrollable component. * Previous button icon template for the scrollable component.
*/ */
previousicon(): VNode[]; previcon(): VNode[];
/** /**
* Next button icon template for the scrollable component. * Next button icon template for the scrollable component.
*/ */

View File

@ -6,15 +6,15 @@
ref="prevBtn" ref="prevBtn"
v-ripple v-ripple
type="button" type="button"
:class="cx('previousButton')" :class="cx('prevButton')"
:tabindex="tabindex" :tabindex="tabindex"
:aria-label="prevButtonAriaLabel" :aria-label="prevButtonAriaLabel"
@click="onPrevButtonClick" @click="onPrevButtonClick"
v-bind="{ ...previousButtonProps, ...ptm('previousButton') }" v-bind="{ ...prevButtonProps, ...ptm('prevButton') }"
data-pc-group-section="navbutton" data-pc-group-section="navbutton"
> >
<slot name="previousicon"> <slot name="previcon">
<component :is="prevIcon ? 'span' : 'ChevronLeftIcon'" aria-hidden="true" :class="prevIcon" v-bind="ptm('previousIcon')" /> <component :is="prevIcon ? 'span' : 'ChevronLeftIcon'" aria-hidden="true" :class="prevIcon" v-bind="ptm('prevIcon')" />
</slot> </slot>
</button> </button>
<div ref="content" :class="cx('navContent')" @scroll="onScroll" v-bind="ptm('navContent')"> <div ref="content" :class="cx('navContent')" @scroll="onScroll" v-bind="ptm('navContent')">

View File

@ -22,7 +22,7 @@ export enum TabViewClasses {
/** /**
* Class name of the previous button element * Class name of the previous button element
*/ */
previousButton = 'p-tabview-prev-button', prevButton = 'p-tabview-prev-button',
/** /**
* Class name of the nav content element * Class name of the nav content element
*/ */

View File

@ -139,7 +139,7 @@ const classes = {
} }
], ],
navContainer: 'p-tabview-tablist-container', navContainer: 'p-tabview-tablist-container',
previousButton: 'p-tabview-prev-button', prevButton: 'p-tabview-prev-button',
navContent: 'p-tabview-tablist-scroll-container', navContent: 'p-tabview-tablist-scroll-container',
nav: 'p-tabview-tablist', nav: 'p-tabview-tablist',
tab: { tab: {

View File

@ -9671,7 +9671,7 @@
"description": "Used to pass attributes to the header's DOM element." "description": "Used to pass attributes to the header's DOM element."
}, },
{ {
"name": "pcPreviousButton", "name": "pcPrevButton",
"optional": true, "optional": true,
"readonly": false, "readonly": false,
"type": "ButtonPassThroughOptions<DatePickerSharedPassThroughMethodOptions>", "type": "ButtonPassThroughOptions<DatePickerSharedPassThroughMethodOptions>",
@ -10391,13 +10391,13 @@
"deprecated": "since v3.27.0. Use 'dropdownicon' slot." "deprecated": "since v3.27.0. Use 'dropdownicon' slot."
}, },
{ {
"name": "previousIcon", "name": "prevIcon",
"optional": true, "optional": true,
"readonly": false, "readonly": false,
"type": "string", "type": "string",
"default": "", "default": "",
"description": "Icon to show in the previous button.", "description": "Icon to show in the previous button.",
"deprecated": "since v3.27.0. Use 'previousicon' slot." "deprecated": "since v3.27.0. Use 'previcon' slot."
}, },
{ {
"name": "nextIcon", "name": "nextIcon",
@ -10976,7 +10976,7 @@
"description": "Custom input icon template." "description": "Custom input icon template."
}, },
{ {
"name": "previousicon", "name": "previcon",
"parameters": [ "parameters": [
{ {
"name": "scope", "name": "scope",
@ -11752,7 +11752,7 @@
"description": "Used to pass attributes to the content's DOM element." "description": "Used to pass attributes to the content's DOM element."
}, },
{ {
"name": "pcPreviousButton", "name": "pcPrevButton",
"optional": true, "optional": true,
"readonly": false, "readonly": false,
"type": "ButtonPassThroughOptions<CarouselSharedPassThroughMethodOptions>", "type": "ButtonPassThroughOptions<CarouselSharedPassThroughMethodOptions>",
@ -12390,7 +12390,7 @@
"description": "Class name of the content element" "description": "Class name of the content element"
}, },
{ {
"name": "pcPreviousButton", "name": "pcPrevButton",
"optional": false, "optional": false,
"readonly": false, "readonly": false,
"value": "\"p-carousel-prev-button\"", "value": "\"p-carousel-prev-button\"",
@ -26798,7 +26798,7 @@
"description": "Used to pass attributes to the header's DOM element." "description": "Used to pass attributes to the header's DOM element."
}, },
{ {
"name": "pcPreviousButton", "name": "pcPrevButton",
"optional": true, "optional": true,
"readonly": false, "readonly": false,
"type": "ButtonPassThroughOptions<DatePickerSharedPassThroughMethodOptions>", "type": "ButtonPassThroughOptions<DatePickerSharedPassThroughMethodOptions>",
@ -27525,13 +27525,13 @@
"deprecated": "since v3.27.0. Use 'dropdownicon' slot." "deprecated": "since v3.27.0. Use 'dropdownicon' slot."
}, },
{ {
"name": "previousIcon", "name": "prevIcon",
"optional": true, "optional": true,
"readonly": false, "readonly": false,
"type": "string", "type": "string",
"default": "", "default": "",
"description": "Icon to show in the previous button.", "description": "Icon to show in the previous button.",
"deprecated": "since v3.27.0. Use 'previousicon' slot." "deprecated": "since v3.27.0. Use 'previcon' slot."
}, },
{ {
"name": "nextIcon", "name": "nextIcon",
@ -28110,7 +28110,7 @@
"description": "Custom input icon template." "description": "Custom input icon template."
}, },
{ {
"name": "previousicon", "name": "previcon",
"parameters": [ "parameters": [
{ {
"name": "scope", "name": "scope",
@ -28550,7 +28550,7 @@
"description": "Class name of the header element" "description": "Class name of the header element"
}, },
{ {
"name": "pcPreviousButton", "name": "pcPrevButton",
"optional": false, "optional": false,
"readonly": false, "readonly": false,
"value": "\"p-datepicker-prev-button\"", "value": "\"p-datepicker-prev-button\"",
@ -68923,7 +68923,7 @@
"description": "Used to pass attributes to the root's DOM element." "description": "Used to pass attributes to the root's DOM element."
}, },
{ {
"name": "previousButton", "name": "prevButton",
"optional": true, "optional": true,
"readonly": false, "readonly": false,
"type": "TabListPassThroughOptionType", "type": "TabListPassThroughOptionType",
@ -69184,7 +69184,7 @@
"description": "Class name of the inkbar element" "description": "Class name of the inkbar element"
}, },
{ {
"name": "previousButton", "name": "prevButton",
"optional": false, "optional": false,
"readonly": false, "readonly": false,
"value": "\"p-tablist-prev-button\"", "value": "\"p-tablist-prev-button\"",
@ -70785,7 +70785,7 @@
"description": "Default slot to detect TabPanel components." "description": "Default slot to detect TabPanel components."
}, },
{ {
"name": "previousicon", "name": "previcon",
"parameters": [], "parameters": [],
"returnType": "VNode<RendererNode, RendererElement, Object>[]", "returnType": "VNode<RendererNode, RendererElement, Object>[]",
"description": "Previous button icon template for the scrollable component." "description": "Previous button icon template for the scrollable component."
@ -71034,7 +71034,7 @@
"description": "Class name of the nav container element" "description": "Class name of the nav container element"
}, },
{ {
"name": "previousButton", "name": "prevButton",
"optional": false, "optional": false,
"readonly": false, "readonly": false,
"value": "\"p-tabview-prev-button\"", "value": "\"p-tabview-prev-button\"",