@indielayer/ui 1.12.1 → 1.13.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 (33) hide show
  1. package/docs/pages/component/datepicker/usage.vue +1 -0
  2. package/docs/pages/component/select/multiple.vue +4 -2
  3. package/docs/pages/component/select/usage.vue +1 -0
  4. package/docs/pages/component/table/usage.vue +1 -1
  5. package/lib/components/datepicker/Datepicker.vue.d.ts +12 -12
  6. package/lib/components/datepicker/Datepicker.vue.js +6 -6
  7. package/lib/components/select/Select.vue.d.ts +5 -1
  8. package/lib/components/select/Select.vue.js +262 -245
  9. package/lib/components/select/theme/Select.base.theme.js +11 -10
  10. package/lib/components/table/Table.vue.d.ts +1 -0
  11. package/lib/components/table/Table.vue.js +51 -50
  12. package/lib/components/table/TableHeader.vue.d.ts +3 -0
  13. package/lib/components/table/TableHeader.vue.js +58 -49
  14. package/lib/components/table/theme/TableHead.base.theme.js +1 -1
  15. package/lib/components/table/theme/TableHeader.base.theme.js +3 -3
  16. package/lib/components/table/theme/TableRow.base.theme.js +1 -1
  17. package/lib/index.js +1 -1
  18. package/lib/index.umd.js +4 -4
  19. package/lib/node_modules/.pnpm/@vuepic_vue-datepicker@11.0.2_vue@3.5.10_typescript@5.2.2_/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +5210 -0
  20. package/lib/version.d.ts +1 -1
  21. package/lib/version.js +1 -1
  22. package/package.json +2 -2
  23. package/src/components/datepicker/Datepicker.vue +1 -1
  24. package/src/components/select/Select.vue +27 -8
  25. package/src/components/select/theme/Select.base.theme.ts +17 -6
  26. package/src/components/table/Table.vue +2 -0
  27. package/src/components/table/TableHeader.vue +36 -28
  28. package/src/components/table/theme/TableHead.base.theme.ts +1 -1
  29. package/src/components/table/theme/TableHeader.base.theme.ts +1 -1
  30. package/src/components/table/theme/TableRow.base.theme.ts +1 -1
  31. package/src/version.ts +1 -1
  32. package/lib/node_modules/.pnpm/@vuepic_vue-datepicker@11.0.1_vue@3.5.10_typescript@5.2.2_/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +0 -5199
  33. /package/lib/node_modules/.pnpm/{@vuepic_vue-datepicker@11.0.1_vue@3.5.10_typescript@5.2.2_ → @vuepic_vue-datepicker@11.0.2_vue@3.5.10_typescript@5.2.2_}/node_modules/@vuepic/vue-datepicker/dist/main.css.js +0 -0
@@ -1,37 +1,37 @@
1
- import { defineComponent as Ne, mergeModels as ue, computed as R, ref as h, useModel as ze, watch as D, nextTick as G, unref as r, onUnmounted as De, openBlock as s, createBlock as x, mergeProps as U, toHandlers as de, withCtx as p, createElementVNode as M, createElementBlock as n, normalizeClass as A, Fragment as w, createTextVNode as S, toDisplayString as k, createVNode as P, renderSlot as O, createCommentVNode as I, renderList as j, createSlots as Me, withModifiers as Pe, withDirectives as Fe, vModelSelect as Ee } from "vue";
2
- import { useEventListener as He, useResizeObserver as qe } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
3
- import { useColors as We } from "../../composables/useColors.js";
4
- import { useCommon as ce } from "../../composables/useCommon.js";
5
- import { useInputtable as J } from "../../composables/useInputtable.js";
6
- import { useInteractive as me } from "../../composables/useInteractive.js";
7
- import { useTheme as Ue } from "../../composables/useTheme.js";
8
- import { useVirtualList as je } from "../../composables/useVirtualList.js";
9
- import { checkIcon as Xe, selectIcon as Ke } from "../../common/icons.js";
10
- import Ge from "../label/Label.vue.js";
11
- import fe from "../tag/Tag.vue.js";
12
- import Je from "../icon/Icon.vue.js";
13
- import Qe from "../menu/MenuItem.vue.js";
14
- import Ye from "../spinner/Spinner.vue.js";
15
- import ve from "../popover/Popover.vue.js";
1
+ import { defineComponent as Me, mergeModels as ve, computed as R, ref as b, useModel as Pe, watch as M, nextTick as Z, unref as r, onUnmounted as Fe, openBlock as s, createBlock as L, mergeProps as U, toHandlers as ce, withCtx as m, createElementVNode as P, createElementBlock as n, normalizeClass as k, Fragment as w, createTextVNode as T, toDisplayString as g, createVNode as B, renderSlot as O, createCommentVNode as x, renderList as j, createSlots as Ee, normalizeStyle as He, withModifiers as We, withDirectives as qe, vModelSelect as Ue } from "vue";
2
+ import { useEventListener as je, useResizeObserver as Xe } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
3
+ import { useColors as Ke } from "../../composables/useColors.js";
4
+ import { useCommon as he } from "../../composables/useCommon.js";
5
+ import { useInputtable as _ } from "../../composables/useInputtable.js";
6
+ import { useInteractive as ke } from "../../composables/useInteractive.js";
7
+ import { useTheme as Ge } from "../../composables/useTheme.js";
8
+ import { useVirtualList as Je } from "../../composables/useVirtualList.js";
9
+ import { checkIcon as Qe, closeIcon as Ye, selectIcon as Ze } from "../../common/icons.js";
10
+ import _e from "../label/Label.vue.js";
11
+ import pe from "../tag/Tag.vue.js";
12
+ import me from "../icon/Icon.vue.js";
13
+ import el from "../menu/MenuItem.vue.js";
14
+ import ll from "../spinner/Spinner.vue.js";
15
+ import ye from "../popover/Popover.vue.js";
16
16
  import "../popover/Popover.vue3.js";
17
- import pe from "../popover/PopoverContainer.vue.js";
18
- import Ze from "../inputFooter/InputFooter.vue.js";
19
- import _e from "../input/Input.vue.js";
20
- import { useThrottleFn as el } from "../../node_modules/.pnpm/@vueuse_shared@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/shared/index.js";
21
- const ll = { class: "relative" }, tl = {
17
+ import be from "../popover/PopoverContainer.vue.js";
18
+ import tl from "../inputFooter/InputFooter.vue.js";
19
+ import al from "../input/Input.vue.js";
20
+ import { useThrottleFn as il } from "../../node_modules/.pnpm/@vueuse_shared@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/shared/index.js";
21
+ const ol = { class: "relative" }, sl = {
22
22
  key: 0,
23
23
  class: "text-secondary-400 dark:text-secondary-500"
24
- }, al = { key: 1 }, il = {
24
+ }, rl = { key: 1 }, nl = {
25
25
  key: 0,
26
26
  class: "text-secondary-400 dark:text-secondary-500"
27
- }, ol = { key: 1 }, sl = {
27
+ }, ul = { key: 1 }, dl = {
28
28
  key: 0,
29
29
  class: "p-2 text-center text-secondary-400"
30
- }, rl = ["id", "name", "disabled", "multiple", "readonly"], nl = ["value", "disabled"], ul = {
31
- ...We.props("secondary"),
32
- ...ce.props(),
33
- ...me.props(),
34
- ...J.props(),
30
+ }, fl = ["id", "name", "disabled", "multiple", "readonly"], vl = ["value", "disabled"], cl = {
31
+ ...Ke.props("secondary"),
32
+ ...he.props(),
33
+ ...ke.props(),
34
+ ..._.props(),
35
35
  placeholder: String,
36
36
  options: Array,
37
37
  multiple: Boolean,
@@ -40,6 +40,7 @@ const ll = { class: "relative" }, tl = {
40
40
  flat: Boolean,
41
41
  native: Boolean,
42
42
  filterable: Boolean,
43
+ clearable: Boolean,
43
44
  filterPlaceholder: {
44
45
  type: String,
45
46
  default: "Filter by..."
@@ -56,281 +57,281 @@ const ll = { class: "relative" }, tl = {
56
57
  default: 5
57
58
  },
58
59
  placement: String
59
- }, dl = {
60
+ }, pl = {
60
61
  name: "XSelect",
61
62
  validators: {
62
- ...ce.validators()
63
+ ...he.validators()
63
64
  }
64
- }, Tl = /* @__PURE__ */ Ne({
65
- ...dl,
66
- props: /* @__PURE__ */ ue(ul, {
65
+ }, Nl = /* @__PURE__ */ Me({
66
+ ...pl,
67
+ props: /* @__PURE__ */ ve(cl, {
67
68
  filter: { default: "" },
68
69
  filterModifiers: {}
69
70
  }),
70
- emits: /* @__PURE__ */ ue([...J.emits(), "close"], ["update:filter"]),
71
- setup(Q, { expose: ye, emit: be }) {
72
- const o = Q, B = be, f = R(() => o.multiple || o.multipleCheckbox), X = h(null), K = h(null), F = h(null), g = h(null), u = h(), V = ze(Q, "filter"), E = h(null), $ = R(() => o.disabled || o.loading || o.readonly), i = R({
71
+ emits: /* @__PURE__ */ ve([..._.emits(), "close"], ["update:filter"]),
72
+ setup(ee, { expose: ge, emit: Ce }) {
73
+ const i = ee, S = Ce, v = R(() => i.multiple || i.multipleCheckbox), X = b(null), K = b(null), F = b(null), C = b(null), G = b(null), d = b(), I = Pe(ee, "filter"), E = b(null), $ = R(() => i.disabled || i.loading || i.readonly), we = R(() => !i.loading && !i.readonly && !i.disabled && i.clearable && !J(o.value)), o = R({
73
74
  get() {
74
- return f.value ? o.modelValue ? Array.isArray(o.modelValue) ? o.modelValue : [o.modelValue] : [] : o.modelValue;
75
+ return v.value ? i.modelValue ? Array.isArray(i.modelValue) ? i.modelValue : [i.modelValue] : [] : i.modelValue;
75
76
  },
76
77
  set(e) {
77
- B("update:modelValue", e);
78
+ S("update:modelValue", e);
78
79
  }
79
- }), v = R(() => !o.options || o.options.length === 0 ? [] : o.options.filter((e) => V.value === "" || e.label.toLowerCase().includes(V.value.toLowerCase())).map((e) => {
80
+ }), c = R(() => !i.options || i.options.length === 0 ? [] : i.options.filter((e) => I.value === "" || e.label.toLowerCase().includes(I.value.toLowerCase())).map((e) => {
80
81
  let t = !1;
81
- return f.value && Array.isArray(i.value) ? t = i.value.includes(e.value) : t = e.value === i.value, {
82
+ return v.value && Array.isArray(o.value) ? t = o.value.includes(e.value) : t = e.value === o.value, {
82
83
  value: e.value,
83
84
  label: e.label,
84
85
  active: t,
85
86
  prefix: e.prefix,
86
87
  suffix: e.suffix,
87
88
  disabled: e.disabled,
88
- iconRight: !o.multipleCheckbox && t ? Xe : void 0,
89
+ iconRight: !i.multipleCheckbox && t ? Qe : void 0,
89
90
  keepOpenOnClick: e.keepOpenOnClick,
90
- onClick: () => ee(e.value)
91
+ onClick: () => ie(e.value)
91
92
  };
92
- })), Y = R(() => v.value.filter((e) => !e.disabled)), { list: Z, scrollTo: he, containerProps: ke, wrapperProps: ge } = je(
93
- v,
93
+ })), le = R(() => c.value.filter((e) => !e.disabled)), { list: te, scrollTo: Oe, containerProps: $e, wrapperProps: Re } = Je(
94
+ c,
94
95
  {
95
- disabled: !o.virtualList,
96
- itemHeight: o.virtualListItemHeight,
97
- topOffset: o.virtualListOffsetTop || 0,
98
- bottomOffset: o.virtualListOffsetBottom || 0,
99
- overscan: o.virtualListOverscan
96
+ disabled: !i.virtualList,
97
+ itemHeight: i.virtualListItemHeight,
98
+ topOffset: i.virtualListOffsetTop || 0,
99
+ bottomOffset: i.virtualListOffsetBottom || 0,
100
+ overscan: i.virtualListOverscan
100
101
  }
101
- ), T = R(() => {
102
+ ), V = R(() => {
102
103
  var e;
103
- return (e = g.value) == null ? void 0 : e.isOpen;
104
+ return (e = C.value) == null ? void 0 : e.isOpen;
104
105
  });
105
- D(V, (e) => {
106
- e && (u.value = void 0, H(-1));
107
- }), D(T, (e) => {
108
- e ? (Ce(), (f.value || typeof u.value > "u") && H(-1), setTimeout(() => {
106
+ M(I, (e) => {
107
+ e && (d.value = void 0, H(-1));
108
+ }), M(V, (e) => {
109
+ e ? (xe(), (v.value || typeof d.value > "u") && H(-1), setTimeout(() => {
109
110
  requestAnimationFrame(() => {
110
111
  var t;
111
- _(u.value || 0), o.filterable && ((t = E.value) == null || t.focus());
112
+ ae(d.value || 0), i.filterable && ((t = E.value) == null || t.focus());
112
113
  });
113
- }, 50)) : (o.filterable && (V.value = ""), B("close"));
114
+ }, 50)) : (i.filterable && (I.value = ""), S("close"));
114
115
  });
115
- function Ce() {
116
- if (f.value) {
117
- if (Array.isArray(i.value) && i.value.length > 0) {
118
- const e = v.value.findIndex((t) => t.value === i.value[0]);
119
- e !== -1 && (u.value = e);
116
+ function xe() {
117
+ if (v.value) {
118
+ if (Array.isArray(o.value) && o.value.length > 0) {
119
+ const e = c.value.findIndex((t) => t.value === o.value[0]);
120
+ e !== -1 && (d.value = e);
120
121
  }
121
122
  } else {
122
- const e = v.value.findIndex((t) => t.value === i.value);
123
- e !== -1 && (u.value = e);
123
+ const e = c.value.findIndex((t) => t.value === o.value);
124
+ e !== -1 && (d.value = e);
124
125
  }
125
126
  }
126
- function _(e) {
127
+ function ae(e) {
127
128
  var t;
128
- o.virtualList ? he(e) : F.value && ((t = F.value[e]) == null || t.$el.scrollIntoView({ block: "nearest", inline: "nearest" }));
129
+ i.virtualList ? Oe(e) : F.value && ((t = F.value[e]) == null || t.$el.scrollIntoView({ block: "nearest", inline: "nearest" }));
129
130
  }
130
- D(u, (e) => {
131
- typeof e < "u" && F.value && _(e);
131
+ M(d, (e) => {
132
+ typeof e < "u" && F.value && ae(e);
132
133
  });
133
134
  function H(e, t = "down") {
134
- if (!Y.value || Y.value.length === 0) {
135
- u.value = void 0;
135
+ if (!le.value || le.value.length === 0) {
136
+ d.value = void 0;
136
137
  return;
137
138
  }
138
139
  if (typeof e > "u" && (e = t === "down" ? -1 : 1), t === "down") {
139
140
  let l = e + 1;
140
- for (l > v.value.length - 1 && (l = 0); v.value[l].disabled; )
141
- ++l > v.value.length - 1 && (l = 0);
142
- u.value = l;
141
+ for (l > c.value.length - 1 && (l = 0); c.value[l].disabled; )
142
+ ++l > c.value.length - 1 && (l = 0);
143
+ d.value = l;
143
144
  } else {
144
145
  let l = e - 1;
145
- for (l < 0 && (l = v.value.length - 1); v.value[l].disabled; )
146
- --l < 0 && (l = v.value.length - 1);
147
- u.value = l;
146
+ for (l < 0 && (l = c.value.length - 1); c.value[l].disabled; )
147
+ --l < 0 && (l = c.value.length - 1);
148
+ d.value = l;
148
149
  }
149
150
  }
150
- function ee(e) {
151
+ function ie(e) {
151
152
  var l;
152
- const t = (l = o.options) == null ? void 0 : l.find((a) => a.value === e);
153
+ const t = (l = i.options) == null ? void 0 : l.find((a) => a.value === e);
153
154
  if (!(!t || t.disabled))
154
155
  if (t.onClick)
155
156
  t.onClick();
156
157
  else {
157
- if (f.value) {
158
- if (Array.isArray(i.value)) {
159
- const a = i.value.indexOf(e);
160
- a !== -1 ? i.value.splice(a, 1) : i.value.push(e);
158
+ if (v.value) {
159
+ if (Array.isArray(o.value)) {
160
+ const a = o.value.indexOf(e);
161
+ a !== -1 ? o.value.splice(a, 1) : o.value.push(e);
161
162
  } else
162
- i.value = [e];
163
- B("update:modelValue", i.value), o.filterable && setTimeout(() => {
163
+ o.value = [e];
164
+ S("update:modelValue", o.value), i.filterable && setTimeout(() => {
164
165
  var a;
165
166
  (a = E.value) == null || a.focus();
166
167
  });
167
168
  } else
168
- i.value = e;
169
- o.native || G(() => {
169
+ o.value = e;
170
+ i.native || Z(() => {
170
171
  var a;
171
- se(), (a = K.value) == null || a.$el.focus();
172
+ ue(), (a = K.value) == null || a.$el.focus();
172
173
  });
173
174
  }
174
175
  }
175
- function le(e) {
176
+ function J(e) {
176
177
  return !!(typeof e > "u" || e === null || e === "" || Array.isArray(e) && e.length === 0 || !Array.isArray(e) && typeof e == "object" && Object.keys(e).length === 0);
177
178
  }
178
- function te(e, t) {
179
+ function oe(e, t) {
179
180
  if (e.stopPropagation(), $.value)
180
181
  return;
181
- const l = i.value.indexOf(t);
182
- l !== -1 && (i.value.splice(l, 1), B("update:modelValue", i.value));
182
+ const l = o.value.indexOf(t);
183
+ l !== -1 && (o.value.splice(l, 1), S("update:modelValue", o.value));
183
184
  }
184
- function N(e) {
185
+ function z(e) {
185
186
  var l;
186
- const t = (l = o.options) == null ? void 0 : l.find((a) => a.value === e);
187
+ const t = (l = i.options) == null ? void 0 : l.find((a) => a.value === e);
187
188
  return t ? t.label : "";
188
189
  }
189
- const { focus: ae, blur: we } = me(X), {
190
- errorInternal: ie,
191
- hideFooterInternal: Oe,
192
- inputListeners: oe,
193
- reset: $e,
194
- validate: se,
195
- setError: Ae,
196
- isFocused: Le,
197
- isInsideForm: Re
198
- } = J(o, { focus: ae, emit: B, withListeners: !0 }), xe = R(() => {
199
- const { focus: e, blur: t } = r(oe);
190
+ const { focus: se, blur: Ae } = ke(X), {
191
+ errorInternal: re,
192
+ hideFooterInternal: Le,
193
+ inputListeners: ne,
194
+ reset: Q,
195
+ validate: ue,
196
+ setError: Ie,
197
+ isFocused: Ve,
198
+ isInsideForm: Te
199
+ } = _(i, { focus: se, emit: S, withListeners: !0 }), Be = R(() => {
200
+ const { focus: e, blur: t } = r(ne);
200
201
  return {
201
202
  focus: e,
202
203
  blur: t
203
204
  };
204
205
  });
205
- let L = null;
206
- D([Le, T], ([e, t]) => {
207
- e || t ? L || (L = He(document, "keydown", Ie)) : L && (L(), L = null);
206
+ let A = null;
207
+ M([Ve, V], ([e, t]) => {
208
+ e || t ? A || (A = je(document, "keydown", Se)) : A && (A(), A = null);
208
209
  }, {
209
210
  immediate: !0
210
- }), De(() => {
211
- L && L();
211
+ }), Fe(() => {
212
+ A && A();
212
213
  });
213
- function Ie(e) {
214
- var t, l, a, y, c;
215
- if (v.value.length !== 0)
214
+ function Se(e) {
215
+ var t, l, a, h, p;
216
+ if (c.value.length !== 0)
216
217
  if (e.code === "ArrowDown") {
217
- if (e.preventDefault(), !T.value) {
218
- (t = g.value) == null || t.show();
218
+ if (e.preventDefault(), !V.value) {
219
+ (t = C.value) == null || t.show();
219
220
  return;
220
221
  }
221
- H(u.value, "down");
222
+ H(d.value, "down");
222
223
  } else if (e.code === "ArrowUp") {
223
- if (e.preventDefault(), !T.value) {
224
- (l = g.value) == null || l.show();
224
+ if (e.preventDefault(), !V.value) {
225
+ (l = C.value) == null || l.show();
225
226
  return;
226
227
  }
227
- H(u.value, "up");
228
+ H(d.value, "up");
228
229
  } else if (e.code === "Enter" || e.code === "Space") {
229
- if (e.code === "Space" && o.filterable)
230
+ if (e.code === "Space" && i.filterable)
230
231
  return;
231
- if (e.preventDefault(), e.stopPropagation(), !T.value) {
232
- (a = g.value) == null || a.show();
232
+ if (e.preventDefault(), e.stopPropagation(), !V.value) {
233
+ (a = C.value) == null || a.show();
233
234
  return;
234
235
  }
235
- if (typeof u.value < "u" && v.value[u.value]) {
236
- const d = v.value[u.value];
237
- ee(d.value), !d.keepOpenOnClick && (!f.value || o.multipleCheckbox) && ((y = g.value) == null || y.hide());
236
+ if (typeof d.value < "u" && c.value[d.value]) {
237
+ const f = c.value[d.value];
238
+ ie(f.value), !f.keepOpenOnClick && (!v.value || i.multipleCheckbox) && ((h = C.value) == null || h.hide());
238
239
  }
239
240
  } else
240
- e.code === "Tab" && T.value && (e.preventDefault(), (c = g.value) == null || c.hide(), o.native || G(() => {
241
- var d;
242
- (d = K.value) == null || d.$el.focus();
241
+ e.code === "Tab" && V.value && (e.preventDefault(), (p = C.value) == null || p.hide(), i.native || Z(() => {
242
+ var f;
243
+ (f = K.value) == null || f.$el.focus();
243
244
  }));
244
245
  }
245
- const z = h(null), re = h(null), q = h(!1), W = h(0), ne = el(() => {
246
- f.value && o.truncate && G(() => {
247
- const e = Ve();
248
- e < i.value.length ? (q.value = !0, W.value = i.value.length - e) : (q.value = !1, W.value = 0);
246
+ const N = b(null), de = b(null), W = b(!1), q = b(0), fe = il(() => {
247
+ v.value && i.truncate && Z(() => {
248
+ const e = ze();
249
+ e < o.value.length ? (W.value = !0, q.value = o.value.length - e) : (W.value = !1, q.value = 0);
249
250
  });
250
251
  }, 100, !0);
251
- qe(z, () => {
252
- ne();
252
+ Xe(N, () => {
253
+ fe();
253
254
  });
254
- function Ve() {
255
- if (!z.value)
255
+ function ze() {
256
+ if (!N.value)
256
257
  return 0;
257
- const e = z.value.querySelectorAll(".x-tag"), t = Array.from(e);
258
- let l = 0, a = 0;
259
- const y = z.value.offsetWidth - 30;
260
- for (let c = 0; c < t.length; c++) {
261
- const d = t[c];
262
- d.style.display = "flex", l += d.offsetWidth, l < y ? a++ : d.style.display = "none";
258
+ const e = N.value.querySelectorAll(".x-tag"), t = Array.from(e);
259
+ let l = 0, a = 1;
260
+ const h = N.value.offsetWidth - 30;
261
+ for (let p = 0; p < t.length; p++) {
262
+ const f = t[p];
263
+ f.style.display = "flex", l += f.offsetWidth, p > 0 && (l < h ? a++ : f.style.display = "none");
263
264
  }
264
265
  return a;
265
266
  }
266
- D(i, (e) => {
267
- ne();
267
+ M(o, (e) => {
268
+ fe();
268
269
  }, { immediate: !0, deep: !0 });
269
- const { styles: Te, classes: C, className: Se } = Ue("Select", {}, o, { errorInternal: ie });
270
- return ye({ focus: ae, blur: we, reset: $e, validate: se, setError: Ae, filterRef: E }), (e, t) => (s(), x(Ge, U({
270
+ const { styles: Ne, classes: y, className: De } = Ge("Select", {}, i, { errorInternal: re });
271
+ return ge({ focus: se, blur: Ae, reset: Q, validate: ue, setError: Ie, filterRef: E }), (e, t) => (s(), L(_e, U({
271
272
  ref_key: "labelRef",
272
273
  ref: K,
273
274
  tabindex: "0",
274
275
  class: ["group", [
275
- r(Se),
276
- r(C).wrapper
276
+ r(De),
277
+ r(y).wrapper
277
278
  ]],
278
- style: r(Te),
279
+ style: r(Ne),
279
280
  disabled: $.value,
280
281
  required: e.required,
281
- "is-inside-form": r(Re),
282
+ "is-inside-form": r(Te),
282
283
  label: e.label,
283
284
  tooltip: e.tooltip
284
- }, de(xe.value)), {
285
- default: p(() => [
286
- M("div", ll, [
287
- e.native && !f.value ? (s(), n("div", {
285
+ }, ce(Be.value)), {
286
+ default: m(() => [
287
+ P("div", ol, [
288
+ e.native && !v.value ? (s(), n("div", {
288
289
  key: 0,
289
- class: A(r(C).box),
290
+ class: k(r(y).box),
290
291
  onClick: t[0] || (t[0] = (l) => {
291
292
  var a;
292
293
  return (a = X.value) == null ? void 0 : a.click();
293
294
  })
294
295
  }, [
295
- le(i.value) ? (s(), n(w, { key: 1 }, [
296
- e.placeholder ? (s(), n("div", tl, k(e.placeholder), 1)) : (s(), n("div", al, " "))
296
+ J(o.value) ? (s(), n(w, { key: 1 }, [
297
+ e.placeholder ? (s(), n("div", sl, g(e.placeholder), 1)) : (s(), n("div", rl, " "))
297
298
  ], 64)) : (s(), n(w, { key: 0 }, [
298
- S(k(N(i.value)), 1)
299
+ T(g(z(o.value)), 1)
299
300
  ], 64))
300
301
  ], 2)) : (s(), n(w, { key: 1 }, [
301
- P(ve, {
302
+ B(ye, {
302
303
  ref_key: "popoverRef",
303
- ref: g,
304
+ ref: C,
304
305
  disabled: $.value,
305
306
  placement: e.placement
306
307
  }, {
307
- content: p(() => [
308
- P(pe, {
309
- class: A(r(C).content)
308
+ content: m(() => [
309
+ B(be, {
310
+ class: k(r(y).content)
310
311
  }, {
311
- default: p(() => [
312
+ default: m(() => [
312
313
  O(e.$slots, "content-header", {}, () => [
313
314
  e.filterable ? (s(), n("div", {
314
315
  key: 0,
315
- class: A(r(C).search)
316
+ class: k(r(y).search)
316
317
  }, [
317
- P(_e, {
318
+ B(al, {
318
319
  ref_key: "filterRef",
319
320
  ref: E,
320
- modelValue: V.value,
321
- "onUpdate:modelValue": t[2] || (t[2] = (l) => V.value = l),
321
+ modelValue: I.value,
322
+ "onUpdate:modelValue": t[2] || (t[2] = (l) => I.value = l),
322
323
  placeholder: e.filterPlaceholder,
323
324
  "skip-form-registry": "",
324
325
  "data-1p-ignore": "",
325
326
  size: "sm"
326
327
  }, null, 8, ["modelValue", "placeholder"])
327
- ], 2)) : I("", !0)
328
+ ], 2)) : x("", !0)
328
329
  ]),
329
- M("div", U(r(ke), {
330
- class: r(C).contentBody
330
+ P("div", U(r($e), {
331
+ class: r(y).contentBody
331
332
  }), [
332
- M("div", U(r(ge), { class: "space-y-0.5" }), [
333
- (s(!0), n(w, null, j(r(Z), (l) => (s(), x(Qe, {
333
+ P("div", U(r(Re), { class: "space-y-0.5" }), [
334
+ (s(!0), n(w, null, j(r(te), (l) => (s(), L(el, {
334
335
  key: l.index,
335
336
  ref_for: !0,
336
337
  ref_key: "itemsRef",
@@ -338,16 +339,16 @@ const ll = { class: "relative" }, tl = {
338
339
  item: l.data,
339
340
  size: e.size,
340
341
  disabled: l.data.disabled,
341
- selected: l.index === u.value,
342
+ selected: l.index === d.value,
342
343
  checkbox: e.multipleCheckbox && !l.data.keepOpenOnClick,
343
344
  color: e.color,
344
345
  filled: "",
345
346
  onClick: () => {
346
347
  var a;
347
- return !l.data.keepOpenOnClick && (!f.value || e.multipleCheckbox) && ((a = g.value) == null ? void 0 : a.hide());
348
+ return !l.data.keepOpenOnClick && (!v.value || e.multipleCheckbox) && ((a = C.value) == null ? void 0 : a.hide());
348
349
  }
349
- }, Me({
350
- default: p(() => [
350
+ }, Ee({
351
+ default: m(() => [
351
352
  O(e.$slots, "label", {
352
353
  item: l.data
353
354
  })
@@ -356,134 +357,137 @@ const ll = { class: "relative" }, tl = {
356
357
  }, [
357
358
  e.$slots.prefix || l.data.prefix ? {
358
359
  name: "prefix",
359
- fn: p(() => [
360
+ fn: m(() => [
360
361
  O(e.$slots, "prefix", {
361
362
  item: l.data
362
363
  }, () => [
363
- S(k(l.data.prefix), 1)
364
+ T(g(l.data.prefix), 1)
364
365
  ])
365
366
  ]),
366
367
  key: "0"
367
368
  } : void 0,
368
369
  e.$slots.suffix || l.data.suffix ? {
369
370
  name: "suffix",
370
- fn: p(() => [
371
+ fn: m(() => [
371
372
  O(e.$slots, "suffix", {
372
373
  item: l.data
373
374
  }, () => [
374
- S(k(l.data.suffix), 1)
375
+ T(g(l.data.suffix), 1)
375
376
  ])
376
377
  ]),
377
378
  key: "1"
378
379
  } : void 0
379
380
  ]), 1032, ["item", "size", "disabled", "selected", "checkbox", "color", "onClick"]))), 128))
380
381
  ], 16),
381
- r(Z).length === 0 ? (s(), n("div", sl, " No options ")) : I("", !0)
382
+ r(te).length === 0 ? (s(), n("div", dl, " No options ")) : x("", !0)
382
383
  ], 16),
383
384
  O(e.$slots, "content-footer")
384
385
  ]),
385
386
  _: 3
386
387
  }, 8, ["class"])
387
388
  ]),
388
- default: p(() => [
389
+ default: m(() => [
389
390
  O(e.$slots, "input", {
390
- popover: g.value,
391
- selected: i.value,
391
+ popover: C.value,
392
+ selected: o.value,
392
393
  disabled: $.value,
393
- label: N(i.value)
394
+ label: z(o.value)
394
395
  }, () => [
395
- M("div", {
396
- class: A([r(C).box])
396
+ P("div", {
397
+ class: k([r(y).box])
397
398
  }, [
398
- f.value && Array.isArray(i.value) && i.value.length > 0 ? (s(), n("div", {
399
+ v.value && Array.isArray(o.value) && o.value.length > 0 ? (s(), n("div", {
399
400
  key: 0,
400
401
  ref_key: "tagsRef",
401
- ref: z,
402
- class: A(["flex gap-1 relative", {
402
+ ref: N,
403
+ class: k(["flex gap-1 relative", {
403
404
  "flex-wrap": !e.truncate,
404
405
  "overflow-hidden": e.truncate
405
406
  }])
406
407
  }, [
407
- (s(!0), n(w, null, j(i.value, (l) => {
408
- var a, y, c, d;
409
- return s(), x(fe, {
408
+ (s(!0), n(w, null, j(o.value, (l, a) => {
409
+ var h, p, f, D;
410
+ return s(), L(pe, {
410
411
  key: l,
411
412
  size: "xs",
412
413
  removable: "",
413
- outlined: !($.value || (y = (a = e.options) == null ? void 0 : a.find((m) => m.value === l)) != null && y.disabled),
414
- disabled: $.value || ((d = (c = e.options) == null ? void 0 : c.find((m) => m.value === l)) == null ? void 0 : d.disabled),
415
- onRemove: (m) => {
416
- te(m, l);
414
+ outlined: !($.value || (p = (h = e.options) == null ? void 0 : h.find((u) => u.value === l)) != null && p.disabled),
415
+ disabled: $.value || ((D = (f = e.options) == null ? void 0 : f.find((u) => u.value === l)) == null ? void 0 : D.disabled),
416
+ style: He({ "max-width": a === 0 && G.value ? `calc(100% - ${G.value.offsetWidth + 6 + "px"})` : void 0 }),
417
+ onRemove: (u) => {
418
+ oe(u, l);
417
419
  }
418
420
  }, {
419
- prefix: p(() => {
420
- var m;
421
+ prefix: m(() => {
422
+ var u;
421
423
  return [
422
424
  O(e.$slots, "tag-prefix", {
423
- item: (m = e.options) == null ? void 0 : m.find((b) => b.value === l)
425
+ item: (u = e.options) == null ? void 0 : u.find((Y) => Y.value === l)
424
426
  })
425
427
  ];
426
428
  }),
427
- default: p(() => [
428
- S(" " + k(N(l)), 1)
429
+ default: m(() => [
430
+ T(" " + g(z(l)), 1)
429
431
  ]),
430
432
  _: 2
431
- }, 1032, ["outlined", "disabled", "onRemove"]);
433
+ }, 1032, ["outlined", "disabled", "style", "onRemove"]);
432
434
  }), 128)),
433
- q.value ? (s(), n("div", {
435
+ W.value ? (s(), n("div", {
434
436
  key: 0,
435
- class: A(r(C).truncateCounter),
436
- onClick: t[1] || (t[1] = Pe((l) => {
437
+ ref_key: "hiddenTagsCounterRef",
438
+ ref: G,
439
+ class: k(r(y).truncateCounter),
440
+ onClick: t[1] || (t[1] = We((l) => {
437
441
  var a;
438
- return (a = re.value) == null ? void 0 : a.toggle();
442
+ return (a = de.value) == null ? void 0 : a.toggle();
439
443
  }, ["stop"]))
440
- }, "+" + k(W.value), 3)) : I("", !0)
441
- ], 2)) : !f.value && !le(i.value) ? (s(), n(w, { key: 1 }, [
442
- S(k(N(i.value)), 1)
444
+ }, "+" + g(q.value), 3)) : x("", !0)
445
+ ], 2)) : !v.value && !J(o.value) ? (s(), n(w, { key: 1 }, [
446
+ T(g(z(o.value)), 1)
443
447
  ], 64)) : (s(), n(w, { key: 2 }, [
444
- e.placeholder ? (s(), n("div", il, k(e.placeholder), 1)) : (s(), n("div", ol, " "))
448
+ e.placeholder ? (s(), n("div", nl, g(e.placeholder), 1)) : (s(), n("div", ul, " "))
445
449
  ], 64))
446
450
  ], 2)
447
451
  ])
448
452
  ]),
449
453
  _: 3
450
454
  }, 8, ["disabled", "placement"]),
451
- f.value && e.truncate && q.value ? (s(), x(ve, {
455
+ v.value && e.truncate && W.value ? (s(), L(ye, {
452
456
  key: 0,
453
457
  ref_key: "multipleHiddenRef",
454
- ref: re,
458
+ ref: de,
455
459
  "popper-show-triggers": [],
456
460
  "popper-hide-triggers": [],
457
461
  class: "inline-block !absolute right-0",
458
462
  placement: "auto-start"
459
463
  }, {
460
- content: p(() => [
461
- P(pe, { class: "p-2 flex gap-2 flex-wrap" }, {
462
- default: p(() => {
464
+ content: m(() => [
465
+ B(be, { class: "p-2 flex gap-2 flex-wrap" }, {
466
+ default: m(() => {
463
467
  var l;
464
468
  return [
465
- (s(!0), n(w, null, j((l = i.value) == null ? void 0 : l.slice(i.value.length - W.value), (a) => {
466
- var y, c, d, m;
467
- return s(), x(fe, {
469
+ (s(!0), n(w, null, j((l = o.value) == null ? void 0 : l.slice(o.value.length - q.value), (a) => {
470
+ var h, p, f, D;
471
+ return s(), L(pe, {
468
472
  key: a,
469
473
  size: "xs",
470
474
  removable: "",
471
- outlined: !($.value || (c = (y = e.options) == null ? void 0 : y.find((b) => b.value === a)) != null && c.disabled),
472
- disabled: $.value || ((m = (d = e.options) == null ? void 0 : d.find((b) => b.value === a)) == null ? void 0 : m.disabled),
473
- onRemove: (b) => {
474
- te(b, a);
475
+ outlined: !($.value || (p = (h = e.options) == null ? void 0 : h.find((u) => u.value === a)) != null && p.disabled),
476
+ disabled: $.value || ((D = (f = e.options) == null ? void 0 : f.find((u) => u.value === a)) == null ? void 0 : D.disabled),
477
+ onRemove: (u) => {
478
+ oe(u, a);
475
479
  }
476
480
  }, {
477
- prefix: p(() => {
478
- var b;
481
+ prefix: m(() => {
482
+ var u;
479
483
  return [
480
484
  O(e.$slots, "tag-prefix", {
481
- item: (b = e.options) == null ? void 0 : b.find((Be) => Be.value === a)
485
+ item: (u = e.options) == null ? void 0 : u.find((Y) => Y.value === a)
482
486
  })
483
487
  ];
484
488
  }),
485
- default: p(() => [
486
- S(" " + k(N(a)), 1)
489
+ default: m(() => [
490
+ T(" " + g(z(a)), 1)
487
491
  ]),
488
492
  _: 2
489
493
  }, 1032, ["outlined", "disabled", "onRemove"]);
@@ -494,46 +498,59 @@ const ll = { class: "relative" }, tl = {
494
498
  })
495
499
  ]),
496
500
  _: 3
497
- }, 512)) : I("", !0)
501
+ }, 512)) : x("", !0)
498
502
  ], 64)),
499
- Fe(M("select", U({
503
+ qe(P("select", U({
500
504
  id: e.id,
501
505
  ref_key: "elRef",
502
506
  ref: X,
503
- "onUpdate:modelValue": t[3] || (t[3] = (l) => i.value = l),
507
+ "onUpdate:modelValue": t[3] || (t[3] = (l) => o.value = l),
504
508
  tabindex: "-1",
505
- class: e.native && !f.value ? "absolute inset-0 w-full h-full cursor-pointer opacity-0" : "hidden",
509
+ class: e.native && !v.value ? "absolute inset-0 w-full h-full cursor-pointer opacity-0" : "hidden",
506
510
  name: e.name,
507
511
  disabled: e.disabled || e.loading,
508
- multiple: f.value,
512
+ multiple: v.value,
509
513
  readonly: e.readonly
510
- }, de(r(oe), !0)), [
514
+ }, ce(r(ne), !0)), [
511
515
  e.native ? (s(!0), n(w, { key: 0 }, j(e.options, (l, a) => (s(), n("option", {
512
516
  key: a,
513
517
  value: l.value,
514
518
  disabled: l.disabled
515
- }, k(l.label), 9, nl))), 128)) : I("", !0)
516
- ], 16, rl), [
517
- [Ee, i.value]
519
+ }, g(l.label), 9, vl))), 128)) : x("", !0)
520
+ ], 16, fl), [
521
+ [Ue, o.value]
518
522
  ]),
519
- e.$slots.input ? I("", !0) : (s(), n("div", {
523
+ we.value ? (s(), n("button", {
520
524
  key: 2,
521
- class: A(r(C).iconWrapper)
525
+ type: "button",
526
+ "aria-label": "Clean value",
527
+ class: k(r(y).clearButton),
528
+ onClick: t[4] || (t[4] = //@ts-ignore
529
+ (...l) => r(Q) && r(Q)(...l))
530
+ }, [
531
+ B(me, {
532
+ icon: r(Ye),
533
+ class: k([r(y).icon, "cursor-pointer"])
534
+ }, null, 8, ["icon", "class"])
535
+ ], 2)) : x("", !0),
536
+ e.$slots.input ? x("", !0) : (s(), n("div", {
537
+ key: 3,
538
+ class: k(r(y).iconWrapper)
522
539
  }, [
523
- e.loading ? (s(), x(Ye, {
540
+ e.loading ? (s(), L(ll, {
524
541
  key: 0,
525
542
  size: e.size
526
543
  }, null, 8, ["size"])) : O(e.$slots, "icon", { key: 1 }, () => [
527
- P(Je, {
528
- icon: r(Ke),
529
- class: A([r(C).icon])
544
+ B(me, {
545
+ icon: r(Ze),
546
+ class: k(r(y).icon)
530
547
  }, null, 8, ["icon", "class"])
531
548
  ])
532
549
  ], 2))
533
550
  ]),
534
- r(Oe) ? I("", !0) : (s(), x(Ze, {
551
+ r(Le) ? x("", !0) : (s(), L(tl, {
535
552
  key: 0,
536
- error: r(ie),
553
+ error: r(re),
537
554
  helper: e.helper
538
555
  }, null, 8, ["error", "helper"]))
539
556
  ]),
@@ -542,5 +559,5 @@ const ll = { class: "relative" }, tl = {
542
559
  }
543
560
  });
544
561
  export {
545
- Tl as default
562
+ Nl as default
546
563
  };