@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,18 +1,64 @@
1
- import { computed as S, unref as _, defineComponent as j, toRefs as O, openBlock as u, createElementBlock as i, normalizeClass as g, createElementVNode as y, Fragment as k, renderList as E, createBlock as N, resolveDynamicComponent as $, mergeProps as C, withCtx as L, renderSlot as P, normalizeProps as V, guardReactiveProps as z, createTextVNode as A, toDisplayString as D } from "vue";
2
- function R(t, r, s) {
3
- return S(() => {
4
- const n = {
5
- [t]: !0
6
- }, e = typeof (r == null ? void 0 : r.value) == "string" ? r.value.split(" ") : r == null ? void 0 : r.value;
7
- return e && Array.isArray(e) && e.forEach((l) => {
8
- n[`${t}--${l}`] = !0;
9
- }), s && Object.keys(s.value).forEach((l) => {
10
- n[`${t}--${l}`] = _(s.value[l]);
11
- }), n;
1
+ import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, normalizeClass, createElementVNode, Fragment, renderList, createBlock, resolveDynamicComponent, mergeProps, withCtx, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString } from "vue";
2
+ function useModifiers(prefix, modifiers, others) {
3
+ return computed(() => {
4
+ const toReturn = {
5
+ [prefix]: true
6
+ };
7
+ const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
8
+ if (modifiersArray) {
9
+ if (Array.isArray(modifiersArray)) {
10
+ modifiersArray.forEach((modifier) => {
11
+ if (modifier) {
12
+ toReturn[`${prefix}--${modifier}`] = true;
13
+ }
14
+ });
15
+ }
16
+ }
17
+ if (others) {
18
+ Object.keys(others.value).forEach((key) => {
19
+ toReturn[`${prefix}--${key}`] = unref(others.value[key]);
20
+ });
21
+ }
22
+ return toReturn;
12
23
  });
13
24
  }
14
- var p = /* @__PURE__ */ ((t) => (t.left = "left", t.right = "right", t.top = "top", t.bottom = "bottom", t))(p || {}), h = /* @__PURE__ */ ((t) => (t.topStart = "top-start", t.topEnd = "top-end", t.bottomStart = "bottom-start", t.bottomEnd = "bottom-end", t.leftStart = "left-start", t.leftEnd = "left-end", t.rightStart = "right-start", t.rightEnd = "right-end", t))(h || {}), c = /* @__PURE__ */ ((t) => (t.before = "before", t.after = "after", t))(c || {}), b = /* @__PURE__ */ ((t) => (t.button = "button", t.submit = "submit", t.reset = "reset", t))(b || {}), B = /* @__PURE__ */ ((t) => (t._blank = "_blank", t._self = "_self", t._parent = "_parent", t._top = "_top", t))(B || {});
15
- const w = {
25
+ var Side = /* @__PURE__ */ ((Side2) => {
26
+ Side2["left"] = "left";
27
+ Side2["right"] = "right";
28
+ Side2["top"] = "top";
29
+ Side2["bottom"] = "bottom";
30
+ return Side2;
31
+ })(Side || {});
32
+ var Placement = /* @__PURE__ */ ((Placement2) => {
33
+ Placement2["topStart"] = "top-start";
34
+ Placement2["topEnd"] = "top-end";
35
+ Placement2["bottomStart"] = "bottom-start";
36
+ Placement2["bottomEnd"] = "bottom-end";
37
+ Placement2["leftStart"] = "left-start";
38
+ Placement2["leftEnd"] = "left-end";
39
+ Placement2["rightStart"] = "right-start";
40
+ Placement2["rightEnd"] = "right-end";
41
+ return Placement2;
42
+ })(Placement || {});
43
+ var Position = /* @__PURE__ */ ((Position2) => {
44
+ Position2["before"] = "before";
45
+ Position2["after"] = "after";
46
+ return Position2;
47
+ })(Position || {});
48
+ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
49
+ ButtonType2["button"] = "button";
50
+ ButtonType2["submit"] = "submit";
51
+ ButtonType2["reset"] = "reset";
52
+ return ButtonType2;
53
+ })(ButtonType || {});
54
+ var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
55
+ AnchorTarget2["_blank"] = "_blank";
56
+ AnchorTarget2["_self"] = "_self";
57
+ AnchorTarget2["_parent"] = "_parent";
58
+ AnchorTarget2["_top"] = "_top";
59
+ return AnchorTarget2;
60
+ })(AnchorTarget || {});
61
+ const LinkProps = {
16
62
  /**
17
63
  * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
18
64
  * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
@@ -29,7 +75,7 @@ const w = {
29
75
  */
30
76
  target: {
31
77
  type: String,
32
- validator: (t) => Object.values(B).includes(t)
78
+ validator: (value) => Object.values(AnchorTarget).includes(value)
33
79
  },
34
80
  /**
35
81
  * Anchor rel
@@ -38,96 +84,222 @@ const w = {
38
84
  type: String,
39
85
  default: "noopener noreferrer"
40
86
  }
41
- }, F = {
87
+ };
88
+ const DisabledProps = {
42
89
  /**
43
90
  * Whether the form control is disabled
44
91
  */
45
92
  disabled: Boolean
46
- }, M = {
93
+ };
94
+ const ActiveProps = {
47
95
  /**
48
96
  * Whether the item is active
49
97
  */
50
98
  active: Boolean
51
- }, I = {
99
+ };
100
+ const PressedProps = {
52
101
  /**
53
102
  * Whether the item is pressed
54
103
  */
55
104
  pressed: Boolean
56
- }, W = {
105
+ };
106
+ const LabelProps = {
57
107
  /**
58
108
  * The item label
59
109
  */
60
110
  label: [String, Number]
61
- }, q = {
111
+ };
112
+ const ModifiersProps = {
62
113
  /**
63
114
  * Component BEM modifiers
64
115
  */
65
116
  modifiers: [String, Array]
66
117
  };
67
- c.before;
68
- p.bottom;
69
118
  ({
70
- ...F,
71
- ...W,
72
- ...I,
73
- ...M,
74
- ...w,
119
+ /**
120
+ * VvIcon name or props
121
+ * @see VVIcon
122
+ */
123
+ icon: { type: [String, Object] },
124
+ /**
125
+ * VvIcon position
126
+ */
127
+ iconPosition: {
128
+ type: String,
129
+ default: Position.before,
130
+ validation: (value) => Object.values(Position).includes(value)
131
+ }
132
+ });
133
+ ({
134
+ /**
135
+ * Dropdown placement
136
+ */
137
+ placement: {
138
+ type: String,
139
+ default: Side.bottom,
140
+ validator: (value) => {
141
+ return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
142
+ }
143
+ },
144
+ /**
145
+ * Dropdown strategy
146
+ */
147
+ strategy: {
148
+ type: String,
149
+ default: "absolute",
150
+ validator: (value) => {
151
+ return ["fixed", "absolute"].includes(value);
152
+ }
153
+ },
154
+ /**
155
+ * Dropdown show / hide transition name
156
+ */
157
+ transitionName: {
158
+ type: String
159
+ },
160
+ /**
161
+ * Offset of the dropdown from the trigger
162
+ * @see https://floating-ui.com/docs/offset
163
+ */
164
+ offset: {
165
+ type: [Number, String, Object],
166
+ default: 0
167
+ },
168
+ /**
169
+ * Move dropdown to the side if there is no space in the default position
170
+ * @see https://floating-ui.com/docs/shift
171
+ */
172
+ shift: {
173
+ type: [Boolean, Object],
174
+ default: false
175
+ },
176
+ /**
177
+ * Flip dropdown position if there is no space in the default position
178
+ * @see https://floating-ui.com/docs/flip
179
+ */
180
+ flip: {
181
+ type: [Boolean, Object],
182
+ default: true
183
+ },
184
+ /**
185
+ * Size of the dropdown
186
+ * @see https://floating-ui.com/docs/size
187
+ */
188
+ size: {
189
+ type: [Boolean, Object],
190
+ default: () => ({ padding: 10 })
191
+ },
192
+ /**
193
+ * Automatically change the position of the dropdown
194
+ * @see https://floating-ui.com/docs/autoPlacement
195
+ */
196
+ autoPlacement: {
197
+ type: [Boolean, Object],
198
+ default: false
199
+ },
200
+ /**
201
+ * Add arrow to the dropdown
202
+ * @see https://floating-ui.com/docs/arrow
203
+ */
204
+ arrow: {
205
+ type: Boolean,
206
+ default: false
207
+ },
208
+ /**
209
+ * Close dropdown on click outside
210
+ */
211
+ autoClose: {
212
+ type: Boolean,
213
+ default: true
214
+ },
215
+ /**
216
+ * Autofocus first item on dropdown open
217
+ */
218
+ autofocusFirst: {
219
+ type: Boolean,
220
+ default: true
221
+ },
222
+ /**
223
+ * Set dropdown width to the same as the trigger
224
+ */
225
+ triggerWidth: {
226
+ type: Boolean
227
+ }
228
+ });
229
+ ({
230
+ ...DisabledProps,
231
+ ...LabelProps,
232
+ ...PressedProps,
233
+ ...ActiveProps,
234
+ ...LinkProps,
75
235
  /**
76
236
  * Button type
77
237
  */
78
- type: b.button
238
+ type: {
239
+ type: String,
240
+ default: ButtonType.button,
241
+ validator: (value) => Object.values(ButtonType).includes(value)
242
+ }
79
243
  });
80
- const G = {
81
- ...q,
244
+ const VvBreadcrumbProps = {
245
+ ...ModifiersProps,
82
246
  routes: Array
83
- }, H = { class: "vv-breadcrumb__list" }, J = ["content"], K = {
247
+ };
248
+ const _hoisted_1 = { class: "vv-breadcrumb__list" };
249
+ const _hoisted_2 = ["content"];
250
+ const __default__ = {
84
251
  name: "VvBreadcrumb"
85
- }, U = /* @__PURE__ */ j({
86
- ...K,
87
- props: G,
88
- setup(t) {
89
- const r = t, { modifiers: s } = O(r), n = R("vv-breadcrumb", s);
90
- return (e, l) => (u(), i("nav", {
91
- class: g(_(n)),
92
- "aria-label": "breadcrumbs"
93
- }, [
94
- y("ol", H, [
95
- (u(!0), i(k, null, E(e.routes, (a, o) => {
96
- var d, f, m, v;
97
- return u(), i("li", {
98
- key: `${a.label}-${o}`,
99
- class: g({
100
- "vv-breadcrumb__item": o < Number((d = e.routes) == null ? void 0 : d.length) - 1,
101
- "vv-breadcrumb__item-active": o === Number((f = e.routes) == null ? void 0 : f.length) - 1
102
- }),
103
- itemprop: "itemListElement",
104
- itemtype: "https://schema.org/ListItem",
105
- itemscope: ""
106
- }, [
107
- (u(), N($(a.to ? "router-link" : a.href ? "a" : "span"), C(a, {
108
- class: {
109
- "vv-breadcrumb__link": o < Number((m = e.routes) == null ? void 0 : m.length) - 1
110
- },
111
- "aria-current": o === Number((v = e.routes) == null ? void 0 : v.length) - 1 ? "page" : void 0,
112
- itemprop: "item"
113
- }), {
114
- default: L(() => [
115
- P(e.$slots, "label", V(z({ route: a, index: o })), () => [
116
- A(D(a.label), 1)
117
- ])
118
- ]),
119
- _: 2
120
- }, 1040, ["class", "aria-current"])),
121
- y("meta", {
122
- itemprop: "position",
123
- content: `${o + 1}`
124
- }, null, 8, J)
125
- ], 2);
126
- }), 128))
127
- ])
128
- ], 2));
252
+ };
253
+ const _sfc_main = /* @__PURE__ */ defineComponent({
254
+ ...__default__,
255
+ props: VvBreadcrumbProps,
256
+ setup(__props) {
257
+ const props = __props;
258
+ const { modifiers } = toRefs(props);
259
+ const bemCssClasses = useModifiers("vv-breadcrumb", modifiers);
260
+ return (_ctx, _cache) => {
261
+ return openBlock(), createElementBlock("nav", {
262
+ class: normalizeClass(unref(bemCssClasses)),
263
+ "aria-label": "breadcrumbs"
264
+ }, [
265
+ createElementVNode("ol", _hoisted_1, [
266
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.routes, (route, index) => {
267
+ var _a, _b, _c, _d;
268
+ return openBlock(), createElementBlock("li", {
269
+ key: `${route.label}-${index}`,
270
+ class: normalizeClass({
271
+ "vv-breadcrumb__item": index < Number((_a = _ctx.routes) == null ? void 0 : _a.length) - 1,
272
+ "vv-breadcrumb__item-active": index === Number((_b = _ctx.routes) == null ? void 0 : _b.length) - 1
273
+ }),
274
+ itemprop: "itemListElement",
275
+ itemtype: "https://schema.org/ListItem",
276
+ itemscope: ""
277
+ }, [
278
+ (openBlock(), createBlock(resolveDynamicComponent(route.to ? "router-link" : route.href ? "a" : "span"), mergeProps(route, {
279
+ class: {
280
+ "vv-breadcrumb__link": index < Number((_c = _ctx.routes) == null ? void 0 : _c.length) - 1
281
+ },
282
+ "aria-current": index === Number((_d = _ctx.routes) == null ? void 0 : _d.length) - 1 ? "page" : void 0,
283
+ itemprop: "item"
284
+ }), {
285
+ default: withCtx(() => [
286
+ renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps({ route, index })), () => [
287
+ createTextVNode(toDisplayString(route.label), 1)
288
+ ])
289
+ ]),
290
+ _: 2
291
+ }, 1040, ["class", "aria-current"])),
292
+ createElementVNode("meta", {
293
+ itemprop: "position",
294
+ content: `${index + 1}`
295
+ }, null, 8, _hoisted_2)
296
+ ], 2);
297
+ }), 128))
298
+ ])
299
+ ], 2);
300
+ };
129
301
  }
130
302
  });
131
303
  export {
132
- U as default
304
+ _sfc_main as default
133
305
  };
@@ -1 +1 @@
1
- (function(e,s){typeof exports=="object"&&typeof module<"u"?module.exports=s(require("vue")):typeof define=="function"&&define.amd?define(["vue"],s):(e=typeof globalThis<"u"?globalThis:e||self,e.VvBreadcrumb=s(e.vue))})(this,function(e){"use strict";function s(t,o,l){return e.computed(()=>{const i={[t]:!0},r=typeof(o==null?void 0:o.value)=="string"?o.value.split(" "):o==null?void 0:o.value;return r&&Array.isArray(r)&&r.forEach(c=>{i[`${t}--${c}`]=!0}),l&&Object.keys(l.value).forEach(c=>{i[`${t}--${c}`]=e.unref(l.value[c])}),i})}var p=(t=>(t.left="left",t.right="right",t.top="top",t.bottom="bottom",t))(p||{}),d=(t=>(t.topStart="top-start",t.topEnd="top-end",t.bottomStart="bottom-start",t.bottomEnd="bottom-end",t.leftStart="left-start",t.leftEnd="left-end",t.rightStart="right-start",t.rightEnd="right-end",t))(d||{}),u=(t=>(t.before="before",t.after="after",t))(u||{}),b=(t=>(t.button="button",t.submit="submit",t.reset="reset",t))(b||{}),f=(t=>(t._blank="_blank",t._self="_self",t._parent="_parent",t._top="_top",t))(f||{});const B={to:{type:[String,Object]},href:String,target:{type:String,validator:t=>Object.values(f).includes(t)},rel:{type:String,default:"noopener noreferrer"}},h={disabled:Boolean},v={active:Boolean},S={pressed:Boolean},j={label:[String,Number]},k={modifiers:[String,Array]};u.before,p.bottom,{...h,...j,...S,...v,...B,type:b.button};const O={...k,routes:Array},E={class:"vv-breadcrumb__list"},N=["content"],C={name:"VvBreadcrumb"};return e.defineComponent({...C,props:O,setup(t){const o=t,{modifiers:l}=e.toRefs(o),i=s("vv-breadcrumb",l);return(r,c)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(e.unref(i)),"aria-label":"breadcrumbs"},[e.createElementVNode("ol",E,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.routes,(n,a)=>{var m,g,y,_;return e.openBlock(),e.createElementBlock("li",{key:`${n.label}-${a}`,class:e.normalizeClass({"vv-breadcrumb__item":a<Number((m=r.routes)==null?void 0:m.length)-1,"vv-breadcrumb__item-active":a===Number((g=r.routes)==null?void 0:g.length)-1}),itemprop:"itemListElement",itemtype:"https://schema.org/ListItem",itemscope:""},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.to?"router-link":n.href?"a":"span"),e.mergeProps(n,{class:{"vv-breadcrumb__link":a<Number((y=r.routes)==null?void 0:y.length)-1},"aria-current":a===Number((_=r.routes)==null?void 0:_.length)-1?"page":void 0,itemprop:"item"}),{default:e.withCtx(()=>[e.renderSlot(r.$slots,"label",e.normalizeProps(e.guardReactiveProps({route:n,index:a})),()=>[e.createTextVNode(e.toDisplayString(n.label),1)])]),_:2},1040,["class","aria-current"])),e.createElementVNode("meta",{itemprop:"position",content:`${a+1}`},null,8,N)],2)}),128))])],2))}})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue")):"function"==typeof define&&define.amd?define(["vue"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvBreadcrumb=t(e.vue)}(this,(function(e){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),o=(e=>(e.before="before",e.after="after",e))(o||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{});Boolean,Boolean,Boolean;const n={modifiers:[String,Array]};o.before,t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,r.button;const l={...n,routes:Array},a={class:"vv-breadcrumb__list"},i=["content"];return e.defineComponent({name:"VvBreadcrumb",props:l,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-breadcrumb",r);return(t,o)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(e.unref(n)),"aria-label":"breadcrumbs"},[e.createElementVNode("ol",a,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.routes,((o,r)=>{var n,l,a,u;return e.openBlock(),e.createElementBlock("li",{key:`${o.label}-${r}`,class:e.normalizeClass({"vv-breadcrumb__item":r<Number(null==(n=t.routes)?void 0:n.length)-1,"vv-breadcrumb__item-active":r===Number(null==(l=t.routes)?void 0:l.length)-1}),itemprop:"itemListElement",itemtype:"https://schema.org/ListItem",itemscope:""},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.to?"router-link":o.href?"a":"span"),e.mergeProps(o,{class:{"vv-breadcrumb__link":r<Number(null==(a=t.routes)?void 0:a.length)-1},"aria-current":r===Number(null==(u=t.routes)?void 0:u.length)-1?"page":void 0,itemprop:"item"}),{default:e.withCtx((()=>[e.renderSlot(t.$slots,"label",e.normalizeProps(e.guardReactiveProps({route:o,index:r})),(()=>[e.createTextVNode(e.toDisplayString(o.label),1)]))])),_:2},1040,["class","aria-current"])),e.createElementVNode("meta",{itemprop:"position",content:`${r+1}`},null,8,i)],2)})),128))])],2))}})}));
@@ -1,9 +1,9 @@
1
1
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
2
2
  routes: {
3
- (arrayLength: number): import("@/components/VvBreadcrumb").Route[];
4
- (...items: import("@/components/VvBreadcrumb").Route[]): import("@/components/VvBreadcrumb").Route[];
5
- new (arrayLength: number): import("@/components/VvBreadcrumb").Route[];
6
- new (...items: import("@/components/VvBreadcrumb").Route[]): import("@/components/VvBreadcrumb").Route[];
3
+ (arrayLength: number): import(".").Route[];
4
+ (...items: import(".").Route[]): import(".").Route[];
5
+ new (arrayLength: number): import(".").Route[];
6
+ new (...items: import(".").Route[]): import(".").Route[];
7
7
  isArray(arg: any): arg is any[];
8
8
  readonly prototype: any[];
9
9
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -13,13 +13,13 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
13
13
  of<T_4>(...items: T_4[]): T_4[];
14
14
  readonly [Symbol.species]: ArrayConstructor;
15
15
  };
16
- modifiers: import("vue").PropType<string | string[]>;
16
+ modifiers: globalThis.PropType<string | string[]>;
17
17
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
18
18
  routes: {
19
- (arrayLength: number): import("@/components/VvBreadcrumb").Route[];
20
- (...items: import("@/components/VvBreadcrumb").Route[]): import("@/components/VvBreadcrumb").Route[];
21
- new (arrayLength: number): import("@/components/VvBreadcrumb").Route[];
22
- new (...items: import("@/components/VvBreadcrumb").Route[]): import("@/components/VvBreadcrumb").Route[];
19
+ (arrayLength: number): import(".").Route[];
20
+ (...items: import(".").Route[]): import(".").Route[];
21
+ new (arrayLength: number): import(".").Route[];
22
+ new (...items: import(".").Route[]): import(".").Route[];
23
23
  isArray(arg: any): arg is any[];
24
24
  readonly prototype: any[];
25
25
  from<T>(arrayLike: ArrayLike<T>): T[];
@@ -29,10 +29,10 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
29
29
  of<T_4>(...items: T_4[]): T_4[];
30
30
  readonly [Symbol.species]: ArrayConstructor;
31
31
  };
32
- modifiers: import("vue").PropType<string | string[]>;
32
+ modifiers: globalThis.PropType<string | string[]>;
33
33
  }>>, {}>, {
34
34
  label: (_: {
35
- route: import("@/components/VvBreadcrumb").Route;
35
+ route: import(".").Route;
36
36
  index: number;
37
37
  }) => any;
38
38
  }>;
@@ -21,5 +21,5 @@ export declare const VvBreadcrumbProps: {
21
21
  of<T_4>(...items: T_4[]): T_4[];
22
22
  readonly [Symbol.species]: ArrayConstructor;
23
23
  };
24
- modifiers: import("vue").PropType<string | string[]>;
24
+ modifiers: globalThis.PropType<string | string[]>;
25
25
  };