From e53d18f32302d9af6e271f69336e59fb779f386b Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 8 Apr 2024 15:20:51 +0300 Subject: [PATCH] Refactor #5548 - For Chips --- components/lib/chips/Chips.d.ts | 20 ++++++++++++++++++-- components/lib/chips/Chips.vue | 15 ++++++++------- 2 files changed, 26 insertions(+), 9 deletions(-) diff --git a/components/lib/chips/Chips.d.ts b/components/lib/chips/Chips.d.ts index ddc10817d..af5d242bd 100755 --- a/components/lib/chips/Chips.d.ts +++ b/components/lib/chips/Chips.d.ts @@ -9,6 +9,7 @@ */ import { InputHTMLAttributes, VNode } from 'vue'; import { ComponentHooks } from '../basecomponent'; +import { ChipPassThroughOptions } from '../chip'; import { PassThroughOptions } from '../passthrough'; import { ClassComponent, DesignToken, GlobalComponentConstructor, PassThrough } from '../ts-helpers'; @@ -44,6 +45,20 @@ export interface ChipsPassThroughMethodOptions { global: object | undefined; } +/** + * Custom shared passthrough(pt) option method. + */ +export interface ChipsSharedPassThroughMethodOptions { + /** + * Defines valid properties. + */ + props: ChipsProps; + /** + * Defines current inline state. + */ + state: ChipsState; +} + /** * Custom add event. * @see {@link ChipsEmits.add} @@ -84,9 +99,10 @@ export interface ChipsPassThroughOptions { */ token?: ChipsPassThroughOptionType; /** - * Used to pass attributes to the label's DOM element. + * Used to pass attributes to the Chip component. + * @see {@link ChipPassThroughOptions} */ - label?: ChipsPassThroughOptionType; + label?: ChipPassThroughOptions; /** * Used to pass attributes to the remove token icon's DOM element. */ diff --git a/components/lib/chips/Chips.vue b/components/lib/chips/Chips.vue index ddce4478e..7a16d400d 100755 --- a/components/lib/chips/Chips.vue +++ b/components/lib/chips/Chips.vue @@ -28,11 +28,12 @@ v-bind="ptm('token')" :data-p-focused="focusedIndex === i" > - - {{ val }} - - -