@volverjs/ui-vue 0.0.10-beta.14 → 0.0.10-beta.16

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 +108 -124
  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 +179 -233
  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 +1 -1
  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,4 +1,4 @@
1
- import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, watch, Fragment, renderList, createBlock, mergeProps, withCtx, resolveDynamicComponent, createCommentVNode, createVNode, TransitionGroup, toHandlers, useSlots, h, onMounted, withDirectives, vModelCheckbox, createSlots, nextTick, Transition, normalizeStyle, vShow, vModelSelect, vModelText, vModelRadio, onBeforeUnmount } from "vue";
1
+ import { unref, inject, computed, toRef, toRefs, defineComponent, useAttrs, ref, openBlock, createElementBlock, normalizeClass, createElementVNode, withModifiers, renderSlot, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, isRef, provide, watchEffect, watch, Fragment, renderList, createBlock, mergeProps, withCtx, resolveDynamicComponent, mergeDefaults, createCommentVNode, createVNode, TransitionGroup, toHandlers, useSlots, h, onMounted, withDirectives, vModelCheckbox, createSlots, nextTick, Transition, normalizeStyle, vShow, vModelSelect, vModelText, vModelRadio, onBeforeUnmount } from "vue";
2
2
  import { uid } from "uid";
3
3
  import { useToggle, useStorage, useVModel, useMutationObserver, onClickOutside, useFocusWithin, onKeyStroke, useElementHover, useFocus, useElementVisibility, refDebounced, computedAsync } from "@vueuse/core";
4
4
  import { iconExists, Icon, addIcon } from "@iconify/vue";
@@ -104,6 +104,7 @@ const LinkProps = {
104
104
  */
105
105
  target: {
106
106
  type: String,
107
+ default: void 0,
107
108
  validator: (value) => Object.values(AnchorTarget).includes(value)
108
109
  },
109
110
  /**
@@ -118,27 +119,33 @@ const ValidProps = {
118
119
  /**
119
120
  * Valid status
120
121
  */
121
- valid: Boolean,
122
+ valid: { type: Boolean, default: false },
122
123
  /**
123
124
  * Valid label
124
125
  */
125
- validLabel: [String, Array]
126
+ validLabel: { type: [String, Array], default: void 0 }
126
127
  };
127
128
  const InvalidProps = {
128
129
  /**
129
130
  * Invalid status
130
131
  */
131
- invalid: Boolean,
132
+ invalid: {
133
+ type: Boolean,
134
+ default: false
135
+ },
132
136
  /**
133
137
  * Invalid label
134
138
  */
135
- invalidLabel: [String, Array]
139
+ invalidLabel: { type: [String, Array], default: void 0 }
136
140
  };
137
141
  const LoadingProps = {
138
142
  /**
139
143
  * Loading status
140
144
  */
141
- loading: Boolean,
145
+ loading: {
146
+ type: Boolean,
147
+ default: false
148
+ },
142
149
  /**
143
150
  * Loading label
144
151
  */
@@ -151,49 +158,73 @@ const DisabledProps = {
151
158
  /**
152
159
  * Whether the form control is disabled
153
160
  */
154
- disabled: Boolean
161
+ disabled: {
162
+ type: Boolean,
163
+ default: false
164
+ }
155
165
  };
156
166
  const SelectedProps = {
157
167
  /**
158
168
  * Whether the item is selected
159
169
  */
160
- selected: Boolean
170
+ selected: {
171
+ type: Boolean,
172
+ default: false
173
+ }
161
174
  };
162
175
  const ActiveProps = {
163
176
  /**
164
177
  * Whether the item is active
165
178
  */
166
- active: Boolean
179
+ active: {
180
+ type: Boolean,
181
+ default: false
182
+ }
167
183
  };
168
184
  const CurrentProps = {
169
185
  /**
170
186
  * Whether the item is current
171
187
  */
172
- current: Boolean
188
+ current: {
189
+ type: Boolean,
190
+ default: false
191
+ }
173
192
  };
174
193
  const PressedProps = {
175
194
  /**
176
195
  * Whether the item is pressed
177
196
  */
178
- pressed: Boolean
197
+ pressed: {
198
+ type: Boolean,
199
+ default: false
200
+ }
179
201
  };
180
202
  const LabelProps = {
181
203
  /**
182
204
  * The item label
183
205
  */
184
- label: [String, Number]
206
+ label: {
207
+ type: [String, Number],
208
+ default: void 0
209
+ }
185
210
  };
186
211
  const ReadonlyProps = {
187
212
  /**
188
213
  * The value is not editable
189
214
  */
190
- readonly: Boolean
215
+ readonly: {
216
+ type: Boolean,
217
+ default: false
218
+ }
191
219
  };
192
220
  const ModifiersProps = {
193
221
  /**
194
222
  * Component BEM modifiers
195
223
  */
196
- modifiers: [String, Array]
224
+ modifiers: {
225
+ type: [String, Array],
226
+ default: void 0
227
+ }
197
228
  };
198
229
  const HintProps = {
199
230
  hintLabel: { type: String, default: "" }
@@ -233,14 +264,20 @@ const DebounceProps = {
233
264
  /**
234
265
  * Milliseconds to wait before emitting the input event
235
266
  */
236
- debounce: [Number, String]
267
+ debounce: {
268
+ type: [Number, String],
269
+ default: void 0
270
+ }
237
271
  };
238
272
  const IconProps = {
239
273
  /**
240
274
  * VvIcon name or props
241
275
  * @see VVIcon
242
276
  */
243
- icon: { type: [String, Object] },
277
+ icon: {
278
+ type: [String, Object],
279
+ default: void 0
280
+ },
244
281
  /**
245
282
  * VvIcon position
246
283
  */
@@ -261,7 +298,10 @@ const FloatingLabelProps = {
261
298
  /**
262
299
  * If true the label will be floating
263
300
  */
264
- floating: Boolean
301
+ floating: {
302
+ type: Boolean,
303
+ default: false
304
+ }
265
305
  };
266
306
  const UnselectableProps = {
267
307
  /**
@@ -297,7 +337,8 @@ const DropdownProps = {
297
337
  * Dropdown show / hide transition name
298
338
  */
299
339
  transitionName: {
300
- type: String
340
+ type: String,
341
+ default: void 0
301
342
  },
302
343
  /**
303
344
  * Offset of the dropdown from the trigger
@@ -365,7 +406,8 @@ const DropdownProps = {
365
406
  * Set dropdown width to the same as the trigger
366
407
  */
367
408
  triggerWidth: {
368
- type: Boolean
409
+ type: Boolean,
410
+ default: false
369
411
  }
370
412
  };
371
413
  const IdNameProps = {
@@ -382,7 +424,10 @@ const AutofocusProps = {
382
424
  * Global attribute autofocus
383
425
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
384
426
  */
385
- autofocus: Boolean
427
+ autofocus: {
428
+ type: Boolean,
429
+ default: false
430
+ }
386
431
  };
387
432
  const AutocompleteProps = {
388
433
  /**
@@ -414,28 +459,34 @@ const InputTextareaProps = {
414
459
  * Available for input types: text, search, url, tel, email, password
415
460
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#minlength
416
461
  */
417
- minlength: [String, Number],
462
+ minlength: { type: [String, Number], default: void 0 },
418
463
  /**
419
464
  * Input / Textarea maxlength
420
465
  * Maximum length (number of characters) of value
421
466
  * Available for input types: text, search, url, tel, email, password
422
467
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#maxlength
423
468
  */
424
- maxlength: [String, Number],
469
+ maxlength: { type: [String, Number], default: void 0 },
425
470
  /**
426
471
  * Input / Textarea placeholder
427
472
  * Text that appears in the form control when it has no value set
428
473
  * Available for input types: text, search, url, tel, email, password, number
429
474
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#placeholder
430
475
  */
431
- placeholder: String,
476
+ placeholder: {
477
+ type: String,
478
+ default: void 0
479
+ },
432
480
  /**
433
481
  * Input / Textarea required
434
482
  * A value is required or must be check for the form to be submittable
435
483
  * Available for all input types except color
436
484
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#required
437
485
  */
438
- required: Boolean
486
+ required: {
487
+ type: Boolean,
488
+ default: false
489
+ }
439
490
  };
440
491
  const CheckboxRadioProps = {
441
492
  ...IdNameProps,
@@ -452,11 +503,17 @@ const CheckboxRadioProps = {
452
503
  * Input value
453
504
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
454
505
  */
455
- value: [String, Number, Boolean],
506
+ value: {
507
+ type: [String, Number, Boolean],
508
+ default: void 0
509
+ },
456
510
  /**
457
511
  * Input value
458
512
  */
459
- modelValue: [Object, Number, Boolean, String]
513
+ modelValue: {
514
+ type: [Object, Number, Boolean, String],
515
+ default: void 0
516
+ }
460
517
  };
461
518
  const CheckboxRadioGroupProps = {
462
519
  ...ValidProps,
@@ -471,7 +528,10 @@ const CheckboxRadioGroupProps = {
471
528
  /**
472
529
  * Input value
473
530
  */
474
- modelValue: [String, Array, Boolean, Number, Symbol],
531
+ modelValue: {
532
+ type: [String, Array, Boolean, Number, Symbol],
533
+ default: void 0
534
+ },
475
535
  /**
476
536
  * Input name
477
537
  */
@@ -479,7 +539,10 @@ const CheckboxRadioGroupProps = {
479
539
  /**
480
540
  * If true, the group will be displayed in a vertical column
481
541
  */
482
- vertical: Boolean
542
+ vertical: {
543
+ type: Boolean,
544
+ default: false
545
+ }
483
546
  };
484
547
  const ActionProps = {
485
548
  ...DisabledProps,
@@ -1157,106 +1220,33 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
1157
1220
  };
1158
1221
  }
1159
1222
  });
1160
- const VvIconProps = {
1161
- /**
1162
- * Color
1163
- */
1164
- color: String,
1165
- /**
1166
- * Width
1167
- */
1168
- width: {
1169
- type: [String, Number]
1170
- },
1171
- /**
1172
- * Height
1173
- */
1174
- height: {
1175
- type: [String, Number]
1176
- },
1177
- /**
1178
- * Icon name
1179
- * Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
1180
- * https://docs.iconify.design/api/providers.html#provider-in-icon-name
1181
- */
1182
- name: {
1183
- type: String,
1184
- required: true
1185
- },
1186
- /**
1187
- * By default 'vv'
1188
- * If custom collection is not added with "addCollection" DS class method, this prop could not be used
1189
- * Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
1190
- */
1191
- provider: {
1192
- type: String
1193
- },
1194
- /**
1195
- * The name of icon set.
1196
- * Icon default options prefix: simple | normal | detailed
1197
- */
1198
- prefix: {
1199
- type: String,
1200
- default: "normal"
1201
- },
1202
- /**
1203
- * Url remote SVG icon
1204
- */
1205
- src: String,
1206
- /**
1207
- * Horizontal flip
1208
- */
1209
- horizontalFlip: Boolean,
1210
- /**
1211
- * Vertical flip
1212
- */
1213
- verticalFlip: Boolean,
1214
- /**
1215
- * String alternative to "horizontalFlip" and "verticalFlip".
1216
- * Example: https://docs.iconify.design/icon-components/vue/transform.html
1217
- */
1218
- flip: String,
1219
- /**
1220
- * Icon render mode
1221
- * 'style' = 'bg' or 'mask', depending on icon content
1222
- * 'bg' = span with style using `background`
1223
- * 'mask' = span with style using `mask`
1224
- * 'svg' = svg
1225
- * Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
1226
- */
1227
- mode: String,
1228
- /**
1229
- * Toggles inline or block mode
1230
- * Example https://docs.iconify.design/icon-components/vue/inline.html
1231
- */
1232
- inline: Boolean,
1233
- /**
1234
- * rotates icon
1235
- * Example https://docs.iconify.design/icon-components/vue/transform.html
1236
- */
1237
- rotate: [Number, String],
1238
- /**
1239
- * A callback that is called when icon data has been loaded
1240
- */
1241
- onLoad: Function,
1242
- /**
1243
- * SVG icon string
1244
- */
1245
- svg: String,
1246
- /**
1247
- * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
1248
- * @values string | string[]
1249
- */
1250
- modifiers: {
1251
- type: [String, Array]
1252
- }
1223
+ const VvIconPropsDefaults = {
1224
+ prefix: "normal"
1225
+ /* normal */
1253
1226
  };
1254
1227
  const __default__$o = {
1255
1228
  name: "VvIcon"
1256
1229
  };
1257
1230
  const _sfc_main$u = /* @__PURE__ */ defineComponent({
1258
1231
  ...__default__$o,
1259
- props: VvIconProps,
1232
+ props: mergeDefaults({
1233
+ name: {},
1234
+ color: {},
1235
+ width: {},
1236
+ height: {},
1237
+ provider: {},
1238
+ prefix: {},
1239
+ src: {},
1240
+ horizontalFlip: { type: Boolean },
1241
+ verticalFlip: { type: Boolean },
1242
+ flip: {},
1243
+ mode: {},
1244
+ inline: { type: Boolean },
1245
+ rotate: {},
1246
+ onLoad: { type: Function },
1247
+ svg: {},
1248
+ modifiers: {}
1249
+ }, VvIconPropsDefaults),
1260
1250
  setup(__props) {
1261
1251
  const props = __props;
1262
1252
  const hasRotate = computed(() => {
@@ -1351,6 +1341,41 @@ function useInjectedAlertGroup() {
1351
1341
  return inject(INJECTION_KEY_ALERT_GROUP, {});
1352
1342
  }
1353
1343
  const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
1344
+ function useComponentIcon(icon, iconPosition) {
1345
+ const hasIcon = computed(() => {
1346
+ if (typeof (icon == null ? void 0 : icon.value) === "string") {
1347
+ return { name: icon == null ? void 0 : icon.value };
1348
+ }
1349
+ return icon == null ? void 0 : icon.value;
1350
+ });
1351
+ const hasIconBefore = computed(
1352
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
1353
+ );
1354
+ const hasIconAfter = computed(
1355
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
1356
+ );
1357
+ const hasIconLeft = computed(
1358
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
1359
+ );
1360
+ const hasIconRight = computed(
1361
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
1362
+ );
1363
+ const hasIconTop = computed(
1364
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
1365
+ );
1366
+ const hasIconBottom = computed(
1367
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
1368
+ );
1369
+ return {
1370
+ hasIcon,
1371
+ hasIconLeft,
1372
+ hasIconRight,
1373
+ hasIconTop,
1374
+ hasIconBottom,
1375
+ hasIconBefore,
1376
+ hasIconAfter
1377
+ };
1378
+ }
1354
1379
  const VvAlertProps = {
1355
1380
  ...IdProps,
1356
1381
  ...ModifiersProps,
@@ -1427,9 +1452,7 @@ const useVvAlert = (props, emit) => {
1427
1452
  const { bus } = useInjectedAlertGroup();
1428
1453
  const hasId = useUniqueId(computed(() => props.id));
1429
1454
  const hasTitleId = computed(() => `${hasId.value}-title`);
1430
- const hasIcon = computed(
1431
- () => typeof props.icon === "string" ? { name: props.icon } : props.icon
1432
- );
1455
+ const { hasIcon } = useComponentIcon(computed(() => props.icon));
1433
1456
  const hasClass = useModifiers(
1434
1457
  "vv-alert",
1435
1458
  computed(() => props.modifiers),
@@ -2060,10 +2083,7 @@ const VvButtonProps = {
2060
2083
  ...ModifiersProps,
2061
2084
  ...UnselectableProps,
2062
2085
  ...LoadingProps,
2063
- /**
2064
- * Button icon
2065
- */
2066
- icon: [String, Object],
2086
+ ...IconProps,
2067
2087
  /**
2068
2088
  * Button icon position
2069
2089
  */
@@ -2219,9 +2239,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
2219
2239
  )
2220
2240
  }))
2221
2241
  );
2222
- const hasIconProps = computed(
2223
- () => typeof (icon == null ? void 0 : icon.value) === "string" ? { name: icon == null ? void 0 : icon.value } : icon == null ? void 0 : icon.value
2224
- );
2242
+ const { hasIcon } = useComponentIcon(icon);
2225
2243
  const toggleValue = computed(() => {
2226
2244
  return props.value !== void 0 ? props.value : name.value;
2227
2245
  });
@@ -2284,12 +2302,9 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
2284
2302
  { key: 1 },
2285
2303
  [
2286
2304
  renderSlot(_ctx.$slots, "before"),
2287
- unref(icon) ? (openBlock(), createBlock(
2305
+ unref(hasIcon) ? (openBlock(), createBlock(
2288
2306
  _sfc_main$u,
2289
- mergeProps({
2290
- key: 0,
2291
- class: "vv-button__icon"
2292
- }, unref(hasIconProps)),
2307
+ mergeProps({ key: 0 }, unref(hasIcon), { class: "vv-button__icon" }),
2293
2308
  null,
2294
2309
  16
2295
2310
  /* FULL_PROPS */
@@ -3874,41 +3889,6 @@ function useComponentFocus(inputTemplateRef, emit) {
3874
3889
  focused
3875
3890
  };
3876
3891
  }
3877
- function useComponentIcon(icon, iconPosition) {
3878
- const hasIconBefore = computed(
3879
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.before)
3880
- );
3881
- const hasIconAfter = computed(
3882
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.after)
3883
- );
3884
- const hasIconLeft = computed(
3885
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.left)
3886
- );
3887
- const hasIconRight = computed(
3888
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.right)
3889
- );
3890
- const hasIconTop = computed(
3891
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.top)
3892
- );
3893
- const hasIconBottom = computed(
3894
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.bottom)
3895
- );
3896
- const hasIcon = computed(() => {
3897
- if (typeof (icon == null ? void 0 : icon.value) === "string") {
3898
- return { name: icon == null ? void 0 : icon.value };
3899
- }
3900
- return icon == null ? void 0 : icon.value;
3901
- });
3902
- return {
3903
- hasIcon,
3904
- hasIconLeft,
3905
- hasIconRight,
3906
- hasIconTop,
3907
- hasIconBottom,
3908
- hasIconBefore,
3909
- hasIconAfter
3910
- };
3911
- }
3912
3892
  const _hoisted_1$a = ["for"];
3913
3893
  const _hoisted_2$7 = { class: "vv-select__wrapper" };
3914
3894
  const _hoisted_3$5 = {
@@ -3969,10 +3949,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
3969
3949
  focused.value = true;
3970
3950
  }
3971
3951
  });
3972
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
3973
- icon,
3974
- iconPosition
3975
- );
3952
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
3976
3953
  const isDirty = computed(() => !isEmpty(props.modelValue));
3977
3954
  const isDisabled = computed(() => props.disabled || props.readonly);
3978
3955
  const hasTabindex = computed(() => {
@@ -3996,8 +3973,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
3996
3973
  loading: loading.value,
3997
3974
  disabled: disabled.value,
3998
3975
  readonly: readonly.value,
3999
- "icon-before": hasIconBefore.value,
4000
- "icon-after": hasIconAfter.value,
3976
+ "icon-before": hasIconBefore.value !== void 0,
3977
+ "icon-after": hasIconAfter.value !== void 0,
4001
3978
  dirty: isDirty.value,
4002
3979
  focus: focused.value,
4003
3980
  floating: floating.value,
@@ -4063,10 +4040,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
4063
4040
  createElementVNode("div", _hoisted_4$5, [
4064
4041
  unref(hasIconBefore) ? (openBlock(), createBlock(
4065
4042
  _sfc_main$u,
4066
- mergeProps({
4067
- key: 0,
4068
- class: "vv-select__icon"
4069
- }, unref(hasIcon)),
4043
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
4070
4044
  null,
4071
4045
  16
4072
4046
  /* FULL_PROPS */
@@ -4127,10 +4101,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
4127
4101
  ]),
4128
4102
  unref(hasIconAfter) ? (openBlock(), createBlock(
4129
4103
  _sfc_main$u,
4130
- mergeProps({
4131
- key: 1,
4132
- class: "vv-select__icon vv-select__icon-after"
4133
- }, unref(hasIcon)),
4104
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
4134
4105
  null,
4135
4106
  16
4136
4107
  /* FULL_PROPS */
@@ -4315,10 +4286,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4315
4286
  const localLoading = ref(false);
4316
4287
  const isLoading = computed(() => localLoading.value || loading.value);
4317
4288
  const dropdownEl = ref();
4318
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
4319
- icon,
4320
- iconPosition
4321
- );
4289
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
4322
4290
  const isDirty = computed(() => !isEmpty(props.modelValue));
4323
4291
  const hasTabindex = computed(() => {
4324
4292
  return disabled.value || readonly.value ? -1 : props.tabindex;
@@ -4330,8 +4298,8 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4330
4298
  disabled: disabled.value,
4331
4299
  loading: isLoading.value,
4332
4300
  readonly: readonly.value,
4333
- "icon-before": Boolean(hasIconBefore.value),
4334
- "icon-after": Boolean(hasIconAfter.value),
4301
+ "icon-before": hasIconBefore.value !== void 0,
4302
+ "icon-after": hasIconAfter.value !== void 0,
4335
4303
  valid: valid.value,
4336
4304
  invalid: invalid.value,
4337
4305
  dirty: isDirty.value,
@@ -4520,10 +4488,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4520
4488
  createElementVNode("div", _hoisted_5$3, [
4521
4489
  unref(hasIconBefore) ? (openBlock(), createBlock(
4522
4490
  _sfc_main$u,
4523
- mergeProps({
4524
- key: 0,
4525
- class: "vv-select__icon"
4526
- }, unref(hasIcon)),
4491
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
4527
4492
  null,
4528
4493
  16
4529
4494
  /* FULL_PROPS */
@@ -4603,10 +4568,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
4603
4568
  ], 16, _hoisted_6$3),
4604
4569
  unref(hasIconAfter) ? (openBlock(), createBlock(
4605
4570
  _sfc_main$u,
4606
- mergeProps({
4607
- key: 1,
4608
- class: "vv-select__icon vv-select__icon-after"
4609
- }, unref(hasIcon)),
4571
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
4610
4572
  null,
4611
4573
  16
4612
4574
  /* FULL_PROPS */
@@ -5762,11 +5724,11 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5762
5724
  const onClear = () => {
5763
5725
  localModelValue.value = "";
5764
5726
  };
5765
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
5766
- icon,
5767
- iconPosition
5768
- );
5769
- const defaultAfterIcon = computed(() => {
5727
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
5728
+ const iconAfter = computed(() => {
5729
+ if (hasIconAfter.value !== void 0) {
5730
+ return hasIconAfter.value;
5731
+ }
5770
5732
  switch (props.type) {
5771
5733
  case INPUT_TYPES.COLOR:
5772
5734
  return { name: TYPES_ICON.COLOR };
@@ -5777,9 +5739,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5777
5739
  return { name: TYPES_ICON.DATE };
5778
5740
  case INPUT_TYPES.TIME:
5779
5741
  return { name: TYPES_ICON.TIME };
5780
- default:
5781
- return "";
5782
5742
  }
5743
+ return void 0;
5783
5744
  });
5784
5745
  const { formatted: countFormatted } = useTextCount(localModelValue, {
5785
5746
  mode: count.value,
@@ -5810,8 +5771,8 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5810
5771
  loading: loading.value,
5811
5772
  disabled: props.disabled,
5812
5773
  readonly: props.readonly,
5813
- "icon-before": hasIconBefore.value,
5814
- "icon-after": hasIconAfter.value || !isEmpty(defaultAfterIcon),
5774
+ "icon-before": hasIconBefore.value !== void 0,
5775
+ "icon-after": iconAfter.value !== void 0,
5815
5776
  floating: props.floating && !isEmpty(props.label),
5816
5777
  dirty: isDirty.value,
5817
5778
  focus: isFocused.value,
@@ -5942,10 +5903,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5942
5903
  }, [
5943
5904
  unref(hasIconBefore) ? (openBlock(), createBlock(
5944
5905
  _sfc_main$u,
5945
- mergeProps({
5946
- key: 0,
5947
- class: "vv-input-text__icon"
5948
- }, unref(hasIcon)),
5906
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-input-text__icon" }),
5949
5907
  null,
5950
5908
  16
5951
5909
  /* FULL_PROPS */
@@ -5970,12 +5928,9 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
5970
5928
  ])
5971
5929
  ])) : createCommentVNode("v-if", true)
5972
5930
  ], 8, _hoisted_4$2),
5973
- unref(hasIconAfter) || unref(defaultAfterIcon) ? (openBlock(), createBlock(
5931
+ unref(iconAfter) ? (openBlock(), createBlock(
5974
5932
  _sfc_main$u,
5975
- mergeProps({
5976
- key: 1,
5977
- class: "vv-input-text__icon vv-input-text__icon-after"
5978
- }, unref(hasIconAfter) ? unref(hasIcon) : unref(defaultAfterIcon)),
5933
+ mergeProps({ key: 1 }, unref(iconAfter), { class: "vv-input-text__icon vv-input-text__icon-after" }),
5979
5934
  null,
5980
5935
  16
5981
5936
  /* FULL_PROPS */
@@ -6732,10 +6687,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6732
6687
  () => props.floating && isEmpty(props.placeholder) ? " " : props.placeholder
6733
6688
  );
6734
6689
  const localModelValue = useDebouncedInput(modelValue, emit, debounce == null ? void 0 : debounce.value);
6735
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
6736
- icon,
6737
- iconPosition
6738
- );
6690
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
6739
6691
  const { focused } = useComponentFocus(textarea, emit);
6740
6692
  const isVisible = useElementVisibility(textarea);
6741
6693
  watch(isVisible, (newValue) => {
@@ -6777,8 +6729,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6777
6729
  loading: loading.value,
6778
6730
  disabled: props.disabled,
6779
6731
  readonly: props.readonly,
6780
- "icon-before": hasIconBefore.value,
6781
- "icon-after": hasIconAfter.value,
6732
+ "icon-before": hasIconBefore.value !== void 0,
6733
+ "icon-after": hasIconAfter.value !== void 0,
6782
6734
  floating: props.floating && !isEmpty(props.label),
6783
6735
  dirty: isDirty.value,
6784
6736
  focus: focused.value,
@@ -6836,10 +6788,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6836
6788
  createElementVNode("div", _hoisted_4$1, [
6837
6789
  unref(hasIconBefore) ? (openBlock(), createBlock(
6838
6790
  _sfc_main$u,
6839
- mergeProps({
6840
- key: 0,
6841
- class: "vv-textarea__icon"
6842
- }, unref(hasIcon)),
6791
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-textarea__icon" }),
6843
6792
  null,
6844
6793
  16
6845
6794
  /* FULL_PROPS */
@@ -6856,10 +6805,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
6856
6805
  ]),
6857
6806
  unref(hasIconAfter) ? (openBlock(), createBlock(
6858
6807
  _sfc_main$u,
6859
- mergeProps({
6860
- key: 1,
6861
- class: "vv-textarea__icon vv-textarea__icon-after"
6862
- }, unref(hasIcon)),
6808
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-textarea__icon vv-textarea__icon-after" }),
6863
6809
  null,
6864
6810
  16
6865
6811
  /* FULL_PROPS */
@@ -7103,7 +7049,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
7103
7049
  toReturn = localModelValue.value && Array.isArray(localModelValue.value) ? [...localModelValue.value] : toReturn;
7104
7050
  }
7105
7051
  for (const file of uploadedFiles) {
7106
- if (hasMax.value && toReturn.length > hasMax.value) {
7052
+ if (hasMax.value && toReturn.length >= hasMax.value) {
7107
7053
  break;
7108
7054
  }
7109
7055
  toReturn.push(file);