diff --git a/components/lib/autocomplete/AutoComplete.d.ts b/components/lib/autocomplete/AutoComplete.d.ts index ea944faf2..2e21e0916 100755 --- a/components/lib/autocomplete/AutoComplete.d.ts +++ b/components/lib/autocomplete/AutoComplete.d.ts @@ -149,26 +149,26 @@ export interface AutoCompletePassThroughOptions { */ input?: InputTextPassThroughOptions | AutoCompletePassThroughOptionType; /** - * Used to pass attributes to the container's DOM element. + * Used to pass attributes to the input multiple's DOM element. */ - container?: AutoCompletePassThroughOptionType; + inputMultiple?: AutoCompletePassThroughOptionType; /** - * Used to pass attributes to the token's DOM element. + * Used to pass attributes to the chip's DOM element. */ - token?: AutoCompletePassThroughOptionType; + chip?: AutoCompletePassThroughOptionType; /** * Used to pass attributes to the Chip. * @see {@link ChipPassThroughOptions} */ - tokenLabel?: ChipPassThroughOptions; + chipLabel?: ChipPassThroughOptions; /** - * Used to pass attributes to the remove token icon's DOM element. + * Used to pass attributes to the chip icon's DOM element. */ - removeTokenIcon?: AutoCompletePassThroughOptionType; + chipIcon?: AutoCompletePassThroughOptionType; /** - * Used to pass attributes to the input token's DOM element. + * Used to pass attributes to the input chip's DOM element. */ - inputToken?: AutoCompletePassThroughOptionType; + inputChip?: AutoCompletePassThroughOptionType; /** * Used to pass attributes to the loading icon's DOM element. */ @@ -441,6 +441,10 @@ export interface AutoCompleteProps { * @deprecated since v3.27.0. Use 'removetokenicon' slot. */ removeTokenIcon?: string | undefined; + /** + * Icon to display in chip remove action. + */ + chipIcon?: string | undefined; /** * Whether to use the virtualScroller feature. The properties of VirtualScroller component can be used like an object in it. * @type {VirtualScrollerProps} @@ -658,7 +662,9 @@ export interface AutoCompleteSlots { class: string; }): VNode[]; /** - * Custom remove token icon template in multiple mode. + * @deprecated since v4.0. Use 'chipicon' slot instead. + * Custom chip icon template in multiple mode. + * @param {Object} scope - chip icon slot's params. */ removetokenicon(scope: { /** @@ -681,6 +687,31 @@ export interface AutoCompleteSlots { */ removeCallback: (event: Event, index: number) => void; }): VNode[]; + /** + * Custom chip icon template in multiple mode. + * @param {Object} scope - chip icon slot's params. + */ + chipicon(scope: { + /** + * Style class of the icon. + */ + class: string; + /** + * Index of the token. + */ + index: number; + /** + * Remove token icon function. + * @param {Event} event - Browser event + * @deprecated since v3.39.0. Use 'removeCallback' property instead. + */ + onClick: (event: Event, index: number) => void; + /** + * Remove token icon function. + * @param {Event} event - Browser event + */ + removeCallback: (event: Event, index: number) => void; + }): VNode[]; /** * Custom loading icon template. */ diff --git a/components/lib/autocomplete/AutoComplete.vue b/components/lib/autocomplete/AutoComplete.vue index f1664ef84..1b2c37a8d 100755 --- a/components/lib/autocomplete/AutoComplete.vue +++ b/components/lib/autocomplete/AutoComplete.vue @@ -33,7 +33,7 @@
  • - + +
  • -
  • +
  • [ + inputMultiple: ({ props, instance }) => [ 'p-autocomplete-input-multiple', { 'p-variant-filled': props.variant ? props.variant === 'filled' : instance.$primevue.config.inputStyle === 'filled' } ], - token: ({ instance, i }) => [ + chip: ({ instance, i }) => [ 'p-autocomplete-chip', { 'p-focus': instance.focusedMultipleOptionIndex === i } ], - tokenLabel: 'p-autocomplete-chip-label', - removeTokenIcon: 'p-autocomplete-chip-icon', - inputToken: 'p-autocomplete-input-chip', + chipLabel: 'p-autocomplete-chip-label', + chipIcon: 'p-autocomplete-chip-icon', + inputChip: 'p-autocomplete-input-chip', loadingIcon: 'p-autocomplete-loader', dropdownButton: 'p-autocomplete-dropdown', panel: ({ instance }) => [ diff --git a/components/lib/cascadeselect/BaseCascadeSelect.vue b/components/lib/cascadeselect/BaseCascadeSelect.vue index fd1cc1555..dfbd36683 100644 --- a/components/lib/cascadeselect/BaseCascadeSelect.vue +++ b/components/lib/cascadeselect/BaseCascadeSelect.vue @@ -52,6 +52,18 @@ export default { type: null, default: null }, + overlayClass: { + type: [String, Object], + default: null + }, + overlayStyle: { + type: Object, + default: null + }, + overlayProps: { + type: null, + default: null + }, appendTo: { type: [String, Object], default: 'body' diff --git a/components/lib/cascadeselect/CascadeSelect.d.ts b/components/lib/cascadeselect/CascadeSelect.d.ts index 675f25af5..e093ed315 100644 --- a/components/lib/cascadeselect/CascadeSelect.d.ts +++ b/components/lib/cascadeselect/CascadeSelect.d.ts @@ -91,7 +91,7 @@ export interface CascadeSelectPassThroughOptions { /** * Used to pass attributes to the dropdown button's DOM element. */ - dropdownButton?: CascadeSelectPassThroughOptionType; + dropdown?: CascadeSelectPassThroughOptionType; /** * Used to pass attributes to the dropdown icon's DOM element. */ @@ -101,9 +101,13 @@ export interface CascadeSelectPassThroughOptions { */ loadingIcon?: CascadeSelectPassThroughOptionType; /** - * Used to pass attributes to the panel's DOM element. + * Used to pass attributes to the overlay's DOM element. */ - panel?: CascadeSelectPassThroughOptionType; + overlay?: CascadeSelectPassThroughOptionType; + /** + * Used to pass attributes to the list container's DOM element. + */ + listContainer?: CascadeSelectPassThroughOptionType; /** * Used to pass attributes to the list's DOM element. */ @@ -113,13 +117,17 @@ export interface CascadeSelectPassThroughOptions { */ item?: CascadeSelectPassThroughOptionType; /** - * Used to pass attributes to the content's DOM element. + * Used to pass attributes to the item content's DOM element. */ - content?: CascadeSelectPassThroughOptionType; + itemContent?: CascadeSelectPassThroughOptionType; /** - * Used to pass attributes to the text's DOM element. + * Used to pass attributes to the item text's DOM element. */ - text?: CascadeSelectPassThroughOptionType; + itemText?: CascadeSelectPassThroughOptionType; + /** + * Used to pass attributes to the item list's DOM element. + */ + itemList?: CascadeSelectPassThroughOptionType; /** * Used to pass attributes to the group icon's DOM element. */ @@ -307,17 +315,32 @@ export interface CascadeSelectProps { */ inputProps?: InputHTMLAttributes | undefined; /** - * Inline style of the overlay panel. + * @deprecated since v4.0. Use 'overlayStyle' prop. + * Inline style of the overlay overlay. */ panelStyle?: object | undefined; /** - * Style class of the overlay panel. + * @deprecated since v4.0. Use 'overlayClass' prop. + * Style class of the overlay overlay. */ panelClass?: string | object | undefined; /** - * Used to pass all properties of the HTMLDivElement to the overlay panel inside the component. + * @deprecated since v4.0. Use 'overlayProps' prop. + * Used to pass all properties of the HTMLDivElement to the overlay overlay inside the component. */ panelProps?: HTMLAttributes | undefined; + /** + * Inline style of the overlay overlay. + */ + overlayStyle?: object | undefined; + /** + * Style class of the overlay overlay. + */ + overlayClass?: string | object | undefined; + /** + * Used to pass all properties of the HTMLDivElement to the overlay overlay inside the component. + */ + overlayProps?: HTMLAttributes | undefined; /** * A valid query selector or an HTMLElement to specify where the overlay gets attached. Special keywords are 'body' for document body and 'self' for the element itself. * @defaultValue body diff --git a/components/lib/cascadeselect/CascadeSelect.vue b/components/lib/cascadeselect/CascadeSelect.vue index 07762eaf3..410872eab 100644 --- a/components/lib/cascadeselect/CascadeSelect.vue +++ b/components/lib/cascadeselect/CascadeSelect.vue @@ -30,7 +30,7 @@ {{ label }} -