@volverjs/ui-vue 0.0.10-beta.15 → 0.0.10-beta.17

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 (154) hide show
  1. package/README.md +96 -2
  2. package/auto-imports.d.ts +2 -0
  3. package/dist/components/VvAccordion/VvAccordion.es.js +33 -9
  4. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  5. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +9 -2
  6. package/dist/components/VvAccordion/index.d.ts +4 -1
  7. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +33 -9
  8. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  9. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +9 -2
  10. package/dist/components/VvAccordionGroup/index.d.ts +4 -1
  11. package/dist/components/VvAction/VvAction.es.js +29 -8
  12. package/dist/components/VvAction/VvAction.umd.js +1 -1
  13. package/dist/components/VvAction/VvAction.vue.d.ts +44 -10
  14. package/dist/components/VvAction/index.d.ts +21 -5
  15. package/dist/components/VvAlert/VvAlert.es.js +91 -107
  16. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  17. package/dist/components/VvAlert/VvAlert.vue.d.ts +14 -4
  18. package/dist/components/VvAlert/index.d.ts +7 -3
  19. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +91 -107
  20. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  21. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +9 -2
  22. package/dist/components/VvAlertGroup/index.d.ts +6 -2
  23. package/dist/components/VvAvatar/VvAvatar.es.js +33 -9
  24. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  25. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +11 -3
  26. package/dist/components/VvAvatar/index.d.ts +4 -1
  27. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +33 -9
  28. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  29. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +9 -2
  30. package/dist/components/VvAvatarGroup/index.d.ts +4 -1
  31. package/dist/components/VvBadge/VvBadge.es.js +33 -9
  32. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  33. package/dist/components/VvBadge/VvBadge.vue.d.ts +11 -3
  34. package/dist/components/VvBadge/index.d.ts +4 -1
  35. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +33 -9
  36. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  37. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -3
  38. package/dist/components/VvBreadcrumb/index.d.ts +4 -1
  39. package/dist/components/VvButton/VvButton.es.js +100 -119
  40. package/dist/components/VvButton/VvButton.umd.js +1 -1
  41. package/dist/components/VvButton/VvButton.vue.d.ts +78 -20
  42. package/dist/components/VvButton/index.d.ts +34 -12
  43. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +33 -9
  44. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  45. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +17 -4
  46. package/dist/components/VvButtonGroup/index.d.ts +8 -2
  47. package/dist/components/VvCard/VvCard.es.js +33 -9
  48. package/dist/components/VvCard/VvCard.umd.js +1 -1
  49. package/dist/components/VvCard/VvCard.vue.d.ts +11 -3
  50. package/dist/components/VvCard/index.d.ts +4 -1
  51. package/dist/components/VvCheckbox/VvCheckbox.es.js +56 -17
  52. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  53. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +94 -22
  54. package/dist/components/VvCheckbox/index.d.ts +44 -11
  55. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +64 -19
  56. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  57. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +93 -22
  58. package/dist/components/VvCheckboxGroup/index.d.ts +44 -11
  59. package/dist/components/VvCombobox/VvCombobox.es.js +108 -165
  60. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  61. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +97 -24
  62. package/dist/components/VvCombobox/index.d.ts +42 -11
  63. package/dist/components/VvDialog/VvDialog.es.js +51 -103
  64. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  65. package/dist/components/VvDropdown/VvDropdown.es.js +33 -9
  66. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  67. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +14 -2
  68. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -12
  69. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +11 -3
  70. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +25 -6
  71. package/dist/components/VvDropdown/index.d.ts +6 -1
  72. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +33 -9
  73. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  74. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +29 -8
  75. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  76. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +37 -10
  77. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  78. package/dist/components/VvIcon/VvIcon.es.js +22 -95
  79. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  80. package/dist/components/VvIcon/VvIcon.vue.d.ts +81 -44
  81. package/dist/components/VvIcon/index.d.ts +21 -48
  82. package/dist/components/VvInputFile/VvInputFile.es.js +146 -140
  83. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -1
  84. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +52 -12
  85. package/dist/components/VvInputFile/index.d.ts +24 -6
  86. package/dist/components/VvInputText/VvInputText.es.js +115 -147
  87. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  88. package/dist/components/VvInputText/VvInputText.vue.d.ts +141 -34
  89. package/dist/components/VvInputText/index.d.ts +71 -26
  90. package/dist/components/VvNav/VvNav.es.js +33 -9
  91. package/dist/components/VvNav/VvNav.umd.js +1 -1
  92. package/dist/components/VvNav/VvNav.vue.d.ts +9 -2
  93. package/dist/components/VvNav/index.d.ts +4 -1
  94. package/dist/components/VvNavItem/VvNavItem.es.js +29 -8
  95. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -1
  96. package/dist/components/VvProgress/VvProgress.es.js +33 -9
  97. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  98. package/dist/components/VvProgress/VvProgress.vue.d.ts +9 -2
  99. package/dist/components/VvProgress/index.d.ts +4 -1
  100. package/dist/components/VvRadio/VvRadio.es.js +56 -17
  101. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  102. package/dist/components/VvRadio/VvRadio.vue.d.ts +94 -22
  103. package/dist/components/VvRadio/index.d.ts +44 -11
  104. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +64 -19
  105. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  106. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +93 -22
  107. package/dist/components/VvRadioGroup/index.d.ts +44 -11
  108. package/dist/components/VvSelect/VvSelect.es.js +95 -138
  109. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  110. package/dist/components/VvSelect/VvSelect.vue.d.ts +97 -24
  111. package/dist/components/VvSelect/index.d.ts +46 -12
  112. package/dist/components/VvTab/VvTab.es.js +33 -9
  113. package/dist/components/VvTab/VvTab.umd.js +1 -1
  114. package/dist/components/VvTab/VvTab.vue.d.ts +9 -2
  115. package/dist/components/VvTab/index.d.ts +4 -1
  116. package/dist/components/VvTextarea/VvTextarea.es.js +109 -143
  117. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  118. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +141 -34
  119. package/dist/components/VvTextarea/index.d.ts +66 -17
  120. package/dist/components/VvTooltip/VvTooltip.es.js +33 -9
  121. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  122. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +9 -2
  123. package/dist/components/VvTooltip/index.d.ts +4 -1
  124. package/dist/components/index.es.js +217 -249
  125. package/dist/components/index.umd.js +1 -1
  126. package/dist/composables/useComponentIcon.d.ts +9 -8
  127. package/dist/directives/index.es.js +33 -9
  128. package/dist/directives/index.umd.js +1 -1
  129. package/dist/directives/v-tooltip.es.js +33 -9
  130. package/dist/directives/v-tooltip.umd.js +1 -1
  131. package/dist/icons.es.js +3 -3
  132. package/dist/icons.umd.js +1 -1
  133. package/dist/props/index.d.ts +251 -61
  134. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +15 -4
  135. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +77 -22
  136. package/dist/stories/Icon/Icon.settings.d.ts +1 -0
  137. package/package.json +33 -33
  138. package/src/assets/icons/detailed.json +1 -1
  139. package/src/assets/icons/normal.json +1 -1
  140. package/src/assets/icons/simple.json +1 -1
  141. package/src/components/VvAlert/index.ts +1 -3
  142. package/src/components/VvAlertGroup/index.ts +2 -1
  143. package/src/components/VvButton/VvButton.vue +6 -6
  144. package/src/components/VvButton/index.ts +2 -4
  145. package/src/components/VvCombobox/VvCombobox.vue +5 -8
  146. package/src/components/VvIcon/VvIcon.vue +2 -2
  147. package/src/components/VvIcon/index.ts +22 -48
  148. package/src/components/VvInputFile/VvInputFile.vue +33 -10
  149. package/src/components/VvInputText/VvInputText.vue +11 -12
  150. package/src/components/VvSelect/VvSelect.vue +5 -8
  151. package/src/components/VvTextarea/VvTextarea.vue +5 -8
  152. package/src/composables/useComponentIcon.ts +15 -14
  153. package/src/props/index.ts +89 -25
  154. package/src/stories/Icon/Icon.settings.ts +3 -3
@@ -1,69 +1,41 @@
1
- import type { PropType } from 'vue';
2
1
  import type { IconifyIconOnLoad, IconifyRenderMode } from '@iconify/vue';
3
2
  export declare enum IconPrefix {
4
3
  simple = "simple",
5
4
  normal = "normal",
6
5
  detailed = "detailed"
7
6
  }
8
- export declare const VvIconProps: {
9
- /**
10
- * Color
11
- */
12
- color: StringConstructor;
13
- /**
14
- * Width
15
- */
16
- width: {
17
- type: (StringConstructor | NumberConstructor)[];
18
- };
19
- /**
20
- * Height
21
- */
22
- height: {
23
- type: (StringConstructor | NumberConstructor)[];
24
- };
7
+ export type VvIconProps = {
25
8
  /**
26
9
  * Icon name
27
10
  * Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
28
11
  * https://docs.iconify.design/api/providers.html#provider-in-icon-name
29
12
  */
30
- name: {
31
- type: StringConstructor;
32
- required: boolean;
33
- };
13
+ name: string;
14
+ color?: string;
15
+ width?: string | number;
16
+ height?: string | number;
34
17
  /**
35
- * By default 'vv'
36
18
  * If custom collection is not added with "addCollection" DS class method, this prop could not be used
37
19
  * Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
38
20
  */
39
- provider: {
40
- type: StringConstructor;
41
- };
21
+ provider?: string;
42
22
  /**
23
+ * @default 'normal'
43
24
  * The name of icon set.
44
25
  * Icon default options prefix: simple | normal | detailed
45
26
  */
46
- prefix: {
47
- type: PropType<string>;
48
- default: string;
49
- };
27
+ prefix?: IconPrefix | string;
50
28
  /**
51
29
  * Url remote SVG icon
52
30
  */
53
- src: StringConstructor;
54
- /**
55
- * Horizontal flip
56
- */
57
- horizontalFlip: BooleanConstructor;
58
- /**
59
- * Vertical flip
60
- */
61
- verticalFlip: BooleanConstructor;
31
+ src?: string;
32
+ horizontalFlip?: boolean;
33
+ verticalFlip?: boolean;
62
34
  /**
63
35
  * String alternative to "horizontalFlip" and "verticalFlip".
64
36
  * Example: https://docs.iconify.design/icon-components/vue/transform.html
65
37
  */
66
- flip: StringConstructor;
38
+ flip?: string;
67
39
  /**
68
40
  * Icon render mode
69
41
  * 'style' = 'bg' or 'mask', depending on icon content
@@ -72,30 +44,31 @@ export declare const VvIconProps: {
72
44
  * 'svg' = svg
73
45
  * Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
74
46
  */
75
- mode: PropType<IconifyRenderMode>;
47
+ mode?: IconifyRenderMode;
76
48
  /**
77
49
  * Toggles inline or block mode
78
50
  * Example https://docs.iconify.design/icon-components/vue/inline.html
79
51
  */
80
- inline: BooleanConstructor;
52
+ inline?: boolean;
81
53
  /**
82
54
  * rotates icon
83
55
  * Example https://docs.iconify.design/icon-components/vue/transform.html
84
56
  */
85
- rotate: (StringConstructor | NumberConstructor)[];
57
+ rotate?: number | string;
86
58
  /**
87
59
  * A callback that is called when icon data has been loaded
88
60
  */
89
- onLoad: PropType<IconifyIconOnLoad>;
61
+ onLoad?: IconifyIconOnLoad;
90
62
  /**
91
63
  * SVG icon string
92
64
  */
93
- svg: StringConstructor;
65
+ svg?: string;
94
66
  /**
95
67
  * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
96
68
  * @values string | string[]
97
69
  */
98
- modifiers: {
99
- type: PropType<string | string[]>;
100
- };
70
+ modifiers?: string | string[];
71
+ };
72
+ export declare const VvIconPropsDefaults: {
73
+ prefix: IconPrefix;
101
74
  };
@@ -1,100 +1,10 @@
1
- import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, watch, resolveDynamicComponent, withCtx, renderSlot, createTextVNode, toDisplayString, toRef, useAttrs, useSlots, createElementBlock, Fragment, isRef, h, onBeforeUnmount, normalizeClass, withModifiers, createVNode, createElementVNode, renderList, createSlots, normalizeProps, guardReactiveProps } from "vue";
1
+ import { inject, computed, unref, defineComponent, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, watch, resolveDynamicComponent, withCtx, renderSlot, createTextVNode, toDisplayString, toRef, useAttrs, useSlots, createElementBlock, Fragment, isRef, h, onBeforeUnmount, normalizeClass, withModifiers, createVNode, createElementVNode, renderList, createSlots, normalizeProps, guardReactiveProps } from "vue";
2
2
  import { useVModel } from "@vueuse/core";
3
3
  import { iconExists, Icon, addIcon } from "@iconify/vue";
4
4
  import { uid } from "uid";
5
- const VvIconProps = {
6
- /**
7
- * Color
8
- */
9
- color: String,
10
- /**
11
- * Width
12
- */
13
- width: {
14
- type: [String, Number]
15
- },
16
- /**
17
- * Height
18
- */
19
- height: {
20
- type: [String, Number]
21
- },
22
- /**
23
- * Icon name
24
- * Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
25
- * https://docs.iconify.design/api/providers.html#provider-in-icon-name
26
- */
27
- name: {
28
- type: String,
29
- required: true
30
- },
31
- /**
32
- * By default 'vv'
33
- * If custom collection is not added with "addCollection" DS class method, this prop could not be used
34
- * Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
35
- */
36
- provider: {
37
- type: String
38
- },
39
- /**
40
- * The name of icon set.
41
- * Icon default options prefix: simple | normal | detailed
42
- */
43
- prefix: {
44
- type: String,
45
- default: "normal"
46
- },
47
- /**
48
- * Url remote SVG icon
49
- */
50
- src: String,
51
- /**
52
- * Horizontal flip
53
- */
54
- horizontalFlip: Boolean,
55
- /**
56
- * Vertical flip
57
- */
58
- verticalFlip: Boolean,
59
- /**
60
- * String alternative to "horizontalFlip" and "verticalFlip".
61
- * Example: https://docs.iconify.design/icon-components/vue/transform.html
62
- */
63
- flip: String,
64
- /**
65
- * Icon render mode
66
- * 'style' = 'bg' or 'mask', depending on icon content
67
- * 'bg' = span with style using `background`
68
- * 'mask' = span with style using `mask`
69
- * 'svg' = svg
70
- * Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
71
- */
72
- mode: String,
73
- /**
74
- * Toggles inline or block mode
75
- * Example https://docs.iconify.design/icon-components/vue/inline.html
76
- */
77
- inline: Boolean,
78
- /**
79
- * rotates icon
80
- * Example https://docs.iconify.design/icon-components/vue/transform.html
81
- */
82
- rotate: [Number, String],
83
- /**
84
- * A callback that is called when icon data has been loaded
85
- */
86
- onLoad: Function,
87
- /**
88
- * SVG icon string
89
- */
90
- svg: String,
91
- /**
92
- * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
93
- * @values string | string[]
94
- */
95
- modifiers: {
96
- type: [String, Array]
97
- }
5
+ const VvIconPropsDefaults = {
6
+ prefix: "normal"
7
+ /* normal */
98
8
  };
99
9
  var Strategy = /* @__PURE__ */ ((Strategy2) => {
100
10
  Strategy2["absolute"] = "absolute";
@@ -183,7 +93,24 @@ const __default__$3 = {
183
93
  };
184
94
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
185
95
  ...__default__$3,
186
- props: VvIconProps,
96
+ props: mergeDefaults({
97
+ name: {},
98
+ color: {},
99
+ width: {},
100
+ height: {},
101
+ provider: {},
102
+ prefix: {},
103
+ src: {},
104
+ horizontalFlip: { type: Boolean },
105
+ verticalFlip: { type: Boolean },
106
+ flip: {},
107
+ mode: {},
108
+ inline: { type: Boolean },
109
+ rotate: {},
110
+ onLoad: { type: Function },
111
+ svg: {},
112
+ modifiers: {}
113
+ }, VvIconPropsDefaults),
187
114
  setup(__props) {
188
115
  const props = __props;
189
116
  const hasRotate = computed(() => {
@@ -291,6 +218,7 @@ const LinkProps = {
291
218
  */
292
219
  target: {
293
220
  type: String,
221
+ default: void 0,
294
222
  validator: (value) => Object.values(AnchorTarget).includes(value)
295
223
  },
296
224
  /**
@@ -305,27 +233,33 @@ const ValidProps = {
305
233
  /**
306
234
  * Valid status
307
235
  */
308
- valid: Boolean,
236
+ valid: { type: Boolean, default: false },
309
237
  /**
310
238
  * Valid label
311
239
  */
312
- validLabel: [String, Array]
240
+ validLabel: { type: [String, Array], default: void 0 }
313
241
  };
314
242
  const InvalidProps = {
315
243
  /**
316
244
  * Invalid status
317
245
  */
318
- invalid: Boolean,
246
+ invalid: {
247
+ type: Boolean,
248
+ default: false
249
+ },
319
250
  /**
320
251
  * Invalid label
321
252
  */
322
- invalidLabel: [String, Array]
253
+ invalidLabel: { type: [String, Array], default: void 0 }
323
254
  };
324
255
  const LoadingProps = {
325
256
  /**
326
257
  * Loading status
327
258
  */
328
- loading: Boolean,
259
+ loading: {
260
+ type: Boolean,
261
+ default: false
262
+ },
329
263
  /**
330
264
  * Loading label
331
265
  */
@@ -338,47 +272,68 @@ const DisabledProps = {
338
272
  /**
339
273
  * Whether the form control is disabled
340
274
  */
341
- disabled: Boolean
275
+ disabled: {
276
+ type: Boolean,
277
+ default: false
278
+ }
342
279
  };
343
280
  const ActiveProps = {
344
281
  /**
345
282
  * Whether the item is active
346
283
  */
347
- active: Boolean
284
+ active: {
285
+ type: Boolean,
286
+ default: false
287
+ }
348
288
  };
349
289
  const CurrentProps = {
350
290
  /**
351
291
  * Whether the item is current
352
292
  */
353
- current: Boolean
293
+ current: {
294
+ type: Boolean,
295
+ default: false
296
+ }
354
297
  };
355
298
  const PressedProps = {
356
299
  /**
357
300
  * Whether the item is pressed
358
301
  */
359
- pressed: Boolean
302
+ pressed: {
303
+ type: Boolean,
304
+ default: false
305
+ }
360
306
  };
361
307
  const LabelProps = {
362
308
  /**
363
309
  * The item label
364
310
  */
365
- label: [String, Number]
311
+ label: {
312
+ type: [String, Number],
313
+ default: void 0
314
+ }
366
315
  };
367
316
  const ModifiersProps = {
368
317
  /**
369
318
  * Component BEM modifiers
370
319
  */
371
- modifiers: [String, Array]
320
+ modifiers: {
321
+ type: [String, Array],
322
+ default: void 0
323
+ }
372
324
  };
373
325
  const HintProps = {
374
326
  hintLabel: { type: String, default: "" }
375
327
  };
376
- ({
328
+ const IconProps = {
377
329
  /**
378
330
  * VvIcon name or props
379
331
  * @see VVIcon
380
332
  */
381
- icon: { type: [String, Object] },
333
+ icon: {
334
+ type: [String, Object],
335
+ default: void 0
336
+ },
382
337
  /**
383
338
  * VvIcon position
384
339
  */
@@ -387,7 +342,7 @@ const HintProps = {
387
342
  default: Position.before,
388
343
  validation: (value) => Object.values(Position).includes(value)
389
344
  }
390
- });
345
+ };
391
346
  const UnselectableProps = {
392
347
  /**
393
348
  * If true the input will be unselectable
@@ -422,7 +377,8 @@ const IdProps = {
422
377
  * Dropdown show / hide transition name
423
378
  */
424
379
  transitionName: {
425
- type: String
380
+ type: String,
381
+ default: void 0
426
382
  },
427
383
  /**
428
384
  * Offset of the dropdown from the trigger
@@ -490,7 +446,8 @@ const IdProps = {
490
446
  * Set dropdown width to the same as the trigger
491
447
  */
492
448
  triggerWidth: {
493
- type: Boolean
449
+ type: Boolean,
450
+ default: false
494
451
  }
495
452
  });
496
453
  const ActionProps = {
@@ -774,10 +731,7 @@ const VvButtonProps = {
774
731
  ...ModifiersProps,
775
732
  ...UnselectableProps,
776
733
  ...LoadingProps,
777
- /**
778
- * Button icon
779
- */
780
- icon: [String, Object],
734
+ ...IconProps,
781
735
  /**
782
736
  * Button icon position
783
737
  */
@@ -872,6 +826,41 @@ function useGroupProps(props, emit) {
872
826
  };
873
827
  }
874
828
  const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
829
+ function useComponentIcon(icon, iconPosition) {
830
+ const hasIcon = computed(() => {
831
+ if (typeof (icon == null ? void 0 : icon.value) === "string") {
832
+ return { name: icon == null ? void 0 : icon.value };
833
+ }
834
+ return icon == null ? void 0 : icon.value;
835
+ });
836
+ const hasIconBefore = computed(
837
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
838
+ );
839
+ const hasIconAfter = computed(
840
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
841
+ );
842
+ const hasIconLeft = computed(
843
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
844
+ );
845
+ const hasIconRight = computed(
846
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
847
+ );
848
+ const hasIconTop = computed(
849
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
850
+ );
851
+ const hasIconBottom = computed(
852
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
853
+ );
854
+ return {
855
+ hasIcon,
856
+ hasIconLeft,
857
+ hasIconRight,
858
+ hasIconTop,
859
+ hasIconBottom,
860
+ hasIconBefore,
861
+ hasIconAfter
862
+ };
863
+ }
875
864
  const _hoisted_1$1 = {
876
865
  key: 1,
877
866
  class: "vv-button__label"
@@ -934,9 +923,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
934
923
  )
935
924
  }))
936
925
  );
937
- const hasIconProps = computed(
938
- () => typeof (icon == null ? void 0 : icon.value) === "string" ? { name: icon == null ? void 0 : icon.value } : icon == null ? void 0 : icon.value
939
- );
926
+ const { hasIcon } = useComponentIcon(icon);
940
927
  const toggleValue = computed(() => {
941
928
  return props.value !== void 0 ? props.value : name.value;
942
929
  });
@@ -999,12 +986,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
999
986
  { key: 1 },
1000
987
  [
1001
988
  renderSlot(_ctx.$slots, "before"),
1002
- unref(icon) ? (openBlock(), createBlock(
989
+ unref(hasIcon) ? (openBlock(), createBlock(
1003
990
  _sfc_main$3,
1004
- mergeProps({
1005
- key: 0,
1006
- class: "vv-button__icon"
1007
- }, unref(hasIconProps)),
991
+ mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-button__icon" }),
1008
992
  null,
1009
993
  16
1010
994
  /* FULL_PROPS */
@@ -1231,9 +1215,11 @@ const _hoisted_4 = ["src", "alt"];
1231
1215
  const _hoisted_5 = { class: "vv-input-file__wrapper" };
1232
1216
  const _hoisted_6 = ["id", "placeholder", "aria-describedby", "aria-invalid", "aria-errormessage", "multiple", "accept", "name"];
1233
1217
  const _hoisted_7 = { class: "vv-input-file__list" };
1234
- const _hoisted_8 = { class: "vv-input-file__item-name" };
1235
- const _hoisted_9 = { class: "vv-input-file__item-info" };
1236
- const _hoisted_10 = ["onClick"];
1218
+ const _hoisted_8 = ["onClick"];
1219
+ const _hoisted_9 = ["onClick"];
1220
+ const _hoisted_10 = { class: "vv-input-file__item-name cursor-pointer" };
1221
+ const _hoisted_11 = { class: "vv-input-file__item-info" };
1222
+ const _hoisted_12 = ["onClick"];
1237
1223
  const __default__ = {
1238
1224
  name: "VvInputFile"
1239
1225
  };
@@ -1356,14 +1342,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1356
1342
  toReturn.splice(index, 1);
1357
1343
  localModelValue.value = toReturn;
1358
1344
  };
1345
+ const currentFileIndex = ref(0);
1359
1346
  const previewSrc = computed(() => {
1360
1347
  if (files.value.length === 0) {
1361
1348
  return;
1362
1349
  }
1363
- if (files.value[0] instanceof File) {
1364
- return URL.createObjectURL(files.value[0]);
1350
+ if (files.value[currentFileIndex.value] instanceof File) {
1351
+ return URL.createObjectURL(
1352
+ files.value[currentFileIndex.value]
1353
+ );
1365
1354
  }
1366
- return files.value[0].url;
1355
+ return files.value[currentFileIndex.value].url;
1367
1356
  });
1368
1357
  onBeforeUnmount(() => {
1369
1358
  if (previewSrc.value) {
@@ -1376,6 +1365,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1376
1365
  }
1377
1366
  return Math.floor(size / 1024);
1378
1367
  };
1368
+ const onClickDownloadFile = (file) => {
1369
+ const link = document.createElement("a");
1370
+ if (file instanceof File) {
1371
+ link.href = URL.createObjectURL(file);
1372
+ } else if (file.url) {
1373
+ link.href = file.url;
1374
+ }
1375
+ link.setAttribute("download", file.name);
1376
+ document.body.appendChild(link);
1377
+ link.click();
1378
+ };
1379
1379
  return (_ctx, _cache) => {
1380
1380
  return openBlock(), createElementBlock(
1381
1381
  "div",
@@ -1405,14 +1405,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1405
1405
  class: normalizeClass([{
1406
1406
  "absolute top-8 right-8": previewSrc.value
1407
1407
  }, "z-1"]),
1408
- icon: !previewSrc.value ? "image" : "edit",
1408
+ icon: !previewSrc.value ? "image" : isMultiple.value ? "add" : "edit",
1409
1409
  onClick: withModifiers(onClick, ["stop"])
1410
1410
  }, null, 8, ["label", "class", "icon", "onClick"]),
1411
1411
  createElementVNode("picture", _hoisted_3, [
1412
1412
  previewSrc.value ? (openBlock(), createElementBlock("img", {
1413
1413
  key: 0,
1414
1414
  src: previewSrc.value,
1415
- alt: files.value[0].name
1415
+ alt: files.value[currentFileIndex.value].name
1416
1416
  }, null, 8, _hoisted_4)) : createCommentVNode("v-if", true)
1417
1417
  ])
1418
1418
  ])
@@ -1448,22 +1448,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1448
1448
  renderList(files.value, (file, index) => {
1449
1449
  return openBlock(), createElementBlock("li", {
1450
1450
  key: index,
1451
- class: "vv-input-file__item"
1451
+ class: "vv-input-file__item",
1452
+ onClick: withModifiers(($event) => currentFileIndex.value = index, ["stop"])
1452
1453
  }, [
1453
- createVNode(_sfc_main$3, {
1454
- class: "vv-input-file__item-icon",
1455
- name: "akar-icons:file"
1456
- }),
1454
+ createElementVNode("button", {
1455
+ type: "button",
1456
+ class: "vv-input-file__item-icon cursor-pointer",
1457
+ title: "Download",
1458
+ "aria-label": "download-file",
1459
+ onClick: withModifiers(($event) => onClickDownloadFile(file), ["stop"])
1460
+ }, [
1461
+ createVNode(_sfc_main$3, { name: "download" })
1462
+ ], 8, _hoisted_9),
1457
1463
  createElementVNode(
1458
1464
  "div",
1459
- _hoisted_8,
1465
+ _hoisted_10,
1460
1466
  toDisplayString(file.name),
1461
1467
  1
1462
1468
  /* TEXT */
1463
1469
  ),
1464
1470
  createElementVNode(
1465
1471
  "small",
1466
- _hoisted_9,
1472
+ _hoisted_11,
1467
1473
  toDisplayString(sizeInKiB(file.size)) + " KB ",
1468
1474
  1
1469
1475
  /* TEXT */
@@ -1474,8 +1480,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1474
1480
  title: "Remove",
1475
1481
  "aria-label": "remove-file",
1476
1482
  onClick: withModifiers(($event) => onClickRemoveFile(index), ["stop"])
1477
- }, null, 8, _hoisted_10)
1478
- ]);
1483
+ }, null, 8, _hoisted_12)
1484
+ ], 8, _hoisted_8);
1479
1485
  }),
1480
1486
  128
1481
1487
  /* KEYED_FRAGMENT */