Skip to content

Commit

Permalink
Refactor #5682
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed May 6, 2024
1 parent 2eec11b commit 4c3c2b8
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion components/lib/autocomplete/AutoComplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<!-- TODO: removetokenicon and removeTokenIcon deprecated since v4.0. Use chipicon slot and chipIcon prop-->
<Chip :class="cx('chipLabel')" :label="getOptionLabel(option)" :removeIcon="chipIcon || removeTokenIcon" removable :unstyled="unstyled" @remove="removeOption($event, i)" :pt="ptm('chipLabel')">
<template #removeicon>
<slot :name="$slots.removetokenicon ? 'removetokenicon' : 'chipicon'" :class="cx('chipIcon')" :index="i" :removeCallback="(event) => removeOption(event, i)" />
<slot :name="$slots.chipicon ? 'chipicon' : 'removetokenicon'" :class="cx('chipIcon')" :index="i" :removeCallback="(event) => removeOption(event, i)" />
</template>
</Chip>
</slot>
Expand Down
2 changes: 1 addition & 1 deletion components/lib/fieldset/Fieldset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
v-bind="{ ...toggleButtonProps, ...ptm('toggler') }"
>
<!--TODO: togglericon deprecated since v4.0-->
<slot :name="$slots.togglericon ? 'togglericon' : 'toggleicon'" :collapsed="d_collapsed">
<slot :name="$slots.toggleicon ? 'toggleicon' : 'togglericon'" :collapsed="d_collapsed">
<component :is="d_collapsed ? 'PlusIcon' : 'MinusIcon'" :class="cx('toggleIcon')" v-bind="ptm('toggleIcon')" />
</slot>
<slot name="legend">
Expand Down
2 changes: 1 addition & 1 deletion components/lib/inputchips/InputChips.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<!-- TODO: removetokenicon and removeTokenIcon deprecated since v4.0. Use chipicon slot and chipIcon prop-->
<Chip :class="cx('chipLabel')" :label="val" :removeIcon="chipIcon || removeTokenIcon" removable :unstyled="unstyled" @remove="removeItem($event, i)" :pt="ptm('chipLabel')">
<template #removeicon>
<slot :name="$slots.removetokenicon ? 'removetokenicon' : 'chipicon'" :class="cx('chipIcon')" :index="i" :removeCallback="(event) => removeItem(event, i)" />
<slot :name="$slots.chipicon ? 'chipicon' : 'removetokenicon'" :class="cx('chipIcon')" :index="i" :removeCallback="(event) => removeItem(event, i)" />
</template>
</Chip>
</slot>
Expand Down
4 changes: 2 additions & 2 deletions components/lib/megamenu/MegaMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<slot name="start"></slot>
</div>
<!--TODO: menubutton deprecated since v4.0. Use button-->
<slot :id="id" :name="$slots.menubutton ? 'menubutton' : 'button'" :class="cx('button')" :toggleCallback="(event) => menuButtonClick(event)">
<slot :id="id" :name="$slots.button ? 'button' : 'menubutton'" :class="cx('button')" :toggleCallback="(event) => menuButtonClick(event)">
<a
v-if="model && model.length > 0"
ref="menubutton"
Expand All @@ -20,7 +20,7 @@
v-bind="ptm('button')"
>
<!--TODO: menubuttonicon deprecated since v4.0. Use buttonicon-->
<slot :name="$slots.menubuttonicon ? 'menubuttonicon' : 'buttonicon'">
<slot :name="$slots.buttonicon ? 'buttonicon' : 'menubuttonicon'">
<BarsIcon v-bind="ptm('buttonicon')" />
</slot>
</a>
Expand Down
2 changes: 1 addition & 1 deletion components/lib/menu/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<template v-if="item.items && visible(item) && !item.separator">
<li v-if="item.items" :id="id + '_' + i" :class="[cx('submenuItem'), item.class]" role="none" v-bind="ptm('submenuItem')">
<!--TODO: submenuheader deprecated since v4.0. Use submenuitem-->
<slot :name="$slots.submenuheader ? 'submenuheader' : 'submenuitem'" :item="item">{{ label(item) }}</slot>
<slot :name="$slots.submenuitem ? 'submenuitem' : 'submenuheader'" :item="item">{{ label(item) }}</slot>
</li>
<template v-for="(child, j) of item.items" :key="child.label + i + '_' + j">
<PVMenuitem
Expand Down
2 changes: 1 addition & 1 deletion components/lib/multiselect/MultiSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<!-- TODO: removetokenicon and removeTokenIcon deprecated since v4.0. Use chipicon slot and chipIcon prop-->
<Chip :class="cx('chipLabel')" :label="getLabelByValue(item)" :removeIcon="chipIcon || removeTokenIcon" removable :unstyled="unstyled" @remove="removeOption($event, item)" :pt="ptm('chipLabel')">
<template #removeicon>
<slot :name="$slots.removetokenicon ? 'removetokenicon' : 'chipicon'" :class="cx('chipIcon')" :item="item" :removeCallback="(event) => removeOption(event, item)" />
<slot :name="$slots.chipicon ? 'chipicon' : 'removetokenicon'" :class="cx('chipIcon')" :item="item" :removeCallback="(event) => removeOption(event, item)" />
</template>
</Chip>
</slot>
Expand Down
2 changes: 1 addition & 1 deletion components/lib/panel/Panel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
>
<template #icon="slotProps">
<!--TODO: togglericon deprecated since v4.0-->
<slot :name="$slots.togglericon ? 'togglericon' : 'toggleicon'" :collapsed="d_collapsed">
<slot :name="$slots.toggleicon ? 'toggleicon' : 'togglericon'" :collapsed="d_collapsed">
<component :is="d_collapsed ? 'PlusIcon' : 'MinusIcon'" :class="slotProps.class" v-bind="ptm('toggleButton')['icon']" />
</slot>
</template>
Expand Down
8 changes: 4 additions & 4 deletions components/lib/password/Password.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
:unstyled="unstyled"
/>
<!-- TODO: hide* and show* deprecated since v4.0-->
<slot v-if="toggleMask && unmasked" :name="$slots.hideicon ? 'hideicon' : 'maskicon'" :onClick="onMaskToggle" :toggleCallback="onMaskToggle">
<component :is="hideIcon || maskIcon ? 'i' : 'EyeSlashIcon'" :class="[cx('maskIcon'), maskIcon || hideIcon]" @click="onMaskToggle" v-bind="ptm('maskIcon')" />
<slot v-if="toggleMask && unmasked" :name="$slots.maskicon ? 'maskicon' : 'hideicon'" :onClick="onMaskToggle" :toggleCallback="onMaskToggle">
<component :is="maskIcon || hideIcon ? 'i' : 'EyeSlashIcon'" :class="[cx('maskIcon'), maskIcon || hideIcon]" @click="onMaskToggle" v-bind="ptm('maskIcon')" />
</slot>
<slot v-if="toggleMask && !unmasked" :name="$slots.showicon ? 'showicon' : 'unmaskicon'" :onClick="onMaskToggle" :toggleCallback="onMaskToggle">
<component :is="showIcon || unmaskIcon ? 'i' : 'EyeIcon'" :class="[cx('unmaskIcon'), unmaskIcon || showIcon]" @click="onMaskToggle" v-bind="ptm('unmaskIcon')" />
<slot v-if="toggleMask && !unmasked" :name="$slots.unmaskicon ? 'unmaskicon' : 'showicon'" :onClick="onMaskToggle" :toggleCallback="onMaskToggle">
<component :is="unmaskIcon || showIcon ? 'i' : 'EyeIcon'" :class="[cx('unmaskIcon'), unmaskIcon || showIcon]" @click="onMaskToggle" v-bind="ptm('unmaskIcon')" />
</slot>
<span class="p-hidden-accessible" aria-live="polite" v-bind="ptm('hiddenAccesible')" :data-p-hidden-accessible="true">
{{ infoText }}
Expand Down
2 changes: 1 addition & 1 deletion components/lib/tree/Tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<div v-if="filter" :class="cx('filterContainer')" v-bind="ptm('filterContainer')">
<InputText v-model="filterValue" autocomplete="off" :class="cx('filterInput')" :placeholder="filterPlaceholder" @keydown="onFilterKeydown" v-bind="ptm('filterInput')" />
<!--TODO: searchicon deprecated since v4.0-->
<slot :name="$slots.searchicon ? 'searchicon' : 'filtericon'" :class="cx('filterIcon')">
<slot :name="$slots.filtericon ? 'filtericon' : 'searchicon'" :class="cx('filterIcon')">
<SearchIcon :class="cx('filterIcon')" v-bind="ptm('filterIcon')" />
</slot>
</div>
Expand Down
2 changes: 1 addition & 1 deletion components/lib/treeselect/TreeSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
</div>
<div :class="cx('dropdown')" role="button" aria-haspopup="tree" :aria-expanded="overlayVisible" v-bind="ptm('dropdown')">
<!-- TODO: triggericon is deprecated since v4.0 -->
<slot :name="$slots.triggericon ? 'triggericon' : 'dropdownicon'" :class="cx('dropdownIcon')">
<slot :name="$slots.dropdownicon ? 'dropdownicon' : 'triggericon'" :class="cx('dropdownIcon')">
<component :is="'ChevronDownIcon'" :class="cx('dropdownIcon')" v-bind="ptm('dropdownIcon')" />
</slot>
</div>
Expand Down

0 comments on commit 4c3c2b8

Please sign in to comment.