yuyeon 0.0.38-rc3 → 0.0.38-rc5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"YSelect.mjs","names":["shallowRef","computed","defineComponent","mergeProps","ref","useModelDuplex","useRender","pressCoordinateProps","pressListItemsPropsOptions","useItems","wrapInArray","deepEqual","getObjectValueByPath","omit","chooseProps","propsFactory","YCard","YFieldInput","pressYFieldInputPropsOptions","YIconDropdown","YList","YListItem","YMenu","returnItemEquals","optionsItem","valueItem","valueKey","arguments","length","undefined","valueItemType","itemValue","pressSelectPropsOptions","opened","Boolean","multiple","weakEquals","valueEquals","type","Function","default","defaultSelect","pressYSelectPropsOptions","maxHeight","Number","String","expandIcon","Object","position","YSelect","name","props","emits","value","setup","_ref","slots","fieldInputRef","menuRef","listRef","focused","items","toRefineItems","toEmitItems","model","v","emitValue","selections","map","find","item","selected","selection","isSelected","selectedItem","onMousedownDisplay","event","disabled","onBlur","$el","contains","relatedTarget","onClickItem","select","onAfterLeave","focus","index","findIndex","neo","slice","splice","displayText","text","join","fieldInputProps","_createVNode","$event","offset","origin","base","_len","args","Array","_key","_mergeProps","leading","_len2","_key2","trailing","menu","e","_createTextVNode"],"sources":["../../../src/components/select/YSelect.tsx"],"sourcesContent":["import { shallowRef } from '@vue/runtime-core';\r\nimport type { PropType } from 'vue';\r\nimport { computed, defineComponent, mergeProps, ref } from 'vue';\r\n\r\nimport { useModelDuplex } from '../../composables/communication';\r\nimport { useRender } from '../../composables/component';\r\nimport { pressCoordinateProps } from '../../composables/coordinate';\r\nimport {\r\n ListItem,\r\n pressListItemsPropsOptions,\r\n useItems,\r\n} from '../../composables/list-items';\r\nimport { wrapInArray } from '../../util/array';\r\nimport {deepEqual, getObjectValueByPath, getPropertyFromItem, omit} from '../../util/common';\r\nimport { chooseProps, propsFactory } from '../../util/vue-component';\r\nimport { YCard } from '../card';\r\nimport { YFieldInput, pressYFieldInputPropsOptions } from '../field-input';\r\nimport { YIconDropdown } from '../icons/YIconDropdown';\r\nimport { YList, YListItem } from '../list';\r\nimport { YMenu } from '../menu';\r\n\r\nimport './YSelect.scss';\r\n\r\nexport type SelectEquals = (\r\n optionsItem: any,\r\n valueItem: any,\r\n valueKey?: string,\r\n) => boolean;\r\n\r\nexport function returnItemEquals(\r\n optionsItem: any,\r\n valueItem: any,\r\n valueKey = 'value',\r\n) {\r\n const valueItemType = typeof valueItem;\r\n const itemValue =\r\n valueItemType === 'string' || valueItemType === 'number'\r\n ? getObjectValueByPath(optionsItem, valueKey)\r\n : optionsItem;\r\n return deepEqual(itemValue, valueItem);\r\n}\r\n\r\nexport const pressSelectPropsOptions = propsFactory(\r\n {\r\n opened: Boolean as PropType<boolean>,\r\n multiple: Boolean,\r\n weakEquals: Boolean,\r\n valueEquals: {\r\n type: Function as PropType<SelectEquals>,\r\n default: deepEqual,\r\n },\r\n defaultSelect: Boolean,\r\n ...pressListItemsPropsOptions(),\r\n },\r\n 'Select',\r\n);\r\n\r\nexport const pressYSelectPropsOptions = propsFactory(\r\n {\r\n maxHeight: {\r\n type: [Number, String],\r\n default: 310,\r\n },\r\n expandIcon: {\r\n type: Object,\r\n },\r\n ...pressSelectPropsOptions(),\r\n ...pressYFieldInputPropsOptions(),\r\n ...omit(pressCoordinateProps({ position: 'bottom' as 'bottom' }), [\r\n 'coordinateStrategy',\r\n ]),\r\n },\r\n 'YSelect',\r\n);\r\n\r\nexport const YSelect = defineComponent({\r\n name: 'YSelect',\r\n props: {\r\n ...pressYSelectPropsOptions(),\r\n },\r\n emits: {\r\n 'update:modelValue': (value: any) => true,\r\n 'update:opened': (opened: boolean) => true,\r\n },\r\n setup(props, { slots }) {\r\n const fieldInputRef = ref();\r\n const menuRef = ref();\r\n const listRef = ref<InstanceType<typeof YList>>();\r\n\r\n const opened = useModelDuplex(props, 'opened');\r\n const focused = shallowRef(false);\r\n\r\n const { items, toRefineItems, toEmitItems } = useItems(props);\r\n const model = useModelDuplex(\r\n props,\r\n 'modelValue',\r\n [],\r\n (v) => toRefineItems(v === null ? [null] : wrapInArray(v)),\r\n (v) => {\r\n const emitValue = toEmitItems(wrapInArray(v));\r\n return props.multiple ? emitValue : emitValue[0] ?? null;\r\n },\r\n );\r\n\r\n const selections = computed<ListItem[]>(() => {\r\n return model.value.map((v: any) => {\r\n return items.value.find((item) => {\r\n return props.valueEquals(item.value, v.value);\r\n });\r\n });\r\n });\r\n\r\n const selected = computed(() => {\r\n return selections.value.map((selection) => selection.props.value);\r\n });\r\n\r\n function isSelected(item: ListItem) {\r\n return !!selections.value.find((selectedItem) => {\r\n return selectedItem.value === item.value;\r\n });\r\n }\r\n\r\n // Field\r\n function onMousedownDisplay(event: MouseEvent) {\r\n if (props.disabled) {\r\n return;\r\n }\r\n opened.value = !opened.value;\r\n }\r\n\r\n function onBlur(event: FocusEvent) {\r\n if (listRef.value?.$el.contains(event.relatedTarget)) {\r\n opened.value = false;\r\n }\r\n }\r\n\r\n // Menu Contents\r\n function onClickItem(item: ListItem) {\r\n select(item);\r\n if (!props.multiple) {\r\n opened.value = false;\r\n }\r\n }\r\n\r\n function onAfterLeave() {\r\n if (focused.value) {\r\n fieldInputRef.value?.focus();\r\n }\r\n }\r\n\r\n function select(item: ListItem) {\r\n if (props.multiple) {\r\n const index = selections.value.findIndex((selectedItem) => {\r\n return selectedItem.value === item.value;\r\n });\r\n if (index === -1) {\r\n model.value = [...model.value, item];\r\n } else {\r\n const neo = model.value.slice();\r\n neo.splice(index, 1);\r\n model.value = neo;\r\n }\r\n } else {\r\n model.value = [item];\r\n }\r\n }\r\n\r\n const displayText = computed(() => {\r\n if (props.multiple) {\r\n return selections.value.map((item) => item.text).join(', ');\r\n }\r\n return selections.value?.[0]?.text ?? '';\r\n });\r\n\r\n useRender(() => {\r\n const fieldInputProps = chooseProps(props, YFieldInput.props);\r\n return (\r\n <YMenu\r\n v-model={opened.value}\r\n ref={menuRef}\r\n offset={props.offset}\r\n position={props.position}\r\n origin={props.origin}\r\n content-classes={['y-select__content']}\r\n maxHeight={props.maxHeight}\r\n open-on-click-base={false}\r\n onAfterLeave={onAfterLeave}\r\n >\r\n {{\r\n base: (...args: any[]) =>\r\n slots.base ? (\r\n slots.base?.(...args)\r\n ) : (\r\n <YFieldInput\r\n {...{\r\n ...fieldInputProps,\r\n ...mergeProps({ ...args[0].props }, { ref: fieldInputRef }),\r\n }}\r\n onMousedown:display={onMousedownDisplay}\r\n onBlur={onBlur}\r\n readonly\r\n class={['y-select', { 'y-select--opened': opened.value }]}\r\n v-model:focused={focused.value}\r\n >\r\n {{\r\n default: () => {\r\n return (\r\n <div class={['y-select__selection']}>\r\n {slots.selection\r\n ? slots.selection?.()\r\n : displayText.value}\r\n </div>\r\n );\r\n },\r\n leading: slots.leading\r\n ? (...args: any[]) => slots.leading?.(...args)\r\n : undefined,\r\n trailing: (...args: any[]) => {\r\n return slots['expand-icon'] ? (\r\n slots['expand-icon']()\r\n ) : (\r\n <i class=\"y-select__icon\">\r\n <YIconDropdown></YIconDropdown>\r\n </i>\r\n );\r\n },\r\n 'helper-text': slots['helper-text']\r\n ? slots['helper-text']?.()\r\n : undefined,\r\n }}\r\n </YFieldInput>\r\n ),\r\n default: () =>\r\n slots.menu ? (\r\n slots.menu()\r\n ) : (\r\n <YCard>\r\n {items.value.length > 0 ? (\r\n <YList ref={listRef}>\r\n {items.value.map((item) => {\r\n return (\r\n <YListItem\r\n onClick={(e) => onClickItem(item)}\r\n class={{ 'y-list-item--active': isSelected(item) }}\r\n >\r\n {item.text}\r\n </YListItem>\r\n );\r\n })}\r\n </YList>\r\n ) : (\r\n <div class=\"y-select__no-options\">항목이 없습니다.</div>\r\n )}\r\n </YCard>\r\n ),\r\n }}\r\n </YMenu>\r\n );\r\n });\r\n\r\n return {\r\n fieldInputRef,\r\n model,\r\n selections,\r\n selected,\r\n };\r\n },\r\n});\r\n"],"mappings":";AAAA,SAASA,UAAU,QAAQ,mBAAmB;AAE9C,SAASC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AA,EAAAA,CAAA,MAEjD8B,IAAI,CAACsB,IAAI;cAAA;YAGhB,CAAC,CAAC;UAAA,KAAAG,YAAA;YAAA,SAGO;UAAsB,IAAAgB,gBAAA,kDAClC;QAAA;MAEJ;IAIX,CAAC,CAAC;IAEF,OAAO;MACLtD,aAAa;MACbO,KAAK;MACLG,UAAU;MACVI;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"YSelect.mjs","names":["shallowRef","computed","defineComponent","mergeProps","ref","useModelDuplex","useRender","pressCoordinateProps","pressListItemsPropsOptions","useItems","wrapInArray","deepEqual","getObjectValueByPath","omit","chooseProps","propsFactory","YCard","YFieldInput","pressYFieldInputPropsOptions","YIconDropdown","YList","YListItem","YMenu","returnItemEquals","optionsItem","valueItem","valueKey","arguments","length","undefined","valueItemType","itemValue","pressSelectPropsOptions","opened","Boolean","multiple","weakEquals","valueEquals","type","Function","default","defaultSelect","pressYSelectPropsOptions","maxHeight","Number","String","expandIcon","Object","position","YSelect","name","props","emits","value","click:item","item","e","setup","_ref","slots","fieldInputRef","menuRef","listRef","focused","items","toRefineItems","toEmitItems","model","v","emitValue","selections","map","find","selected","selection","isSelected","selectedItem","onMousedownDisplay","event","disabled","onBlur","onClickItem","select","onAfterLeave","focus","index","findIndex","neo","slice","splice","displayText","text","join","fieldInputProps","_createVNode","$event","offset","origin","base","_len","args","Array","_key","_mergeProps","leading","_len2","_key2","trailing","menu","_createTextVNode"],"sources":["../../../src/components/select/YSelect.tsx"],"sourcesContent":["import { shallowRef } from '@vue/runtime-core';\r\nimport type { PropType } from 'vue';\r\nimport { computed, defineComponent, mergeProps, ref } from 'vue';\r\n\r\nimport { useModelDuplex } from '../../composables/communication';\r\nimport { useRender } from '../../composables/component';\r\nimport { pressCoordinateProps } from '../../composables/coordinate';\r\nimport {\r\n ListItem,\r\n pressListItemsPropsOptions,\r\n useItems,\r\n} from '../../composables/list-items';\r\nimport { wrapInArray } from '../../util/array';\r\nimport {deepEqual, getObjectValueByPath, getPropertyFromItem, omit} from '../../util/common';\r\nimport { chooseProps, propsFactory } from '../../util/vue-component';\r\nimport { YCard } from '../card';\r\nimport { YFieldInput, pressYFieldInputPropsOptions } from '../field-input';\r\nimport { YIconDropdown } from '../icons/YIconDropdown';\r\nimport { YList, YListItem } from '../list';\r\nimport { YMenu } from '../menu';\r\n\r\nimport './YSelect.scss';\r\n\r\nexport type SelectEquals = (\r\n optionsItem: any,\r\n valueItem: any,\r\n valueKey?: string,\r\n) => boolean;\r\n\r\nexport function returnItemEquals(\r\n optionsItem: any,\r\n valueItem: any,\r\n valueKey = 'value',\r\n) {\r\n const valueItemType = typeof valueItem;\r\n const itemValue =\r\n valueItemType === 'string' || valueItemType === 'number'\r\n ? getObjectValueByPath(optionsItem, valueKey)\r\n : optionsItem;\r\n return deepEqual(itemValue, valueItem);\r\n}\r\n\r\nexport const pressSelectPropsOptions = propsFactory(\r\n {\r\n opened: Boolean as PropType<boolean>,\r\n multiple: Boolean,\r\n weakEquals: Boolean,\r\n valueEquals: {\r\n type: Function as PropType<SelectEquals>,\r\n default: deepEqual,\r\n },\r\n defaultSelect: Boolean,\r\n ...pressListItemsPropsOptions(),\r\n },\r\n 'Select',\r\n);\r\n\r\nexport const pressYSelectPropsOptions = propsFactory(\r\n {\r\n maxHeight: {\r\n type: [Number, String],\r\n default: 310,\r\n },\r\n expandIcon: {\r\n type: Object,\r\n },\r\n ...pressSelectPropsOptions(),\r\n ...pressYFieldInputPropsOptions(),\r\n ...omit(pressCoordinateProps({ position: 'bottom' as 'bottom' }), [\r\n 'coordinateStrategy',\r\n ]),\r\n },\r\n 'YSelect',\r\n);\r\n\r\nexport const YSelect = defineComponent({\r\n name: 'YSelect',\r\n props: {\r\n ...pressYSelectPropsOptions(),\r\n },\r\n emits: {\r\n 'update:modelValue': (value: any) => true,\r\n 'update:opened': (opened: boolean) => true,\r\n 'click:item': (item: any, e: MouseEvent) => true,\r\n },\r\n setup(props, { slots }) {\r\n const fieldInputRef = ref();\r\n const menuRef = ref();\r\n const listRef = ref<InstanceType<typeof YList>>();\r\n\r\n const opened = useModelDuplex(props, 'opened');\r\n const focused = shallowRef(false);\r\n\r\n const { items, toRefineItems, toEmitItems } = useItems(props);\r\n const model = useModelDuplex(\r\n props,\r\n 'modelValue',\r\n [],\r\n (v) => toRefineItems(v === null ? [null] : wrapInArray(v)),\r\n (v) => {\r\n const emitValue = toEmitItems(wrapInArray(v));\r\n return props.multiple ? emitValue : emitValue[0] ?? null;\r\n },\r\n );\r\n\r\n const selections = computed<ListItem[]>(() => {\r\n return model.value.map((v: any) => {\r\n return items.value.find((item) => {\r\n return props.valueEquals(item.value, v.value);\r\n });\r\n });\r\n });\r\n\r\n const selected = computed(() => {\r\n return selections.value.map((selection) => selection.props.value);\r\n });\r\n\r\n function isSelected(item: ListItem) {\r\n return !!selections.value.find((selectedItem) => {\r\n return selectedItem.value === item.value;\r\n });\r\n }\r\n\r\n // Field\r\n function onMousedownDisplay(event: MouseEvent) {\r\n if (props.disabled) {\r\n return;\r\n }\r\n opened.value = !opened.value;\r\n }\r\n\r\n function onBlur(event: FocusEvent) {\r\n // if (listRef.value?.$el.contains(event.relatedTarget)) {\r\n // opened.value = false;\r\n // }\r\n }\r\n\r\n // Menu Contents\r\n function onClickItem(item: ListItem, e: MouseEvent) {\r\n select(item);\r\n if (!props.multiple) {\r\n opened.value = false;\r\n }\r\n }\r\n\r\n function onAfterLeave() {\r\n if (focused.value) {\r\n fieldInputRef.value?.focus();\r\n }\r\n }\r\n\r\n function select(item: ListItem) {\r\n if (props.multiple) {\r\n const index = selections.value.findIndex((selectedItem) => {\r\n return selectedItem.value === item.value;\r\n });\r\n if (index === -1) {\r\n model.value = [...model.value, item];\r\n } else {\r\n const neo = model.value.slice();\r\n neo.splice(index, 1);\r\n model.value = neo;\r\n }\r\n } else {\r\n model.value = [item];\r\n }\r\n }\r\n\r\n const displayText = computed(() => {\r\n if (props.multiple) {\r\n return selections.value.map((item) => item.text).join(', ');\r\n }\r\n return selections.value?.[0]?.text ?? '';\r\n });\r\n\r\n useRender(() => {\r\n const fieldInputProps = chooseProps(props, YFieldInput.props);\r\n return (\r\n <YMenu\r\n v-model={opened.value}\r\n ref={menuRef}\r\n offset={props.offset}\r\n position={props.position}\r\n origin={props.origin}\r\n content-classes={['y-select__content']}\r\n maxHeight={props.maxHeight}\r\n open-on-click-base={false}\r\n onAfterLeave={onAfterLeave}\r\n >\r\n {{\r\n base: (...args: any[]) =>\r\n slots.base ? (\r\n slots.base?.(...args)\r\n ) : (\r\n <YFieldInput\r\n {...{\r\n ...fieldInputProps,\r\n ...mergeProps({ ...args[0].props }, { ref: fieldInputRef }),\r\n }}\r\n onMousedown:display={onMousedownDisplay}\r\n onBlur={onBlur}\r\n readonly\r\n class={['y-select', { 'y-select--opened': opened.value }]}\r\n v-model:focused={focused.value}\r\n >\r\n {{\r\n default: () => {\r\n return (\r\n <div class={['y-select__selection']}>\r\n {slots.selection\r\n ? slots.selection?.()\r\n : displayText.value}\r\n </div>\r\n );\r\n },\r\n leading: slots.leading\r\n ? (...args: any[]) => slots.leading?.(...args)\r\n : undefined,\r\n trailing: (...args: any[]) => {\r\n return slots['expand-icon'] ? (\r\n slots['expand-icon']()\r\n ) : (\r\n <i class=\"y-select__icon\">\r\n <YIconDropdown></YIconDropdown>\r\n </i>\r\n );\r\n },\r\n 'helper-text': slots['helper-text']\r\n ? slots['helper-text']?.()\r\n : undefined,\r\n }}\r\n </YFieldInput>\r\n ),\r\n default: () =>\r\n slots.menu ? (\r\n slots.menu()\r\n ) : (\r\n <YCard>\r\n {items.value.length > 0 ? (\r\n <YList ref={listRef}>\r\n {items.value.map((item) => {\r\n return (\r\n <YListItem\r\n onClick={(e) => onClickItem(item, e)}\r\n class={{ 'y-list-item--active': isSelected(item) }}\r\n >\r\n {item.text}\r\n </YListItem>\r\n );\r\n })}\r\n </YList>\r\n ) : (\r\n <div class=\"y-select__no-options\">항목이 없습니다.</div>\r\n )}\r\n </YCard>\r\n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,CAAC,IAAKyB,WAAW,CAAC1B,IAAI,EAAEC,CAAC,CAAC;gBAAA,SAC7B;kBAAE,qBAAqB,EAAEmB,UAAU,CAACpB,IAAI;gBAAE;cAAC;gBAAAf,OAAA,EAAAA,CAAA,MAEjDe,IAAI,CAACoC,IAAI;cAAA;YAGhB,CAAC,CAAC;UAAA,KAAAG,YAAA;YAAA,SAGO;UAAsB,IAAAe,gBAAA,kDAClC;QAAA;MAEJ;IAIX,CAAC,CAAC;IAEF,OAAO;MACLjD,aAAa;MACbO,KAAK;MACLG,UAAU;MACVG;IACF,CAAC;EACH;AACF,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yuyeon",
3
- "version": "0.0.38-rc3",
3
+ "version": "0.0.38-rc5",
4
4
  "keywords": [
5
5
  "UI Library",
6
6
  "Vue"
@@ -1,6 +1,6 @@
1
1
  import { PropType } from 'vue';
2
2
  declare const _default: import("vue").DefineComponent<{
3
- inputValue: PropType<boolean | any[]>;
3
+ modelValue: PropType<boolean | any[]>;
4
4
  value: PropType<any>;
5
5
  label: PropType<string>;
6
6
  reverse: PropType<boolean>;
@@ -19,8 +19,8 @@ declare const _default: import("vue").DefineComponent<{
19
19
  }, {
20
20
  innerValue: import("vue").Ref<boolean>;
21
21
  inputByValue: () => void;
22
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "blur" | "change")[], "focus" | "blur" | "change", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
- inputValue: PropType<boolean | any[]>;
22
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "blur" | "update:modelValue")[], "focus" | "blur" | "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
23
+ modelValue: PropType<boolean | any[]>;
24
24
  value: PropType<any>;
25
25
  label: PropType<string>;
26
26
  reverse: PropType<boolean>;
@@ -39,7 +39,7 @@ declare const _default: import("vue").DefineComponent<{
39
39
  }>> & {
40
40
  onFocus?: ((...args: any[]) => any) | undefined;
41
41
  onBlur?: ((...args: any[]) => any) | undefined;
42
- onChange?: ((...args: any[]) => any) | undefined;
42
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
43
43
  }, {
44
44
  color: string;
45
45
  }, {}>;
@@ -257,6 +257,7 @@ export declare const YFieldInput: import("vue").DefineComponent<{
257
257
  };
258
258
  }, {
259
259
  focused: import("vue").WritableComputedRef<any>;
260
+ inValue: any;
260
261
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("focus" | "click" | "mousedown" | "mouseup" | "blur" | "mousedown:display" | "update:modelValue" | "update:focused" | "input" | "change" | "keydown" | "keyup")[], "focus" | "click" | "mousedown" | "mouseup" | "blur" | "mousedown:display" | "update:modelValue" | "update:focused" | "input" | "change" | "keydown" | "keyup", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
261
262
  focused: BooleanConstructor;
262
263
  'onUpdate:focused': PropType<(v: boolean) => void>;
@@ -593,6 +593,7 @@ export declare const YSelect: import("vue").DefineComponent<{
593
593
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
594
594
  'update:modelValue': (value: any) => boolean;
595
595
  'update:opened': (opened: boolean) => boolean;
596
+ 'click:item': (item: any, e: MouseEvent) => boolean;
596
597
  }, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
597
598
  position: Omit<{
598
599
  type: PropType<"default" | "top" | "end" | "right" | "bottom" | "left" | "start">;
@@ -713,6 +714,7 @@ export declare const YSelect: import("vue").DefineComponent<{
713
714
  }>> & {
714
715
  "onUpdate:modelValue"?: ((value: any) => any) | undefined;
715
716
  "onUpdate:opened"?: ((opened: boolean) => any) | undefined;
717
+ "onClick:item"?: ((item: any, e: MouseEvent) => any) | undefined;
716
718
  }, {
717
719
  type: string;
718
720
  variation: string;