@volverjs/ui-vue 0.0.3 → 0.0.5-beta.1

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 (236) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +54 -15
  3. package/auto-imports.d.ts +12 -3
  4. package/bin/icons.cjs +1 -73
  5. package/dist/Volver.d.ts +23 -11
  6. package/dist/components/VvAccordion/VvAccordion.es.js +180 -74
  7. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  8. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -1
  9. package/dist/components/VvAccordion/index.d.ts +8 -3
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +280 -122
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -12
  13. package/dist/components/VvAccordionGroup/index.d.ts +8 -0
  14. package/dist/components/VvAction/VvAction.es.js +338 -0
  15. package/dist/components/VvAction/VvAction.umd.js +1 -0
  16. package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
  17. package/dist/components/VvAction/index.d.ts +24 -0
  18. package/dist/components/VvBadge/VvBadge.es.js +251 -22
  19. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  20. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
  21. package/dist/components/VvBadge/index.d.ts +1 -1
  22. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +280 -62
  23. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  24. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -11
  25. package/dist/components/VvBreadcrumb/index.d.ts +1 -1
  26. package/dist/components/VvButton/VvButton.es.js +720 -261
  27. package/dist/components/VvButton/VvButton.umd.js +1 -1
  28. package/dist/components/VvButton/VvButton.vue.d.ts +54 -54
  29. package/dist/components/VvButton/index.d.ts +30 -75
  30. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +296 -49
  31. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  32. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
  33. package/dist/components/VvButtonGroup/index.d.ts +1 -1
  34. package/dist/components/VvCard/VvCard.es.js +60 -28
  35. package/dist/components/VvCard/VvCard.umd.js +1 -1
  36. package/dist/components/VvCheckbox/VvCheckbox.es.js +630 -172
  37. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  38. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +4 -4
  39. package/dist/components/VvCheckbox/index.d.ts +6 -6
  40. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +736 -228
  41. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  42. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +9 -9
  43. package/dist/components/VvCheckboxGroup/index.d.ts +4 -4
  44. package/dist/components/VvCombobox/VvCombobox.es.js +1673 -768
  45. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  46. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +159 -61
  47. package/dist/components/VvCombobox/index.d.ts +54 -23
  48. package/dist/components/VvDialog/VvDialog.es.js +426 -115
  49. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  50. package/dist/components/VvDialog/VvDialog.vue.d.ts +12 -3
  51. package/dist/components/VvDialog/index.d.ts +4 -1
  52. package/dist/components/VvDropdown/VvDropdown.es.js +504 -190
  53. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  54. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +114 -42
  55. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
  56. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
  57. package/dist/components/VvDropdown/index.d.ts +35 -14
  58. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +454 -0
  59. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
  60. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +48 -18
  61. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  62. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +361 -0
  63. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
  64. package/dist/components/VvIcon/VvIcon.es.js +116 -52
  65. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  66. package/dist/components/VvIcon/VvIcon.vue.d.ts +7 -7
  67. package/dist/components/VvIcon/index.d.ts +2 -2
  68. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +2 -2
  69. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  70. package/dist/components/VvInputText/VvInputText.es.js +1054 -376
  71. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  72. package/dist/components/VvInputText/VvInputText.vue.d.ts +107 -20
  73. package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
  74. package/dist/components/VvInputText/index.d.ts +67 -3
  75. package/dist/components/VvProgress/VvProgress.es.js +254 -23
  76. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  77. package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -2
  78. package/dist/components/VvProgress/index.d.ts +1 -1
  79. package/dist/components/VvRadio/VvRadio.es.js +568 -137
  80. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  81. package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -4
  82. package/dist/components/VvRadio/index.d.ts +6 -6
  83. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +674 -193
  84. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  85. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +9 -9
  86. package/dist/components/VvRadioGroup/index.d.ts +4 -4
  87. package/dist/components/VvSelect/VvSelect.es.js +703 -251
  88. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  89. package/dist/components/VvSelect/VvSelect.vue.d.ts +24 -17
  90. package/dist/components/VvSelect/index.d.ts +8 -8
  91. package/dist/components/VvTextarea/VvTextarea.es.js +747 -272
  92. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  93. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +21 -14
  94. package/dist/components/VvTextarea/index.d.ts +7 -7
  95. package/dist/components/VvTooltip/VvTooltip.es.js +252 -24
  96. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  97. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +7 -7
  98. package/dist/components/VvTooltip/index.d.ts +2 -2
  99. package/dist/components/index.es.js +3676 -2007
  100. package/dist/components/index.umd.js +1 -1
  101. package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
  102. package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -3
  103. package/dist/composables/group/useInjectedGroupState.d.ts +2 -2
  104. package/dist/composables/group/useProvideGroupState.d.ts +1 -1
  105. package/dist/composables/useComponentFocus.d.ts +1 -1
  106. package/dist/composables/useComponentIcon.d.ts +7 -7
  107. package/dist/composables/useDebouncedInput.d.ts +4 -1
  108. package/dist/composables/useDefaults.d.ts +2 -0
  109. package/dist/composables/useModifiers.d.ts +1 -1
  110. package/dist/composables/useOptions.d.ts +2 -2
  111. package/dist/composables/useTextCount.d.ts +3 -3
  112. package/dist/composables/useUniqueId.d.ts +1 -1
  113. package/dist/composables/useVolver.d.ts +1 -1
  114. package/dist/constants.d.ts +30 -0
  115. package/dist/directives/index.es.js +288 -0
  116. package/dist/directives/index.umd.js +1 -0
  117. package/dist/directives/v-tooltip.es.js +285 -0
  118. package/dist/directives/v-tooltip.umd.js +1 -0
  119. package/dist/icons.es.js +38 -23
  120. package/dist/icons.umd.js +1 -1
  121. package/dist/index.d.ts +0 -1
  122. package/dist/index.es.js +115 -3269
  123. package/dist/index.umd.js +1 -1
  124. package/dist/props/index.d.ts +215 -23
  125. package/dist/resolvers/unplugin.d.ts +14 -8
  126. package/dist/resolvers/unplugin.es.js +94 -33
  127. package/dist/resolvers/unplugin.umd.js +1 -1
  128. package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
  129. package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
  130. package/dist/stories/InputText/InputText.settings.d.ts +53 -0
  131. package/dist/stories/argTypes.d.ts +1 -1
  132. package/package.json +167 -63
  133. package/src/Volver.ts +60 -26
  134. package/src/assets/icons/detailed.json +1 -1
  135. package/src/assets/icons/normal.json +1 -1
  136. package/src/assets/icons/simple.json +1 -1
  137. package/src/components/VvAccordion/VvAccordion.vue +19 -22
  138. package/src/components/VvAccordion/index.ts +12 -4
  139. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +19 -10
  140. package/src/components/VvAccordionGroup/index.ts +8 -0
  141. package/src/components/VvAction/VvAction.vue +144 -0
  142. package/src/components/VvAction/index.ts +5 -0
  143. package/src/components/VvBadge/VvBadge.vue +2 -2
  144. package/src/components/VvBadge/index.ts +1 -1
  145. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +3 -3
  146. package/src/components/VvButton/VvButton.vue +41 -124
  147. package/src/components/VvButton/index.ts +16 -88
  148. package/src/components/VvButtonGroup/VvButtonGroup.vue +4 -7
  149. package/src/components/VvButtonGroup/index.ts +1 -1
  150. package/src/components/VvCard/VvCard.vue +2 -2
  151. package/src/components/VvCheckbox/VvCheckbox.vue +3 -7
  152. package/src/components/VvCheckbox/index.ts +11 -7
  153. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +7 -10
  154. package/src/components/VvCheckboxGroup/index.ts +1 -1
  155. package/src/components/VvCombobox/VvCombobox.vue +85 -57
  156. package/src/components/VvCombobox/index.ts +12 -10
  157. package/src/components/VvDialog/VvDialog.vue +28 -11
  158. package/src/components/VvDialog/index.ts +5 -2
  159. package/src/components/VvDropdown/VvDropdown.vue +6 -5
  160. package/src/components/VvDropdown/VvDropdownAction.vue +46 -0
  161. package/src/components/VvDropdown/VvDropdownOption.vue +72 -0
  162. package/src/components/VvDropdown/index.ts +6 -11
  163. package/src/components/VvIcon/VvIcon.vue +3 -3
  164. package/src/components/VvIcon/index.ts +3 -3
  165. package/src/components/VvInputText/VvInputClearAction.ts +2 -2
  166. package/src/components/VvInputText/VvInputPasswordAction.ts +3 -4
  167. package/src/components/VvInputText/VvInputStepAction.ts +3 -2
  168. package/src/components/VvInputText/VvInputText.vue +128 -35
  169. package/src/components/VvInputText/VvInputTextActions.ts +5 -8
  170. package/src/components/VvInputText/index.ts +62 -1
  171. package/src/components/VvProgress/VvProgress.vue +2 -2
  172. package/src/components/VvProgress/index.ts +1 -1
  173. package/src/components/VvRadio/VvRadio.vue +3 -7
  174. package/src/components/VvRadio/index.ts +11 -7
  175. package/src/components/VvRadioGroup/VvRadioGroup.vue +7 -10
  176. package/src/components/VvRadioGroup/index.ts +1 -1
  177. package/src/components/VvSelect/VvSelect.vue +4 -4
  178. package/src/components/VvSelect/index.ts +3 -5
  179. package/src/components/VvTextarea/VvTextarea.vue +4 -4
  180. package/src/components/VvTextarea/index.ts +1 -1
  181. package/src/components/VvTooltip/VvTooltip.vue +2 -2
  182. package/src/components/VvTooltip/index.ts +3 -3
  183. package/src/composables/dropdown/useInjectDropdown.ts +2 -2
  184. package/src/composables/dropdown/useProvideDropdown.ts +9 -11
  185. package/src/composables/group/useInjectedGroupState.ts +1 -1
  186. package/src/composables/group/useProvideGroupState.ts +1 -1
  187. package/src/composables/useComponentIcon.ts +1 -1
  188. package/src/composables/useDebouncedInput.ts +10 -3
  189. package/src/composables/useDefaults.ts +89 -0
  190. package/src/composables/useModifiers.ts +8 -9
  191. package/src/composables/useOptions.ts +1 -1
  192. package/src/composables/useVolver.ts +2 -2
  193. package/src/constants.ts +36 -0
  194. package/src/directives/index.ts +1 -1
  195. package/src/directives/v-tooltip.ts +2 -2
  196. package/src/index.ts +0 -2
  197. package/src/props/index.ts +111 -19
  198. package/src/resolvers/unplugin.ts +96 -49
  199. package/src/stories/Accordion/Accordion.stories.mdx +8 -2
  200. package/src/stories/Accordion/Accordion.test.ts +21 -15
  201. package/src/stories/Accordion/AccordionSlots.stories.mdx +8 -8
  202. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +17 -1
  203. package/src/stories/AccordionGroup/AccordionGroup.test.ts +18 -12
  204. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +3 -2
  205. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
  206. package/src/stories/Button/Button.stories.mdx +4 -2
  207. package/src/stories/Button/Button.test.ts +3 -1
  208. package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
  209. package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
  210. package/src/stories/Button/ButtonState.stories.mdx +2 -11
  211. package/src/stories/Card/Card.stories.mdx +2 -1
  212. package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
  213. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
  214. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
  215. package/src/stories/Combobox/Combobox.settings.ts +44 -0
  216. package/src/stories/Combobox/Combobox.stories.mdx +40 -1
  217. package/src/stories/Dialog/Dialog.stories.mdx +2 -1
  218. package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
  219. package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
  220. package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
  221. package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
  222. package/src/stories/Icon/Icon.stories.mdx +2 -1
  223. package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
  224. package/src/stories/InputText/InputText.settings.ts +53 -0
  225. package/src/stories/InputText/InputText.stories.mdx +42 -1
  226. package/src/stories/InputText/InputText.test.ts +5 -2
  227. package/src/stories/Progress/Progress.stories.mdx +2 -1
  228. package/src/stories/Radio/Radio.stories.mdx +2 -1
  229. package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
  230. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
  231. package/src/stories/Select/Select.stories.mdx +2 -1
  232. package/src/stories/Textarea/Textarea.stories.mdx +2 -1
  233. package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
  234. package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
  235. package/src/stories/argTypes.ts +2 -2
  236. package/src/types/group.d.ts +5 -0
@@ -1,33 +1,262 @@
1
- import { defineComponent as f, openBlock as i, createElementBlock as u, normalizeClass as d, unref as p, renderSlot as c, createTextVNode as b, toDisplayString as g } from "vue";
2
- var e = /* @__PURE__ */ ((t) => (t.left = "left", t.right = "right", t.top = "top", t.bottom = "bottom", t))(e || {}), a = /* @__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))(a || {}), o = /* @__PURE__ */ ((t) => (t.before = "before", t.after = "after", t))(o || {});
3
- const m = {
1
+ import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot, createTextVNode, toDisplayString } from "vue";
2
+ var Side = /* @__PURE__ */ ((Side2) => {
3
+ Side2["left"] = "left";
4
+ Side2["right"] = "right";
5
+ Side2["top"] = "top";
6
+ Side2["bottom"] = "bottom";
7
+ return Side2;
8
+ })(Side || {});
9
+ var Placement = /* @__PURE__ */ ((Placement2) => {
10
+ Placement2["topStart"] = "top-start";
11
+ Placement2["topEnd"] = "top-end";
12
+ Placement2["bottomStart"] = "bottom-start";
13
+ Placement2["bottomEnd"] = "bottom-end";
14
+ Placement2["leftStart"] = "left-start";
15
+ Placement2["leftEnd"] = "left-end";
16
+ Placement2["rightStart"] = "right-start";
17
+ Placement2["rightEnd"] = "right-end";
18
+ return Placement2;
19
+ })(Placement || {});
20
+ var Position = /* @__PURE__ */ ((Position2) => {
21
+ Position2["before"] = "before";
22
+ Position2["after"] = "after";
23
+ return Position2;
24
+ })(Position || {});
25
+ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
26
+ ButtonType2["button"] = "button";
27
+ ButtonType2["submit"] = "submit";
28
+ ButtonType2["reset"] = "reset";
29
+ return ButtonType2;
30
+ })(ButtonType || {});
31
+ var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
32
+ AnchorTarget2["_blank"] = "_blank";
33
+ AnchorTarget2["_self"] = "_self";
34
+ AnchorTarget2["_parent"] = "_parent";
35
+ AnchorTarget2["_top"] = "_top";
36
+ return AnchorTarget2;
37
+ })(AnchorTarget || {});
38
+ const LinkProps = {
39
+ /**
40
+ * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
41
+ * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
42
+ */
43
+ to: {
44
+ type: [String, Object]
45
+ },
46
+ /**
47
+ * Anchor href
48
+ */
49
+ href: String,
50
+ /**
51
+ * Anchor target
52
+ */
53
+ target: {
54
+ type: String,
55
+ validator: (value) => Object.values(AnchorTarget).includes(value)
56
+ },
57
+ /**
58
+ * Anchor rel
59
+ */
60
+ rel: {
61
+ type: String,
62
+ default: "noopener noreferrer"
63
+ }
64
+ };
65
+ const DisabledProps = {
66
+ /**
67
+ * Whether the form control is disabled
68
+ */
69
+ disabled: Boolean
70
+ };
71
+ const ActiveProps = {
72
+ /**
73
+ * Whether the item is active
74
+ */
75
+ active: Boolean
76
+ };
77
+ const PressedProps = {
78
+ /**
79
+ * Whether the item is pressed
80
+ */
81
+ pressed: Boolean
82
+ };
83
+ const LabelProps = {
84
+ /**
85
+ * The item label
86
+ */
87
+ label: [String, Number]
88
+ };
89
+ const ModifiersProps = {
4
90
  /**
5
91
  * Component BEM modifiers
6
92
  */
7
93
  modifiers: [String, Array]
8
94
  };
9
- o.before;
10
- e.bottom;
11
- const y = {
12
- ...m,
95
+ ({
96
+ /**
97
+ * VvIcon name or props
98
+ * @see VVIcon
99
+ */
100
+ icon: { type: [String, Object] },
101
+ /**
102
+ * VvIcon position
103
+ */
104
+ iconPosition: {
105
+ type: String,
106
+ default: Position.before,
107
+ validation: (value) => Object.values(Position).includes(value)
108
+ }
109
+ });
110
+ ({
111
+ /**
112
+ * Dropdown placement
113
+ */
114
+ placement: {
115
+ type: String,
116
+ default: Side.bottom,
117
+ validator: (value) => {
118
+ return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
119
+ }
120
+ },
121
+ /**
122
+ * Dropdown show / hide transition name
123
+ */
124
+ transitionName: {
125
+ type: String
126
+ },
127
+ /**
128
+ * Offset of the dropdown from the trigger
129
+ * @see https://floating-ui.com/docs/offset
130
+ */
131
+ offset: {
132
+ type: [Number, String, Object],
133
+ default: 0
134
+ },
135
+ /**
136
+ * Move dropdown to the side if there is no space in the default position
137
+ * @see https://floating-ui.com/docs/shift
138
+ */
139
+ shift: {
140
+ type: [Boolean, Object],
141
+ default: false
142
+ },
143
+ /**
144
+ * Flip dropdown position if there is no space in the default position
145
+ * @see https://floating-ui.com/docs/flip
146
+ */
147
+ flip: {
148
+ type: [Boolean, Object],
149
+ default: true
150
+ },
151
+ /**
152
+ * Size of the dropdown
153
+ * @see https://floating-ui.com/docs/size
154
+ */
155
+ size: {
156
+ type: [Boolean, Object],
157
+ default: () => ({ padding: 10 })
158
+ },
159
+ /**
160
+ * Automatically change the position of the dropdown
161
+ * @see https://floating-ui.com/docs/autoPlacement
162
+ */
163
+ autoPlacement: {
164
+ type: [Boolean, Object],
165
+ default: false
166
+ },
167
+ /**
168
+ * Add arrow to the dropdown
169
+ * @see https://floating-ui.com/docs/arrow
170
+ */
171
+ arrow: {
172
+ type: Boolean,
173
+ default: false
174
+ },
175
+ /**
176
+ * Close dropdown on click outside
177
+ */
178
+ autoClose: {
179
+ type: Boolean,
180
+ default: true
181
+ },
182
+ /**
183
+ * Autofocus first item on dropdown open
184
+ */
185
+ autofocusFirst: {
186
+ type: Boolean,
187
+ default: true
188
+ },
189
+ /**
190
+ * Set dropdown width to the same as the trigger
191
+ */
192
+ triggerWidth: {
193
+ type: Boolean
194
+ }
195
+ });
196
+ ({
197
+ ...DisabledProps,
198
+ ...LabelProps,
199
+ ...PressedProps,
200
+ ...ActiveProps,
201
+ ...LinkProps,
202
+ /**
203
+ * Button type
204
+ */
205
+ type: {
206
+ type: String,
207
+ default: ButtonType.button,
208
+ validator: (value) => Object.values(ButtonType).includes(value)
209
+ }
210
+ });
211
+ const VvBadgeProps = {
212
+ ...ModifiersProps,
13
213
  value: [String, Number]
14
- }, v = {
214
+ };
215
+ function useModifiers(prefix, modifiers, others) {
216
+ return computed(() => {
217
+ const toReturn = {
218
+ [prefix]: true
219
+ };
220
+ const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
221
+ if (modifiersArray) {
222
+ if (Array.isArray(modifiersArray)) {
223
+ modifiersArray.forEach((modifier) => {
224
+ if (modifier) {
225
+ toReturn[`${prefix}--${modifier}`] = true;
226
+ }
227
+ });
228
+ }
229
+ }
230
+ if (others) {
231
+ Object.keys(others.value).forEach((key) => {
232
+ toReturn[`${prefix}--${key}`] = unref(others.value[key]);
233
+ });
234
+ }
235
+ return toReturn;
236
+ });
237
+ }
238
+ const __default__ = {
15
239
  name: "VvBadge"
16
- }, h = /* @__PURE__ */ f({
17
- ...v,
18
- props: y,
19
- setup(t) {
20
- const s = t, { modifiers: n } = toRefs(s), l = useBemModifiers("vv-badge", n);
21
- return (r, B) => (i(), u("span", {
22
- class: d(p(l)),
23
- role: "status"
24
- }, [
25
- c(r.$slots, "default", {}, () => [
26
- b(g(r.value), 1)
27
- ])
28
- ], 2));
240
+ };
241
+ const _sfc_main = /* @__PURE__ */ defineComponent({
242
+ ...__default__,
243
+ props: VvBadgeProps,
244
+ setup(__props) {
245
+ const props = __props;
246
+ const { modifiers } = toRefs(props);
247
+ const bemCssClasses = useModifiers("vv-badge", modifiers);
248
+ return (_ctx, _cache) => {
249
+ return openBlock(), createElementBlock("span", {
250
+ class: normalizeClass(unref(bemCssClasses)),
251
+ role: "status"
252
+ }, [
253
+ renderSlot(_ctx.$slots, "default", {}, () => [
254
+ createTextVNode(toDisplayString(_ctx.value), 1)
255
+ ])
256
+ ], 2);
257
+ };
29
258
  }
30
259
  });
31
260
  export {
32
- h as default
261
+ _sfc_main as default
33
262
  };
@@ -1 +1 @@
1
- (function(e,o){typeof exports=="object"&&typeof module<"u"?module.exports=o(require("vue")):typeof define=="function"&&define.amd?define(["vue"],o):(e=typeof globalThis<"u"?globalThis:e||self,e.VvBadge=o(e.vue))})(this,function(e){"use strict";var o=(t=>(t.left="left",t.right="right",t.top="top",t.bottom="bottom",t))(o||{}),n=(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))(n||{}),r=(t=>(t.before="before",t.after="after",t))(r||{});const a={modifiers:[String,Array]};r.before,o.bottom;const i={...a,value:[String,Number]},f={name:"VvBadge"};return e.defineComponent({...f,props:i,setup(t){const l=t,{modifiers:d}=toRefs(l),u=useBemModifiers("vv-badge",d);return(s,c)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(u)),role:"status"},[e.renderSlot(s.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(s.value),1)])],2))}})});
1
+ !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue")):"function"==typeof define&&define.amd?define(["vue"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvBadge=o(e.vue)}(this,(function(e){"use strict";var o=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(o||{}),t=(e=>(e.before="before",e.after="after",e))(t||{}),n=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(n||{});Boolean,Boolean,Boolean;const r={modifiers:[String,Array]};t.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,n.button;const l={...r,value:[String,Number]};return e.defineComponent({name:"VvBadge",props:l,setup(o){const t=o,{modifiers:n}=e.toRefs(t),r=function(o,t,n){return e.computed((()=>{const r={[o]:!0},l="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return l&&Array.isArray(l)&&l.forEach((e=>{e&&(r[`${o}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((t=>{r[`${o}--${t}`]=e.unref(n.value[t])})),r}))}("vv-badge",n);return(o,t)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(r)),role:"status"},[e.renderSlot(o.$slots,"default",{},(()=>[e.createTextVNode(e.toDisplayString(o.value),1)]))],2))}})}));
@@ -1,9 +1,9 @@
1
1
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
2
2
  value: (StringConstructor | NumberConstructor)[];
3
- modifiers: import("vue").PropType<string | string[]>;
3
+ modifiers: globalThis.PropType<string | string[]>;
4
4
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
5
5
  value: (StringConstructor | NumberConstructor)[];
6
- modifiers: import("vue").PropType<string | string[]>;
6
+ modifiers: globalThis.PropType<string | string[]>;
7
7
  }>>, {}>, {
8
8
  default: (_: {}) => any;
9
9
  }>;
@@ -1,4 +1,4 @@
1
1
  export declare const VvBadgeProps: {
2
2
  value: (StringConstructor | NumberConstructor)[];
3
- modifiers: import("vue").PropType<string | string[]>;
3
+ modifiers: globalThis.PropType<string | string[]>;
4
4
  };
@@ -1,77 +1,295 @@
1
- import { defineComponent as h, openBlock as l, createElementBlock as u, normalizeClass as g, unref as _, createElementVNode as v, Fragment as B, renderList as j, createBlock as O, resolveDynamicComponent as E, mergeProps as S, withCtx as $, renderSlot as N, normalizeProps as A, guardReactiveProps as C, createTextVNode as k, toDisplayString as V } from "vue";
2
- function z(t, i, a) {
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
3
  return computed(() => {
4
- const s = {
5
- [t]: !0
4
+ const toReturn = {
5
+ [prefix]: true
6
6
  };
7
- let e = unref(i);
8
- return e && (!Array.isArray(e) && typeof e == "string" && (e = e.split(" ")), Array.isArray(e) && e.forEach((n) => {
9
- s[`${t}--${n}`] = !0;
10
- })), a && Object.keys(a.value).forEach((n) => {
11
- s[`${t}--${n}`] = unref(a.value[n]);
12
- }), s;
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;
13
23
  });
14
24
  }
15
- var c = /* @__PURE__ */ ((t) => (t.left = "left", t.right = "right", t.top = "top", t.bottom = "bottom", t))(c || {}), y = /* @__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))(y || {}), f = /* @__PURE__ */ ((t) => (t.before = "before", t.after = "after", t))(f || {});
16
- const L = {
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 = {
62
+ /**
63
+ * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
64
+ * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
65
+ */
66
+ to: {
67
+ type: [String, Object]
68
+ },
69
+ /**
70
+ * Anchor href
71
+ */
72
+ href: String,
73
+ /**
74
+ * Anchor target
75
+ */
76
+ target: {
77
+ type: String,
78
+ validator: (value) => Object.values(AnchorTarget).includes(value)
79
+ },
80
+ /**
81
+ * Anchor rel
82
+ */
83
+ rel: {
84
+ type: String,
85
+ default: "noopener noreferrer"
86
+ }
87
+ };
88
+ const DisabledProps = {
89
+ /**
90
+ * Whether the form control is disabled
91
+ */
92
+ disabled: Boolean
93
+ };
94
+ const ActiveProps = {
95
+ /**
96
+ * Whether the item is active
97
+ */
98
+ active: Boolean
99
+ };
100
+ const PressedProps = {
101
+ /**
102
+ * Whether the item is pressed
103
+ */
104
+ pressed: Boolean
105
+ };
106
+ const LabelProps = {
107
+ /**
108
+ * The item label
109
+ */
110
+ label: [String, Number]
111
+ };
112
+ const ModifiersProps = {
17
113
  /**
18
114
  * Component BEM modifiers
19
115
  */
20
116
  modifiers: [String, Array]
21
117
  };
22
- f.before;
23
- c.bottom;
24
- const R = {
25
- ...L,
118
+ ({
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 show / hide transition name
146
+ */
147
+ transitionName: {
148
+ type: String
149
+ },
150
+ /**
151
+ * Offset of the dropdown from the trigger
152
+ * @see https://floating-ui.com/docs/offset
153
+ */
154
+ offset: {
155
+ type: [Number, String, Object],
156
+ default: 0
157
+ },
158
+ /**
159
+ * Move dropdown to the side if there is no space in the default position
160
+ * @see https://floating-ui.com/docs/shift
161
+ */
162
+ shift: {
163
+ type: [Boolean, Object],
164
+ default: false
165
+ },
166
+ /**
167
+ * Flip dropdown position if there is no space in the default position
168
+ * @see https://floating-ui.com/docs/flip
169
+ */
170
+ flip: {
171
+ type: [Boolean, Object],
172
+ default: true
173
+ },
174
+ /**
175
+ * Size of the dropdown
176
+ * @see https://floating-ui.com/docs/size
177
+ */
178
+ size: {
179
+ type: [Boolean, Object],
180
+ default: () => ({ padding: 10 })
181
+ },
182
+ /**
183
+ * Automatically change the position of the dropdown
184
+ * @see https://floating-ui.com/docs/autoPlacement
185
+ */
186
+ autoPlacement: {
187
+ type: [Boolean, Object],
188
+ default: false
189
+ },
190
+ /**
191
+ * Add arrow to the dropdown
192
+ * @see https://floating-ui.com/docs/arrow
193
+ */
194
+ arrow: {
195
+ type: Boolean,
196
+ default: false
197
+ },
198
+ /**
199
+ * Close dropdown on click outside
200
+ */
201
+ autoClose: {
202
+ type: Boolean,
203
+ default: true
204
+ },
205
+ /**
206
+ * Autofocus first item on dropdown open
207
+ */
208
+ autofocusFirst: {
209
+ type: Boolean,
210
+ default: true
211
+ },
212
+ /**
213
+ * Set dropdown width to the same as the trigger
214
+ */
215
+ triggerWidth: {
216
+ type: Boolean
217
+ }
218
+ });
219
+ ({
220
+ ...DisabledProps,
221
+ ...LabelProps,
222
+ ...PressedProps,
223
+ ...ActiveProps,
224
+ ...LinkProps,
225
+ /**
226
+ * Button type
227
+ */
228
+ type: {
229
+ type: String,
230
+ default: ButtonType.button,
231
+ validator: (value) => Object.values(ButtonType).includes(value)
232
+ }
233
+ });
234
+ const VvBreadcrumbProps = {
235
+ ...ModifiersProps,
26
236
  routes: Array
27
- }, w = { class: "vv-breadcrumb__list" }, D = ["content"], F = {
237
+ };
238
+ const _hoisted_1 = { class: "vv-breadcrumb__list" };
239
+ const _hoisted_2 = ["content"];
240
+ const __default__ = {
28
241
  name: "VvBreadcrumb"
29
- }, I = /* @__PURE__ */ h({
30
- ...F,
31
- props: R,
32
- setup(t) {
33
- const i = t, { modifiers: a } = toRefs(i), s = z("vv-breadcrumb", a);
34
- return (e, n) => (l(), u("nav", {
35
- class: g(_(s)),
36
- "aria-label": "breadcrumbs"
37
- }, [
38
- v("ol", w, [
39
- (l(!0), u(B, null, j(e.routes, (o, r) => {
40
- var p, m, b, d;
41
- return l(), u("li", {
42
- key: `${o.label}-${r}`,
43
- class: g({
44
- "vv-breadcrumb__item": r < Number((p = e.routes) == null ? void 0 : p.length) - 1,
45
- "vv-breadcrumb__item-active": r === Number((m = e.routes) == null ? void 0 : m.length) - 1
46
- }),
47
- itemprop: "itemListElement",
48
- itemtype: "https://schema.org/ListItem",
49
- itemscope: ""
50
- }, [
51
- (l(), O(E(o.to ? "router-link" : o.href ? "a" : "span"), S(o, {
52
- class: {
53
- "vv-breadcrumb__link": r < Number((b = e.routes) == null ? void 0 : b.length) - 1
54
- },
55
- "aria-current": r === Number((d = e.routes) == null ? void 0 : d.length) - 1 ? "page" : void 0,
56
- itemprop: "item"
57
- }), {
58
- default: $(() => [
59
- N(e.$slots, "label", A(C({ route: o, index: r })), () => [
60
- k(V(o.label), 1)
61
- ])
62
- ]),
63
- _: 2
64
- }, 1040, ["class", "aria-current"])),
65
- v("meta", {
66
- itemprop: "position",
67
- content: `${r + 1}`
68
- }, null, 8, D)
69
- ], 2);
70
- }), 128))
71
- ])
72
- ], 2));
242
+ };
243
+ const _sfc_main = /* @__PURE__ */ defineComponent({
244
+ ...__default__,
245
+ props: VvBreadcrumbProps,
246
+ setup(__props) {
247
+ const props = __props;
248
+ const { modifiers } = toRefs(props);
249
+ const bemCssClasses = useModifiers("vv-breadcrumb", modifiers);
250
+ return (_ctx, _cache) => {
251
+ return openBlock(), createElementBlock("nav", {
252
+ class: normalizeClass(unref(bemCssClasses)),
253
+ "aria-label": "breadcrumbs"
254
+ }, [
255
+ createElementVNode("ol", _hoisted_1, [
256
+ (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.routes, (route, index) => {
257
+ var _a, _b, _c, _d;
258
+ return openBlock(), createElementBlock("li", {
259
+ key: `${route.label}-${index}`,
260
+ class: normalizeClass({
261
+ "vv-breadcrumb__item": index < Number((_a = _ctx.routes) == null ? void 0 : _a.length) - 1,
262
+ "vv-breadcrumb__item-active": index === Number((_b = _ctx.routes) == null ? void 0 : _b.length) - 1
263
+ }),
264
+ itemprop: "itemListElement",
265
+ itemtype: "https://schema.org/ListItem",
266
+ itemscope: ""
267
+ }, [
268
+ (openBlock(), createBlock(resolveDynamicComponent(route.to ? "router-link" : route.href ? "a" : "span"), mergeProps(route, {
269
+ class: {
270
+ "vv-breadcrumb__link": index < Number((_c = _ctx.routes) == null ? void 0 : _c.length) - 1
271
+ },
272
+ "aria-current": index === Number((_d = _ctx.routes) == null ? void 0 : _d.length) - 1 ? "page" : void 0,
273
+ itemprop: "item"
274
+ }), {
275
+ default: withCtx(() => [
276
+ renderSlot(_ctx.$slots, "label", normalizeProps(guardReactiveProps({ route, index })), () => [
277
+ createTextVNode(toDisplayString(route.label), 1)
278
+ ])
279
+ ]),
280
+ _: 2
281
+ }, 1040, ["class", "aria-current"])),
282
+ createElementVNode("meta", {
283
+ itemprop: "position",
284
+ content: `${index + 1}`
285
+ }, null, 8, _hoisted_2)
286
+ ], 2);
287
+ }), 128))
288
+ ])
289
+ ], 2);
290
+ };
73
291
  }
74
292
  });
75
293
  export {
76
- I as default
294
+ _sfc_main as default
77
295
  };