@volverjs/ui-vue 0.0.10-beta.3 → 0.0.10-beta.31

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 (294) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +106 -10
  3. package/auto-imports.d.ts +7 -2
  4. package/bin/icons.cjs +1 -1
  5. package/bin/icons.js +22 -15
  6. package/dist/Volver.d.ts +1 -1
  7. package/dist/components/VvAccordion/VvAccordion.es.js +192 -103
  8. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  9. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +160 -8
  10. package/dist/components/VvAccordion/index.d.ts +8 -9
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +451 -172
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  13. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +58 -13
  14. package/dist/components/VvAccordionGroup/index.d.ts +14 -6
  15. package/dist/components/VvAction/VvAction.es.js +78 -27
  16. package/dist/components/VvAction/VvAction.umd.js +1 -1
  17. package/dist/components/VvAction/VvAction.vue.d.ts +57 -22
  18. package/dist/components/VvAction/index.d.ts +25 -9
  19. package/dist/components/VvAlert/VvAlert.es.js +204 -171
  20. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  21. package/dist/components/VvAlert/VvAlert.vue.d.ts +24 -14
  22. package/dist/components/VvAlert/index.d.ts +17 -9
  23. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +250 -188
  24. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  25. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +16 -9
  26. package/dist/components/VvAlertGroup/index.d.ts +6 -14
  27. package/dist/components/VvAvatar/VvAvatar.es.js +61 -21
  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 +118 -48
  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 +78 -28
  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 +276 -60
  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 +291 -252
  44. package/dist/components/VvButton/VvButton.umd.js +1 -1
  45. package/dist/components/VvButton/VvButton.vue.d.ts +94 -40
  46. package/dist/components/VvButton/index.d.ts +51 -29
  47. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +81 -40
  48. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  49. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +24 -11
  50. package/dist/components/VvButtonGroup/index.d.ts +8 -2
  51. package/dist/components/VvCard/VvCard.es.js +86 -36
  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 +177 -120
  56. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  57. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +105 -33
  58. package/dist/components/VvCheckbox/index.d.ts +47 -14
  59. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +190 -107
  60. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  61. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +101 -30
  62. package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
  63. package/dist/components/VvCombobox/VvCombobox.es.js +806 -581
  64. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  65. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +171 -104
  66. package/dist/components/VvCombobox/index.d.ts +62 -26
  67. package/dist/components/VvDialog/VvDialog.es.js +140 -153
  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 +138 -71
  71. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  72. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +101 -75
  73. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +66 -25
  74. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +13 -1
  75. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
  76. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +35 -7
  77. package/dist/components/VvDropdown/index.d.ts +52 -10
  78. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +152 -39
  79. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  80. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +335 -8
  81. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  82. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +63 -20
  83. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  84. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +188 -80
  85. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  86. package/dist/components/VvIcon/VvIcon.es.js +23 -96
  87. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  88. package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
  89. package/dist/components/VvIcon/index.d.ts +33 -48
  90. package/dist/components/VvInputFile/VvInputFile.es.js +1777 -0
  91. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
  92. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +359 -0
  93. package/dist/components/VvInputFile/index.d.ts +200 -0
  94. package/dist/components/VvInputText/VvInputClearAction.d.ts +7 -5
  95. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
  96. package/dist/components/VvInputText/VvInputStepAction.d.ts +2 -2
  97. package/dist/components/VvInputText/VvInputText.es.js +1237 -324
  98. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  99. package/dist/components/VvInputText/VvInputText.vue.d.ts +207 -57
  100. package/dist/components/VvInputText/index.d.ts +99 -29
  101. package/dist/components/VvNav/VvNav.es.js +135 -56
  102. package/dist/components/VvNav/VvNav.umd.js +1 -1
  103. package/dist/components/VvNav/VvNav.vue.d.ts +32 -9
  104. package/dist/components/VvNav/VvNavItem.vue.d.ts +1 -1
  105. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +1 -1
  106. package/dist/components/VvNav/index.d.ts +5 -2
  107. package/dist/components/VvNavItem/VvNavItem.es.js +91 -33
  108. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
  109. package/dist/components/VvProgress/VvProgress.es.js +72 -26
  110. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  111. package/dist/components/VvProgress/VvProgress.vue.d.ts +10 -3
  112. package/dist/components/VvProgress/index.d.ts +4 -1
  113. package/dist/components/VvRadio/VvRadio.es.js +160 -103
  114. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  115. package/dist/components/VvRadio/VvRadio.vue.d.ts +103 -31
  116. package/dist/components/VvRadio/index.d.ts +50 -17
  117. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +190 -107
  118. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  119. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +101 -30
  120. package/dist/components/VvRadioGroup/index.d.ts +45 -12
  121. package/dist/components/VvSelect/VvSelect.es.js +251 -238
  122. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  123. package/dist/components/VvSelect/VvSelect.vue.d.ts +117 -44
  124. package/dist/components/VvSelect/index.d.ts +48 -14
  125. package/dist/components/VvTab/VvTab.es.js +191 -75
  126. package/dist/components/VvTab/VvTab.umd.js +1 -1
  127. package/dist/components/VvTab/VvTab.vue.d.ts +31 -7
  128. package/dist/components/VvTab/index.d.ts +4 -1
  129. package/dist/components/VvTextarea/VvTextarea.es.js +232 -224
  130. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  131. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +156 -49
  132. package/dist/components/VvTextarea/index.d.ts +68 -19
  133. package/dist/components/VvTooltip/VvTooltip.es.js +79 -29
  134. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  135. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +13 -6
  136. package/dist/components/VvTooltip/index.d.ts +5 -2
  137. package/dist/components/common/HintSlot.d.ts +1 -1
  138. package/dist/components/index.d.ts +10 -0
  139. package/dist/components/index.es.js +3534 -1650
  140. package/dist/components/index.umd.js +1 -1
  141. package/dist/composables/alert/useAlert.d.ts +99 -4
  142. package/dist/composables/alert/useInjectAlert.d.ts +1 -6
  143. package/dist/composables/dropdown/useInjectDropdown.d.ts +3 -23
  144. package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -4
  145. package/dist/composables/group/useInjectedGroupState.d.ts +4 -5
  146. package/dist/composables/group/useProvideGroupState.d.ts +3 -3
  147. package/dist/composables/index.d.ts +1 -0
  148. package/dist/composables/index.es.js +92 -3
  149. package/dist/composables/index.umd.js +1 -1
  150. package/dist/composables/useBlurhash.d.ts +7 -0
  151. package/dist/composables/useComponentIcon.d.ts +9 -8
  152. package/dist/composables/usePersistence.d.ts +2 -0
  153. package/dist/composables/useVolver.d.ts +1 -1
  154. package/dist/constants.d.ts +34 -32
  155. package/dist/directives/index.d.ts +3 -5
  156. package/dist/directives/index.es.js +99 -43
  157. package/dist/directives/index.umd.js +1 -1
  158. package/dist/directives/v-tooltip.es.js +97 -38
  159. package/dist/directives/v-tooltip.umd.js +1 -1
  160. package/dist/icons.es.js +267 -267
  161. package/dist/icons.umd.js +1 -1
  162. package/dist/index.d.ts +3 -1
  163. package/dist/index.es.js +90 -16
  164. package/dist/index.umd.js +1 -1
  165. package/dist/props/index.d.ts +272 -81
  166. package/dist/resolvers/unplugin.d.ts +6 -1
  167. package/dist/resolvers/unplugin.es.js +87 -10
  168. package/dist/resolvers/unplugin.umd.js +1 -1
  169. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +143 -89
  170. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +1075 -492
  171. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
  172. package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
  173. package/dist/stories/Button/Button.settings.d.ts +0 -1
  174. package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
  175. package/dist/stories/Icon/Icon.settings.d.ts +1 -0
  176. package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
  177. package/dist/stories/InputFile/InputFile.stories.d.ts +12 -0
  178. package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
  179. package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
  180. package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
  181. package/dist/stories/Tab/Tab.settings.d.ts +2 -15
  182. package/dist/test/expect.d.ts +1 -1
  183. package/dist/types/alert.d.ts +9 -7
  184. package/dist/types/blurhash.d.ts +12 -0
  185. package/dist/types/generic.d.ts +1 -2
  186. package/dist/types/group.d.ts +37 -15
  187. package/dist/types/index.d.ts +7 -0
  188. package/dist/types/input-file.d.ts +16 -0
  189. package/dist/types/nav.d.ts +2 -2
  190. package/dist/utils/ObjectUtilities.d.ts +0 -1
  191. package/dist/workers/blurhash.d.ts +1 -0
  192. package/package.json +78 -78
  193. package/src/Volver.ts +31 -20
  194. package/src/assets/icons/detailed.json +1 -1
  195. package/src/assets/icons/normal.json +1 -1
  196. package/src/assets/icons/simple.json +1 -1
  197. package/src/components/VvAccordion/VvAccordion.vue +121 -58
  198. package/src/components/VvAccordion/index.ts +8 -23
  199. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +164 -47
  200. package/src/components/VvAccordionGroup/index.ts +6 -6
  201. package/src/components/VvAction/VvAction.vue +17 -5
  202. package/src/components/VvAlert/index.ts +14 -9
  203. package/src/components/VvAlertGroup/index.ts +3 -15
  204. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
  205. package/src/components/VvBreadcrumb/index.ts +2 -8
  206. package/src/components/VvButton/VvButton.vue +17 -7
  207. package/src/components/VvButton/index.ts +9 -16
  208. package/src/components/VvButtonGroup/VvButtonGroup.vue +1 -2
  209. package/src/components/VvCheckbox/index.ts +2 -2
  210. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +1 -2
  211. package/src/components/VvCombobox/VvCombobox.vue +15 -12
  212. package/src/components/VvCombobox/index.ts +4 -0
  213. package/src/components/VvDropdown/VvDropdown.vue +11 -2
  214. package/src/components/VvDropdown/VvDropdownItem.vue +4 -1
  215. package/src/components/VvDropdown/VvDropdownOption.vue +4 -21
  216. package/src/components/VvDropdown/index.ts +35 -1
  217. package/src/components/VvIcon/VvIcon.vue +2 -2
  218. package/src/components/VvIcon/index.ts +35 -48
  219. package/src/components/VvInputFile/VvInputFile.vue +395 -0
  220. package/src/components/VvInputFile/index.ts +135 -0
  221. package/src/components/VvInputText/VvInputClearAction.ts +10 -6
  222. package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
  223. package/src/components/VvInputText/VvInputText.vue +141 -33
  224. package/src/components/VvInputText/index.ts +31 -16
  225. package/src/components/VvNav/VvNav.vue +4 -2
  226. package/src/components/VvRadio/index.ts +5 -5
  227. package/src/components/VvRadioGroup/VvRadioGroup.vue +1 -2
  228. package/src/components/VvSelect/VvSelect.vue +5 -8
  229. package/src/components/VvTab/VvTab.vue +5 -1
  230. package/src/components/VvTextarea/VvTextarea.vue +6 -9
  231. package/src/components/index.ts +10 -0
  232. package/src/composables/alert/useAlert.ts +12 -9
  233. package/src/composables/dropdown/useProvideDropdown.ts +4 -4
  234. package/src/composables/group/useInjectedGroupState.ts +20 -16
  235. package/src/composables/group/useProvideGroupState.ts +10 -15
  236. package/src/composables/index.ts +1 -0
  237. package/src/composables/useBlurhash.ts +76 -0
  238. package/src/composables/useComponentIcon.ts +15 -14
  239. package/src/composables/usePersistence.ts +76 -0
  240. package/src/composables/useUniqueId.ts +2 -2
  241. package/src/constants.ts +47 -32
  242. package/src/directives/index.ts +3 -6
  243. package/src/directives/v-tooltip.ts +19 -10
  244. package/src/index.ts +3 -1
  245. package/src/props/index.ts +108 -31
  246. package/src/resolvers/unplugin.ts +24 -14
  247. package/src/stories/Accordion/Accordion.test.ts +1 -1
  248. package/src/stories/AccordionGroup/AccordionGroup.settings.ts +2 -2
  249. package/src/stories/AccordionGroup/AccordionGroup.test.ts +17 -11
  250. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.ts +1 -1
  251. package/src/stories/Alert/Alert.test.ts +1 -1
  252. package/src/stories/AlertGroup/AlertGroup.test.ts +1 -1
  253. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
  254. package/src/stories/Avatar/Avatar.test.ts +1 -1
  255. package/src/stories/AvatarGroup/AvatarGroup.test.ts +1 -1
  256. package/src/stories/Badge/Badge.test.ts +1 -1
  257. package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
  258. package/src/stories/Button/Button.settings.ts +1 -4
  259. package/src/stories/Button/Button.test.ts +1 -1
  260. package/src/stories/ButtonGroup/ButtonGroup.test.ts +1 -1
  261. package/src/stories/Card/Card.test.ts +1 -1
  262. package/src/stories/Checkbox/Checkbox.test.ts +1 -1
  263. package/src/stories/CheckboxGroup/CheckboxGroup.test.ts +1 -1
  264. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  265. package/src/stories/Combobox/Combobox.test.ts +1 -1
  266. package/src/stories/Dialog/Dialog.test.ts +2 -2
  267. package/src/stories/Dropdown/Dropdown.test.ts +1 -1
  268. package/src/stories/Icon/Icon.settings.ts +3 -3
  269. package/src/stories/InputFile/InputFile.settings.ts +36 -0
  270. package/src/stories/InputFile/InputFile.stories.ts +89 -0
  271. package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
  272. package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
  273. package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
  274. package/src/stories/InputText/InputText.test.ts +1 -1
  275. package/src/stories/Nav/Nav.test.ts +1 -1
  276. package/src/stories/Progress/Progress.test.ts +1 -1
  277. package/src/stories/Radio/Radio.test.ts +1 -1
  278. package/src/stories/RadioGroup/RadioGroup.test.ts +1 -1
  279. package/src/stories/Select/Select.test.ts +1 -1
  280. package/src/stories/Tab/Tab.settings.ts +2 -2
  281. package/src/stories/Tab/Tab.test.ts +1 -1
  282. package/src/stories/Textarea/Textarea.test.ts +1 -1
  283. package/src/stories/Tooltip/Tooltip.test.ts +1 -1
  284. package/src/stories/argTypes.ts +1 -1
  285. package/src/test/expect.ts +2 -4
  286. package/src/types/alert.ts +11 -7
  287. package/src/types/blurhash.ts +21 -0
  288. package/src/types/generic.ts +3 -3
  289. package/src/types/group.ts +22 -14
  290. package/src/types/index.ts +7 -0
  291. package/src/types/input-file.ts +18 -0
  292. package/src/types/nav.ts +2 -3
  293. package/src/utils/ObjectUtilities.ts +0 -11
  294. package/src/workers/blurhash.ts +9 -0
@@ -3,4 +3,4 @@ import VvAlertGroup from '@/components/VvAlertGroup/VvAlertGroup.vue';
3
3
  import { type Story } from './AlertGroup.stories';
4
4
  declare const meta: Meta<typeof VvAlertGroup>;
5
5
  export default meta;
6
- export declare const UseComposable: Story;
6
+ export declare const Default: Story;
@@ -0,0 +1,4 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const Default: StoryObj;
@@ -89,7 +89,6 @@ export declare const argTypes: {
89
89
  };
90
90
  };
91
91
  target: {
92
- options: string[];
93
92
  description: string;
94
93
  control: {
95
94
  type: string;
@@ -332,6 +332,14 @@ export declare const argTypes: {
332
332
  };
333
333
  };
334
334
  };
335
+ 'update:search': {
336
+ table: {
337
+ category: string;
338
+ type: {
339
+ summary: string;
340
+ };
341
+ };
342
+ };
335
343
  placement: {
336
344
  description: string;
337
345
  options: (import("../../constants").Side | import("../../constants").Placement)[];
@@ -1,6 +1,7 @@
1
1
  export declare const defaultArgs: {
2
2
  name: string;
3
3
  width: number;
4
+ prefix: import("@/components/VvIcon").IconPrefix;
4
5
  };
5
6
  export declare const argTypes: {
6
7
  modifiers: {
@@ -0,0 +1,56 @@
1
+ export declare const defaultArgs: {
2
+ name: string;
3
+ label: string;
4
+ };
5
+ export declare const argTypes: {
6
+ modifiers: {
7
+ options: string[];
8
+ description: string;
9
+ control: {
10
+ type: string;
11
+ };
12
+ };
13
+ 'drop-area': {
14
+ description: string;
15
+ control: {
16
+ type: string;
17
+ };
18
+ table: {
19
+ category: string;
20
+ type: {
21
+ summary: string;
22
+ };
23
+ };
24
+ };
25
+ 'update:model-value': {
26
+ table: {
27
+ category: string;
28
+ type: {
29
+ summary: string;
30
+ };
31
+ };
32
+ };
33
+ hintLabel: {
34
+ description: string;
35
+ control: {
36
+ type: string;
37
+ };
38
+ table: {
39
+ type: {
40
+ summary: string;
41
+ };
42
+ };
43
+ };
44
+ hint: {
45
+ description: string;
46
+ control: {
47
+ type: string;
48
+ };
49
+ table: {
50
+ category: string;
51
+ type: {
52
+ summary: string;
53
+ };
54
+ };
55
+ };
56
+ };
@@ -0,0 +1,12 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3';
2
+ import VvInputFile from '@/components/VvInputFile/VvInputFile.vue';
3
+ declare const meta: Meta;
4
+ export default meta;
5
+ type Story = StoryObj<typeof VvInputFile>;
6
+ export declare const Default: Story;
7
+ export declare const Readonly: Story;
8
+ export declare const Valid: Story;
9
+ export declare const Invalid: Story;
10
+ export declare const Hint: Story;
11
+ export declare const Loading: Story;
12
+ export declare const Progress: Story;
@@ -0,0 +1,9 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3';
2
+ import VvInputFile from '@/components/VvInputFile/VvInputFile.vue';
3
+ declare const meta: Meta<typeof VvInputFile>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof VvInputFile>;
6
+ export declare const Default: Story;
7
+ export declare const InputHidden: Story;
8
+ export declare const Square: Story;
9
+ export declare const Circle: Story;
@@ -0,0 +1,8 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3';
2
+ import VvInputFile from '@/components/VvInputFile/VvInputFile.vue';
3
+ declare const meta: Meta<typeof VvInputFile>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof VvInputFile>;
6
+ export declare const DefaultPosition: Story;
7
+ export declare const After: Story;
8
+ export declare const Src: Story;
@@ -0,0 +1,7 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3';
2
+ import VvInputFile from '@/components/VvInputFile/VvInputFile.vue';
3
+ declare const meta: Meta<typeof VvInputFile>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof VvInputFile>;
6
+ export declare const DropArea: Story;
7
+ export declare const Hint: Story;
@@ -1,17 +1,4 @@
1
- import type { Meta } from '@storybook/vue3';
1
+ import type { ArgTypes, Meta } from '@storybook/vue3';
2
2
  import type { VvTab } from '@/components';
3
3
  export declare const defaultArgs: Meta<typeof VvTab>['args'];
4
- export declare const defaultArgTypes: {
5
- tabId: {
6
- description: string;
7
- control: {
8
- type: string;
9
- };
10
- table: {
11
- category: string;
12
- type: {
13
- summary: string;
14
- };
15
- };
16
- };
17
- };
4
+ export declare const defaultArgTypes: ArgTypes;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="jest" />
2
- import { expect } from '@storybook/jest';
2
+ import { expect } from '@storybook/test';
3
3
  declare global {
4
4
  namespace jest {
5
5
  interface Matchers<R> {
@@ -1,13 +1,15 @@
1
- export type AlertModifiers = 'success' | 'info' | 'warning' | 'danger' | 'brand' | 'accent';
1
+ import type { VvIconProps } from '@/components/VvIcon';
2
+ import { AlertRole } from '@/constants';
3
+ export type AlertModifier = 'success' | 'info' | 'warning' | 'danger' | 'brand' | 'accent' | string;
2
4
  export type Alert = {
3
5
  id: string | number;
4
- group: string;
5
6
  title?: string;
6
- icon: string | Record<string, unknown>;
7
+ icon?: string | VvIconProps;
7
8
  content?: string;
8
9
  footer?: string;
9
- modifiers: AlertModifiers;
10
- dismissable: boolean;
11
- autoClose: number;
12
- timestamp: number;
10
+ modifiers?: AlertModifier | AlertModifier[];
11
+ dismissable?: boolean;
12
+ autoClose?: number;
13
+ closeLabel?: string;
14
+ role?: AlertRole;
13
15
  };
@@ -0,0 +1,12 @@
1
+ declare class ValidationError extends Error {
2
+ }
3
+ export type BlurhashWorkerType = {
4
+ encode: (pixels: Uint8ClampedArray, width: number, height: number, componentX: number, componentY: number) => string;
5
+ decode: (blurhash: string, width: number, height: number, punch?: number) => Uint8ClampedArray;
6
+ isBlurhashValid: (blurhash: string) => {
7
+ result: boolean;
8
+ errorReason?: string;
9
+ };
10
+ ValidationError: ValidationError;
11
+ };
12
+ export {};
@@ -1,5 +1,4 @@
1
1
  export type Nullable<T> = T | null | undefined;
2
- export type Option = {
2
+ export type Option = Record<string | number | symbol, any> & {
3
3
  options?: Option[];
4
- [key: string]: unknown;
5
4
  };
@@ -1,37 +1,59 @@
1
1
  import type { Ref } from 'vue';
2
- /**
3
- * State shared for a group of elements
4
- */
5
- export default interface GroupState {
6
- [itemKey: string]: Ref<unknown> | unknown | undefined;
7
- key: string | number | symbol;
8
- }
2
+ import type { Emitter } from 'mitt';
9
3
  /**
10
4
  * State shared in a group of inputs
11
5
  */
12
- export interface InputGroupState extends GroupState {
6
+ export type InputGroupState = {
7
+ modelValue: Ref<unknown>;
13
8
  readonly: Ref<boolean>;
14
9
  disabled: Ref<boolean>;
15
10
  valid: Ref<boolean>;
16
11
  invalid: Ref<boolean>;
17
- }
12
+ };
18
13
  /**
19
14
  * State shared in a group of buttons
20
15
  */
21
- export interface ButtonGroupState extends GroupState {
16
+ export type ButtonGroupState = {
22
17
  modelValue: Ref<string | number | boolean | (string | number | boolean)[] | undefined>;
23
18
  disabled: Ref<boolean>;
24
19
  toggle: Ref<boolean>;
25
20
  multiple: Ref<boolean>;
26
21
  unselectable: Ref<boolean>;
27
22
  modifiers: Ref<string | string[] | undefined>;
28
- }
23
+ };
29
24
  /**
30
25
  * State shared in a group of accordions
31
26
  */
32
- export interface AccordionGroupState extends GroupState {
33
- collapse: Ref<boolean>;
27
+ export type AccordionGroupBusEvents = {
28
+ toggle: {
29
+ name: string;
30
+ value: boolean;
31
+ };
32
+ register: {
33
+ name: string;
34
+ };
35
+ unregister: {
36
+ name: string;
37
+ };
38
+ expand: {
39
+ name?: string | string[];
40
+ };
41
+ collapse: {
42
+ name?: string | string[];
43
+ };
44
+ };
45
+ export type AccordionGroupState = {
34
46
  disabled: Ref<boolean>;
35
47
  modifiers: Ref<string[] | string | undefined>;
36
- not: Ref<boolean>;
37
- }
48
+ bus: Emitter<AccordionGroupBusEvents>;
49
+ };
50
+ /**
51
+ * State shared in a group of alerts
52
+ */
53
+ export type AlertGroupBusEvents = {
54
+ close: string;
55
+ };
56
+ export type AlertGroupState = {
57
+ name?: Ref<string | undefined>;
58
+ bus?: Emitter<AlertGroupBusEvents>;
59
+ };
@@ -0,0 +1,7 @@
1
+ export * from './alert';
2
+ export * from './floating-ui';
3
+ export * from './generic';
4
+ export * from './group';
5
+ export * from './nav';
6
+ export * from './blurhash';
7
+ export * from './input-file';
@@ -0,0 +1,16 @@
1
+ export type UploadedFile<Source = undefined> = Source extends undefined ? {
2
+ name: string;
3
+ size: number;
4
+ type: string;
5
+ url: string;
6
+ thumbnailUrl?: string;
7
+ lastModified?: number;
8
+ } : {
9
+ name: string;
10
+ size: number;
11
+ type: string;
12
+ url: string;
13
+ thumbnailUrl?: string;
14
+ lastModified?: number;
15
+ source: Source;
16
+ };
@@ -1,16 +1,16 @@
1
- import type { AnchorTarget } from '@/constants';
2
1
  export type NavItem = {
3
2
  label: string;
4
3
  ariaLabel?: string;
5
4
  title?: string;
6
5
  to?: string | Record<string, unknown>;
7
6
  href?: string;
8
- target?: `${AnchorTarget}`;
7
+ target?: string;
9
8
  rel?: string;
10
9
  disabled?: boolean;
11
10
  current?: boolean;
12
11
  class?: string | string[];
13
12
  on?: Record<'click' | string, () => void>;
13
+ data?: Record<string, unknown>;
14
14
  };
15
15
  export type NavItemTab = NavItem & {
16
16
  tab?: string;
@@ -80,4 +80,3 @@ export declare function propsToObject(props: any): Record<string, unknown>;
80
80
  * @return {object[]}
81
81
  */
82
82
  export declare function filterArray<T = Record<string, unknown>>(list: T[], filter: T[] | string[], key: string): T[];
83
- export declare function kebabCase(value: string): string | undefined;
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@volverjs/ui-vue",
3
3
  "description": "@volverjs/ui-vue is a lightweight Vue 3 component library to accompany @volverjs/style.",
4
- "author": "24/Consulting",
4
+ "author": "8 Wave S.r.l.",
5
5
  "license": "MIT",
6
6
  "keywords": [
7
7
  "vue",
@@ -19,10 +19,7 @@
19
19
  "bugs": {
20
20
  "url": "https://github.com/volverjs/ui-vue/issues"
21
21
  },
22
- "version": "0.0.10-beta.3",
23
- "engines": {
24
- "node": ">= 16.x"
25
- },
22
+ "version": "0.0.10-beta.31",
26
23
  "packageManager": "pnpm@8.7.0",
27
24
  "type": "module",
28
25
  "main": "./dist/Volver.umd.js",
@@ -38,94 +35,89 @@
38
35
  "*.d.ts"
39
36
  ],
40
37
  "dependencies": {
41
- "@floating-ui/vue": "^1.0.2",
42
- "@iconify/tools": "^3.0.5",
38
+ "@floating-ui/vue": "^1.0.6",
39
+ "@iconify/tools": "^4.0.4",
43
40
  "@iconify/vue": "^4.1.1",
44
- "@vueuse/core": "^10.4.1",
45
- "jsdom": "^22.1.0",
41
+ "@storybook/test": "^8.0.6",
42
+ "@vueuse/core": "^10.9.0",
43
+ "blurhash": "^2.0.5",
44
+ "comlink": "^4.4.1",
45
+ "jsdom": "^24.0.0",
46
46
  "mitt": "^3.0.1",
47
- "nanoid": "^5.0.1",
47
+ "pica": "^9.0.1",
48
48
  "ts-dot-prop": "^2.1.3",
49
- "vue": "^3.3.4",
50
- "vue-imask": "^7.1.3"
49
+ "uid": "^2.0.2",
50
+ "vue": "^3.4.21",
51
+ "vue-imask": "^7.5.0",
52
+ "vuedraggable": "^4.1.0"
51
53
  },
52
54
  "peerDependencies": {
53
55
  "@volverjs/style": "0.*"
54
56
  },
55
57
  "devDependencies": {
56
- "@babel/core": "^7.22.17",
57
- "@babel/preset-env": "^7.22.15",
58
- "@babel/preset-typescript": "^7.22.15",
58
+ "@babel/core": "^7.24.4",
59
+ "@babel/preset-env": "^7.24.4",
60
+ "@babel/preset-typescript": "^7.24.1",
59
61
  "@iconify/types": "^2.0.0",
60
- "@iconify/utils": "^2.1.9",
61
- "@mdx-js/react": "^2.3.0",
62
- "@rushstack/eslint-patch": "^1.3.3",
63
- "@storybook/addon-a11y": "^7.4.1",
64
- "@storybook/addon-actions": "^7.4.1",
65
- "@storybook/addon-docs": "^7.4.1",
66
- "@storybook/addon-essentials": "^7.4.1",
67
- "@storybook/addon-interactions": "^7.4.1",
68
- "@storybook/addon-links": "^7.4.1",
69
- "@storybook/channel-postmessage": "^7.4.1",
70
- "@storybook/channel-websocket": "^7.4.1",
71
- "@storybook/cli": "^7.4.1",
72
- "@storybook/client-api": "^7.4.1",
73
- "@storybook/client-logger": "^7.4.1",
74
- "@storybook/core-common": "^7.4.1",
75
- "@storybook/jest": "^0.2.2",
76
- "@storybook/preview-api": "^7.4.1",
77
- "@storybook/preview-web": "^7.4.1",
78
- "@storybook/test-runner": "^0.13.0",
79
- "@storybook/testing-library": "^0.2.0",
80
- "@storybook/vue3": "^7.4.1",
81
- "@storybook/vue3-vite": "^7.4.1",
82
- "@tsconfig/node18": "^18.2.2",
83
- "@types/jest-axe": "^3.5.5",
84
- "@types/jsdom": "^21.1.2",
85
- "@types/node": "^20.6.0",
86
- "@types/react": "^18.2.21",
87
- "@types/yargs": "^17.0.24",
88
- "@vitejs/plugin-vue": "^4.3.4",
89
- "@volverjs/style": "0.1.12-beta.8",
90
- "@vue/compiler-sfc": "^3.3.4",
91
- "@vue/eslint-config-prettier": "^8.0.0",
92
- "@vue/eslint-config-typescript": "^11.0.3",
93
- "@vue/test-utils": "^2.4.1",
94
- "@vue/tsconfig": "^0.4.0",
95
- "change-case": "^4.1.2",
96
- "chokidar": "^3.5.3",
97
- "eslint": "^8.49.0",
98
- "eslint-config-prettier": "^9.0.0",
99
- "eslint-mdx": "^2.2.0",
100
- "eslint-plugin-mdx": "^2.2.0",
101
- "eslint-plugin-prettier": "^5.0.0",
102
- "eslint-plugin-storybook": "^0.6.13",
103
- "eslint-plugin-vue": "^9.17.0",
62
+ "@iconify/utils": "^2.1.22",
63
+ "@nabla/vite-plugin-eslint": "^2.0.2",
64
+ "@rushstack/eslint-patch": "^1.10.1",
65
+ "@storybook/addon-a11y": "^8.0.6",
66
+ "@storybook/addon-actions": "^8.0.6",
67
+ "@storybook/addon-docs": "^8.0.6",
68
+ "@storybook/addon-essentials": "^8.0.6",
69
+ "@storybook/addon-interactions": "^8.0.6",
70
+ "@storybook/addon-links": "^8.0.6",
71
+ "@storybook/cli": "^8.0.6",
72
+ "@storybook/client-logger": "^8.0.6",
73
+ "@storybook/core-common": "^8.0.6",
74
+ "@storybook/preview-api": "^8.0.6",
75
+ "@storybook/test-runner": "^0.17.0",
76
+ "@storybook/vue3": "^8.0.6",
77
+ "@storybook/vue3-vite": "^8.0.6",
78
+ "@tsconfig/node18": "^18.2.4",
79
+ "@types/jest-axe": "^3.5.9",
80
+ "@types/jsdom": "^21.1.6",
81
+ "@types/node": "^20.12.5",
82
+ "@types/pica": "^9.0.4",
83
+ "@types/yargs": "^17.0.32",
84
+ "@vitejs/plugin-vue": "^5.0.4",
85
+ "@volverjs/style": "0.1.12-beta.15",
86
+ "@vue/compiler-sfc": "^3.4.21",
87
+ "@vue/eslint-config-prettier": "^9.0.0",
88
+ "@vue/eslint-config-typescript": "^13.0.0",
89
+ "@vue/test-utils": "^2.4.5",
90
+ "@vue/tsconfig": "^0.5.1",
91
+ "change-case": "^5.4.4",
92
+ "chokidar": "^3.6.0",
93
+ "eslint": "^9.0.0",
94
+ "eslint-config-prettier": "^9.1.0",
95
+ "eslint-mdx": "^3.1.5",
96
+ "eslint-plugin-mdx": "^3.1.5",
97
+ "eslint-plugin-prettier": "^5.1.3",
98
+ "eslint-plugin-storybook": "^0.8.0",
99
+ "eslint-plugin-vue": "^9.24.0",
104
100
  "glob": "7.2.3",
105
101
  "jest-axe": "^8.0.0",
106
102
  "jest-diff": "^29.7.0",
107
103
  "jest-get-type": "^29.6.3",
108
- "jsdom": "^22.1.0",
104
+ "jsdom": "^24.0.0",
109
105
  "npm-run-all": "^4.1.5",
110
- "prettier": "^3.0.3",
106
+ "prettier": "^3.2.5",
111
107
  "pretty-format": "^29.7.0",
112
- "react": "^18.2.0",
113
- "react-dom": "^18.2.0",
114
- "remark": "^14.0.3",
115
- "sass": "^1.66.1",
116
- "storybook": "^7.4.1",
108
+ "remark": "^15.0.1",
109
+ "sass": "^1.74.1",
110
+ "storybook": "^8.0.6",
117
111
  "storybook-addon-markdown-docs": "^2.0.0",
118
- "storybook-dark-mode": "^3.0.1",
119
- "storybook-version": "^0.1.1",
120
- "terser": "^5.19.4",
121
- "ts-node": "^10.9.1",
122
- "typescript": "~5.2.2",
123
- "unplugin-auto-import": "^0.16.6",
124
- "unplugin-vue-components": "^0.25.2",
125
- "vite": "^4.4.9",
126
- "vite-plugin-eslint": "^1.8.1",
127
- "vite-plugin-externalize-deps": "^0.7.0",
128
- "vue-tsc": "^1.8.11",
112
+ "storybook-dark-mode": "^4.0.1",
113
+ "terser": "^5.30.3",
114
+ "ts-node": "^10.9.2",
115
+ "typescript": "~5.4.4",
116
+ "unplugin-auto-import": "^0.17.5",
117
+ "unplugin-vue-components": "^0.26.0",
118
+ "vite": "^5.2.8",
119
+ "vite-plugin-externalize-deps": "^0.8.0",
120
+ "vue-tsc": "^2.0.11",
129
121
  "yargs": "^17.7.2"
130
122
  },
131
123
  "typesVersions": {
@@ -220,6 +212,9 @@
220
212
  "vv-icon": [
221
213
  "dist/components/VvIcon/VvIcon.vue.d.ts"
222
214
  ],
215
+ "vv-input-file": [
216
+ "dist/components/VvInputFile/VvInputFile.vue.d.ts"
217
+ ],
223
218
  "vv-input-text": [
224
219
  "dist/components/VvInputText/VvInputText.vue.d.ts"
225
220
  ],
@@ -408,6 +403,11 @@
408
403
  "import": "./dist/components/VvIcon/VvIcon.es.js",
409
404
  "default": "./dist/components/VvIcon/VvIcon.umd.js"
410
405
  },
406
+ "./vv-input-file": {
407
+ "types": "./dist/components/VvInputFile/VvInputFile.vue.d.ts",
408
+ "import": "./dist/components/VvInputFile/VvInputFile.es.js",
409
+ "default": "./dist/components/VvInputFile/VvInputFile.umd.js"
410
+ },
411
411
  "./vv-input-text": {
412
412
  "types": "./dist/components/VvInputText/VvInputText.vue.d.ts",
413
413
  "import": "./dist/components/VvInputText/VvInputText.es.js",
@@ -471,7 +471,7 @@
471
471
  "hot": "node ./scripts/build.js --hot",
472
472
  "type-check": "vue-tsc --noEmit",
473
473
  "lint": "eslint . --ext .vue,.js,.ts,.mdx --fix",
474
- "generate-icons": "ts-node-esm ./scripts/icons.ts --srcPath=src/assets/icons",
474
+ "generate-icons": "node --loader ts-node/esm ./scripts/icons.ts --srcPath=src/assets/icons",
475
475
  "generate-tsd": "vue-tsc --declaration --emitDeclarationOnly",
476
476
  "test-local": "test-storybook --stories-json",
477
477
  "test-remote": "test-storybook --stories-json --url https://volver-ui-vue.vercel.app",
package/src/Volver.ts CHANGED
@@ -1,12 +1,13 @@
1
+ import type { App, Component, Directive, Plugin, Ref } from 'vue'
1
2
  import {
2
- addCollection,
3
- addIcon,
4
- addAPIProvider,
5
3
  type IconifyIcon,
6
4
  type IconifyJSON,
7
5
  type PartialIconifyAPIConfig,
6
+ addCollection,
7
+ addIcon,
8
+ addAPIProvider,
8
9
  } from '@iconify/vue'
9
- import type { App, Component, Directive, Plugin, Ref } from 'vue'
10
+ import { kebabCase } from 'change-case'
10
11
  import { DEFAULT_ICONIFY_PROVIDER, INJECTION_KEY_VOLVER } from './constants'
11
12
 
12
13
  export function useDefaultProps(
@@ -36,25 +37,31 @@ export function useDefaultProps(
36
37
  return {
37
38
  ...component,
38
39
  name: componentName,
39
- props: Object.keys(props).reduce((acc, key) => {
40
- if (!(key in componentDefaults)) {
41
- acc[key] = props[key]
42
- return acc
43
- }
44
- const customDefault = componentDefaults[key]
45
- if (typeof props[key] === 'function' || Array.isArray(props[key])) {
40
+ props: Object.keys(props).reduce(
41
+ (acc, key) => {
42
+ if (!(key in componentDefaults)) {
43
+ acc[key] = props[key]
44
+ return acc
45
+ }
46
+ const customDefault = componentDefaults[key]
47
+ if (
48
+ typeof props[key] === 'function' ||
49
+ Array.isArray(props[key])
50
+ ) {
51
+ acc[key] = {
52
+ type: props[key],
53
+ default: customDefault,
54
+ }
55
+ return acc
56
+ }
46
57
  acc[key] = {
47
- type: props[key],
58
+ ...(props[key] as Record<string, unknown>),
48
59
  default: customDefault,
49
60
  }
50
61
  return acc
51
- }
52
- acc[key] = {
53
- ...(props[key] as Record<string, unknown>),
54
- default: customDefault,
55
- }
56
- return acc
57
- }, {} as Record<string, unknown>),
62
+ },
63
+ {} as Record<string, unknown>,
64
+ ),
58
65
  }
59
66
  }
60
67
 
@@ -248,7 +255,7 @@ const VolverPlugin: Plugin = {
248
255
  * @param {App} Vue
249
256
  * @param {Object} options
250
257
  */
251
- install(app: App, options: VolverOptions) {
258
+ install(app: App, options: VolverOptions = {}) {
252
259
  const volver = new Volver(options)
253
260
 
254
261
  // register global methods
@@ -277,6 +284,10 @@ const VolverPlugin: Plugin = {
277
284
  // register directives
278
285
  if (options.directives) {
279
286
  Object.entries(options.directives).forEach(([name, directive]) => {
287
+ const kebabName = kebabCase(name)
288
+ if (kebabName.startsWith('v-')) {
289
+ name = kebabName.substring(2).toLocaleLowerCase()
290
+ }
280
291
  app.directive(name, directive)
281
292
  })
282
293
  }