@volverjs/ui-vue 0.0.10-beta.2 → 0.0.10-beta.20

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 (251) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +98 -3
  3. package/auto-imports.d.ts +6 -2
  4. package/bin/icons.cjs +1 -1
  5. package/bin/icons.js +23 -16
  6. package/dist/Volver.d.ts +1 -1
  7. package/dist/components/VvAccordion/VvAccordion.es.js +67 -13
  8. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  9. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +13 -6
  10. package/dist/components/VvAccordion/index.d.ts +4 -1
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +111 -37
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  13. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -8
  14. package/dist/components/VvAccordionGroup/index.d.ts +4 -1
  15. package/dist/components/VvAction/VvAction.es.js +56 -12
  16. package/dist/components/VvAction/VvAction.umd.js +1 -1
  17. package/dist/components/VvAction/VvAction.vue.d.ts +59 -12
  18. package/dist/components/VvAction/index.d.ts +25 -4
  19. package/dist/components/VvAlert/VvAlert.es.js +188 -152
  20. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  21. package/dist/components/VvAlert/VvAlert.vue.d.ts +18 -8
  22. package/dist/components/VvAlert/index.d.ts +9 -5
  23. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +230 -174
  24. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  25. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +13 -6
  26. package/dist/components/VvAlertGroup/index.d.ts +6 -2
  27. package/dist/components/VvAvatar/VvAvatar.es.js +54 -9
  28. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  29. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +12 -4
  30. package/dist/components/VvAvatar/index.d.ts +4 -1
  31. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +111 -36
  32. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  33. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +10 -3
  34. package/dist/components/VvAvatarGroup/index.d.ts +4 -1
  35. package/dist/components/VvBadge/VvBadge.es.js +71 -16
  36. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  37. package/dist/components/VvBadge/VvBadge.vue.d.ts +12 -4
  38. package/dist/components/VvBadge/index.d.ts +4 -1
  39. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +257 -49
  40. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  41. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +27 -7
  42. package/dist/components/VvBreadcrumb/index.d.ts +6 -10
  43. package/dist/components/VvButton/VvButton.es.js +165 -137
  44. package/dist/components/VvButton/VvButton.umd.js +1 -1
  45. package/dist/components/VvButton/VvButton.vue.d.ts +101 -27
  46. package/dist/components/VvButton/index.d.ts +41 -14
  47. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +67 -15
  48. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  49. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +23 -10
  50. package/dist/components/VvButtonGroup/index.d.ts +8 -2
  51. package/dist/components/VvCard/VvCard.es.js +79 -24
  52. package/dist/components/VvCard/VvCard.umd.js +1 -1
  53. package/dist/components/VvCard/VvCard.vue.d.ts +12 -4
  54. package/dist/components/VvCard/index.d.ts +4 -1
  55. package/dist/components/VvCheckbox/VvCheckbox.es.js +89 -21
  56. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  57. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +104 -32
  58. package/dist/components/VvCheckbox/index.d.ts +45 -12
  59. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +168 -66
  60. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  61. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +100 -29
  62. package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
  63. package/dist/components/VvCombobox/VvCombobox.es.js +721 -527
  64. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  65. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +145 -72
  66. package/dist/components/VvCombobox/index.d.ts +53 -22
  67. package/dist/components/VvDialog/VvDialog.es.js +133 -141
  68. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  69. package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
  70. package/dist/components/VvDropdown/VvDropdown.es.js +121 -55
  71. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  72. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +61 -35
  73. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +72 -11
  74. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
  75. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
  76. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +26 -7
  77. package/dist/components/VvDropdown/index.d.ts +16 -11
  78. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +80 -21
  79. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  80. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
  81. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +56 -8
  82. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  83. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +76 -17
  84. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  85. package/dist/components/VvIcon/VvIcon.es.js +23 -96
  86. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  87. package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
  88. package/dist/components/VvIcon/index.d.ts +21 -48
  89. package/dist/components/VvInputFile/VvInputFile.es.js +1558 -0
  90. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
  91. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +190 -0
  92. package/dist/components/VvInputFile/index.d.ts +74 -0
  93. package/dist/components/VvInputText/VvInputClearAction.d.ts +2 -2
  94. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +1 -1
  95. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  96. package/dist/components/VvInputText/VvInputText.es.js +266 -242
  97. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  98. package/dist/components/VvInputText/VvInputText.vue.d.ts +153 -46
  99. package/dist/components/VvInputText/index.d.ts +69 -18
  100. package/dist/components/VvNav/VvNav.es.js +150 -73
  101. package/dist/components/VvNav/VvNav.umd.js +1 -1
  102. package/dist/components/VvNav/VvNav.vue.d.ts +41 -14
  103. package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
  104. package/dist/components/VvNav/{VvNavSeparator.d.ts → VvNavSeparator.vue.d.ts} +1 -1
  105. package/dist/components/VvNav/index.d.ts +5 -13
  106. package/dist/components/VvNavItem/VvNavItem.es.js +435 -0
  107. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
  108. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
  109. package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
  110. package/dist/components/VvProgress/VvProgress.es.js +65 -14
  111. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  112. package/dist/components/VvProgress/VvProgress.vue.d.ts +10 -3
  113. package/dist/components/VvProgress/index.d.ts +4 -1
  114. package/dist/components/VvRadio/VvRadio.es.js +89 -21
  115. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  116. package/dist/components/VvRadio/VvRadio.vue.d.ts +102 -30
  117. package/dist/components/VvRadio/index.d.ts +44 -11
  118. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +168 -66
  119. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  120. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +100 -29
  121. package/dist/components/VvRadioGroup/index.d.ts +45 -12
  122. package/dist/components/VvSelect/VvSelect.es.js +244 -226
  123. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  124. package/dist/components/VvSelect/VvSelect.vue.d.ts +112 -39
  125. package/dist/components/VvSelect/index.d.ts +48 -14
  126. package/dist/components/VvTab/VvTab.es.js +251 -110
  127. package/dist/components/VvTab/VvTab.umd.js +1 -1
  128. package/dist/components/VvTab/VvTab.vue.d.ts +50 -13
  129. package/dist/components/VvTab/index.d.ts +13 -4
  130. package/dist/components/VvTextarea/VvTextarea.es.js +225 -212
  131. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  132. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +155 -48
  133. package/dist/components/VvTextarea/index.d.ts +68 -19
  134. package/dist/components/VvTooltip/VvTooltip.es.js +72 -17
  135. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  136. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +10 -3
  137. package/dist/components/VvTooltip/index.d.ts +4 -1
  138. package/dist/components/index.d.ts +10 -0
  139. package/dist/components/index.es.js +2635 -1301
  140. package/dist/components/index.umd.js +1 -1
  141. package/dist/composables/alert/useAlert.d.ts +37 -4
  142. package/dist/composables/dropdown/useProvideDropdown.d.ts +1 -1
  143. package/dist/composables/index.d.ts +1 -0
  144. package/dist/composables/index.es.js +88 -1
  145. package/dist/composables/index.umd.js +1 -1
  146. package/dist/composables/useBlurhash.d.ts +7 -0
  147. package/dist/composables/useComponentIcon.d.ts +9 -8
  148. package/dist/composables/useVolver.d.ts +1 -1
  149. package/dist/directives/index.d.ts +3 -5
  150. package/dist/directives/index.es.js +92 -31
  151. package/dist/directives/index.umd.js +1 -1
  152. package/dist/directives/v-tooltip.es.js +90 -26
  153. package/dist/directives/v-tooltip.umd.js +1 -1
  154. package/dist/icons.es.js +6 -6
  155. package/dist/icons.umd.js +1 -1
  156. package/dist/index.d.ts +3 -1
  157. package/dist/index.es.js +81 -16
  158. package/dist/index.umd.js +1 -1
  159. package/dist/props/index.d.ts +287 -73
  160. package/dist/resolvers/unplugin.d.ts +6 -1
  161. package/dist/resolvers/unplugin.es.js +78 -10
  162. package/dist/resolvers/unplugin.umd.js +1 -1
  163. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +72 -84
  164. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +623 -461
  165. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
  166. package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
  167. package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
  168. package/dist/stories/Icon/Icon.settings.d.ts +1 -0
  169. package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
  170. package/dist/stories/InputFile/InputFile.stories.d.ts +13 -0
  171. package/dist/stories/InputFile/InputFileModifiers.stories.d.ts +9 -0
  172. package/dist/stories/InputFile/InputFileSlots.stories.d.ts +6 -0
  173. package/dist/stories/Tab/Tab.settings.d.ts +4 -37
  174. package/dist/types/alert.d.ts +13 -0
  175. package/dist/types/blurhash.d.ts +12 -0
  176. package/dist/types/floating-ui.d.ts +6 -0
  177. package/dist/types/generic.d.ts +4 -0
  178. package/dist/types/group.d.ts +37 -0
  179. package/dist/types/index.d.ts +7 -0
  180. package/dist/types/input-file.d.ts +14 -0
  181. package/dist/types/nav.d.ts +18 -0
  182. package/dist/utils/ObjectUtilities.d.ts +0 -1
  183. package/dist/workers/blurhash.d.ts +1 -0
  184. package/package.json +91 -74
  185. package/src/Volver.ts +31 -20
  186. package/src/assets/icons/detailed.json +1 -1
  187. package/src/assets/icons/normal.json +1 -1
  188. package/src/assets/icons/simple.json +1 -1
  189. package/src/components/VvAccordion/VvAccordion.vue +2 -2
  190. package/src/components/VvAction/VvAction.vue +5 -2
  191. package/src/components/VvAlert/index.ts +1 -3
  192. package/src/components/VvAlertGroup/index.ts +2 -1
  193. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
  194. package/src/components/VvBreadcrumb/index.ts +2 -8
  195. package/src/components/VvButton/VvButton.vue +6 -6
  196. package/src/components/VvButton/index.ts +2 -4
  197. package/src/components/VvCombobox/VvCombobox.vue +24 -16
  198. package/src/components/VvCombobox/index.ts +4 -0
  199. package/src/components/VvIcon/VvIcon.vue +2 -2
  200. package/src/components/VvIcon/index.ts +22 -48
  201. package/src/components/VvInputFile/VvInputFile.vue +302 -0
  202. package/src/components/VvInputFile/index.ts +38 -0
  203. package/src/components/VvInputText/VvInputText.vue +13 -14
  204. package/src/components/VvNav/VvNav.vue +30 -50
  205. package/src/components/VvNav/VvNavItem.vue +18 -0
  206. package/src/components/VvNav/VvNavSeparator.vue +11 -0
  207. package/src/components/VvNav/index.ts +2 -15
  208. package/src/components/VvSelect/VvSelect.vue +5 -8
  209. package/src/components/VvTab/VvTab.vue +63 -35
  210. package/src/components/VvTab/index.ts +10 -4
  211. package/src/components/VvTextarea/VvTextarea.vue +6 -9
  212. package/src/components/index.ts +10 -0
  213. package/src/composables/index.ts +1 -0
  214. package/src/composables/useBlurhash.ts +76 -0
  215. package/src/composables/useComponentIcon.ts +15 -14
  216. package/src/composables/useUniqueId.ts +2 -2
  217. package/src/directives/index.ts +3 -6
  218. package/src/directives/v-tooltip.ts +19 -10
  219. package/src/index.ts +3 -1
  220. package/src/props/index.ts +115 -27
  221. package/src/resolvers/unplugin.ts +24 -14
  222. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
  223. package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
  224. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  225. package/src/stories/Icon/Icon.settings.ts +3 -3
  226. package/src/stories/InputFile/InputFile.settings.ts +36 -0
  227. package/src/stories/InputFile/InputFile.stories.ts +98 -0
  228. package/src/stories/InputFile/InputFileModifiers.stories.ts +51 -0
  229. package/src/stories/InputFile/InputFileSlots.stories.ts +25 -0
  230. package/src/stories/Nav/Nav.settings.ts +3 -4
  231. package/src/stories/Nav/Nav.test.ts +4 -15
  232. package/src/stories/Tab/Tab.settings.ts +9 -9
  233. package/src/stories/Tab/Tab.stories.ts +2 -2
  234. package/src/stories/Tab/Tab.test.ts +6 -14
  235. package/src/stories/argTypes.ts +1 -1
  236. package/src/types/blurhash.ts +21 -0
  237. package/src/types/generic.ts +6 -0
  238. package/src/types/index.ts +7 -0
  239. package/src/types/input-file.ts +16 -0
  240. package/src/types/nav.ts +20 -0
  241. package/src/utils/ObjectUtilities.ts +0 -11
  242. package/src/workers/blurhash.ts +9 -0
  243. package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
  244. package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
  245. package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
  246. package/src/components/VvNav/VvNavItemTitle.vue +0 -11
  247. package/src/components/VvNav/VvNavSeparator.ts +0 -8
  248. package/src/types/generic.d.ts +0 -6
  249. /package/src/types/{alert.d.ts → alert.ts} +0 -0
  250. /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
  251. /package/src/types/{group.d.ts → group.ts} +0 -0
@@ -33,6 +33,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
33
33
  ButtonType2["reset"] = "reset";
34
34
  return ButtonType2;
35
35
  })(ButtonType || {});
36
+ var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
37
+ ActionTag2["nuxtLink"] = "nuxt-link";
38
+ ActionTag2["routerLink"] = "router-link";
39
+ ActionTag2["a"] = "a";
40
+ ActionTag2["button"] = "button";
41
+ return ActionTag2;
42
+ })(ActionTag || {});
36
43
  var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
37
44
  AnchorTarget2["_blank"] = "_blank";
38
45
  AnchorTarget2["_self"] = "_self";
@@ -57,6 +64,7 @@ const LinkProps = {
57
64
  */
58
65
  target: {
59
66
  type: String,
67
+ default: void 0,
60
68
  validator: (value) => Object.values(AnchorTarget).includes(value)
61
69
  },
62
70
  /**
@@ -71,38 +79,65 @@ const DisabledProps = {
71
79
  /**
72
80
  * Whether the form control is disabled
73
81
  */
74
- disabled: Boolean
82
+ disabled: {
83
+ type: Boolean,
84
+ default: false
85
+ }
75
86
  };
76
87
  const ActiveProps = {
77
88
  /**
78
89
  * Whether the item is active
79
90
  */
80
- active: Boolean
91
+ active: {
92
+ type: Boolean,
93
+ default: false
94
+ }
95
+ };
96
+ const CurrentProps = {
97
+ /**
98
+ * Whether the item is current
99
+ */
100
+ current: {
101
+ type: Boolean,
102
+ default: false
103
+ }
81
104
  };
82
105
  const PressedProps = {
83
106
  /**
84
107
  * Whether the item is pressed
85
108
  */
86
- pressed: Boolean
109
+ pressed: {
110
+ type: Boolean,
111
+ default: false
112
+ }
87
113
  };
88
114
  const LabelProps = {
89
115
  /**
90
116
  * The item label
91
117
  */
92
- label: [String, Number]
118
+ label: {
119
+ type: [String, Number],
120
+ default: void 0
121
+ }
93
122
  };
94
123
  const ModifiersProps = {
95
124
  /**
96
125
  * Component BEM modifiers
97
126
  */
98
- modifiers: [String, Array]
127
+ modifiers: {
128
+ type: [String, Array],
129
+ default: void 0
130
+ }
99
131
  };
100
132
  ({
101
133
  /**
102
134
  * VvIcon name or props
103
135
  * @see VVIcon
104
136
  */
105
- icon: { type: [String, Object] },
137
+ icon: {
138
+ type: [String, Object],
139
+ default: void 0
140
+ },
106
141
  /**
107
142
  * VvIcon position
108
143
  */
@@ -133,7 +168,8 @@ const ModifiersProps = {
133
168
  * Dropdown show / hide transition name
134
169
  */
135
170
  transitionName: {
136
- type: String
171
+ type: String,
172
+ default: void 0
137
173
  },
138
174
  /**
139
175
  * Offset of the dropdown from the trigger
@@ -201,7 +237,8 @@ const ModifiersProps = {
201
237
  * Set dropdown width to the same as the trigger
202
238
  */
203
239
  triggerWidth: {
204
- type: Boolean
240
+ type: Boolean,
241
+ default: false
205
242
  }
206
243
  });
207
244
  ({
@@ -209,6 +246,7 @@ const ModifiersProps = {
209
246
  ...LabelProps,
210
247
  ...PressedProps,
211
248
  ...ActiveProps,
249
+ ...CurrentProps,
212
250
  ...LinkProps,
213
251
  /**
214
252
  * Button type
@@ -224,6 +262,13 @@ const ModifiersProps = {
224
262
  ariaLabel: {
225
263
  type: String,
226
264
  default: void 0
265
+ },
266
+ /**
267
+ * Default tag for the action
268
+ */
269
+ defaultTag: {
270
+ type: String,
271
+ default: ActionTag.button
227
272
  }
228
273
  });
229
274
  const VvAvatarProps = {
@@ -276,7 +321,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
276
321
  key: 0,
277
322
  src: _ctx.imgSrc,
278
323
  alt: "avatar"
279
- }, null, 8, _hoisted_2)) : createCommentVNode("", true)
324
+ }, null, 8, _hoisted_2)) : createCommentVNode("v-if", true)
280
325
  ])
281
326
  ], 10, _hoisted_1);
282
327
  };
@@ -1 +1 @@
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).VvAvatar=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 a={...n,imgSrc:String};const l=["role","aria-label"],i=["src"];return e.defineComponent({__name:"VvAvatar",props:a,setup(o){const t=o,{modifiers:r}=e.toRefs(t),n=function(o,t,r){return e.computed((()=>{const n={[o]:!0},a="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(n[`${o}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((t=>{n[`${o}--${t}`]=e.unref(r.value[t])})),n}))}("vv-avatar",r);return(o,t)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(n)),role:o.imgSrc?void 0:"img","aria-label":o.imgSrc?void 0:"avatar"},[e.renderSlot(o.$slots,"default",{},(()=>[o.imgSrc?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.imgSrc,alt:"avatar"},null,8,i)):e.createCommentVNode("",!0)]))],10,l))}})}));
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).VvAvatar=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||{}),r=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(r||{});Boolean,Boolean,Boolean,Boolean;const a={modifiers:{type:[String,Array],default:void 0}};t.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,n.button,r.button;const l={...a,imgSrc:String};const i=["role","aria-label"],u=["src"];return e.defineComponent({__name:"VvAvatar",props:l,setup(o){const t=o,{modifiers:n}=e.toRefs(t),r=function(o,t,n){return e.computed((()=>{const r={[o]:!0},a="string"==typeof(null==t?void 0:t.value)?t.value.split(" "):null==t?void 0:t.value;return a&&Array.isArray(a)&&a.forEach((e=>{e&&(r[`${o}--${e}`]=!0)})),n&&Object.keys(n.value).forEach((t=>{r[`${o}--${t}`]=e.unref(n.value[t])})),r}))}("vv-avatar",n);return(o,t)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(r)),role:o.imgSrc?void 0:"img","aria-label":o.imgSrc?void 0:"avatar"},[e.renderSlot(o.$slots,"default",{},(()=>[o.imgSrc?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.imgSrc,alt:"avatar"},null,8,u)):e.createCommentVNode("v-if",!0)]))],10,i))}})}));
@@ -1,10 +1,18 @@
1
1
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
2
2
  imgSrc: StringConstructor;
3
- modifiers: globalThis.PropType<string | string[]>;
4
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3
+ modifiers: {
4
+ type: globalThis.PropType<string | string[]>;
5
+ default: undefined;
6
+ };
7
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
5
8
  imgSrc: StringConstructor;
6
- modifiers: globalThis.PropType<string | string[]>;
7
- }>>, {}, {}>, {
9
+ modifiers: {
10
+ type: globalThis.PropType<string | string[]>;
11
+ default: undefined;
12
+ };
13
+ }>>, {
14
+ modifiers: string | string[];
15
+ }, {}>, {
8
16
  default?(_: {}): any;
9
17
  }>;
10
18
  export default _default;
@@ -3,5 +3,8 @@ export declare const VvAvatarProps: {
3
3
  * Image src for avatar
4
4
  */
5
5
  imgSrc: StringConstructor;
6
- modifiers: globalThis.PropType<string | string[]>;
6
+ modifiers: {
7
+ type: globalThis.PropType<string | string[]>;
8
+ default: undefined;
9
+ };
7
10
  };
@@ -1,5 +1,5 @@
1
1
  import { computed, unref, defineComponent, toRefs, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, Fragment, renderList, createBlock, mergeProps, withCtx, toDisplayString, createTextVNode } from "vue";
2
- import { nanoid } from "nanoid";
2
+ import { uid } from "uid";
3
3
  var Strategy = /* @__PURE__ */ ((Strategy2) => {
4
4
  Strategy2["absolute"] = "absolute";
5
5
  Strategy2["fixed"] = "fixed";
@@ -34,6 +34,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
34
34
  ButtonType2["reset"] = "reset";
35
35
  return ButtonType2;
36
36
  })(ButtonType || {});
37
+ var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
38
+ ActionTag2["nuxtLink"] = "nuxt-link";
39
+ ActionTag2["routerLink"] = "router-link";
40
+ ActionTag2["a"] = "a";
41
+ ActionTag2["button"] = "button";
42
+ return ActionTag2;
43
+ })(ActionTag || {});
37
44
  var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
38
45
  AnchorTarget2["_blank"] = "_blank";
39
46
  AnchorTarget2["_self"] = "_self";
@@ -58,6 +65,7 @@ const LinkProps = {
58
65
  */
59
66
  target: {
60
67
  type: String,
68
+ default: void 0,
61
69
  validator: (value) => Object.values(AnchorTarget).includes(value)
62
70
  },
63
71
  /**
@@ -72,38 +80,65 @@ const DisabledProps = {
72
80
  /**
73
81
  * Whether the form control is disabled
74
82
  */
75
- disabled: Boolean
83
+ disabled: {
84
+ type: Boolean,
85
+ default: false
86
+ }
76
87
  };
77
88
  const ActiveProps = {
78
89
  /**
79
90
  * Whether the item is active
80
91
  */
81
- active: Boolean
92
+ active: {
93
+ type: Boolean,
94
+ default: false
95
+ }
96
+ };
97
+ const CurrentProps = {
98
+ /**
99
+ * Whether the item is current
100
+ */
101
+ current: {
102
+ type: Boolean,
103
+ default: false
104
+ }
82
105
  };
83
106
  const PressedProps = {
84
107
  /**
85
108
  * Whether the item is pressed
86
109
  */
87
- pressed: Boolean
110
+ pressed: {
111
+ type: Boolean,
112
+ default: false
113
+ }
88
114
  };
89
115
  const LabelProps = {
90
116
  /**
91
117
  * The item label
92
118
  */
93
- label: [String, Number]
119
+ label: {
120
+ type: [String, Number],
121
+ default: void 0
122
+ }
94
123
  };
95
124
  const ModifiersProps = {
96
125
  /**
97
126
  * Component BEM modifiers
98
127
  */
99
- modifiers: [String, Array]
128
+ modifiers: {
129
+ type: [String, Array],
130
+ default: void 0
131
+ }
100
132
  };
101
133
  ({
102
134
  /**
103
135
  * VvIcon name or props
104
136
  * @see VVIcon
105
137
  */
106
- icon: { type: [String, Object] },
138
+ icon: {
139
+ type: [String, Object],
140
+ default: void 0
141
+ },
107
142
  /**
108
143
  * VvIcon position
109
144
  */
@@ -134,7 +169,8 @@ const ModifiersProps = {
134
169
  * Dropdown show / hide transition name
135
170
  */
136
171
  transitionName: {
137
- type: String
172
+ type: String,
173
+ default: void 0
138
174
  },
139
175
  /**
140
176
  * Offset of the dropdown from the trigger
@@ -202,7 +238,8 @@ const ModifiersProps = {
202
238
  * Set dropdown width to the same as the trigger
203
239
  */
204
240
  triggerWidth: {
205
- type: Boolean
241
+ type: Boolean,
242
+ default: false
206
243
  }
207
244
  });
208
245
  ({
@@ -210,6 +247,7 @@ const ModifiersProps = {
210
247
  ...LabelProps,
211
248
  ...PressedProps,
212
249
  ...ActiveProps,
250
+ ...CurrentProps,
213
251
  ...LinkProps,
214
252
  /**
215
253
  * Button type
@@ -225,6 +263,13 @@ const ModifiersProps = {
225
263
  ariaLabel: {
226
264
  type: String,
227
265
  default: void 0
266
+ },
267
+ /**
268
+ * Default tag for the action
269
+ */
270
+ defaultTag: {
271
+ type: String,
272
+ default: ActionTag.button
228
273
  }
229
274
  });
230
275
  const VvAvatarGroupProps = {
@@ -296,13 +341,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
296
341
  key: 0,
297
342
  src: _ctx.imgSrc,
298
343
  alt: "avatar"
299
- }, null, 8, _hoisted_2)) : createCommentVNode("", true)
344
+ }, null, 8, _hoisted_2)) : createCommentVNode("v-if", true)
300
345
  ])
301
346
  ], 10, _hoisted_1$1);
302
347
  };
303
348
  }
304
349
  });
305
- const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
350
+ const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
306
351
  const _hoisted_1 = { key: 0 };
307
352
  const _sfc_main = /* @__PURE__ */ defineComponent({
308
353
  __name: "VvAvatarGroup",
@@ -335,34 +380,64 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
335
380
  });
336
381
  });
337
382
  return (_ctx, _cache) => {
338
- return openBlock(), createElementBlock("span", {
339
- class: normalizeClass(unref(bemCssClasses))
340
- }, [
341
- renderSlot(_ctx.$slots, "default", {}, () => [
342
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(avatarItems), (avatarItem) => {
343
- return openBlock(), createBlock(_sfc_main$1, mergeProps({
344
- key: avatarItem.key
383
+ return openBlock(), createElementBlock(
384
+ "span",
385
+ {
386
+ class: normalizeClass(unref(bemCssClasses))
387
+ },
388
+ [
389
+ renderSlot(_ctx.$slots, "default", {}, () => [
390
+ (openBlock(true), createElementBlock(
391
+ Fragment,
392
+ null,
393
+ renderList(unref(avatarItems), (avatarItem) => {
394
+ return openBlock(), createBlock(
395
+ _sfc_main$1,
396
+ mergeProps({
397
+ key: avatarItem.key
398
+ }, {
399
+ modifiers: avatarItem.modifiers,
400
+ imgSrc: avatarItem.imgSrc
401
+ }),
402
+ {
403
+ default: withCtx(() => [
404
+ avatarItem.text ? (openBlock(), createElementBlock(
405
+ "span",
406
+ _hoisted_1,
407
+ toDisplayString(avatarItem.text),
408
+ 1
409
+ /* TEXT */
410
+ )) : createCommentVNode("v-if", true)
411
+ ]),
412
+ _: 2
413
+ /* DYNAMIC */
414
+ },
415
+ 1040
416
+ /* FULL_PROPS, DYNAMIC_SLOTS */
417
+ );
418
+ }),
419
+ 128
420
+ /* KEYED_FRAGMENT */
421
+ )),
422
+ (unref(totalItems) || unref(items).length) > unref(toShow) ? (openBlock(), createBlock(_sfc_main$1, {
423
+ key: 0,
424
+ modifiers: `${unref(stringModifiers)} surface bordered`
345
425
  }, {
346
- modifiers: avatarItem.modifiers,
347
- imgSrc: avatarItem.imgSrc
348
- }), {
349
426
  default: withCtx(() => [
350
- avatarItem.text ? (openBlock(), createElementBlock("span", _hoisted_1, toDisplayString(avatarItem.text), 1)) : createCommentVNode("", true)
427
+ createTextVNode(
428
+ toDisplayString(`+${(unref(totalItems) || unref(items).length) - unref(toShow)}`),
429
+ 1
430
+ /* TEXT */
431
+ )
351
432
  ]),
352
- _: 2
353
- }, 1040);
354
- }), 128)),
355
- (unref(totalItems) || unref(items).length) > unref(toShow) ? (openBlock(), createBlock(_sfc_main$1, {
356
- key: 0,
357
- modifiers: `${unref(stringModifiers)} surface bordered`
358
- }, {
359
- default: withCtx(() => [
360
- createTextVNode(toDisplayString(`+${(unref(totalItems) || unref(items).length) - unref(toShow)}`), 1)
361
- ]),
362
- _: 1
363
- }, 8, ["modifiers"])) : createCommentVNode("", true)
364
- ])
365
- ], 2);
433
+ _: 1
434
+ /* STABLE */
435
+ }, 8, ["modifiers"])) : createCommentVNode("v-if", true)
436
+ ])
437
+ ],
438
+ 2
439
+ /* CLASS */
440
+ );
366
441
  };
367
442
  }
368
443
  });
@@ -1 +1 @@
1
- !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("nanoid")):"function"==typeof define&&define.amd?define(["vue","nanoid"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAvatarGroup=o(e.vue,e.nanoid)}(this,(function(e,o){"use strict";var r=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(r||{}),t=(e=>(e.before="before",e.after="after",e))(t||{}),a=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(a||{});Boolean,Boolean,Boolean;const n={modifiers:[String,Array]};t.before,r.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,a.button;const l={...n,items:{type:Array,default:()=>[],required:!0},toShow:{type:Number,default:3},totalItems:{type:Number},avatarModifiers:[String,Array]},i={...n,imgSrc:String};function u(o,r,t){return e.computed((()=>{const a={[o]:!0},n="string"==typeof(null==r?void 0:r.value)?r.value.split(" "):null==r?void 0:r.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(a[`${o}--${e}`]=!0)})),t&&Object.keys(t.value).forEach((r=>{a[`${o}--${r}`]=e.unref(t.value[r])})),a}))}const s=["role","aria-label"],d=["src"],f=e.defineComponent({__name:"VvAvatar",props:i,setup(o){const r=o,{modifiers:t}=e.toRefs(r),a=u("vv-avatar",t);return(o,r)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(a)),role:o.imgSrc?void 0:"img","aria-label":o.imgSrc?void 0:"avatar"},[e.renderSlot(o.$slots,"default",{},(()=>[o.imgSrc?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.imgSrc,alt:"avatar"},null,8,d)):e.createCommentVNode("",!0)]))],10,s))}}),m={key:0};return e.defineComponent({__name:"VvAvatarGroup",props:l,setup(r){const t=r,{modifiers:a,items:n,toShow:l,totalItems:i,avatarModifiers:s}=e.toRefs(t),d=u("vv-avatar-group",a),c=e.computed((()=>(null==s?void 0:s.value)&&Array.isArray(null==s?void 0:s.value)?s.value.join(" "):(null==s?void 0:s.value)||"")),v=e.computed((()=>n.value.slice(0,l.value).map((r=>{let t=[],a=[];return(null==s?void 0:s.value)&&(t=Array.isArray(null==s?void 0:s.value)?null==s?void 0:s.value:[null==s?void 0:s.value]),r.modifiers&&(a=Array.isArray(r.modifiers)?r.modifiers:[r.modifiers]),{...r,key:r.key||e.computed((()=>String((null==n?void 0:n.value)||o.nanoid()))).value,modifiers:[...t,...a]};var n}))));return(o,r)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(d))},[e.renderSlot(o.$slots,"default",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v),(o=>(e.openBlock(),e.createBlock(f,e.mergeProps({key:o.key},{modifiers:o.modifiers,imgSrc:o.imgSrc}),{default:e.withCtx((()=>[o.text?(e.openBlock(),e.createElementBlock("span",m,e.toDisplayString(o.text),1)):e.createCommentVNode("",!0)])),_:2},1040)))),128)),(e.unref(i)||e.unref(n).length)>e.unref(l)?(e.openBlock(),e.createBlock(f,{key:0,modifiers:`${e.unref(c)} surface bordered`},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString("+"+((e.unref(i)||e.unref(n).length)-e.unref(l))),1)])),_:1},8,["modifiers"])):e.createCommentVNode("",!0)]))],2))}})}));
1
+ !function(e,o){"object"==typeof exports&&"undefined"!=typeof module?module.exports=o(require("vue"),require("uid")):"function"==typeof define&&define.amd?define(["vue","uid"],o):(e="undefined"!=typeof globalThis?globalThis:e||self).VvAvatarGroup=o(e.vue,e.uid)}(this,(function(e,o){"use strict";var t=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(t||{}),r=(e=>(e.before="before",e.after="after",e))(r||{}),a=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(a||{}),l=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(l||{});Boolean,Boolean,Boolean,Boolean;const n={modifiers:{type:[String,Array],default:void 0}};r.before,t.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,a.button,l.button;const i={...n,items:{type:Array,default:()=>[],required:!0},toShow:{type:Number,default:3},totalItems:{type:Number},avatarModifiers:[String,Array]},u={...n,imgSrc:String};function s(o,t,r){return e.computed((()=>{const a={[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&&(a[`${o}--${e}`]=!0)})),r&&Object.keys(r.value).forEach((t=>{a[`${o}--${t}`]=e.unref(r.value[t])})),a}))}const d=["role","aria-label"],f=["src"],m=e.defineComponent({__name:"VvAvatar",props:u,setup(o){const t=o,{modifiers:r}=e.toRefs(t),a=s("vv-avatar",r);return(o,t)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(a)),role:o.imgSrc?void 0:"img","aria-label":o.imgSrc?void 0:"avatar"},[e.renderSlot(o.$slots,"default",{},(()=>[o.imgSrc?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.imgSrc,alt:"avatar"},null,8,f)):e.createCommentVNode("v-if",!0)]))],10,d))}}),c={key:0};return e.defineComponent({__name:"VvAvatarGroup",props:i,setup(t){const r=t,{modifiers:a,items:l,toShow:n,totalItems:i,avatarModifiers:u}=e.toRefs(r),d=s("vv-avatar-group",a),f=e.computed((()=>(null==u?void 0:u.value)&&Array.isArray(null==u?void 0:u.value)?u.value.join(" "):(null==u?void 0:u.value)||"")),v=e.computed((()=>l.value.slice(0,n.value).map((t=>{let r=[],a=[];return(null==u?void 0:u.value)&&(r=Array.isArray(null==u?void 0:u.value)?null==u?void 0:u.value:[null==u?void 0:u.value]),t.modifiers&&(a=Array.isArray(t.modifiers)?t.modifiers:[t.modifiers]),{...t,key:t.key||e.computed((()=>String((null==l?void 0:l.value)||o.uid()))).value,modifiers:[...r,...a]};var l}))));return(o,t)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(e.unref(d))},[e.renderSlot(o.$slots,"default",{},(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v),(o=>(e.openBlock(),e.createBlock(m,e.mergeProps({key:o.key},{modifiers:o.modifiers,imgSrc:o.imgSrc}),{default:e.withCtx((()=>[o.text?(e.openBlock(),e.createElementBlock("span",c,e.toDisplayString(o.text),1)):e.createCommentVNode("v-if",!0)])),_:2},1040)))),128)),(e.unref(i)||e.unref(l).length)>e.unref(n)?(e.openBlock(),e.createBlock(m,{key:0,modifiers:`${e.unref(f)} surface bordered`},{default:e.withCtx((()=>[e.createTextVNode(e.toDisplayString("+"+((e.unref(i)||e.unref(l).length)-e.unref(n))),1)])),_:1},8,["modifiers"])):e.createCommentVNode("v-if",!0)]))],2))}})}));
@@ -12,8 +12,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
12
12
  type: NumberConstructor;
13
13
  };
14
14
  avatarModifiers: globalThis.PropType<string | string[]>;
15
- modifiers: globalThis.PropType<string | string[]>;
16
- }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
15
+ modifiers: {
16
+ type: globalThis.PropType<string | string[]>;
17
+ default: undefined;
18
+ };
19
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<globalThis.ExtractPropTypes<{
17
20
  items: {
18
21
  type: globalThis.PropType<import("@/components/VvAvatarGroup").AvatarItem[]>;
19
22
  default: () => never[];
@@ -27,8 +30,12 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
27
30
  type: NumberConstructor;
28
31
  };
29
32
  avatarModifiers: globalThis.PropType<string | string[]>;
30
- modifiers: globalThis.PropType<string | string[]>;
33
+ modifiers: {
34
+ type: globalThis.PropType<string | string[]>;
35
+ default: undefined;
36
+ };
31
37
  }>>, {
38
+ modifiers: string | string[];
32
39
  items: import("@/components/VvAvatarGroup").AvatarItem[];
33
40
  toShow: number;
34
41
  }, {}>, {
@@ -21,5 +21,8 @@ export declare const VvAvatarGroupProps: {
21
21
  type: NumberConstructor;
22
22
  };
23
23
  avatarModifiers: globalThis.PropType<string | string[]>;
24
- modifiers: globalThis.PropType<string | string[]>;
24
+ modifiers: {
25
+ type: globalThis.PropType<string | string[]>;
26
+ default: undefined;
27
+ };
25
28
  };
@@ -33,6 +33,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
33
33
  ButtonType2["reset"] = "reset";
34
34
  return ButtonType2;
35
35
  })(ButtonType || {});
36
+ var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
37
+ ActionTag2["nuxtLink"] = "nuxt-link";
38
+ ActionTag2["routerLink"] = "router-link";
39
+ ActionTag2["a"] = "a";
40
+ ActionTag2["button"] = "button";
41
+ return ActionTag2;
42
+ })(ActionTag || {});
36
43
  var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
37
44
  AnchorTarget2["_blank"] = "_blank";
38
45
  AnchorTarget2["_self"] = "_self";
@@ -57,6 +64,7 @@ const LinkProps = {
57
64
  */
58
65
  target: {
59
66
  type: String,
67
+ default: void 0,
60
68
  validator: (value) => Object.values(AnchorTarget).includes(value)
61
69
  },
62
70
  /**
@@ -71,38 +79,65 @@ const DisabledProps = {
71
79
  /**
72
80
  * Whether the form control is disabled
73
81
  */
74
- disabled: Boolean
82
+ disabled: {
83
+ type: Boolean,
84
+ default: false
85
+ }
75
86
  };
76
87
  const ActiveProps = {
77
88
  /**
78
89
  * Whether the item is active
79
90
  */
80
- active: Boolean
91
+ active: {
92
+ type: Boolean,
93
+ default: false
94
+ }
95
+ };
96
+ const CurrentProps = {
97
+ /**
98
+ * Whether the item is current
99
+ */
100
+ current: {
101
+ type: Boolean,
102
+ default: false
103
+ }
81
104
  };
82
105
  const PressedProps = {
83
106
  /**
84
107
  * Whether the item is pressed
85
108
  */
86
- pressed: Boolean
109
+ pressed: {
110
+ type: Boolean,
111
+ default: false
112
+ }
87
113
  };
88
114
  const LabelProps = {
89
115
  /**
90
116
  * The item label
91
117
  */
92
- label: [String, Number]
118
+ label: {
119
+ type: [String, Number],
120
+ default: void 0
121
+ }
93
122
  };
94
123
  const ModifiersProps = {
95
124
  /**
96
125
  * Component BEM modifiers
97
126
  */
98
- modifiers: [String, Array]
127
+ modifiers: {
128
+ type: [String, Array],
129
+ default: void 0
130
+ }
99
131
  };
100
132
  ({
101
133
  /**
102
134
  * VvIcon name or props
103
135
  * @see VVIcon
104
136
  */
105
- icon: { type: [String, Object] },
137
+ icon: {
138
+ type: [String, Object],
139
+ default: void 0
140
+ },
106
141
  /**
107
142
  * VvIcon position
108
143
  */
@@ -133,7 +168,8 @@ const ModifiersProps = {
133
168
  * Dropdown show / hide transition name
134
169
  */
135
170
  transitionName: {
136
- type: String
171
+ type: String,
172
+ default: void 0
137
173
  },
138
174
  /**
139
175
  * Offset of the dropdown from the trigger
@@ -201,7 +237,8 @@ const ModifiersProps = {
201
237
  * Set dropdown width to the same as the trigger
202
238
  */
203
239
  triggerWidth: {
204
- type: Boolean
240
+ type: Boolean,
241
+ default: false
205
242
  }
206
243
  });
207
244
  ({
@@ -209,6 +246,7 @@ const ModifiersProps = {
209
246
  ...LabelProps,
210
247
  ...PressedProps,
211
248
  ...ActiveProps,
249
+ ...CurrentProps,
212
250
  ...LinkProps,
213
251
  /**
214
252
  * Button type
@@ -224,6 +262,13 @@ const ModifiersProps = {
224
262
  ariaLabel: {
225
263
  type: String,
226
264
  default: void 0
265
+ },
266
+ /**
267
+ * Default tag for the action
268
+ */
269
+ defaultTag: {
270
+ type: String,
271
+ default: ActionTag.button
227
272
  }
228
273
  });
229
274
  const VvBadgeProps = {
@@ -264,14 +309,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
264
309
  const { modifiers } = toRefs(props);
265
310
  const bemCssClasses = useModifiers("vv-badge", modifiers);
266
311
  return (_ctx, _cache) => {
267
- return openBlock(), createElementBlock("span", {
268
- class: normalizeClass(unref(bemCssClasses)),
269
- role: "status"
270
- }, [
271
- renderSlot(_ctx.$slots, "default", {}, () => [
272
- createTextVNode(toDisplayString(_ctx.value), 1)
273
- ])
274
- ], 2);
312
+ return openBlock(), createElementBlock(
313
+ "span",
314
+ {
315
+ class: normalizeClass(unref(bemCssClasses)),
316
+ role: "status"
317
+ },
318
+ [
319
+ renderSlot(_ctx.$slots, "default", {}, () => [
320
+ createTextVNode(
321
+ toDisplayString(_ctx.value),
322
+ 1
323
+ /* TEXT */
324
+ )
325
+ ])
326
+ ],
327
+ 2
328
+ /* CLASS */
329
+ );
275
330
  };
276
331
  }
277
332
  });
@@ -1 +1 @@
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
+ !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||{}),r=(e=>(e.nuxtLink="nuxt-link",e.routerLink="router-link",e.a="a",e.button="button",e))(r||{});Boolean,Boolean,Boolean,Boolean;const l={modifiers:{type:[String,Array],default:void 0}};t.before,o.bottom,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,n.button,r.button;const a={...l,value:[String,Number]};return e.defineComponent({name:"VvBadge",props:a,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))}})}));