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

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 (258) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +98 -3
  3. package/auto-imports.d.ts +6 -2
  4. package/bin/icons.cjs +1 -1
  5. package/bin/icons.js +23 -16
  6. package/dist/Volver.d.ts +1 -1
  7. package/dist/components/VvAccordion/VvAccordion.es.js +70 -14
  8. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  9. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +13 -6
  10. package/dist/components/VvAccordion/index.d.ts +4 -1
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +117 -38
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  13. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -8
  14. package/dist/components/VvAccordionGroup/index.d.ts +4 -1
  15. package/dist/components/VvAction/VvAction.es.js +58 -13
  16. package/dist/components/VvAction/VvAction.umd.js +1 -1
  17. package/dist/components/VvAction/VvAction.vue.d.ts +59 -12
  18. package/dist/components/VvAction/index.d.ts +25 -4
  19. package/dist/components/VvAlert/VvAlert.es.js +195 -152
  20. package/dist/components/VvAlert/VvAlert.umd.js +1 -1
  21. package/dist/components/VvAlert/VvAlert.vue.d.ts +18 -8
  22. package/dist/components/VvAlert/index.d.ts +9 -5
  23. package/dist/components/VvAlertGroup/VvAlertGroup.es.js +240 -174
  24. package/dist/components/VvAlertGroup/VvAlertGroup.umd.js +1 -1
  25. package/dist/components/VvAlertGroup/VvAlertGroup.vue.d.ts +13 -6
  26. package/dist/components/VvAlertGroup/index.d.ts +6 -2
  27. package/dist/components/VvAvatar/VvAvatar.es.js +54 -9
  28. package/dist/components/VvAvatar/VvAvatar.umd.js +1 -1
  29. package/dist/components/VvAvatar/VvAvatar.vue.d.ts +12 -4
  30. package/dist/components/VvAvatar/index.d.ts +4 -1
  31. package/dist/components/VvAvatarGroup/VvAvatarGroup.es.js +111 -36
  32. package/dist/components/VvAvatarGroup/VvAvatarGroup.umd.js +1 -1
  33. package/dist/components/VvAvatarGroup/VvAvatarGroup.vue.d.ts +10 -3
  34. package/dist/components/VvAvatarGroup/index.d.ts +4 -1
  35. package/dist/components/VvBadge/VvBadge.es.js +73 -17
  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 +259 -49
  40. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  41. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +27 -7
  42. package/dist/components/VvBreadcrumb/index.d.ts +6 -10
  43. package/dist/components/VvButton/VvButton.es.js +187 -141
  44. package/dist/components/VvButton/VvButton.umd.js +1 -1
  45. package/dist/components/VvButton/VvButton.vue.d.ts +101 -27
  46. package/dist/components/VvButton/index.d.ts +41 -14
  47. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +69 -16
  48. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  49. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +23 -10
  50. package/dist/components/VvButtonGroup/index.d.ts +8 -2
  51. package/dist/components/VvCard/VvCard.es.js +84 -25
  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 +91 -22
  56. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  57. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +104 -32
  58. package/dist/components/VvCheckbox/index.d.ts +45 -12
  59. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +180 -67
  60. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  61. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +100 -29
  62. package/dist/components/VvCheckboxGroup/index.d.ts +45 -12
  63. package/dist/components/VvCombobox/VvCombobox.es.js +758 -531
  64. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  65. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +181 -108
  66. package/dist/components/VvCombobox/index.d.ts +53 -22
  67. package/dist/components/VvDialog/VvDialog.es.js +136 -141
  68. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  69. package/dist/components/VvDialog/VvDialog.vue.d.ts +4 -4
  70. package/dist/components/VvDropdown/VvDropdown.es.js +121 -55
  71. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  72. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +101 -75
  73. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +72 -11
  74. package/dist/components/VvDropdown/VvDropdownItem.vue.d.ts +1 -1
  75. package/dist/components/VvDropdown/VvDropdownOptgroup.vue.d.ts +12 -4
  76. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +26 -7
  77. package/dist/components/VvDropdown/index.d.ts +16 -11
  78. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +82 -22
  79. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -1
  80. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +13 -7
  81. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.es.js +56 -8
  82. package/dist/components/VvDropdownOptgroup/VvDropdownOptgroup.umd.js +1 -1
  83. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +76 -17
  84. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -1
  85. package/dist/components/VvIcon/VvIcon.es.js +23 -96
  86. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  87. package/dist/components/VvIcon/VvIcon.vue.d.ts +23 -66
  88. package/dist/components/VvIcon/index.d.ts +33 -48
  89. package/dist/components/VvInputFile/VvInputFile.es.js +1734 -0
  90. package/dist/components/VvInputFile/VvInputFile.umd.js +1 -0
  91. package/dist/components/VvInputFile/VvInputFile.vue.d.ts +313 -0
  92. package/dist/components/VvInputFile/index.d.ts +179 -0
  93. package/dist/components/VvInputText/VvInputClearAction.d.ts +7 -5
  94. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +10 -8
  95. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  96. package/dist/components/VvInputText/VvInputText.es.js +331 -293
  97. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  98. package/dist/components/VvInputText/VvInputText.vue.d.ts +162 -55
  99. package/dist/components/VvInputText/index.d.ts +71 -29
  100. package/dist/components/VvNav/VvNav.es.js +151 -73
  101. package/dist/components/VvNav/VvNav.umd.js +1 -1
  102. package/dist/components/VvNav/VvNav.vue.d.ts +41 -14
  103. package/dist/components/VvNav/VvNavItem.vue.d.ts +9 -0
  104. package/dist/components/VvNav/VvNavSeparator.vue.d.ts +2 -0
  105. package/dist/components/VvNav/index.d.ts +5 -13
  106. package/dist/components/VvNavItem/VvNavItem.es.js +436 -0
  107. package/dist/components/VvNavItem/VvNavItem.umd.js +1 -0
  108. package/dist/components/VvNavSeparator/VvNavSeparator.es.js +24 -0
  109. package/dist/components/VvNavSeparator/VvNavSeparator.umd.js +1 -0
  110. package/dist/components/VvProgress/VvProgress.es.js +65 -14
  111. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  112. package/dist/components/VvProgress/VvProgress.vue.d.ts +10 -3
  113. package/dist/components/VvProgress/index.d.ts +4 -1
  114. package/dist/components/VvRadio/VvRadio.es.js +89 -21
  115. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  116. package/dist/components/VvRadio/VvRadio.vue.d.ts +102 -30
  117. package/dist/components/VvRadio/index.d.ts +44 -11
  118. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +180 -66
  119. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  120. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +100 -29
  121. package/dist/components/VvRadioGroup/index.d.ts +45 -12
  122. package/dist/components/VvSelect/VvSelect.es.js +248 -226
  123. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  124. package/dist/components/VvSelect/VvSelect.vue.d.ts +112 -39
  125. package/dist/components/VvSelect/index.d.ts +48 -14
  126. package/dist/components/VvTab/VvTab.es.js +256 -110
  127. package/dist/components/VvTab/VvTab.umd.js +1 -1
  128. package/dist/components/VvTab/VvTab.vue.d.ts +50 -13
  129. package/dist/components/VvTab/index.d.ts +13 -4
  130. package/dist/components/VvTextarea/VvTextarea.es.js +229 -212
  131. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  132. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +155 -48
  133. package/dist/components/VvTextarea/index.d.ts +68 -19
  134. package/dist/components/VvTooltip/VvTooltip.es.js +72 -17
  135. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  136. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +10 -3
  137. package/dist/components/VvTooltip/index.d.ts +4 -1
  138. package/dist/components/common/HintSlot.d.ts +1 -1
  139. package/dist/components/index.d.ts +10 -0
  140. package/dist/components/index.es.js +2902 -1329
  141. package/dist/components/index.umd.js +1 -1
  142. package/dist/composables/alert/useAlert.d.ts +37 -4
  143. package/dist/composables/dropdown/useProvideDropdown.d.ts +1 -1
  144. package/dist/composables/index.d.ts +1 -0
  145. package/dist/composables/index.es.js +88 -1
  146. package/dist/composables/index.umd.js +1 -1
  147. package/dist/composables/useBlurhash.d.ts +7 -0
  148. package/dist/composables/useComponentIcon.d.ts +9 -8
  149. package/dist/composables/useVolver.d.ts +1 -1
  150. package/dist/directives/index.d.ts +3 -5
  151. package/dist/directives/index.es.js +92 -31
  152. package/dist/directives/index.umd.js +1 -1
  153. package/dist/directives/v-tooltip.es.js +90 -26
  154. package/dist/directives/v-tooltip.umd.js +1 -1
  155. package/dist/icons.es.js +210 -210
  156. package/dist/icons.umd.js +1 -1
  157. package/dist/index.d.ts +3 -1
  158. package/dist/index.es.js +81 -16
  159. package/dist/index.umd.js +1 -1
  160. package/dist/props/index.d.ts +287 -73
  161. package/dist/resolvers/unplugin.d.ts +6 -1
  162. package/dist/resolvers/unplugin.es.js +78 -10
  163. package/dist/resolvers/unplugin.umd.js +1 -1
  164. package/dist/stories/AccordionGroup/AccordionGroup.stories.d.ts +72 -84
  165. package/dist/stories/AccordionGroup/AccordionGroupSlots.stories.d.ts +623 -461
  166. package/dist/stories/AlertGroup/AlertGroupWithComposable.stories.d.ts +1 -1
  167. package/dist/stories/Blurhash/BlurhashComposable.stories.d.ts +4 -0
  168. package/dist/stories/Combobox/Combobox.settings.d.ts +8 -0
  169. package/dist/stories/Icon/Icon.settings.d.ts +1 -0
  170. package/dist/stories/InputFile/InputFile.settings.d.ts +56 -0
  171. package/dist/stories/InputFile/InputFile.stories.d.ts +12 -0
  172. package/dist/stories/InputFile/InputFileDropArea.stories.d.ts +9 -0
  173. package/dist/stories/InputFile/InputFileIconPosition.stories.d.ts +8 -0
  174. package/dist/stories/InputFile/InputFileSlots.stories.d.ts +7 -0
  175. package/dist/stories/Tab/Tab.settings.d.ts +4 -37
  176. package/dist/types/alert.d.ts +13 -0
  177. package/dist/types/blurhash.d.ts +12 -0
  178. package/dist/types/floating-ui.d.ts +6 -0
  179. package/dist/types/generic.d.ts +4 -0
  180. package/dist/types/group.d.ts +37 -0
  181. package/dist/types/index.d.ts +7 -0
  182. package/dist/types/input-file.d.ts +16 -0
  183. package/dist/types/nav.d.ts +18 -0
  184. package/dist/utils/ObjectUtilities.d.ts +0 -1
  185. package/dist/workers/blurhash.d.ts +1 -0
  186. package/package.json +97 -80
  187. package/src/Volver.ts +31 -20
  188. package/src/assets/icons/detailed.json +1 -1
  189. package/src/assets/icons/normal.json +1 -1
  190. package/src/assets/icons/simple.json +1 -1
  191. package/src/components/VvAccordion/VvAccordion.vue +2 -2
  192. package/src/components/VvAction/VvAction.vue +5 -2
  193. package/src/components/VvAlert/index.ts +1 -3
  194. package/src/components/VvAlertGroup/index.ts +2 -1
  195. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +20 -19
  196. package/src/components/VvBreadcrumb/index.ts +2 -8
  197. package/src/components/VvButton/VvButton.vue +6 -6
  198. package/src/components/VvButton/index.ts +2 -4
  199. package/src/components/VvCombobox/VvCombobox.vue +24 -16
  200. package/src/components/VvCombobox/index.ts +4 -0
  201. package/src/components/VvIcon/VvIcon.vue +2 -2
  202. package/src/components/VvIcon/index.ts +35 -48
  203. package/src/components/VvInputFile/VvInputFile.vue +365 -0
  204. package/src/components/VvInputFile/index.ts +116 -0
  205. package/src/components/VvInputText/VvInputClearAction.ts +10 -6
  206. package/src/components/VvInputText/VvInputPasswordAction.ts +13 -9
  207. package/src/components/VvInputText/VvInputText.vue +17 -18
  208. package/src/components/VvInputText/index.ts +7 -15
  209. package/src/components/VvNav/VvNav.vue +30 -50
  210. package/src/components/VvNav/VvNavItem.vue +18 -0
  211. package/src/components/VvNav/VvNavSeparator.vue +11 -0
  212. package/src/components/VvNav/index.ts +2 -15
  213. package/src/components/VvSelect/VvSelect.vue +5 -8
  214. package/src/components/VvTab/VvTab.vue +63 -35
  215. package/src/components/VvTab/index.ts +10 -4
  216. package/src/components/VvTextarea/VvTextarea.vue +6 -9
  217. package/src/components/index.ts +10 -0
  218. package/src/composables/index.ts +1 -0
  219. package/src/composables/useBlurhash.ts +76 -0
  220. package/src/composables/useComponentIcon.ts +15 -14
  221. package/src/composables/useUniqueId.ts +2 -2
  222. package/src/directives/index.ts +3 -6
  223. package/src/directives/v-tooltip.ts +19 -10
  224. package/src/index.ts +3 -1
  225. package/src/props/index.ts +115 -27
  226. package/src/resolvers/unplugin.ts +24 -14
  227. package/src/stories/AlertGroup/AlertGroupWithComposable.stories.ts +2 -2
  228. package/src/stories/Blurhash/BlurhashComposable.stories.ts +195 -0
  229. package/src/stories/Combobox/Combobox.settings.ts +8 -0
  230. package/src/stories/Icon/Icon.settings.ts +3 -3
  231. package/src/stories/InputFile/InputFile.settings.ts +36 -0
  232. package/src/stories/InputFile/InputFile.stories.ts +89 -0
  233. package/src/stories/InputFile/InputFileDropArea.stories.ts +56 -0
  234. package/src/stories/InputFile/InputFileIconPosition.stories.ts +43 -0
  235. package/src/stories/InputFile/InputFileSlots.stories.ts +33 -0
  236. package/src/stories/Nav/Nav.settings.ts +3 -4
  237. package/src/stories/Nav/Nav.test.ts +4 -15
  238. package/src/stories/Tab/Tab.settings.ts +9 -9
  239. package/src/stories/Tab/Tab.stories.ts +2 -2
  240. package/src/stories/Tab/Tab.test.ts +6 -14
  241. package/src/stories/argTypes.ts +1 -1
  242. package/src/types/blurhash.ts +21 -0
  243. package/src/types/generic.ts +6 -0
  244. package/src/types/index.ts +7 -0
  245. package/src/types/input-file.ts +18 -0
  246. package/src/types/nav.ts +20 -0
  247. package/src/utils/ObjectUtilities.ts +0 -11
  248. package/src/workers/blurhash.ts +9 -0
  249. package/dist/components/VvNav/VvNavItemTitle.vue.d.ts +0 -6
  250. package/dist/components/VvNav/VvNavSeparator.d.ts +0 -2
  251. package/dist/components/VvNavItemTitle/VvNavItemTitle.es.js +0 -19
  252. package/dist/components/VvNavItemTitle/VvNavItemTitle.umd.js +0 -1
  253. package/src/components/VvNav/VvNavItemTitle.vue +0 -11
  254. package/src/components/VvNav/VvNavSeparator.ts +0 -8
  255. package/src/types/generic.d.ts +0 -6
  256. /package/src/types/{alert.d.ts → alert.ts} +0 -0
  257. /package/src/types/{floating-ui.d.ts → floating-ui.ts} +0 -0
  258. /package/src/types/{group.d.ts → group.ts} +0 -0
@@ -1,101 +1,11 @@
1
- import { inject, computed, unref, defineComponent, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, isRef, h, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withDirectives, Fragment, renderList, vModelSelect, createVNode, createSlots, withCtx } from "vue";
1
+ import { inject, computed, unref, defineComponent, mergeDefaults, ref, toRefs, openBlock, createBlock, mergeProps, createCommentVNode, isRef, h, watch, useSlots, createElementBlock, normalizeClass, toDisplayString, createElementVNode, renderSlot, normalizeProps, guardReactiveProps, withDirectives, Fragment, renderList, vModelSelect, createVNode, createSlots, withCtx } from "vue";
2
2
  import { iconExists, Icon, addIcon } from "@iconify/vue";
3
- import { nanoid } from "nanoid";
3
+ import { uid } from "uid";
4
4
  import { useFocus, useElementVisibility } from "@vueuse/core";
5
5
  import { get } from "ts-dot-prop";
6
- const VvIconProps = {
7
- /**
8
- * Color
9
- */
10
- color: String,
11
- /**
12
- * Width
13
- */
14
- width: {
15
- type: [String, Number]
16
- },
17
- /**
18
- * Height
19
- */
20
- height: {
21
- type: [String, Number]
22
- },
23
- /**
24
- * Icon name
25
- * Can be the full composition of iconify name "@{provider}:{prefix}:{name}" or "{prefix}:{name}" or "{name}"
26
- * https://docs.iconify.design/api/providers.html#provider-in-icon-name
27
- */
28
- name: {
29
- type: String,
30
- required: true
31
- },
32
- /**
33
- * By default 'vv'
34
- * If custom collection is not added with "addCollection" DS class method, this prop could not be used
35
- * Icon provider: https://docs.iconify.design/api/providers.html#provider-in-icon-name
36
- */
37
- provider: {
38
- type: String
39
- },
40
- /**
41
- * The name of icon set.
42
- * Icon default options prefix: simple | normal | detailed
43
- */
44
- prefix: {
45
- type: String,
46
- default: "normal"
47
- },
48
- /**
49
- * Url remote SVG icon
50
- */
51
- src: String,
52
- /**
53
- * Horizontal flip
54
- */
55
- horizontalFlip: Boolean,
56
- /**
57
- * Vertical flip
58
- */
59
- verticalFlip: Boolean,
60
- /**
61
- * String alternative to "horizontalFlip" and "verticalFlip".
62
- * Example: https://docs.iconify.design/icon-components/vue/transform.html
63
- */
64
- flip: String,
65
- /**
66
- * Icon render mode
67
- * 'style' = 'bg' or 'mask', depending on icon content
68
- * 'bg' = span with style using `background`
69
- * 'mask' = span with style using `mask`
70
- * 'svg' = svg
71
- * Iconify doc: https://docs.iconify.design/iconify-icon/modes.html
72
- */
73
- mode: String,
74
- /**
75
- * Toggles inline or block mode
76
- * Example https://docs.iconify.design/icon-components/vue/inline.html
77
- */
78
- inline: Boolean,
79
- /**
80
- * rotates icon
81
- * Example https://docs.iconify.design/icon-components/vue/transform.html
82
- */
83
- rotate: [Number, String],
84
- /**
85
- * A callback that is called when icon data has been loaded
86
- */
87
- onLoad: Function,
88
- /**
89
- * SVG icon string
90
- */
91
- svg: String,
92
- /**
93
- * Icon modifiers: vv-icon css helper classes, value/s are concatened with prefix 'vv-icon--'
94
- * @values string | string[]
95
- */
96
- modifiers: {
97
- type: [String, Array]
98
- }
6
+ const VvIconPropsDefaults = {
7
+ prefix: "normal"
8
+ /* normal */
99
9
  };
100
10
  var Strategy = /* @__PURE__ */ ((Strategy2) => {
101
11
  Strategy2["absolute"] = "absolute";
@@ -131,6 +41,13 @@ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
131
41
  ButtonType2["reset"] = "reset";
132
42
  return ButtonType2;
133
43
  })(ButtonType || {});
44
+ var ActionTag = /* @__PURE__ */ ((ActionTag2) => {
45
+ ActionTag2["nuxtLink"] = "nuxt-link";
46
+ ActionTag2["routerLink"] = "router-link";
47
+ ActionTag2["a"] = "a";
48
+ ActionTag2["button"] = "button";
49
+ return ActionTag2;
50
+ })(ActionTag || {});
134
51
  var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
135
52
  AnchorTarget2["_blank"] = "_blank";
136
53
  AnchorTarget2["_self"] = "_self";
@@ -170,7 +87,24 @@ const __default__$1 = {
170
87
  };
171
88
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
172
89
  ...__default__$1,
173
- props: VvIconProps,
90
+ props: /* @__PURE__ */ mergeDefaults({
91
+ name: {},
92
+ color: {},
93
+ width: {},
94
+ height: {},
95
+ provider: {},
96
+ prefix: {},
97
+ src: {},
98
+ horizontalFlip: { type: Boolean },
99
+ verticalFlip: { type: Boolean },
100
+ flip: {},
101
+ mode: {},
102
+ inline: { type: Boolean },
103
+ rotate: {},
104
+ onLoad: { type: Function },
105
+ svg: {},
106
+ modifiers: {}
107
+ }, VvIconPropsDefaults),
174
108
  setup(__props) {
175
109
  const props = __props;
176
110
  const hasRotate = computed(() => {
@@ -257,7 +191,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
257
191
  color: _ctx.color,
258
192
  onLoad: _ctx.onLoad,
259
193
  icon: unref(icon)
260
- }), null, 16, ["class"])) : createCommentVNode("", true);
194
+ }), null, 16, ["class"])) : createCommentVNode("v-if", true);
261
195
  };
262
196
  }
263
197
  });
@@ -402,6 +336,7 @@ const LinkProps = {
402
336
  */
403
337
  target: {
404
338
  type: String,
339
+ default: void 0,
405
340
  validator: (value) => Object.values(AnchorTarget).includes(value)
406
341
  },
407
342
  /**
@@ -416,27 +351,33 @@ const ValidProps = {
416
351
  /**
417
352
  * Valid status
418
353
  */
419
- valid: Boolean,
354
+ valid: { type: Boolean, default: false },
420
355
  /**
421
356
  * Valid label
422
357
  */
423
- validLabel: [String, Array]
358
+ validLabel: { type: [String, Array], default: void 0 }
424
359
  };
425
360
  const InvalidProps = {
426
361
  /**
427
362
  * Invalid status
428
363
  */
429
- invalid: Boolean,
364
+ invalid: {
365
+ type: Boolean,
366
+ default: false
367
+ },
430
368
  /**
431
369
  * Invalid label
432
370
  */
433
- invalidLabel: [String, Array]
371
+ invalidLabel: { type: [String, Array], default: void 0 }
434
372
  };
435
373
  const LoadingProps = {
436
374
  /**
437
375
  * Loading status
438
376
  */
439
- loading: Boolean,
377
+ loading: {
378
+ type: Boolean,
379
+ default: false
380
+ },
440
381
  /**
441
382
  * Loading label
442
383
  */
@@ -449,37 +390,64 @@ const DisabledProps = {
449
390
  /**
450
391
  * Whether the form control is disabled
451
392
  */
452
- disabled: Boolean
393
+ disabled: {
394
+ type: Boolean,
395
+ default: false
396
+ }
453
397
  };
454
398
  const ActiveProps = {
455
399
  /**
456
400
  * Whether the item is active
457
401
  */
458
- active: Boolean
402
+ active: {
403
+ type: Boolean,
404
+ default: false
405
+ }
406
+ };
407
+ const CurrentProps = {
408
+ /**
409
+ * Whether the item is current
410
+ */
411
+ current: {
412
+ type: Boolean,
413
+ default: false
414
+ }
459
415
  };
460
416
  const PressedProps = {
461
417
  /**
462
418
  * Whether the item is pressed
463
419
  */
464
- pressed: Boolean
420
+ pressed: {
421
+ type: Boolean,
422
+ default: false
423
+ }
465
424
  };
466
425
  const LabelProps = {
467
426
  /**
468
427
  * The item label
469
428
  */
470
- label: [String, Number]
429
+ label: {
430
+ type: [String, Number],
431
+ default: void 0
432
+ }
471
433
  };
472
434
  const ReadonlyProps = {
473
435
  /**
474
436
  * The value is not editable
475
437
  */
476
- readonly: Boolean
438
+ readonly: {
439
+ type: Boolean,
440
+ default: false
441
+ }
477
442
  };
478
443
  const ModifiersProps = {
479
444
  /**
480
445
  * Component BEM modifiers
481
446
  */
482
- modifiers: [String, Array]
447
+ modifiers: {
448
+ type: [String, Array],
449
+ default: void 0
450
+ }
483
451
  };
484
452
  const HintProps = {
485
453
  hintLabel: { type: String, default: "" }
@@ -510,7 +478,10 @@ const IconProps = {
510
478
  * VvIcon name or props
511
479
  * @see VVIcon
512
480
  */
513
- icon: { type: [String, Object] },
481
+ icon: {
482
+ type: [String, Object],
483
+ default: void 0
484
+ },
514
485
  /**
515
486
  * VvIcon position
516
487
  */
@@ -531,7 +502,10 @@ const FloatingLabelProps = {
531
502
  /**
532
503
  * If true the label will be floating
533
504
  */
534
- floating: Boolean
505
+ floating: {
506
+ type: Boolean,
507
+ default: false
508
+ }
535
509
  };
536
510
  const UnselectableProps = {
537
511
  /**
@@ -567,7 +541,8 @@ const IdProps = {
567
541
  * Dropdown show / hide transition name
568
542
  */
569
543
  transitionName: {
570
- type: String
544
+ type: String,
545
+ default: void 0
571
546
  },
572
547
  /**
573
548
  * Offset of the dropdown from the trigger
@@ -635,7 +610,8 @@ const IdProps = {
635
610
  * Set dropdown width to the same as the trigger
636
611
  */
637
612
  triggerWidth: {
638
- type: Boolean
613
+ type: Boolean,
614
+ default: false
639
615
  }
640
616
  });
641
617
  const IdNameProps = {
@@ -652,7 +628,10 @@ const AutofocusProps = {
652
628
  * Global attribute autofocus
653
629
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus
654
630
  */
655
- autofocus: Boolean
631
+ autofocus: {
632
+ type: Boolean,
633
+ default: false
634
+ }
656
635
  };
657
636
  const AutocompleteProps = {
658
637
  /**
@@ -666,6 +645,7 @@ const AutocompleteProps = {
666
645
  ...LabelProps,
667
646
  ...PressedProps,
668
647
  ...ActiveProps,
648
+ ...CurrentProps,
669
649
  ...LinkProps,
670
650
  /**
671
651
  * Button type
@@ -681,6 +661,13 @@ const AutocompleteProps = {
681
661
  ariaLabel: {
682
662
  type: String,
683
663
  default: void 0
664
+ },
665
+ /**
666
+ * Default tag for the action
667
+ */
668
+ defaultTag: {
669
+ type: String,
670
+ default: ActionTag.button
684
671
  }
685
672
  });
686
673
  const VvSelectProps = {
@@ -785,7 +772,7 @@ function useDefaults(componentName, propsDefinition, props) {
785
772
  }, {});
786
773
  });
787
774
  }
788
- const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
775
+ const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || uid()));
789
776
  function useComponentFocus(inputTemplateRef, emit) {
790
777
  const { focused } = useFocus(inputTemplateRef);
791
778
  watch(focused, (newValue) => {
@@ -796,30 +783,30 @@ function useComponentFocus(inputTemplateRef, emit) {
796
783
  };
797
784
  }
798
785
  function useComponentIcon(icon, iconPosition) {
786
+ const hasIcon = computed(() => {
787
+ if (typeof (icon == null ? void 0 : icon.value) === "string") {
788
+ return { name: icon == null ? void 0 : icon.value };
789
+ }
790
+ return icon == null ? void 0 : icon.value;
791
+ });
799
792
  const hasIconBefore = computed(
800
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.before)
793
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.before ? hasIcon.value : void 0
801
794
  );
802
795
  const hasIconAfter = computed(
803
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Position.after)
796
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Position.after ? hasIcon.value : void 0
804
797
  );
805
798
  const hasIconLeft = computed(
806
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.left)
799
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.left ? hasIcon.value : void 0
807
800
  );
808
801
  const hasIconRight = computed(
809
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.right)
802
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.right ? hasIcon.value : void 0
810
803
  );
811
804
  const hasIconTop = computed(
812
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.top)
805
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.top ? hasIcon.value : void 0
813
806
  );
814
807
  const hasIconBottom = computed(
815
- () => Boolean((icon == null ? void 0 : icon.value) && iconPosition.value === Side.bottom)
808
+ () => (iconPosition == null ? void 0 : iconPosition.value) === Side.bottom ? hasIcon.value : void 0
816
809
  );
817
- const hasIcon = computed(() => {
818
- if (typeof (icon == null ? void 0 : icon.value) === "string") {
819
- return { name: icon == null ? void 0 : icon.value };
820
- }
821
- return icon == null ? void 0 : icon.value;
822
- });
823
810
  return {
824
811
  hasIcon,
825
812
  hasIconLeft,
@@ -885,8 +872,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
885
872
  ...__default__,
886
873
  props: VvSelectProps,
887
874
  emits: VvSelectEmits,
888
- setup(__props, { emit }) {
875
+ setup(__props, { emit: __emit }) {
889
876
  const props = __props;
877
+ const emit = __emit;
890
878
  const slots = useSlots();
891
879
  const propsDefaults = useDefaults(
892
880
  "VvSelect",
@@ -922,10 +910,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
922
910
  focused.value = true;
923
911
  }
924
912
  });
925
- const { hasIcon, hasIconBefore, hasIconAfter } = useComponentIcon(
926
- icon,
927
- iconPosition
928
- );
913
+ const { hasIconBefore, hasIconAfter } = useComponentIcon(icon, iconPosition);
929
914
  const isDirty = computed(() => !isEmpty(props.modelValue));
930
915
  const isDisabled = computed(() => props.disabled || props.readonly);
931
916
  const hasTabindex = computed(() => {
@@ -949,8 +934,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
949
934
  loading: loading.value,
950
935
  disabled: disabled.value,
951
936
  readonly: readonly.value,
952
- "icon-before": hasIconBefore.value,
953
- "icon-after": hasIconAfter.value,
937
+ "icon-before": hasIconBefore.value !== void 0,
938
+ "icon-after": hasIconAfter.value !== void 0,
954
939
  dirty: isDirty.value,
955
940
  focus: focused.value,
956
941
  floating: floating.value,
@@ -999,101 +984,138 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
999
984
  return option && option.options && option.options.length > 0;
1000
985
  };
1001
986
  return (_ctx, _cache) => {
1002
- return openBlock(), createElementBlock("div", {
1003
- class: normalizeClass(unref(bemCssClasses))
1004
- }, [
1005
- _ctx.label ? (openBlock(), createElementBlock("label", {
1006
- key: 0,
1007
- for: unref(hasId)
1008
- }, toDisplayString(_ctx.label), 9, _hoisted_1)) : createCommentVNode("", true),
1009
- createElementVNode("div", _hoisted_2, [
1010
- _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3, [
1011
- renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
1012
- ])) : createCommentVNode("", true),
1013
- createElementVNode("div", _hoisted_4, [
1014
- unref(hasIconBefore) ? (openBlock(), createBlock(_sfc_main$1, mergeProps({
1015
- key: 0,
1016
- class: "vv-select__icon"
1017
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true),
1018
- withDirectives(createElementVNode("select", mergeProps({
1019
- id: unref(hasId),
1020
- ref_key: "select",
1021
- ref: select,
1022
- "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
1023
- }, unref(hasAttrs)), [
1024
- _ctx.placeholder ? (openBlock(), createElementBlock("option", {
1025
- key: 0,
1026
- value: void 0,
1027
- disabled: !_ctx.unselectable,
1028
- hidden: !_ctx.unselectable
1029
- }, toDisplayString(_ctx.placeholder), 9, _hoisted_6)) : createCommentVNode("", true),
1030
- (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.options, (option, index) => {
1031
- return openBlock(), createElementBlock(Fragment, null, [
1032
- !isGroup(option) ? (openBlock(), createElementBlock("option", {
1033
- key: index,
1034
- disabled: unref(isOptionDisabled)(option),
1035
- value: unref(getOptionValue)(option)
1036
- }, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7)) : (openBlock(), createElementBlock("optgroup", {
1037
- key: `group-${index}`,
1038
- disabled: unref(isOptionDisabled)(option),
1039
- label: unref(getOptionLabel)(option)
1040
- }, [
1041
- (openBlock(true), createElementBlock(Fragment, null, renderList(unref(getOptionGrouped)(option), (item, i) => {
1042
- return openBlock(), createElementBlock("option", {
1043
- key: `group-${index}-item-${i}`,
1044
- disabled: unref(isOptionDisabled)(item),
1045
- value: unref(getOptionValue)(item)
1046
- }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9);
1047
- }), 128))
1048
- ], 8, _hoisted_8))
1049
- ], 64);
1050
- }), 256))
1051
- ], 16, _hoisted_5), [
1052
- [vModelSelect, unref(localModelValue)]
987
+ return openBlock(), createElementBlock(
988
+ "div",
989
+ {
990
+ class: normalizeClass(unref(bemCssClasses))
991
+ },
992
+ [
993
+ _ctx.label ? (openBlock(), createElementBlock("label", {
994
+ key: 0,
995
+ for: unref(hasId)
996
+ }, toDisplayString(_ctx.label), 9, _hoisted_1)) : createCommentVNode("v-if", true),
997
+ createCommentVNode(" #region native select "),
998
+ createElementVNode("div", _hoisted_2, [
999
+ _ctx.$slots.before ? (openBlock(), createElementBlock("div", _hoisted_3, [
1000
+ createCommentVNode(" @slot Slot before input "),
1001
+ renderSlot(_ctx.$slots, "before", normalizeProps(guardReactiveProps(unref(slotProps))))
1002
+ ])) : createCommentVNode("v-if", true),
1003
+ createElementVNode("div", _hoisted_4, [
1004
+ unref(hasIconBefore) ? (openBlock(), createBlock(
1005
+ _sfc_main$1,
1006
+ mergeProps({ key: 0 }, unref(hasIconBefore), { class: "vv-select__icon" }),
1007
+ null,
1008
+ 16
1009
+ /* FULL_PROPS */
1010
+ )) : createCommentVNode("v-if", true),
1011
+ withDirectives(createElementVNode("select", mergeProps({
1012
+ id: unref(hasId),
1013
+ ref_key: "select",
1014
+ ref: select,
1015
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null)
1016
+ }, unref(hasAttrs)), [
1017
+ _ctx.placeholder ? (openBlock(), createElementBlock("option", {
1018
+ key: 0,
1019
+ value: void 0,
1020
+ disabled: !_ctx.unselectable,
1021
+ hidden: !_ctx.unselectable
1022
+ }, toDisplayString(_ctx.placeholder), 9, _hoisted_6)) : createCommentVNode("v-if", true),
1023
+ (openBlock(true), createElementBlock(
1024
+ Fragment,
1025
+ null,
1026
+ renderList(_ctx.options, (option, index) => {
1027
+ return openBlock(), createElementBlock(
1028
+ Fragment,
1029
+ null,
1030
+ [
1031
+ !isGroup(option) ? (openBlock(), createElementBlock("option", {
1032
+ key: index,
1033
+ disabled: unref(isOptionDisabled)(option),
1034
+ value: unref(getOptionValue)(option)
1035
+ }, toDisplayString(unref(getOptionLabel)(option)), 9, _hoisted_7)) : (openBlock(), createElementBlock("optgroup", {
1036
+ key: `group-${index}`,
1037
+ disabled: unref(isOptionDisabled)(option),
1038
+ label: unref(getOptionLabel)(option)
1039
+ }, [
1040
+ (openBlock(true), createElementBlock(
1041
+ Fragment,
1042
+ null,
1043
+ renderList(unref(getOptionGrouped)(option), (item, i) => {
1044
+ return openBlock(), createElementBlock("option", {
1045
+ key: `group-${index}-item-${i}`,
1046
+ disabled: unref(isOptionDisabled)(item),
1047
+ value: unref(getOptionValue)(item)
1048
+ }, toDisplayString(unref(getOptionLabel)(item)), 9, _hoisted_9);
1049
+ }),
1050
+ 128
1051
+ /* KEYED_FRAGMENT */
1052
+ ))
1053
+ ], 8, _hoisted_8))
1054
+ ],
1055
+ 64
1056
+ /* STABLE_FRAGMENT */
1057
+ );
1058
+ }),
1059
+ 256
1060
+ /* UNKEYED_FRAGMENT */
1061
+ ))
1062
+ ], 16, _hoisted_5), [
1063
+ [vModelSelect, unref(localModelValue)]
1064
+ ]),
1065
+ unref(hasIconAfter) ? (openBlock(), createBlock(
1066
+ _sfc_main$1,
1067
+ mergeProps({ key: 1 }, unref(hasIconAfter), { class: "vv-select__icon vv-select__icon-after" }),
1068
+ null,
1069
+ 16
1070
+ /* FULL_PROPS */
1071
+ )) : createCommentVNode("v-if", true)
1053
1072
  ]),
1054
- unref(hasIconAfter) ? (openBlock(), createBlock(_sfc_main$1, mergeProps({
1055
- key: 1,
1056
- class: "vv-select__icon vv-select__icon-after"
1057
- }, unref(hasIcon)), null, 16)) : createCommentVNode("", true)
1073
+ _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
1074
+ createCommentVNode(" @slot Slot after input "),
1075
+ renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
1076
+ ])) : createCommentVNode("v-if", true)
1058
1077
  ]),
1059
- _ctx.$slots.after ? (openBlock(), createElementBlock("div", _hoisted_10, [
1060
- renderSlot(_ctx.$slots, "after", normalizeProps(guardReactiveProps(unref(slotProps))))
1061
- ])) : createCommentVNode("", true)
1062
- ]),
1063
- createVNode(unref(HintSlot), {
1064
- id: unref(hasHintId),
1065
- class: "vv-select__hint"
1066
- }, createSlots({ _: 2 }, [
1067
- _ctx.$slots.hint ? {
1068
- name: "hint",
1069
- fn: withCtx(() => [
1070
- renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1071
- ]),
1072
- key: "0"
1073
- } : void 0,
1074
- _ctx.$slots.loading ? {
1075
- name: "loading",
1076
- fn: withCtx(() => [
1077
- renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1078
- ]),
1079
- key: "1"
1080
- } : void 0,
1081
- _ctx.$slots.valid ? {
1082
- name: "valid",
1083
- fn: withCtx(() => [
1084
- renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1085
- ]),
1086
- key: "2"
1087
- } : void 0,
1088
- _ctx.$slots.invalid ? {
1089
- name: "invalid",
1090
- fn: withCtx(() => [
1091
- renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1092
- ]),
1093
- key: "3"
1094
- } : void 0
1095
- ]), 1032, ["id"])
1096
- ], 2);
1078
+ createCommentVNode(" #endregion native select "),
1079
+ createVNode(unref(HintSlot), {
1080
+ id: unref(hasHintId),
1081
+ class: "vv-select__hint"
1082
+ }, createSlots({
1083
+ _: 2
1084
+ /* DYNAMIC */
1085
+ }, [
1086
+ _ctx.$slots.hint ? {
1087
+ name: "hint",
1088
+ fn: withCtx(() => [
1089
+ renderSlot(_ctx.$slots, "hint", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1090
+ ]),
1091
+ key: "0"
1092
+ } : void 0,
1093
+ _ctx.$slots.loading ? {
1094
+ name: "loading",
1095
+ fn: withCtx(() => [
1096
+ renderSlot(_ctx.$slots, "loading", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1097
+ ]),
1098
+ key: "1"
1099
+ } : void 0,
1100
+ _ctx.$slots.valid ? {
1101
+ name: "valid",
1102
+ fn: withCtx(() => [
1103
+ renderSlot(_ctx.$slots, "valid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1104
+ ]),
1105
+ key: "2"
1106
+ } : void 0,
1107
+ _ctx.$slots.invalid ? {
1108
+ name: "invalid",
1109
+ fn: withCtx(() => [
1110
+ renderSlot(_ctx.$slots, "invalid", normalizeProps(guardReactiveProps(unref(hintSlotScope))))
1111
+ ]),
1112
+ key: "3"
1113
+ } : void 0
1114
+ ]), 1032, ["id"])
1115
+ ],
1116
+ 2
1117
+ /* CLASS */
1118
+ );
1097
1119
  };
1098
1120
  }
1099
1121
  });