@volverjs/ui-vue 0.0.10-beta.2 → 0.0.10-beta.20

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 (251) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +98 -3
  3. package/auto-imports.d.ts +6 -2
  4. package/bin/icons.cjs +1 -1
  5. package/bin/icons.js +23 -16
  6. package/dist/Volver.d.ts +1 -1
  7. package/dist/components/VvAccordion/VvAccordion.es.js +67 -13
  8. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  9. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +13 -6
  10. package/dist/components/VvAccordion/index.d.ts +4 -1
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +111 -37
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  13. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -8
  14. package/dist/components/VvAccordionGroup/index.d.ts +4 -1
  15. package/dist/components/VvAction/VvAction.es.js +56 -12
  16. package/dist/components/VvAction/VvAction.umd.js +1 -1
  17. package/dist/components/VvAction/VvAction.vue.d.ts +59 -12
  18. package/dist/components/VvAction/index.d.ts +25 -4
  19. package/dist/components/VvAlert/VvAlert.es.js +188 -152
  20. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  21. package/dist/components/VvAlert/VvAlert.vue.d.ts +18 -8
  22. package/dist/components/VvAlert/index.d.ts +9 -5
  23. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +230 -174
  24. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  25. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +13 -6
  26. package/dist/components/VvAlertGroup/index.d.ts +6 -2
  27. package/dist/components/VvAvatar/VvAvatar.es.js +54 -9
  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 +111 -36
  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 +71 -16
  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 +257 -49
  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 +165 -137
  44. package/dist/components/VvButton/VvButton.umd.js +1 -1
  45. package/dist/components/VvButton/VvButton.vue.d.ts +101 -27
  46. package/dist/components/VvButton/index.d.ts +41 -14
  47. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +67 -15
  48. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  49. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +23 -10
  50. package/dist/components/VvButtonGroup/index.d.ts +8 -2
  51. package/dist/components/VvCard/VvCard.es.js +79 -24
  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 +89 -21
  56. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  57. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +104 -32
  58. package/dist/components/VvCheckbox/index.d.ts +45 -12
  59. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +168 -66
  60. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  61. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +100 -29
  62. package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
  63. package/dist/components/VvCombobox/VvCombobox.es.js +721 -527
  64. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  65. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +145 -72
  66. package/dist/components/VvCombobox/index.d.ts +53 -22
  67. package/dist/components/VvDialog/VvDialog.es.js +133 -141
  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 +121 -55
  71. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  72. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +61 -35
  73. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +72 -11
  74. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
  75. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
  76. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +26 -7
  77. package/dist/components/VvDropdown/index.d.ts +16 -11
  78. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +80 -21
  79. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  80. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
  81. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +56 -8
  82. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  83. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +76 -17
  84. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  85. package/dist/components/VvIcon/VvIcon.es.js +23 -96
  86. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  87. package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
  88. package/dist/components/VvIcon/index.d.ts +21 -48
  89. package/dist/components/VvInputFile/VvInputFile.es.js +1558 -0
  90. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
  91. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +190 -0
  92. package/dist/components/VvInputFile/index.d.ts +74 -0
  93. package/dist/components/VvInputText/VvInputClearAction.d.ts +2 -2
  94. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +1 -1
  95. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  96. package/dist/components/VvInputText/VvInputText.es.js +266 -242
  97. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  98. package/dist/components/VvInputText/VvInputText.vue.d.ts +153 -46
  99. package/dist/components/VvInputText/index.d.ts +69 -18
  100. package/dist/components/VvNav/VvNav.es.js +150 -73
  101. package/dist/components/VvNav/VvNav.umd.js +1 -1
  102. package/dist/components/VvNav/VvNav.vue.d.ts +41 -14
  103. package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
  104. package/dist/components/VvNav/{VvNavSeparator.d.ts → VvNavSeparator.vue.d.ts} +1 -1
  105. package/dist/components/VvNav/index.d.ts +5 -13
  106. package/dist/components/VvNavItem/VvNavItem.es.js +435 -0
  107. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
  108. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
  109. package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
  110. package/dist/components/VvProgress/VvProgress.es.js +65 -14
  111. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  112. package/dist/components/VvProgress/VvProgress.vue.d.ts +10 -3
  113. package/dist/components/VvProgress/index.d.ts +4 -1
  114. package/dist/components/VvRadio/VvRadio.es.js +89 -21
  115. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  116. package/dist/components/VvRadio/VvRadio.vue.d.ts +102 -30
  117. package/dist/components/VvRadio/index.d.ts +44 -11
  118. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +168 -66
  119. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  120. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +100 -29
  121. package/dist/components/VvRadioGroup/index.d.ts +45 -12
  122. package/dist/components/VvSelect/VvSelect.es.js +244 -226
  123. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  124. package/dist/components/VvSelect/VvSelect.vue.d.ts +112 -39
  125. package/dist/components/VvSelect/index.d.ts +48 -14
  126. package/dist/components/VvTab/VvTab.es.js +251 -110
  127. package/dist/components/VvTab/VvTab.umd.js +1 -1
  128. package/dist/components/VvTab/VvTab.vue.d.ts +50 -13
  129. package/dist/components/VvTab/index.d.ts +13 -4
  130. package/dist/components/VvTextarea/VvTextarea.es.js +225 -212
  131. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  132. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +155 -48
  133. package/dist/components/VvTextarea/index.d.ts +68 -19
  134. package/dist/components/VvTooltip/VvTooltip.es.js +72 -17
  135. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  136. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +10 -3
  137. package/dist/components/VvTooltip/index.d.ts +4 -1
  138. package/dist/components/index.d.ts +10 -0
  139. package/dist/components/index.es.js +2635 -1301
  140. package/dist/components/index.umd.js +1 -1
  141. package/dist/composables/alert/useAlert.d.ts +37 -4
  142. package/dist/composables/dropdown/useProvideDropdown.d.ts +1 -1
  143. package/dist/composables/index.d.ts +1 -0
  144. package/dist/composables/index.es.js +88 -1
  145. package/dist/composables/index.umd.js +1 -1
  146. package/dist/composables/useBlurhash.d.ts +7 -0
  147. package/dist/composables/useComponentIcon.d.ts +9 -8
  148. package/dist/composables/useVolver.d.ts +1 -1
  149. package/dist/directives/index.d.ts +3 -5
  150. package/dist/directives/index.es.js +92 -31
  151. package/dist/directives/index.umd.js +1 -1
  152. package/dist/directives/v-tooltip.es.js +90 -26
  153. package/dist/directives/v-tooltip.umd.js +1 -1
  154. package/dist/icons.es.js +6 -6
  155. package/dist/icons.umd.js +1 -1
  156. package/dist/index.d.ts +3 -1
  157. package/dist/index.es.js +81 -16
  158. package/dist/index.umd.js +1 -1
  159. package/dist/props/index.d.ts +287 -73
  160. package/dist/resolvers/unplugin.d.ts +6 -1
  161. package/dist/resolvers/unplugin.es.js +78 -10
  162. package/dist/resolvers/unplugin.umd.js +1 -1
  163. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +72 -84
  164. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +623 -461
  165. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
  166. package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
  167. package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
  168. package/dist/stories/Icon/Icon.settings.d.ts +1 -0
  169. package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
  170. package/dist/stories/InputFile/InputFile.stories.d.ts +13 -0
  171. package/dist/stories/InputFile/InputFileModifiers.stories.d.ts +9 -0
  172. package/dist/stories/InputFile/InputFileSlots.stories.d.ts +6 -0
  173. package/dist/stories/Tab/Tab.settings.d.ts +4 -37
  174. package/dist/types/alert.d.ts +13 -0
  175. package/dist/types/blurhash.d.ts +12 -0
  176. package/dist/types/floating-ui.d.ts +6 -0
  177. package/dist/types/generic.d.ts +4 -0
  178. package/dist/types/group.d.ts +37 -0
  179. package/dist/types/index.d.ts +7 -0
  180. package/dist/types/input-file.d.ts +14 -0
  181. package/dist/types/nav.d.ts +18 -0
  182. package/dist/utils/ObjectUtilities.d.ts +0 -1
  183. package/dist/workers/blurhash.d.ts +1 -0
  184. package/package.json +91 -74
  185. package/src/Volver.ts +31 -20
  186. package/src/assets/icons/detailed.json +1 -1
  187. package/src/assets/icons/normal.json +1 -1
  188. package/src/assets/icons/simple.json +1 -1
  189. package/src/components/VvAccordion/VvAccordion.vue +2 -2
  190. package/src/components/VvAction/VvAction.vue +5 -2
  191. package/src/components/VvAlert/index.ts +1 -3
  192. package/src/components/VvAlertGroup/index.ts +2 -1
  193. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
  194. package/src/components/VvBreadcrumb/index.ts +2 -8
  195. package/src/components/VvButton/VvButton.vue +6 -6
  196. package/src/components/VvButton/index.ts +2 -4
  197. package/src/components/VvCombobox/VvCombobox.vue +24 -16
  198. package/src/components/VvCombobox/index.ts +4 -0
  199. package/src/components/VvIcon/VvIcon.vue +2 -2
  200. package/src/components/VvIcon/index.ts +22 -48
  201. package/src/components/VvInputFile/VvInputFile.vue +302 -0
  202. package/src/components/VvInputFile/index.ts +38 -0
  203. package/src/components/VvInputText/VvInputText.vue +13 -14
  204. package/src/components/VvNav/VvNav.vue +30 -50
  205. package/src/components/VvNav/VvNavItem.vue +18 -0
  206. package/src/components/VvNav/VvNavSeparator.vue +11 -0
  207. package/src/components/VvNav/index.ts +2 -15
  208. package/src/components/VvSelect/VvSelect.vue +5 -8
  209. package/src/components/VvTab/VvTab.vue +63 -35
  210. package/src/components/VvTab/index.ts +10 -4
  211. package/src/components/VvTextarea/VvTextarea.vue +6 -9
  212. package/src/components/index.ts +10 -0
  213. package/src/composables/index.ts +1 -0
  214. package/src/composables/useBlurhash.ts +76 -0
  215. package/src/composables/useComponentIcon.ts +15 -14
  216. package/src/composables/useUniqueId.ts +2 -2
  217. package/src/directives/index.ts +3 -6
  218. package/src/directives/v-tooltip.ts +19 -10
  219. package/src/index.ts +3 -1
  220. package/src/props/index.ts +115 -27
  221. package/src/resolvers/unplugin.ts +24 -14
  222. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
  223. package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
  224. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  225. package/src/stories/Icon/Icon.settings.ts +3 -3
  226. package/src/stories/InputFile/InputFile.settings.ts +36 -0
  227. package/src/stories/InputFile/InputFile.stories.ts +98 -0
  228. package/src/stories/InputFile/InputFileModifiers.stories.ts +51 -0
  229. package/src/stories/InputFile/InputFileSlots.stories.ts +25 -0
  230. package/src/stories/Nav/Nav.settings.ts +3 -4
  231. package/src/stories/Nav/Nav.test.ts +4 -15
  232. package/src/stories/Tab/Tab.settings.ts +9 -9
  233. package/src/stories/Tab/Tab.stories.ts +2 -2
  234. package/src/stories/Tab/Tab.test.ts +6 -14
  235. package/src/stories/argTypes.ts +1 -1
  236. package/src/types/blurhash.ts +21 -0
  237. package/src/types/generic.ts +6 -0
  238. package/src/types/index.ts +7 -0
  239. package/src/types/input-file.ts +16 -0
  240. package/src/types/nav.ts +20 -0
  241. package/src/utils/ObjectUtilities.ts +0 -11
  242. package/src/workers/blurhash.ts +9 -0
  243. package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
  244. package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
  245. package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
  246. package/src/components/VvNav/VvNavItemTitle.vue +0 -11
  247. package/src/components/VvNav/VvNavSeparator.ts +0 -8
  248. package/src/types/generic.d.ts +0 -6
  249. /package/src/types/{alert.d.ts → alert.ts} +0 -0
  250. /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
  251. /package/src/types/{group.d.ts → group.ts} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { computed, defineComponent, provide, h, Fragment, unref, toRefs, useAttrs, ref, onMounted, watch, nextTick, openBlock, createElementBlock, createVNode, withCtx, renderSlot, normalizeProps, guardReactiveProps, Transition, mergeProps, toHandlers, withDirectives, createElementVNode, normalizeStyle, normalizeClass, createCommentVNode, vShow } from "vue";
2
2
  import { autoPlacement, flip, shift, size, offset, arrow, useFloating, autoUpdate } from "@floating-ui/vue";
3
- import { nanoid } from "nanoid";
3
+ import { uid } from "uid";
4
4
  import { useMutationObserver, useVModel, onClickOutside, useFocusWithin, onKeyStroke } from "@vueuse/core";
5
5
  import mitt from "mitt";
6
6
  var Strategy = /* @__PURE__ */ ((Strategy2) => {
@@ -37,6 +37,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
37
37
  ButtonType2["reset"] = "reset";
38
38
  return ButtonType2;
39
39
  })(ButtonType || {});
40
+ var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
41
+ ActionTag2["nuxtLink"] = "nuxt-link";
42
+ ActionTag2["routerLink"] = "router-link";
43
+ ActionTag2["a"] = "a";
44
+ ActionTag2["button"] = "button";
45
+ return ActionTag2;
46
+ })(ActionTag || {});
40
47
  var DropdownRole = /* @__PURE__ */ ((DropdownRole2) => {
41
48
  DropdownRole2["listbox"] = "listbox";
42
49
  DropdownRole2["menu"] = "menu";
@@ -77,6 +84,7 @@ const LinkProps = {
77
84
  */
78
85
  target: {
79
86
  type: String,
87
+ default: void 0,
80
88
  validator: (value) => Object.values(AnchorTarget).includes(value)
81
89
  },
82
90
  /**
@@ -91,38 +99,65 @@ const DisabledProps = {
91
99
  /**
92
100
  * Whether the form control is disabled
93
101
  */
94
- disabled: Boolean
102
+ disabled: {
103
+ type: Boolean,
104
+ default: false
105
+ }
95
106
  };
96
107
  const ActiveProps = {
97
108
  /**
98
109
  * Whether the item is active
99
110
  */
100
- active: Boolean
111
+ active: {
112
+ type: Boolean,
113
+ default: false
114
+ }
115
+ };
116
+ const CurrentProps = {
117
+ /**
118
+ * Whether the item is current
119
+ */
120
+ current: {
121
+ type: Boolean,
122
+ default: false
123
+ }
101
124
  };
102
125
  const PressedProps = {
103
126
  /**
104
127
  * Whether the item is pressed
105
128
  */
106
- pressed: Boolean
129
+ pressed: {
130
+ type: Boolean,
131
+ default: false
132
+ }
107
133
  };
108
134
  const LabelProps = {
109
135
  /**
110
136
  * The item label
111
137
  */
112
- label: [String, Number]
138
+ label: {
139
+ type: [String, Number],
140
+ default: void 0
141
+ }
113
142
  };
114
143
  const ModifiersProps = {
115
144
  /**
116
145
  * Component BEM modifiers
117
146
  */
118
- modifiers: [String, Array]
147
+ modifiers: {
148
+ type: [String, Array],
149
+ default: void 0
150
+ }
119
151
  };
120
152
  ({
121
153
  /**
122
154
  * VvIcon name or props
123
155
  * @see VVIcon
124
156
  */
125
- icon: { type: [String, Object] },
157
+ icon: {
158
+ type: [String, Object],
159
+ default: void 0
160
+ },
126
161
  /**
127
162
  * VvIcon position
128
163
  */
@@ -160,7 +195,8 @@ const DropdownProps = {
160
195
  * Dropdown show / hide transition name
161
196
  */
162
197
  transitionName: {
163
- type: String
198
+ type: String,
199
+ default: void 0
164
200
  },
165
201
  /**
166
202
  * Offset of the dropdown from the trigger
@@ -228,7 +264,8 @@ const DropdownProps = {
228
264
  * Set dropdown width to the same as the trigger
229
265
  */
230
266
  triggerWidth: {
231
- type: Boolean
267
+ type: Boolean,
268
+ default: false
232
269
  }
233
270
  };
234
271
  ({
@@ -236,6 +273,7 @@ const DropdownProps = {
236
273
  ...LabelProps,
237
274
  ...PressedProps,
238
275
  ...ActiveProps,
276
+ ...CurrentProps,
239
277
  ...LinkProps,
240
278
  /**
241
279
  * Button type
@@ -251,6 +289,13 @@ const DropdownProps = {
251
289
  ariaLabel: {
252
290
  type: String,
253
291
  default: void 0
292
+ },
293
+ /**
294
+ * Default tag for the action
295
+ */
296
+ defaultTag: {
297
+ type: String,
298
+ default: ActionTag.button
254
299
  }
255
300
  });
256
301
  const VvDropdownProps = {
@@ -280,7 +325,7 @@ const VvDropdownProps = {
280
325
  validator: (value) => Object.values(DropdownRole).includes(value)
281
326
  }
282
327
  };
283
- const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
328
+ const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
284
329
  function useProvideDropdownTrigger({
285
330
  reference,
286
331
  id,
@@ -368,8 +413,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
368
413
  "leave",
369
414
  "leave-cancelled"
370
415
  ],
371
- setup(__props, { expose: __expose, emit }) {
416
+ setup(__props, { expose: __expose, emit: __emit }) {
372
417
  const props = __props;
418
+ const emit = __emit;
373
419
  const { id } = toRefs(props);
374
420
  const hasId = useUniqueId(id);
375
421
  const attrs = useAttrs();
@@ -705,50 +751,70 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
705
751
  }
706
752
  };
707
753
  return (_ctx, _cache) => {
708
- return openBlock(), createElementBlock(Fragment, null, [
709
- createVNode(unref(VvDropdownTriggerProvider), null, {
710
- default: withCtx(() => [
711
- renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
712
- ]),
713
- _: 3
714
- }),
715
- createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers)), {
716
- default: withCtx(() => [
717
- withDirectives(createElementVNode("div", {
718
- ref_key: "floatingEl",
719
- ref: floatingEl,
720
- style: normalizeStyle(unref(dropdownPlacement)),
721
- class: normalizeClass(unref(bemCssClasses))
722
- }, [
723
- props.arrow ? (openBlock(), createElementBlock("div", {
724
- key: 0,
725
- ref_key: "arrowEl",
726
- ref: arrowEl,
727
- style: normalizeStyle(unref(arrowPlacement)),
728
- class: "vv-dropdown__arrow"
729
- }, null, 4)) : createCommentVNode("", true),
730
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
731
- createElementVNode("div", mergeProps(unref(attrs), {
732
- id: unref(hasId),
733
- ref_key: "listEl",
734
- ref: listEl,
735
- tabindex: !unref(expanded) ? -1 : void 0,
736
- role: unref(role),
737
- "aria-labelledby": unref(hasAriaLabelledby),
738
- class: "vv-dropdown__list"
739
- }), [
740
- renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
741
- role: unref(itemRole)
742
- })))
743
- ], 16, _hoisted_1),
744
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
745
- ], 6), [
746
- [vShow, unref(expanded)]
747
- ])
748
- ]),
749
- _: 3
750
- }, 16, ["name"])
751
- ], 64);
754
+ return openBlock(), createElementBlock(
755
+ Fragment,
756
+ null,
757
+ [
758
+ createVNode(unref(VvDropdownTriggerProvider), null, {
759
+ default: withCtx(() => [
760
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps({ init, show, hide, toggle, expanded: unref(expanded), aria: unref(referenceAria) })))
761
+ ]),
762
+ _: 3
763
+ /* FORWARDED */
764
+ }),
765
+ createVNode(Transition, mergeProps({ name: _ctx.transitionName }, toHandlers(dropdownTransitionHandlers), { persisted: "" }), {
766
+ default: withCtx(() => [
767
+ withDirectives(createElementVNode(
768
+ "div",
769
+ {
770
+ ref_key: "floatingEl",
771
+ ref: floatingEl,
772
+ style: normalizeStyle(unref(dropdownPlacement)),
773
+ class: normalizeClass(unref(bemCssClasses))
774
+ },
775
+ [
776
+ props.arrow ? (openBlock(), createElementBlock(
777
+ "div",
778
+ {
779
+ key: 0,
780
+ ref_key: "arrowEl",
781
+ ref: arrowEl,
782
+ style: normalizeStyle(unref(arrowPlacement)),
783
+ class: "vv-dropdown__arrow"
784
+ },
785
+ null,
786
+ 4
787
+ /* STYLE */
788
+ )) : createCommentVNode("v-if", true),
789
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps({ expanded: unref(expanded) }))),
790
+ createElementVNode("div", mergeProps(unref(attrs), {
791
+ id: unref(hasId),
792
+ ref_key: "listEl",
793
+ ref: listEl,
794
+ tabindex: !unref(expanded) ? -1 : void 0,
795
+ role: unref(role),
796
+ "aria-labelledby": unref(hasAriaLabelledby),
797
+ class: "vv-dropdown__list"
798
+ }), [
799
+ renderSlot(_ctx.$slots, "items", normalizeProps(guardReactiveProps({
800
+ role: unref(itemRole)
801
+ })))
802
+ ], 16, _hoisted_1),
803
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps({ expanded: unref(expanded) })))
804
+ ],
805
+ 6
806
+ /* CLASS, STYLE */
807
+ ), [
808
+ [vShow, unref(expanded)]
809
+ ])
810
+ ]),
811
+ _: 3
812
+ /* FORWARDED */
813
+ }, 16, ["name"])
814
+ ],
815
+ 64
816
+ /* STABLE_FRAGMENT */
817
+ );
752
818
  };
753
819
  }
754
820
  });
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@floating-ui/vue"),require("nanoid"),require("@vueuse/core"),require("mitt")):"function"==typeof define&&define.amd?define(["vue","@floating-ui/vue","nanoid","@vueuse/core","mitt"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdown=t(e.vue,e.vue$1,e.nanoid,e.core,e.mitt)}(this,(function(e,t,o,r,l){"use strict";var a=(e=>(e.absolute="absolute",e.fixed="fixed",e))(a||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),u=(e=>(e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e))(u||{}),i=(e=>(e.before="before",e.after="after",e))(i||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{}),s=(e=>(e.listbox="listbox",e.menu="menu",e))(s||{}),f=(e=>(e.option="option",e.presentation="presentation",e))(f||{});const p=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownItem"),v=(Boolean,Boolean,Boolean,{modifiers:[String,Array]});i.before;const m={id:[String,Number]},b={placement:{type:String,default:n.bottom,validator:e=>Object.values(n).includes(e)||Object.values(u).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(a).includes(e)},transitionName:{type:String},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean}};d.button;const g={...m,...b,...v,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:s.menu,validator:e=>Object.values(s).includes(e)}};const h=["id","tabindex","role","aria-labelledby"];return e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:g,emits:["update:modelValue","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","after-enter","enter-cancelled","before-leave","leave","leave-cancelled"],setup(u,{expose:i,emit:d}){const v=u,{id:m}=e.toRefs(v),b=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.nanoid()))))(m),g=e.useAttrs(),y=e.ref("auto"),x=e.ref("auto"),w=e.ref(null),S=e.ref(),E=e.ref(null),k=e.ref(null),P=e.computed({get:()=>v.reference??w.value,set:e=>{w.value=e}}),O=e.ref(!1);e.onMounted((()=>{r.useMutationObserver(S.value,(()=>{var e;O.value="true"===(null==(e=window.getComputedStyle(S.value).getPropertyValue("--dropdown-custom-position"))?void 0:e.trim())}),{attributeFilter:["style"],window:window})}));const $=e.computed((()=>{const e=[];if(v.autoPlacement?"boolean"==typeof v.autoPlacement?e.push(t.autoPlacement()):e.push(t.autoPlacement(v.autoPlacement)):v.flip&&("boolean"==typeof v.flip?e.push(t.flip({fallbackStrategy:"initialPlacement"})):e.push(t.flip(v.flip))),v.shift&&("boolean"==typeof v.shift?e.push(t.shift()):e.push(t.shift(v.shift))),v.size){const o=({availableWidth:e,availableHeight:t})=>{y.value=`${e}px`,x.value=`${t}px`};"boolean"==typeof v.size?e.push(t.size({apply:o})):e.push(t.size({...v.size,apply:o}))}return v.offset&&(e.push(t.offset(Number(v.offset))),["string","number"].includes(typeof v.offset)?e.push(t.offset(Number(v.offset))):e.push(t.offset(v.offset))),v.arrow&&e.push(t.arrow({element:E})),e})),{x:B,y:z,middlewareData:V,placement:j,strategy:C}=t.useFloating(P,S,{whileElementsMounted:(...e)=>t.autoUpdate(...e,{animationFrame:v.strategy===a.fixed}),placement:e.computed((()=>v.placement)),strategy:e.computed((()=>v.strategy)),middleware:$}),A=e.computed((()=>{var e;if(O.value)return;const t=v.triggerWidth&&P.value?`${null==(e=P.value)?void 0:e.offsetWidth}px`:void 0;return{position:C.value,top:`${z.value??0}px`,left:`${B.value??0}px`,maxWidth:t?void 0:y.value,maxHeight:x.value,width:t}})),N=e.computed((()=>j.value.split("-")[0])),D=e.computed((()=>{var e,t,o,r,l;if(O.value)return;const a={[n.top]:n.bottom,[n.right]:n.left,[n.bottom]:n.top,[n.left]:n.right}[N.value];return{left:void 0!==(null==(e=V.value.arrow)?void 0:e.x)?`${null==(t=V.value.arrow)?void 0:t.x}px`:void 0,top:void 0!==(null==(o=V.value.arrow)?void 0:o.y)?`${null==(r=V.value.arrow)?void 0:r.y}px`:void 0,[a]:-((null==(l=E.value)?void 0:l.offsetWidth)??0)/2+"px"}})),_=r.useVModel(v,"modelValue",d),F=e.ref(!1),R=e.computed({get:()=>_.value??F.value,set:e=>{void 0!==_.value?_.value=e:F.value=e}}),T=()=>{R.value=!0},W=()=>{R.value=!1},q=()=>{R.value=!R.value},K=e=>{P.value=e};i({toggle:q,show:T,hide:W,init:K,customPosition:O}),e.watch(R,(t=>{t&&v.autofocusFirst&&e.nextTick((()=>{const e=Y(S.value);e.length>0&&e[0].focus({preventScroll:!0})}))})),r.onClickOutside(S,(()=>{!v.keepOpen&&R.value&&(R.value=!1)}),{ignore:[P]});const M=e.computed((()=>{var e,t;return(null==(t=null==(e=P.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),H=e.computed((()=>({"aria-controls":b.value,"aria-haspopup":!0,"aria-expanded":R.value}))),{component:U,bus:I}=function({reference:t,id:o,expanded:r,aria:a}){const n=l(),u=e.defineComponent({name:"VvDropdownTriggerProvider",setup(){e.provide(p,{reference:t,id:o,expanded:r,aria:a,bus:n})},render(){var t,o;return e.h(e.Fragment,{},null==(o=(t=this.$slots).default)?void 0:o.call(t))}});return{bus:n,component:u}}({reference:P,id:b,expanded:R,aria:H});I.on("click",q);const{role:G,modifiers:J}=e.toRefs(v),{itemRole:L}=function({role:t,expanded:o}){const r=e.computed((()=>t.value===s.listbox?f.option:f.presentation));return e.provide(c,{role:r,expanded:o}),{itemRole:r}}({role:G,expanded:R}),Q=function(t,o,r){return e.computed((()=>{const l={[t]:!0},a="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(l[`${t}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((o=>{l[`${t}--${o}`]=e.unref(r.value[o])})),l}))}("vv-dropdown",J,e.computed((()=>({arrow:v.arrow})))),{focused:X}=r.useFocusWithin(S);function Y(e){return e?[...e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden"))):[]}r.onKeyStroke("Escape",(e=>{R.value&&(e.preventDefault(),W())})),r.onKeyStroke("ArrowDown",(t=>{R.value&&X.value&&(t.preventDefault(),e.nextTick((()=>{if(X.value){const e=Y(S.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus({preventScroll:!0}):e[0].focus({preventScroll:!0})}})))})),r.onKeyStroke("ArrowUp",(t=>{R.value&&X.value&&(t.preventDefault(),e.nextTick((()=>{if(X.value){const e=Y(S.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus({preventScroll:!0}):e[e.length-1].focus({preventScroll:!0})}})))})),r.onKeyStroke([" ","Enter"],(e=>{const t=e.target;R.value&&X.value&&t&&(null==t||t.click())}));const Z={"before-enter":()=>{d(R.value?"beforeExpand":"beforeCollapse"),d("before-enter")},"after-leave":()=>{d(R.value?"afterExpand":"afterCollapse"),d("after-leave")},enter:()=>{d("enter")},"after-enter":()=>{d("after-enter")},"enter-cancelled":()=>{d("enter-cancelled")},"before-leave":()=>{d("before-leave")},leave:()=>{d("leave")},"leave-cancelled":()=>{d("leave-cancelled")}};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(U),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:K,show:T,hide:W,toggle:q,expanded:e.unref(R),aria:e.unref(H)})))])),_:3}),e.createVNode(e.Transition,e.mergeProps({name:t.transitionName},e.toHandlers(Z)),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:S,style:e.normalizeStyle(e.unref(A)),class:e.normalizeClass(e.unref(Q))},[v.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:E,style:e.normalizeStyle(e.unref(D)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(R)}))),e.createElementVNode("div",e.mergeProps(e.unref(g),{id:e.unref(b),ref_key:"listEl",ref:k,tabindex:e.unref(R)?void 0:-1,role:e.unref(G),"aria-labelledby":e.unref(M),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(L)})))],16,h),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(R)})))],6),[[e.vShow,e.unref(R)]])])),_:3},16,["name"])],64))}})}));
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@floating-ui/vue"),require("uid"),require("@vueuse/core"),require("mitt")):"function"==typeof define&&define.amd?define(["vue","@floating-ui/vue","uid","@vueuse/core","mitt"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdown=t(e.vue,e.vue$1,e.uid,e.core,e.mitt)}(this,(function(e,t,o,r,l){"use strict";var a=(e=>(e.absolute="absolute",e.fixed="fixed",e))(a||{}),n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),u=(e=>(e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e))(u||{}),i=(e=>(e.before="before",e.after="after",e))(i||{}),d=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(d||{}),s=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(s||{}),f=(e=>(e.listbox="listbox",e.menu="menu",e))(f||{}),p=(e=>(e.option="option",e.presentation="presentation",e))(p||{});const c=Symbol.for("dropdownTrigger"),v=Symbol.for("dropdownItem"),m=(Boolean,Boolean,Boolean,Boolean,{modifiers:{type:[String,Array],default:void 0}});i.before;const b={id:[String,Number]},g={placement:{type:String,default:n.bottom,validator:e=>Object.values(n).includes(e)||Object.values(u).includes(e)},strategy:{type:String,default:void 0,validator:e=>Object.values(a).includes(e)},transitionName:{type:String,default:void 0},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},keepOpen:{type:Boolean,default:!1},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean,default:!1}};d.button,s.button;const h={...b,...g,...m,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:f.menu,validator:e=>Object.values(f).includes(e)}};const y=["id","tabindex","role","aria-labelledby"];return e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:h,emits:["update:modelValue","beforeExpand","beforeCollapse","afterExpand","afterCollapse","before-enter","after-leave","enter","after-enter","enter-cancelled","before-leave","leave","leave-cancelled"],setup(u,{expose:i,emit:d}){const s=u,m=d,{id:b}=e.toRefs(s),g=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.uid()))))(b),h=e.useAttrs(),x=e.ref("auto"),w=e.ref("auto"),S=e.ref(null),k=e.ref(),E=e.ref(null),P=e.ref(null),B=e.computed({get:()=>s.reference??S.value,set:e=>{S.value=e}}),O=e.ref(!1);e.onMounted((()=>{r.useMutationObserver(k.value,(()=>{var e;O.value="true"===(null==(e=window.getComputedStyle(k.value).getPropertyValue("--dropdown-custom-position"))?void 0:e.trim())}),{attributeFilter:["style"],window:window})}));const $=e.computed((()=>{const e=[];if(s.autoPlacement?"boolean"==typeof s.autoPlacement?e.push(t.autoPlacement()):e.push(t.autoPlacement(s.autoPlacement)):s.flip&&("boolean"==typeof s.flip?e.push(t.flip({fallbackStrategy:"initialPlacement"})):e.push(t.flip(s.flip))),s.shift&&("boolean"==typeof s.shift?e.push(t.shift()):e.push(t.shift(s.shift))),s.size){const o=({availableWidth:e,availableHeight:t})=>{x.value=`${e}px`,w.value=`${t}px`};"boolean"==typeof s.size?e.push(t.size({apply:o})):e.push(t.size({...s.size,apply:o}))}return s.offset&&(e.push(t.offset(Number(s.offset))),["string","number"].includes(typeof s.offset)?e.push(t.offset(Number(s.offset))):e.push(t.offset(s.offset))),s.arrow&&e.push(t.arrow({element:E})),e})),{x:z,y:V,middlewareData:j,placement:C,strategy:A}=t.useFloating(B,k,{whileElementsMounted:(...e)=>t.autoUpdate(...e,{animationFrame:s.strategy===a.fixed}),placement:e.computed((()=>s.placement)),strategy:e.computed((()=>s.strategy)),middleware:$}),N=e.computed((()=>{var e;if(O.value)return;const t=s.triggerWidth&&B.value?`${null==(e=B.value)?void 0:e.offsetWidth}px`:void 0;return{position:A.value,top:`${V.value??0}px`,left:`${z.value??0}px`,maxWidth:t?void 0:x.value,maxHeight:w.value,width:t}})),D=e.computed((()=>C.value.split("-")[0])),_=e.computed((()=>{var e,t,o,r,l;if(O.value)return;const a={[n.top]:n.bottom,[n.right]:n.left,[n.bottom]:n.top,[n.left]:n.right}[D.value];return{left:void 0!==(null==(e=j.value.arrow)?void 0:e.x)?`${null==(t=j.value.arrow)?void 0:t.x}px`:void 0,top:void 0!==(null==(o=j.value.arrow)?void 0:o.y)?`${null==(r=j.value.arrow)?void 0:r.y}px`:void 0,[a]:-((null==(l=E.value)?void 0:l.offsetWidth)??0)/2+"px"}})),F=r.useVModel(s,"modelValue",m),R=e.ref(!1),T=e.computed({get:()=>F.value??R.value,set:e=>{void 0!==F.value?F.value=e:R.value=e}}),W=()=>{T.value=!0},q=()=>{T.value=!1},K=()=>{T.value=!T.value},M=e=>{B.value=e};i({toggle:K,show:W,hide:q,init:M,customPosition:O}),e.watch(T,(t=>{t&&s.autofocusFirst&&e.nextTick((()=>{const e=Z(k.value);e.length>0&&e[0].focus({preventScroll:!0})}))})),r.onClickOutside(k,(()=>{!s.keepOpen&&T.value&&(T.value=!1)}),{ignore:[B]});const H=e.computed((()=>{var e,t;return(null==(t=null==(e=B.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),L=e.computed((()=>({"aria-controls":g.value,"aria-haspopup":!0,"aria-expanded":T.value}))),{component:U,bus:I}=function({reference:t,id:o,expanded:r,aria:a}){const n=l(),u=e.defineComponent({name:"VvDropdownTriggerProvider",setup(){e.provide(c,{reference:t,id:o,expanded:r,aria:a,bus:n})},render(){var t,o;return e.h(e.Fragment,{},null==(o=(t=this.$slots).default)?void 0:o.call(t))}});return{bus:n,component:u}}({reference:B,id:g,expanded:T,aria:L});I.on("click",K);const{role:G,modifiers:J}=e.toRefs(s),{itemRole:Q}=function({role:t,expanded:o}){const r=e.computed((()=>t.value===f.listbox?p.option:p.presentation));return e.provide(v,{role:r,expanded:o}),{itemRole:r}}({role:G,expanded:T}),X=function(t,o,r){return e.computed((()=>{const l={[t]:!0},a="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(l[`${t}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((o=>{l[`${t}--${o}`]=e.unref(r.value[o])})),l}))}("vv-dropdown",J,e.computed((()=>({arrow:s.arrow})))),{focused:Y}=r.useFocusWithin(k);function Z(e){return e?[...e.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden"))):[]}r.onKeyStroke("Escape",(e=>{T.value&&(e.preventDefault(),q())})),r.onKeyStroke("ArrowDown",(t=>{T.value&&Y.value&&(t.preventDefault(),e.nextTick((()=>{if(Y.value){const e=Z(k.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus({preventScroll:!0}):e[0].focus({preventScroll:!0})}})))})),r.onKeyStroke("ArrowUp",(t=>{T.value&&Y.value&&(t.preventDefault(),e.nextTick((()=>{if(Y.value){const e=Z(k.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus({preventScroll:!0}):e[e.length-1].focus({preventScroll:!0})}})))})),r.onKeyStroke([" ","Enter"],(e=>{const t=e.target;T.value&&Y.value&&t&&(null==t||t.click())}));const ee={"before-enter":()=>{m(T.value?"beforeExpand":"beforeCollapse"),m("before-enter")},"after-leave":()=>{m(T.value?"afterExpand":"afterCollapse"),m("after-leave")},enter:()=>{m("enter")},"after-enter":()=>{m("after-enter")},"enter-cancelled":()=>{m("enter-cancelled")},"before-leave":()=>{m("before-leave")},leave:()=>{m("leave")},"leave-cancelled":()=>{m("leave-cancelled")}};return(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(U),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:M,show:W,hide:q,toggle:K,expanded:e.unref(T),aria:e.unref(L)})))])),_:3}),e.createVNode(e.Transition,e.mergeProps({name:t.transitionName},e.toHandlers(ee),{persisted:""}),{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:k,style:e.normalizeStyle(e.unref(N)),class:e.normalizeClass(e.unref(X))},[s.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:E,style:e.normalizeStyle(e.unref(_)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("v-if",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(T)}))),e.createElementVNode("div",e.mergeProps(e.unref(h),{id:e.unref(g),ref_key:"listEl",ref:P,tabindex:e.unref(T)?void 0:-1,role:e.unref(G),"aria-labelledby":e.unref(H),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(Q)})))],16,y),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(T)})))],6),[[e.vShow,e.unref(T)]])])),_:3},16,["name"])],64))}})}));