@defaultusr/dai-ui 1.1.12 → 1.1.13

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.
package/dist/main.js CHANGED
@@ -1,23 +1,23 @@
1
- import { Combobox as te, ComboboxInput as oe, injectCombobox as ae, ComboboxOptions as le, ComboboxOption as ie, useFormControl as A, PopoverDialog as ne, MenuItems as se, MenuItem as re, Tab as de, TabList as ue } from "vue-composable-ui";
2
- import { Menu as St, Popover as Ut, TabContainer as Nt, TabPanel as Xt } from "vue-composable-ui";
3
- import { reactive as ce, watch as T, onUnmounted as K, defineComponent as v, createElementBlock as u, openBlock as l, renderSlot as p, createTextVNode as E, toDisplayString as k, normalizeClass as w, createBlock as m, createCommentVNode as h, createElementVNode as d, computed as _, createVNode as V, normalizeProps as fe, guardReactiveProps as me, withCtx as c, Transition as P, mergeModels as M, useModel as $, useId as L, mergeProps as x, unref as r, inject as ve, Fragment as I, useTemplateRef as q, ref as N, onMounted as j, withDirectives as O, renderList as X, vModelSelect as pe, vModelText as he, vModelCheckbox as be, vModelRadio as ye, resolveDynamicComponent as ge, nextTick as we, normalizeStyle as U, Teleport as R, TransitionGroup as ke, withModifiers as $e } from "vue";
1
+ import { useFormControl as T, Combobox as te, ComboboxInput as oe, injectCombobox as ae, ComboboxOptions as le, ComboboxOption as ie, PopoverDialog as ne, MenuItems as se, MenuItem as re, Tab as de, TabList as ue } from "vue-composable-ui";
2
+ import { Menu as Ut, Popover as Nt, TabContainer as Xt, TabPanel as Dt } from "vue-composable-ui";
3
+ import { reactive as ce, watch as P, onUnmounted as K, defineComponent as v, createElementBlock as u, openBlock as a, renderSlot as p, createTextVNode as z, toDisplayString as k, normalizeClass as w, createBlock as m, createCommentVNode as b, createElementVNode as d, computed as _, createVNode as V, normalizeProps as fe, guardReactiveProps as me, withCtx as c, Transition as A, mergeModels as M, useModel as x, useId as q, useTemplateRef as L, mergeProps as $, unref as s, inject as ve, Fragment as j, ref as N, onMounted as I, withDirectives as O, renderList as X, vModelSelect as pe, vModelText as he, vModelCheckbox as be, vModelRadio as ye, resolveDynamicComponent as ge, nextTick as we, normalizeStyle as U, Teleport as R, TransitionGroup as ke, withModifiers as $e } from "vue";
4
4
  import './assets/main.css';function xe(e, ...t) {
5
5
  let o = [];
6
- const i = ce(t);
7
- function a() {
8
- i.length && (e.classList.add(...i), o = [...i]);
6
+ const l = ce(t);
7
+ function i() {
8
+ l.length && (e.classList.add(...l), o = [...l]);
9
9
  }
10
- function s() {
10
+ function r() {
11
11
  e.classList.remove(...o);
12
12
  }
13
- return T(
14
- i,
13
+ return P(
14
+ l,
15
15
  () => {
16
- s(), a();
16
+ r(), i();
17
17
  },
18
18
  { immediate: !0 }
19
- ), K(s), {
20
- classList: i
19
+ ), K(r), {
20
+ classList: l
21
21
  };
22
22
  }
23
23
  const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
@@ -26,9 +26,9 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
26
26
  text: {}
27
27
  },
28
28
  setup(e) {
29
- return (t, o) => (l(), u("label", _e, [
29
+ return (t, o) => (a(), u("label", _e, [
30
30
  p(t.$slots, "default", {}, () => [
31
- E(k(e.text), 1)
31
+ z(k(e.text), 1)
32
32
  ])
33
33
  ]));
34
34
  }
@@ -38,9 +38,9 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
38
38
  text: {}
39
39
  },
40
40
  setup(e) {
41
- return (t, o) => (l(), u("div", Be, [
41
+ return (t, o) => (a(), u("div", Be, [
42
42
  p(t.$slots, "default", {}, () => [
43
- E(k(e.text), 1)
43
+ z(k(e.text), 1)
44
44
  ])
45
45
  ]));
46
46
  }
@@ -57,7 +57,7 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
57
57
  invalid: { type: Boolean }
58
58
  },
59
59
  setup(e) {
60
- return (t, o) => (l(), u("div", {
60
+ return (t, o) => (a(), u("div", {
61
61
  class: w(["dai-form-control__input-group", {
62
62
  "dai-form-control__input-group--labeled": !!e.label,
63
63
  "dai-form-control__input-group--outlined": e.variant === "outlined",
@@ -69,18 +69,18 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
69
69
  "dai-form-control__input-group--invalid": e.invalid
70
70
  }])
71
71
  }, [
72
- e.label ? (l(), m(F, {
72
+ e.label ? (a(), m(F, {
73
73
  key: 0,
74
74
  text: e.label,
75
75
  for: e.labelFor,
76
76
  class: "dai-form-control__input-group__label"
77
- }, null, 8, ["text", "for"])) : h("", !0),
77
+ }, null, 8, ["text", "for"])) : b("", !0),
78
78
  d("div", Ve, [
79
79
  p(t.$slots, "default")
80
80
  ])
81
81
  ], 2));
82
82
  }
83
- }), Ce = { class: "dai-form-control__container" }, ze = {
83
+ }), Ce = { class: "dai-form-control__container" }, Ee = {
84
84
  key: 0,
85
85
  class: "dai-form-control__validation-message",
86
86
  role: "alert"
@@ -104,40 +104,40 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
104
104
  invalid: { type: Boolean }
105
105
  },
106
106
  setup(e) {
107
- const t = e, o = _(() => t.variant ? t.variant : t.muted ? "muted" : t.outlined ? "outlined" : "flat"), i = _(() => t.size ? t.size : t.sm ? "small" : t.lg ? "large" : "medium");
108
- return (a, s) => (l(), u("div", {
107
+ const t = e, o = _(() => t.variant ? t.variant : t.muted ? "muted" : t.outlined ? "outlined" : "flat"), l = _(() => t.size ? t.size : t.sm ? "small" : t.lg ? "large" : "medium");
108
+ return (i, r) => (a(), u("div", {
109
109
  class: w(["dai-form-control", {
110
110
  "dai-form-control--label-inline": e.labelPosition === "inline",
111
111
  "dai-form-control--invalid": e.invalid,
112
- "dai-form-control--lg": i.value === "large"
112
+ "dai-form-control--lg": l.value === "large"
113
113
  }])
114
114
  }, [
115
- e.label && e.labelPosition !== "inside" ? (l(), m(F, {
115
+ e.label && e.labelPosition !== "inside" ? (a(), m(F, {
116
116
  key: 0,
117
117
  for: e.labelFor,
118
118
  text: e.label
119
- }, null, 8, ["for", "text"])) : h("", !0),
119
+ }, null, 8, ["for", "text"])) : b("", !0),
120
120
  d("div", Ce, [
121
121
  V(Me, fe(me({
122
122
  ...t,
123
123
  label: e.labelPosition === "inside" ? e.label : void 0,
124
124
  variant: o.value,
125
- size: i.value
125
+ size: l.value
126
126
  })), {
127
127
  default: c(() => [
128
- p(a.$slots, "default")
128
+ p(i.$slots, "default")
129
129
  ]),
130
130
  _: 3
131
131
  }, 16),
132
- e.hint ? (l(), m(D, {
132
+ e.hint ? (a(), m(D, {
133
133
  key: 0,
134
134
  text: e.hint,
135
135
  class: "dai-form-control__hint"
136
- }, null, 8, ["text"])) : h("", !0),
137
- V(P, { name: "dai-form-control__validation-message-transition" }, {
136
+ }, null, 8, ["text"])) : b("", !0),
137
+ V(A, { name: "dai-form-control__validation-message-transition" }, {
138
138
  default: c(() => [
139
- e.validationMessage ? (l(), u("div", ze, [
140
- s[0] || (s[0] = d("svg", {
139
+ e.validationMessage ? (a(), u("div", Ee, [
140
+ r[0] || (r[0] = d("svg", {
141
141
  xmlns: "http://www.w3.org/2000/svg",
142
142
  viewBox: "0 0 256 256",
143
143
  class: ""
@@ -147,19 +147,21 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
147
147
  d: "M240.26 186.1L152.81 34.23a28.74 28.74 0 0 0-49.62 0L15.74 186.1a27.45 27.45 0 0 0 0 27.71A28.31 28.31 0 0 0 40.55 228h174.9a28.31 28.31 0 0 0 24.79-14.19a27.45 27.45 0 0 0 .02-27.71Zm-20.8 15.7a4.46 4.46 0 0 1-4 2.2H40.55a4.46 4.46 0 0 1-4-2.2a3.56 3.56 0 0 1 0-3.73L124 46.2a4.77 4.77 0 0 1 8 0l87.44 151.87a3.56 3.56 0 0 1 .02 3.73ZM116 136v-32a12 12 0 0 1 24 0v32a12 12 0 0 1-24 0Zm28 40a16 16 0 1 1-16-16a16 16 0 0 1 16 16Z"
148
148
  })
149
149
  ], -1)),
150
- E(" " + k(e.validationMessage), 1)
151
- ])) : h("", !0)
150
+ z(" " + k(e.validationMessage), 1)
151
+ ])) : b("", !0)
152
152
  ]),
153
153
  _: 1
154
154
  })
155
155
  ])
156
156
  ], 2));
157
157
  }
158
- }), Ee = /* @__PURE__ */ v({
158
+ }), ze = ["value"], Le = /* @__PURE__ */ v({
159
159
  inheritAttrs: !1,
160
160
  __name: "combobox",
161
161
  props: /* @__PURE__ */ M({
162
162
  id: {},
163
+ validators: { default: () => [] },
164
+ showValidationError: { type: Boolean },
163
165
  labelPosition: {},
164
166
  hint: {},
165
167
  validationMessage: {},
@@ -180,40 +182,52 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
180
182
  }),
181
183
  emits: ["update:modelValue"],
182
184
  setup(e) {
183
- const t = e, o = $(e, "modelValue"), i = t.id || L();
184
- return (a, s) => (l(), m(S, x(t, {
185
- labelFor: r(i),
186
- class: a.$attrs.class
185
+ const t = e, o = x(e, "modelValue"), l = t.id || q(), i = L("formElement"), { isValid: r, validationMessage: n } = T(
186
+ i,
187
+ t.validators,
188
+ t.showValidationError
189
+ );
190
+ return (y, h) => (a(), m(S, $(t, {
191
+ labelFor: s(l),
192
+ validationMessage: e.showValidationError ? "" : s(n),
193
+ invalid: s(r),
194
+ class: y.$attrs.class
187
195
  }), {
188
196
  default: c(() => [
189
- V(r(te), x({ ...a.$attrs, class: void 0 }, {
190
- id: r(i),
197
+ V(s(te), $({ ...y.$attrs, class: void 0, required: void 0 }, {
198
+ id: s(l),
191
199
  modelValue: o.value,
192
- "onUpdate:modelValue": s[0] || (s[0] = (n) => o.value = n)
200
+ "onUpdate:modelValue": h[0] || (h[0] = (g) => o.value = g)
193
201
  }), {
194
202
  default: c(() => [
195
- p(a.$slots, "default")
203
+ d("input", $({
204
+ ref_key: "formElement",
205
+ ref: i,
206
+ type: "text",
207
+ value: o.value
208
+ }, { required: y.$attrs.required }, { class: "dai-combobox__stab-input" }), null, 16, ze),
209
+ p(y.$slots, "default")
196
210
  ]),
197
211
  _: 3
198
212
  }, 16, ["id", "modelValue"])
199
213
  ]),
200
214
  _: 3
201
- }, 16, ["labelFor", "class"]));
215
+ }, 16, ["labelFor", "validationMessage", "invalid", "class"]));
202
216
  }
203
- }), wt = /* @__PURE__ */ v({
217
+ }), kt = /* @__PURE__ */ v({
204
218
  __name: "comboboxInput",
205
219
  setup(e) {
206
- return (t, o) => (l(), m(r(oe), { class: "dai-form-control__input-group__control" }, {
220
+ return (t, o) => (a(), m(s(oe), { class: "dai-form-control__input-group__control" }, {
207
221
  default: c(() => [
208
222
  p(t.$slots, "default")
209
223
  ]),
210
224
  _: 3
211
225
  }));
212
226
  }
213
- }), Le = {
227
+ }), qe = {
214
228
  key: 0,
215
229
  class: "dai-form-control__input-group__control__placeholder"
216
- }, qe = /* @__PURE__ */ v({
230
+ }, Te = /* @__PURE__ */ v({
217
231
  __name: "comboboxButton",
218
232
  props: {
219
233
  placeholder: {}
@@ -225,17 +239,17 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
225
239
  function o() {
226
240
  t.isOpen.value ? t.close({ focus: !0 }) : t.open({ focus: !1 });
227
241
  }
228
- return (i, a) => (l(), u("button", x(r(t).activatorAttrs.value, {
229
- onKeydown: a[0] || (a[0] = (s) => r(t).activatorOnKeyDown(s)),
242
+ return (l, i) => (a(), u("button", $(s(t).activatorAttrs.value, {
243
+ onKeydown: i[0] || (i[0] = (r) => s(t).activatorOnKeyDown(r)),
230
244
  onClick: o,
231
245
  type: "button",
232
246
  class: "dai-form-control__input-group__control dai-combobox-btn"
233
247
  }), [
234
- p(i.$slots, "default", {}, () => [
235
- r(t).displayValue.value ? (l(), u(I, { key: 1 }, [
236
- E(k(r(t).displayValue), 1)
237
- ], 64)) : (l(), u("span", Le, k(e.placeholder || "Select..."), 1)),
238
- a[1] || (a[1] = d("svg", {
248
+ p(l.$slots, "default", {}, () => [
249
+ s(t).displayValue.value ? (a(), u(j, { key: 1 }, [
250
+ z(k(s(t).displayValue), 1)
251
+ ], 64)) : (a(), u("span", qe, k(e.placeholder || "Select..."), 1)),
252
+ i[1] || (i[1] = d("svg", {
239
253
  class: "dai-combobox-btn__chevron",
240
254
  role: "presentation",
241
255
  xmlns: "http://www.w3.org/2000/svg",
@@ -251,15 +265,15 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
251
265
  ])
252
266
  ], 16));
253
267
  }
254
- }), Te = /* @__PURE__ */ v({
268
+ }), Pe = /* @__PURE__ */ v({
255
269
  __name: "comboboxOptions",
256
270
  setup(e) {
257
- return (t, o) => (l(), m(P, {
271
+ return (t, o) => (a(), m(A, {
258
272
  "enter-from-class": "dai-combobox-options--anim",
259
273
  "leave-to-class": "dai-combobox-options--anim"
260
274
  }, {
261
275
  default: c(() => [
262
- V(r(le), { class: "dai-combobox-options" }, {
276
+ V(s(le), { class: "dai-combobox-options" }, {
263
277
  default: c(() => [
264
278
  p(t.$slots, "default")
265
279
  ]),
@@ -269,67 +283,67 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
269
283
  _: 3
270
284
  }));
271
285
  }
272
- }), Pe = {
286
+ }), Ae = {
273
287
  key: 0,
274
288
  class: "dai-combobox-option__check",
275
289
  xmlns: "http://www.w3.org/2000/svg",
276
290
  viewBox: "0 0 16 16"
277
- }, Ae = /* @__PURE__ */ v({
291
+ }, je = /* @__PURE__ */ v({
278
292
  __name: "comboboxOption",
279
293
  props: {
280
294
  value: {}
281
295
  },
282
296
  setup(e) {
283
- return (t, o) => (l(), m(r(ie), {
297
+ return (t, o) => (a(), m(s(ie), {
284
298
  value: e.value,
285
299
  class: "dai-combobox-option"
286
300
  }, {
287
- default: c(({ isActive: i, isSelected: a }) => [
301
+ default: c(({ isActive: l, isSelected: i }) => [
288
302
  p(t.$slots, "default", {
289
- isActive: i,
290
- isSelected: a
303
+ isActive: l,
304
+ isSelected: i
291
305
  }),
292
- a ? (l(), u("svg", Pe, [...o[0] || (o[0] = [
306
+ i ? (a(), u("svg", Ae, [...o[0] || (o[0] = [
293
307
  d("path", {
294
308
  fill: "currentColor",
295
309
  "fill-rule": "evenodd",
296
310
  d: "M12.416 3.376a.75.75 0 0 1 .208 1.04l-5 7.5a.75.75 0 0 1-1.154.114l-3-3a.75.75 0 0 1 1.06-1.06l2.353 2.353l4.493-6.74a.75.75 0 0 1 1.04-.207",
297
311
  "clip-rule": "evenodd"
298
312
  }, null, -1)
299
- ])])) : h("", !0)
313
+ ])])) : b("", !0)
300
314
  ]),
301
315
  _: 3
302
316
  }, 8, ["value"]));
303
317
  }
304
318
  }), Ie = (e, t) => {
305
319
  const o = e.__vccOpts || e;
306
- for (const [i, a] of t)
307
- o[i] = a;
320
+ for (const [l, i] of t)
321
+ o[l] = i;
308
322
  return o;
309
- }, je = {}, Oe = {
323
+ }, Oe = {}, Fe = {
310
324
  type: "button",
311
325
  class: "dai-form-control__input-group__addon dai-form-control__input-group__addon--btn",
312
326
  tabindex: "-1",
313
327
  "aria-hidden": "true"
314
328
  };
315
- function Fe(e, t) {
316
- return l(), u("button", Oe, [
329
+ function Se(e, t) {
330
+ return a(), u("button", Fe, [
317
331
  p(e.$slots, "default")
318
332
  ]);
319
333
  }
320
- const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern", "title", "autocomplete", "value"], Ue = {
334
+ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern", "title", "autocomplete", "value"], Ne = {
321
335
  key: 0,
322
336
  xmlns: "http://www.w3.org/2000/svg",
323
337
  fill: "none",
324
338
  viewBox: "0 0 24 24",
325
339
  stroke: "currentColor"
326
- }, Ne = {
340
+ }, Xe = {
327
341
  key: 1,
328
342
  xmlns: "http://www.w3.org/2000/svg",
329
343
  fill: "none",
330
344
  viewBox: "0 0 24 24",
331
345
  stroke: "currentColor"
332
- }, kt = /* @__PURE__ */ v({
346
+ }, $t = /* @__PURE__ */ v({
333
347
  inheritAttrs: !1,
334
348
  __name: "input",
335
349
  props: /* @__PURE__ */ M({
@@ -364,17 +378,17 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
364
378
  }),
365
379
  emits: ["update:modelValue", "update:files"],
366
380
  setup(e) {
367
- const t = e, o = t.id || L(), i = _(() => typeof t.autocomplete == "string" ? t.autocomplete : t.autocomplete ? "on" : "off"), a = $(e, "modelValue"), s = $(e, "files", {
381
+ const t = e, o = t.id || q(), l = _(() => typeof t.autocomplete == "string" ? t.autocomplete : t.autocomplete ? "on" : "off"), i = x(e, "modelValue"), r = x(e, "files", {
368
382
  set(B) {
369
383
  return n.value && (n.value.files = B), B;
370
384
  }
371
- }), n = q("formElement"), { isValid: g, validationMessage: b, validate: y } = A(
385
+ }), n = L("formElement"), { isValid: y, validationMessage: h, validate: g } = T(
372
386
  n,
373
387
  t.validators,
374
388
  t.showValidationError
375
389
  ), f = N(!1);
376
- T(a, () => {
377
- s.value = n.value?.files || null;
390
+ P(i, () => {
391
+ r.value = n.value?.files || null;
378
392
  });
379
393
  let C;
380
394
  const Z = _(() => t.type === "password" ? f.value ? "text" : "password" : t.type), H = _(() => t.mask ? t.mask : t.type === "tel" ? {
@@ -384,59 +398,59 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
384
398
  f.value = !f.value;
385
399
  }
386
400
  function J() {
387
- a.value = "";
401
+ i.value = "";
388
402
  }
389
403
  function ee(B) {
390
404
  if (C)
391
405
  return;
392
- const { value: z } = B.target;
393
- a.value = z;
406
+ const { value: E } = B.target;
407
+ i.value = E;
394
408
  }
395
- return j(() => {
409
+ return I(() => {
396
410
  H.value && import("imask").then((B) => {
397
411
  C = B.default(
398
412
  n.value,
399
413
  H.value
400
414
  ), C.on("accept", () => {
401
- a.value = C.value;
415
+ i.value = C.value;
402
416
  });
403
417
  });
404
- }), (B, z) => (l(), m(S, x(t, {
405
- "label-for": r(o),
406
- "validation-message": e.showValidationError ? "" : r(b),
407
- invalid: t.invalid || !r(g),
418
+ }), (B, E) => (a(), m(S, $(t, {
419
+ "label-for": s(o),
420
+ "validation-message": e.showValidationError ? "" : s(h),
421
+ invalid: t.invalid || !s(y),
408
422
  class: B.$attrs.class
409
423
  }), {
410
424
  default: c(() => [
411
425
  p(B.$slots, "prepend"),
412
- d("input", x({
426
+ d("input", $({
413
427
  ref_key: "formElement",
414
428
  ref: n
415
429
  }, { ...B.$attrs, class: void 0 }, {
416
- id: r(o),
430
+ id: s(o),
417
431
  type: Z.value,
418
432
  pattern: G.value,
419
433
  title: Q.value,
420
- autocomplete: i.value,
421
- value: a.value,
434
+ autocomplete: l.value,
435
+ value: i.value,
422
436
  onInputPassive: ee,
423
- onKeyupPassive: z[0] || (z[0] = (bt) => !r(g) && r(y)()),
437
+ onKeyupPassive: E[0] || (E[0] = (yt) => !s(y) && s(g)()),
424
438
  class: "dai-form-control__input-group__control dai-form-control__input"
425
- }), null, 16, Se),
439
+ }), null, 16, Ue),
426
440
  p(B.$slots, "append"),
427
- t.type === "password" && a.value ? (l(), m(Y, {
441
+ t.type === "password" && i.value ? (a(), m(Y, {
428
442
  key: 0,
429
443
  onClick: W
430
444
  }, {
431
445
  default: c(() => [
432
- f.value ? (l(), u("svg", Ne, [...z[2] || (z[2] = [
446
+ f.value ? (a(), u("svg", Xe, [...E[2] || (E[2] = [
433
447
  d("path", {
434
448
  "stroke-linecap": "round",
435
449
  "stroke-linejoin": "round",
436
450
  "stroke-width": "2",
437
451
  d: "M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"
438
452
  }, null, -1)
439
- ])])) : (l(), u("svg", Ue, [...z[1] || (z[1] = [
453
+ ])])) : (a(), u("svg", Ne, [...E[1] || (E[1] = [
440
454
  d("path", {
441
455
  "stroke-linecap": "round",
442
456
  "stroke-linejoin": "round",
@@ -452,12 +466,12 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
452
466
  ])]))
453
467
  ]),
454
468
  _: 1
455
- })) : h("", !0),
456
- e.clearable && a.value && !t.disabled ? (l(), m(Y, {
469
+ })) : b("", !0),
470
+ e.clearable && i.value && !t.disabled ? (a(), m(Y, {
457
471
  key: 1,
458
472
  onClick: J
459
473
  }, {
460
- default: c(() => [...z[3] || (z[3] = [
474
+ default: c(() => [...E[3] || (E[3] = [
461
475
  d("svg", {
462
476
  xmlns: "http://www.w3.org/2000/svg",
463
477
  fill: "none",
@@ -473,12 +487,12 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
473
487
  ], -1)
474
488
  ])]),
475
489
  _: 1
476
- })) : h("", !0)
490
+ })) : b("", !0)
477
491
  ]),
478
492
  _: 3
479
493
  }, 16, ["label-for", "validation-message", "invalid", "class"]));
480
494
  }
481
- }), Xe = ["id"], De = ["value"], $t = /* @__PURE__ */ v({
495
+ }), De = ["id"], He = ["value"], xt = /* @__PURE__ */ v({
482
496
  inheritAttrs: !1,
483
497
  __name: "select",
484
498
  props: /* @__PURE__ */ M({
@@ -508,36 +522,36 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
508
522
  }),
509
523
  emits: ["update:modelValue"],
510
524
  setup(e) {
511
- const t = e, o = t.id || L(), i = $(e, "modelValue"), a = q("formElement"), { isValid: s, validationMessage: n, validate: g } = A(
512
- a,
525
+ const t = e, o = t.id || q(), l = x(e, "modelValue"), i = L("formElement"), { isValid: r, validationMessage: n, validate: y } = T(
526
+ i,
513
527
  t.validators,
514
528
  t.showValidationError
515
529
  );
516
- return (b, y) => (l(), m(S, x(t, {
517
- "label-for": r(o),
518
- "validation-message": e.showValidationError ? "" : r(n),
519
- invalid: t.invalid || !r(s),
520
- class: b.$attrs.class
530
+ return (h, g) => (a(), m(S, $(t, {
531
+ "label-for": s(o),
532
+ "validation-message": e.showValidationError ? "" : s(n),
533
+ invalid: t.invalid || !s(r),
534
+ class: h.$attrs.class
521
535
  }), {
522
536
  default: c(() => [
523
- O(d("select", x({
537
+ O(d("select", $({
524
538
  ref_key: "formElement",
525
- ref: a
526
- }, { ...b.$attrs, class: void 0 }, {
527
- id: r(o),
528
- "onUpdate:modelValue": y[0] || (y[0] = (f) => i.value = f),
539
+ ref: i
540
+ }, { ...h.$attrs, class: void 0 }, {
541
+ id: s(o),
542
+ "onUpdate:modelValue": g[0] || (g[0] = (f) => l.value = f),
529
543
  class: "dai-form-control__input-group__control dai-select"
530
544
  }), [
531
- p(b.$slots, "default", {}, () => [
532
- (l(!0), u(I, null, X(e.options, (f) => (l(), u("option", {
545
+ p(h.$slots, "default", {}, () => [
546
+ (a(!0), u(j, null, X(e.options, (f) => (a(), u("option", {
533
547
  value: f[e.optionValue],
534
548
  key: f[e.optionValue]
535
- }, k(f[e.optionText]), 9, De))), 128))
549
+ }, k(f[e.optionText]), 9, He))), 128))
536
550
  ])
537
- ], 16, Xe), [
538
- [pe, i.value]
551
+ ], 16, De), [
552
+ [pe, l.value]
539
553
  ]),
540
- y[1] || (y[1] = d("svg", {
554
+ g[1] || (g[1] = d("svg", {
541
555
  class: "dai-select__chevron",
542
556
  xmlns: "http://www.w3.org/2000/svg",
543
557
  viewBox: "0 0 16 16"
@@ -553,7 +567,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
553
567
  _: 3
554
568
  }, 16, ["label-for", "validation-message", "invalid", "class"]));
555
569
  }
556
- }), xt = /* @__PURE__ */ v({
570
+ }), _t = /* @__PURE__ */ v({
557
571
  __name: "selectbox",
558
572
  props: /* @__PURE__ */ M({
559
573
  options: {},
@@ -561,6 +575,8 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
561
575
  optionValue: { default: "value" },
562
576
  placeholder: {},
563
577
  id: {},
578
+ validators: {},
579
+ showValidationError: { type: Boolean },
564
580
  labelPosition: {},
565
581
  hint: {},
566
582
  validationMessage: {},
@@ -581,22 +597,22 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
581
597
  }),
582
598
  emits: ["update:modelValue"],
583
599
  setup(e) {
584
- const t = e, o = $(e, "modelValue");
585
- return (i, a) => (l(), m(r(Ee), x(t, {
586
- displayValue: (s) => e.options.find((n) => n[e.optionValue] === s)?.[e.optionText] || "",
600
+ const t = e, o = x(e, "modelValue");
601
+ return (l, i) => (a(), m(s(Le), $(t, {
602
+ displayValue: (r) => e.options.find((n) => n[e.optionValue] === r)?.[e.optionText] || "",
587
603
  modelValue: o.value,
588
- "onUpdate:modelValue": a[0] || (a[0] = (s) => o.value = s)
604
+ "onUpdate:modelValue": i[0] || (i[0] = (r) => o.value = r)
589
605
  }), {
590
606
  default: c(() => [
591
- V(r(qe), { placeholder: e.placeholder }, null, 8, ["placeholder"]),
592
- V(r(Te), null, {
607
+ V(s(Te), { placeholder: e.placeholder }, null, 8, ["placeholder"]),
608
+ V(s(Pe), null, {
593
609
  default: c(() => [
594
- (l(!0), u(I, null, X(e.options, (s) => (l(), m(r(Ae), {
595
- key: s[e.optionValue],
596
- value: s[e.optionValue]
610
+ (a(!0), u(j, null, X(e.options, (r) => (a(), m(s(je), {
611
+ key: r[e.optionValue],
612
+ value: r[e.optionValue]
597
613
  }, {
598
614
  default: c(() => [
599
- E(k(s[e.optionText]), 1)
615
+ z(k(r[e.optionText]), 1)
600
616
  ]),
601
617
  _: 2
602
618
  }, 1032, ["value"]))), 128))
@@ -607,7 +623,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
607
623
  _: 1
608
624
  }, 16, ["displayValue", "modelValue"]));
609
625
  }
610
- }), He = ["id"], _t = /* @__PURE__ */ v({
626
+ }), Ye = ["id"], Bt = /* @__PURE__ */ v({
611
627
  inheritAttrs: !1,
612
628
  __name: "textarea",
613
629
  props: /* @__PURE__ */ M({
@@ -621,42 +637,42 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
621
637
  }),
622
638
  emits: ["update:modelValue"],
623
639
  setup(e) {
624
- const t = e, o = t.id || L(), i = $(e, "modelValue"), a = q("formElement"), { isValid: s, validationMessage: n, validate: g } = A(
625
- a,
640
+ const t = e, o = t.id || q(), l = x(e, "modelValue"), i = L("formElement"), { isValid: r, validationMessage: n, validate: y } = T(
641
+ i,
626
642
  t.validators,
627
643
  t.showValidationError
628
644
  );
629
- function b() {
645
+ function h() {
630
646
  if (!t.autosize) return;
631
- const y = a.value, f = y.offsetHeight - y.clientHeight;
632
- y.style.height = "auto", y.style.height = `${y.scrollHeight + f}px`;
647
+ const g = i.value, f = g.offsetHeight - g.clientHeight;
648
+ g.style.height = "auto", g.style.height = `${g.scrollHeight + f}px`;
633
649
  }
634
- return j(b), (y, f) => (l(), m(S, x(t, {
635
- "label-for": r(o),
636
- "validation-message": e.showValidationError ? "" : r(n),
637
- invalid: !r(s),
638
- class: y.$attrs.class
650
+ return I(h), (g, f) => (a(), m(S, $(t, {
651
+ "label-for": s(o),
652
+ "validation-message": e.showValidationError ? "" : s(n),
653
+ invalid: !s(r),
654
+ class: g.$attrs.class
639
655
  }), {
640
656
  default: c(() => [
641
- O(d("textarea", x({
657
+ O(d("textarea", $({
642
658
  ref_key: "formElement",
643
- ref: a
644
- }, { ...y.$attrs, class: void 0 }, {
645
- id: r(o),
646
- "onUpdate:modelValue": f[0] || (f[0] = (C) => i.value = C),
647
- onKeyupPassive: f[1] || (f[1] = (C) => !r(s) && r(g)()),
648
- onInputPassive: b,
659
+ ref: i
660
+ }, { ...g.$attrs, class: void 0 }, {
661
+ id: s(o),
662
+ "onUpdate:modelValue": f[0] || (f[0] = (C) => l.value = C),
663
+ onKeyupPassive: f[1] || (f[1] = (C) => !s(r) && s(y)()),
664
+ onInputPassive: h,
649
665
  class: ["form-control__textarea", {
650
666
  "form-control__textarea--autosize": e.autosize
651
667
  }]
652
- }), null, 16, He), [
653
- [he, i.value]
668
+ }), null, 16, Ye), [
669
+ [he, l.value]
654
670
  ])
655
671
  ]),
656
672
  _: 1
657
673
  }, 16, ["label-for", "validation-message", "invalid", "class"]));
658
674
  }
659
- }), Ye = ["id"], Bt = /* @__PURE__ */ v({
675
+ }), Ke = ["id"], Vt = /* @__PURE__ */ v({
660
676
  inheritAttrs: !1,
661
677
  __name: "checkbox",
662
678
  props: /* @__PURE__ */ M({
@@ -671,59 +687,59 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
671
687
  }),
672
688
  emits: ["update:modelValue"],
673
689
  setup(e) {
674
- const t = e, o = $(e, "modelValue"), i = L(), a = q("formElement"), { isValid: s } = A(
675
- a,
690
+ const t = e, o = x(e, "modelValue"), l = q(), i = L("formElement"), { isValid: r } = T(
691
+ i,
676
692
  t.validators,
677
693
  t.showValidationError
678
694
  );
679
- return (n, g) => (l(), u("div", {
695
+ return (n, y) => (a(), u("div", {
680
696
  class: w(["dai-checkbox-control", n.$attrs.class])
681
697
  }, [
682
- O(d("input", x({
698
+ O(d("input", $({
683
699
  ref_key: "formElement",
684
- ref: a,
685
- "onUpdate:modelValue": g[0] || (g[0] = (b) => o.value = b)
700
+ ref: i,
701
+ "onUpdate:modelValue": y[0] || (y[0] = (h) => o.value = h)
686
702
  }, { ...n.$attrs, class: "" }, {
687
- id: r(i),
703
+ id: s(l),
688
704
  type: "checkbox",
689
705
  class: ["dai-checkbox", {
690
706
  [`dai-checkbox--${e.color}`]: e.color,
691
- "dai-checkbox--invalid": !r(s)
707
+ "dai-checkbox--invalid": !s(r)
692
708
  }]
693
- }), null, 16, Ye), [
709
+ }), null, 16, Ke), [
694
710
  [be, o.value]
695
711
  ]),
696
- e.label || n.$slots.default ? (l(), m(F, {
712
+ e.label || n.$slots.default ? (a(), m(F, {
697
713
  key: 0,
698
- for: r(i)
714
+ for: s(l)
699
715
  }, {
700
716
  default: c(() => [
701
717
  p(n.$slots, "default", {}, () => [
702
- E(k(e.label), 1)
718
+ z(k(e.label), 1)
703
719
  ])
704
720
  ]),
705
721
  _: 3
706
- }, 8, ["for"])) : h("", !0),
707
- e.hint || n.$slots.hint ? (l(), m(D, {
722
+ }, 8, ["for"])) : b("", !0),
723
+ e.hint || n.$slots.hint ? (a(), m(D, {
708
724
  key: 1,
709
725
  class: "dai-checkbox-control__hint"
710
726
  }, {
711
727
  default: c(() => [
712
728
  p(n.$slots, "hint", {}, () => [
713
- E(k(e.hint), 1)
729
+ z(k(e.hint), 1)
714
730
  ])
715
731
  ]),
716
732
  _: 3
717
- })) : h("", !0)
733
+ })) : b("", !0)
718
734
  ], 2));
719
735
  }
720
- }), Ke = { class: "flex items-center h-5" }, Re = ["value", "id"], Ze = {
736
+ }), Re = { class: "flex items-center h-5" }, Ze = ["value", "id"], Ge = {
721
737
  key: 0,
722
738
  class: "text-sm"
723
- }, Ge = ["for"], Qe = {
739
+ }, Qe = ["for"], We = {
724
740
  key: 0,
725
741
  class: "text-secondary-500 dark:text-secondary-400"
726
- }, Vt = /* @__PURE__ */ v({
742
+ }, Mt = /* @__PURE__ */ v({
727
743
  inheritAttrs: !1,
728
744
  __name: "radio",
729
745
  props: /* @__PURE__ */ M({
@@ -739,41 +755,41 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
739
755
  }),
740
756
  emits: ["update:modelValue"],
741
757
  setup(e) {
742
- const t = e, o = $(e, "modelValue"), i = L(), a = q("formElement"), { isValid: s } = A(
743
- a,
758
+ const t = e, o = x(e, "modelValue"), l = q(), i = L("formElement"), { isValid: r } = T(
759
+ i,
744
760
  t.validators,
745
761
  t.showValidationError
746
762
  );
747
- return (n, g) => (l(), u("div", {
763
+ return (n, y) => (a(), u("div", {
748
764
  class: w(["flex items-start gap-3", n.$attrs.class])
749
765
  }, [
750
- d("div", Ke, [
751
- O(d("input", x({
766
+ d("div", Re, [
767
+ O(d("input", $({
752
768
  type: "radio",
753
769
  ref_key: "formElement",
754
- ref: a,
755
- "onUpdate:modelValue": g[0] || (g[0] = (b) => o.value = b)
770
+ ref: i,
771
+ "onUpdate:modelValue": y[0] || (y[0] = (h) => o.value = h)
756
772
  }, { ...n.$attrs, class: "" }, {
757
773
  value: e.value,
758
- id: r(i),
774
+ id: s(l),
759
775
  class: ["radio", {
760
776
  [`radio--${e.color}`]: e.color,
761
- "radio--invalid": !r(s)
777
+ "radio--invalid": !s(r)
762
778
  }]
763
- }), null, 16, Re), [
779
+ }), null, 16, Ze), [
764
780
  [ye, o.value]
765
781
  ])
766
782
  ]),
767
- e.label ? (l(), u("div", Ze, [
783
+ e.label ? (a(), u("div", Ge, [
768
784
  d("label", {
769
- for: r(i),
785
+ for: s(l),
770
786
  class: "font-medium select-none cursor-pointer"
771
- }, k(e.label), 9, Ge),
772
- e.hint ? (l(), u("p", Qe, k(e.hint), 1)) : h("", !0)
773
- ])) : h("", !0)
787
+ }, k(e.label), 9, Qe),
788
+ e.hint ? (a(), u("p", We, k(e.hint), 1)) : b("", !0)
789
+ ])) : b("", !0)
774
790
  ], 2));
775
791
  }
776
- }), We = { class: "dai-switch-control" }, Je = ["id", "aria-checked"], Mt = /* @__PURE__ */ v({
792
+ }), Je = { class: "dai-switch-control" }, et = ["id", "aria-checked"], Ct = /* @__PURE__ */ v({
777
793
  __name: "switch",
778
794
  props: /* @__PURE__ */ M({
779
795
  label: {},
@@ -784,50 +800,50 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
784
800
  }),
785
801
  emits: ["update:modelValue"],
786
802
  setup(e) {
787
- const t = $(e, "modelValue"), o = L();
788
- return (i, a) => (l(), u("div", We, [
803
+ const t = x(e, "modelValue"), o = q();
804
+ return (l, i) => (a(), u("div", Je, [
789
805
  d("button", {
790
- onClick: a[0] || (a[0] = (s) => t.value = !t.value),
791
- id: r(o),
806
+ onClick: i[0] || (i[0] = (r) => t.value = !t.value),
807
+ id: s(o),
792
808
  "aria-checked": t.value,
793
809
  role: "switch",
794
810
  type: "button",
795
811
  tabindex: "0",
796
812
  class: w(["dai-switch", [t.value ? "dai-switch--on" : "dai-switch--off"]])
797
- }, [...a[1] || (a[1] = [
813
+ }, [...i[1] || (i[1] = [
798
814
  d("div", {
799
815
  "aria-hidden": "true",
800
816
  class: "dai-switch__thumb"
801
817
  }, null, -1)
802
- ])], 10, Je),
803
- e.label || i.$slots.default ? (l(), m(F, {
818
+ ])], 10, et),
819
+ e.label || l.$slots.default ? (a(), m(F, {
804
820
  key: 0,
805
- for: r(o)
821
+ for: s(o)
806
822
  }, {
807
823
  default: c(() => [
808
- p(i.$slots, "default", {}, () => [
809
- E(k(e.label), 1)
824
+ p(l.$slots, "default", {}, () => [
825
+ z(k(e.label), 1)
810
826
  ])
811
827
  ]),
812
828
  _: 3
813
- }, 8, ["for"])) : h("", !0),
814
- e.hint || i.$slots.hint ? (l(), m(D, {
829
+ }, 8, ["for"])) : b("", !0),
830
+ e.hint || l.$slots.hint ? (a(), m(D, {
815
831
  key: 1,
816
832
  class: "dai-switch-control__hint"
817
833
  }, {
818
834
  default: c(() => [
819
- p(i.$slots, "hint", {}, () => [
820
- E(k(e.hint), 1)
835
+ p(l.$slots, "hint", {}, () => [
836
+ z(k(e.hint), 1)
821
837
  ])
822
838
  ]),
823
839
  _: 3
824
- })) : h("", !0)
840
+ })) : b("", !0)
825
841
  ]));
826
842
  }
827
- }), et = {
843
+ }), tt = {
828
844
  key: 0,
829
845
  class: "dai-btn__spinner"
830
- }, tt = { class: "dai-btn__caption" }, Ct = /* @__PURE__ */ v({
846
+ }, ot = { class: "dai-btn__caption" }, Et = /* @__PURE__ */ v({
831
847
  __name: "btn",
832
848
  props: {
833
849
  submit: { type: [Boolean, String] },
@@ -849,19 +865,19 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
849
865
  condensed: { type: Boolean }
850
866
  },
851
867
  setup(e) {
852
- const t = e, o = _(() => t.submit ? "submit" : t.reset ? "reset" : "button"), i = _(() => t.variant ? t.variant : t.plain ? "plain" : t.muted ? "muted" : t.outlined ? "outlined" : "flat"), a = _(() => t.size ? t.size : t.sm ? "small" : t.lg ? "large" : "medium");
853
- return (s, n) => (l(), m(ge(e.href ? "a" : "button"), {
868
+ const t = e, o = _(() => t.submit ? "submit" : t.reset ? "reset" : "button"), l = _(() => t.variant ? t.variant : t.plain ? "plain" : t.muted ? "muted" : t.outlined ? "outlined" : "flat"), i = _(() => t.size ? t.size : t.sm ? "small" : t.lg ? "large" : "medium");
869
+ return (r, n) => (a(), m(ge(e.href ? "a" : "button"), {
854
870
  type: e.href ? void 0 : o.value,
855
871
  form: typeof e.submit == "string" ? e.submit : void 0,
856
872
  href: e.href,
857
873
  class: w(["dai-btn", {
858
874
  [`dai-btn--${e.color}`]: e.color,
859
- "dai-btn--flat": i.value === "flat",
860
- "dai-btn--plain": i.value === "plain",
861
- "dai-btn--muted": i.value === "muted",
862
- "dai-btn--outlined": i.value === "outlined",
863
- "dai-btn--sm": a.value === "small",
864
- "dai-btn--lg": a.value === "large",
875
+ "dai-btn--flat": l.value === "flat",
876
+ "dai-btn--plain": l.value === "plain",
877
+ "dai-btn--muted": l.value === "muted",
878
+ "dai-btn--outlined": l.value === "outlined",
879
+ "dai-btn--sm": i.value === "small",
880
+ "dai-btn--lg": i.value === "large",
865
881
  "dai-btn--loading": e.loading,
866
882
  "dai-btn--block": e.block,
867
883
  "dai-btn--rounded": e.rounded,
@@ -869,7 +885,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
869
885
  }])
870
886
  }, {
871
887
  default: c(() => [
872
- e.loading ? (l(), u("span", et, [...n[0] || (n[0] = [
888
+ e.loading ? (a(), u("span", tt, [...n[0] || (n[0] = [
873
889
  d("svg", {
874
890
  xmlns: "http://www.w3.org/2000/svg",
875
891
  fill: "none",
@@ -889,17 +905,17 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
889
905
  d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
890
906
  })
891
907
  ], -1)
892
- ])])) : h("", !0),
893
- d("span", tt, [
894
- e.icon ? (l(), u("div", {
908
+ ])])) : b("", !0),
909
+ d("span", ot, [
910
+ e.icon ? (a(), u("div", {
895
911
  key: 0,
896
912
  class: w([e.icon, "dai-btn__icon"])
897
- }, null, 2)) : h("", !0),
898
- p(s.$slots, "default"),
899
- e.iconAfter ? (l(), u("div", {
913
+ }, null, 2)) : b("", !0),
914
+ p(r.$slots, "default"),
915
+ e.iconAfter ? (a(), u("div", {
900
916
  key: 1,
901
917
  class: w([e.iconAfter, "dai-btn__icon"])
902
- }, null, 2)) : h("", !0)
918
+ }, null, 2)) : b("", !0)
903
919
  ])
904
920
  ]),
905
921
  _: 3
@@ -908,12 +924,12 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
908
924
  }), zt = /* @__PURE__ */ v({
909
925
  __name: "popoverDialog",
910
926
  setup(e) {
911
- return (t, o) => (l(), m(P, {
927
+ return (t, o) => (a(), m(A, {
912
928
  "enter-from-class": "dai-popover-dialog--anim",
913
929
  "leave-to-class": "dai-popover-dialog--anim"
914
930
  }, {
915
931
  default: c(() => [
916
- V(r(ne), { class: "dai-popover-dialog" }, {
932
+ V(s(ne), { class: "dai-popover-dialog" }, {
917
933
  default: c(() => [
918
934
  p(t.$slots, "default")
919
935
  ]),
@@ -923,15 +939,15 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
923
939
  _: 3
924
940
  }));
925
941
  }
926
- }), Et = /* @__PURE__ */ v({
942
+ }), Lt = /* @__PURE__ */ v({
927
943
  __name: "menuItems",
928
944
  setup(e) {
929
- return (t, o) => (l(), m(P, {
945
+ return (t, o) => (a(), m(A, {
930
946
  "enter-from-class": "dai-menu-items--anim",
931
947
  "leave-to-class": "dai-menu-items--anim"
932
948
  }, {
933
949
  default: c(() => [
934
- V(r(se), { class: "dai-menu-items" }, {
950
+ V(s(se), { class: "dai-menu-items" }, {
935
951
  default: c(() => [
936
952
  p(t.$slots, "default")
937
953
  ]),
@@ -941,31 +957,31 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
941
957
  _: 3
942
958
  }));
943
959
  }
944
- }), ot = {
960
+ }), at = {
945
961
  key: 0,
946
962
  class: "text-secondary-400 flex-shrink-0"
947
- }, Lt = /* @__PURE__ */ v({
963
+ }, qt = /* @__PURE__ */ v({
948
964
  __name: "menuItem",
949
965
  props: {
950
966
  icon: {}
951
967
  },
952
968
  setup(e) {
953
- return (t, o) => (l(), m(r(re), { class: "dai-menu-item" }, {
954
- default: c(({ isActive: i, isSelected: a }) => [
955
- e.icon ? (l(), u("div", ot, [
969
+ return (t, o) => (a(), m(s(re), { class: "dai-menu-item" }, {
970
+ default: c(({ isActive: l, isSelected: i }) => [
971
+ e.icon ? (a(), u("div", at, [
956
972
  d("div", {
957
973
  class: w(["h-5 w-5", e.icon])
958
974
  }, null, 2)
959
- ])) : h("", !0),
975
+ ])) : b("", !0),
960
976
  p(t.$slots, "default", {
961
- isActive: i,
962
- isSelected: a
977
+ isActive: l,
978
+ isSelected: i
963
979
  })
964
980
  ]),
965
981
  _: 3
966
982
  }));
967
983
  }
968
- }), qt = /* @__PURE__ */ v({
984
+ }), Tt = /* @__PURE__ */ v({
969
985
  __name: "tab",
970
986
  props: {
971
987
  id: {},
@@ -973,7 +989,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
973
989
  value: {}
974
990
  },
975
991
  setup(e) {
976
- return (t, o) => (l(), m(r(de), {
992
+ return (t, o) => (a(), m(s(de), {
977
993
  id: e.id,
978
994
  "aria-controls": e.ariaControls,
979
995
  value: e.value,
@@ -985,25 +1001,25 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
985
1001
  _: 3
986
1002
  }, 8, ["id", "aria-controls", "value"]));
987
1003
  }
988
- }), Tt = /* @__PURE__ */ v({
1004
+ }), Pt = /* @__PURE__ */ v({
989
1005
  __name: "tabList",
990
1006
  setup(e) {
991
- const t = q("tablist"), o = q("slider"), i = N({});
992
- function a() {
1007
+ const t = L("tablist"), o = L("slider"), l = N({});
1008
+ function i() {
993
1009
  if (!o.value) return;
994
- const s = t.value?.$el;
995
- if (!s) return;
996
- const n = s.querySelector("[aria-selected=true]");
997
- n && (i.value = {
1010
+ const r = t.value?.$el;
1011
+ if (!r) return;
1012
+ const n = r.querySelector("[aria-selected=true]");
1013
+ n && (l.value = {
998
1014
  left: `${n.offsetLeft}px`,
999
- right: `${s.offsetWidth - n.offsetLeft - n.offsetWidth}px`,
1015
+ right: `${r.offsetWidth - n.offsetLeft - n.offsetWidth}px`,
1000
1016
  transition: o.value.offsetLeft > n.offsetLeft ? "left .2s, right .5s" : "left .5s, right .2s"
1001
1017
  });
1002
1018
  }
1003
- return j(() => we(a)), (s, n) => (l(), m(r(ue), {
1019
+ return I(() => we(i)), (r, n) => (a(), m(s(ue), {
1004
1020
  ref_key: "tablist",
1005
1021
  ref: t,
1006
- onClickPassive: a,
1022
+ onClickPassive: i,
1007
1023
  class: "dai-tab-list"
1008
1024
  }, {
1009
1025
  default: c(() => [
@@ -1011,14 +1027,14 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
1011
1027
  ref_key: "slider",
1012
1028
  ref: o,
1013
1029
  class: "dai-tab-list__slider",
1014
- style: U(i.value)
1030
+ style: U(l.value)
1015
1031
  }, null, 4),
1016
- p(s.$slots, "default")
1032
+ p(r.$slots, "default")
1017
1033
  ]),
1018
1034
  _: 3
1019
1035
  }, 512));
1020
1036
  }
1021
- }), at = ["id"], Pt = /* @__PURE__ */ v({
1037
+ }), lt = ["id"], At = /* @__PURE__ */ v({
1022
1038
  inheritAttrs: !1,
1023
1039
  __name: "offcanvas",
1024
1040
  props: /* @__PURE__ */ M({
@@ -1034,22 +1050,22 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
1034
1050
  }),
1035
1051
  emits: ["update:modelValue"],
1036
1052
  setup(e) {
1037
- const t = e, o = $(e, "modelValue"), i = t.id ?? L(), { classList: a } = xe(document.body, "nui-body-push");
1038
- T(o, () => {
1039
- if (!t.push || (a.splice(1), !o.value))
1053
+ const t = e, o = x(e, "modelValue"), l = t.id ?? q(), { classList: i } = xe(document.body, "nui-body-push");
1054
+ P(o, () => {
1055
+ if (!t.push || (i.splice(1), !o.value))
1040
1056
  return;
1041
1057
  let n = "nui-body-push--" + t.position;
1042
- t.lg && (n += "--lg"), t.xl && (n += "--xl"), a.push(n);
1058
+ t.lg && (n += "--lg"), t.xl && (n += "--xl"), i.push(n);
1043
1059
  });
1044
- function s(n) {
1045
- n.target.closest(`#${i}`) || t.closeOnOutsideClick && (o.value = !1);
1060
+ function r(n) {
1061
+ n.target.closest(`#${l}`) || t.closeOnOutsideClick && (o.value = !1);
1046
1062
  }
1047
- return j(() => {
1048
- window.addEventListener("click", s, { passive: !0 });
1063
+ return I(() => {
1064
+ window.addEventListener("click", r, { passive: !0 });
1049
1065
  }), K(() => {
1050
- window.removeEventListener("click", s);
1051
- }), (n, g) => (l(), m(R, { to: "body" }, [
1052
- V(P, {
1066
+ window.removeEventListener("click", r);
1067
+ }), (n, y) => (a(), m(R, { to: "body" }, [
1068
+ V(A, {
1053
1069
  appear: "",
1054
1070
  "enter-from-class": "nui-offcanvas--animate-hidden",
1055
1071
  "enter-to-class": "nui-offcanvas--animate-shown",
@@ -1059,9 +1075,9 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
1059
1075
  "leave-active-class": "ease-in-out"
1060
1076
  }, {
1061
1077
  default: c(() => [
1062
- o.value ? (l(), u("div", x({
1078
+ o.value ? (a(), u("div", $({
1063
1079
  key: 0,
1064
- id: r(i)
1080
+ id: s(l)
1065
1081
  }, n.$attrs, {
1066
1082
  class: ["nui-offcanvas", {
1067
1083
  [`nui-offcanvas--${e.position}`]: !0,
@@ -1071,48 +1087,48 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
1071
1087
  }]
1072
1088
  }), [
1073
1089
  p(n.$slots, "default")
1074
- ], 16, at)) : h("", !0)
1090
+ ], 16, lt)) : b("", !0)
1075
1091
  ]),
1076
1092
  _: 3
1077
1093
  })
1078
1094
  ]));
1079
1095
  }
1080
- }), lt = {
1096
+ }), it = {
1081
1097
  key: 0,
1082
1098
  role: "alert"
1083
- }, it = {
1099
+ }, nt = {
1084
1100
  xmlns: "http://www.w3.org/2000/svg",
1085
1101
  fill: "none",
1086
1102
  viewBox: "0 0 24 24",
1087
1103
  stroke: "currentColor"
1088
- }, nt = {
1104
+ }, st = {
1089
1105
  key: 0,
1090
1106
  "stroke-linecap": "round",
1091
1107
  "stroke-linejoin": "round",
1092
1108
  "stroke-width": "2",
1093
1109
  d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
1094
- }, st = {
1110
+ }, rt = {
1095
1111
  key: 1,
1096
1112
  "stroke-linecap": "round",
1097
1113
  "stroke-linejoin": "round",
1098
1114
  "stroke-width": "2",
1099
1115
  d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1100
- }, rt = {
1116
+ }, dt = {
1101
1117
  key: 2,
1102
1118
  "stroke-linecap": "round",
1103
1119
  "stroke-linejoin": "round",
1104
1120
  "stroke-width": "2",
1105
1121
  d: "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
1106
- }, dt = {
1122
+ }, ut = {
1107
1123
  key: 3,
1108
1124
  "stroke-linecap": "round",
1109
1125
  "stroke-linejoin": "round",
1110
1126
  "stroke-width": "2",
1111
1127
  d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1112
- }, ut = { class: "dai-notification__content" }, ct = {
1128
+ }, ct = { class: "dai-notification__content" }, ft = {
1113
1129
  key: 0,
1114
1130
  class: "dai-notification__content__detail"
1115
- }, ft = /* @__PURE__ */ v({
1131
+ }, mt = /* @__PURE__ */ v({
1116
1132
  __name: "notification",
1117
1133
  props: /* @__PURE__ */ M({
1118
1134
  color: {},
@@ -1127,34 +1143,34 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
1127
1143
  }),
1128
1144
  emits: ["update:modelValue"],
1129
1145
  setup(e) {
1130
- const t = e, o = $(e, "modelValue");
1131
- let i;
1132
- function a() {
1133
- clearTimeout(i), o.value && t.timeout && (i = setTimeout(() => o.value = !1, t.timeout));
1146
+ const t = e, o = x(e, "modelValue");
1147
+ let l;
1148
+ function i() {
1149
+ clearTimeout(l), o.value && t.timeout && (l = setTimeout(() => o.value = !1, t.timeout));
1134
1150
  }
1135
- return T(o, a, { immediate: !0 }), (s, n) => o.value ? (l(), u("div", lt, [
1151
+ return P(o, i, { immediate: !0 }), (r, n) => o.value ? (a(), u("div", it, [
1136
1152
  d("div", {
1137
1153
  class: w(["dai-notification", [`dai-notification--${e.color || "secondary"}`]])
1138
1154
  }, [
1139
- e.icon ? (l(), u("div", {
1155
+ e.icon ? (a(), u("div", {
1140
1156
  key: 0,
1141
1157
  class: w(["dai-notification__icon", [`dai-notification__icon--${e.icon}`]])
1142
1158
  }, [
1143
- (l(), u("svg", it, [
1144
- e.icon == "success" ? (l(), u("path", nt)) : e.icon == "info" ? (l(), u("path", st)) : e.icon == "warning" ? (l(), u("path", rt)) : e.icon == "danger" ? (l(), u("path", dt)) : h("", !0)
1159
+ (a(), u("svg", nt, [
1160
+ e.icon == "success" ? (a(), u("path", st)) : e.icon == "info" ? (a(), u("path", rt)) : e.icon == "warning" ? (a(), u("path", dt)) : e.icon == "danger" ? (a(), u("path", ut)) : b("", !0)
1145
1161
  ]))
1146
- ], 2)) : h("", !0),
1147
- d("div", ut, [
1162
+ ], 2)) : b("", !0),
1163
+ d("div", ct, [
1148
1164
  d("div", {
1149
1165
  class: w(["dai-notification__content__message", {
1150
1166
  "dai-notification__content__message--bold": e.detail
1151
1167
  }])
1152
1168
  }, k(e.message), 3),
1153
- e.detail ? (l(), u("div", ct, k(e.detail), 1)) : h("", !0)
1169
+ e.detail ? (a(), u("div", ft, k(e.detail), 1)) : b("", !0)
1154
1170
  ]),
1155
- e.dismissible ? (l(), u("div", {
1171
+ e.dismissible ? (a(), u("div", {
1156
1172
  key: 1,
1157
- onClick: n[0] || (n[0] = (g) => o.value = !1),
1173
+ onClick: n[0] || (n[0] = (y) => o.value = !1),
1158
1174
  class: "dai-notification__dismiss"
1159
1175
  }, [...n[1] || (n[1] = [
1160
1176
  d("svg", {
@@ -1170,11 +1186,11 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
1170
1186
  d: "M6 18L18 6M6 6l12 12"
1171
1187
  })
1172
1188
  ], -1)
1173
- ])])) : h("", !0)
1189
+ ])])) : b("", !0)
1174
1190
  ], 2)
1175
- ])) : h("", !0);
1191
+ ])) : b("", !0);
1176
1192
  }
1177
- }), At = /* @__PURE__ */ v({
1193
+ }), jt = /* @__PURE__ */ v({
1178
1194
  __name: "notificationQueue",
1179
1195
  props: /* @__PURE__ */ M({
1180
1196
  length: { default: 3 },
@@ -1188,24 +1204,24 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
1188
1204
  }),
1189
1205
  emits: ["update:queue"],
1190
1206
  setup(e) {
1191
- const t = e, o = $(e, "queue"), i = N([]);
1192
- let a = 0;
1193
- function s() {
1194
- o.value.length === 0 || i.value.length >= t.length || (i.value.push({ ...o.value[0], id: a++, show: !0 }), o.value.shift());
1207
+ const t = e, o = x(e, "queue"), l = N([]);
1208
+ let i = 0;
1209
+ function r() {
1210
+ o.value.length === 0 || l.value.length >= t.length || (l.value.push({ ...o.value[0], id: i++, show: !0 }), o.value.shift());
1195
1211
  }
1196
- function n(b) {
1212
+ function n(h) {
1197
1213
  setTimeout(() => {
1198
- i.value = i.value.filter(
1199
- (y) => y.id !== b
1200
- ), s();
1214
+ l.value = l.value.filter(
1215
+ (g) => g.id !== h
1216
+ ), r();
1201
1217
  }, 200);
1202
1218
  }
1203
- T(o, s, { immediate: !0, deep: !0 });
1204
- const g = _(() => {
1205
- const b = ["dai-notification-queue__item--anim"];
1206
- return t.positionX === "right" ? b.push("dai-notification-queue__item--anim-x-right") : t.positionX === "left" ? b.push("dai-notification-queue__item--anim-x-left") : t.positionX === "center" && t.positionY === "top" ? b.push("dai-notification-queue__item--anim-y-top") : t.positionX === "center" && t.positionY === "bottom" && b.push("dai-notification-queue__item--anim-y-bottom"), b.join(" ");
1219
+ P(o, r, { immediate: !0, deep: !0 });
1220
+ const y = _(() => {
1221
+ const h = ["dai-notification-queue__item--anim"];
1222
+ return t.positionX === "right" ? h.push("dai-notification-queue__item--anim-x-right") : t.positionX === "left" ? h.push("dai-notification-queue__item--anim-x-left") : t.positionX === "center" && t.positionY === "top" ? h.push("dai-notification-queue__item--anim-y-top") : t.positionX === "center" && t.positionY === "bottom" && h.push("dai-notification-queue__item--anim-y-bottom"), h.join(" ");
1207
1223
  });
1208
- return (b, y) => (l(), u("div", {
1224
+ return (h, g) => (a(), u("div", {
1209
1225
  class: w(["dai-notification-queue", {
1210
1226
  "dai-notification-queue--fixed": e.position == "fixed",
1211
1227
  "dai-notification-queue--absolute": e.position == "absolute",
@@ -1218,13 +1234,13 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
1218
1234
  }, [
1219
1235
  V(ke, {
1220
1236
  appear: "",
1221
- "enter-from-class": g.value,
1237
+ "enter-from-class": y.value,
1222
1238
  "enter-active-class": "dai-notification-queue__item--anim-in",
1223
- "leave-to-class": g.value,
1239
+ "leave-to-class": y.value,
1224
1240
  "leave-active-class": "dai-notification-queue__item--anim-out"
1225
1241
  }, {
1226
1242
  default: c(() => [
1227
- (l(!0), u(I, null, X(i.value, (f) => (l(), m(ft, {
1243
+ (a(!0), u(j, null, X(l.value, (f) => (a(), m(mt, {
1228
1244
  key: f.id,
1229
1245
  color: f.color,
1230
1246
  icon: f.type,
@@ -1240,7 +1256,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
1240
1256
  }, 8, ["enter-from-class", "leave-to-class"])
1241
1257
  ], 2));
1242
1258
  }
1243
- }), mt = ["aria-valuenow"], It = /* @__PURE__ */ v({
1259
+ }), vt = ["aria-valuenow"], It = /* @__PURE__ */ v({
1244
1260
  __name: "progressbar",
1245
1261
  props: {
1246
1262
  value: {},
@@ -1250,7 +1266,7 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
1250
1266
  },
1251
1267
  setup(e) {
1252
1268
  const t = e, o = _(() => t.value === void 0);
1253
- return (i, a) => (l(), u("div", {
1269
+ return (l, i) => (a(), u("div", {
1254
1270
  class: w(["overflow-hidden text-xs w-full flex-1", {
1255
1271
  rounded: e.rounded,
1256
1272
  "bg-primary-200": e.color == "primary",
@@ -1276,12 +1292,12 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
1276
1292
  "progress-infinite": o.value
1277
1293
  }, "h-full shadow-none relative text-center whitespace-nowrap text-white justify-center"])
1278
1294
  }, null, 6)
1279
- ], 14, mt));
1295
+ ], 14, vt));
1280
1296
  }
1281
- }), vt = {
1297
+ }), pt = {
1282
1298
  key: 0,
1283
1299
  class: "z-50"
1284
- }, pt = { class: "fixed inset-0 overflow-y-auto" }, ht = { class: "modal__dialog" }, jt = /* @__PURE__ */ v({
1300
+ }, ht = { class: "fixed inset-0 overflow-y-auto" }, bt = { class: "modal__dialog" }, Ot = /* @__PURE__ */ v({
1285
1301
  inheritAttrs: !1,
1286
1302
  __name: "modal",
1287
1303
  props: {
@@ -1290,35 +1306,35 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
1290
1306
  },
1291
1307
  emits: ["update:modelValue"],
1292
1308
  setup(e) {
1293
- const t = $(e, "modelValue");
1309
+ const t = x(e, "modelValue");
1294
1310
  function o() {
1295
1311
  t.value = !1;
1296
1312
  }
1297
- return T(t, (i) => {
1298
- i ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
1299
- }), (i, a) => (l(), m(R, { to: "body" }, [
1300
- V(P, {
1313
+ return P(t, (l) => {
1314
+ l ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
1315
+ }), (l, i) => (a(), m(R, { to: "body" }, [
1316
+ V(A, {
1301
1317
  appear: "",
1302
1318
  name: "modal",
1303
1319
  duration: { enter: 300, leave: 200 }
1304
1320
  }, {
1305
1321
  default: c(() => [
1306
- t.value ? (l(), u("div", vt, [
1307
- a[0] || (a[0] = d("div", {
1322
+ t.value ? (a(), u("div", pt, [
1323
+ i[0] || (i[0] = d("div", {
1308
1324
  class: "modal__backdrop fixed inset-0 bg-primary-50/60 backdrop-blur-sm",
1309
1325
  "aria-hidden": "true"
1310
1326
  }, null, -1)),
1311
- d("div", pt, [
1327
+ d("div", ht, [
1312
1328
  d("div", {
1313
1329
  onClick: $e(o, ["self"]),
1314
1330
  class: "min-h-full flex items-center justify-center p-4 sm:p-6"
1315
1331
  }, [
1316
- d("div", ht, [
1317
- p(i.$slots, "default", { close: o })
1332
+ d("div", bt, [
1333
+ p(l.$slots, "default", { close: o })
1318
1334
  ])
1319
1335
  ])
1320
1336
  ])
1321
- ])) : h("", !0)
1337
+ ])) : b("", !0)
1322
1338
  ]),
1323
1339
  _: 3
1324
1340
  })
@@ -1326,32 +1342,32 @@ const Y = /* @__PURE__ */ Ie(je, [["render", Fe]]), Se = ["id", "type", "pattern
1326
1342
  }
1327
1343
  });
1328
1344
  export {
1329
- Ct as Btn,
1330
- Bt as Checkbox,
1331
- Ee as Combobox,
1332
- qe as ComboboxButton,
1333
- wt as ComboboxInput,
1334
- Ae as ComboboxOption,
1335
- Te as ComboboxOptions,
1336
- kt as Input,
1337
- St as Menu,
1338
- Lt as MenuItem,
1339
- Et as MenuItems,
1340
- jt as Modal,
1341
- ft as Notification,
1342
- At as NotificationQueue,
1343
- Pt as Offcanvas,
1344
- Ut as Popover,
1345
+ Et as Btn,
1346
+ Vt as Checkbox,
1347
+ Le as Combobox,
1348
+ Te as ComboboxButton,
1349
+ kt as ComboboxInput,
1350
+ je as ComboboxOption,
1351
+ Pe as ComboboxOptions,
1352
+ $t as Input,
1353
+ Ut as Menu,
1354
+ qt as MenuItem,
1355
+ Lt as MenuItems,
1356
+ Ot as Modal,
1357
+ mt as Notification,
1358
+ jt as NotificationQueue,
1359
+ At as Offcanvas,
1360
+ Nt as Popover,
1345
1361
  zt as PopoverDialog,
1346
1362
  It as Progressbar,
1347
- Vt as Radio,
1348
- $t as Select,
1349
- xt as Selectbox,
1350
- Mt as Switch,
1351
- qt as Tab,
1352
- Nt as TabContainer,
1353
- Tt as TabList,
1354
- Xt as TabPanel,
1355
- _t as Textarea,
1363
+ Mt as Radio,
1364
+ xt as Select,
1365
+ _t as Selectbox,
1366
+ Ct as Switch,
1367
+ Tt as Tab,
1368
+ Xt as TabContainer,
1369
+ Pt as TabList,
1370
+ Dt as TabPanel,
1371
+ Bt as Textarea,
1356
1372
  xe as useClassList
1357
1373
  };