@volverjs/ui-vue 0.0.3 → 0.0.5-beta.1

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 (236) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +54 -15
  3. package/auto-imports.d.ts +12 -3
  4. package/bin/icons.cjs +1 -73
  5. package/dist/Volver.d.ts +23 -11
  6. package/dist/components/VvAccordion/VvAccordion.es.js +180 -74
  7. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  8. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -1
  9. package/dist/components/VvAccordion/index.d.ts +8 -3
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +280 -122
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -12
  13. package/dist/components/VvAccordionGroup/index.d.ts +8 -0
  14. package/dist/components/VvAction/VvAction.es.js +338 -0
  15. package/dist/components/VvAction/VvAction.umd.js +1 -0
  16. package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
  17. package/dist/components/VvAction/index.d.ts +24 -0
  18. package/dist/components/VvBadge/VvBadge.es.js +251 -22
  19. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  20. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
  21. package/dist/components/VvBadge/index.d.ts +1 -1
  22. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +280 -62
  23. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  24. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -11
  25. package/dist/components/VvBreadcrumb/index.d.ts +1 -1
  26. package/dist/components/VvButton/VvButton.es.js +720 -261
  27. package/dist/components/VvButton/VvButton.umd.js +1 -1
  28. package/dist/components/VvButton/VvButton.vue.d.ts +54 -54
  29. package/dist/components/VvButton/index.d.ts +30 -75
  30. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +296 -49
  31. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  32. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
  33. package/dist/components/VvButtonGroup/index.d.ts +1 -1
  34. package/dist/components/VvCard/VvCard.es.js +60 -28
  35. package/dist/components/VvCard/VvCard.umd.js +1 -1
  36. package/dist/components/VvCheckbox/VvCheckbox.es.js +630 -172
  37. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  38. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +4 -4
  39. package/dist/components/VvCheckbox/index.d.ts +6 -6
  40. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +736 -228
  41. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  42. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +9 -9
  43. package/dist/components/VvCheckboxGroup/index.d.ts +4 -4
  44. package/dist/components/VvCombobox/VvCombobox.es.js +1673 -768
  45. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  46. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +159 -61
  47. package/dist/components/VvCombobox/index.d.ts +54 -23
  48. package/dist/components/VvDialog/VvDialog.es.js +426 -115
  49. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  50. package/dist/components/VvDialog/VvDialog.vue.d.ts +12 -3
  51. package/dist/components/VvDialog/index.d.ts +4 -1
  52. package/dist/components/VvDropdown/VvDropdown.es.js +504 -190
  53. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  54. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +114 -42
  55. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
  56. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
  57. package/dist/components/VvDropdown/index.d.ts +35 -14
  58. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +454 -0
  59. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
  60. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +48 -18
  61. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  62. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +361 -0
  63. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
  64. package/dist/components/VvIcon/VvIcon.es.js +116 -52
  65. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  66. package/dist/components/VvIcon/VvIcon.vue.d.ts +7 -7
  67. package/dist/components/VvIcon/index.d.ts +2 -2
  68. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +2 -2
  69. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  70. package/dist/components/VvInputText/VvInputText.es.js +1054 -376
  71. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  72. package/dist/components/VvInputText/VvInputText.vue.d.ts +107 -20
  73. package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
  74. package/dist/components/VvInputText/index.d.ts +67 -3
  75. package/dist/components/VvProgress/VvProgress.es.js +254 -23
  76. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  77. package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -2
  78. package/dist/components/VvProgress/index.d.ts +1 -1
  79. package/dist/components/VvRadio/VvRadio.es.js +568 -137
  80. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  81. package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -4
  82. package/dist/components/VvRadio/index.d.ts +6 -6
  83. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +674 -193
  84. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  85. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +9 -9
  86. package/dist/components/VvRadioGroup/index.d.ts +4 -4
  87. package/dist/components/VvSelect/VvSelect.es.js +703 -251
  88. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  89. package/dist/components/VvSelect/VvSelect.vue.d.ts +24 -17
  90. package/dist/components/VvSelect/index.d.ts +8 -8
  91. package/dist/components/VvTextarea/VvTextarea.es.js +747 -272
  92. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  93. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +21 -14
  94. package/dist/components/VvTextarea/index.d.ts +7 -7
  95. package/dist/components/VvTooltip/VvTooltip.es.js +252 -24
  96. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  97. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +7 -7
  98. package/dist/components/VvTooltip/index.d.ts +2 -2
  99. package/dist/components/index.es.js +3676 -2007
  100. package/dist/components/index.umd.js +1 -1
  101. package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
  102. package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -3
  103. package/dist/composables/group/useInjectedGroupState.d.ts +2 -2
  104. package/dist/composables/group/useProvideGroupState.d.ts +1 -1
  105. package/dist/composables/useComponentFocus.d.ts +1 -1
  106. package/dist/composables/useComponentIcon.d.ts +7 -7
  107. package/dist/composables/useDebouncedInput.d.ts +4 -1
  108. package/dist/composables/useDefaults.d.ts +2 -0
  109. package/dist/composables/useModifiers.d.ts +1 -1
  110. package/dist/composables/useOptions.d.ts +2 -2
  111. package/dist/composables/useTextCount.d.ts +3 -3
  112. package/dist/composables/useUniqueId.d.ts +1 -1
  113. package/dist/composables/useVolver.d.ts +1 -1
  114. package/dist/constants.d.ts +30 -0
  115. package/dist/directives/index.es.js +288 -0
  116. package/dist/directives/index.umd.js +1 -0
  117. package/dist/directives/v-tooltip.es.js +285 -0
  118. package/dist/directives/v-tooltip.umd.js +1 -0
  119. package/dist/icons.es.js +38 -23
  120. package/dist/icons.umd.js +1 -1
  121. package/dist/index.d.ts +0 -1
  122. package/dist/index.es.js +115 -3269
  123. package/dist/index.umd.js +1 -1
  124. package/dist/props/index.d.ts +215 -23
  125. package/dist/resolvers/unplugin.d.ts +14 -8
  126. package/dist/resolvers/unplugin.es.js +94 -33
  127. package/dist/resolvers/unplugin.umd.js +1 -1
  128. package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
  129. package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
  130. package/dist/stories/InputText/InputText.settings.d.ts +53 -0
  131. package/dist/stories/argTypes.d.ts +1 -1
  132. package/package.json +167 -63
  133. package/src/Volver.ts +60 -26
  134. package/src/assets/icons/detailed.json +1 -1
  135. package/src/assets/icons/normal.json +1 -1
  136. package/src/assets/icons/simple.json +1 -1
  137. package/src/components/VvAccordion/VvAccordion.vue +19 -22
  138. package/src/components/VvAccordion/index.ts +12 -4
  139. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +19 -10
  140. package/src/components/VvAccordionGroup/index.ts +8 -0
  141. package/src/components/VvAction/VvAction.vue +144 -0
  142. package/src/components/VvAction/index.ts +5 -0
  143. package/src/components/VvBadge/VvBadge.vue +2 -2
  144. package/src/components/VvBadge/index.ts +1 -1
  145. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +3 -3
  146. package/src/components/VvButton/VvButton.vue +41 -124
  147. package/src/components/VvButton/index.ts +16 -88
  148. package/src/components/VvButtonGroup/VvButtonGroup.vue +4 -7
  149. package/src/components/VvButtonGroup/index.ts +1 -1
  150. package/src/components/VvCard/VvCard.vue +2 -2
  151. package/src/components/VvCheckbox/VvCheckbox.vue +3 -7
  152. package/src/components/VvCheckbox/index.ts +11 -7
  153. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +7 -10
  154. package/src/components/VvCheckboxGroup/index.ts +1 -1
  155. package/src/components/VvCombobox/VvCombobox.vue +85 -57
  156. package/src/components/VvCombobox/index.ts +12 -10
  157. package/src/components/VvDialog/VvDialog.vue +28 -11
  158. package/src/components/VvDialog/index.ts +5 -2
  159. package/src/components/VvDropdown/VvDropdown.vue +6 -5
  160. package/src/components/VvDropdown/VvDropdownAction.vue +46 -0
  161. package/src/components/VvDropdown/VvDropdownOption.vue +72 -0
  162. package/src/components/VvDropdown/index.ts +6 -11
  163. package/src/components/VvIcon/VvIcon.vue +3 -3
  164. package/src/components/VvIcon/index.ts +3 -3
  165. package/src/components/VvInputText/VvInputClearAction.ts +2 -2
  166. package/src/components/VvInputText/VvInputPasswordAction.ts +3 -4
  167. package/src/components/VvInputText/VvInputStepAction.ts +3 -2
  168. package/src/components/VvInputText/VvInputText.vue +128 -35
  169. package/src/components/VvInputText/VvInputTextActions.ts +5 -8
  170. package/src/components/VvInputText/index.ts +62 -1
  171. package/src/components/VvProgress/VvProgress.vue +2 -2
  172. package/src/components/VvProgress/index.ts +1 -1
  173. package/src/components/VvRadio/VvRadio.vue +3 -7
  174. package/src/components/VvRadio/index.ts +11 -7
  175. package/src/components/VvRadioGroup/VvRadioGroup.vue +7 -10
  176. package/src/components/VvRadioGroup/index.ts +1 -1
  177. package/src/components/VvSelect/VvSelect.vue +4 -4
  178. package/src/components/VvSelect/index.ts +3 -5
  179. package/src/components/VvTextarea/VvTextarea.vue +4 -4
  180. package/src/components/VvTextarea/index.ts +1 -1
  181. package/src/components/VvTooltip/VvTooltip.vue +2 -2
  182. package/src/components/VvTooltip/index.ts +3 -3
  183. package/src/composables/dropdown/useInjectDropdown.ts +2 -2
  184. package/src/composables/dropdown/useProvideDropdown.ts +9 -11
  185. package/src/composables/group/useInjectedGroupState.ts +1 -1
  186. package/src/composables/group/useProvideGroupState.ts +1 -1
  187. package/src/composables/useComponentIcon.ts +1 -1
  188. package/src/composables/useDebouncedInput.ts +10 -3
  189. package/src/composables/useDefaults.ts +89 -0
  190. package/src/composables/useModifiers.ts +8 -9
  191. package/src/composables/useOptions.ts +1 -1
  192. package/src/composables/useVolver.ts +2 -2
  193. package/src/constants.ts +36 -0
  194. package/src/directives/index.ts +1 -1
  195. package/src/directives/v-tooltip.ts +2 -2
  196. package/src/index.ts +0 -2
  197. package/src/props/index.ts +111 -19
  198. package/src/resolvers/unplugin.ts +96 -49
  199. package/src/stories/Accordion/Accordion.stories.mdx +8 -2
  200. package/src/stories/Accordion/Accordion.test.ts +21 -15
  201. package/src/stories/Accordion/AccordionSlots.stories.mdx +8 -8
  202. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +17 -1
  203. package/src/stories/AccordionGroup/AccordionGroup.test.ts +18 -12
  204. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +3 -2
  205. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
  206. package/src/stories/Button/Button.stories.mdx +4 -2
  207. package/src/stories/Button/Button.test.ts +3 -1
  208. package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
  209. package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
  210. package/src/stories/Button/ButtonState.stories.mdx +2 -11
  211. package/src/stories/Card/Card.stories.mdx +2 -1
  212. package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
  213. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
  214. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
  215. package/src/stories/Combobox/Combobox.settings.ts +44 -0
  216. package/src/stories/Combobox/Combobox.stories.mdx +40 -1
  217. package/src/stories/Dialog/Dialog.stories.mdx +2 -1
  218. package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
  219. package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
  220. package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
  221. package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
  222. package/src/stories/Icon/Icon.stories.mdx +2 -1
  223. package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
  224. package/src/stories/InputText/InputText.settings.ts +53 -0
  225. package/src/stories/InputText/InputText.stories.mdx +42 -1
  226. package/src/stories/InputText/InputText.test.ts +5 -2
  227. package/src/stories/Progress/Progress.stories.mdx +2 -1
  228. package/src/stories/Radio/Radio.stories.mdx +2 -1
  229. package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
  230. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
  231. package/src/stories/Select/Select.stories.mdx +2 -1
  232. package/src/stories/Textarea/Textarea.stories.mdx +2 -1
  233. package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
  234. package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
  235. package/src/stories/argTypes.ts +2 -2
  236. package/src/types/group.d.ts +5 -0
@@ -1,61 +1,263 @@
1
- import { defineComponent as G, openBlock as H, createElementBlock as D, normalizeClass as M, unref as l, withDirectives as F, createElementVNode as T, isRef as q, vModelCheckbox as U, renderSlot as z, createTextVNode as K, toDisplayString as J, createVNode as W } from "vue";
2
- var j = /* @__PURE__ */ ((e) => (e.left = "left", e.right = "right", e.top = "top", e.bottom = "bottom", e))(j || {}), O = /* @__PURE__ */ ((e) => (e.topStart = "top-start", e.topEnd = "top-end", e.bottomStart = "bottom-start", e.bottomEnd = "bottom-end", e.leftStart = "left-start", e.leftEnd = "left-end", e.rightStart = "right-start", e.rightEnd = "right-end", e))(O || {}), I = /* @__PURE__ */ ((e) => (e.before = "before", e.after = "after", e))(I || {});
3
- const Y = Symbol.for("checkGroup"), $ = {
1
+ import { unref, inject, computed, toRef, toRefs, h, defineComponent, useSlots, ref, watchEffect, watch, onMounted, openBlock, createElementBlock, normalizeClass, withDirectives, createElementVNode, isRef, vModelCheckbox, renderSlot, createTextVNode, toDisplayString, createVNode } from "vue";
2
+ import { toReactive } from "@vueuse/core";
3
+ import { nanoid } from "nanoid";
4
+ var Side = /* @__PURE__ */ ((Side2) => {
5
+ Side2["left"] = "left";
6
+ Side2["right"] = "right";
7
+ Side2["top"] = "top";
8
+ Side2["bottom"] = "bottom";
9
+ return Side2;
10
+ })(Side || {});
11
+ var Placement = /* @__PURE__ */ ((Placement2) => {
12
+ Placement2["topStart"] = "top-start";
13
+ Placement2["topEnd"] = "top-end";
14
+ Placement2["bottomStart"] = "bottom-start";
15
+ Placement2["bottomEnd"] = "bottom-end";
16
+ Placement2["leftStart"] = "left-start";
17
+ Placement2["leftEnd"] = "left-end";
18
+ Placement2["rightStart"] = "right-start";
19
+ Placement2["rightEnd"] = "right-end";
20
+ return Placement2;
21
+ })(Placement || {});
22
+ var Position = /* @__PURE__ */ ((Position2) => {
23
+ Position2["before"] = "before";
24
+ Position2["after"] = "after";
25
+ return Position2;
26
+ })(Position || {});
27
+ var ButtonType = /* @__PURE__ */ ((ButtonType2) => {
28
+ ButtonType2["button"] = "button";
29
+ ButtonType2["submit"] = "submit";
30
+ ButtonType2["reset"] = "reset";
31
+ return ButtonType2;
32
+ })(ButtonType || {});
33
+ var AnchorTarget = /* @__PURE__ */ ((AnchorTarget2) => {
34
+ AnchorTarget2["_blank"] = "_blank";
35
+ AnchorTarget2["_self"] = "_self";
36
+ AnchorTarget2["_parent"] = "_parent";
37
+ AnchorTarget2["_top"] = "_top";
38
+ return AnchorTarget2;
39
+ })(AnchorTarget || {});
40
+ const INJECTION_KEY_CHECK_GROUP = Symbol.for("checkGroup");
41
+ const LinkProps = {
42
+ /**
43
+ * The router-link/nuxt-link property, if it is defined the button is rendered as a ruouter-link or nuxt-link.
44
+ * @see Documentation of [router-link](https://router.vuejs.org/api/#router-link) and [nuxt-link](https://nuxtjs.org/api/components-nuxt-link/)
45
+ */
46
+ to: {
47
+ type: [String, Object]
48
+ },
49
+ /**
50
+ * Anchor href
51
+ */
52
+ href: String,
53
+ /**
54
+ * Anchor target
55
+ */
56
+ target: {
57
+ type: String,
58
+ validator: (value) => Object.values(AnchorTarget).includes(value)
59
+ },
60
+ /**
61
+ * Anchor rel
62
+ */
63
+ rel: {
64
+ type: String,
65
+ default: "noopener noreferrer"
66
+ }
67
+ };
68
+ const ValidProps = {
69
+ /**
70
+ * Valid status
71
+ */
4
72
  valid: Boolean,
73
+ /**
74
+ * Valid label
75
+ */
5
76
  validLabel: [String, Array]
6
- }, Q = {
77
+ };
78
+ const InvalidProps = {
79
+ /**
80
+ * Invalid status
81
+ */
7
82
  invalid: Boolean,
83
+ /**
84
+ * Invalid label
85
+ */
8
86
  invalidLabel: [String, Array]
9
- }, X = {
87
+ };
88
+ const DisabledProps = {
10
89
  /**
11
90
  * Whether the form control is disabled
12
91
  */
13
92
  disabled: Boolean
14
- }, Z = {
93
+ };
94
+ const ActiveProps = {
95
+ /**
96
+ * Whether the item is active
97
+ */
98
+ active: Boolean
99
+ };
100
+ const PressedProps = {
101
+ /**
102
+ * Whether the item is pressed
103
+ */
104
+ pressed: Boolean
105
+ };
106
+ const LabelProps = {
107
+ /**
108
+ * The item label
109
+ */
110
+ label: [String, Number]
111
+ };
112
+ const ReadonlyProps = {
15
113
  /**
16
114
  * The value is not editable
17
115
  */
18
116
  readonly: Boolean
19
- }, N = {
117
+ };
118
+ const ModifiersProps = {
20
119
  /**
21
120
  * Component BEM modifiers
22
121
  */
23
122
  modifiers: [String, Array]
24
- }, L = {
123
+ };
124
+ const HintProps = {
25
125
  hintLabel: { type: String, default: "" }
26
126
  };
27
- I.before;
28
- const ee = {
127
+ ({
128
+ /**
129
+ * VvIcon name or props
130
+ * @see VVIcon
131
+ */
132
+ icon: { type: [String, Object] },
133
+ /**
134
+ * VvIcon position
135
+ */
136
+ iconPosition: {
137
+ type: String,
138
+ default: Position.before,
139
+ validation: (value) => Object.values(Position).includes(value)
140
+ }
141
+ });
142
+ const TabindexProps = {
29
143
  /**
30
144
  * Global attribute tabindex
31
145
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
32
146
  */
33
147
  tabindex: { type: [String, Number], default: 0 }
34
- }, te = {
148
+ };
149
+ const IdProps = {
35
150
  /**
36
151
  * Global attribute id
37
152
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
38
153
  */
39
154
  id: [String, Number]
40
155
  };
41
- j.bottom;
42
- const ae = {
43
- ...te,
156
+ ({
157
+ /**
158
+ * Dropdown placement
159
+ */
160
+ placement: {
161
+ type: String,
162
+ default: Side.bottom,
163
+ validator: (value) => {
164
+ return Object.values(Side).includes(value) || Object.values(Placement).includes(value);
165
+ }
166
+ },
167
+ /**
168
+ * Dropdown show / hide transition name
169
+ */
170
+ transitionName: {
171
+ type: String
172
+ },
173
+ /**
174
+ * Offset of the dropdown from the trigger
175
+ * @see https://floating-ui.com/docs/offset
176
+ */
177
+ offset: {
178
+ type: [Number, String, Object],
179
+ default: 0
180
+ },
181
+ /**
182
+ * Move dropdown to the side if there is no space in the default position
183
+ * @see https://floating-ui.com/docs/shift
184
+ */
185
+ shift: {
186
+ type: [Boolean, Object],
187
+ default: false
188
+ },
189
+ /**
190
+ * Flip dropdown position if there is no space in the default position
191
+ * @see https://floating-ui.com/docs/flip
192
+ */
193
+ flip: {
194
+ type: [Boolean, Object],
195
+ default: true
196
+ },
197
+ /**
198
+ * Size of the dropdown
199
+ * @see https://floating-ui.com/docs/size
200
+ */
201
+ size: {
202
+ type: [Boolean, Object],
203
+ default: () => ({ padding: 10 })
204
+ },
205
+ /**
206
+ * Automatically change the position of the dropdown
207
+ * @see https://floating-ui.com/docs/autoPlacement
208
+ */
209
+ autoPlacement: {
210
+ type: [Boolean, Object],
211
+ default: false
212
+ },
213
+ /**
214
+ * Add arrow to the dropdown
215
+ * @see https://floating-ui.com/docs/arrow
216
+ */
217
+ arrow: {
218
+ type: Boolean,
219
+ default: false
220
+ },
221
+ /**
222
+ * Close dropdown on click outside
223
+ */
224
+ autoClose: {
225
+ type: Boolean,
226
+ default: true
227
+ },
228
+ /**
229
+ * Autofocus first item on dropdown open
230
+ */
231
+ autofocusFirst: {
232
+ type: Boolean,
233
+ default: true
234
+ },
235
+ /**
236
+ * Set dropdown width to the same as the trigger
237
+ */
238
+ triggerWidth: {
239
+ type: Boolean
240
+ }
241
+ });
242
+ const IdNameProps = {
243
+ ...IdProps,
44
244
  /**
45
245
  * Input / Textarea name
46
246
  * Name of the form control. Submitted with the form as part of a name/value pair
47
247
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#name
48
248
  */
49
- name: { type: String, required: !0 }
50
- }, oe = {
51
- ...ae,
52
- ...ee,
53
- ...$,
54
- ...Q,
55
- ...L,
56
- ...X,
57
- ...Z,
58
- ...N,
249
+ name: { type: String, required: true }
250
+ };
251
+ const CheckboxRadioProps = {
252
+ ...IdNameProps,
253
+ ...TabindexProps,
254
+ ...ValidProps,
255
+ ...InvalidProps,
256
+ ...HintProps,
257
+ ...DisabledProps,
258
+ ...ReadonlyProps,
259
+ ...ModifiersProps,
260
+ ...LabelProps,
59
261
  /**
60
262
  * Input value
61
263
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#value
@@ -64,14 +266,143 @@ const ae = {
64
266
  /**
65
267
  * Input value
66
268
  */
67
- modelValue: [Object, Number, Boolean, String],
269
+ modelValue: [Object, Number, Boolean, String]
270
+ };
271
+ ({
272
+ ...DisabledProps,
273
+ ...LabelProps,
274
+ ...PressedProps,
275
+ ...ActiveProps,
276
+ ...LinkProps,
68
277
  /**
69
- * <label> for input
278
+ * Button type
70
279
  */
71
- label: String
72
- }, re = {
73
- ...oe,
74
- ...N,
280
+ type: {
281
+ type: String,
282
+ default: ButtonType.button,
283
+ validator: (value) => Object.values(ButtonType).includes(value)
284
+ }
285
+ });
286
+ function equals(obj1, obj2, field) {
287
+ if (field)
288
+ return resolveFieldData(obj1, field) === resolveFieldData(obj2, field);
289
+ else
290
+ return deepEquals(obj1, obj2);
291
+ }
292
+ function deepEquals(a, b) {
293
+ if (a === b)
294
+ return true;
295
+ if (a && b && typeof a == "object" && typeof b == "object") {
296
+ const arrA = Array.isArray(a);
297
+ const arrB = Array.isArray(b);
298
+ let i, length, key;
299
+ if (arrA && arrB) {
300
+ length = a.length;
301
+ if (length != b.length)
302
+ return false;
303
+ for (i = length; i-- !== 0; )
304
+ if (!deepEquals(a[i], b[i]))
305
+ return false;
306
+ return true;
307
+ }
308
+ if (arrA != arrB)
309
+ return false;
310
+ const dateA = a instanceof Date, dateB = b instanceof Date;
311
+ if (dateA != dateB)
312
+ return false;
313
+ if (dateA && dateB)
314
+ return a.getTime() == b.getTime();
315
+ const regexpA = a instanceof RegExp, regexpB = b instanceof RegExp;
316
+ if (regexpA != regexpB)
317
+ return false;
318
+ if (regexpA && regexpB)
319
+ return a.toString() == b.toString();
320
+ const keys = Object.keys(a);
321
+ length = keys.length;
322
+ if (length !== Object.keys(b).length)
323
+ return false;
324
+ for (i = length; i-- !== 0; )
325
+ if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
326
+ return false;
327
+ for (i = length; i-- !== 0; ) {
328
+ key = keys[i];
329
+ if (!deepEquals(a[key], b[key]))
330
+ return false;
331
+ }
332
+ return true;
333
+ }
334
+ return a !== a && b !== b;
335
+ }
336
+ function resolveFieldData(data, field) {
337
+ if (data && Object.keys(data).length && field) {
338
+ if (field.indexOf(".") === -1) {
339
+ return data[field];
340
+ } else {
341
+ const fields = field.split(".");
342
+ let value = data;
343
+ for (let i = 0, len = fields.length; i < len; ++i) {
344
+ if (data == null) {
345
+ return null;
346
+ }
347
+ value = value[fields[i]];
348
+ }
349
+ return value;
350
+ }
351
+ } else {
352
+ return null;
353
+ }
354
+ }
355
+ function contains(value, list) {
356
+ if (value != null && list && list.length) {
357
+ for (const val of list) {
358
+ if (equals(value, val)) {
359
+ return true;
360
+ }
361
+ }
362
+ }
363
+ return false;
364
+ }
365
+ function isEmpty(value) {
366
+ return ((value2) => value2 === null || value2 === void 0 || value2 === "" || Array.isArray(value2) && value2.length === 0 || !(value2 instanceof Date) && typeof value2 === "object" && Object.keys(value2).length === 0)(unref(value));
367
+ }
368
+ function isString(value) {
369
+ return typeof value === "string" || value instanceof String;
370
+ }
371
+ function useInjectedGroupState(groupKey) {
372
+ const group = inject(groupKey, void 0);
373
+ const isInGroup = computed(() => !isEmpty(group));
374
+ function getGroupOrLocalRef(propName, props, emit) {
375
+ if (group == null ? void 0 : group.value) {
376
+ const groupPropValue = unref(group.value)[propName];
377
+ return computed({
378
+ get() {
379
+ return groupPropValue == null ? void 0 : groupPropValue.value;
380
+ },
381
+ set(value) {
382
+ groupPropValue.value = value;
383
+ }
384
+ });
385
+ }
386
+ const propRef = toRef(props, propName);
387
+ return computed({
388
+ get() {
389
+ return propRef.value;
390
+ },
391
+ set(value) {
392
+ if (emit)
393
+ emit(`update:${propName}`, value);
394
+ }
395
+ });
396
+ }
397
+ return {
398
+ group,
399
+ isInGroup,
400
+ getGroupOrLocalRef
401
+ };
402
+ }
403
+ const VvCheckboxProps = {
404
+ ...CheckboxRadioProps,
405
+ ...ModifiersProps,
75
406
  /**
76
407
  * If true, the input will be indeterminated
77
408
  */
@@ -84,55 +415,97 @@ const ae = {
84
415
  * If true, the input will be displayed as a switch
85
416
  */
86
417
  switch: Boolean
87
- }, ne = ["click", "update:modelValue", "change", "blur"];
88
- function ue(e, f) {
89
- const { group: a, isInGroup: p, getGroupOrLocalRef: u } = useInjectedGroupState(Y), { id: d, switch: o, indeterminate: S } = toRefs(e), c = u("modelValue", e, f), s = u("readonly", e), t = u("disabled", e), r = u("valid", e), g = u("invalid", e);
418
+ };
419
+ const VvCheckboxEvents = ["click", "update:modelValue", "change", "blur"];
420
+ function useGroupProps(props, emit) {
421
+ const { group, isInGroup, getGroupOrLocalRef } = useInjectedGroupState(INJECTION_KEY_CHECK_GROUP);
422
+ const { id, switch: propsSwitch, indeterminate } = toRefs(props);
423
+ const modelValue = getGroupOrLocalRef("modelValue", props, emit);
424
+ const valid = getGroupOrLocalRef("valid", props);
425
+ const invalid = getGroupOrLocalRef("invalid", props);
426
+ const readonly = computed(
427
+ () => {
428
+ var _a;
429
+ return Boolean(props.readonly || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
430
+ }
431
+ );
432
+ const disabled = computed(
433
+ () => {
434
+ var _a;
435
+ return Boolean(props.disabled || ((_a = group == null ? void 0 : group.value) == null ? void 0 : _a.disabled.value));
436
+ }
437
+ );
90
438
  return {
91
439
  // local props
92
- id: d,
93
- propsSwitch: o,
94
- indeterminate: S,
440
+ id,
441
+ propsSwitch,
442
+ indeterminate,
95
443
  // global props
96
- group: a,
97
- isInGroup: p,
98
- modelValue: c,
99
- readonly: s,
100
- disabled: t,
101
- valid: r,
102
- invalid: g
444
+ group,
445
+ isInGroup,
446
+ modelValue,
447
+ valid,
448
+ invalid,
449
+ readonly,
450
+ disabled
103
451
  };
104
452
  }
105
- function A(e) {
106
- return Array.isArray(e) ? e.filter((f) => isString(f)).join(" ") : e;
453
+ function joinLines(errors) {
454
+ if (Array.isArray(errors)) {
455
+ return errors.filter((e) => isString(e)).join(" ");
456
+ }
457
+ return errors;
107
458
  }
108
- function le(e, f) {
459
+ function HintSlotFactory(parentProps, parentSlots) {
109
460
  const {
110
- invalid: a,
111
- valid: p,
112
- hint: u,
113
- loading: d
114
- } = f, {
115
- hintLabel: o,
116
- modelValue: S,
117
- valid: c,
118
- validLabel: s,
119
- invalid: t,
120
- invalidLabel: r,
121
- ...g
122
- } = toRefs(e), n = resolveFieldData(g, "loading"), v = resolveFieldData(g, "loadingLabel"), m = computed(() => t.value ? !!(t.value && a || r != null && r.value && Array.isArray(r.value) && r.value.length > 0 || r != null && r.value && !isEmpty(r)) : !1), b = computed(
123
- () => !!(o && o.value || u)
124
- ), V = computed(
125
- () => !!(s && s.value || p)
126
- ), k = computed(
127
- () => !!(n != null && n.value && d || n != null && n.value && (v != null && v.value))
128
- ), C = computed(
129
- () => b.value || V.value || m.value || k.value
461
+ invalid: invalidSlot,
462
+ valid: validSlot,
463
+ hint: hintSlot,
464
+ loading: loadingSlot
465
+ } = parentSlots;
466
+ const {
467
+ hintLabel,
468
+ modelValue,
469
+ valid,
470
+ validLabel,
471
+ invalid,
472
+ invalidLabel,
473
+ ...otherProps
474
+ } = toRefs(parentProps);
475
+ const loading = resolveFieldData(otherProps, "loading");
476
+ const loadingLabel = resolveFieldData(otherProps, "loadingLabel");
477
+ const hasInvalid = computed(() => {
478
+ if (!invalid.value) {
479
+ return false;
480
+ }
481
+ if (invalid.value && invalidSlot) {
482
+ return true;
483
+ }
484
+ if ((invalidLabel == null ? void 0 : invalidLabel.value) && Array.isArray(invalidLabel.value) && invalidLabel.value.length > 0) {
485
+ return true;
486
+ }
487
+ if ((invalidLabel == null ? void 0 : invalidLabel.value) && !isEmpty(invalidLabel)) {
488
+ return true;
489
+ }
490
+ return false;
491
+ });
492
+ const hasHint = computed(
493
+ () => !!(hintLabel && hintLabel.value || hintSlot)
494
+ );
495
+ const hasValid = computed(
496
+ () => !!(validLabel && validLabel.value || validSlot)
497
+ );
498
+ const hasLoading = computed(
499
+ () => !!((loading == null ? void 0 : loading.value) && loadingSlot || (loading == null ? void 0 : loading.value) && (loadingLabel == null ? void 0 : loadingLabel.value))
500
+ );
501
+ const isVisible = computed(
502
+ () => hasHint.value || hasValid.value || hasInvalid.value || hasLoading.value
130
503
  );
131
504
  return {
132
- hasInvalid: m,
133
- hasHint: b,
134
- hasValid: V,
135
- hasLoading: k,
505
+ hasInvalid,
506
+ hasHint,
507
+ hasValid,
508
+ hasLoading,
136
509
  HintSlot: {
137
510
  name: "HintSlot",
138
511
  props: {
@@ -141,30 +514,37 @@ function le(e, f) {
141
514
  default: () => ({})
142
515
  }
143
516
  },
144
- setup(x) {
145
- const _ = computed(() => {
146
- const y = toReactive({
147
- hintLabel: o,
148
- modelValue: S,
149
- valid: c,
150
- validLabel: s,
151
- invalid: t,
152
- invalidLabel: r,
153
- loading: n,
154
- loadingLabel: v,
155
- ...x.params
517
+ setup(props) {
518
+ const hintContent = computed(() => {
519
+ const slotProps = toReactive({
520
+ hintLabel,
521
+ modelValue,
522
+ valid,
523
+ validLabel,
524
+ invalid,
525
+ invalidLabel,
526
+ loading,
527
+ loadingLabel,
528
+ ...props.params
156
529
  });
157
- return t != null && t.value ? (a == null ? void 0 : a(y)) || A(r == null ? void 0 : r.value) || (o == null ? void 0 : o.value) : c != null && c.value ? (p == null ? void 0 : p(y)) || A(s == null ? void 0 : s.value) || (o == null ? void 0 : o.value) : n != null && n.value ? (d == null ? void 0 : d(y)) || A(v == null ? void 0 : v.value) || (o == null ? void 0 : o.value) : (u == null ? void 0 : u(y)) || A(o == null ? void 0 : o.value) || (o == null ? void 0 : o.value);
530
+ if (invalid == null ? void 0 : invalid.value) {
531
+ return (invalidSlot == null ? void 0 : invalidSlot(slotProps)) || joinLines(invalidLabel == null ? void 0 : invalidLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
532
+ }
533
+ if (valid == null ? void 0 : valid.value)
534
+ return (validSlot == null ? void 0 : validSlot(slotProps)) || joinLines(validLabel == null ? void 0 : validLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
535
+ if (loading == null ? void 0 : loading.value)
536
+ return (loadingSlot == null ? void 0 : loadingSlot(slotProps)) || joinLines(loadingLabel == null ? void 0 : loadingLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
537
+ return (hintSlot == null ? void 0 : hintSlot(slotProps)) || joinLines(hintLabel == null ? void 0 : hintLabel.value) || (hintLabel == null ? void 0 : hintLabel.value);
158
538
  });
159
539
  return {
160
- isVisible: C,
161
- hasInvalid: m,
162
- hasValid: V,
163
- hintContent: _
540
+ isVisible,
541
+ hasInvalid,
542
+ hasValid,
543
+ hintContent
164
544
  };
165
545
  },
166
546
  render() {
167
- if (this.isVisible)
547
+ if (this.isVisible) {
168
548
  return h(
169
549
  "small",
170
550
  {
@@ -172,107 +552,185 @@ function le(e, f) {
172
552
  },
173
553
  this.hintContent
174
554
  );
555
+ }
175
556
  }
176
557
  }
177
558
  };
178
559
  }
179
- const se = ["for"], ie = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"], de = {
560
+ const useUniqueId = (id) => computed(() => String((id == null ? void 0 : id.value) || nanoid()));
561
+ function useModifiers(prefix, modifiers, others) {
562
+ return computed(() => {
563
+ const toReturn = {
564
+ [prefix]: true
565
+ };
566
+ const modifiersArray = typeof (modifiers == null ? void 0 : modifiers.value) === "string" ? modifiers.value.split(" ") : modifiers == null ? void 0 : modifiers.value;
567
+ if (modifiersArray) {
568
+ if (Array.isArray(modifiersArray)) {
569
+ modifiersArray.forEach((modifier) => {
570
+ if (modifier) {
571
+ toReturn[`${prefix}--${modifier}`] = true;
572
+ }
573
+ });
574
+ }
575
+ }
576
+ if (others) {
577
+ Object.keys(others.value).forEach((key) => {
578
+ toReturn[`${prefix}--${key}`] = unref(others.value[key]);
579
+ });
580
+ }
581
+ return toReturn;
582
+ });
583
+ }
584
+ const _hoisted_1 = ["for"];
585
+ const _hoisted_2 = ["id", "name", "disabled", "value", "tabindex", "aria-invalid"];
586
+ const __default__ = {
180
587
  name: "VvCheckbox"
181
- }, ve = /* @__PURE__ */ G({
182
- ...de,
183
- props: re,
184
- emits: ne,
185
- setup(e, { emit: f }) {
186
- const a = e, p = useSlots(), {
187
- id: u,
188
- disabled: d,
189
- readonly: o,
190
- valid: S,
191
- invalid: c,
192
- propsSwitch: s,
193
- modelValue: t,
194
- indeterminate: r,
195
- isInGroup: g
196
- } = ue(a, f), n = useUniqueId(u), v = computed(() => V.value ? -1 : a.tabindex), m = ref(), b = computed(
197
- () => a.uncheckedValue !== void 0 && !g.value
198
- ), V = computed(() => d.value || o.value), k = computed(() => {
199
- if (c.value === !0)
200
- return !0;
201
- if (S.value === !0)
202
- return !1;
203
- }), C = computed(() => b.value ? t.value === a.value : Array.isArray(t.value) ? contains(a.value, t.value) : equals(a.value, t.value)), x = computed(() => !!(r.value || !C.value && b.value && a.uncheckedValue !== t.value)), _ = computed(() => {
204
- if (!b.value)
205
- return ["string", "number", "boolean"].includes(typeof a.value) ? a.value : !0;
206
- }), y = computed({
588
+ };
589
+ const _sfc_main = /* @__PURE__ */ defineComponent({
590
+ ...__default__,
591
+ props: VvCheckboxProps,
592
+ emits: VvCheckboxEvents,
593
+ setup(__props, { emit }) {
594
+ const props = __props;
595
+ const slots = useSlots();
596
+ const {
597
+ id,
598
+ disabled,
599
+ readonly,
600
+ valid,
601
+ invalid,
602
+ propsSwitch,
603
+ modelValue,
604
+ indeterminate,
605
+ isInGroup
606
+ } = useGroupProps(props, emit);
607
+ const hasId = useUniqueId(id);
608
+ const tabindex = computed(() => isDisabled.value ? -1 : props.tabindex);
609
+ const input = ref();
610
+ const isBinary = computed(
611
+ () => props.uncheckedValue !== void 0 && !isInGroup.value
612
+ );
613
+ const isDisabled = computed(() => disabled.value || readonly.value);
614
+ const isInvalid = computed(() => {
615
+ if (invalid.value === true) {
616
+ return true;
617
+ }
618
+ if (valid.value === true) {
619
+ return false;
620
+ }
621
+ return void 0;
622
+ });
623
+ const isChecked = computed(() => {
624
+ if (isBinary.value) {
625
+ return modelValue.value === props.value;
626
+ }
627
+ return Array.isArray(modelValue.value) ? contains(props.value, modelValue.value) : equals(props.value, modelValue.value);
628
+ });
629
+ const isIndeterminated = computed(() => {
630
+ if (indeterminate.value) {
631
+ return true;
632
+ }
633
+ if (!isChecked.value && isBinary.value && props.uncheckedValue !== modelValue.value) {
634
+ return true;
635
+ }
636
+ return false;
637
+ });
638
+ const hasValue = computed(() => {
639
+ if (isBinary.value) {
640
+ return void 0;
641
+ }
642
+ return ["string", "number", "boolean"].includes(typeof props.value) ? props.value : true;
643
+ });
644
+ const localModelValue = computed({
207
645
  get() {
208
- return C.value;
646
+ return isChecked.value;
209
647
  },
210
- set(i) {
211
- if (b.value)
212
- t.value = i ? a.value : a.uncheckedValue;
213
- else if (Array.isArray(t.value) || g.value) {
214
- const B = new Set(
215
- Array.isArray(t.value) ? t.value : t.value !== void 0 ? [t.value] : []
648
+ set(newValue) {
649
+ if (isBinary.value) {
650
+ modelValue.value = newValue ? props.value : props.uncheckedValue;
651
+ } else if (Array.isArray(modelValue.value) || isInGroup.value) {
652
+ const toReturn = new Set(
653
+ Array.isArray(modelValue.value) ? modelValue.value : modelValue.value !== void 0 ? [modelValue.value] : []
216
654
  );
217
- i ? B.add(a.value) : B.delete(a.value), t.value = [...B];
218
- } else
219
- t.value = i ? a.value : void 0;
220
- f("change", i);
655
+ if (newValue) {
656
+ toReturn.add(props.value);
657
+ } else {
658
+ toReturn.delete(props.value);
659
+ }
660
+ modelValue.value = [...toReturn];
661
+ } else {
662
+ modelValue.value = newValue ? props.value : void 0;
663
+ }
664
+ emit("change", newValue);
221
665
  }
222
- }), { modifiers: E } = toRefs(a), R = useBemModifiers(
666
+ });
667
+ const { modifiers } = toRefs(props);
668
+ const bemCssClasses = useModifiers(
223
669
  "vv-checkbox",
224
- E,
670
+ modifiers,
225
671
  computed(() => ({
226
- switch: s.value,
227
- valid: S.value,
228
- invalid: c.value,
229
- disabled: d.value,
230
- readonly: o.value,
231
- indeterminate: r.value
672
+ switch: propsSwitch.value,
673
+ valid: valid.value,
674
+ invalid: invalid.value,
675
+ disabled: disabled.value,
676
+ readonly: readonly.value,
677
+ indeterminate: indeterminate.value
232
678
  }))
233
679
  );
234
680
  watchEffect(() => {
235
- b.value && Array.isArray(t.value) && console.warn(
236
- "[VvCheckbox] The model value is an array but the component is in binary mode."
237
- );
238
- }), watch(
239
- () => x.value,
240
- (i) => {
241
- i ? m.value.indeterminate = !0 : m.value.indeterminate = !1;
681
+ if (isBinary.value && Array.isArray(modelValue.value)) {
682
+ console.warn(
683
+ `[VvCheckbox] The model value is an array but the component is in binary mode.`
684
+ );
685
+ }
686
+ });
687
+ watch(
688
+ () => isIndeterminated.value,
689
+ (newValue) => {
690
+ if (newValue) {
691
+ input.value.indeterminate = true;
692
+ } else {
693
+ input.value.indeterminate = false;
694
+ }
695
+ }
696
+ );
697
+ onMounted(() => {
698
+ if (isIndeterminated.value) {
699
+ input.value.indeterminate = true;
242
700
  }
243
- ), onMounted(() => {
244
- x.value && (m.value.indeterminate = !0);
245
701
  });
246
- const { HintSlot: P } = le(a, p);
247
- return (i, B) => (H(), D("label", {
248
- class: M(l(R)),
249
- for: l(n)
250
- }, [
251
- F(T("input", {
252
- id: l(n),
253
- ref_key: "input",
254
- ref: m,
255
- "onUpdate:modelValue": B[0] || (B[0] = (w) => q(y) ? y.value = w : null),
256
- type: "checkbox",
257
- class: "vv-checkbox__input",
258
- name: i.name,
259
- disabled: l(V),
260
- value: l(_),
261
- tabindex: l(v),
262
- "aria-invalid": l(k)
263
- }, null, 8, ie), [
264
- [U, l(y)]
265
- ]),
266
- z(i.$slots, "default", { value: l(t) }, () => [
267
- K(J(i.label), 1)
268
- ]),
269
- W(l(P), {
270
- class: "vv-checkbox__hint",
271
- params: { value: l(t) }
272
- }, null, 8, ["params"])
273
- ], 10, se));
702
+ const { HintSlot } = HintSlotFactory(props, slots);
703
+ return (_ctx, _cache) => {
704
+ return openBlock(), createElementBlock("label", {
705
+ class: normalizeClass(unref(bemCssClasses)),
706
+ for: unref(hasId)
707
+ }, [
708
+ withDirectives(createElementVNode("input", {
709
+ id: unref(hasId),
710
+ ref_key: "input",
711
+ ref: input,
712
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => isRef(localModelValue) ? localModelValue.value = $event : null),
713
+ type: "checkbox",
714
+ class: "vv-checkbox__input",
715
+ name: _ctx.name,
716
+ disabled: unref(isDisabled),
717
+ value: unref(hasValue),
718
+ tabindex: unref(tabindex),
719
+ "aria-invalid": unref(isInvalid)
720
+ }, null, 8, _hoisted_2), [
721
+ [vModelCheckbox, unref(localModelValue)]
722
+ ]),
723
+ renderSlot(_ctx.$slots, "default", { value: unref(modelValue) }, () => [
724
+ createTextVNode(toDisplayString(_ctx.label), 1)
725
+ ]),
726
+ createVNode(unref(HintSlot), {
727
+ class: "vv-checkbox__hint",
728
+ params: { value: unref(modelValue) }
729
+ }, null, 8, ["params"])
730
+ ], 10, _hoisted_1);
731
+ };
274
732
  }
275
733
  });
276
734
  export {
277
- ve as default
735
+ _sfc_main as default
278
736
  };