@volverjs/ui-vue 0.0.4 → 0.0.5-beta.2

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 (215) hide show
  1. package/README.md +2 -2
  2. package/auto-imports.d.ts +12 -3
  3. package/bin/icons.cjs +1 -73
  4. package/dist/Volver.d.ts +19 -11
  5. package/dist/components/VvAccordion/VvAccordion.es.js +165 -106
  6. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  7. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -1
  8. package/dist/components/VvAccordion/index.d.ts +8 -3
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +264 -164
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -12
  12. package/dist/components/VvAccordionGroup/index.d.ts +8 -0
  13. package/dist/components/VvAction/VvAction.es.js +276 -98
  14. package/dist/components/VvAction/VvAction.umd.js +1 -1
  15. package/dist/components/VvAction/VvAction.vue.d.ts +12 -12
  16. package/dist/components/VvAction/index.d.ts +2 -2
  17. package/dist/components/VvBadge/VvBadge.es.js +213 -44
  18. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  19. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
  20. package/dist/components/VvBadge/index.d.ts +1 -1
  21. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +247 -75
  22. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  23. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -11
  24. package/dist/components/VvBreadcrumb/index.d.ts +1 -1
  25. package/dist/components/VvButton/VvButton.es.js +646 -360
  26. package/dist/components/VvButton/VvButton.umd.js +1 -1
  27. package/dist/components/VvButton/VvButton.vue.d.ts +18 -18
  28. package/dist/components/VvButton/index.d.ts +13 -13
  29. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +261 -79
  30. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  31. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
  32. package/dist/components/VvButtonGroup/index.d.ts +1 -1
  33. package/dist/components/VvCard/VvCard.es.js +57 -38
  34. package/dist/components/VvCard/VvCard.umd.js +1 -1
  35. package/dist/components/VvCheckbox/VvCheckbox.es.js +562 -274
  36. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  37. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +2 -2
  38. package/dist/components/VvCheckbox/index.d.ts +5 -5
  39. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +661 -340
  40. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  41. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +7 -7
  42. package/dist/components/VvCheckboxGroup/index.d.ts +3 -3
  43. package/dist/components/VvCombobox/VvCombobox.es.js +1546 -983
  44. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  45. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +138 -51
  46. package/dist/components/VvCombobox/index.d.ts +41 -10
  47. package/dist/components/VvDialog/VvDialog.es.js +387 -141
  48. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  49. package/dist/components/VvDialog/VvDialog.vue.d.ts +12 -3
  50. package/dist/components/VvDialog/index.d.ts +4 -1
  51. package/dist/components/VvDropdown/VvDropdown.es.js +452 -244
  52. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  53. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +130 -42
  54. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +13 -13
  55. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +2 -2
  56. package/dist/components/VvDropdown/index.d.ts +40 -11
  57. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +373 -160
  58. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  59. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +43 -28
  60. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  61. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +285 -90
  62. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  63. package/dist/components/VvIcon/VvIcon.es.js +113 -65
  64. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  65. package/dist/components/VvIcon/VvIcon.vue.d.ts +7 -7
  66. package/dist/components/VvIcon/index.d.ts +2 -2
  67. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +2 -2
  68. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  69. package/dist/components/VvInputText/VvInputText.es.js +986 -462
  70. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  71. package/dist/components/VvInputText/VvInputText.vue.d.ts +100 -20
  72. package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
  73. package/dist/components/VvInputText/index.d.ts +66 -13
  74. package/dist/components/VvProgress/VvProgress.es.js +216 -45
  75. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  76. package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -2
  77. package/dist/components/VvProgress/index.d.ts +1 -1
  78. package/dist/components/VvRadio/VvRadio.es.js +499 -238
  79. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  80. package/dist/components/VvRadio/VvRadio.vue.d.ts +2 -2
  81. package/dist/components/VvRadio/index.d.ts +5 -5
  82. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +598 -304
  83. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  84. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +7 -7
  85. package/dist/components/VvRadioGroup/index.d.ts +3 -3
  86. package/dist/components/VvSelect/VvSelect.es.js +631 -324
  87. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  88. package/dist/components/VvSelect/VvSelect.vue.d.ts +13 -13
  89. package/dist/components/VvSelect/index.d.ts +3 -3
  90. package/dist/components/VvTextarea/VvTextarea.es.js +676 -355
  91. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  92. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +20 -20
  93. package/dist/components/VvTextarea/index.d.ts +4 -4
  94. package/dist/components/VvTooltip/VvTooltip.es.js +215 -47
  95. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  96. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +7 -7
  97. package/dist/components/VvTooltip/index.d.ts +2 -2
  98. package/dist/components/index.es.js +3522 -2231
  99. package/dist/components/index.umd.js +1 -1
  100. package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
  101. package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -3
  102. package/dist/composables/group/useInjectedGroupState.d.ts +2 -2
  103. package/dist/composables/group/useProvideGroupState.d.ts +1 -1
  104. package/dist/composables/useComponentFocus.d.ts +1 -1
  105. package/dist/composables/useComponentIcon.d.ts +7 -7
  106. package/dist/composables/useDebouncedInput.d.ts +4 -1
  107. package/dist/composables/useDefaults.d.ts +2 -0
  108. package/dist/composables/useModifiers.d.ts +1 -1
  109. package/dist/composables/useOptions.d.ts +2 -2
  110. package/dist/composables/useTextCount.d.ts +3 -3
  111. package/dist/composables/useUniqueId.d.ts +1 -1
  112. package/dist/composables/useVolver.d.ts +1 -1
  113. package/dist/directives/index.d.ts +1 -0
  114. package/dist/directives/index.es.js +264 -55
  115. package/dist/directives/index.umd.js +1 -1
  116. package/dist/directives/v-contextmenu.d.ts +3 -0
  117. package/dist/directives/v-contextmenu.es.js +42 -0
  118. package/dist/directives/v-contextmenu.umd.js +1 -0
  119. package/dist/directives/v-tooltip.es.js +222 -53
  120. package/dist/directives/v-tooltip.umd.js +1 -1
  121. package/dist/icons.d.ts +3 -1
  122. package/dist/icons.es.js +40 -23
  123. package/dist/icons.umd.js +1 -1
  124. package/dist/index.d.ts +0 -1
  125. package/dist/index.es.js +112 -3607
  126. package/dist/index.umd.js +1 -1
  127. package/dist/props/index.d.ts +50 -18
  128. package/dist/resolvers/unplugin.d.ts +7 -1
  129. package/dist/resolvers/unplugin.es.js +77 -37
  130. package/dist/resolvers/unplugin.umd.js +1 -1
  131. package/dist/stories/Combobox/Combobox.settings.d.ts +12 -0
  132. package/dist/stories/Dropdown/Dropdown.settings.d.ts +12 -0
  133. package/dist/stories/InputText/InputText.settings.d.ts +53 -0
  134. package/dist/stories/argTypes.d.ts +13 -1
  135. package/package.json +126 -40
  136. package/src/Volver.ts +49 -22
  137. package/src/assets/icons/detailed.json +1 -1
  138. package/src/assets/icons/normal.json +1 -1
  139. package/src/assets/icons/simple.json +1 -1
  140. package/src/components/VvAccordion/VvAccordion.vue +19 -22
  141. package/src/components/VvAccordion/index.ts +12 -4
  142. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +19 -10
  143. package/src/components/VvAccordionGroup/index.ts +8 -0
  144. package/src/components/VvAction/VvAction.vue +7 -7
  145. package/src/components/VvAction/index.ts +1 -1
  146. package/src/components/VvBadge/VvBadge.vue +2 -2
  147. package/src/components/VvBadge/index.ts +1 -1
  148. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +3 -3
  149. package/src/components/VvButton/VvButton.vue +11 -11
  150. package/src/components/VvButton/index.ts +10 -9
  151. package/src/components/VvButtonGroup/VvButtonGroup.vue +4 -7
  152. package/src/components/VvButtonGroup/index.ts +1 -1
  153. package/src/components/VvCard/VvCard.vue +2 -2
  154. package/src/components/VvCheckbox/VvCheckbox.vue +3 -7
  155. package/src/components/VvCheckbox/index.ts +11 -7
  156. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +7 -10
  157. package/src/components/VvCheckboxGroup/index.ts +1 -1
  158. package/src/components/VvCombobox/VvCombobox.vue +44 -26
  159. package/src/components/VvCombobox/index.ts +1 -1
  160. package/src/components/VvDialog/VvDialog.vue +28 -11
  161. package/src/components/VvDialog/index.ts +5 -2
  162. package/src/components/VvDropdown/VvDropdown.vue +7 -5
  163. package/src/components/VvDropdown/VvDropdownAction.vue +7 -5
  164. package/src/components/VvDropdown/VvDropdownOption.vue +17 -10
  165. package/src/components/VvDropdown/index.ts +3 -3
  166. package/src/components/VvIcon/VvIcon.vue +3 -3
  167. package/src/components/VvIcon/index.ts +3 -3
  168. package/src/components/VvInputText/VvInputClearAction.ts +2 -2
  169. package/src/components/VvInputText/VvInputPasswordAction.ts +3 -4
  170. package/src/components/VvInputText/VvInputStepAction.ts +3 -2
  171. package/src/components/VvInputText/VvInputText.vue +130 -37
  172. package/src/components/VvInputText/VvInputTextActions.ts +5 -8
  173. package/src/components/VvInputText/index.ts +62 -1
  174. package/src/components/VvProgress/VvProgress.vue +2 -2
  175. package/src/components/VvProgress/index.ts +1 -1
  176. package/src/components/VvRadio/VvRadio.vue +3 -7
  177. package/src/components/VvRadio/index.ts +11 -7
  178. package/src/components/VvRadioGroup/VvRadioGroup.vue +7 -10
  179. package/src/components/VvRadioGroup/index.ts +1 -1
  180. package/src/components/VvSelect/VvSelect.vue +4 -4
  181. package/src/components/VvSelect/index.ts +1 -1
  182. package/src/components/VvTextarea/VvTextarea.vue +6 -6
  183. package/src/components/VvTextarea/index.ts +1 -1
  184. package/src/components/VvTooltip/VvTooltip.vue +2 -2
  185. package/src/components/VvTooltip/index.ts +3 -3
  186. package/src/composables/dropdown/useInjectDropdown.ts +2 -2
  187. package/src/composables/dropdown/useProvideDropdown.ts +2 -2
  188. package/src/composables/group/useInjectedGroupState.ts +1 -1
  189. package/src/composables/group/useProvideGroupState.ts +1 -1
  190. package/src/composables/useComponentIcon.ts +1 -1
  191. package/src/composables/useDebouncedInput.ts +10 -3
  192. package/src/composables/useDefaults.ts +89 -0
  193. package/src/composables/useModifiers.ts +4 -2
  194. package/src/composables/useOptions.ts +1 -1
  195. package/src/composables/useVolver.ts +2 -2
  196. package/src/directives/index.ts +3 -1
  197. package/src/directives/v-contextmenu.ts +40 -0
  198. package/src/directives/v-tooltip.ts +2 -2
  199. package/src/icons.ts +1 -1
  200. package/src/index.ts +0 -2
  201. package/src/props/index.ts +20 -10
  202. package/src/resolvers/unplugin.ts +15 -1
  203. package/src/stories/Accordion/Accordion.stories.mdx +8 -2
  204. package/src/stories/Accordion/Accordion.test.ts +21 -15
  205. package/src/stories/Accordion/AccordionSlots.stories.mdx +8 -8
  206. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +17 -1
  207. package/src/stories/AccordionGroup/AccordionGroup.test.ts +18 -12
  208. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +1 -1
  209. package/src/stories/Dropdown/DropdownContextmenuDirective.stories.mdx +41 -0
  210. package/src/stories/InputText/InputText.settings.ts +53 -0
  211. package/src/stories/InputText/InputText.stories.mdx +40 -0
  212. package/src/stories/InputText/InputText.test.ts +5 -2
  213. package/src/stories/Tooltip/TooltipDirective.stories.mdx +1 -1
  214. package/src/stories/argTypes.ts +12 -2
  215. package/src/types/group.d.ts +5 -0
@@ -1,8 +1,60 @@
1
- import { inject as p, defineComponent as g, ref as I, watch as N, computed as f, openBlock as O, createBlock as D, resolveDynamicComponent as W, unref as i, mergeProps as h, withCtx as b, renderSlot as k, createTextVNode as A, toDisplayString as J, provide as K, createElementBlock as T, toRefs as Y, createVNode as F } from "vue";
1
+ import { inject, defineComponent, ref, watch, computed, openBlock, createBlock, resolveDynamicComponent, unref, mergeProps, withCtx, renderSlot, createTextVNode, toDisplayString, provide, createElementBlock, toRefs, createVNode } from "vue";
2
2
  import "mitt";
3
- import { useElementHover as G, useFocus as z, useFocusWithin as H } from "@vueuse/core";
4
- var m = /* @__PURE__ */ ((e) => (e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(m || {}), E = /* @__PURE__ */ ((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))(E || {}), _ = /* @__PURE__ */ ((e) => (e.before = "before", e.after = "after", e))(_ || {}), y = /* @__PURE__ */ ((e) => (e.button = "button", e.submit = "submit", e.reset = "reset", e))(y || {}), l = /* @__PURE__ */ ((e) => (e.nuxtLink = "nuxt-link", e.routerLink = "router-link", e.a = "a", e.button = "button", e))(l || {}), C = /* @__PURE__ */ ((e) => (e.button = "button", e.link = "link", e.menuitem = "menuitem", e))(C || {}), P = /* @__PURE__ */ ((e) => (e._blank = "_blank", e._self = "_self", e._parent = "_parent", e._top = "_top", e))(P || {});
5
- const q = Symbol.for("volver"), Q = Symbol.for("dropdownTrigger"), U = Symbol.for("dropdownItem"), $ = Symbol.for("dropdownAction"), X = {
3
+ import { useElementHover, useFocus, useFocusWithin } from "@vueuse/core";
4
+ var Side = /* @__PURE__ */ ((Side2) => {
5
+ Side2["left"] = "left";
6
+ Side2["right"] = "right";
7
+ Side2["top"] = "top";
8
+ Side2["bottom"] = "bottom";
9
+ return Side2;
10
+ })(Side || {});
11
+ var Placement = /* @__PURE__ */ ((Placement2) => {
12
+ Placement2["topStart"] = "top-start";
13
+ Placement2["topEnd"] = "top-end";
14
+ Placement2["bottomStart"] = "bottom-start";
15
+ Placement2["bottomEnd"] = "bottom-end";
16
+ Placement2["leftStart"] = "left-start";
17
+ Placement2["leftEnd"] = "left-end";
18
+ Placement2["rightStart"] = "right-start";
19
+ Placement2["rightEnd"] = "right-end";
20
+ return Placement2;
21
+ })(Placement || {});
22
+ var Position = /* @__PURE__ */ ((Position2) => {
23
+ Position2["before"] = "before";
24
+ Position2["after"] = "after";
25
+ return Position2;
26
+ })(Position || {});
27
+ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
28
+ ButtonType2["button"] = "button";
29
+ ButtonType2["submit"] = "submit";
30
+ ButtonType2["reset"] = "reset";
31
+ return ButtonType2;
32
+ })(ButtonType || {});
33
+ var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
34
+ ActionTag2["nuxtLink"] = "nuxt-link";
35
+ ActionTag2["routerLink"] = "router-link";
36
+ ActionTag2["a"] = "a";
37
+ ActionTag2["button"] = "button";
38
+ return ActionTag2;
39
+ })(ActionTag || {});
40
+ var ActionRoles = /* @__PURE__ */ ((ActionRoles2) => {
41
+ ActionRoles2["button"] = "button";
42
+ ActionRoles2["link"] = "link";
43
+ ActionRoles2["menuitem"] = "menuitem";
44
+ return ActionRoles2;
45
+ })(ActionRoles || {});
46
+ var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
47
+ AnchorTarget2["_blank"] = "_blank";
48
+ AnchorTarget2["_self"] = "_self";
49
+ AnchorTarget2["_parent"] = "_parent";
50
+ AnchorTarget2["_top"] = "_top";
51
+ return AnchorTarget2;
52
+ })(AnchorTarget || {});
53
+ const INJECTION_KEY_VOLVER = Symbol.for("volver");
54
+ const INJECTION_KEY_DROPDOWN_TRIGGER = Symbol.for("dropdownTrigger");
55
+ const INJECTION_KEY_DROPDOWN_ITEM = Symbol.for("dropdownItem");
56
+ const INJECTION_KEY_DROPDOWN_ACTION = Symbol.for("dropdownAction");
57
+ const LinkProps = {
6
58
  /**
7
59
  * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
8
60
  * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
@@ -19,7 +71,7 @@ const q = Symbol.for("volver"), Q = Symbol.for("dropdownTrigger"), U = Symbol.fo
19
71
  */
20
72
  target: {
21
73
  type: String,
22
- validator: (e) => Object.values(P).includes(e)
74
+ validator: (value) => Object.values(AnchorTarget).includes(value)
23
75
  },
24
76
  /**
25
77
  * Anchor rel
@@ -28,224 +80,385 @@ const q = Symbol.for("volver"), Q = Symbol.for("dropdownTrigger"), U = Symbol.fo
28
80
  type: String,
29
81
  default: "noopener noreferrer"
30
82
  }
31
- }, Z = {
83
+ };
84
+ const DisabledProps = {
32
85
  /**
33
86
  * Whether the form control is disabled
34
87
  */
35
88
  disabled: Boolean
36
- }, x = {
89
+ };
90
+ const ActiveProps = {
37
91
  /**
38
92
  * Whether the item is active
39
93
  */
40
94
  active: Boolean
41
- }, ee = {
95
+ };
96
+ const PressedProps = {
42
97
  /**
43
98
  * Whether the item is pressed
44
99
  */
45
100
  pressed: Boolean
46
- }, te = {
101
+ };
102
+ const LabelProps = {
47
103
  /**
48
104
  * The item label
49
105
  */
50
106
  label: [String, Number]
51
- }, re = {
107
+ };
108
+ const ModifiersProps = {
52
109
  /**
53
110
  * Component BEM modifiers
54
111
  */
55
112
  modifiers: [String, Array]
56
113
  };
57
- _.before;
58
- m.bottom;
59
- const w = {
60
- ...Z,
61
- ...te,
62
- ...ee,
63
- ...x,
64
- ...X,
114
+ ({
115
+ /**
116
+ * VvIcon name or props
117
+ * @see VVIcon
118
+ */
119
+ icon: { type: [String, Object] },
120
+ /**
121
+ * VvIcon position
122
+ */
123
+ iconPosition: {
124
+ type: String,
125
+ default: Position.before,
126
+ validation: (value) => Object.values(Position).includes(value)
127
+ }
128
+ });
129
+ ({
130
+ /**
131
+ * Dropdown placement
132
+ */
133
+ placement: {
134
+ type: String,
135
+ default: Side.bottom,
136
+ validator: (value) => {
137
+ return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
138
+ }
139
+ },
140
+ /**
141
+ * Dropdown strategy
142
+ */
143
+ strategy: {
144
+ type: String,
145
+ default: "absolute",
146
+ validator: (value) => {
147
+ return ["fixed", "absolute"].includes(value);
148
+ }
149
+ },
150
+ /**
151
+ * Dropdown show / hide transition name
152
+ */
153
+ transitionName: {
154
+ type: String
155
+ },
156
+ /**
157
+ * Offset of the dropdown from the trigger
158
+ * @see https://floating-ui.com/docs/offset
159
+ */
160
+ offset: {
161
+ type: [Number, String, Object],
162
+ default: 0
163
+ },
164
+ /**
165
+ * Move dropdown to the side if there is no space in the default position
166
+ * @see https://floating-ui.com/docs/shift
167
+ */
168
+ shift: {
169
+ type: [Boolean, Object],
170
+ default: false
171
+ },
172
+ /**
173
+ * Flip dropdown position if there is no space in the default position
174
+ * @see https://floating-ui.com/docs/flip
175
+ */
176
+ flip: {
177
+ type: [Boolean, Object],
178
+ default: true
179
+ },
180
+ /**
181
+ * Size of the dropdown
182
+ * @see https://floating-ui.com/docs/size
183
+ */
184
+ size: {
185
+ type: [Boolean, Object],
186
+ default: () => ({ padding: 10 })
187
+ },
188
+ /**
189
+ * Automatically change the position of the dropdown
190
+ * @see https://floating-ui.com/docs/autoPlacement
191
+ */
192
+ autoPlacement: {
193
+ type: [Boolean, Object],
194
+ default: false
195
+ },
196
+ /**
197
+ * Add arrow to the dropdown
198
+ * @see https://floating-ui.com/docs/arrow
199
+ */
200
+ arrow: {
201
+ type: Boolean,
202
+ default: false
203
+ },
204
+ /**
205
+ * Close dropdown on click outside
206
+ */
207
+ autoClose: {
208
+ type: Boolean,
209
+ default: true
210
+ },
211
+ /**
212
+ * Autofocus first item on dropdown open
213
+ */
214
+ autofocusFirst: {
215
+ type: Boolean,
216
+ default: true
217
+ },
218
+ /**
219
+ * Set dropdown width to the same as the trigger
220
+ */
221
+ triggerWidth: {
222
+ type: Boolean
223
+ }
224
+ });
225
+ const ActionProps = {
226
+ ...DisabledProps,
227
+ ...LabelProps,
228
+ ...PressedProps,
229
+ ...ActiveProps,
230
+ ...LinkProps,
65
231
  /**
66
232
  * Button type
67
233
  */
68
234
  type: {
69
235
  type: String,
70
- default: y.button,
71
- validator: (e) => Object.values(y).includes(e)
236
+ default: ButtonType.button,
237
+ validator: (value) => Object.values(ButtonType).includes(value)
72
238
  }
73
- }, oe = ["click", "mouseover", "mouseleave"], ne = w;
74
- function se() {
75
- return p(q);
239
+ };
240
+ const VvActionEvents = ["click", "mouseover", "mouseleave"];
241
+ const VvActionProps = ActionProps;
242
+ function useVolver() {
243
+ return inject(INJECTION_KEY_VOLVER);
76
244
  }
77
- function ae() {
78
- return p(Q, {});
245
+ function useInjectedDropdownTrigger() {
246
+ return inject(INJECTION_KEY_DROPDOWN_TRIGGER, {});
79
247
  }
80
- function ue() {
81
- return p(U, {});
248
+ function useInjectedDropdownItem() {
249
+ return inject(INJECTION_KEY_DROPDOWN_ITEM, {});
82
250
  }
83
- function le() {
84
- return p($, {});
251
+ function useInjectedDropdownAction() {
252
+ return inject(INJECTION_KEY_DROPDOWN_ACTION, {});
85
253
  }
86
- const ie = {
254
+ const __default__$2 = {
87
255
  name: "VvAction"
88
- }, ce = /* @__PURE__ */ g({
89
- ...ie,
90
- props: ne,
91
- emits: oe,
92
- setup(e, { expose: n, emit: u }) {
93
- const t = e, o = se(), a = I(null);
94
- n({ $el: a });
256
+ };
257
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
258
+ ...__default__$2,
259
+ props: VvActionProps,
260
+ emits: VvActionEvents,
261
+ setup(__props, { expose, emit }) {
262
+ const props = __props;
263
+ const volver = useVolver();
264
+ const element = ref(null);
265
+ expose({ $el: element });
95
266
  const {
96
- reference: c,
97
- bus: s,
98
- aria: d,
99
- expanded: v
100
- } = ae();
101
- N(
102
- () => a.value,
103
- (r) => {
104
- c && (c.value = r);
267
+ reference: dropdownTriggerReference,
268
+ bus: dropdownEventBus,
269
+ aria: dropdownAria,
270
+ expanded: dropdownExpanded
271
+ } = useInjectedDropdownTrigger();
272
+ watch(
273
+ () => element.value,
274
+ (newValue) => {
275
+ if (dropdownTriggerReference) {
276
+ dropdownTriggerReference.value = newValue;
277
+ }
105
278
  }
106
279
  );
107
- const S = f(() => t.pressed || (v == null ? void 0 : v.value)), { role: V } = le(), j = f(() => {
108
- switch (!0) {
109
- case t.disabled:
110
- return l.button;
111
- case t.to !== void 0:
112
- return o != null && o.nuxt ? l.nuxtLink : l.routerLink;
113
- case t.href !== void 0:
114
- return l.a;
280
+ const pressed = computed(() => {
281
+ return props.pressed || (dropdownExpanded == null ? void 0 : dropdownExpanded.value);
282
+ });
283
+ const { role } = useInjectedDropdownAction();
284
+ const hasTag = computed(() => {
285
+ switch (true) {
286
+ case props.disabled:
287
+ return ActionTag.button;
288
+ case props.to !== void 0:
289
+ return (volver == null ? void 0 : volver.nuxt) ? ActionTag.nuxtLink : ActionTag.routerLink;
290
+ case props.href !== void 0:
291
+ return ActionTag.a;
115
292
  default:
116
- return l.button;
293
+ return ActionTag.button;
117
294
  }
118
- }), L = f(() => {
119
- const r = {
120
- ...d == null ? void 0 : d.value,
121
- "aria-pressed": S.value ? !0 : void 0,
122
- role: V
295
+ });
296
+ const hasProps = computed(() => {
297
+ const toReturn = {
298
+ ...dropdownAria == null ? void 0 : dropdownAria.value,
299
+ "aria-pressed": pressed.value ? true : void 0,
300
+ role
123
301
  };
124
- switch (j.value) {
125
- case l.a:
302
+ switch (hasTag.value) {
303
+ case ActionTag.a:
126
304
  return {
127
- ...r,
128
- href: t.href,
129
- target: t.target,
130
- rel: t.rel
305
+ ...toReturn,
306
+ href: props.href,
307
+ target: props.target,
308
+ rel: props.rel
131
309
  };
132
- case l.routerLink:
133
- case l.nuxtLink:
310
+ case ActionTag.routerLink:
311
+ case ActionTag.nuxtLink:
134
312
  return {
135
- ...r,
136
- to: t.to,
137
- target: t.target
313
+ ...toReturn,
314
+ to: props.to,
315
+ target: props.target
138
316
  };
139
317
  default:
140
318
  return {
141
- ...r,
142
- type: t.type,
143
- disabled: t.disabled
319
+ ...toReturn,
320
+ type: props.type,
321
+ disabled: props.disabled
144
322
  };
145
323
  }
146
- }), B = (r) => {
147
- if (t.disabled) {
148
- r.preventDefault();
324
+ });
325
+ const onClick = (e) => {
326
+ if (props.disabled) {
327
+ e.preventDefault();
149
328
  return;
150
329
  }
151
- s == null || s.emit("click", r), u("click", r);
152
- }, R = (r) => {
153
- s == null || s.emit("mouseover", r), u("mouseover", r);
154
- }, M = (r) => {
155
- s == null || s.emit("mouseleave", r), u("mouseleave", r);
330
+ dropdownEventBus == null ? void 0 : dropdownEventBus.emit("click", e);
331
+ emit("click", e);
332
+ };
333
+ const onMouseover = (e) => {
334
+ dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseover", e);
335
+ emit("mouseover", e);
336
+ };
337
+ const onMouseleave = (e) => {
338
+ dropdownEventBus == null ? void 0 : dropdownEventBus.emit("mouseleave", e);
339
+ emit("mouseleave", e);
340
+ };
341
+ return (_ctx, _cache) => {
342
+ return openBlock(), createBlock(resolveDynamicComponent(unref(hasTag)), mergeProps(unref(hasProps), {
343
+ ref_key: "element",
344
+ ref: element,
345
+ class: {
346
+ active: _ctx.active,
347
+ pressed: unref(pressed),
348
+ disabled: _ctx.disabled
349
+ },
350
+ onClickPassive: onClick,
351
+ onMouseoverPassive: onMouseover,
352
+ onMouseleavePassive: onMouseleave
353
+ }), {
354
+ default: withCtx(() => [
355
+ renderSlot(_ctx.$slots, "default", {}, () => [
356
+ createTextVNode(toDisplayString(_ctx.label), 1)
357
+ ])
358
+ ]),
359
+ _: 3
360
+ }, 16, ["class"]);
156
361
  };
157
- return (r, me) => (O(), D(W(i(j)), h(i(L), {
158
- ref_key: "element",
159
- ref: a,
160
- class: {
161
- active: r.active,
162
- pressed: i(S),
163
- disabled: r.disabled
164
- },
165
- onClickPassive: B,
166
- onMouseoverPassive: R,
167
- onMouseleavePassive: M
168
- }), {
169
- default: b(() => [
170
- k(r.$slots, "default", {}, () => [
171
- A(J(r.label), 1)
172
- ])
173
- ]),
174
- _: 3
175
- }, 16, ["class"]));
176
362
  }
177
363
  });
178
- function de({
179
- expanded: e
364
+ function useProvideDropdownAction({
365
+ expanded
180
366
  }) {
181
- K($, {
182
- role: C.menuitem,
183
- expanded: e
367
+ provide(INJECTION_KEY_DROPDOWN_ACTION, {
368
+ role: ActionRoles.menuitem,
369
+ expanded
184
370
  });
185
371
  }
186
- const fe = {
372
+ const __default__$1 = {
187
373
  name: "VvDropdownItem"
188
- }, pe = /* @__PURE__ */ g({
189
- ...fe,
190
- setup(e) {
191
- const { role: n, expanded: u } = ue(), t = I(null);
192
- de({ expanded: u });
193
- const o = G(t), { focused: a } = z(t), { focused: c } = H(t);
194
- return N(o, (s) => {
195
- s && (a.value = !0);
196
- }), (s, d) => (O(), T("li", h({ role: i(n) }, {
197
- ref_key: "element",
198
- ref: t,
199
- class: ["vv-dropdown__item", { "focus-visible": i(a) || i(c) }]
200
- }), [
201
- k(s.$slots, "default")
202
- ], 16));
374
+ };
375
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
376
+ ...__default__$1,
377
+ setup(__props) {
378
+ const { role, expanded } = useInjectedDropdownItem();
379
+ const element = ref(null);
380
+ useProvideDropdownAction({ expanded });
381
+ const hovered = useElementHover(element);
382
+ const { focused } = useFocus(element);
383
+ const { focused: focusedWithin } = useFocusWithin(element);
384
+ watch(hovered, (newValue) => {
385
+ if (newValue) {
386
+ focused.value = true;
387
+ }
388
+ });
389
+ return (_ctx, _cache) => {
390
+ return openBlock(), createElementBlock("li", mergeProps({ role: unref(role) }, {
391
+ ref_key: "element",
392
+ ref: element,
393
+ class: ["vv-dropdown__item", { "focus-visible": unref(focused) || unref(focusedWithin) }]
394
+ }), [
395
+ renderSlot(_ctx.$slots, "default")
396
+ ], 16);
397
+ };
203
398
  }
204
399
  });
205
- function ve(e, n, u) {
206
- return f(() => {
207
- const t = {
208
- [e]: !0
209
- }, o = typeof (n == null ? void 0 : n.value) == "string" ? n.value.split(" ") : n == null ? void 0 : n.value;
210
- return o && Array.isArray(o) && o.forEach((a) => {
211
- t[`${e}--${a}`] = !0;
212
- }), u && Object.keys(u.value).forEach((a) => {
213
- t[`${e}--${a}`] = i(u.value[a]);
214
- }), t;
400
+ function useModifiers(prefix, modifiers, others) {
401
+ return computed(() => {
402
+ const toReturn = {
403
+ [prefix]: true
404
+ };
405
+ const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
406
+ if (modifiersArray) {
407
+ if (Array.isArray(modifiersArray)) {
408
+ modifiersArray.forEach((modifier) => {
409
+ if (modifier) {
410
+ toReturn[`${prefix}--${modifier}`] = true;
411
+ }
412
+ });
413
+ }
414
+ }
415
+ if (others) {
416
+ Object.keys(others.value).forEach((key) => {
417
+ toReturn[`${prefix}--${key}`] = unref(others.value[key]);
418
+ });
419
+ }
420
+ return toReturn;
215
421
  });
216
422
  }
217
- const be = {
423
+ const __default__ = {
218
424
  name: "VvDropdownAction"
219
- }, Oe = /* @__PURE__ */ g({
220
- ...be,
425
+ };
426
+ const _sfc_main = /* @__PURE__ */ defineComponent({
427
+ ...__default__,
221
428
  props: {
222
- ...w,
223
- ...re
429
+ ...ActionProps,
430
+ ...ModifiersProps
224
431
  },
225
- setup(e) {
226
- const n = e, { modifiers: u } = Y(n), t = ve("vv-dropdown-action", u);
227
- return (o, a) => (O(), D(pe, null, {
228
- default: b(() => [
229
- F(ce, h({
230
- disabled: o.disabled,
231
- pressed: o.pressed,
232
- active: o.active,
233
- type: o.type,
234
- to: o.to,
235
- href: o.href,
236
- target: o.target,
237
- rel: o.rel
238
- }, { class: i(t) }), {
239
- default: b(() => [
240
- k(o.$slots, "default")
241
- ]),
242
- _: 3
243
- }, 16, ["class"])
244
- ]),
245
- _: 3
246
- }));
432
+ setup(__props) {
433
+ const props = __props;
434
+ const { modifiers } = toRefs(props);
435
+ const bemCssClasses = useModifiers("vv-dropdown-action", modifiers);
436
+ return (_ctx, _cache) => {
437
+ return openBlock(), createBlock(_sfc_main$1, null, {
438
+ default: withCtx(() => [
439
+ createVNode(_sfc_main$2, mergeProps({
440
+ disabled: _ctx.disabled,
441
+ pressed: _ctx.pressed,
442
+ active: _ctx.active,
443
+ type: _ctx.type,
444
+ to: _ctx.to,
445
+ href: _ctx.href,
446
+ target: _ctx.target,
447
+ rel: _ctx.rel
448
+ }, { class: unref(bemCssClasses) }), {
449
+ default: withCtx(() => [
450
+ renderSlot(_ctx.$slots, "default", {}, () => [
451
+ createTextVNode(toDisplayString(_ctx.label), 1)
452
+ ])
453
+ ]),
454
+ _: 3
455
+ }, 16, ["class"])
456
+ ]),
457
+ _: 3
458
+ });
459
+ };
247
460
  }
248
461
  });
249
462
  export {
250
- Oe as default
463
+ _sfc_main as default
251
464
  };
@@ -1 +1 @@
1
- (function(t,c){typeof exports=="object"&&typeof module<"u"?module.exports=c(require("vue"),require("mitt"),require("@vueuse/core")):typeof define=="function"&&define.amd?define(["vue","mitt","@vueuse/core"],c):(t=typeof globalThis<"u"?globalThis:t||self,t.VvDropdownAction=c(t.vue,null,t.core))})(this,function(t,c,p){"use strict";var b=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(b||{}),g=(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))(g||{}),m=(e=>(e.before="before",e.after="after",e))(m||{}),_=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(_||{}),u=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(u||{}),h=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(h||{}),k=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(k||{});const C=Symbol.for("volver"),D=Symbol.for("dropdownTrigger"),I=Symbol.for("dropdownItem"),v=Symbol.for("dropdownAction"),N={to:{type:[String,Object]},href:String,target:{type:String,validator:e=>Object.values(k).includes(e)},rel:{type:String,default:"noopener noreferrer"}},w={disabled:Boolean},E={active:Boolean},P={pressed:Boolean},$={label:[String,Number]},B={modifiers:[String,Array]};m.before,b.bottom;const O={...w,...$,...P,...E,...N,type:{type:String,default:_.button,validator:e=>Object.values(_).includes(e)}},V=["click","mouseover","mouseleave"],L=O;function R(){return t.inject(C)}function M(){return t.inject(D,{})}function A(){return t.inject(I,{})}function T(){return t.inject(v,{})}const W={name:"VvAction"},J=t.defineComponent({...W,props:L,emits:V,setup(e,{expose:s,emit:i}){const r=e,n=R(),l=t.ref(null);s({$el:l});const{reference:d,bus:a,aria:f,expanded:y}=M();t.watch(()=>l.value,o=>{d&&(d.value=o)});const j=t.computed(()=>r.pressed||(y==null?void 0:y.value)),{role:z}=T(),S=t.computed(()=>{switch(!0){case r.disabled:return u.button;case r.to!==void 0:return n!=null&&n.nuxt?u.nuxtLink:u.routerLink;case r.href!==void 0:return u.a;default:return u.button}}),H=t.computed(()=>{const o={...f==null?void 0:f.value,"aria-pressed":j.value?!0:void 0,role:z};switch(S.value){case u.a:return{...o,href:r.href,target:r.target,rel:r.rel};case u.routerLink:case u.nuxtLink:return{...o,to:r.to,target:r.target};default:return{...o,type:r.type,disabled:r.disabled}}}),Q=o=>{if(r.disabled){o.preventDefault();return}a==null||a.emit("click",o),i("click",o)},U=o=>{a==null||a.emit("mouseover",o),i("mouseover",o)},X=o=>{a==null||a.emit("mouseleave",o),i("mouseleave",o)};return(o,x)=>(t.openBlock(),t.createBlock(t.resolveDynamicComponent(t.unref(S)),t.mergeProps(t.unref(H),{ref_key:"element",ref:l,class:{active:o.active,pressed:t.unref(j),disabled:o.disabled},onClickPassive:Q,onMouseoverPassive:U,onMouseleavePassive:X}),{default:t.withCtx(()=>[t.renderSlot(o.$slots,"default",{},()=>[t.createTextVNode(t.toDisplayString(o.label),1)])]),_:3},16,["class"]))}});function K({expanded:e}){t.provide(v,{role:h.menuitem,expanded:e})}const Y={name:"VvDropdownItem"},q=t.defineComponent({...Y,setup(e){const{role:s,expanded:i}=A(),r=t.ref(null);K({expanded:i});const n=p.useElementHover(r),{focused:l}=p.useFocus(r),{focused:d}=p.useFocusWithin(r);return t.watch(n,a=>{a&&(l.value=!0)}),(a,f)=>(t.openBlock(),t.createElementBlock("li",t.mergeProps({role:t.unref(s)},{ref_key:"element",ref:r,class:["vv-dropdown__item",{"focus-visible":t.unref(l)||t.unref(d)}]}),[t.renderSlot(a.$slots,"default")],16))}});function F(e,s,i){return t.computed(()=>{const r={[e]:!0},n=typeof(s==null?void 0:s.value)=="string"?s.value.split(" "):s==null?void 0:s.value;return n&&Array.isArray(n)&&n.forEach(l=>{r[`${e}--${l}`]=!0}),i&&Object.keys(i.value).forEach(l=>{r[`${e}--${l}`]=t.unref(i.value[l])}),r})}const G={name:"VvDropdownAction"};return t.defineComponent({...G,props:{...O,...B},setup(e){const s=e,{modifiers:i}=t.toRefs(s),r=F("vv-dropdown-action",i);return(n,l)=>(t.openBlock(),t.createBlock(q,null,{default:t.withCtx(()=>[t.createVNode(J,t.mergeProps({disabled:n.disabled,pressed:n.pressed,active:n.active,type:n.type,to:n.to,href:n.href,target:n.target,rel:n.rel},{class:t.unref(r)}),{default:t.withCtx(()=>[t.renderSlot(n.$slots,"default")]),_:3},16,["class"])]),_:3}))}})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("mitt"),require("@vueuse/core")):"function"==typeof define&&define.amd?define(["vue","mitt","@vueuse/core"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdownAction=t(e.vue,null,e.core)}(this,(function(e,t,o){"use strict";var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),n=(e=>(e.before="before",e.after="after",e))(n||{}),l=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(l||{}),u=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(u||{}),a=(e=>(e.button="button",e.link="link",e.menuitem="menuitem",e))(a||{}),s=(e=>(e._blank="_blank",e._self="_self",e._parent="_parent",e._top="_top",e))(s||{});const i=Symbol.for("volver"),d=Symbol.for("dropdownTrigger"),c=Symbol.for("dropdownItem"),f=Symbol.for("dropdownAction"),p={to:{type:[String,Object]},href:String,target:{type:String,validator:e=>Object.values(s).includes(e)},rel:{type:String,default:"noopener noreferrer"}},v={disabled:Boolean},m={active:Boolean},b={pressed:Boolean},y={label:[String,Number]},g={modifiers:[String,Array]};n.before,r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean;const k={...v,...y,...b,...m,...p,type:{type:String,default:l.button,validator:e=>Object.values(l).includes(e)}},h=k;const x=e.defineComponent({name:"VvAction",props:h,emits:["click","mouseover","mouseleave"],setup(t,{expose:o,emit:r}){const n=t,l=e.inject(i),a=e.ref(null);o({$el:a});const{reference:s,bus:c,aria:p,expanded:v}=e.inject(d,{});e.watch((()=>a.value),(e=>{s&&(s.value=e)}));const m=e.computed((()=>n.pressed||(null==v?void 0:v.value))),{role:b}=e.inject(f,{}),y=e.computed((()=>{switch(!0){case n.disabled:return u.button;case void 0!==n.to:return(null==l?void 0:l.nuxt)?u.nuxtLink:u.routerLink;case void 0!==n.href:return u.a;default:return u.button}})),g=e.computed((()=>{const e={...null==p?void 0:p.value,"aria-pressed":!!m.value||void 0,role:b};switch(y.value){case u.a:return{...e,href:n.href,target:n.target,rel:n.rel};case u.routerLink:case u.nuxtLink:return{...e,to:n.to,target:n.target};default:return{...e,type:n.type,disabled:n.disabled}}})),k=e=>{n.disabled?e.preventDefault():(null==c||c.emit("click",e),r("click",e))},h=e=>{null==c||c.emit("mouseover",e),r("mouseover",e)},x=e=>{null==c||c.emit("mouseleave",e),r("mouseleave",e)};return(t,o)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(y)),e.mergeProps(e.unref(g),{ref_key:"element",ref:a,class:{active:t.active,pressed:e.unref(m),disabled:t.disabled},onClickPassive:k,onMouseoverPassive:h,onMouseleavePassive:x}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"]))}});const B=e.defineComponent({name:"VvDropdownItem",setup(t){const{role:r,expanded:n}=e.inject(c,{}),l=e.ref(null);!function({expanded:t}){e.provide(f,{role:a.menuitem,expanded:t})}({expanded:n});const u=o.useElementHover(l),{focused:s}=o.useFocus(l),{focused:i}=o.useFocusWithin(l);return e.watch(u,(e=>{e&&(s.value=!0)})),(t,o)=>(e.openBlock(),e.createElementBlock("li",e.mergeProps({role:e.unref(r)},{ref_key:"element",ref:l,class:["vv-dropdown__item",{"focus-visible":e.unref(s)||e.unref(i)}]}),[e.renderSlot(t.$slots,"default")],16))}});return e.defineComponent({name:"VvDropdownAction",props:{...k,...g},setup(t){const o=t,{modifiers:r}=e.toRefs(o),n=function(t,o,r){return e.computed((()=>{const n={[t]:!0},l="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(n[`${t}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((o=>{n[`${t}--${o}`]=e.unref(r.value[o])})),n}))}("vv-dropdown-action",r);return(t,o)=>(e.openBlock(),e.createBlock(B,null,{default:e.withCtx((()=>[e.createVNode(x,e.mergeProps({disabled:t.disabled,pressed:t.pressed,active:t.active,type:t.type,to:t.to,href:t.href,target:t.target,rel:t.rel},{class:e.unref(n)}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]))])),_:3},16,["class"])])),_:3}))}})}));