@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,15 +1,215 @@
1
- import { defineComponent as d, openBlock as c, createElementBlock as b, mergeProps as g, unref as e } from "vue";
2
- var o = /* @__PURE__ */ ((t) => (t.left = "left", t.right = "right", t.top = "top", t.bottom = "bottom", t))(o || {}), s = /* @__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))(s || {}), a = /* @__PURE__ */ ((t) => (t.before = "before", t.after = "after", t))(a || {});
3
- const m = {
1
+ import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, mergeProps } 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
- a.before;
10
- o.bottom;
11
- const v = {
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 VvProgressProps = {
212
+ ...ModifiersProps,
13
213
  /**
14
214
  * Progress value
15
215
  * This attribute specifies how much of the task that has been completed.
@@ -35,27 +235,58 @@ const v = {
35
235
  */
36
236
  label: {
37
237
  type: String,
38
- required: !0
238
+ required: true
39
239
  }
40
- }, y = {
240
+ };
241
+ function useModifiers(prefix, modifiers, others) {
242
+ return computed(() => {
243
+ const toReturn = {
244
+ [prefix]: true
245
+ };
246
+ const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
247
+ if (modifiersArray) {
248
+ if (Array.isArray(modifiersArray)) {
249
+ modifiersArray.forEach((modifier) => {
250
+ if (modifier) {
251
+ toReturn[`${prefix}--${modifier}`] = true;
252
+ }
253
+ });
254
+ }
255
+ }
256
+ if (others) {
257
+ Object.keys(others.value).forEach((key) => {
258
+ toReturn[`${prefix}--${key}`] = unref(others.value[key]);
259
+ });
260
+ }
261
+ return toReturn;
262
+ });
263
+ }
264
+ const __default__ = {
41
265
  name: "VvProgress"
42
- }, j = /* @__PURE__ */ d({
43
- ...y,
44
- props: v,
45
- setup(t) {
46
- const r = t, { value: n, max: l, label: i } = toRefs(r), u = computed(() => r.value === void 0), { modifiers: f } = toRefs(r), p = useBemModifiers(
266
+ };
267
+ const _sfc_main = /* @__PURE__ */ defineComponent({
268
+ ...__default__,
269
+ props: VvProgressProps,
270
+ setup(__props) {
271
+ const props = __props;
272
+ const { value, max, label: ariaLabel } = toRefs(props);
273
+ const indeterminate = computed(() => props.value === void 0);
274
+ const { modifiers } = toRefs(props);
275
+ const bemCssClasses = useModifiers(
47
276
  "vv-progress",
48
- f,
49
- computed(() => ({ indeterminate: u.value }))
277
+ modifiers,
278
+ computed(() => ({ indeterminate: indeterminate.value }))
50
279
  );
51
- return (B, S) => (c(), b("progress", g({ role: "progressbar" }, {
52
- class: e(p),
53
- ariaLabel: e(i),
54
- max: e(l),
55
- value: e(n)
56
- }), null, 16));
280
+ return (_ctx, _cache) => {
281
+ return openBlock(), createElementBlock("progress", mergeProps({ role: "progressbar" }, {
282
+ class: unref(bemCssClasses),
283
+ ariaLabel: unref(ariaLabel),
284
+ max: unref(max),
285
+ value: unref(value)
286
+ }), null, 16);
287
+ };
57
288
  }
58
289
  });
59
290
  export {
60
- j as default
291
+ _sfc_main as default
61
292
  };
@@ -1 +1 @@
1
- (function(t,r){typeof exports=="object"&&typeof module<"u"?module.exports=r(require("vue")):typeof define=="function"&&define.amd?define(["vue"],r):(t=typeof globalThis<"u"?globalThis:t||self,t.VvProgress=r(t.vue))})(this,function(t){"use strict";var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),s=(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))(s||{}),o=(e=>(e.before="before",e.after="after",e))(o||{});const a={modifiers:[String,Array]};o.before,r.bottom;const i={...a,value:{type:[Number,String],default:void 0},max:{type:[Number,String]},label:{type:String,required:!0}},f={name:"VvProgress"};return t.defineComponent({...f,props:i,setup(e){const n=e,{value:u,max:l,label:d}=toRefs(n),p=computed(()=>n.value===void 0),{modifiers:c}=toRefs(n),b=useBemModifiers("vv-progress",c,computed(()=>({indeterminate:p.value})));return(g,y)=>(t.openBlock(),t.createElementBlock("progress",t.mergeProps({role:"progressbar"},{class:t.unref(b),ariaLabel:t.unref(d),max:t.unref(l),value:t.unref(u)}),null,16))}})});
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).VvProgress=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||{}),r=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(r||{});Boolean,Boolean,Boolean;const n={modifiers:[String,Array]};t.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,r.button;const l={...n,value:{type:[Number,String],default:void 0},max:{type:[Number,String]},label:{type:String,required:!0}};return e.defineComponent({name:"VvProgress",props:l,setup(o){const t=o,{value:r,max:n,label:l}=e.toRefs(t),u=e.computed((()=>void 0===t.value)),{modifiers:a}=e.toRefs(t),s=function(o,t,r){return e.computed((()=>{const n={[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&&(n[`${o}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((t=>{n[`${o}--${t}`]=e.unref(r.value[t])})),n}))}("vv-progress",a,e.computed((()=>({indeterminate:u.value}))));return(o,t)=>(e.openBlock(),e.createElementBlock("progress",e.mergeProps({role:"progressbar"},{class:e.unref(s),ariaLabel:e.unref(l),max:e.unref(n),value:e.unref(r)}),null,16))}})}));
@@ -10,7 +10,7 @@ declare const _default: import("vue").DefineComponent<{
10
10
  type: StringConstructor;
11
11
  required: boolean;
12
12
  };
13
- modifiers: import("vue").PropType<string | string[]>;
13
+ modifiers: globalThis.PropType<string | string[]>;
14
14
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
15
  value: {
16
16
  type: (StringConstructor | NumberConstructor)[];
@@ -23,7 +23,7 @@ declare const _default: import("vue").DefineComponent<{
23
23
  type: StringConstructor;
24
24
  required: boolean;
25
25
  };
26
- modifiers: import("vue").PropType<string | string[]>;
26
+ modifiers: globalThis.PropType<string | string[]>;
27
27
  }>>, {
28
28
  value: string | number;
29
29
  }>;
@@ -26,5 +26,5 @@ export declare const VvProgressProps: {
26
26
  type: StringConstructor;
27
27
  required: boolean;
28
28
  };
29
- modifiers: import("vue").PropType<string | string[]>;
29
+ modifiers: globalThis.PropType<string | string[]>;
30
30
  };