@volverjs/ui-vue 0.0.1 → 0.0.3-beta.2

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 (118) hide show
  1. package/README.md +17 -0
  2. package/auto-imports.d.ts +289 -0
  3. package/dist/components/VvButton/VvButton.es.js +159 -147
  4. package/dist/components/VvButton/VvButton.umd.js +1 -1
  5. package/dist/components/VvButton/VvButton.vue.d.ts +0 -8
  6. package/dist/components/VvButton/index.d.ts +4 -4
  7. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +36 -37
  8. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  9. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +10 -10
  10. package/dist/components/VvButtonGroup/index.d.ts +5 -5
  11. package/dist/components/VvCombobox/VvCombobox.es.js +526 -345
  12. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  13. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +22 -0
  14. package/dist/components/VvCombobox/index.d.ts +13 -1
  15. package/dist/components/VvDropdown/VvDropdown.es.js +118 -109
  16. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  17. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +19 -0
  18. package/dist/components/VvDropdown/index.d.ts +12 -0
  19. package/dist/components/VvInputText/VvInputText.es.js +221 -213
  20. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  21. package/dist/components/VvInputText/VvInputText.vue.d.ts +13 -13
  22. package/dist/components/VvInputText/index.d.ts +5 -5
  23. package/dist/components/VvSelect/VvSelect.es.js +186 -167
  24. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  25. package/dist/components/VvSelect/VvSelect.vue.d.ts +23 -11
  26. package/dist/components/VvSelect/index.d.ts +10 -17
  27. package/dist/components/VvTextarea/VvTextarea.es.js +241 -277
  28. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  29. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +12 -12
  30. package/dist/components/VvTextarea/index.d.ts +5 -5
  31. package/dist/components/VvTooltip/VvTooltip.es.js +28 -0
  32. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -0
  33. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +23 -0
  34. package/dist/components/VvTooltip/index.d.ts +18 -0
  35. package/dist/components/index.es.js +1046 -976
  36. package/dist/components/index.umd.js +1 -1
  37. package/dist/composables/group/types/IButtonGroupState.d.ts +1 -1
  38. package/dist/composables/group/types/IGroupState.d.ts +1 -1
  39. package/dist/composables/group/useInjectedGroupState.d.ts +1 -1
  40. package/dist/icons.es.js +3 -3
  41. package/dist/icons.umd.js +1 -1
  42. package/dist/index.es.js +1127 -1057
  43. package/dist/index.umd.js +1 -1
  44. package/dist/props/index.d.ts +35 -4
  45. package/dist/resolvers/unplugin.es.js +26 -24
  46. package/dist/resolvers/unplugin.umd.js +1 -1
  47. package/dist/stories/Button/Button.settings.d.ts +9 -11
  48. package/dist/stories/ButtonGroup/ButtonGroup.settings.d.ts +9 -0
  49. package/dist/stories/Combobox/Combobox.settings.d.ts +19 -0
  50. package/dist/stories/Dropdown/Dropdown.settings.d.ts +10 -0
  51. package/dist/stories/InputText/InputText.settings.d.ts +23 -23
  52. package/dist/stories/Select/Select.settings.d.ts +42 -23
  53. package/dist/stories/Textarea/Textarea.settings.d.ts +23 -23
  54. package/dist/stories/Tooltip/Tooltip.settings.d.ts +42 -0
  55. package/dist/stories/Tooltip/Tooltip.test.d.ts +2 -0
  56. package/dist/stories/argTypes.d.ts +50 -1
  57. package/package.json +31 -23
  58. package/src/assets/icons/detailed.json +1 -1
  59. package/src/assets/icons/normal.json +1 -1
  60. package/src/assets/icons/simple.json +1 -1
  61. package/src/components/VvButton/index.ts +28 -10
  62. package/src/components/VvButtonGroup/VvButtonGroup.vue +1 -1
  63. package/src/components/VvButtonGroup/index.ts +3 -6
  64. package/src/components/VvCombobox/VvCombobox.vue +45 -11
  65. package/src/components/VvCombobox/index.ts +6 -0
  66. package/src/components/VvDropdown/VvDropdown.vue +9 -6
  67. package/src/components/VvDropdown/index.ts +11 -1
  68. package/src/components/VvInputText/VvInputText.vue +10 -8
  69. package/src/components/VvSelect/VvSelect.vue +23 -1
  70. package/src/components/VvSelect/index.ts +8 -11
  71. package/src/components/VvTextarea/VvTextarea.vue +9 -21
  72. package/src/components/VvTooltip/VvTooltip.vue +17 -0
  73. package/src/components/VvTooltip/index.ts +21 -0
  74. package/src/composables/group/types/IButtonGroupState.ts +1 -1
  75. package/src/composables/group/types/IGroupState.ts +1 -1
  76. package/src/composables/group/useInjectedGroupState.ts +3 -3
  77. package/src/composables/useTextCount.ts +1 -1
  78. package/src/props/index.ts +33 -15
  79. package/src/resolvers/unplugin.ts +22 -13
  80. package/src/stories/Accordion/Accordion.stories.mdx +1 -1
  81. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +1 -1
  82. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +1 -1
  83. package/src/stories/Badge/Badge.stories.mdx +1 -1
  84. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +1 -1
  85. package/src/stories/Breadcrumb/BreadcrumbSlots.stories.mdx +1 -1
  86. package/src/stories/Button/Button.settings.ts +2 -7
  87. package/src/stories/Button/Button.stories.mdx +1 -1
  88. package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
  89. package/src/stories/Button/ButtonSlots.stories.mdx +3 -3
  90. package/src/stories/ButtonGroup/ButtonGroup.settings.ts +6 -1
  91. package/src/stories/ButtonGroup/ButtonGroup.stories.mdx +1 -1
  92. package/src/stories/ButtonGroup/ButtonGroupSlots.stories.mdx +37 -0
  93. package/src/stories/ButtonGroup/ButtonGroupToggle.stories.mdx +12 -1
  94. package/src/stories/Card/Card.stories.mdx +1 -1
  95. package/src/stories/Card/CardSlots.stories.mdx +1 -1
  96. package/src/stories/Checkbox/Checkbox.stories.mdx +1 -1
  97. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +1 -1
  98. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +1 -1
  99. package/src/stories/Combobox/Combobox.settings.ts +5 -0
  100. package/src/stories/Combobox/Combobox.stories.mdx +52 -1
  101. package/src/stories/Combobox/Combobox.test.ts +7 -0
  102. package/src/stories/Dialog/Dialog.stories.mdx +1 -1
  103. package/src/stories/Dropdown/Dropdown.settings.ts +10 -1
  104. package/src/stories/Dropdown/Dropdown.stories.mdx +18 -1
  105. package/src/stories/Icon/Icon.stories.mdx +1 -1
  106. package/src/stories/Icon/IconsCollection.stories.mdx +1 -1
  107. package/src/stories/InputText/InputText.stories.mdx +1 -1
  108. package/src/stories/Progress/Progress.stories.mdx +1 -1
  109. package/src/stories/Radio/Radio.stories.mdx +1 -1
  110. package/src/stories/RadioGroup/RadioGroup.stories.mdx +1 -1
  111. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +1 -1
  112. package/src/stories/Select/Select.settings.ts +9 -23
  113. package/src/stories/Select/Select.stories.mdx +61 -1
  114. package/src/stories/Textarea/Textarea.stories.mdx +1 -1
  115. package/src/stories/Tooltip/Tooltip.settings.ts +26 -0
  116. package/src/stories/Tooltip/Tooltip.stories.mdx +98 -0
  117. package/src/stories/Tooltip/Tooltip.test.ts +49 -0
  118. package/src/stories/argTypes.ts +46 -22
@@ -1,277 +1,294 @@
1
- import { unref as c, computed as m, toRefs as _, watch as W, defineComponent as M, openBlock as V, createElementBlock as w, normalizeClass as Y, createElementVNode as I, toDisplayString as x, createCommentVNode as A, Fragment as ee, renderList as be, withModifiers as Ve, createTextVNode as te, ref as k, inject as Se, createBlock as L, mergeProps as R, h as we, useSlots as $e, withKeys as Z, renderSlot as G, withDirectives as Ce, vModelText as Oe, createVNode as U } from "vue";
2
- import { nanoid as re } from "nanoid";
3
- import { useFocus as Ae, toReactive as ke, refDebounced as Ie, onClickOutside as _e } from "@vueuse/core";
4
- import { iconExists as D, Icon as Be, addIcon as Pe } from "@iconify/vue";
5
- function T(t, r, e) {
6
- return e ? E(t, e) === E(r, e) : H(t, r);
1
+ import { unref as a, computed as c, toRefs as T, watch as ie, defineComponent as Y, openBlock as y, createElementBlock as I, normalizeClass as ue, createElementVNode as B, toDisplayString as N, createCommentVNode as w, Fragment as de, renderList as $e, withModifiers as Te, createTextVNode as Ie, ref as j, inject as Ee, createBlock as F, mergeProps as P, h as Ke, useSlots as ke, renderSlot as J, normalizeProps as he, withDirectives as Ae, isRef as xe, vModelSelect as He, createVNode as ae, withKeys as ye, vModelText as Me } from "vue";
2
+ import { nanoid as ce } from "nanoid";
3
+ import { useFocus as ze, toReactive as qe, useElementVisibility as Ue, refDebounced as Ze, onClickOutside as Ge } from "@vueuse/core";
4
+ import { iconExists as U, Icon as Je, addIcon as Xe } from "@iconify/vue";
5
+ function X(n, t, e) {
6
+ return e ? Q(n, e) === Q(t, e) : se(n, t);
7
7
  }
8
- function H(t, r) {
9
- if (t === r)
8
+ function se(n, t) {
9
+ if (n === t)
10
10
  return !0;
11
- if (t && r && typeof t == "object" && typeof r == "object") {
12
- const e = Array.isArray(t), u = Array.isArray(r);
13
- let o, a, n;
14
- if (e && u) {
15
- if (a = t.length, a != r.length)
11
+ if (n && t && typeof n == "object" && typeof t == "object") {
12
+ const e = Array.isArray(n), i = Array.isArray(t);
13
+ let r, u, l;
14
+ if (e && i) {
15
+ if (u = n.length, u != t.length)
16
16
  return !1;
17
- for (o = a; o-- !== 0; )
18
- if (!H(t[o], r[o]))
17
+ for (r = u; r-- !== 0; )
18
+ if (!se(n[r], t[r]))
19
19
  return !1;
20
20
  return !0;
21
21
  }
22
- if (e != u)
22
+ if (e != i)
23
23
  return !1;
24
- const g = t instanceof Date, v = r instanceof Date;
25
- if (g != v)
24
+ const b = n instanceof Date, m = t instanceof Date;
25
+ if (b != m)
26
26
  return !1;
27
- if (g && v)
28
- return t.getTime() == r.getTime();
29
- const f = t instanceof RegExp, l = r instanceof RegExp;
30
- if (f != l)
27
+ if (b && m)
28
+ return n.getTime() == t.getTime();
29
+ const p = n instanceof RegExp, o = t instanceof RegExp;
30
+ if (p != o)
31
31
  return !1;
32
- if (f && l)
33
- return t.toString() == r.toString();
34
- const s = Object.keys(t);
35
- if (a = s.length, a !== Object.keys(r).length)
32
+ if (p && o)
33
+ return n.toString() == t.toString();
34
+ const s = Object.keys(n);
35
+ if (u = s.length, u !== Object.keys(t).length)
36
36
  return !1;
37
- for (o = a; o-- !== 0; )
38
- if (!Object.prototype.hasOwnProperty.call(r, s[o]))
37
+ for (r = u; r-- !== 0; )
38
+ if (!Object.prototype.hasOwnProperty.call(t, s[r]))
39
39
  return !1;
40
- for (o = a; o-- !== 0; )
41
- if (n = s[o], !H(t[n], r[n]))
40
+ for (r = u; r-- !== 0; )
41
+ if (l = s[r], !se(n[l], t[l]))
42
42
  return !1;
43
43
  return !0;
44
44
  }
45
- return t !== t && r !== r;
45
+ return n !== n && t !== t;
46
46
  }
47
- function E(t, r) {
48
- if (t && Object.keys(t).length && r) {
49
- if (r.indexOf(".") === -1)
50
- return t[r];
47
+ function Q(n, t) {
48
+ if (n && Object.keys(n).length && t) {
49
+ if (t.indexOf(".") === -1)
50
+ return n[t];
51
51
  {
52
- const e = r.split(".");
53
- let u = t;
54
- for (let o = 0, a = e.length; o < a; ++o) {
55
- if (t == null)
52
+ const e = t.split(".");
53
+ let i = n;
54
+ for (let r = 0, u = e.length; r < u; ++r) {
55
+ if (n == null)
56
56
  return null;
57
- u = u[e[o]];
57
+ i = i[e[r]];
58
58
  }
59
- return u;
59
+ return i;
60
60
  }
61
61
  } else
62
62
  return null;
63
63
  }
64
- function Ne(t, r) {
64
+ function Qe(n, t) {
65
65
  let e = -1;
66
- if (r) {
67
- for (let u = 0; u < r.length; u++)
68
- if (T(r[u], t)) {
69
- e = u;
66
+ if (t) {
67
+ for (let i = 0; i < t.length; i++)
68
+ if (X(t[i], n)) {
69
+ e = i;
70
70
  break;
71
71
  }
72
72
  }
73
73
  return e;
74
74
  }
75
- function j(t, r) {
76
- if (t != null && r && r.length) {
77
- for (const e of r)
78
- if (T(t, e))
75
+ function Z(n, t) {
76
+ if (n != null && t && t.length) {
77
+ for (const e of t)
78
+ if (X(n, e))
79
79
  return !0;
80
80
  }
81
81
  return !1;
82
82
  }
83
- function ne(t) {
84
- return ((r) => r == null || r === "" || Array.isArray(r) && r.length === 0 || !(r instanceof Date) && typeof r == "object" && Object.keys(r).length === 0)(c(t));
83
+ function fe(n) {
84
+ return ((t) => t == null || t === "" || Array.isArray(t) && t.length === 0 || !(t instanceof Date) && typeof t == "object" && Object.keys(t).length === 0)(a(n));
85
85
  }
86
- function De(t, r) {
87
- const e = Ne(t, r);
88
- return e > -1 ? r.filter((u, o) => o !== e) : r;
86
+ function We(n, t) {
87
+ const e = Qe(n, t);
88
+ return e > -1 ? t.filter((i, r) => r !== e) : t;
89
89
  }
90
- function je(t) {
91
- return typeof t == "string" || t instanceof String;
90
+ function Ye(n) {
91
+ return typeof n == "string" || n instanceof String;
92
92
  }
93
- function J(t) {
94
- var r, e;
95
- if (t)
96
- return (e = (r = t.match(
93
+ function Ve(n) {
94
+ var t, e;
95
+ if (n)
96
+ return (e = (t = n.match(
97
97
  /[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
98
- )) == null ? void 0 : r.join("-")) == null ? void 0 : e.toLowerCase();
98
+ )) == null ? void 0 : t.join("-")) == null ? void 0 : e.toLowerCase();
99
99
  }
100
- function z(t, r) {
101
- const e = { [`${t}`]: !0 };
100
+ function ee(n, t) {
101
+ const e = { [`${n}`]: !0 };
102
102
  return {
103
- bemCssClasses: m(() => Object.keys(r).reduce((o, a) => {
104
- const n = c(r[a]) || !1;
105
- if (!n)
106
- return o;
107
- if (a === "modifiers") {
108
- const g = Array.isArray(n) ? n : n.split(" ");
103
+ bemCssClasses: c(() => Object.keys(t).reduce((r, u) => {
104
+ const l = a(t[u]) || !1;
105
+ if (!l)
106
+ return r;
107
+ if (u === "modifiers") {
108
+ const b = Array.isArray(l) ? l : l.split(" ");
109
109
  return {
110
- ...o,
111
- ...g.reduce(
112
- (v, f) => ({
113
- ...v,
114
- [`${t}--${J(f)}`]: !0
110
+ ...r,
111
+ ...b.reduce(
112
+ (m, p) => ({
113
+ ...m,
114
+ [`${n}--${Ve(p)}`]: !0
115
115
  }),
116
116
  {}
117
117
  )
118
118
  };
119
119
  } else
120
120
  return {
121
- ...o,
122
- [`${t}--${J(a)}`]: n
121
+ ...r,
122
+ [`${n}--${Ve(u)}`]: l
123
123
  };
124
124
  }, e) || {})
125
125
  };
126
126
  }
127
- function Fe(t, r, e) {
128
- const u = m(
129
- () => !!(t != null && t.value && r.value === "left" || e != null && e.iconLeft)
130
- ), o = m(
131
- () => !!(t != null && t.value && r.value === "right" || e != null && e.iconRight)
132
- ), a = m(
133
- () => !!(t != null && t.value && r.value === "top" || e != null && e.iconTop)
134
- ), n = m(
135
- () => !!(t != null && t.value && r.value === "bottom" || e != null && e.iconBottom)
127
+ function Oe(n, t, e) {
128
+ const i = c(
129
+ () => !!(n != null && n.value && t.value === "left" || e != null && e.iconLeft)
130
+ ), r = c(
131
+ () => !!(n != null && n.value && t.value === "right" || e != null && e.iconRight)
132
+ ), u = c(
133
+ () => !!(n != null && n.value && t.value === "top" || e != null && e.iconTop)
134
+ ), l = c(
135
+ () => !!(n != null && n.value && t.value === "bottom" || e != null && e.iconBottom)
136
136
  );
137
137
  return {
138
- hasIcon: m(() => typeof (t == null ? void 0 : t.value) == "string" ? { name: t == null ? void 0 : t.value } : t == null ? void 0 : t.value),
139
- hasIconLeft: u,
140
- hasIconRight: o,
141
- hasIconTop: a,
142
- hasIconBottom: n
138
+ hasIcon: c(() => typeof (n == null ? void 0 : n.value) == "string" ? { name: n == null ? void 0 : n.value } : n == null ? void 0 : n.value),
139
+ hasIconLeft: i,
140
+ hasIconRight: r,
141
+ hasIconTop: u,
142
+ hasIconBottom: l
143
143
  };
144
144
  }
145
- function oe(t) {
146
- const { options: r, labelKey: e, valueKey: u } = _(t);
145
+ function pe(n) {
146
+ const { options: t, labelKey: e, valueKey: i } = T(n);
147
147
  return {
148
- options: r,
149
- getOptionLabel: (n) => typeof n != "object" && n !== null ? n : typeof e.value == "function" ? e.value(n) : n[e.value],
150
- getOptionValue: (n) => typeof n != "object" && n !== null ? n : typeof u.value == "function" ? u.value(n) : n[u.value]
148
+ options: t,
149
+ getOptionLabel: (l) => typeof l != "object" && l !== null ? l : typeof e.value == "function" ? e.value(l) : l[e.value],
150
+ getOptionValue: (l) => typeof l != "object" && l !== null ? l : typeof i.value == "function" ? i.value(l) : l[i.value]
151
151
  };
152
152
  }
153
- function Re(t, r) {
154
- const { focused: e } = Ae(t);
155
- return W(e, (u) => {
156
- r(u ? "focus" : "blur", c(t));
153
+ function we(n, t) {
154
+ const { focused: e } = ze(n);
155
+ return ie(e, (i) => {
156
+ t(i ? "focus" : "blur", a(n));
157
157
  }), {
158
158
  focused: e
159
159
  };
160
160
  }
161
- const xe = {
161
+ const Ce = {
162
162
  valid: Boolean,
163
163
  validLabel: [String, Array]
164
- }, Te = {
164
+ }, _e = {
165
165
  invalid: Boolean,
166
166
  invalidLabel: [String, Array]
167
- }, Ee = {
167
+ }, Pe = {
168
168
  loading: Boolean,
169
169
  loadingLabel: String
170
- }, le = {
170
+ }, ve = {
171
171
  disabled: Boolean
172
- }, Ke = {
172
+ }, Be = {
173
173
  readonly: Boolean
174
- }, se = {
174
+ }, me = {
175
175
  modifiers: [String, Array]
176
- }, Le = {
176
+ }, Ne = {
177
177
  hintLabel: { type: String, default: "" }
178
- }, ae = {
178
+ }, ge = {
179
179
  options: {
180
180
  type: Array,
181
181
  default: () => []
182
182
  },
183
183
  labelKey: { type: [String, Function], default: "label" },
184
184
  valueKey: { type: [String, Function], default: "value" }
185
- }, X = {
185
+ }, Se = {
186
186
  LEFT: "left",
187
187
  RIGHT: "right"
188
- }, He = {
188
+ }, De = {
189
189
  icon: { type: [String, Object] },
190
190
  iconPosition: {
191
191
  type: String,
192
- validation: (t) => Object.values(X).includes(t),
193
- default: X.RIGHT
192
+ validation: (n) => Object.values(Se).includes(n),
193
+ default: Se.RIGHT
194
194
  }
195
- }, Me = {
195
+ }, Le = {
196
196
  tabindex: { type: [String, Number], default: 0 }
197
- }, ze = {
198
- ...ae,
199
- ...le,
200
- ...se,
197
+ }, Re = {
198
+ floating: Boolean
199
+ }, je = {
200
+ unselectable: { type: Boolean, default: !0 }
201
+ }, be = {
202
+ id: [String, Number],
203
+ name: { type: String, required: !0 }
204
+ }, et = {
205
+ autofocus: Boolean
206
+ }, tt = {
207
+ autocomplete: { type: String, default: "off" }
208
+ }, nt = {
209
+ ...be,
210
+ ...ge,
211
+ ...ve,
212
+ ...me,
201
213
  modelValue: {
202
214
  type: [String, Number, Boolean, Object, Array]
203
215
  },
204
216
  labelNoResults: { type: String, default: "No results" },
205
217
  multiple: Boolean,
206
- maxValues: [Number, String]
207
- }, qe = {
218
+ maxValues: [Number, String],
219
+ unselectable: { type: Boolean, default: !0 }
220
+ }, lt = ["id"], rt = {
208
221
  key: 0,
209
222
  role: "option"
210
- }, Ze = ["aria-selected"], Ge = ["for", "onClick"], Ue = ["id", "type", "value", "checked", "disabled"], Je = {
223
+ }, ot = ["aria-selected"], at = ["for", "onClick"], st = ["id", "type", "value", "checked", "disabled", "name"], it = {
211
224
  name: "VvDropdown"
212
- }, Xe = /* @__PURE__ */ M({
213
- ...Je,
214
- props: ze,
225
+ }, ut = /* @__PURE__ */ Y({
226
+ ...it,
227
+ props: nt,
215
228
  emits: ["update:modelValue"],
216
- setup(t, { emit: r }) {
217
- const e = t, u = re(), { modifiers: o, disabled: a } = _(e), { getOptionLabel: n, getOptionValue: g } = oe(e), { bemCssClasses: v } = z("vv-dropdown", {
218
- modifiers: o,
219
- disabled: a
229
+ setup(n, { emit: t }) {
230
+ const e = n, i = c(() => String(e.id || ce())), { modifiers: r, disabled: u } = T(e), { getOptionLabel: l, getOptionValue: b } = pe(e), { bemCssClasses: m } = ee("vv-dropdown", {
231
+ modifiers: r,
232
+ disabled: u
220
233
  });
221
- function f(i) {
222
- return Array.isArray(e.modelValue) ? j(i, e.modelValue) || j(g(i), e.modelValue) : T(i, e.modelValue) || T(g(i), e.modelValue);
234
+ function p(d) {
235
+ return Array.isArray(e.modelValue) ? Z(d, e.modelValue) || Z(b(d), e.modelValue) : X(d, e.modelValue) || X(b(d), e.modelValue);
223
236
  }
224
- function l(i) {
225
- return typeof i == "string" || i.disabled === void 0 ? a.value : i.disabled;
237
+ function o(d) {
238
+ return typeof d == "string" || d.disabled === void 0 ? u.value : d.disabled;
226
239
  }
227
- function s(i) {
228
- var h;
240
+ function s(d) {
241
+ var V;
229
242
  if (e.disabled)
230
243
  return;
231
- let p = i;
244
+ let v = d;
232
245
  if (e.multiple)
233
246
  if (Array.isArray(e.modelValue)) {
234
- if (e.maxValues !== void 0 && e.maxValues >= 0 && ((h = e.modelValue) == null ? void 0 : h.length) >= e.maxValues && !j(i, e.modelValue))
247
+ if (e.maxValues !== void 0 && e.maxValues >= 0 && ((V = e.modelValue) == null ? void 0 : V.length) >= e.maxValues && !Z(d, e.modelValue))
235
248
  return;
236
- p = j(i, e.modelValue) ? De(i, e.modelValue) : [...e.modelValue, i];
249
+ v = Z(d, e.modelValue) ? We(d, e.modelValue) : [...e.modelValue, d];
237
250
  } else
238
- p = [i];
239
- r("update:modelValue", p);
251
+ v = [d];
252
+ else
253
+ e.unselectable && d === e.modelValue && (v = void 0);
254
+ t("update:modelValue", v);
240
255
  }
241
- return (i, p) => {
242
- var h;
243
- return V(), w("ul", {
244
- class: Y(c(v)),
256
+ return (d, v) => {
257
+ var V;
258
+ return y(), I("ul", {
259
+ id: a(i),
260
+ class: ue(a(m)),
245
261
  role: "listbox"
246
262
  }, [
247
- (h = i.options) != null && h.length ? A("", !0) : (V(), w("li", qe, [
248
- I("label", null, x(i.labelNoResults), 1)
263
+ (V = d.options) != null && V.length ? w("", !0) : (y(), I("li", rt, [
264
+ B("label", null, N(d.labelNoResults), 1)
249
265
  ])),
250
- (V(!0), w(ee, null, be(i.options, (y, S) => (V(), w("li", {
251
- key: S,
266
+ (y(!0), I(de, null, $e(d.options, (h, $) => (y(), I("li", {
267
+ key: $,
252
268
  role: "option",
253
- "aria-selected": f(y)
269
+ "aria-selected": p(h)
254
270
  }, [
255
- I("label", {
256
- for: `dropdown-${S}-${c(u)}`,
257
- onClick: Ve((C) => s(c(g)(y)), ["prevent"])
271
+ B("label", {
272
+ for: `dropdown-${$}-${a(i)}`,
273
+ onClick: Te((A) => s(a(b)(h)), ["prevent"])
258
274
  }, [
259
- I("input", {
260
- id: `dropdown-${S}-${c(u)}`,
261
- type: i.multiple ? "checkbox" : "radio",
262
- value: c(g)(y),
263
- checked: f(y),
264
- disabled: l(y),
275
+ B("input", {
276
+ id: `dropdown-${$}-${a(i)}`,
277
+ type: d.multiple ? "checkbox" : "radio",
278
+ value: a(b)(h),
279
+ checked: p(h),
280
+ disabled: o(h),
281
+ name: d.name,
265
282
  tabindex: "-1",
266
283
  "aria-hidden": "true"
267
- }, null, 8, Ue),
268
- te(" " + x(c(n)(y)), 1)
269
- ], 8, Ge)
270
- ], 8, Ze))), 128))
271
- ], 2);
284
+ }, null, 8, st),
285
+ Ie(" " + N(a(l)(h)), 1)
286
+ ], 8, at)
287
+ ], 8, ot))), 128))
288
+ ], 10, lt);
272
289
  };
273
290
  }
274
- }), Qe = "ds", We = {
291
+ }), dt = "ds", ct = {
275
292
  color: String,
276
293
  width: {
277
294
  type: [String, Number]
@@ -302,90 +319,90 @@ const xe = {
302
319
  modifiers: {
303
320
  type: [String, Array]
304
321
  }
305
- }, Ye = {
322
+ }, ft = {
306
323
  name: "VvIcon"
307
- }, Q = /* @__PURE__ */ M({
308
- ...Ye,
309
- props: We,
310
- setup(t) {
311
- const r = t, e = k(!0), { modifiers: u } = _(r), o = Se(Qe), { bemCssClasses: a } = z("vv-icon", {
312
- modifiers: u
313
- }), n = m(() => r.provider || (o == null ? void 0 : o.provider)), g = m(() => {
314
- const l = r.name ?? "", s = `@${n.value}:${r.prefix}:${r.name}`;
315
- return D(l) ? l : D(s) ? s : (o == null ? void 0 : o.iconsCollections.find((i) => {
316
- const p = `@${n.value}:${i.prefix}:${l}`;
317
- if (D(p))
318
- return p;
319
- })) || l;
324
+ }, W = /* @__PURE__ */ Y({
325
+ ...ft,
326
+ props: ct,
327
+ setup(n) {
328
+ const t = n, e = j(!0), { modifiers: i } = T(t), r = Ee(dt), { bemCssClasses: u } = ee("vv-icon", {
329
+ modifiers: i
330
+ }), l = c(() => t.provider || (r == null ? void 0 : r.provider)), b = c(() => {
331
+ const o = t.name ?? "", s = `@${l.value}:${t.prefix}:${t.name}`;
332
+ return U(o) ? o : U(s) ? s : (r == null ? void 0 : r.iconsCollections.find((d) => {
333
+ const v = `@${l.value}:${d.prefix}:${o}`;
334
+ if (U(v))
335
+ return v;
336
+ })) || o;
320
337
  });
321
- function v(l) {
338
+ function m(o) {
322
339
  let s = null;
323
340
  if (typeof window > "u") {
324
- const { JSDOM: y } = require("jsdom");
325
- s = new y().window;
341
+ const { JSDOM: h } = require("jsdom");
342
+ s = new h().window;
326
343
  }
327
- return (s ? new s.DOMParser() : new window.DOMParser()).parseFromString(l, "text/html").querySelector("svg");
344
+ return (s ? new s.DOMParser() : new window.DOMParser()).parseFromString(o, "text/html").querySelector("svg");
328
345
  }
329
- function f(l) {
330
- const s = v(l), i = (s == null ? void 0 : s.innerHTML.trim()) || "";
331
- s && i && Pe(`@${n.value}:${r.prefix}:${r.name}`, {
332
- body: i,
346
+ function p(o) {
347
+ const s = m(o), d = (s == null ? void 0 : s.innerHTML.trim()) || "";
348
+ s && d && Xe(`@${l.value}:${t.prefix}:${t.name}`, {
349
+ body: d,
333
350
  height: s.viewBox.baseVal.height,
334
351
  width: s.viewBox.baseVal.width
335
352
  });
336
353
  }
337
- return o && (r.src && !D(`@${n.value}:${r.prefix}:${r.name}`) ? (e.value = !1, o.fetchIcon(r.src).then((l) => {
338
- l && (f(l), e.value = !0);
339
- }).catch((l) => {
340
- throw new Error(`During fetch icon: ${l == null ? void 0 : l.message}`);
341
- })) : r.svg && f(r.svg)), (l, s) => e.value ? (V(), L(c(Be), R({
354
+ return r && (t.src && !U(`@${l.value}:${t.prefix}:${t.name}`) ? (e.value = !1, r.fetchIcon(t.src).then((o) => {
355
+ o && (p(o), e.value = !0);
356
+ }).catch((o) => {
357
+ throw new Error(`During fetch icon: ${o == null ? void 0 : o.message}`);
358
+ })) : t.svg && p(t.svg)), (o, s) => e.value ? (y(), F(a(Je), P({
342
359
  key: 0,
343
- class: c(a)
360
+ class: a(u)
344
361
  }, {
345
- inline: l.inline,
346
- width: l.width,
347
- height: l.height,
348
- horizontalFlip: l.horizontalFlip,
349
- verticalFlip: l.verticalFlip,
350
- flip: l.flip,
351
- rotate: l.rotate,
352
- color: l.color,
353
- onLoad: l.onLoad,
354
- icon: c(g)
355
- }), null, 16, ["class"])) : A("", !0);
362
+ inline: o.inline,
363
+ width: o.width,
364
+ height: o.height,
365
+ horizontalFlip: o.horizontalFlip,
366
+ verticalFlip: o.verticalFlip,
367
+ flip: o.flip,
368
+ rotate: o.rotate,
369
+ color: o.color,
370
+ onLoad: o.onLoad,
371
+ icon: a(b)
372
+ }), null, 16, ["class"])) : w("", !0);
356
373
  }
357
374
  });
358
- function F(t) {
359
- return Array.isArray(t) ? t.filter((r) => je(r)).join(" ") : t;
375
+ function G(n) {
376
+ return Array.isArray(n) ? n.filter((t) => Ye(t)).join(" ") : n;
360
377
  }
361
- function et(t, r) {
378
+ function Fe(n, t) {
362
379
  const {
363
380
  invalid: e,
364
- valid: u,
365
- hint: o,
366
- loading: a
367
- } = r, {
368
- hintLabel: n,
369
- modelValue: g,
370
- valid: v,
371
- validLabel: f,
372
- invalid: l,
381
+ valid: i,
382
+ hint: r,
383
+ loading: u
384
+ } = t, {
385
+ hintLabel: l,
386
+ modelValue: b,
387
+ valid: m,
388
+ validLabel: p,
389
+ invalid: o,
373
390
  invalidLabel: s,
374
- ...i
375
- } = _(t), p = E(i, "loading"), h = E(i, "loadingLabel"), y = m(() => l.value ? !!(l.value && e || s != null && s.value && Array.isArray(s.value) && s.value.length > 0 || s != null && s.value && !ne(s)) : !1), S = m(
376
- () => !!(n && n.value || o)
377
- ), C = m(
378
- () => !!(f && f.value || u)
379
- ), B = m(
380
- () => !!(p != null && p.value && a || p != null && p.value && (h != null && h.value))
381
- ), K = m(
382
- () => S.value || C.value || y.value || B.value
391
+ ...d
392
+ } = T(n), v = Q(d, "loading"), V = Q(d, "loadingLabel"), h = c(() => o.value ? !!(o.value && e || s != null && s.value && Array.isArray(s.value) && s.value.length > 0 || s != null && s.value && !fe(s)) : !1), $ = c(
393
+ () => !!(l && l.value || r)
394
+ ), A = c(
395
+ () => !!(p && p.value || i)
396
+ ), O = c(
397
+ () => !!(v != null && v.value && u || v != null && v.value && (V != null && V.value))
398
+ ), C = c(
399
+ () => $.value || A.value || h.value || O.value
383
400
  );
384
401
  return {
385
- hasInvalid: y,
386
- hasHint: S,
387
- hasValid: C,
388
- hasLoading: B,
402
+ hasInvalid: h,
403
+ hasHint: $,
404
+ hasValid: A,
405
+ hasLoading: O,
389
406
  HintSlot: {
390
407
  name: "HintSlot",
391
408
  props: {
@@ -394,31 +411,31 @@ function et(t, r) {
394
411
  default: () => ({})
395
412
  }
396
413
  },
397
- setup(P) {
398
- const N = m(() => {
399
- const $ = ke({
400
- hintLabel: n,
401
- modelValue: g,
402
- valid: v,
403
- validLabel: f,
404
- invalid: l,
414
+ setup(D) {
415
+ const L = c(() => {
416
+ const k = qe({
417
+ hintLabel: l,
418
+ modelValue: b,
419
+ valid: m,
420
+ validLabel: p,
421
+ invalid: o,
405
422
  invalidLabel: s,
406
- loading: p,
407
- loadingLabel: h,
408
- ...P.params
423
+ loading: v,
424
+ loadingLabel: V,
425
+ ...D.params
409
426
  });
410
- return l != null && l.value ? (e == null ? void 0 : e($)) || F(s == null ? void 0 : s.value) || (n == null ? void 0 : n.value) : v != null && v.value ? (u == null ? void 0 : u($)) || F(f == null ? void 0 : f.value) || (n == null ? void 0 : n.value) : p != null && p.value ? (a == null ? void 0 : a($)) || F(h == null ? void 0 : h.value) || (n == null ? void 0 : n.value) : (o == null ? void 0 : o($)) || F(n == null ? void 0 : n.value) || (n == null ? void 0 : n.value);
427
+ return o != null && o.value ? (e == null ? void 0 : e(k)) || G(s == null ? void 0 : s.value) || (l == null ? void 0 : l.value) : m != null && m.value ? (i == null ? void 0 : i(k)) || G(p == null ? void 0 : p.value) || (l == null ? void 0 : l.value) : v != null && v.value ? (u == null ? void 0 : u(k)) || G(V == null ? void 0 : V.value) || (l == null ? void 0 : l.value) : (r == null ? void 0 : r(k)) || G(l == null ? void 0 : l.value) || (l == null ? void 0 : l.value);
411
428
  });
412
429
  return {
413
- isVisible: K,
414
- hasInvalid: y,
415
- hasValid: C,
416
- hintContent: N
430
+ isVisible: C,
431
+ hasInvalid: h,
432
+ hasValid: A,
433
+ hintContent: L
417
434
  };
418
435
  },
419
436
  render() {
420
437
  if (this.isVisible)
421
- return we(
438
+ return Ke(
422
439
  "small",
423
440
  {
424
441
  role: this.hasInvalid || this.hasValid ? "alert" : void 0
@@ -429,22 +446,155 @@ function et(t, r) {
429
446
  }
430
447
  };
431
448
  }
432
- const tt = [
449
+ const pt = {
450
+ ...be,
451
+ ...et,
452
+ ...tt,
453
+ ...Le,
454
+ ...Ce,
455
+ ..._e,
456
+ ...Ne,
457
+ ...Pe,
458
+ ...ve,
459
+ ...Be,
460
+ ...me,
461
+ ...ge,
462
+ ...De,
463
+ ...Re,
464
+ ...je,
465
+ multiple: Boolean,
466
+ required: Boolean,
467
+ size: [String, Number],
468
+ modelValue: {
469
+ type: [String, Number, Boolean, Object, Array],
470
+ default: void 0
471
+ },
472
+ label: String,
473
+ placeholder: String
474
+ }, vt = ["update:modelValue", "focus", "blur"], mt = ["for"], gt = { class: "vv-select__wrapper" }, bt = ["id"], ht = ["disabled", "hidden"], yt = ["disabled", "value"], Vt = {
475
+ name: "VvSelect"
476
+ }, St = /* @__PURE__ */ Y({
477
+ ...Vt,
478
+ props: pt,
479
+ emits: vt,
480
+ setup(n, { emit: t }) {
481
+ const e = n, i = ke(), r = j(), { HintSlot: u, hasHint: l, hasInvalid: b } = Fe(e, i), {
482
+ modifiers: m,
483
+ disabled: p,
484
+ readonly: o,
485
+ loading: s,
486
+ icon: d,
487
+ iconPosition: v,
488
+ invalid: V,
489
+ valid: h,
490
+ floating: $,
491
+ multiple: A
492
+ } = T(e), O = c(() => String(e.id || ce())), C = c(() => `${O.value}-hint`), { focused: D } = we(r, t), L = Ue(r);
493
+ ie(L, (g) => {
494
+ g && e.autofocus && (D.value = !0);
495
+ });
496
+ const { hasIcon: k, hasIconLeft: E, hasIconRight: x } = Oe(
497
+ d,
498
+ v
499
+ ), H = c(() => !fe(e.modelValue)), M = c(() => e.disabled || e.readonly), z = c(() => M.value ? -1 : e.tabindex), q = c(() => {
500
+ if (e.invalid === !0)
501
+ return !0;
502
+ if (e.valid === !0)
503
+ return !1;
504
+ }), { bemCssClasses: te } = ee("vv-select", {
505
+ modifiers: m,
506
+ valid: h,
507
+ invalid: V,
508
+ loading: s,
509
+ disabled: p,
510
+ readonly: o,
511
+ iconLeft: E,
512
+ iconRight: x,
513
+ dirty: H,
514
+ focus: D,
515
+ floating: $,
516
+ multiple: A
517
+ }), ne = c(() => ({
518
+ name: e.name,
519
+ tabindex: z.value,
520
+ disabled: M.value,
521
+ required: e.required,
522
+ size: e.size,
523
+ autocomplete: e.autocomplete,
524
+ multiple: e.multiple,
525
+ "aria-invalid": q.value,
526
+ "aria-describedby": !b.value && l.value ? C.value : void 0,
527
+ "aria-errormessage": b.value ? C.value : void 0
528
+ })), { getOptionLabel: le, getOptionValue: re } = pe(e);
529
+ function oe(g) {
530
+ return typeof g == "string" || g.disabled === void 0 ? p.value : g.disabled;
531
+ }
532
+ const K = c({
533
+ get: () => e.modelValue,
534
+ set: (g) => {
535
+ Array.isArray(g) && (g = g.filter((R) => R !== void 0)), t("update:modelValue", g);
536
+ }
537
+ });
538
+ return (g, R) => (y(), I("div", {
539
+ class: ue(a(te))
540
+ }, [
541
+ g.label ? (y(), I("label", {
542
+ key: 0,
543
+ for: a(O)
544
+ }, N(g.label), 9, mt)) : w("", !0),
545
+ B("div", gt, [
546
+ J(g.$slots, "before", {}, () => [
547
+ a(E) ? (y(), F(W, he(P({ key: 0 }, a(k))), null, 16)) : w("", !0)
548
+ ]),
549
+ Ae(B("select", P({
550
+ id: a(O),
551
+ ref_key: "select",
552
+ ref: r,
553
+ "onUpdate:modelValue": R[0] || (R[0] = (f) => xe(K) ? K.value = f : null)
554
+ }, a(ne)), [
555
+ g.placeholder ? (y(), I("option", {
556
+ key: 0,
557
+ value: void 0,
558
+ disabled: !g.unselectable,
559
+ hidden: !g.unselectable
560
+ }, N(g.placeholder), 9, ht)) : w("", !0),
561
+ (y(!0), I(de, null, $e(g.options, (f, S) => (y(), I("option", {
562
+ key: S,
563
+ disabled: oe(f),
564
+ value: a(re)(f)
565
+ }, N(a(le)(f)), 9, yt))), 128))
566
+ ], 16, bt), [
567
+ [He, a(K)]
568
+ ]),
569
+ J(g.$slots, "after", {}, () => [
570
+ a(x) ? (y(), F(W, he(P({ key: 0 }, a(k))), null, 16)) : w("", !0)
571
+ ])
572
+ ]),
573
+ ae(a(u), {
574
+ id: a(C),
575
+ class: "vv-select__hint"
576
+ }, null, 8, ["id"])
577
+ ], 2));
578
+ }
579
+ }), $t = [
433
580
  "update:modelValue",
434
581
  "change:search",
435
582
  "focus",
436
583
  "blur"
437
- ], rt = {
438
- ...Me,
439
- ...xe,
440
- ...Te,
584
+ ], It = {
585
+ ...be,
441
586
  ...Le,
442
- ...Ee,
443
- ...le,
444
- ...Ke,
445
- ...se,
446
- ...ae,
447
- ...He,
587
+ ...Ce,
588
+ ..._e,
589
+ ...Ne,
590
+ ...Pe,
591
+ ...ve,
592
+ ...Be,
593
+ ...me,
594
+ ...ge,
595
+ ...De,
596
+ ...Re,
597
+ ...je,
448
598
  modelValue: {
449
599
  type: [String, Number, Boolean, Object, Array],
450
600
  default: void 0
@@ -462,133 +612,164 @@ const tt = [
462
612
  maxValues: [Number, String],
463
613
  separator: { type: String, default: ", " },
464
614
  native: Boolean
465
- }, nt = ["id"], ot = ["id", "for"], lt = ["tabindex"], st = ["id", "placeholder"], at = {
615
+ }, kt = ["id"], At = ["id", "for"], Ot = ["tabindex"], wt = ["id", "placeholder"], Ct = {
466
616
  name: "VvCombobox"
467
- }, ft = /* @__PURE__ */ M({
468
- ...at,
469
- props: rt,
470
- emits: tt,
471
- setup(t, { emit: r }) {
472
- const e = t, u = $e(), { HintSlot: o } = et(e, u), a = k(), n = k(), { focused: g } = Re(a, r), v = re(), f = k(""), l = Ie(
473
- f,
617
+ }, Dt = /* @__PURE__ */ Y({
618
+ ...Ct,
619
+ props: It,
620
+ emits: $t,
621
+ setup(n, { emit: t }) {
622
+ const e = n, i = ke(), { HintSlot: r } = Fe(e, i), u = j(), l = j(), { focused: b } = we(u, t), m = c(() => String(e.id || ce())), p = j(""), o = Ze(
623
+ p,
474
624
  Number(e.debounceSearch)
475
- ), s = k(!1), {
476
- icon: i,
477
- iconPosition: p,
478
- modifiers: h,
479
- disabled: y,
480
- readonly: S,
481
- loading: C,
482
- valid: B,
483
- invalid: K
484
- } = _(e);
485
- W(
486
- l,
487
- () => r("change:search", l.value)
625
+ ), s = j(!1), {
626
+ icon: d,
627
+ iconPosition: v,
628
+ modifiers: V,
629
+ disabled: h,
630
+ readonly: $,
631
+ loading: A,
632
+ valid: O,
633
+ invalid: C,
634
+ floating: D
635
+ } = T(e);
636
+ ie(
637
+ o,
638
+ () => t("change:search", o.value)
488
639
  );
489
- const { hasIcon: P, hasIconLeft: N, hasIconRight: $ } = Fe(
490
- i,
491
- p
492
- ), ue = m(() => !ne(e.modelValue)), ie = m(() => y.value || S.value ? -1 : e.tabindex), { bemCssClasses: ce } = z("vv-select", {
493
- modifiers: h,
494
- disabled: y,
495
- loading: C,
496
- readonly: S,
497
- iconLeft: N,
498
- iconRight: $,
499
- valid: B,
500
- invalid: K,
501
- dirty: ue,
502
- focus: g
503
- }), de = m(
504
- () => e.searchable ? pe.value : e.options
505
- ), { getOptionLabel: fe, getOptionValue: q } = oe(e), pe = m(() => {
506
- var d;
507
- return (d = e.options) == null ? void 0 : d.filter((b) => fe(b).toLowerCase().includes(l.value.toLowerCase().trim()));
508
- }), me = m(() => {
509
- let d = [];
510
- return Array.isArray(e.modelValue) ? d = e.modelValue : e.modelValue && (d = [e.modelValue]), e.options.filter(
511
- (b) => d.includes(q(b))
640
+ const { hasIcon: L, hasIconLeft: k, hasIconRight: E } = Oe(
641
+ d,
642
+ v
643
+ ), x = c(() => !fe(e.modelValue)), H = c(() => h.value || $.value ? -1 : e.tabindex), { bemCssClasses: M } = ee("vv-select", {
644
+ modifiers: V,
645
+ disabled: h,
646
+ loading: A,
647
+ readonly: $,
648
+ iconLeft: k,
649
+ iconRight: E,
650
+ valid: O,
651
+ invalid: C,
652
+ dirty: x,
653
+ focus: b,
654
+ floating: D
655
+ }), z = c(
656
+ () => e.searchable ? ne.value : e.options
657
+ ), { getOptionLabel: q, getOptionValue: te } = pe(e), ne = c(() => {
658
+ var f;
659
+ return (f = e.options) == null ? void 0 : f.filter((S) => q(S).toLowerCase().includes(o.value.toLowerCase().trim()));
660
+ }), le = c(() => {
661
+ let f = [];
662
+ return Array.isArray(e.modelValue) ? f = e.modelValue : e.modelValue && (f = [e.modelValue]), e.options.filter(
663
+ (S) => f.includes(te(S))
512
664
  );
513
- }), ve = m(() => me.value.map((d) => q(d)).join(e.separator));
514
- _e(a, () => {
515
- a.value.open = !1;
665
+ }), re = c(() => le.value.map((f) => q(f)).join(e.separator));
666
+ Ge(u, () => {
667
+ u.value.open = !1;
516
668
  });
517
- function ge(d) {
518
- const b = d.target;
519
- s.value = b.open;
669
+ function oe(f) {
670
+ const S = f.target;
671
+ s.value = S.open;
520
672
  }
521
- function he(d) {
522
- a.value && !e.multiple && (a.value.open = !1), r("update:modelValue", d);
673
+ function K(f) {
674
+ u.value && !e.multiple && (u.value.open = !1), t("update:modelValue", f);
523
675
  }
524
- const ye = m(() => ({
525
- options: de.value,
676
+ const g = c(() => ({
677
+ name: e.name,
678
+ options: z.value,
526
679
  labelKey: e.labelKey,
527
680
  valueKey: e.valueKey,
528
681
  disabled: e.disabled,
529
682
  labelNoResults: e.labelNoResults,
530
683
  multiple: e.multiple,
531
684
  maxValues: e.maxValues,
685
+ modelValue: e.modelValue,
686
+ unselectable: e.unselectable
687
+ })), R = c(() => ({
688
+ id: m.value,
689
+ name: e.name,
690
+ tabindex: H.value,
691
+ valid: O.value,
692
+ validLabel: e.validLabel,
693
+ invalid: C.value,
694
+ invalidLabel: e.invalidLabel,
695
+ hintLabel: e.hintLabel,
696
+ loading: A.value,
697
+ loadingLabel: e.loadingLabel,
698
+ disabled: h.value,
699
+ readonly: $.value,
700
+ modifiers: e.modifiers,
701
+ options: z.value,
702
+ labelKey: e.labelKey,
703
+ valueKey: e.valueKey,
704
+ icon: e.icon,
705
+ iconPosition: e.iconPosition,
706
+ floating: e.floating,
707
+ unselectable: e.unselectable,
708
+ multiple: e.multiple,
709
+ label: e.label,
710
+ placeholder: e.placeholder,
532
711
  modelValue: e.modelValue
533
712
  }));
534
- return (d, b) => d.native ? A("", !0) : (V(), w("div", {
713
+ return (f, S) => f.native ? (y(), F(St, P({ key: 1 }, a(R), {
714
+ "onUpdate:modelValue": S[4] || (S[4] = (_) => t("update:modelValue", _))
715
+ }), null, 16)) : (y(), I("div", {
535
716
  key: 0,
536
- id: c(v),
537
- class: Y(c(ce))
717
+ id: a(m),
718
+ class: ue(a(M))
538
719
  }, [
539
- d.label ? (V(), w("label", {
720
+ f.label ? (y(), I("label", {
540
721
  key: 0,
541
- id: `${c(v)}-label`,
542
- for: d.searchable && s.value ? `${c(v)}-input` : void 0
543
- }, x(d.label), 9, ot)) : A("", !0),
544
- I("details", {
722
+ id: `${a(m)}-label`,
723
+ for: f.searchable && s.value ? `${a(m)}-input` : void 0
724
+ }, N(f.label), 9, At)) : w("", !0),
725
+ B("details", {
545
726
  ref_key: "dropdown",
546
- ref: a,
727
+ ref: u,
547
728
  class: "vv-select__wrapper",
548
- onClick: b[2] || (b[2] = (O) => c(y) || c(S) ? O.preventDefault() : null),
549
- onKeyup: b[3] || (b[3] = Z((O) => a.value.open = !1, ["esc"])),
550
- onToggle: ge
729
+ onClick: S[2] || (S[2] = (_) => a(h) || a($) ? _.preventDefault() : null),
730
+ onKeyup: S[3] || (S[3] = ye((_) => u.value.open = !1, ["esc"])),
731
+ onToggle: oe
551
732
  }, [
552
- I("summary", {
733
+ B("summary", {
553
734
  class: "vv-select__input",
554
- tabindex: c(ie),
555
- onKeyup: b[1] || (b[1] = Z((O) => d.searchable ? O.preventDefault() : null, ["space"]))
735
+ tabindex: a(H),
736
+ onKeyup: S[1] || (S[1] = ye((_) => f.searchable ? _.preventDefault() : null, ["space"]))
556
737
  }, [
557
- G(d.$slots, "before", {}, () => [
558
- c(N) ? (V(), L(Q, R({
738
+ J(f.$slots, "before", {}, () => [
739
+ a(k) ? (y(), F(W, P({
559
740
  key: 0,
560
741
  class: "vv-select__icon-left"
561
- }, c(P)), null, 16)) : A("", !0)
742
+ }, a(L)), null, 16)) : w("", !0)
562
743
  ]),
563
- d.searchable && s.value ? Ce((V(), w("input", {
744
+ f.searchable && s.value ? Ae((y(), I("input", {
564
745
  key: 0,
565
- id: `${c(v)}-input`,
746
+ id: `${a(m)}-input`,
566
747
  ref_key: "inputSearch",
567
- ref: n,
568
- "onUpdate:modelValue": b[0] || (b[0] = (O) => f.value = O),
748
+ ref: l,
749
+ "onUpdate:modelValue": S[0] || (S[0] = (_) => p.value = _),
569
750
  role: "combobox",
570
751
  type: "search",
571
- placeholder: d.searchPlaceholder
572
- }, null, 8, st)), [
573
- [Oe, f.value]
574
- ]) : (V(), w(ee, { key: 1 }, [
575
- te(x(c(ve) || d.placeholder), 1)
752
+ placeholder: f.searchPlaceholder
753
+ }, null, 8, wt)), [
754
+ [Me, p.value]
755
+ ]) : (y(), I(de, { key: 1 }, [
756
+ Ie(N(a(re) || f.placeholder), 1)
576
757
  ], 64)),
577
- G(d.$slots, "after", {}, () => [
578
- c($) ? (V(), L(Q, R({
758
+ J(f.$slots, "after", {}, () => [
759
+ a(E) ? (y(), F(W, P({
579
760
  key: 0,
580
761
  class: "vv-select__icon-right"
581
- }, c(P)), null, 16)) : A("", !0)
762
+ }, a(L)), null, 16)) : w("", !0)
582
763
  ])
583
- ], 40, lt),
584
- U(Xe, R({
585
- id: `${c(v)}-dropdown`
586
- }, c(ye), { "onUpdate:modelValue": he }), null, 16, ["id"])
764
+ ], 40, Ot),
765
+ ae(ut, P({
766
+ id: `${a(m)}-dropdown`
767
+ }, a(g), { "onUpdate:modelValue": K }), null, 16, ["id"])
587
768
  ], 544),
588
- U(c(o), { class: "vv-select__hint" })
589
- ], 10, nt));
769
+ ae(a(r), { class: "vv-select__hint" })
770
+ ], 10, kt));
590
771
  }
591
772
  });
592
773
  export {
593
- ft as default
774
+ Dt as default
594
775
  };