@defaultusr/dai-ui 1.1.17 → 1.2.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.
package/dist/main.js CHANGED
@@ -1,50 +1,50 @@
1
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 h, 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 he, vModelText as pe, 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
- import './assets/main.css';function xe(e, ...t) {
2
+ import { Menu as Nt, Popover as Ut, TabContainer as Xt, TabPanel as Dt } from "vue-composable-ui";
3
+ import { reactive as ce, watch as A, onUnmounted as R, defineComponent as v, createElementBlock as u, openBlock as i, renderSlot as p, createTextVNode as z, toDisplayString as k, normalizeClass as w, createBlock as h, createCommentVNode as y, createElementVNode as d, computed as _, createVNode as V, normalizeProps as fe, guardReactiveProps as me, withCtx as c, Transition as P, mergeModels as C, useModel as B, useId as q, useTemplateRef as L, mergeProps as $, unref as n, inject as ve, Fragment as I, ref as U, onMounted as O, withDirectives as X, renderList as D, vModelSelect as he, vModelText as pe, vModelRadio as be, resolveDynamicComponent as ye, nextTick as ge, normalizeStyle as N, Teleport as Z, TransitionGroup as we, withModifiers as ke } from "vue";
4
+ import './assets/main.css';function $e(e, ...t) {
5
5
  let o = [];
6
6
  const l = ce(t);
7
- function i() {
7
+ function a() {
8
8
  l.length && (e.classList.add(...l), o = [...l]);
9
9
  }
10
- function r() {
10
+ function s() {
11
11
  e.classList.remove(...o);
12
12
  }
13
- return P(
13
+ return A(
14
14
  l,
15
15
  () => {
16
- r(), i();
16
+ s(), a();
17
17
  },
18
18
  { immediate: !0 }
19
- ), K(r), {
19
+ ), R(s), {
20
20
  classList: l
21
21
  };
22
22
  }
23
- const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
23
+ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
24
24
  __name: "label",
25
25
  props: {
26
26
  text: {}
27
27
  },
28
28
  setup(e) {
29
- return (t, o) => (a(), u("label", _e, [
30
- h(t.$slots, "default", {}, () => [
29
+ return (t, o) => (i(), u("label", xe, [
30
+ p(t.$slots, "default", {}, () => [
31
31
  z(k(e.text), 1)
32
32
  ])
33
33
  ]));
34
34
  }
35
- }), Be = { class: "dai-hint" }, D = /* @__PURE__ */ v({
35
+ }), _e = { class: "dai-hint" }, H = /* @__PURE__ */ v({
36
36
  __name: "hint",
37
37
  props: {
38
38
  text: {}
39
39
  },
40
40
  setup(e) {
41
- return (t, o) => (a(), u("div", Be, [
42
- h(t.$slots, "default", {}, () => [
41
+ return (t, o) => (i(), u("div", _e, [
42
+ p(t.$slots, "default", {}, () => [
43
43
  z(k(e.text), 1)
44
44
  ])
45
45
  ]));
46
46
  }
47
- }), Ve = { class: "dai-form-control__input-group__box" }, Me = /* @__PURE__ */ v({
47
+ }), Be = { class: "dai-form-control__input-group__box" }, Ve = /* @__PURE__ */ v({
48
48
  inheritAttrs: !1,
49
49
  __name: "inputGroup",
50
50
  props: {
@@ -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) => (a(), u("div", {
60
+ return (t, o) => (i(), 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 ? (a(), m(F, {
72
+ e.label ? (i(), h(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"])) : b("", !0),
78
- d("div", Ve, [
79
- h(t.$slots, "default")
77
+ }, null, 8, ["text", "for"])) : y("", !0),
78
+ d("div", Be, [
79
+ p(t.$slots, "default")
80
80
  ])
81
81
  ], 2));
82
82
  }
83
- }), Ce = { class: "dai-form-control__container" }, Ee = {
83
+ }), Me = { class: "dai-form-control__container" }, Ce = {
84
84
  key: 0,
85
85
  class: "dai-form-control__validation-message",
86
86
  role: "alert"
@@ -105,39 +105,39 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
105
105
  },
106
106
  setup(e) {
107
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", {
108
+ return (a, s) => (i(), 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
112
  "dai-form-control--lg": l.value === "large"
113
113
  }])
114
114
  }, [
115
- e.label && e.labelPosition !== "inside" ? (a(), m(F, {
115
+ e.label && e.labelPosition !== "inside" ? (i(), h(F, {
116
116
  key: 0,
117
117
  for: e.labelFor,
118
118
  text: e.label
119
- }, null, 8, ["for", "text"])) : b("", !0),
120
- d("div", Ce, [
121
- V(Me, fe(me({
119
+ }, null, 8, ["for", "text"])) : y("", !0),
120
+ d("div", Me, [
121
+ V(Ve, fe(me({
122
122
  ...t,
123
123
  label: e.labelPosition === "inside" ? e.label : void 0,
124
124
  variant: o.value,
125
125
  size: l.value
126
126
  })), {
127
127
  default: c(() => [
128
- h(i.$slots, "default")
128
+ p(a.$slots, "default")
129
129
  ]),
130
130
  _: 3
131
131
  }, 16),
132
- e.hint ? (a(), m(D, {
132
+ e.hint ? (i(), h(H, {
133
133
  key: 0,
134
134
  text: e.hint,
135
135
  class: "dai-form-control__hint"
136
- }, null, 8, ["text"])) : b("", !0),
137
- V(A, { name: "dai-form-control__validation-message-transition" }, {
136
+ }, null, 8, ["text"])) : y("", !0),
137
+ V(P, { name: "dai-form-control__validation-message-transition" }, {
138
138
  default: c(() => [
139
- e.validationMessage ? (a(), u("div", Ee, [
140
- r[0] || (r[0] = d("svg", {
139
+ e.validationMessage ? (i(), u("div", Ce, [
140
+ s[0] || (s[0] = d("svg", {
141
141
  xmlns: "http://www.w3.org/2000/svg",
142
142
  viewBox: "0 0 256 256",
143
143
  class: ""
@@ -148,17 +148,17 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
148
148
  })
149
149
  ], -1)),
150
150
  z(" " + k(e.validationMessage), 1)
151
- ])) : b("", !0)
151
+ ])) : y("", !0)
152
152
  ]),
153
153
  _: 1
154
154
  })
155
155
  ])
156
156
  ], 2));
157
157
  }
158
- }), ze = ["value"], Le = /* @__PURE__ */ v({
158
+ }), Ee = ["value"], ze = /* @__PURE__ */ v({
159
159
  inheritAttrs: !1,
160
160
  __name: "combobox",
161
- props: /* @__PURE__ */ M({
161
+ props: /* @__PURE__ */ C({
162
162
  id: {},
163
163
  validators: { default: () => [] },
164
164
  showValidationError: { type: Boolean, default: !1 },
@@ -182,31 +182,31 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
182
182
  }),
183
183
  emits: ["update:modelValue"],
184
184
  setup(e) {
185
- const t = e, o = x(e, "modelValue"), l = t.id || q(), i = L("formElement"), { isValid: r, validationMessage: n } = T(
186
- i,
185
+ const t = e, o = B(e, "modelValue"), l = t.id || q(), a = L("formElement"), { isValid: s, validationMessage: r } = T(
186
+ a,
187
187
  t.validators,
188
188
  t.showValidationError
189
189
  );
190
- return (y, p) => (a(), m(S, $(t, {
191
- labelFor: s(l),
192
- validationMessage: e.showValidationError ? "" : s(n),
193
- invalid: !s(r),
194
- class: y.$attrs.class
190
+ return (g, b) => (i(), h(S, $(t, {
191
+ labelFor: n(l),
192
+ validationMessage: e.showValidationError ? "" : n(r),
193
+ invalid: !n(s),
194
+ class: g.$attrs.class
195
195
  }), {
196
196
  default: c(() => [
197
- V(s(te), $({ ...y.$attrs, class: void 0, required: void 0 }, {
198
- id: s(l),
197
+ V(n(te), $({ ...g.$attrs, class: void 0, required: void 0 }, {
198
+ id: n(l),
199
199
  modelValue: o.value,
200
- "onUpdate:modelValue": p[0] || (p[0] = (g) => o.value = g)
200
+ "onUpdate:modelValue": b[0] || (b[0] = (f) => o.value = f)
201
201
  }), {
202
202
  default: c(() => [
203
203
  d("input", $({
204
204
  ref_key: "formElement",
205
- ref: i,
205
+ ref: a,
206
206
  type: "text",
207
207
  value: o.value
208
- }, { required: y.$attrs.required }, { class: "dai-combobox__stab-input" }), null, 16, ze),
209
- h(y.$slots, "default")
208
+ }, { required: g.$attrs.required }, { class: "dai-combobox__stab-input" }), null, 16, Ee),
209
+ p(g.$slots, "default")
210
210
  ]),
211
211
  _: 3
212
212
  }, 16, ["id", "modelValue"])
@@ -217,17 +217,17 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
217
217
  }), kt = /* @__PURE__ */ v({
218
218
  __name: "comboboxInput",
219
219
  setup(e) {
220
- return (t, o) => (a(), m(s(oe), { class: "dai-form-control__input-group__control" }, {
220
+ return (t, o) => (i(), h(n(oe), { class: "dai-form-control__input-group__control" }, {
221
221
  default: c(() => [
222
- h(t.$slots, "default")
222
+ p(t.$slots, "default")
223
223
  ]),
224
224
  _: 3
225
225
  }));
226
226
  }
227
- }), qe = {
227
+ }), Le = {
228
228
  key: 0,
229
229
  class: "dai-form-control__input-group__control__placeholder"
230
- }, Te = /* @__PURE__ */ v({
230
+ }, qe = /* @__PURE__ */ v({
231
231
  __name: "comboboxButton",
232
232
  props: {
233
233
  placeholder: {}
@@ -239,17 +239,17 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
239
239
  function o() {
240
240
  t.isOpen.value ? t.close({ focus: !0 }) : t.open({ focus: !1 });
241
241
  }
242
- return (l, i) => (a(), u("button", $(s(t).activatorAttrs.value, {
243
- onKeydown: i[0] || (i[0] = (r) => s(t).activatorOnKeyDown(r)),
242
+ return (l, a) => (i(), u("button", $(n(t).activatorAttrs.value, {
243
+ onKeydown: a[0] || (a[0] = (s) => n(t).activatorOnKeyDown(s)),
244
244
  onClick: o,
245
245
  type: "button",
246
246
  class: "dai-form-control__input-group__control dai-combobox-btn"
247
247
  }), [
248
- h(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", {
248
+ p(l.$slots, "default", {}, () => [
249
+ n(t).displayValue.value ? (i(), u(I, { key: 1 }, [
250
+ z(k(n(t).displayValue), 1)
251
+ ], 64)) : (i(), u("span", Le, k(e.placeholder || "Select..."), 1)),
252
+ a[1] || (a[1] = d("svg", {
253
253
  class: "dai-combobox-btn__chevron",
254
254
  role: "presentation",
255
255
  xmlns: "http://www.w3.org/2000/svg",
@@ -265,17 +265,17 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
265
265
  ])
266
266
  ], 16));
267
267
  }
268
- }), Pe = /* @__PURE__ */ v({
268
+ }), Te = /* @__PURE__ */ v({
269
269
  __name: "comboboxOptions",
270
270
  setup(e) {
271
- return (t, o) => (a(), m(A, {
271
+ return (t, o) => (i(), h(P, {
272
272
  "enter-from-class": "dai-combobox-options--anim",
273
273
  "leave-to-class": "dai-combobox-options--anim"
274
274
  }, {
275
275
  default: c(() => [
276
- V(s(le), { class: "dai-combobox-options" }, {
276
+ V(n(le), { class: "dai-combobox-options" }, {
277
277
  default: c(() => [
278
- h(t.$slots, "default")
278
+ p(t.$slots, "default")
279
279
  ]),
280
280
  _: 3
281
281
  })
@@ -288,56 +288,56 @@ const _e = { class: "dai-label" }, F = /* @__PURE__ */ v({
288
288
  class: "dai-combobox-option__check",
289
289
  xmlns: "http://www.w3.org/2000/svg",
290
290
  viewBox: "0 0 16 16"
291
- }, je = /* @__PURE__ */ v({
291
+ }, Pe = /* @__PURE__ */ v({
292
292
  __name: "comboboxOption",
293
293
  props: {
294
294
  value: {}
295
295
  },
296
296
  setup(e) {
297
- return (t, o) => (a(), m(s(ie), {
297
+ return (t, o) => (i(), h(n(ie), {
298
298
  value: e.value,
299
299
  class: "dai-combobox-option"
300
300
  }, {
301
- default: c(({ isActive: l, isSelected: i }) => [
302
- h(t.$slots, "default", {
301
+ default: c(({ isActive: l, isSelected: a }) => [
302
+ p(t.$slots, "default", {
303
303
  isActive: l,
304
- isSelected: i
304
+ isSelected: a
305
305
  }),
306
- i ? (a(), u("svg", Ae, [...o[0] || (o[0] = [
306
+ a ? (i(), u("svg", Ae, [...o[0] || (o[0] = [
307
307
  d("path", {
308
308
  fill: "currentColor",
309
309
  "fill-rule": "evenodd",
310
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",
311
311
  "clip-rule": "evenodd"
312
312
  }, null, -1)
313
- ])])) : b("", !0)
313
+ ])])) : y("", !0)
314
314
  ]),
315
315
  _: 3
316
316
  }, 8, ["value"]));
317
317
  }
318
- }), Ie = (e, t) => {
318
+ }), je = (e, t) => {
319
319
  const o = e.__vccOpts || e;
320
- for (const [l, i] of t)
321
- o[l] = i;
320
+ for (const [l, a] of t)
321
+ o[l] = a;
322
322
  return o;
323
- }, Oe = {}, Fe = {
323
+ }, Ie = {}, Oe = {
324
324
  type: "button",
325
325
  class: "dai-form-control__input-group__addon dai-form-control__input-group__addon--btn",
326
326
  tabindex: "-1",
327
327
  "aria-hidden": "true"
328
328
  };
329
- function Se(e, t) {
330
- return a(), u("button", Fe, [
331
- h(e.$slots, "default")
329
+ function Fe(e, t) {
330
+ return i(), u("button", Oe, [
331
+ p(e.$slots, "default")
332
332
  ]);
333
333
  }
334
- const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern", "title", "autocomplete", "value"], Ne = {
334
+ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern", "title", "autocomplete", "value"], Ne = {
335
335
  key: 0,
336
336
  xmlns: "http://www.w3.org/2000/svg",
337
337
  fill: "none",
338
338
  viewBox: "0 0 24 24",
339
339
  stroke: "currentColor"
340
- }, Xe = {
340
+ }, Ue = {
341
341
  key: 1,
342
342
  xmlns: "http://www.w3.org/2000/svg",
343
343
  fill: "none",
@@ -346,7 +346,7 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
346
346
  }, $t = /* @__PURE__ */ v({
347
347
  inheritAttrs: !1,
348
348
  __name: "input",
349
- props: /* @__PURE__ */ M({
349
+ props: /* @__PURE__ */ C({
350
350
  id: {},
351
351
  type: { default: "text" },
352
352
  mask: {},
@@ -378,79 +378,79 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
378
378
  }),
379
379
  emits: ["update:modelValue", "update:files"],
380
380
  setup(e) {
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", {
382
- set(B) {
383
- return n.value && (n.value.files = B), B;
381
+ const t = e, o = t.id || q(), l = _(() => typeof t.autocomplete == "string" ? t.autocomplete : t.autocomplete ? "on" : "off"), a = B(e, "modelValue"), s = B(e, "files", {
382
+ set(M) {
383
+ return r.value && (r.value.files = M), M;
384
384
  }
385
- }), n = L("formElement"), { isValid: y, validationMessage: p, validate: g } = T(
386
- n,
385
+ }), r = L("formElement"), { isValid: g, validationMessage: b, validate: f } = T(
386
+ r,
387
387
  t.validators,
388
388
  t.showValidationError
389
- ), f = N(!1);
390
- P(i, () => {
391
- r.value = n.value?.files || null;
389
+ ), m = U(!1);
390
+ A(a, () => {
391
+ s.value = r.value?.files || null;
392
392
  });
393
- let C;
394
- const Z = _(() => t.type === "password" ? f.value ? "text" : "password" : t.type), H = _(() => t.mask ? t.mask : t.type === "tel" ? {
393
+ let x;
394
+ const j = _(() => t.type === "password" ? m.value ? "text" : "password" : t.type), Y = _(() => t.mask ? t.mask : t.type === "tel" ? {
395
395
  mask: "{+7} (000) 000-00-00"
396
396
  } : t.mask), G = _(() => t.pattern ? t.pattern : t.type === "tel" ? "^\\+7 \\(9\\d{2}\\) \\d{3}-\\d{2}-\\d{2}" : t.pattern), Q = _(() => t.title ? t.title : t.type === "tel" ? "+7 (999) 888-77-66" : t.title);
397
397
  function W() {
398
- f.value = !f.value;
398
+ m.value = !m.value;
399
399
  }
400
400
  function J() {
401
- i.value = "";
401
+ a.value = "";
402
402
  }
403
- function ee(B) {
404
- if (C)
403
+ function ee(M) {
404
+ if (x)
405
405
  return;
406
- const { value: E } = B.target;
407
- i.value = E;
406
+ const { value: E } = M.target;
407
+ a.value = E;
408
408
  }
409
- return I(() => {
410
- H.value && import("imask").then((B) => {
411
- C = B.default(
412
- n.value,
413
- H.value
414
- ), C.on("accept", () => {
415
- i.value = C.value;
409
+ return O(() => {
410
+ Y.value && import("imask").then((M) => {
411
+ x = M.default(
412
+ r.value,
413
+ Y.value
414
+ ), x.on("accept", () => {
415
+ a.value = x.value;
416
416
  });
417
417
  });
418
- }), (B, E) => (a(), m(S, $(t, {
419
- "label-for": s(o),
420
- "validation-message": e.showValidationError ? "" : s(p),
421
- invalid: t.invalid || !s(y),
422
- class: B.$attrs.class
418
+ }), (M, E) => (i(), h(S, $(t, {
419
+ "label-for": n(o),
420
+ "validation-message": e.showValidationError ? "" : n(b),
421
+ invalid: t.invalid || !n(g),
422
+ class: M.$attrs.class
423
423
  }), {
424
424
  default: c(() => [
425
- h(B.$slots, "prepend"),
425
+ p(M.$slots, "prepend"),
426
426
  d("input", $({
427
427
  ref_key: "formElement",
428
- ref: n
429
- }, { ...B.$attrs, class: void 0 }, {
430
- id: s(o),
431
- type: Z.value,
428
+ ref: r
429
+ }, { ...M.$attrs, class: void 0 }, {
430
+ id: n(o),
431
+ type: j.value,
432
432
  pattern: G.value,
433
433
  title: Q.value,
434
434
  autocomplete: l.value,
435
- value: i.value,
435
+ value: a.value,
436
436
  onInputPassive: ee,
437
- onKeyupPassive: E[0] || (E[0] = (yt) => !s(y) && s(g)()),
437
+ onKeyupPassive: E[0] || (E[0] = (yt) => !n(g) && n(f)()),
438
438
  class: "dai-form-control__input-group__control dai-form-control__input"
439
- }), null, 16, Ue),
440
- h(B.$slots, "append"),
441
- t.type === "password" && i.value ? (a(), m(Y, {
439
+ }), null, 16, Se),
440
+ p(M.$slots, "append"),
441
+ t.type === "password" && a.value ? (i(), h(K, {
442
442
  key: 0,
443
443
  onClick: W
444
444
  }, {
445
445
  default: c(() => [
446
- f.value ? (a(), u("svg", Xe, [...E[2] || (E[2] = [
446
+ m.value ? (i(), u("svg", Ue, [...E[2] || (E[2] = [
447
447
  d("path", {
448
448
  "stroke-linecap": "round",
449
449
  "stroke-linejoin": "round",
450
450
  "stroke-width": "2",
451
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"
452
452
  }, null, -1)
453
- ])])) : (a(), u("svg", Ne, [...E[1] || (E[1] = [
453
+ ])])) : (i(), u("svg", Ne, [...E[1] || (E[1] = [
454
454
  d("path", {
455
455
  "stroke-linecap": "round",
456
456
  "stroke-linejoin": "round",
@@ -466,8 +466,8 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
466
466
  ])]))
467
467
  ]),
468
468
  _: 1
469
- })) : b("", !0),
470
- e.clearable && i.value && !t.disabled ? (a(), m(Y, {
469
+ })) : y("", !0),
470
+ e.clearable && a.value && !t.disabled ? (i(), h(K, {
471
471
  key: 1,
472
472
  onClick: J
473
473
  }, {
@@ -487,15 +487,15 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
487
487
  ], -1)
488
488
  ])]),
489
489
  _: 1
490
- })) : b("", !0)
490
+ })) : y("", !0)
491
491
  ]),
492
492
  _: 3
493
493
  }, 16, ["label-for", "validation-message", "invalid", "class"]));
494
494
  }
495
- }), De = ["id"], He = ["value"], xt = /* @__PURE__ */ v({
495
+ }), Xe = ["id"], De = ["value"], xt = /* @__PURE__ */ v({
496
496
  inheritAttrs: !1,
497
497
  __name: "select",
498
- props: /* @__PURE__ */ M({
498
+ props: /* @__PURE__ */ C({
499
499
  id: {},
500
500
  options: {},
501
501
  optionText: { default: "text" },
@@ -522,36 +522,36 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
522
522
  }),
523
523
  emits: ["update:modelValue"],
524
524
  setup(e) {
525
- const t = e, o = t.id || q(), l = x(e, "modelValue"), i = L("formElement"), { isValid: r, validationMessage: n, validate: y } = T(
526
- i,
525
+ const t = e, o = t.id || q(), l = B(e, "modelValue"), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } = T(
526
+ a,
527
527
  t.validators,
528
528
  t.showValidationError
529
529
  );
530
- return (p, 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: p.$attrs.class
530
+ return (b, f) => (i(), h(S, $(t, {
531
+ "label-for": n(o),
532
+ "validation-message": e.showValidationError ? "" : n(r),
533
+ invalid: t.invalid || !n(s),
534
+ class: b.$attrs.class
535
535
  }), {
536
536
  default: c(() => [
537
- O(d("select", $({
537
+ X(d("select", $({
538
538
  ref_key: "formElement",
539
- ref: i
540
- }, { ...p.$attrs, class: void 0 }, {
541
- id: s(o),
542
- "onUpdate:modelValue": g[0] || (g[0] = (f) => l.value = f),
539
+ ref: a
540
+ }, { ...b.$attrs, class: void 0 }, {
541
+ id: n(o),
542
+ "onUpdate:modelValue": f[0] || (f[0] = (m) => l.value = m),
543
543
  class: "dai-form-control__input-group__control dai-select"
544
544
  }), [
545
- h(p.$slots, "default", {}, () => [
546
- (a(!0), u(j, null, X(e.options, (f) => (a(), u("option", {
547
- value: f[e.optionValue],
548
- key: f[e.optionValue]
549
- }, k(f[e.optionText]), 9, He))), 128))
545
+ p(b.$slots, "default", {}, () => [
546
+ (i(!0), u(I, null, D(e.options, (m) => (i(), u("option", {
547
+ value: m[e.optionValue],
548
+ key: m[e.optionValue]
549
+ }, k(m[e.optionText]), 9, De))), 128))
550
550
  ])
551
- ], 16, De), [
551
+ ], 16, Xe), [
552
552
  [he, l.value]
553
553
  ]),
554
- g[1] || (g[1] = d("svg", {
554
+ f[1] || (f[1] = d("svg", {
555
555
  class: "dai-select__chevron",
556
556
  xmlns: "http://www.w3.org/2000/svg",
557
557
  viewBox: "0 0 16 16"
@@ -569,7 +569,7 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
569
569
  }
570
570
  }), _t = /* @__PURE__ */ v({
571
571
  __name: "selectbox",
572
- props: /* @__PURE__ */ M({
572
+ props: /* @__PURE__ */ C({
573
573
  options: {},
574
574
  optionText: { default: "text" },
575
575
  optionValue: { default: "value" },
@@ -597,22 +597,22 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
597
597
  }),
598
598
  emits: ["update:modelValue"],
599
599
  setup(e) {
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] || "",
600
+ const t = e, o = B(e, "modelValue");
601
+ return (l, a) => (i(), h(n(ze), $(t, {
602
+ displayValue: (s) => e.options.find((r) => r[e.optionValue] === s)?.[e.optionText] || "",
603
603
  modelValue: o.value,
604
- "onUpdate:modelValue": i[0] || (i[0] = (r) => o.value = r)
604
+ "onUpdate:modelValue": a[0] || (a[0] = (s) => o.value = s)
605
605
  }), {
606
606
  default: c(() => [
607
- V(s(Te), { placeholder: e.placeholder }, null, 8, ["placeholder"]),
608
- V(s(Pe), null, {
607
+ V(n(qe), { placeholder: e.placeholder }, null, 8, ["placeholder"]),
608
+ V(n(Te), null, {
609
609
  default: c(() => [
610
- (a(!0), u(j, null, X(e.options, (r) => (a(), m(s(je), {
611
- key: r[e.optionValue],
612
- value: r[e.optionValue]
610
+ (i(!0), u(I, null, D(e.options, (s) => (i(), h(n(Pe), {
611
+ key: s[e.optionValue],
612
+ value: s[e.optionValue]
613
613
  }, {
614
614
  default: c(() => [
615
- z(k(r[e.optionText]), 1)
615
+ z(k(s[e.optionText]), 1)
616
616
  ]),
617
617
  _: 2
618
618
  }, 1032, ["value"]))), 128))
@@ -623,10 +623,10 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
623
623
  _: 1
624
624
  }, 16, ["displayValue", "modelValue"]));
625
625
  }
626
- }), Ye = ["id"], Bt = /* @__PURE__ */ v({
626
+ }), He = ["id"], Bt = /* @__PURE__ */ v({
627
627
  inheritAttrs: !1,
628
628
  __name: "textarea",
629
- props: /* @__PURE__ */ M({
629
+ props: /* @__PURE__ */ C({
630
630
  id: {},
631
631
  autosize: { type: Boolean },
632
632
  validators: {},
@@ -637,46 +637,50 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
637
637
  }),
638
638
  emits: ["update:modelValue"],
639
639
  setup(e) {
640
- const t = e, o = t.id || q(), l = x(e, "modelValue"), i = L("formElement"), { isValid: r, validationMessage: n, validate: y } = T(
641
- i,
640
+ const t = e, o = t.id || q(), l = B(e, "modelValue"), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } = T(
641
+ a,
642
642
  t.validators,
643
643
  t.showValidationError
644
644
  );
645
- function p() {
645
+ function b() {
646
646
  if (!t.autosize) return;
647
- const g = i.value, f = g.offsetHeight - g.clientHeight;
648
- g.style.height = "auto", g.style.height = `${g.scrollHeight + f}px`;
647
+ const f = a.value, m = f.offsetHeight - f.clientHeight;
648
+ f.style.height = "auto", f.style.height = `${f.scrollHeight + m}px`;
649
649
  }
650
- return I(p), (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
650
+ return O(b), (f, m) => (i(), h(S, $(t, {
651
+ "label-for": n(o),
652
+ "validation-message": e.showValidationError ? "" : n(r),
653
+ invalid: !n(s),
654
+ class: f.$attrs.class
655
655
  }), {
656
656
  default: c(() => [
657
- O(d("textarea", $({
657
+ X(d("textarea", $({
658
658
  ref_key: "formElement",
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: p,
659
+ ref: a
660
+ }, { ...f.$attrs, class: void 0 }, {
661
+ id: n(o),
662
+ "onUpdate:modelValue": m[0] || (m[0] = (x) => l.value = x),
663
+ onKeyupPassive: m[1] || (m[1] = (x) => !n(s) && n(g)()),
664
+ onInputPassive: b,
665
665
  class: ["form-control__textarea", {
666
666
  "form-control__textarea--autosize": e.autosize
667
667
  }]
668
- }), null, 16, Ye), [
668
+ }), null, 16, He), [
669
669
  [pe, l.value]
670
670
  ])
671
671
  ]),
672
672
  _: 1
673
673
  }, 16, ["label-for", "validation-message", "invalid", "class"]));
674
674
  }
675
- }), Ke = ["id"], Vt = /* @__PURE__ */ v({
675
+ }), Ye = ["checked", "id"], Ke = {
676
+ key: 0,
677
+ class: "dai-checkbox-control__label-container"
678
+ }, Vt = /* @__PURE__ */ v({
676
679
  inheritAttrs: !1,
677
680
  __name: "checkbox",
678
- props: /* @__PURE__ */ M({
681
+ props: /* @__PURE__ */ C({
679
682
  id: {},
683
+ value: {},
680
684
  color: { default: "primary" },
681
685
  size: { default: "small" },
682
686
  validators: {},
@@ -684,58 +688,70 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
684
688
  label: {},
685
689
  hint: {}
686
690
  }, {
687
- modelValue: { type: Boolean },
691
+ modelValue: { type: [Boolean, Array] },
688
692
  modelModifiers: {}
689
693
  }),
690
694
  emits: ["update:modelValue"],
691
695
  setup(e) {
692
- const t = e, o = t.id || q(), l = x(e, "modelValue"), i = L("formElement"), { isValid: r } = T(
693
- i,
696
+ const t = e, o = t.id || q(), l = t.value || o, a = B(e, "modelValue"), s = L("formElement"), { isValid: r } = T(
697
+ s,
694
698
  t.validators,
695
699
  t.showValidationError
696
- );
697
- return (n, y) => (a(), u("div", {
698
- class: w(["dai-checkbox-control", n.$attrs.class])
700
+ ), g = _(() => Array.isArray(a.value) ? a.value.includes(l) : a.value);
701
+ function b(f) {
702
+ const x = f.target.checked;
703
+ if (Array.isArray(a.value))
704
+ if (x)
705
+ a.value.push(l);
706
+ else {
707
+ const j = a.value.indexOf(l);
708
+ j > -1 && a.value.splice(j, 1);
709
+ }
710
+ else
711
+ a.value = x;
712
+ }
713
+ return (f, m) => (i(), u("div", {
714
+ class: w(["dai-checkbox-control", f.$attrs.class])
699
715
  }, [
700
- O(d("input", $({
716
+ d("input", $({
701
717
  ref_key: "formElement",
702
- ref: i,
703
- "onUpdate:modelValue": y[0] || (y[0] = (p) => l.value = p)
704
- }, { ...n.$attrs, class: "" }, {
705
- id: s(o),
718
+ ref: s
719
+ }, { ...f.$attrs, class: "" }, {
720
+ checked: g.value,
721
+ onChange: b,
722
+ id: n(o),
706
723
  type: "checkbox",
707
724
  class: ["dai-checkbox", {
708
725
  [`dai-checkbox--${e.color}`]: e.color,
709
- "dai-checkbox--invalid": !s(r),
726
+ "dai-checkbox--invalid": !n(r),
710
727
  "dai-checkbox--md": e.size === "medium",
711
728
  "dai-checkbox--lg": e.size === "large"
712
729
  }]
713
- }), null, 16, Ke), [
714
- [be, l.value]
715
- ]),
716
- e.label || n.$slots.default ? (a(), m(F, {
717
- key: 0,
718
- for: s(o),
719
- class: "dai-checkbox-control__label"
720
- }, {
721
- default: c(() => [
722
- h(n.$slots, "default", {}, () => [
723
- z(k(e.label), 1)
724
- ])
725
- ]),
726
- _: 3
727
- }, 8, ["for"])) : b("", !0),
728
- e.hint || n.$slots.hint ? (a(), m(D, {
730
+ }), null, 16, Ye),
731
+ e.label || f.$slots.default ? (i(), u("div", Ke, [
732
+ V(F, {
733
+ for: n(o),
734
+ class: "dai-checkbox-control__label"
735
+ }, {
736
+ default: c(() => [
737
+ p(f.$slots, "default", {}, () => [
738
+ z(k(e.label), 1)
739
+ ])
740
+ ]),
741
+ _: 3
742
+ }, 8, ["for"])
743
+ ])) : y("", !0),
744
+ e.hint || f.$slots.hint ? (i(), h(H, {
729
745
  key: 1,
730
746
  class: "dai-checkbox-control__hint"
731
747
  }, {
732
748
  default: c(() => [
733
- h(n.$slots, "hint", {}, () => [
749
+ p(f.$slots, "hint", {}, () => [
734
750
  z(k(e.hint), 1)
735
751
  ])
736
752
  ]),
737
753
  _: 3
738
- })) : b("", !0)
754
+ })) : y("", !0)
739
755
  ], 2));
740
756
  }
741
757
  }), Re = { class: "flex items-center h-5" }, Ze = ["value", "id"], Ge = {
@@ -747,7 +763,7 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
747
763
  }, Mt = /* @__PURE__ */ v({
748
764
  inheritAttrs: !1,
749
765
  __name: "radio",
750
- props: /* @__PURE__ */ M({
766
+ props: /* @__PURE__ */ C({
751
767
  value: {},
752
768
  color: { default: "primary" },
753
769
  validators: {},
@@ -760,43 +776,43 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
760
776
  }),
761
777
  emits: ["update:modelValue"],
762
778
  setup(e) {
763
- const t = e, o = x(e, "modelValue"), l = q(), i = L("formElement"), { isValid: r } = T(
764
- i,
779
+ const t = e, o = B(e, "modelValue"), l = q(), a = L("formElement"), { isValid: s } = T(
780
+ a,
765
781
  t.validators,
766
782
  t.showValidationError
767
783
  );
768
- return (n, y) => (a(), u("div", {
769
- class: w(["flex items-start gap-3", n.$attrs.class])
784
+ return (r, g) => (i(), u("div", {
785
+ class: w(["flex items-start gap-3", r.$attrs.class])
770
786
  }, [
771
787
  d("div", Re, [
772
- O(d("input", $({
788
+ X(d("input", $({
773
789
  type: "radio",
774
790
  ref_key: "formElement",
775
- ref: i,
776
- "onUpdate:modelValue": y[0] || (y[0] = (p) => o.value = p)
777
- }, { ...n.$attrs, class: "" }, {
791
+ ref: a,
792
+ "onUpdate:modelValue": g[0] || (g[0] = (b) => o.value = b)
793
+ }, { ...r.$attrs, class: "" }, {
778
794
  value: e.value,
779
- id: s(l),
795
+ id: n(l),
780
796
  class: ["radio", {
781
797
  [`radio--${e.color}`]: e.color,
782
- "radio--invalid": !s(r)
798
+ "radio--invalid": !n(s)
783
799
  }]
784
800
  }), null, 16, Ze), [
785
- [ye, o.value]
801
+ [be, o.value]
786
802
  ])
787
803
  ]),
788
- e.label ? (a(), u("div", Ge, [
804
+ e.label ? (i(), u("div", Ge, [
789
805
  d("label", {
790
- for: s(l),
806
+ for: n(l),
791
807
  class: "font-medium select-none cursor-pointer"
792
808
  }, k(e.label), 9, Qe),
793
- e.hint ? (a(), u("p", We, k(e.hint), 1)) : b("", !0)
794
- ])) : b("", !0)
809
+ e.hint ? (i(), u("p", We, k(e.hint), 1)) : y("", !0)
810
+ ])) : y("", !0)
795
811
  ], 2));
796
812
  }
797
813
  }), Je = { class: "dai-switch-control" }, et = ["id", "aria-checked"], Ct = /* @__PURE__ */ v({
798
814
  __name: "switch",
799
- props: /* @__PURE__ */ M({
815
+ props: /* @__PURE__ */ C({
800
816
  label: {},
801
817
  hint: {}
802
818
  }, {
@@ -805,44 +821,44 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
805
821
  }),
806
822
  emits: ["update:modelValue"],
807
823
  setup(e) {
808
- const t = x(e, "modelValue"), o = q();
809
- return (l, i) => (a(), u("div", Je, [
824
+ const t = B(e, "modelValue"), o = q();
825
+ return (l, a) => (i(), u("div", Je, [
810
826
  d("button", {
811
- onClick: i[0] || (i[0] = (r) => t.value = !t.value),
812
- id: s(o),
827
+ onClick: a[0] || (a[0] = (s) => t.value = !t.value),
828
+ id: n(o),
813
829
  "aria-checked": t.value,
814
830
  role: "switch",
815
831
  type: "button",
816
832
  tabindex: "0",
817
833
  class: w(["dai-switch", [t.value ? "dai-switch--on" : "dai-switch--off"]])
818
- }, [...i[1] || (i[1] = [
834
+ }, [...a[1] || (a[1] = [
819
835
  d("div", {
820
836
  "aria-hidden": "true",
821
837
  class: "dai-switch__thumb"
822
838
  }, null, -1)
823
839
  ])], 10, et),
824
- e.label || l.$slots.default ? (a(), m(F, {
840
+ e.label || l.$slots.default ? (i(), h(F, {
825
841
  key: 0,
826
- for: s(o)
842
+ for: n(o)
827
843
  }, {
828
844
  default: c(() => [
829
- h(l.$slots, "default", {}, () => [
845
+ p(l.$slots, "default", {}, () => [
830
846
  z(k(e.label), 1)
831
847
  ])
832
848
  ]),
833
849
  _: 3
834
- }, 8, ["for"])) : b("", !0),
835
- e.hint || l.$slots.hint ? (a(), m(D, {
850
+ }, 8, ["for"])) : y("", !0),
851
+ e.hint || l.$slots.hint ? (i(), h(H, {
836
852
  key: 1,
837
853
  class: "dai-switch-control__hint"
838
854
  }, {
839
855
  default: c(() => [
840
- h(l.$slots, "hint", {}, () => [
856
+ p(l.$slots, "hint", {}, () => [
841
857
  z(k(e.hint), 1)
842
858
  ])
843
859
  ]),
844
860
  _: 3
845
- })) : b("", !0)
861
+ })) : y("", !0)
846
862
  ]));
847
863
  }
848
864
  }), tt = {
@@ -870,8 +886,8 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
870
886
  condensed: { type: Boolean }
871
887
  },
872
888
  setup(e) {
873
- 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");
874
- return (r, n) => (a(), m(ge(e.href ? "a" : "button"), {
889
+ 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"), a = _(() => t.size ? t.size : t.sm ? "small" : t.lg ? "large" : "medium");
890
+ return (s, r) => (i(), h(ye(e.href ? "a" : "button"), {
875
891
  type: e.href ? void 0 : o.value,
876
892
  form: typeof e.submit == "string" ? e.submit : void 0,
877
893
  href: e.href,
@@ -881,8 +897,8 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
881
897
  "dai-btn--plain": l.value === "plain",
882
898
  "dai-btn--muted": l.value === "muted",
883
899
  "dai-btn--outlined": l.value === "outlined",
884
- "dai-btn--sm": i.value === "small",
885
- "dai-btn--lg": i.value === "large",
900
+ "dai-btn--sm": a.value === "small",
901
+ "dai-btn--lg": a.value === "large",
886
902
  "dai-btn--loading": e.loading,
887
903
  "dai-btn--block": e.block,
888
904
  "dai-btn--rounded": e.rounded,
@@ -890,7 +906,7 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
890
906
  }])
891
907
  }, {
892
908
  default: c(() => [
893
- e.loading ? (a(), u("span", tt, [...n[0] || (n[0] = [
909
+ e.loading ? (i(), u("span", tt, [...r[0] || (r[0] = [
894
910
  d("svg", {
895
911
  xmlns: "http://www.w3.org/2000/svg",
896
912
  fill: "none",
@@ -910,17 +926,17 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
910
926
  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"
911
927
  })
912
928
  ], -1)
913
- ])])) : b("", !0),
929
+ ])])) : y("", !0),
914
930
  d("span", ot, [
915
- e.icon ? (a(), u("div", {
931
+ e.icon ? (i(), u("div", {
916
932
  key: 0,
917
933
  class: w([e.icon, "dai-btn__icon"])
918
- }, null, 2)) : b("", !0),
919
- h(r.$slots, "default"),
920
- e.iconAfter ? (a(), u("div", {
934
+ }, null, 2)) : y("", !0),
935
+ p(s.$slots, "default"),
936
+ e.iconAfter ? (i(), u("div", {
921
937
  key: 1,
922
938
  class: w([e.iconAfter, "dai-btn__icon"])
923
- }, null, 2)) : b("", !0)
939
+ }, null, 2)) : y("", !0)
924
940
  ])
925
941
  ]),
926
942
  _: 3
@@ -929,14 +945,14 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
929
945
  }), zt = /* @__PURE__ */ v({
930
946
  __name: "popoverDialog",
931
947
  setup(e) {
932
- return (t, o) => (a(), m(A, {
948
+ return (t, o) => (i(), h(P, {
933
949
  "enter-from-class": "dai-popover-dialog--anim",
934
950
  "leave-to-class": "dai-popover-dialog--anim"
935
951
  }, {
936
952
  default: c(() => [
937
- V(s(ne), { class: "dai-popover-dialog" }, {
953
+ V(n(ne), { class: "dai-popover-dialog" }, {
938
954
  default: c(() => [
939
- h(t.$slots, "default")
955
+ p(t.$slots, "default")
940
956
  ]),
941
957
  _: 3
942
958
  })
@@ -947,14 +963,14 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
947
963
  }), Lt = /* @__PURE__ */ v({
948
964
  __name: "menuItems",
949
965
  setup(e) {
950
- return (t, o) => (a(), m(A, {
966
+ return (t, o) => (i(), h(P, {
951
967
  "enter-from-class": "dai-menu-items--anim",
952
968
  "leave-to-class": "dai-menu-items--anim"
953
969
  }, {
954
970
  default: c(() => [
955
- V(s(se), { class: "dai-menu-items" }, {
971
+ V(n(se), { class: "dai-menu-items" }, {
956
972
  default: c(() => [
957
- h(t.$slots, "default")
973
+ p(t.$slots, "default")
958
974
  ]),
959
975
  _: 3
960
976
  })
@@ -971,16 +987,16 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
971
987
  icon: {}
972
988
  },
973
989
  setup(e) {
974
- return (t, o) => (a(), m(s(re), { class: "dai-menu-item" }, {
975
- default: c(({ isActive: l, isSelected: i }) => [
976
- e.icon ? (a(), u("div", at, [
990
+ return (t, o) => (i(), h(n(re), { class: "dai-menu-item" }, {
991
+ default: c(({ isActive: l, isSelected: a }) => [
992
+ e.icon ? (i(), u("div", at, [
977
993
  d("div", {
978
994
  class: w(["h-5 w-5", e.icon])
979
995
  }, null, 2)
980
- ])) : b("", !0),
981
- h(t.$slots, "default", {
996
+ ])) : y("", !0),
997
+ p(t.$slots, "default", {
982
998
  isActive: l,
983
- isSelected: i
999
+ isSelected: a
984
1000
  })
985
1001
  ]),
986
1002
  _: 3
@@ -994,37 +1010,37 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
994
1010
  value: {}
995
1011
  },
996
1012
  setup(e) {
997
- return (t, o) => (a(), m(s(de), {
1013
+ return (t, o) => (i(), h(n(de), {
998
1014
  id: e.id,
999
1015
  "aria-controls": e.ariaControls,
1000
1016
  value: e.value,
1001
1017
  class: "dai-tab"
1002
1018
  }, {
1003
1019
  default: c(() => [
1004
- h(t.$slots, "default")
1020
+ p(t.$slots, "default")
1005
1021
  ]),
1006
1022
  _: 3
1007
1023
  }, 8, ["id", "aria-controls", "value"]));
1008
1024
  }
1009
- }), Pt = /* @__PURE__ */ v({
1025
+ }), At = /* @__PURE__ */ v({
1010
1026
  __name: "tabList",
1011
1027
  setup(e) {
1012
- const t = L("tablist"), o = L("slider"), l = N({});
1013
- function i() {
1028
+ const t = L("tablist"), o = L("slider"), l = U({});
1029
+ function a() {
1014
1030
  if (!o.value) return;
1015
- const r = t.value?.$el;
1016
- if (!r) return;
1017
- const n = r.querySelector("[aria-selected=true]");
1018
- n && (l.value = {
1019
- left: `${n.offsetLeft}px`,
1020
- right: `${r.offsetWidth - n.offsetLeft - n.offsetWidth}px`,
1021
- transition: o.value.offsetLeft > n.offsetLeft ? "left .2s, right .5s" : "left .5s, right .2s"
1031
+ const s = t.value?.$el;
1032
+ if (!s) return;
1033
+ const r = s.querySelector("[aria-selected=true]");
1034
+ r && (l.value = {
1035
+ left: `${r.offsetLeft}px`,
1036
+ right: `${s.offsetWidth - r.offsetLeft - r.offsetWidth}px`,
1037
+ transition: o.value.offsetLeft > r.offsetLeft ? "left .2s, right .5s" : "left .5s, right .2s"
1022
1038
  });
1023
1039
  }
1024
- return I(() => we(i)), (r, n) => (a(), m(s(ue), {
1040
+ return O(() => ge(a)), (s, r) => (i(), h(n(ue), {
1025
1041
  ref_key: "tablist",
1026
1042
  ref: t,
1027
- onClickPassive: i,
1043
+ onClickPassive: a,
1028
1044
  class: "dai-tab-list"
1029
1045
  }, {
1030
1046
  default: c(() => [
@@ -1032,17 +1048,17 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
1032
1048
  ref_key: "slider",
1033
1049
  ref: o,
1034
1050
  class: "dai-tab-list__slider",
1035
- style: U(l.value)
1051
+ style: N(l.value)
1036
1052
  }, null, 4),
1037
- h(r.$slots, "default")
1053
+ p(s.$slots, "default")
1038
1054
  ]),
1039
1055
  _: 3
1040
1056
  }, 512));
1041
1057
  }
1042
- }), lt = ["id"], At = /* @__PURE__ */ v({
1058
+ }), lt = ["id"], Pt = /* @__PURE__ */ v({
1043
1059
  inheritAttrs: !1,
1044
1060
  __name: "offcanvas",
1045
- props: /* @__PURE__ */ M({
1061
+ props: /* @__PURE__ */ C({
1046
1062
  id: {},
1047
1063
  position: { default: "right" },
1048
1064
  push: { type: Boolean },
@@ -1055,22 +1071,22 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
1055
1071
  }),
1056
1072
  emits: ["update:modelValue"],
1057
1073
  setup(e) {
1058
- const t = e, o = x(e, "modelValue"), l = t.id ?? q(), { classList: i } = xe(document.body, "nui-body-push");
1059
- P(o, () => {
1060
- if (!t.push || (i.splice(1), !o.value))
1074
+ const t = e, o = B(e, "modelValue"), l = t.id ?? q(), { classList: a } = $e(document.body, "nui-body-push");
1075
+ A(o, () => {
1076
+ if (!t.push || (a.splice(1), !o.value))
1061
1077
  return;
1062
- let n = "nui-body-push--" + t.position;
1063
- t.lg && (n += "--lg"), t.xl && (n += "--xl"), i.push(n);
1078
+ let r = "nui-body-push--" + t.position;
1079
+ t.lg && (r += "--lg"), t.xl && (r += "--xl"), a.push(r);
1064
1080
  });
1065
- function r(n) {
1066
- n.target.closest(`#${l}`) || t.closeOnOutsideClick && (o.value = !1);
1081
+ function s(r) {
1082
+ r.target.closest(`#${l}`) || t.closeOnOutsideClick && (o.value = !1);
1067
1083
  }
1068
- return I(() => {
1069
- window.addEventListener("click", r, { passive: !0 });
1070
- }), K(() => {
1071
- window.removeEventListener("click", r);
1072
- }), (n, y) => (a(), m(R, { to: "body" }, [
1073
- V(A, {
1084
+ return O(() => {
1085
+ window.addEventListener("click", s, { passive: !0 });
1086
+ }), R(() => {
1087
+ window.removeEventListener("click", s);
1088
+ }), (r, g) => (i(), h(Z, { to: "body" }, [
1089
+ V(P, {
1074
1090
  appear: "",
1075
1091
  "enter-from-class": "nui-offcanvas--animate-hidden",
1076
1092
  "enter-to-class": "nui-offcanvas--animate-shown",
@@ -1080,10 +1096,10 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
1080
1096
  "leave-active-class": "ease-in-out"
1081
1097
  }, {
1082
1098
  default: c(() => [
1083
- o.value ? (a(), u("div", $({
1099
+ o.value ? (i(), u("div", $({
1084
1100
  key: 0,
1085
- id: s(l)
1086
- }, n.$attrs, {
1101
+ id: n(l)
1102
+ }, r.$attrs, {
1087
1103
  class: ["nui-offcanvas", {
1088
1104
  [`nui-offcanvas--${e.position}`]: !0,
1089
1105
  "nui-offcanvas--shadow": !e.push,
@@ -1091,8 +1107,8 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
1091
1107
  "nui-offcanvas--xl": e.xl
1092
1108
  }]
1093
1109
  }), [
1094
- h(n.$slots, "default")
1095
- ], 16, lt)) : b("", !0)
1110
+ p(r.$slots, "default")
1111
+ ], 16, lt)) : y("", !0)
1096
1112
  ]),
1097
1113
  _: 3
1098
1114
  })
@@ -1135,7 +1151,7 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
1135
1151
  class: "dai-notification__content__detail"
1136
1152
  }, mt = /* @__PURE__ */ v({
1137
1153
  __name: "notification",
1138
- props: /* @__PURE__ */ M({
1154
+ props: /* @__PURE__ */ C({
1139
1155
  color: {},
1140
1156
  icon: {},
1141
1157
  message: {},
@@ -1148,36 +1164,36 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
1148
1164
  }),
1149
1165
  emits: ["update:modelValue"],
1150
1166
  setup(e) {
1151
- const t = e, o = x(e, "modelValue");
1167
+ const t = e, o = B(e, "modelValue");
1152
1168
  let l;
1153
- function i() {
1169
+ function a() {
1154
1170
  clearTimeout(l), o.value && t.timeout && (l = setTimeout(() => o.value = !1, t.timeout));
1155
1171
  }
1156
- return P(o, i, { immediate: !0 }), (r, n) => o.value ? (a(), u("div", it, [
1172
+ return A(o, a, { immediate: !0 }), (s, r) => o.value ? (i(), u("div", it, [
1157
1173
  d("div", {
1158
1174
  class: w(["dai-notification", [`dai-notification--${e.color || "secondary"}`]])
1159
1175
  }, [
1160
- e.icon ? (a(), u("div", {
1176
+ e.icon ? (i(), u("div", {
1161
1177
  key: 0,
1162
1178
  class: w(["dai-notification__icon", [`dai-notification__icon--${e.icon}`]])
1163
1179
  }, [
1164
- (a(), u("svg", nt, [
1165
- 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)
1180
+ (i(), u("svg", nt, [
1181
+ e.icon == "success" ? (i(), u("path", st)) : e.icon == "info" ? (i(), u("path", rt)) : e.icon == "warning" ? (i(), u("path", dt)) : e.icon == "danger" ? (i(), u("path", ut)) : y("", !0)
1166
1182
  ]))
1167
- ], 2)) : b("", !0),
1183
+ ], 2)) : y("", !0),
1168
1184
  d("div", ct, [
1169
1185
  d("div", {
1170
1186
  class: w(["dai-notification__content__message", {
1171
1187
  "dai-notification__content__message--bold": e.detail
1172
1188
  }])
1173
1189
  }, k(e.message), 3),
1174
- e.detail ? (a(), u("div", ft, k(e.detail), 1)) : b("", !0)
1190
+ e.detail ? (i(), u("div", ft, k(e.detail), 1)) : y("", !0)
1175
1191
  ]),
1176
- e.dismissible ? (a(), u("div", {
1192
+ e.dismissible ? (i(), u("div", {
1177
1193
  key: 1,
1178
- onClick: n[0] || (n[0] = (y) => o.value = !1),
1194
+ onClick: r[0] || (r[0] = (g) => o.value = !1),
1179
1195
  class: "dai-notification__dismiss"
1180
- }, [...n[1] || (n[1] = [
1196
+ }, [...r[1] || (r[1] = [
1181
1197
  d("svg", {
1182
1198
  xmlns: "http://www.w3.org/2000/svg",
1183
1199
  fill: "none",
@@ -1191,13 +1207,13 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
1191
1207
  d: "M6 18L18 6M6 6l12 12"
1192
1208
  })
1193
1209
  ], -1)
1194
- ])])) : b("", !0)
1210
+ ])])) : y("", !0)
1195
1211
  ], 2)
1196
- ])) : b("", !0);
1212
+ ])) : y("", !0);
1197
1213
  }
1198
1214
  }), jt = /* @__PURE__ */ v({
1199
1215
  __name: "notificationQueue",
1200
- props: /* @__PURE__ */ M({
1216
+ props: /* @__PURE__ */ C({
1201
1217
  length: { default: 3 },
1202
1218
  timeout: { default: 4e3 },
1203
1219
  position: { default: "fixed" },
@@ -1209,24 +1225,24 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
1209
1225
  }),
1210
1226
  emits: ["update:queue"],
1211
1227
  setup(e) {
1212
- const t = e, o = x(e, "queue"), l = N([]);
1213
- let i = 0;
1214
- function r() {
1215
- o.value.length === 0 || l.value.length >= t.length || (l.value.push({ ...o.value[0], id: i++, show: !0 }), o.value.shift());
1228
+ const t = e, o = B(e, "queue"), l = U([]);
1229
+ let a = 0;
1230
+ function s() {
1231
+ o.value.length === 0 || l.value.length >= t.length || (l.value.push({ ...o.value[0], id: a++, show: !0 }), o.value.shift());
1216
1232
  }
1217
- function n(p) {
1233
+ function r(b) {
1218
1234
  setTimeout(() => {
1219
1235
  l.value = l.value.filter(
1220
- (g) => g.id !== p
1221
- ), r();
1236
+ (f) => f.id !== b
1237
+ ), s();
1222
1238
  }, 200);
1223
1239
  }
1224
- P(o, r, { immediate: !0, deep: !0 });
1225
- const y = _(() => {
1226
- const p = ["dai-notification-queue__item--anim"];
1227
- return t.positionX === "right" ? p.push("dai-notification-queue__item--anim-x-right") : t.positionX === "left" ? p.push("dai-notification-queue__item--anim-x-left") : t.positionX === "center" && t.positionY === "top" ? p.push("dai-notification-queue__item--anim-y-top") : t.positionX === "center" && t.positionY === "bottom" && p.push("dai-notification-queue__item--anim-y-bottom"), p.join(" ");
1240
+ A(o, s, { immediate: !0, deep: !0 });
1241
+ const g = _(() => {
1242
+ const b = ["dai-notification-queue__item--anim"];
1243
+ 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(" ");
1228
1244
  });
1229
- return (p, g) => (a(), u("div", {
1245
+ return (b, f) => (i(), u("div", {
1230
1246
  class: w(["dai-notification-queue", {
1231
1247
  "dai-notification-queue--fixed": e.position == "fixed",
1232
1248
  "dai-notification-queue--absolute": e.position == "absolute",
@@ -1237,23 +1253,23 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
1237
1253
  "dai-notification-queue--x-right": e.positionX == "right"
1238
1254
  }])
1239
1255
  }, [
1240
- V(ke, {
1256
+ V(we, {
1241
1257
  appear: "",
1242
- "enter-from-class": y.value,
1258
+ "enter-from-class": g.value,
1243
1259
  "enter-active-class": "dai-notification-queue__item--anim-in",
1244
- "leave-to-class": y.value,
1260
+ "leave-to-class": g.value,
1245
1261
  "leave-active-class": "dai-notification-queue__item--anim-out"
1246
1262
  }, {
1247
1263
  default: c(() => [
1248
- (a(!0), u(j, null, X(l.value, (f) => (a(), m(mt, {
1249
- key: f.id,
1250
- color: f.color,
1251
- icon: f.type,
1252
- message: f.message,
1253
- detail: f.detail,
1254
- timeout: f.timeout ?? e.timeout,
1255
- modelValue: f.show,
1256
- "onUpdate:modelValue": [(C) => f.show = C, (C) => n(f.id)],
1264
+ (i(!0), u(I, null, D(l.value, (m) => (i(), h(mt, {
1265
+ key: m.id,
1266
+ color: m.color,
1267
+ icon: m.type,
1268
+ message: m.message,
1269
+ detail: m.detail,
1270
+ timeout: m.timeout ?? e.timeout,
1271
+ modelValue: m.show,
1272
+ "onUpdate:modelValue": [(x) => m.show = x, (x) => r(m.id)],
1257
1273
  class: "dai-notification-queue__item"
1258
1274
  }, null, 8, ["color", "icon", "message", "detail", "timeout", "modelValue", "onUpdate:modelValue"]))), 128))
1259
1275
  ]),
@@ -1271,7 +1287,7 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
1271
1287
  },
1272
1288
  setup(e) {
1273
1289
  const t = e, o = _(() => t.value === void 0);
1274
- return (l, i) => (a(), u("div", {
1290
+ return (l, a) => (i(), u("div", {
1275
1291
  class: w(["overflow-hidden text-xs w-full flex-1", {
1276
1292
  rounded: e.rounded,
1277
1293
  "bg-primary-200": e.color == "primary",
@@ -1280,14 +1296,14 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
1280
1296
  "bg-warning-200": e.color == "warning",
1281
1297
  "bg-danger-200": e.color == "danger"
1282
1298
  }]),
1283
- style: U({ height: e.height + "px" }),
1299
+ style: N({ height: e.height + "px" }),
1284
1300
  role: "progressbar",
1285
1301
  "aria-valuemin": "0",
1286
1302
  "aria-valuemax": "100",
1287
1303
  "aria-valuenow": e.value
1288
1304
  }, [
1289
1305
  d("div", {
1290
- style: U(`width:${e.value}%`),
1306
+ style: N(`width:${e.value}%`),
1291
1307
  class: w([{
1292
1308
  "bg-primary-500": e.color == "primary",
1293
1309
  "bg-success-500": e.color == "success",
@@ -1311,35 +1327,35 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
1311
1327
  },
1312
1328
  emits: ["update:modelValue"],
1313
1329
  setup(e) {
1314
- const t = x(e, "modelValue");
1330
+ const t = B(e, "modelValue");
1315
1331
  function o() {
1316
1332
  t.value = !1;
1317
1333
  }
1318
- return P(t, (l) => {
1334
+ return A(t, (l) => {
1319
1335
  l ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
1320
- }), (l, i) => (a(), m(R, { to: "body" }, [
1321
- V(A, {
1336
+ }), (l, a) => (i(), h(Z, { to: "body" }, [
1337
+ V(P, {
1322
1338
  appear: "",
1323
1339
  name: "modal",
1324
1340
  duration: { enter: 300, leave: 200 }
1325
1341
  }, {
1326
1342
  default: c(() => [
1327
- t.value ? (a(), u("div", ht, [
1328
- i[0] || (i[0] = d("div", {
1343
+ t.value ? (i(), u("div", ht, [
1344
+ a[0] || (a[0] = d("div", {
1329
1345
  class: "modal__backdrop fixed inset-0 bg-primary-50/60 backdrop-blur-sm",
1330
1346
  "aria-hidden": "true"
1331
1347
  }, null, -1)),
1332
1348
  d("div", pt, [
1333
1349
  d("div", {
1334
- onClick: $e(o, ["self"]),
1350
+ onClick: ke(o, ["self"]),
1335
1351
  class: "min-h-full flex items-center justify-center p-4 sm:p-6"
1336
1352
  }, [
1337
1353
  d("div", bt, [
1338
- h(l.$slots, "default", { close: o })
1354
+ p(l.$slots, "default", { close: o })
1339
1355
  ])
1340
1356
  ])
1341
1357
  ])
1342
- ])) : b("", !0)
1358
+ ])) : y("", !0)
1343
1359
  ]),
1344
1360
  _: 3
1345
1361
  })
@@ -1349,22 +1365,22 @@ const Y = /* @__PURE__ */ Ie(Oe, [["render", Se]]), Ue = ["id", "type", "pattern
1349
1365
  export {
1350
1366
  Et as Btn,
1351
1367
  Vt as Checkbox,
1352
- Le as Combobox,
1353
- Te as ComboboxButton,
1368
+ ze as Combobox,
1369
+ qe as ComboboxButton,
1354
1370
  kt as ComboboxInput,
1355
- je as ComboboxOption,
1356
- Pe as ComboboxOptions,
1357
- D as Hint,
1371
+ Pe as ComboboxOption,
1372
+ Te as ComboboxOptions,
1373
+ H as Hint,
1358
1374
  $t as Input,
1359
1375
  F as Label,
1360
- Ut as Menu,
1376
+ Nt as Menu,
1361
1377
  qt as MenuItem,
1362
1378
  Lt as MenuItems,
1363
1379
  Ot as Modal,
1364
1380
  mt as Notification,
1365
1381
  jt as NotificationQueue,
1366
- At as Offcanvas,
1367
- Nt as Popover,
1382
+ Pt as Offcanvas,
1383
+ Ut as Popover,
1368
1384
  zt as PopoverDialog,
1369
1385
  It as Progressbar,
1370
1386
  Mt as Radio,
@@ -1373,8 +1389,8 @@ export {
1373
1389
  Ct as Switch,
1374
1390
  Tt as Tab,
1375
1391
  Xt as TabContainer,
1376
- Pt as TabList,
1392
+ At as TabList,
1377
1393
  Dt as TabPanel,
1378
1394
  Bt as Textarea,
1379
- xe as useClassList
1395
+ $e as useClassList
1380
1396
  };