@volverjs/ui-vue 0.0.10-beta.3 → 0.0.10-beta.31

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.
Files changed (294) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +106 -10
  3. package/auto-imports.d.ts +7 -2
  4. package/bin/icons.cjs +1 -1
  5. package/bin/icons.js +22 -15
  6. package/dist/Volver.d.ts +1 -1
  7. package/dist/components/VvAccordion/VvAccordion.es.js +192 -103
  8. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  9. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +160 -8
  10. package/dist/components/VvAccordion/index.d.ts +8 -9
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +451 -172
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  13. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +58 -13
  14. package/dist/components/VvAccordionGroup/index.d.ts +14 -6
  15. package/dist/components/VvAction/VvAction.es.js +78 -27
  16. package/dist/components/VvAction/VvAction.umd.js +1 -1
  17. package/dist/components/VvAction/VvAction.vue.d.ts +57 -22
  18. package/dist/components/VvAction/index.d.ts +25 -9
  19. package/dist/components/VvAlert/VvAlert.es.js +204 -171
  20. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  21. package/dist/components/VvAlert/VvAlert.vue.d.ts +24 -14
  22. package/dist/components/VvAlert/index.d.ts +17 -9
  23. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +250 -188
  24. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  25. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +16 -9
  26. package/dist/components/VvAlertGroup/index.d.ts +6 -14
  27. package/dist/components/VvAvatar/VvAvatar.es.js +61 -21
  28. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  29. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +12 -4
  30. package/dist/components/VvAvatar/index.d.ts +4 -1
  31. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +118 -48
  32. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  33. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +10 -3
  34. package/dist/components/VvAvatarGroup/index.d.ts +4 -1
  35. package/dist/components/VvBadge/VvBadge.es.js +78 -28
  36. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  37. package/dist/components/VvBadge/VvBadge.vue.d.ts +12 -4
  38. package/dist/components/VvBadge/index.d.ts +4 -1
  39. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +276 -60
  40. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  41. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +27 -7
  42. package/dist/components/VvBreadcrumb/index.d.ts +6 -10
  43. package/dist/components/VvButton/VvButton.es.js +291 -252
  44. package/dist/components/VvButton/VvButton.umd.js +1 -1
  45. package/dist/components/VvButton/VvButton.vue.d.ts +94 -40
  46. package/dist/components/VvButton/index.d.ts +51 -29
  47. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +81 -40
  48. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  49. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +24 -11
  50. package/dist/components/VvButtonGroup/index.d.ts +8 -2
  51. package/dist/components/VvCard/VvCard.es.js +86 -36
  52. package/dist/components/VvCard/VvCard.umd.js +1 -1
  53. package/dist/components/VvCard/VvCard.vue.d.ts +12 -4
  54. package/dist/components/VvCard/index.d.ts +4 -1
  55. package/dist/components/VvCheckbox/VvCheckbox.es.js +177 -120
  56. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  57. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +105 -33
  58. package/dist/components/VvCheckbox/index.d.ts +47 -14
  59. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -107
  60. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  61. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +101 -30
  62. package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
  63. package/dist/components/VvCombobox/VvCombobox.es.js +806 -581
  64. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  65. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +171 -104
  66. package/dist/components/VvCombobox/index.d.ts +62 -26
  67. package/dist/components/VvDialog/VvDialog.es.js +140 -153
  68. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  69. package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
  70. package/dist/components/VvDropdown/VvDropdown.es.js +138 -71
  71. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  72. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +101 -75
  73. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +66 -25
  74. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +13 -1
  75. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
  76. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +35 -7
  77. package/dist/components/VvDropdown/index.d.ts +52 -10
  78. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +152 -39
  79. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  80. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +335 -8
  81. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  82. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +63 -20
  83. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  84. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +188 -80
  85. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  86. package/dist/components/VvIcon/VvIcon.es.js +23 -96
  87. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  88. package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
  89. package/dist/components/VvIcon/index.d.ts +33 -48
  90. package/dist/components/VvInputFile/VvInputFile.es.js +1777 -0
  91. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
  92. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +359 -0
  93. package/dist/components/VvInputFile/index.d.ts +200 -0
  94. package/dist/components/VvInputText/VvInputClearAction.d.ts +7 -5
  95. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
  96. package/dist/components/VvInputText/VvInputStepAction.d.ts +2 -2
  97. package/dist/components/VvInputText/VvInputText.es.js +1237 -324
  98. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  99. package/dist/components/VvInputText/VvInputText.vue.d.ts +207 -57
  100. package/dist/components/VvInputText/index.d.ts +99 -29
  101. package/dist/components/VvNav/VvNav.es.js +135 -56
  102. package/dist/components/VvNav/VvNav.umd.js +1 -1
  103. package/dist/components/VvNav/VvNav.vue.d.ts +32 -9
  104. package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
  105. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
  106. package/dist/components/VvNav/index.d.ts +5 -2
  107. package/dist/components/VvNavItem/VvNavItem.es.js +91 -33
  108. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
  109. package/dist/components/VvProgress/VvProgress.es.js +72 -26
  110. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  111. package/dist/components/VvProgress/VvProgress.vue.d.ts +10 -3
  112. package/dist/components/VvProgress/index.d.ts +4 -1
  113. package/dist/components/VvRadio/VvRadio.es.js +160 -103
  114. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  115. package/dist/components/VvRadio/VvRadio.vue.d.ts +103 -31
  116. package/dist/components/VvRadio/index.d.ts +50 -17
  117. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -107
  118. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  119. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +101 -30
  120. package/dist/components/VvRadioGroup/index.d.ts +45 -12
  121. package/dist/components/VvSelect/VvSelect.es.js +251 -238
  122. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  123. package/dist/components/VvSelect/VvSelect.vue.d.ts +117 -44
  124. package/dist/components/VvSelect/index.d.ts +48 -14
  125. package/dist/components/VvTab/VvTab.es.js +191 -75
  126. package/dist/components/VvTab/VvTab.umd.js +1 -1
  127. package/dist/components/VvTab/VvTab.vue.d.ts +31 -7
  128. package/dist/components/VvTab/index.d.ts +4 -1
  129. package/dist/components/VvTextarea/VvTextarea.es.js +232 -224
  130. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  131. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +156 -49
  132. package/dist/components/VvTextarea/index.d.ts +68 -19
  133. package/dist/components/VvTooltip/VvTooltip.es.js +79 -29
  134. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  135. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +13 -6
  136. package/dist/components/VvTooltip/index.d.ts +5 -2
  137. package/dist/components/common/HintSlot.d.ts +1 -1
  138. package/dist/components/index.d.ts +10 -0
  139. package/dist/components/index.es.js +3534 -1650
  140. package/dist/components/index.umd.js +1 -1
  141. package/dist/composables/alert/useAlert.d.ts +99 -4
  142. package/dist/composables/alert/useInjectAlert.d.ts +1 -6
  143. package/dist/composables/dropdown/useInjectDropdown.d.ts +3 -23
  144. package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -4
  145. package/dist/composables/group/useInjectedGroupState.d.ts +4 -5
  146. package/dist/composables/group/useProvideGroupState.d.ts +3 -3
  147. package/dist/composables/index.d.ts +1 -0
  148. package/dist/composables/index.es.js +92 -3
  149. package/dist/composables/index.umd.js +1 -1
  150. package/dist/composables/useBlurhash.d.ts +7 -0
  151. package/dist/composables/useComponentIcon.d.ts +9 -8
  152. package/dist/composables/usePersistence.d.ts +2 -0
  153. package/dist/composables/useVolver.d.ts +1 -1
  154. package/dist/constants.d.ts +34 -32
  155. package/dist/directives/index.d.ts +3 -5
  156. package/dist/directives/index.es.js +99 -43
  157. package/dist/directives/index.umd.js +1 -1
  158. package/dist/directives/v-tooltip.es.js +97 -38
  159. package/dist/directives/v-tooltip.umd.js +1 -1
  160. package/dist/icons.es.js +267 -267
  161. package/dist/icons.umd.js +1 -1
  162. package/dist/index.d.ts +3 -1
  163. package/dist/index.es.js +90 -16
  164. package/dist/index.umd.js +1 -1
  165. package/dist/props/index.d.ts +272 -81
  166. package/dist/resolvers/unplugin.d.ts +6 -1
  167. package/dist/resolvers/unplugin.es.js +87 -10
  168. package/dist/resolvers/unplugin.umd.js +1 -1
  169. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +143 -89
  170. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1075 -492
  171. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
  172. package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
  173. package/dist/stories/Button/Button.settings.d.ts +0 -1
  174. package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
  175. package/dist/stories/Icon/Icon.settings.d.ts +1 -0
  176. package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
  177. package/dist/stories/InputFile/InputFile.stories.d.ts +12 -0
  178. package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
  179. package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
  180. package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
  181. package/dist/stories/Tab/Tab.settings.d.ts +2 -15
  182. package/dist/test/expect.d.ts +1 -1
  183. package/dist/types/alert.d.ts +9 -7
  184. package/dist/types/blurhash.d.ts +12 -0
  185. package/dist/types/generic.d.ts +1 -2
  186. package/dist/types/group.d.ts +37 -15
  187. package/dist/types/index.d.ts +7 -0
  188. package/dist/types/input-file.d.ts +16 -0
  189. package/dist/types/nav.d.ts +2 -2
  190. package/dist/utils/ObjectUtilities.d.ts +0 -1
  191. package/dist/workers/blurhash.d.ts +1 -0
  192. package/package.json +78 -78
  193. package/src/Volver.ts +31 -20
  194. package/src/assets/icons/detailed.json +1 -1
  195. package/src/assets/icons/normal.json +1 -1
  196. package/src/assets/icons/simple.json +1 -1
  197. package/src/components/VvAccordion/VvAccordion.vue +121 -58
  198. package/src/components/VvAccordion/index.ts +8 -23
  199. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +164 -47
  200. package/src/components/VvAccordionGroup/index.ts +6 -6
  201. package/src/components/VvAction/VvAction.vue +17 -5
  202. package/src/components/VvAlert/index.ts +14 -9
  203. package/src/components/VvAlertGroup/index.ts +3 -15
  204. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
  205. package/src/components/VvBreadcrumb/index.ts +2 -8
  206. package/src/components/VvButton/VvButton.vue +17 -7
  207. package/src/components/VvButton/index.ts +9 -16
  208. package/src/components/VvButtonGroup/VvButtonGroup.vue +1 -2
  209. package/src/components/VvCheckbox/index.ts +2 -2
  210. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +1 -2
  211. package/src/components/VvCombobox/VvCombobox.vue +15 -12
  212. package/src/components/VvCombobox/index.ts +4 -0
  213. package/src/components/VvDropdown/VvDropdown.vue +11 -2
  214. package/src/components/VvDropdown/VvDropdownItem.vue +4 -1
  215. package/src/components/VvDropdown/VvDropdownOption.vue +4 -21
  216. package/src/components/VvDropdown/index.ts +35 -1
  217. package/src/components/VvIcon/VvIcon.vue +2 -2
  218. package/src/components/VvIcon/index.ts +35 -48
  219. package/src/components/VvInputFile/VvInputFile.vue +395 -0
  220. package/src/components/VvInputFile/index.ts +135 -0
  221. package/src/components/VvInputText/VvInputClearAction.ts +10 -6
  222. package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
  223. package/src/components/VvInputText/VvInputText.vue +141 -33
  224. package/src/components/VvInputText/index.ts +31 -16
  225. package/src/components/VvNav/VvNav.vue +4 -2
  226. package/src/components/VvRadio/index.ts +5 -5
  227. package/src/components/VvRadioGroup/VvRadioGroup.vue +1 -2
  228. package/src/components/VvSelect/VvSelect.vue +5 -8
  229. package/src/components/VvTab/VvTab.vue +5 -1
  230. package/src/components/VvTextarea/VvTextarea.vue +6 -9
  231. package/src/components/index.ts +10 -0
  232. package/src/composables/alert/useAlert.ts +12 -9
  233. package/src/composables/dropdown/useProvideDropdown.ts +4 -4
  234. package/src/composables/group/useInjectedGroupState.ts +20 -16
  235. package/src/composables/group/useProvideGroupState.ts +10 -15
  236. package/src/composables/index.ts +1 -0
  237. package/src/composables/useBlurhash.ts +76 -0
  238. package/src/composables/useComponentIcon.ts +15 -14
  239. package/src/composables/usePersistence.ts +76 -0
  240. package/src/composables/useUniqueId.ts +2 -2
  241. package/src/constants.ts +47 -32
  242. package/src/directives/index.ts +3 -6
  243. package/src/directives/v-tooltip.ts +19 -10
  244. package/src/index.ts +3 -1
  245. package/src/props/index.ts +108 -31
  246. package/src/resolvers/unplugin.ts +24 -14
  247. package/src/stories/Accordion/Accordion.test.ts +1 -1
  248. package/src/stories/AccordionGroup/AccordionGroup.settings.ts +2 -2
  249. package/src/stories/AccordionGroup/AccordionGroup.test.ts +17 -11
  250. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +1 -1
  251. package/src/stories/Alert/Alert.test.ts +1 -1
  252. package/src/stories/AlertGroup/AlertGroup.test.ts +1 -1
  253. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
  254. package/src/stories/Avatar/Avatar.test.ts +1 -1
  255. package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
  256. package/src/stories/Badge/Badge.test.ts +1 -1
  257. package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
  258. package/src/stories/Button/Button.settings.ts +1 -4
  259. package/src/stories/Button/Button.test.ts +1 -1
  260. package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
  261. package/src/stories/Card/Card.test.ts +1 -1
  262. package/src/stories/Checkbox/Checkbox.test.ts +1 -1
  263. package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +1 -1
  264. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  265. package/src/stories/Combobox/Combobox.test.ts +1 -1
  266. package/src/stories/Dialog/Dialog.test.ts +2 -2
  267. package/src/stories/Dropdown/Dropdown.test.ts +1 -1
  268. package/src/stories/Icon/Icon.settings.ts +3 -3
  269. package/src/stories/InputFile/InputFile.settings.ts +36 -0
  270. package/src/stories/InputFile/InputFile.stories.ts +89 -0
  271. package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
  272. package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
  273. package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
  274. package/src/stories/InputText/InputText.test.ts +1 -1
  275. package/src/stories/Nav/Nav.test.ts +1 -1
  276. package/src/stories/Progress/Progress.test.ts +1 -1
  277. package/src/stories/Radio/Radio.test.ts +1 -1
  278. package/src/stories/RadioGroup/RadioGroup.test.ts +1 -1
  279. package/src/stories/Select/Select.test.ts +1 -1
  280. package/src/stories/Tab/Tab.settings.ts +2 -2
  281. package/src/stories/Tab/Tab.test.ts +1 -1
  282. package/src/stories/Textarea/Textarea.test.ts +1 -1
  283. package/src/stories/Tooltip/Tooltip.test.ts +1 -1
  284. package/src/stories/argTypes.ts +1 -1
  285. package/src/test/expect.ts +2 -4
  286. package/src/types/alert.ts +11 -7
  287. package/src/types/blurhash.ts +21 -0
  288. package/src/types/generic.ts +3 -3
  289. package/src/types/group.ts +22 -14
  290. package/src/types/index.ts +7 -0
  291. package/src/types/input-file.ts +18 -0
  292. package/src/types/nav.ts +2 -3
  293. package/src/utils/ObjectUtilities.ts +0 -11
  294. package/src/workers/blurhash.ts +9 -0
@@ -9,12 +9,14 @@
9
9
  import { useIMask } from 'vue-imask'
10
10
  import HintSlotFactory from '../common/HintSlot'
11
11
  import VvIcon from '../VvIcon/VvIcon.vue'
12
+ import { ACTION_ICONS } from '../VvIcon'
12
13
  import VvInputTextActionsFactory from '../VvInputText/VvInputTextActions'
14
+ import VvDropdown from '../VvDropdown/VvDropdown.vue'
15
+ import VvDropdownOption from '../VvDropdown/VvDropdownOption.vue'
13
16
  import {
14
17
  VvInputTextEvents,
15
18
  VvInputTextProps,
16
19
  INPUT_TYPES,
17
- TYPES_ICON,
18
20
  } from '../VvInputText'
19
21
 
20
22
  // props, emit, slots and attrs
@@ -34,6 +36,7 @@
34
36
  id,
35
37
  icon,
36
38
  iconPosition,
39
+ iconRemoveSuggestion,
37
40
  label,
38
41
  modelValue,
39
42
  count,
@@ -46,6 +49,8 @@
46
49
  type,
47
50
  iMask,
48
51
  step,
52
+ storageKey,
53
+ storageType,
49
54
  } = toRefs(props)
50
55
  const hasId = useUniqueId(id)
51
56
  const hasHintId = computed(() => `${hasId.value}-hint`)
@@ -54,7 +59,14 @@
54
59
  props.floating && isEmpty(props.placeholder) ? ' ' : props.placeholder,
55
60
  )
56
61
 
57
- // template refs
62
+ // debounce
63
+ const localModelValue = useDebouncedInput(
64
+ modelValue,
65
+ emit,
66
+ debounce?.value ?? 0,
67
+ )
68
+
69
+ // mask
58
70
  const maskReady = ref(false)
59
71
  const { el, mask, typed, masked, unmasked } = useIMask(
60
72
  computed(
@@ -147,20 +159,32 @@
147
159
  },
148
160
  },
149
161
  )
162
+ const updateMaskValue = (newValue: string | number | undefined) => {
163
+ if (iMask) {
164
+ if (newValue === undefined) {
165
+ typed.value = ''
166
+ unmasked.value = ''
167
+ return
168
+ }
169
+ if (iMask.value?.mask === Date) {
170
+ typed.value = new Date(newValue)
171
+ return
172
+ }
173
+ typed.value = newValue
174
+ unmasked.value = `${typed.value}`
175
+ }
176
+ }
150
177
  onMounted(() => {
151
178
  if (mask.value) {
152
179
  maskReady.value = true
153
- typed.value = localModelValue.value ?? ''
180
+ updateMaskValue(props.modelValue)
154
181
  }
155
182
  })
156
183
  watch(
157
184
  () => props.modelValue,
158
185
  (newValue) => {
159
186
  if (mask.value) {
160
- typed.value =
161
- newValue && iMask?.value?.mask === Date
162
- ? new Date(newValue)
163
- : newValue ?? ''
187
+ updateMaskValue(newValue)
164
188
  }
165
189
  },
166
190
  )
@@ -170,18 +194,15 @@
170
194
  masked.value = newValue ?? ''
171
195
  },
172
196
  )
197
+
198
+ // template refs
173
199
  const inputEl = el as Ref<HTMLInputElement>
174
- const innerEl = ref()
200
+ const innerEl = ref<HTMLInputElement>()
201
+ const wrapperEl = ref<HTMLDivElement>()
202
+ const dropdownEl = ref<typeof VvDropdown>()
175
203
 
176
204
  defineExpose({ $inner: innerEl })
177
205
 
178
- // debounce
179
- const localModelValue = useDebouncedInput(
180
- modelValue,
181
- emit,
182
- debounce?.value ?? 0,
183
- )
184
-
185
206
  // focus
186
207
  const { focused } = useComponentFocus(inputEl, emit)
187
208
  const isFocused = computed(
@@ -191,6 +212,26 @@
191
212
  if (newValue && propsDefaults.value.selectOnFocus && inputEl.value) {
192
213
  inputEl.value.select()
193
214
  }
215
+ if (newValue) {
216
+ dropdownEl.value?.show()
217
+ return
218
+ }
219
+ setTimeout(() => {
220
+ if (isDirty.value && suggestions.value) {
221
+ const suggestionsLimit = props.maxSuggestions - 1
222
+ if (
223
+ suggestions.value.size > suggestionsLimit &&
224
+ !suggestions.value.has(localModelValue.value)
225
+ ) {
226
+ suggestions.value = new Set(
227
+ [...suggestions.value].slice(
228
+ suggestions.value.size - suggestionsLimit,
229
+ ),
230
+ )
231
+ }
232
+ suggestions.value.add(localModelValue.value)
233
+ }
234
+ }, 300)
194
235
  })
195
236
 
196
237
  // visibility
@@ -227,7 +268,7 @@
227
268
  return
228
269
  }
229
270
  inputEl.value.stepUp()
230
- localModelValue.value = unref(inputEl).value
271
+ localModelValue.value = Number(unref(inputEl).value)
231
272
  }
232
273
  }
233
274
  const onStepDown = () => {
@@ -238,7 +279,7 @@
238
279
  return
239
280
  }
240
281
  inputEl.value.stepDown()
241
- localModelValue.value = unref(inputEl).value
282
+ localModelValue.value = Number(unref(inputEl).value)
242
283
  }
243
284
  }
244
285
 
@@ -249,25 +290,26 @@
249
290
  }
250
291
 
251
292
  // icons
252
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
253
- icon,
254
- iconPosition,
255
- )
256
- const defaultAfterIcon = computed(() => {
293
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition)
294
+ const iconAfter = computed(() => {
295
+ if (hasIconAfter.value !== undefined) {
296
+ return hasIconAfter.value
297
+ }
257
298
  switch (props.type) {
258
299
  case INPUT_TYPES.COLOR:
259
- return { name: TYPES_ICON.COLOR }
300
+ return { name: ACTION_ICONS.showColorPicker }
260
301
  case INPUT_TYPES.DATE:
261
302
  case INPUT_TYPES.DATETIME_LOCAL:
262
303
  case INPUT_TYPES.WEEK:
263
304
  case INPUT_TYPES.MONTH:
264
- return { name: TYPES_ICON.DATE }
305
+ return { name: ACTION_ICONS.showDatePicker }
265
306
  case INPUT_TYPES.TIME:
266
- return { name: TYPES_ICON.TIME }
267
- default:
268
- return ''
307
+ return { name: ACTION_ICONS.showTimePicker }
269
308
  }
309
+ return undefined
270
310
  })
311
+ const { hasIcon: hasIconRemoveSuggestion } =
312
+ useComponentIcon(iconRemoveSuggestion)
271
313
 
272
314
  // count
273
315
  const { formatted: countFormatted } = useTextCount(localModelValue, {
@@ -296,6 +338,41 @@
296
338
  return undefined
297
339
  })
298
340
 
341
+ // suggestions
342
+ const suggestions = usePersistence<Set<string>>(
343
+ storageKey,
344
+ storageType,
345
+ new Set(),
346
+ )
347
+ const filteredSuggestions = computed(() => {
348
+ if (!suggestions.value) {
349
+ return []
350
+ }
351
+ return [...suggestions.value]
352
+ .filter(
353
+ (suggestion) =>
354
+ isEmpty(localModelValue.value) ||
355
+ (`${suggestion}`
356
+ .toLowerCase()
357
+ .includes(`${localModelValue.value}`.toLowerCase()) &&
358
+ suggestion !== localModelValue.value),
359
+ )
360
+ .reverse()
361
+ })
362
+ const hasSuggestions = computed(
363
+ () =>
364
+ storageKey?.value &&
365
+ suggestions.value &&
366
+ suggestions.value.size > 0,
367
+ )
368
+ const onSuggestionSelect = (suggestion: string) => {
369
+ localModelValue.value = suggestion
370
+ dropdownEl.value?.hide()
371
+ }
372
+ const onSuggestionRemove = (suggestion: string) => {
373
+ suggestions.value?.delete(suggestion)
374
+ }
375
+
299
376
  // styles
300
377
  const { modifiers } = toRefs(props)
301
378
  const bemCssClasses = useModifiers(
@@ -307,8 +384,8 @@
307
384
  loading: loading.value,
308
385
  disabled: props.disabled,
309
386
  readonly: props.readonly,
310
- 'icon-before': hasIconBefore.value,
311
- 'icon-after': hasIconAfter.value || !isEmpty(defaultAfterIcon),
387
+ 'icon-before': !!hasIconBefore.value,
388
+ 'icon-after': !!iconAfter.value,
312
389
  floating: props.floating && !isEmpty(props.label),
313
390
  dirty: isDirty.value,
314
391
  focus: isFocused.value,
@@ -464,7 +541,7 @@
464
541
  <label v-if="label" :for="hasId" class="vv-input-text__label">
465
542
  {{ label }}
466
543
  </label>
467
- <div class="vv-input-text__wrapper">
544
+ <div ref="wrapperEl" class="vv-input-text__wrapper">
468
545
  <div v-if="$slots.before" class="vv-input-text__input-before">
469
546
  <!-- @slot Slot before input icon -->
470
547
  <slot name="before" v-bind="slotProps" />
@@ -476,8 +553,8 @@
476
553
  >
477
554
  <VvIcon
478
555
  v-if="hasIconBefore"
556
+ v-bind="hasIconBefore"
479
557
  class="vv-input-text__icon"
480
- v-bind="hasIcon"
481
558
  />
482
559
  <input
483
560
  :id="hasId"
@@ -500,9 +577,9 @@
500
577
  </div>
501
578
  <!-- @slot Slot to replace right icon -->
502
579
  <VvIcon
503
- v-if="hasIconAfter || defaultAfterIcon"
580
+ v-if="iconAfter"
581
+ v-bind="iconAfter"
504
582
  class="vv-input-text__icon vv-input-text__icon-after"
505
- v-bind="hasIconAfter ? hasIcon : defaultAfterIcon"
506
583
  />
507
584
  <PasswordInputActions
508
585
  v-else-if="isPassword && !hideActions && isClickable"
@@ -543,5 +620,36 @@
543
620
  <slot name="invalid" v-bind="hintSlotScope" />
544
621
  </template>
545
622
  </HintSlot>
623
+ <VvDropdown
624
+ v-if="hasSuggestions"
625
+ ref="dropdownEl"
626
+ :reference="wrapperEl"
627
+ :autofocus-first="false"
628
+ :trigger-width="true"
629
+ >
630
+ <template #items>
631
+ <VvDropdownOption
632
+ v-for="value in filteredSuggestions"
633
+ :key="value"
634
+ @click.stop="onSuggestionSelect(value)"
635
+ >
636
+ <div class="flex-1">
637
+ <slot name="suggestion" v-bind="{ value }">
638
+ {{ value }}
639
+ </slot>
640
+ </div>
641
+ <button
642
+ v-if="suggestions && hasIconRemoveSuggestion"
643
+ type="button"
644
+ tabindex="-1"
645
+ class="cursor-pointer"
646
+ :title="labelRemoveSuggestion"
647
+ @click.stop="onSuggestionRemove(value)"
648
+ >
649
+ <VvIcon v-bind="hasIconRemoveSuggestion" />
650
+ </button>
651
+ </VvDropdownOption>
652
+ </template>
653
+ </VvDropdown>
546
654
  </div>
547
655
  </template>
@@ -1,6 +1,7 @@
1
1
  import type { ExtractPropTypes, PropType } from 'vue'
2
2
  import type { FactoryOpts } from 'imask'
3
- import { InputTextareaProps } from '../../props'
3
+ import { InputTextareaProps, StorageProps } from '../../props'
4
+ import { type VvIconProps, ACTION_ICONS } from '../VvIcon'
4
5
 
5
6
  export const INPUT_TYPES = {
6
7
  TEXT: 'text',
@@ -19,15 +20,6 @@ export const INPUT_TYPES = {
19
20
  } as const
20
21
  export type InputType = ValueOf<typeof INPUT_TYPES>
21
22
 
22
- export const TYPES_ICON = {
23
- PASSWORD_SHOW: 'eye-on',
24
- PASSWORD_HIDE: 'eye-off',
25
- DATE: 'calendar',
26
- TIME: 'time',
27
- COLOR: 'color',
28
- SEARCH: 'close',
29
- } as const
30
-
31
23
  export const VvInputTextEvents = [
32
24
  'update:modelValue',
33
25
  'update:masked',
@@ -48,6 +40,7 @@ export const VvInputTextEvents = [
48
40
 
49
41
  export const VvInputTextProps = {
50
42
  ...InputTextareaProps,
43
+ ...StorageProps,
51
44
  /**
52
45
  * Input value
53
46
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
@@ -98,24 +91,32 @@ export const VvInputTextProps = {
98
91
  * @see VVIcon
99
92
  */
100
93
  iconShowPassword: {
101
- type: String,
102
- default: TYPES_ICON.PASSWORD_SHOW,
94
+ type: [String, Object] as PropType<string | VvIconProps>,
95
+ default: ACTION_ICONS.showPassword,
103
96
  },
104
97
  /**
105
98
  * VvIcon name for hide password button
106
99
  * @see VVIcon
107
100
  */
108
101
  iconHidePassword: {
109
- type: String,
110
- default: TYPES_ICON.PASSWORD_HIDE,
102
+ type: [String, Object] as PropType<string | VvIconProps>,
103
+ default: ACTION_ICONS.hidePassword,
111
104
  },
112
105
  /**
113
106
  * VvIcon name for clear button
114
107
  * @see VVIcon
115
108
  */
116
109
  iconClear: {
117
- type: String,
118
- default: TYPES_ICON.SEARCH,
110
+ type: [String, Object] as PropType<string | VvIconProps>,
111
+ default: ACTION_ICONS.clear,
112
+ },
113
+ /**
114
+ * VvIcon name for remove suggestion button
115
+ * @see VVIcon
116
+ */
117
+ iconRemoveSuggestion: {
118
+ type: [String, Object] as PropType<string | VvIconProps>,
119
+ default: ACTION_ICONS.remove,
119
120
  },
120
121
  /**
121
122
  * Label for step up button
@@ -152,6 +153,13 @@ export const VvInputTextProps = {
152
153
  type: String,
153
154
  default: 'Clear',
154
155
  },
156
+ /**
157
+ * Label for remove suggestion button
158
+ */
159
+ labelRemoveSuggestion: {
160
+ type: String,
161
+ default: 'Remove suggestion',
162
+ },
155
163
  /**
156
164
  * iMask options
157
165
  * @see https://imask.js.org/guide.html
@@ -194,6 +202,13 @@ export const VvInputTextProps = {
194
202
  type: Boolean,
195
203
  default: false,
196
204
  },
205
+ /**
206
+ * Maximum number of suggestions
207
+ */
208
+ maxSuggestions: {
209
+ type: Number,
210
+ default: 5,
211
+ },
197
212
  }
198
213
 
199
214
  export type VvInputTextPropsTypes = ExtractPropTypes<typeof VvInputTextProps>
@@ -32,12 +32,14 @@
32
32
  >
33
33
  <slot>
34
34
  <VvNavItem
35
- v-for="({ on = {}, ...item }, index) in items"
35
+ v-for="({ on = {}, data, ...item }, index) in items"
36
36
  :key="index"
37
37
  :data-index="index"
38
38
  v-bind="item"
39
39
  v-on="on"
40
- />
40
+ >
41
+ <slot name="item" v-bind="{ item, data, index }" />
42
+ </VvNavItem>
41
43
  </slot>
42
44
  </ul>
43
45
  </nav>
@@ -1,4 +1,4 @@
1
- import type { ExtractPropTypes, Ref } from 'vue'
1
+ import type { ExtractPropTypes } from 'vue'
2
2
  import type { InputGroupState } from '../../types/group'
3
3
  import { CheckboxRadioProps } from '../../props'
4
4
  import { INJECTION_KEY_RADIO_GROUP } from '../../constants'
@@ -22,13 +22,13 @@ export function useGroupProps(
22
22
 
23
23
  // global props
24
24
  const modelValue = getGroupOrLocalRef('modelValue', props, emit)
25
- const valid = getGroupOrLocalRef('valid', props) as Ref<boolean>
26
- const invalid = getGroupOrLocalRef('invalid', props) as Ref<boolean>
25
+ const valid = getGroupOrLocalRef('valid', props)
26
+ const invalid = getGroupOrLocalRef('invalid', props)
27
27
  const readonly = computed(() =>
28
- Boolean(props.readonly || group?.value?.readonly.value),
28
+ Boolean(props.readonly || group?.readonly.value),
29
29
  )
30
30
  const disabled = computed(() =>
31
- Boolean(props.disabled || group?.value?.disabled.value),
31
+ Boolean(props.disabled || group?.disabled.value),
32
32
  )
33
33
 
34
34
  return {
@@ -29,8 +29,7 @@
29
29
  const { disabled, readonly, vertical, valid, invalid, modifiers } =
30
30
  toRefs(props)
31
31
 
32
- useProvideGroupState<InputGroupState>({
33
- key: INJECTION_KEY_RADIO_GROUP,
32
+ useProvideGroupState<InputGroupState>(INJECTION_KEY_RADIO_GROUP, {
34
33
  modelValue,
35
34
  disabled,
36
35
  readonly,
@@ -65,10 +65,7 @@
65
65
  })
66
66
 
67
67
  // icons
68
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
69
- icon,
70
- iconPosition,
71
- )
68
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition)
72
69
 
73
70
  // dirty
74
71
  const isDirty = computed(() => !isEmpty(props.modelValue))
@@ -100,8 +97,8 @@
100
97
  loading: loading.value,
101
98
  disabled: disabled.value,
102
99
  readonly: readonly.value,
103
- 'icon-before': hasIconBefore.value,
104
- 'icon-after': hasIconAfter.value,
100
+ 'icon-before': hasIconBefore.value !== undefined,
101
+ 'icon-after': hasIconAfter.value !== undefined,
105
102
  dirty: isDirty.value,
106
103
  focus: focused.value,
107
104
  floating: floating.value,
@@ -174,8 +171,8 @@
174
171
  <div class="vv-select__inner">
175
172
  <VvIcon
176
173
  v-if="hasIconBefore"
174
+ v-bind="hasIconBefore"
177
175
  class="vv-select__icon"
178
- v-bind="hasIcon"
179
176
  />
180
177
  <select
181
178
  :id="hasId"
@@ -219,8 +216,8 @@
219
216
  </select>
220
217
  <VvIcon
221
218
  v-if="hasIconAfter"
219
+ v-bind="hasIconAfter"
222
220
  class="vv-select__icon vv-select__icon-after"
223
- v-bind="hasIcon"
224
221
  />
225
222
  </div>
226
223
  <div v-if="$slots.after" class="vv-select__input-after">
@@ -59,7 +59,11 @@
59
59
  modifiers: hasNavModifiers,
60
60
  }"
61
61
  @click="onNavClick"
62
- />
62
+ >
63
+ <template #item="{ item, data, index }">
64
+ <slot name="nav-item" v-bind="{ item, data, index }" />
65
+ </template>
66
+ </VvNav>
63
67
  <!-- #endregion -->
64
68
 
65
69
  <!-- #region panels -->
@@ -52,10 +52,7 @@
52
52
  const localModelValue = useDebouncedInput(modelValue, emit, debounce?.value)
53
53
 
54
54
  // icons
55
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
56
- icon,
57
- iconPosition,
58
- )
55
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition)
59
56
 
60
57
  // focus
61
58
  const { focused } = useComponentFocus(textarea, emit)
@@ -113,11 +110,11 @@
113
110
  loading: loading.value,
114
111
  disabled: props.disabled,
115
112
  readonly: props.readonly,
116
- 'icon-before': hasIconBefore.value,
117
- 'icon-after': hasIconAfter.value,
113
+ 'icon-before': hasIconBefore.value !== undefined,
114
+ 'icon-after': hasIconAfter.value !== undefined,
118
115
  floating: props.floating && !isEmpty(props.label),
119
116
  dirty: isDirty.value,
120
- focused: focused.value,
117
+ focus: focused.value,
121
118
  resizable: props.resizable,
122
119
  })),
123
120
  )
@@ -180,8 +177,8 @@
180
177
  <div class="vv-textarea__inner">
181
178
  <VvIcon
182
179
  v-if="hasIconBefore"
180
+ v-bind="hasIconBefore"
183
181
  class="vv-textarea__icon"
184
- v-bind="hasIcon"
185
182
  />
186
183
  <textarea
187
184
  :id="hasId"
@@ -192,8 +189,8 @@
192
189
  />
193
190
  <VvIcon
194
191
  v-if="hasIconAfter"
192
+ v-bind="hasIconAfter"
195
193
  class="vv-textarea__icon vv-textarea__icon-after"
196
- v-bind="hasIcon"
197
194
  />
198
195
  </div>
199
196
  <div v-if="$slots.after" class="vv-textarea__input-after">
@@ -2,6 +2,9 @@ export { default as VvAccordion } from './VvAccordion/VvAccordion.vue'
2
2
  export { default as VvAccordionGroup } from './VvAccordionGroup/VvAccordionGroup.vue'
3
3
  export { default as VvAction } from './VvAction/VvAction.vue'
4
4
  export { default as VvAlert } from './VvAlert/VvAlert.vue'
5
+ export { default as VvAlertGroup } from './VvAlertGroup/VvAlertGroup.vue'
6
+ export { default as VvAvatar } from './VvAvatar/VvAvatar.vue'
7
+ export { default as VvAvatarGroup } from './VvAvatarGroup/VvAvatarGroup.vue'
5
8
  export { default as VvBadge } from './VvBadge/VvBadge.vue'
6
9
  export { default as VvBreadcrumb } from './VvBreadcrumb/VvBreadcrumb.vue'
7
10
  export { default as VvButton } from './VvButton/VvButton.vue'
@@ -12,9 +15,15 @@ export { default as VvCheckboxGroup } from './VvCheckboxGroup/VvCheckboxGroup.vu
12
15
  export { default as VvCombobox } from './VvCombobox/VvCombobox.vue'
13
16
  export { default as VvDialog } from './VvDialog/VvDialog.vue'
14
17
  export { default as VvDropdown } from './VvDropdown/VvDropdown.vue'
18
+ export { default as VvDropdownAction } from './VvDropdown/VvDropdownAction.vue'
19
+ export { default as VvDropdownItem } from './VvDropdown/VvDropdownItem.vue'
20
+ export { default as VvDropdownOptgroup } from './VvDropdown/VvDropdownOptgroup.vue'
21
+ export { default as VvDropdownOption } from './VvDropdown/VvDropdownOption.vue'
15
22
  export { default as VvIcon } from './VvIcon/VvIcon.vue'
16
23
  export { default as VvInputText } from './VvInputText/VvInputText.vue'
17
24
  export { default as VvNav } from './VvNav/VvNav.vue'
25
+ export { default as VvNavItem } from './VvNav/VvNavItem.vue'
26
+ export { default as VvNavSeparator } from './VvNav/VvNavSeparator.vue'
18
27
  export { default as VvProgress } from './VvProgress/VvProgress.vue'
19
28
  export { default as VvRadio } from './VvRadio/VvRadio.vue'
20
29
  export { default as VvRadioGroup } from './VvRadioGroup/VvRadioGroup.vue'
@@ -22,3 +31,4 @@ export { default as VvSelect } from './VvSelect/VvSelect.vue'
22
31
  export { default as VvTab } from './VvTab/VvTab.vue'
23
32
  export { default as VvTextarea } from './VvTextarea/VvTextarea.vue'
24
33
  export { default as VvTooltip } from './VvTooltip/VvTooltip.vue'
34
+ export { default as VvInputFile } from './VvInputFile/VvInputFile.vue'
@@ -6,11 +6,13 @@ import {
6
6
  DEFAULT_ALERT_INFO_ICON,
7
7
  DefaultAlertIconMap,
8
8
  } from '@/constants'
9
- import type { Alert, AlertModifiers } from '@/types/alert'
9
+ import type { Alert, AlertModifier } from '@/types/alert'
10
+
11
+ type AlertInGroup = Alert & { timestamp: number; group: string }
10
12
 
11
13
  const groups = reactive(
12
- new Map<string, Map<string, Alert>>([
13
- [DEFAULT_ALERT_GROUP, new Map<string, Alert>()],
14
+ new Map<string, Map<string, AlertInGroup>>([
15
+ [DEFAULT_ALERT_GROUP, new Map<string, AlertInGroup>()],
14
16
  ]),
15
17
  )
16
18
 
@@ -45,10 +47,11 @@ export const useAlert = () => {
45
47
  modifiers = DEFAULT_ALERT_MODIFIERS,
46
48
  dismissable = DEFAULT_ALERT_DISMISSABLE,
47
49
  autoClose = DEFAULT_ALERT_AUTO_CLOSE,
48
- } = {} as Partial<Alert>,
50
+ timestamp = Date.now(),
51
+ } = {} as Partial<AlertInGroup>,
49
52
  ) => {
50
53
  if (!groups.has(group)) {
51
- groups.set(group, new Map<string, Alert>())
54
+ groups.set(group, new Map<string, AlertInGroup>())
52
55
  }
53
56
  const groupMap = groups.get(group)
54
57
  const normalizedModifiers =
@@ -56,8 +59,8 @@ export const useAlert = () => {
56
59
 
57
60
  if (!icon) {
58
61
  const alertModifier = normalizedModifiers.find((modifier) =>
59
- DefaultAlertIconMap.has(modifier as AlertModifiers),
60
- ) as AlertModifiers | undefined
62
+ DefaultAlertIconMap.has(modifier as AlertModifier),
63
+ ) as AlertModifier | undefined
61
64
 
62
65
  if (alertModifier) {
63
66
  icon = DefaultAlertIconMap.get(alertModifier) as string
@@ -73,7 +76,7 @@ export const useAlert = () => {
73
76
  modifiers,
74
77
  dismissable,
75
78
  autoClose,
76
- timestamp: Date.now(),
79
+ timestamp,
77
80
  })
78
81
  }
79
82
 
@@ -88,7 +91,7 @@ export const useAlert = () => {
88
91
  return groupMap && groupMap instanceof Map
89
92
  ? Array.from(groupMap?.values()).sort(
90
93
  (a, b) => a.timestamp - b.timestamp,
91
- )
94
+ )
92
95
  : []
93
96
  })
94
97
  }
@@ -1,6 +1,7 @@
1
1
  import { type Ref, Fragment } from 'vue'
2
2
  import mitt from 'mitt'
3
3
  import {
4
+ type DropdownItemState,
4
5
  INJECTION_KEY_DROPDOWN_TRIGGER,
5
6
  INJECTION_KEY_DROPDOWN_ACTION,
6
7
  INJECTION_KEY_DROPDOWN_ITEM,
@@ -61,10 +62,9 @@ export function useProvideDropdownTrigger({
61
62
  */
62
63
  export function useProvideDropdownItem({
63
64
  role,
64
- expanded,
65
- }: {
65
+ ...others
66
+ }: Omit<DropdownItemState, 'role'> & {
66
67
  role: Ref<`${DropdownRole}`>
67
- expanded: Ref<boolean>
68
68
  }) {
69
69
  const itemRole = computed(() =>
70
70
  role.value === DropdownRole.listbox
@@ -73,7 +73,7 @@ export function useProvideDropdownItem({
73
73
  )
74
74
  provide(INJECTION_KEY_DROPDOWN_ITEM, {
75
75
  role: itemRole,
76
- expanded,
76
+ ...others,
77
77
  })
78
78
  return { itemRole }
79
79
  }