@volverjs/ui-vue 0.0.4 → 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 (204) 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 +266 -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 +203 -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 +237 -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 +636 -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 +251 -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 +552 -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 +651 -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 +1532 -983
  44. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  45. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +125 -51
  46. package/dist/components/VvCombobox/index.d.ts +36 -10
  47. package/dist/components/VvDialog/VvDialog.es.js +377 -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 +440 -244
  52. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  53. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +113 -41
  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 +35 -11
  57. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +363 -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 +275 -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 +974 -460
  70. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  71. package/dist/components/VvInputText/VvInputText.vue.d.ts +96 -16
  72. package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
  73. package/dist/components/VvInputText/index.d.ts +64 -11
  74. package/dist/components/VvProgress/VvProgress.es.js +206 -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 +489 -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 +588 -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 +621 -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 +664 -353
  91. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  92. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +10 -10
  93. package/dist/components/VvTextarea/index.d.ts +2 -2
  94. package/dist/components/VvTooltip/VvTooltip.es.js +205 -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 +3508 -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.es.js +215 -55
  114. package/dist/directives/index.umd.js +1 -1
  115. package/dist/directives/v-tooltip.es.js +212 -53
  116. package/dist/directives/v-tooltip.umd.js +1 -1
  117. package/dist/icons.es.js +38 -23
  118. package/dist/icons.umd.js +1 -1
  119. package/dist/index.d.ts +0 -1
  120. package/dist/index.es.js +112 -3607
  121. package/dist/index.umd.js +1 -1
  122. package/dist/props/index.d.ts +40 -16
  123. package/dist/resolvers/unplugin.d.ts +7 -1
  124. package/dist/resolvers/unplugin.es.js +77 -37
  125. package/dist/resolvers/unplugin.umd.js +1 -1
  126. package/dist/stories/InputText/InputText.settings.d.ts +53 -0
  127. package/dist/stories/argTypes.d.ts +1 -1
  128. package/package.json +114 -36
  129. package/src/Volver.ts +49 -22
  130. package/src/assets/icons/detailed.json +1 -1
  131. package/src/assets/icons/normal.json +1 -1
  132. package/src/assets/icons/simple.json +1 -1
  133. package/src/components/VvAccordion/VvAccordion.vue +19 -22
  134. package/src/components/VvAccordion/index.ts +12 -4
  135. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +19 -10
  136. package/src/components/VvAccordionGroup/index.ts +8 -0
  137. package/src/components/VvAction/VvAction.vue +7 -7
  138. package/src/components/VvAction/index.ts +1 -1
  139. package/src/components/VvBadge/VvBadge.vue +2 -2
  140. package/src/components/VvBadge/index.ts +1 -1
  141. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +3 -3
  142. package/src/components/VvButton/VvButton.vue +11 -11
  143. package/src/components/VvButton/index.ts +10 -9
  144. package/src/components/VvButtonGroup/VvButtonGroup.vue +4 -7
  145. package/src/components/VvButtonGroup/index.ts +1 -1
  146. package/src/components/VvCard/VvCard.vue +2 -2
  147. package/src/components/VvCheckbox/VvCheckbox.vue +3 -7
  148. package/src/components/VvCheckbox/index.ts +11 -7
  149. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +7 -10
  150. package/src/components/VvCheckboxGroup/index.ts +1 -1
  151. package/src/components/VvCombobox/VvCombobox.vue +39 -23
  152. package/src/components/VvCombobox/index.ts +1 -1
  153. package/src/components/VvDialog/VvDialog.vue +28 -11
  154. package/src/components/VvDialog/index.ts +5 -2
  155. package/src/components/VvDropdown/VvDropdown.vue +6 -5
  156. package/src/components/VvDropdown/VvDropdownAction.vue +7 -5
  157. package/src/components/VvDropdown/VvDropdownOption.vue +17 -10
  158. package/src/components/VvDropdown/index.ts +3 -3
  159. package/src/components/VvIcon/VvIcon.vue +3 -3
  160. package/src/components/VvIcon/index.ts +3 -3
  161. package/src/components/VvInputText/VvInputClearAction.ts +2 -2
  162. package/src/components/VvInputText/VvInputPasswordAction.ts +3 -4
  163. package/src/components/VvInputText/VvInputStepAction.ts +3 -2
  164. package/src/components/VvInputText/VvInputText.vue +128 -35
  165. package/src/components/VvInputText/VvInputTextActions.ts +5 -8
  166. package/src/components/VvInputText/index.ts +62 -1
  167. package/src/components/VvProgress/VvProgress.vue +2 -2
  168. package/src/components/VvProgress/index.ts +1 -1
  169. package/src/components/VvRadio/VvRadio.vue +3 -7
  170. package/src/components/VvRadio/index.ts +11 -7
  171. package/src/components/VvRadioGroup/VvRadioGroup.vue +7 -10
  172. package/src/components/VvRadioGroup/index.ts +1 -1
  173. package/src/components/VvSelect/VvSelect.vue +4 -4
  174. package/src/components/VvSelect/index.ts +1 -1
  175. package/src/components/VvTextarea/VvTextarea.vue +4 -4
  176. package/src/components/VvTextarea/index.ts +1 -1
  177. package/src/components/VvTooltip/VvTooltip.vue +2 -2
  178. package/src/components/VvTooltip/index.ts +3 -3
  179. package/src/composables/dropdown/useInjectDropdown.ts +2 -2
  180. package/src/composables/dropdown/useProvideDropdown.ts +2 -2
  181. package/src/composables/group/useInjectedGroupState.ts +1 -1
  182. package/src/composables/group/useProvideGroupState.ts +1 -1
  183. package/src/composables/useComponentIcon.ts +1 -1
  184. package/src/composables/useDebouncedInput.ts +10 -3
  185. package/src/composables/useDefaults.ts +89 -0
  186. package/src/composables/useModifiers.ts +4 -2
  187. package/src/composables/useOptions.ts +1 -1
  188. package/src/composables/useVolver.ts +2 -2
  189. package/src/directives/index.ts +1 -1
  190. package/src/directives/v-tooltip.ts +2 -2
  191. package/src/index.ts +0 -2
  192. package/src/props/index.ts +8 -8
  193. package/src/resolvers/unplugin.ts +15 -1
  194. package/src/stories/Accordion/Accordion.stories.mdx +8 -2
  195. package/src/stories/Accordion/Accordion.test.ts +21 -15
  196. package/src/stories/Accordion/AccordionSlots.stories.mdx +8 -8
  197. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +17 -1
  198. package/src/stories/AccordionGroup/AccordionGroup.test.ts +18 -12
  199. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +1 -1
  200. package/src/stories/InputText/InputText.settings.ts +53 -0
  201. package/src/stories/InputText/InputText.stories.mdx +40 -0
  202. package/src/stories/InputText/InputText.test.ts +5 -2
  203. package/src/stories/argTypes.ts +2 -2
  204. package/src/types/group.d.ts +5 -0
@@ -1,6 +1,41 @@
1
- import { computed as l, unref as s, defineComponent as g, toRefs as b, openBlock as y, createElementBlock as m, mergeProps as S } from "vue";
2
- var u = /* @__PURE__ */ ((t) => (t.left = "left", t.right = "right", t.top = "top", t.bottom = "bottom", t))(u || {}), c = /* @__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))(c || {}), p = /* @__PURE__ */ ((t) => (t.before = "before", t.after = "after", t))(p || {}), i = /* @__PURE__ */ ((t) => (t.button = "button", t.submit = "submit", t.reset = "reset", t))(i || {}), f = /* @__PURE__ */ ((t) => (t._blank = "_blank", t._self = "_self", t._parent = "_parent", t._top = "_top", t))(f || {});
3
- const _ = {
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 = {
4
39
  /**
5
40
  * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
6
41
  * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
@@ -17,7 +52,7 @@ const _ = {
17
52
  */
18
53
  target: {
19
54
  type: String,
20
- validator: (t) => Object.values(f).includes(t)
55
+ validator: (value) => Object.values(AnchorTarget).includes(value)
21
56
  },
22
57
  /**
23
58
  * Anchor rel
@@ -26,47 +61,155 @@ const _ = {
26
61
  type: String,
27
62
  default: "noopener noreferrer"
28
63
  }
29
- }, j = {
64
+ };
65
+ const DisabledProps = {
30
66
  /**
31
67
  * Whether the form control is disabled
32
68
  */
33
69
  disabled: Boolean
34
- }, O = {
70
+ };
71
+ const ActiveProps = {
35
72
  /**
36
73
  * Whether the item is active
37
74
  */
38
75
  active: Boolean
39
- }, B = {
76
+ };
77
+ const PressedProps = {
40
78
  /**
41
79
  * Whether the item is pressed
42
80
  */
43
81
  pressed: Boolean
44
- }, h = {
82
+ };
83
+ const LabelProps = {
45
84
  /**
46
85
  * The item label
47
86
  */
48
87
  label: [String, Number]
49
- }, E = {
88
+ };
89
+ const ModifiersProps = {
50
90
  /**
51
91
  * Component BEM modifiers
52
92
  */
53
93
  modifiers: [String, Array]
54
94
  };
55
- p.before;
56
- u.bottom;
57
95
  ({
58
- ...j,
59
- ...h,
60
- ...B,
61
- ...O,
62
- ..._,
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,
63
202
  /**
64
203
  * Button type
65
204
  */
66
- type: i.button
205
+ type: {
206
+ type: String,
207
+ default: ButtonType.button,
208
+ validator: (value) => Object.values(ButtonType).includes(value)
209
+ }
67
210
  });
68
- const k = {
69
- ...E,
211
+ const VvProgressProps = {
212
+ ...ModifiersProps,
70
213
  /**
71
214
  * Progress value
72
215
  * This attribute specifies how much of the task that has been completed.
@@ -92,40 +235,58 @@ const k = {
92
235
  */
93
236
  label: {
94
237
  type: String,
95
- required: !0
238
+ required: true
96
239
  }
97
240
  };
98
- function N(t, e, o) {
99
- return l(() => {
100
- const a = {
101
- [t]: !0
102
- }, n = typeof (e == null ? void 0 : e.value) == "string" ? e.value.split(" ") : e == null ? void 0 : e.value;
103
- return n && Array.isArray(n) && n.forEach((r) => {
104
- a[`${t}--${r}`] = !0;
105
- }), o && Object.keys(o.value).forEach((r) => {
106
- a[`${t}--${r}`] = s(o.value[r]);
107
- }), a;
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;
108
262
  });
109
263
  }
110
- const P = {
264
+ const __default__ = {
111
265
  name: "VvProgress"
112
- }, x = /* @__PURE__ */ g({
113
- ...P,
114
- props: k,
115
- setup(t) {
116
- const e = t, { value: o, max: a, label: n } = b(e), r = l(() => e.value === void 0), { modifiers: d } = b(e), v = N(
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(
117
276
  "vv-progress",
118
- d,
119
- l(() => ({ indeterminate: r.value }))
277
+ modifiers,
278
+ computed(() => ({ indeterminate: indeterminate.value }))
120
279
  );
121
- return (C, L) => (y(), m("progress", S({ role: "progressbar" }, {
122
- class: s(v),
123
- ariaLabel: s(n),
124
- max: s(a),
125
- value: s(o)
126
- }), 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
+ };
127
288
  }
128
289
  });
129
290
  export {
130
- x as default
291
+ _sfc_main as default
131
292
  };
@@ -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.VvProgress=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||{}),p=(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))(p||{}),u=(t=>(t.before="before",t.after="after",t))(u||{}),i=(t=>(t.button="button",t.submit="submit",t.reset="reset",t))(i||{}),f=(t=>(t._blank="_blank",t._self="_self",t._parent="_parent",t._top="_top",t))(f||{});const d={to:{type:[String,Object]},href:String,target:{type:String,validator:t=>Object.values(f).includes(t)},rel:{type:String,default:"noopener noreferrer"}},c={disabled:Boolean},b={active:Boolean},g={pressed:Boolean},y={label:[String,Number]},v={modifiers:[String,Array]};u.before,o.bottom,{...c,...y,...g,...b,...d,type:i.button};const m={...v,value:{type:[Number,String],default:void 0},max:{type:[Number,String]},label:{type:String,required:!0}};function _(t,r,a){return e.computed(()=>{const s={[t]:!0},l=typeof(r==null?void 0:r.value)=="string"?r.value.split(" "):r==null?void 0:r.value;return l&&Array.isArray(l)&&l.forEach(n=>{s[`${t}--${n}`]=!0}),a&&Object.keys(a.value).forEach(n=>{s[`${t}--${n}`]=e.unref(a.value[n])}),s})}const S={name:"VvProgress"};return e.defineComponent({...S,props:m,setup(t){const r=t,{value:a,max:s,label:l}=e.toRefs(r),n=e.computed(()=>r.value===void 0),{modifiers:j}=e.toRefs(r),O=_("vv-progress",j,e.computed(()=>({indeterminate:n.value})));return(h,E)=>(e.openBlock(),e.createElementBlock("progress",e.mergeProps({role:"progressbar"},{class:e.unref(O),ariaLabel:e.unref(l),max:e.unref(s),value:e.unref(a)}),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
  };