@defaultusr/dai-ui 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/README.md +5 -0
  2. package/dist/assets/main.css +1 -0
  3. package/dist/chunks/index.W-qQIppj.js +2383 -0
  4. package/dist/main.js +1286 -0
  5. package/dist/nuxt.js +44 -0
  6. package/dist/types/components/btn.vue.d.ts +33 -0
  7. package/dist/types/components/checkbox.vue.d.ts +19 -0
  8. package/dist/types/components/combobox/combobox.vue.d.ts +20 -0
  9. package/dist/types/components/combobox/comboboxInput.vue.d.ts +2 -0
  10. package/dist/types/components/combobox/comboboxOption.vue.d.ts +18 -0
  11. package/dist/types/components/combobox/comboboxOptions.vue.d.ts +12 -0
  12. package/dist/types/components/formControl/btn.vue.d.ts +12 -0
  13. package/dist/types/components/formControl/formControl.vue.d.ts +37 -0
  14. package/dist/types/components/formControl/inputGroup.vue.d.ts +23 -0
  15. package/dist/types/components/formControl/label.vue.d.ts +15 -0
  16. package/dist/types/components/formControl.vue.d.ts +38 -0
  17. package/dist/types/components/input.vue.d.ts +38 -0
  18. package/dist/types/components/menu/menuItem.vue.d.ts +18 -0
  19. package/dist/types/components/menu/menuItems.vue.d.ts +12 -0
  20. package/dist/types/components/modal.vue.d.ts +22 -0
  21. package/dist/types/components/notifications/notification.vue.d.ts +20 -0
  22. package/dist/types/components/notifications/notificationQueue.vue.d.ts +30 -0
  23. package/dist/types/components/offcanvas.vue.d.ts +30 -0
  24. package/dist/types/components/popoverDialog.vue.d.ts +12 -0
  25. package/dist/types/components/progressbar.vue.d.ts +12 -0
  26. package/dist/types/components/radio.vue.d.ts +20 -0
  27. package/dist/types/components/select.vue.d.ts +27 -0
  28. package/dist/types/components/switch.vue.d.ts +13 -0
  29. package/dist/types/components/tabs/tab.vue.d.ts +17 -0
  30. package/dist/types/components/tabs/tabList.vue.d.ts +12 -0
  31. package/dist/types/components/textarea.vue.d.ts +16 -0
  32. package/dist/types/composables/classList.d.ts +3 -0
  33. package/dist/types/main.d.ts +24 -0
  34. package/dist/types/nuxt.d.ts +2 -0
  35. package/dist/types/unocss.preset.d.ts +3 -0
  36. package/dist/unocss.preset.js +133 -0
  37. package/package.json +78 -0
package/dist/main.js ADDED
@@ -0,0 +1,1286 @@
1
+ import { useFormControl as S, PopoverDialog as ee, Combobox as oe, ComboboxInput as te, ComboboxOptions as ae, ComboboxOption as le, MenuItems as se, MenuItem as ne, Tab as ie, TabList as re } from "vue-composable-ui";
2
+ import { Menu as Ho, Popover as Fo, TabContainer as Ro, TabPanel as Go } from "vue-composable-ui";
3
+ import { reactive as de, watch as T, onUnmounted as q, defineComponent as f, computed as B, createBlock as h, openBlock as s, resolveDynamicComponent as ue, normalizeClass as g, withCtx as v, createElementBlock as d, createCommentVNode as p, createElementVNode as r, renderSlot as y, createTextVNode as U, toDisplayString as _, useId as z, unref as c, createVNode as M, Transition as A, mergeModels as I, useModel as w, useTemplateRef as L, ref as N, onMounted as j, mergeProps as C, withDirectives as P, vModelText as ce, Fragment as Y, renderList as D, vModelSelect as pe, vModelCheckbox as me, vModelRadio as fe, nextTick as ve, normalizeStyle as O, Teleport as H, TransitionGroup as he, withModifiers as be } from "vue";
4
+ import './assets/main.css';function ye(n, ...e) {
5
+ let a = [];
6
+ const t = de(e);
7
+ function o() {
8
+ t.length && (n.classList.add(...t), a = [...t]);
9
+ }
10
+ function l() {
11
+ n.classList.remove(...a);
12
+ }
13
+ return T(
14
+ t,
15
+ () => {
16
+ l(), o();
17
+ },
18
+ { immediate: !0 }
19
+ ), q(l), {
20
+ classList: t
21
+ };
22
+ }
23
+ const ge = {
24
+ key: 0,
25
+ class: "dai-btn__spinner"
26
+ }, ke = { class: "dai-btn__caption" }, $o = /* @__PURE__ */ f({
27
+ __name: "btn",
28
+ props: {
29
+ submit: { type: [Boolean, String] },
30
+ reset: { type: Boolean },
31
+ href: {},
32
+ icon: {},
33
+ iconAfter: {},
34
+ color: { default: "primary" },
35
+ variant: {},
36
+ plain: { type: Boolean },
37
+ muted: { type: Boolean },
38
+ outlined: { type: Boolean },
39
+ size: {},
40
+ sm: { type: Boolean },
41
+ lg: { type: Boolean },
42
+ loading: { type: Boolean },
43
+ block: { type: Boolean },
44
+ rounded: { type: Boolean },
45
+ condensed: { type: Boolean }
46
+ },
47
+ setup(n) {
48
+ const e = n, a = B(() => e.submit ? "submit" : e.reset ? "reset" : "button"), t = B(() => e.variant ? e.variant : e.plain ? "plain" : e.muted ? "muted" : e.outlined ? "outlined" : "flat"), o = B(() => e.size ? e.size : e.sm ? "small" : e.lg ? "large" : "medium");
49
+ return (l, i) => (s(), h(ue(l.href ? "a" : "button"), {
50
+ type: l.href ? void 0 : a.value,
51
+ form: typeof l.submit == "string" ? l.submit : void 0,
52
+ href: l.href,
53
+ class: g(["dai-btn", {
54
+ [`dai-btn--${l.color}`]: l.color,
55
+ "dai-btn--flat": t.value === "flat",
56
+ "dai-btn--plain": t.value === "plain",
57
+ "dai-btn--muted": t.value === "muted",
58
+ "dai-btn--outlined": t.value === "outlined",
59
+ "dai-btn--sm": o.value === "small",
60
+ "dai-btn--lg": o.value === "large",
61
+ "dai-btn--loading": l.loading,
62
+ "dai-btn--block": l.block,
63
+ "dai-btn--rounded": l.rounded,
64
+ "dai-btn--condensed": l.condensed
65
+ }])
66
+ }, {
67
+ default: v(() => [
68
+ l.loading ? (s(), d("span", ge, i[0] || (i[0] = [
69
+ r("svg", {
70
+ xmlns: "http://www.w3.org/2000/svg",
71
+ fill: "none",
72
+ viewBox: "0 0 24 24"
73
+ }, [
74
+ r("circle", {
75
+ opacity: "0.25",
76
+ cx: "12",
77
+ cy: "12",
78
+ r: "10",
79
+ stroke: "currentColor",
80
+ "stroke-width": "4"
81
+ }),
82
+ r("path", {
83
+ opacity: "0.75",
84
+ fill: "currentColor",
85
+ 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"
86
+ })
87
+ ], -1)
88
+ ]))) : p("", !0),
89
+ r("span", ke, [
90
+ l.icon ? (s(), d("div", {
91
+ key: 0,
92
+ class: g([l.icon, "dai-btn__icon"])
93
+ }, null, 2)) : p("", !0),
94
+ y(l.$slots, "default"),
95
+ l.iconAfter ? (s(), d("div", {
96
+ key: 1,
97
+ class: g([l.iconAfter, "dai-btn__icon"])
98
+ }, null, 2)) : p("", !0)
99
+ ])
100
+ ]),
101
+ _: 3
102
+ }, 8, ["type", "form", "href", "class"]));
103
+ }
104
+ }), _e = { class: "dai-label" }, F = /* @__PURE__ */ f({
105
+ __name: "label",
106
+ props: {
107
+ text: {}
108
+ },
109
+ setup(n) {
110
+ return (e, a) => (s(), d("label", _e, [
111
+ y(e.$slots, "default", {}, () => [
112
+ U(_(e.text), 1)
113
+ ])
114
+ ]));
115
+ }
116
+ }), we = { class: "dai-form-control__input-group__box" }, $e = /* @__PURE__ */ f({
117
+ __name: "inputGroup",
118
+ props: {
119
+ label: {},
120
+ labelFor: {},
121
+ outlined: { type: Boolean },
122
+ muted: { type: Boolean },
123
+ rounded: { type: Boolean },
124
+ disabled: { type: Boolean },
125
+ invalid: { type: Boolean },
126
+ lg: { type: Boolean },
127
+ sm: { type: Boolean }
128
+ },
129
+ setup(n) {
130
+ return (e, a) => (s(), d("div", {
131
+ class: g(["dai-form-control__input-group", {
132
+ "dai-form-control__input-group--labeled": !!e.label,
133
+ "dai-form-control__input-group--outlined": e.outlined,
134
+ "dai-form-control__input-group--muted": e.muted,
135
+ "dai-form-control__input-group--rounded": e.rounded,
136
+ "dai-form-control__input-group--lg": e.lg,
137
+ "dai-form-control__input-group--sm": e.sm,
138
+ "dai-form-control__input-group--disabled": e.disabled,
139
+ "dai-form-control__input-group--invalid": e.invalid
140
+ }])
141
+ }, [
142
+ e.label ? (s(), h(F, {
143
+ key: 0,
144
+ text: e.label,
145
+ for: e.labelFor,
146
+ class: "dai-form-control__input-group__label"
147
+ }, null, 8, ["text", "for"])) : p("", !0),
148
+ r("div", we, [
149
+ y(e.$slots, "default")
150
+ ])
151
+ ], 2));
152
+ }
153
+ }), Be = { class: "dai-form-control__container" }, Ve = {
154
+ key: 0,
155
+ class: "dai-form-control__hint"
156
+ }, Me = {
157
+ key: 0,
158
+ class: "dai-form-control__validation-message",
159
+ role: "alert"
160
+ }, R = /* @__PURE__ */ f({
161
+ inheritAttrs: !1,
162
+ __name: "formControl",
163
+ props: {
164
+ id: {},
165
+ label: {},
166
+ labelInline: { type: Boolean },
167
+ labelInside: { type: Boolean },
168
+ hint: {},
169
+ validationMessage: {},
170
+ outlined: { type: Boolean },
171
+ muted: { type: Boolean },
172
+ rounded: { type: Boolean },
173
+ disabled: { type: Boolean },
174
+ invalid: { type: Boolean },
175
+ lg: { type: Boolean },
176
+ sm: { type: Boolean },
177
+ autocomplete: { type: [String, Boolean], default: "off" }
178
+ },
179
+ setup(n) {
180
+ const e = n, a = e.id || z(), t = B(() => typeof e.autocomplete == "string" ? e.autocomplete : e.autocomplete ? "on" : "off");
181
+ return (o, l) => (s(), d("div", {
182
+ class: g(["dai-form-control", {
183
+ [o.$attrs.class]: o.$attrs.class,
184
+ "dai-form-control--label-inline": o.labelInline,
185
+ "dai-form-control--invalid": o.invalid,
186
+ "dai-form-control--lg": o.lg
187
+ }])
188
+ }, [
189
+ o.label && !o.labelInside ? (s(), h(F, {
190
+ key: 0,
191
+ for: c(a),
192
+ text: o.label
193
+ }, null, 8, ["for", "text"])) : p("", !0),
194
+ r("div", Be, [
195
+ M($e, {
196
+ label: o.labelInside ? o.label : void 0,
197
+ "label-for": c(a),
198
+ outlined: o.outlined,
199
+ muted: o.muted,
200
+ rounded: o.rounded,
201
+ lg: o.lg,
202
+ sm: o.sm,
203
+ disabled: o.disabled,
204
+ invalid: o.invalid
205
+ }, {
206
+ default: v(() => [
207
+ y(o.$slots, "default", {
208
+ attrs: { id: c(a), disabled: o.disabled, autocomplete: t.value, ...o.$attrs, class: "" }
209
+ })
210
+ ]),
211
+ _: 3
212
+ }, 8, ["label", "label-for", "outlined", "muted", "rounded", "lg", "sm", "disabled", "invalid"]),
213
+ o.hint ? (s(), d("div", Ve, _(o.hint), 1)) : p("", !0),
214
+ M(A, { name: "dai-form-control__validation-message-transition" }, {
215
+ default: v(() => [
216
+ o.validationMessage ? (s(), d("div", Me, [
217
+ l[0] || (l[0] = r("svg", {
218
+ xmlns: "http://www.w3.org/2000/svg",
219
+ viewBox: "0 0 256 256",
220
+ class: ""
221
+ }, [
222
+ r("path", {
223
+ fill: "currentColor",
224
+ 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"
225
+ })
226
+ ], -1)),
227
+ U(" " + _(o.validationMessage), 1)
228
+ ])) : p("", !0)
229
+ ]),
230
+ _: 1
231
+ })
232
+ ])
233
+ ], 2));
234
+ }
235
+ }), Ce = (n, e) => {
236
+ const a = n.__vccOpts || n;
237
+ for (const [t, o] of e)
238
+ a[t] = o;
239
+ return a;
240
+ }, Ie = {}, Ee = {
241
+ type: "button",
242
+ class: "dai-form-control__btn",
243
+ tabindex: "-1",
244
+ "aria-hidden": "true"
245
+ };
246
+ function Le(n, e) {
247
+ return s(), d("button", Ee, [
248
+ y(n.$slots, "default")
249
+ ]);
250
+ }
251
+ const Z = /* @__PURE__ */ Ce(Ie, [["render", Le]]), ze = ["type", "pattern", "title", "value"], Te = {
252
+ key: 0,
253
+ xmlns: "http://www.w3.org/2000/svg",
254
+ fill: "none",
255
+ viewBox: "0 0 24 24",
256
+ stroke: "currentColor"
257
+ }, Ae = {
258
+ key: 1,
259
+ xmlns: "http://www.w3.org/2000/svg",
260
+ fill: "none",
261
+ viewBox: "0 0 24 24",
262
+ stroke: "currentColor"
263
+ }, Bo = /* @__PURE__ */ f({
264
+ __name: "input",
265
+ props: /* @__PURE__ */ I({
266
+ type: { default: "text" },
267
+ mask: {},
268
+ pattern: {},
269
+ title: {},
270
+ clearable: { type: Boolean },
271
+ validators: {},
272
+ showValidationError: { type: Boolean, default: !1 },
273
+ id: {},
274
+ label: {},
275
+ labelInline: { type: Boolean },
276
+ labelInside: { type: Boolean },
277
+ hint: {},
278
+ validationMessage: {},
279
+ outlined: { type: Boolean },
280
+ muted: { type: Boolean },
281
+ rounded: { type: Boolean },
282
+ disabled: { type: Boolean },
283
+ invalid: { type: Boolean },
284
+ lg: { type: Boolean },
285
+ sm: { type: Boolean },
286
+ autocomplete: { type: [String, Boolean] }
287
+ }, {
288
+ modelValue: {},
289
+ modelModifiers: {},
290
+ files: {},
291
+ filesModifiers: {}
292
+ }),
293
+ emits: ["update:modelValue", "update:files"],
294
+ setup(n) {
295
+ const e = n, a = w(n, "modelValue"), t = w(n, "files", {
296
+ set($) {
297
+ return o.value && (o.value.files = $), $;
298
+ }
299
+ }), o = L("formElement"), { isValid: l, validationMessage: i, validate: m } = S(
300
+ o,
301
+ e.validators,
302
+ e.showValidationError
303
+ ), u = N(!1);
304
+ T(a, () => {
305
+ t.value = o.value?.files || null;
306
+ });
307
+ let k;
308
+ const b = B(() => e.type === "password" ? u.value ? "text" : "password" : e.type), E = B(() => e.mask ? e.mask : e.type === "tel" ? {
309
+ mask: "{+7} (000) 000-00-00"
310
+ } : e.mask), K = B(() => e.pattern ? e.pattern : e.type === "tel" ? "^\\+7 \\(9\\d{2}\\) \\d{3}-\\d{2}-\\d{2}" : e.pattern), Q = B(() => e.title ? e.title : e.type === "tel" ? "+7 (999) 888-77-66" : e.title);
311
+ function W() {
312
+ u.value = !u.value;
313
+ }
314
+ function J() {
315
+ a.value = "";
316
+ }
317
+ function x($) {
318
+ if (k)
319
+ return;
320
+ const { value: V } = $.target;
321
+ a.value = V;
322
+ }
323
+ return j(() => {
324
+ E.value && import("./chunks/index.W-qQIppj.js").then(($) => {
325
+ k = $.default(
326
+ o.value,
327
+ E.value
328
+ ), k.on("accept", () => {
329
+ a.value = k.value;
330
+ });
331
+ });
332
+ }), ($, V) => (s(), h(R, C(e, {
333
+ "validation-message": $.showValidationError ? "" : c(i),
334
+ invalid: !c(l)
335
+ }), {
336
+ default: v(({ attrs: X }) => [
337
+ y($.$slots, "prepend"),
338
+ r("input", C({
339
+ ref_key: "formElement",
340
+ ref: o
341
+ }, X, {
342
+ type: b.value,
343
+ pattern: K.value,
344
+ title: Q.value,
345
+ value: a.value,
346
+ onInputPassive: x,
347
+ onKeyupPassive: V[0] || (V[0] = (ko) => !c(l) && c(m)()),
348
+ class: "dai-form-control__input"
349
+ }), null, 16, ze),
350
+ y($.$slots, "append"),
351
+ e.type === "password" && a.value ? (s(), h(Z, {
352
+ key: 0,
353
+ onClick: W
354
+ }, {
355
+ default: v(() => [
356
+ u.value ? (s(), d("svg", Ae, V[2] || (V[2] = [
357
+ r("path", {
358
+ "stroke-linecap": "round",
359
+ "stroke-linejoin": "round",
360
+ "stroke-width": "2",
361
+ 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"
362
+ }, null, -1)
363
+ ]))) : (s(), d("svg", Te, V[1] || (V[1] = [
364
+ r("path", {
365
+ "stroke-linecap": "round",
366
+ "stroke-linejoin": "round",
367
+ "stroke-width": "2",
368
+ d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
369
+ }, null, -1),
370
+ r("path", {
371
+ "stroke-linecap": "round",
372
+ "stroke-linejoin": "round",
373
+ "stroke-width": "2",
374
+ d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
375
+ }, null, -1)
376
+ ])))
377
+ ]),
378
+ _: 1
379
+ })) : p("", !0),
380
+ $.clearable && a.value && !X.disabled ? (s(), h(Z, {
381
+ key: 1,
382
+ onClick: J
383
+ }, {
384
+ default: v(() => V[3] || (V[3] = [
385
+ r("svg", {
386
+ xmlns: "http://www.w3.org/2000/svg",
387
+ fill: "none",
388
+ viewBox: "0 0 24 24",
389
+ stroke: "currentColor"
390
+ }, [
391
+ r("path", {
392
+ "stroke-linecap": "round",
393
+ "stroke-linejoin": "round",
394
+ "stroke-width": "2",
395
+ d: "M6 18L18 6M6 6l12 12"
396
+ })
397
+ ], -1)
398
+ ])),
399
+ _: 1,
400
+ __: [3]
401
+ })) : p("", !0)
402
+ ]),
403
+ _: 3
404
+ }, 16, ["validation-message", "invalid"]));
405
+ }
406
+ }), Se = ["id"], je = ["for"], Pe = { class: "form-control__container" }, Oe = { class: "form-control__input-group" }, Ue = ["for"], Ne = {
407
+ key: 0,
408
+ class: "form-control__hint"
409
+ }, Xe = {
410
+ key: 1,
411
+ class: "form-control__validation-message",
412
+ role: "alert"
413
+ }, G = /* @__PURE__ */ f({
414
+ inheritAttrs: !1,
415
+ __name: "formControl",
416
+ props: {
417
+ id: {},
418
+ containerId: {},
419
+ label: {},
420
+ labelInline: { type: Boolean },
421
+ labelInside: { type: Boolean },
422
+ hint: {},
423
+ validationMessage: {},
424
+ outlined: { type: Boolean },
425
+ muted: { type: Boolean },
426
+ rounded: { type: Boolean },
427
+ disabled: { type: Boolean },
428
+ invalid: { type: Boolean },
429
+ lg: { type: Boolean },
430
+ sm: { type: Boolean },
431
+ autocomplete: { type: [String, Boolean], default: "off" }
432
+ },
433
+ setup(n) {
434
+ const e = n, a = e.id || z(), t = B(() => typeof e.autocomplete == "string" ? e.autocomplete : e.autocomplete ? "on" : "off");
435
+ return (o, l) => (s(), d("div", {
436
+ id: o.containerId,
437
+ class: g(["form-control", {
438
+ [o.$attrs.class]: o.$attrs.class,
439
+ "form-control--label-inline": o.labelInline,
440
+ "form-control--label-inside": o.labelInside,
441
+ "form-control--outlined": o.outlined,
442
+ "form-control--muted": o.muted,
443
+ "form-control--rounded": o.rounded,
444
+ "form-control--disabled": o.disabled,
445
+ "form-control--invalid": o.invalid,
446
+ "form-control--lg": o.lg,
447
+ "form-control--sm": o.sm
448
+ }])
449
+ }, [
450
+ o.label && !o.labelInside ? (s(), d("label", {
451
+ key: 0,
452
+ for: c(a)
453
+ }, _(o.label), 9, je)) : p("", !0),
454
+ r("div", Pe, [
455
+ r("div", Oe, [
456
+ o.label && o.labelInside ? (s(), d("label", {
457
+ key: 0,
458
+ for: c(a)
459
+ }, _(o.label), 9, Ue)) : p("", !0),
460
+ y(o.$slots, "default", {
461
+ attrs: { id: c(a), disabled: o.disabled, autocomplete: t.value, ...o.$attrs, class: "" }
462
+ })
463
+ ]),
464
+ o.hint ? (s(), d("div", Ne, _(o.hint), 1)) : p("", !0),
465
+ o.validationMessage ? (s(), d("div", Xe, [
466
+ l[0] || (l[0] = r("svg", {
467
+ xmlns: "http://www.w3.org/2000/svg",
468
+ viewBox: "0 0 256 256",
469
+ class: ""
470
+ }, [
471
+ r("path", {
472
+ fill: "currentColor",
473
+ 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"
474
+ })
475
+ ], -1)),
476
+ U(" " + _(o.validationMessage), 1)
477
+ ])) : p("", !0)
478
+ ])
479
+ ], 10, Se));
480
+ }
481
+ }), Vo = /* @__PURE__ */ f({
482
+ __name: "textarea",
483
+ props: /* @__PURE__ */ I({
484
+ autosize: { type: Boolean },
485
+ validators: {},
486
+ showValidationError: { type: Boolean, default: !1 }
487
+ }, {
488
+ modelValue: {},
489
+ modelModifiers: {}
490
+ }),
491
+ emits: ["update:modelValue"],
492
+ setup(n) {
493
+ const e = n, a = w(n, "modelValue"), t = L("formElement"), { isValid: o, validationMessage: l, validate: i } = S(
494
+ t,
495
+ e.validators,
496
+ e.showValidationError
497
+ );
498
+ function m() {
499
+ if (!e.autosize) return;
500
+ const u = t.value, k = u.offsetHeight - u.clientHeight;
501
+ u.style.height = "auto", u.style.height = `${u.scrollHeight + k}px`;
502
+ }
503
+ return j(m), (u, k) => (s(), h(G, {
504
+ "validation-message": u.showValidationError ? "" : c(l),
505
+ invalid: !c(o)
506
+ }, {
507
+ default: v(({ attrs: b }) => [
508
+ P(r("textarea", C({
509
+ ref_key: "formElement",
510
+ ref: t
511
+ }, { ...b }, {
512
+ "onUpdate:modelValue": k[0] || (k[0] = (E) => a.value = E),
513
+ onKeyupPassive: k[1] || (k[1] = (E) => !c(o) && c(i)()),
514
+ onInputPassive: m,
515
+ class: ["form-control__textarea", {
516
+ "form-control__textarea--autosize": u.autosize
517
+ }]
518
+ }), null, 16), [
519
+ [ce, a.value]
520
+ ])
521
+ ]),
522
+ _: 1
523
+ }, 8, ["validation-message", "invalid"]));
524
+ }
525
+ }), Ze = ["value"], Mo = /* @__PURE__ */ f({
526
+ __name: "select",
527
+ props: /* @__PURE__ */ I({
528
+ options: {},
529
+ optionText: { default: "text" },
530
+ optionValue: { default: "value" },
531
+ validators: {},
532
+ showValidationError: { type: Boolean, default: !1 }
533
+ }, {
534
+ modelValue: {},
535
+ modelModifiers: {}
536
+ }),
537
+ emits: ["update:modelValue"],
538
+ setup(n) {
539
+ const e = n, a = w(n, "modelValue"), t = L("formElement"), { isValid: o, validationMessage: l, validate: i } = S(
540
+ t,
541
+ e.validators,
542
+ e.showValidationError
543
+ );
544
+ return (m, u) => (s(), h(R, {
545
+ "validation-message": m.showValidationError ? "" : c(l),
546
+ invalid: !c(o)
547
+ }, {
548
+ default: v(({ attrs: k }) => [
549
+ P(r("select", C({
550
+ class: "dai-select",
551
+ ref_key: "formElement",
552
+ ref: t
553
+ }, { ...k }, {
554
+ "onUpdate:modelValue": u[0] || (u[0] = (b) => a.value = b)
555
+ }), [
556
+ y(m.$slots, "default", {}, () => [
557
+ (s(!0), d(Y, null, D(m.options, (b) => (s(), d("option", {
558
+ value: b[m.optionValue],
559
+ key: b[m.optionValue]
560
+ }, _(b[m.optionText]), 9, Ze))), 128))
561
+ ])
562
+ ], 16), [
563
+ [pe, a.value]
564
+ ]),
565
+ u[1] || (u[1] = r("svg", {
566
+ class: "dai-select__btn",
567
+ xmlns: "http://www.w3.org/2000/svg",
568
+ viewBox: "0 0 16 16"
569
+ }, [
570
+ r("path", {
571
+ fill: "currentColor",
572
+ "fill-rule": "evenodd",
573
+ d: "M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06",
574
+ "clip-rule": "evenodd"
575
+ })
576
+ ], -1))
577
+ ]),
578
+ _: 3,
579
+ __: [1]
580
+ }, 8, ["validation-message", "invalid"]));
581
+ }
582
+ }), qe = { class: "flex items-center h-5" }, Ye = ["id"], De = {
583
+ key: 0,
584
+ class: "ml-3 text-sm"
585
+ }, He = ["for"], Fe = {
586
+ key: 0,
587
+ class: "text-secondary-500 dark:text-secondary-400"
588
+ }, Co = /* @__PURE__ */ f({
589
+ inheritAttrs: !1,
590
+ __name: "checkbox",
591
+ props: /* @__PURE__ */ I({
592
+ color: { default: "primary" },
593
+ validators: {},
594
+ showValidationError: { type: Boolean, default: !0 },
595
+ label: {},
596
+ hint: {}
597
+ }, {
598
+ modelValue: { type: Boolean },
599
+ modelModifiers: {}
600
+ }),
601
+ emits: ["update:modelValue"],
602
+ setup(n) {
603
+ const e = n, a = w(n, "modelValue"), t = z(), o = L("formElement"), { isValid: l } = S(
604
+ o,
605
+ e.validators,
606
+ e.showValidationError
607
+ );
608
+ return (i, m) => (s(), d("div", {
609
+ class: g(["flex items-start", i.$attrs.class])
610
+ }, [
611
+ r("div", qe, [
612
+ P(r("input", C({
613
+ ref_key: "formElement",
614
+ ref: o,
615
+ "onUpdate:modelValue": m[0] || (m[0] = (u) => a.value = u)
616
+ }, { ...i.$attrs, class: "" }, {
617
+ id: c(t),
618
+ type: "checkbox",
619
+ class: ["checkbox", {
620
+ [`checkbox--${i.color}`]: i.color,
621
+ "checkbox--invalid": !c(l)
622
+ }]
623
+ }), null, 16, Ye), [
624
+ [me, a.value]
625
+ ])
626
+ ]),
627
+ i.label ? (s(), d("div", De, [
628
+ r("label", {
629
+ for: c(t),
630
+ class: "font-medium select-none cursor-pointer"
631
+ }, _(i.label), 9, He),
632
+ i.hint ? (s(), d("p", Fe, _(i.hint), 1)) : p("", !0)
633
+ ])) : p("", !0)
634
+ ], 2));
635
+ }
636
+ }), Re = { class: "flex items-center h-5" }, Ge = ["value", "id"], Ke = {
637
+ key: 0,
638
+ class: "text-sm"
639
+ }, Qe = ["for"], We = {
640
+ key: 0,
641
+ class: "text-secondary-500 dark:text-secondary-400"
642
+ }, Io = /* @__PURE__ */ f({
643
+ inheritAttrs: !1,
644
+ __name: "radio",
645
+ props: /* @__PURE__ */ I({
646
+ value: {},
647
+ color: { default: "primary" },
648
+ validators: {},
649
+ showValidationError: { type: Boolean, default: !0 },
650
+ label: {},
651
+ hint: {}
652
+ }, {
653
+ modelValue: { type: Boolean },
654
+ modelModifiers: {}
655
+ }),
656
+ emits: ["update:modelValue"],
657
+ setup(n) {
658
+ const e = n, a = w(n, "modelValue"), t = z(), o = L("formElement"), { isValid: l } = S(
659
+ o,
660
+ e.validators,
661
+ e.showValidationError
662
+ );
663
+ return (i, m) => (s(), d("div", {
664
+ class: g(["flex items-start gap-3", i.$attrs.class])
665
+ }, [
666
+ r("div", Re, [
667
+ P(r("input", C({
668
+ type: "radio",
669
+ ref_key: "formElement",
670
+ ref: o,
671
+ "onUpdate:modelValue": m[0] || (m[0] = (u) => a.value = u)
672
+ }, { ...i.$attrs, class: "" }, {
673
+ value: i.value,
674
+ id: c(t),
675
+ class: ["radio", {
676
+ [`radio--${i.color}`]: i.color,
677
+ "radio--invalid": !c(l)
678
+ }]
679
+ }), null, 16, Ge), [
680
+ [fe, a.value]
681
+ ])
682
+ ]),
683
+ i.label ? (s(), d("div", Ke, [
684
+ r("label", {
685
+ for: c(t),
686
+ class: "font-medium select-none cursor-pointer"
687
+ }, _(i.label), 9, Qe),
688
+ i.hint ? (s(), d("p", We, _(i.hint), 1)) : p("", !0)
689
+ ])) : p("", !0)
690
+ ], 2));
691
+ }
692
+ }), Je = { class: "flex items-start gap-3" }, xe = ["id", "aria-checked"], eo = {
693
+ key: 0,
694
+ class: "mt-0.5 text-sm"
695
+ }, oo = ["for"], to = {
696
+ key: 0,
697
+ class: "text-secondary-500 dark:text-secondary-400"
698
+ }, Eo = /* @__PURE__ */ f({
699
+ __name: "switch",
700
+ props: /* @__PURE__ */ I({
701
+ label: {},
702
+ hint: {}
703
+ }, {
704
+ modelValue: { type: Boolean },
705
+ modelModifiers: {}
706
+ }),
707
+ emits: ["update:modelValue"],
708
+ setup(n) {
709
+ const e = w(n, "modelValue"), a = z();
710
+ return (t, o) => (s(), d("div", Je, [
711
+ r("button", {
712
+ onClick: o[0] || (o[0] = (l) => e.value = !e.value),
713
+ id: c(a),
714
+ "aria-checked": e.value,
715
+ role: "switch",
716
+ type: "button",
717
+ tabindex: "0",
718
+ class: g(["appearance-none flex-shrink-0 inline-block relative rounded-full w-10 h-6 p-0.5 transition-colors cursor-pointer select-none", [e.value ? "bg-primary-500" : "bg-secondary-300 dark:bg-dark-400"]]),
719
+ "un-focus-visible": "outline outline-primary-500 outline-2 outline-offset-2"
720
+ }, [
721
+ o[1] || (o[1] = r("span", { class: "sr-only" }, "Use setting", -1)),
722
+ r("div", {
723
+ "aria-hidden": "true",
724
+ class: g(["relative bg-white w-5 h-5 rounded-full shadow transition-all ease-in-out", [e.value ? "left-full -translate-x-full" : "left-0"]]),
725
+ "un-dark": "bg-dark-800"
726
+ }, null, 2)
727
+ ], 10, xe),
728
+ t.label ? (s(), d("div", eo, [
729
+ r("label", {
730
+ for: c(a),
731
+ class: "font-medium select-none cursor-pointer"
732
+ }, _(t.label), 9, oo),
733
+ t.hint ? (s(), d("p", to, _(t.hint), 1)) : p("", !0)
734
+ ])) : p("", !0)
735
+ ]));
736
+ }
737
+ }), Lo = /* @__PURE__ */ f({
738
+ __name: "popoverDialog",
739
+ setup(n) {
740
+ return (e, a) => (s(), h(A, {
741
+ "enter-from-class": "opacity-0 scale-95",
742
+ "enter-to-class": "opacity-100 scale-100",
743
+ "enter-active-class": "transform transition ease-out duration-100",
744
+ "leave-from-class": "opacity-100 scale-100",
745
+ "leave-to-class": "opacity-0 scale-95",
746
+ "leave-active-class": "transform transition ease-in duration-75"
747
+ }, {
748
+ default: v(() => [
749
+ M(c(ee), {
750
+ class: "z-50 rounded-md overflow-hidden shadow-xl bg-white ring-1 ring-black ring-opacity-10 focus:outline-none",
751
+ "un-dark": "bg-dark-700 ring-dark-600"
752
+ }, {
753
+ default: v(() => [
754
+ y(e.$slots, "default")
755
+ ]),
756
+ _: 3
757
+ })
758
+ ]),
759
+ _: 3
760
+ }));
761
+ }
762
+ }), zo = /* @__PURE__ */ f({
763
+ __name: "combobox",
764
+ props: {
765
+ modelValue: {},
766
+ modelModifiers: {}
767
+ },
768
+ emits: ["update:modelValue"],
769
+ setup(n) {
770
+ const e = n, a = w(n, "modelValue"), t = z();
771
+ return (o, l) => (s(), h(G, C(e, { containerId: c(t) }), {
772
+ default: v(({ attrs: i }) => [
773
+ M(c(oe), C({ ...i }, {
774
+ activatorId: c(t),
775
+ modelValue: a.value,
776
+ "onUpdate:modelValue": l[0] || (l[0] = (m) => a.value = m)
777
+ }), {
778
+ default: v(() => [
779
+ y(o.$slots, "default")
780
+ ]),
781
+ _: 2
782
+ }, 1040, ["activatorId", "modelValue"])
783
+ ]),
784
+ _: 3
785
+ }, 16, ["containerId"]));
786
+ }
787
+ }), To = /* @__PURE__ */ f({
788
+ __name: "comboboxInput",
789
+ setup(n) {
790
+ return (e, a) => (s(), h(c(te), { class: "form-control__input" }));
791
+ }
792
+ }), Ao = /* @__PURE__ */ f({
793
+ __name: "comboboxOptions",
794
+ setup(n) {
795
+ return (e, a) => (s(), h(A, {
796
+ "enter-from-class": "opacity-0 scale-95",
797
+ "enter-to-class": "opacity-100 scale-100",
798
+ "enter-active-class": "transform transition ease-out duration-100",
799
+ "leave-from-class": "opacity-100 scale-100",
800
+ "leave-to-class": "opacity-0 scale-95",
801
+ "leave-active-class": "transform transition ease-in duration-75"
802
+ }, {
803
+ default: v(() => [
804
+ M(c(ae), {
805
+ class: "z-50 my-2 p-1 space-y-1 rounded-md overflow-hidden shadow-xl bg-white ring-1 ring-black ring-opacity-10 focus:outline-none",
806
+ "un-dark": "bg-dark-700 ring-dark-600"
807
+ }, {
808
+ default: v(() => [
809
+ y(e.$slots, "default")
810
+ ]),
811
+ _: 3
812
+ })
813
+ ]),
814
+ _: 3
815
+ }));
816
+ }
817
+ }), So = /* @__PURE__ */ f({
818
+ __name: "comboboxOption",
819
+ props: {
820
+ value: {}
821
+ },
822
+ setup(n) {
823
+ return (e, a) => (s(), h(c(le), {
824
+ value: e.value,
825
+ class: "flex items-center px-3 py-2 cursor-pointer transition-colors text-sm rounded flex items-center gap-4 select-none outline-none",
826
+ "un-data-active": "[&:not([aria-checked=true])]:bg-secondary-100 [&:not([aria-checked=true])]:dark:bg-dark-600",
827
+ "un-aria-checked": "bg-primary-50 text-primary-500 dark:bg-dark-500 dark:text-white",
828
+ "un-aria-disabled": "pointer-events-none text-secondary-500 dark:text-secondary-400"
829
+ }, {
830
+ default: v(({ isActive: t, isSelected: o }) => [
831
+ y(e.$slots, "default", {
832
+ isActive: t,
833
+ isSelected: o
834
+ })
835
+ ]),
836
+ _: 3
837
+ }, 8, ["value"]));
838
+ }
839
+ }), jo = /* @__PURE__ */ f({
840
+ __name: "menuItems",
841
+ setup(n) {
842
+ return (e, a) => (s(), h(A, {
843
+ "enter-from-class": "dai-menu-items--anim",
844
+ "leave-to-class": "dai-menu-items--anim"
845
+ }, {
846
+ default: v(() => [
847
+ M(c(se), { class: "dai-menu-items" }, {
848
+ default: v(() => [
849
+ y(e.$slots, "default")
850
+ ]),
851
+ _: 3
852
+ })
853
+ ]),
854
+ _: 3
855
+ }));
856
+ }
857
+ }), ao = {
858
+ key: 0,
859
+ class: "text-secondary-400 flex-shrink-0"
860
+ }, Po = /* @__PURE__ */ f({
861
+ __name: "menuItem",
862
+ props: {
863
+ icon: {}
864
+ },
865
+ setup(n) {
866
+ return (e, a) => (s(), h(c(ne), { class: "dai-menu-item" }, {
867
+ default: v(({ isActive: t, isSelected: o }) => [
868
+ e.icon ? (s(), d("div", ao, [
869
+ r("div", {
870
+ class: g(["h-5 w-5", e.icon])
871
+ }, null, 2)
872
+ ])) : p("", !0),
873
+ y(e.$slots, "default", {
874
+ isActive: t,
875
+ isSelected: o
876
+ })
877
+ ]),
878
+ _: 3
879
+ }));
880
+ }
881
+ }), Oo = /* @__PURE__ */ f({
882
+ __name: "tab",
883
+ props: {
884
+ id: {},
885
+ ariaControls: {},
886
+ value: {}
887
+ },
888
+ setup(n) {
889
+ return (e, a) => (s(), h(c(ie), {
890
+ id: e.id,
891
+ "aria-controls": e.ariaControls,
892
+ value: e.value,
893
+ class: "dai-tab"
894
+ }, {
895
+ default: v(() => [
896
+ y(e.$slots, "default")
897
+ ]),
898
+ _: 3
899
+ }, 8, ["id", "aria-controls", "value"]));
900
+ }
901
+ }), Uo = /* @__PURE__ */ f({
902
+ __name: "tabList",
903
+ setup(n) {
904
+ const e = L("tablist"), a = L("slider"), t = N({});
905
+ function o() {
906
+ if (!a.value) return;
907
+ const l = e.value?.$el;
908
+ if (!l) return;
909
+ const i = l.querySelector("[aria-selected=true]");
910
+ i && (t.value = {
911
+ left: `${i.offsetLeft}px`,
912
+ right: `${l.offsetWidth - i.offsetLeft - i.offsetWidth}px`,
913
+ transition: a.value.offsetLeft > i.offsetLeft ? "left .2s, right .5s" : "left .5s, right .2s"
914
+ });
915
+ }
916
+ return j(() => ve(o)), (l, i) => (s(), h(c(re), {
917
+ ref_key: "tablist",
918
+ ref: e,
919
+ onClickPassive: o,
920
+ class: "dai-tab-list"
921
+ }, {
922
+ default: v(() => [
923
+ r("div", {
924
+ ref_key: "slider",
925
+ ref: a,
926
+ class: "dai-tab-list__slider",
927
+ style: O(t.value)
928
+ }, null, 4),
929
+ y(l.$slots, "default")
930
+ ]),
931
+ _: 3
932
+ }, 512));
933
+ }
934
+ }), lo = ["id"], No = /* @__PURE__ */ f({
935
+ inheritAttrs: !1,
936
+ __name: "offcanvas",
937
+ props: /* @__PURE__ */ I({
938
+ id: {},
939
+ position: { default: "right" },
940
+ push: { type: Boolean },
941
+ closeOnOutsideClick: { type: Boolean, default: !0 },
942
+ lg: { type: Boolean },
943
+ xl: { type: Boolean }
944
+ }, {
945
+ modelValue: { type: Boolean },
946
+ modelModifiers: {}
947
+ }),
948
+ emits: ["update:modelValue"],
949
+ setup(n) {
950
+ const e = n, a = w(n, "modelValue"), t = e.id ?? z(), { classList: o } = ye(document.body, "nui-body-push");
951
+ T(a, () => {
952
+ if (!e.push || (o.splice(1), !a.value))
953
+ return;
954
+ let i = "nui-body-push--" + e.position;
955
+ e.lg && (i += "--lg"), e.xl && (i += "--xl"), o.push(i);
956
+ });
957
+ function l(i) {
958
+ i.target.closest(`#${t}`) || e.closeOnOutsideClick && (a.value = !1);
959
+ }
960
+ return j(() => {
961
+ window.addEventListener("click", l, { passive: !0 });
962
+ }), q(() => {
963
+ window.removeEventListener("click", l);
964
+ }), (i, m) => (s(), h(H, { to: "body" }, [
965
+ M(A, {
966
+ appear: "",
967
+ "enter-from-class": "nui-offcanvas--animate-hidden",
968
+ "enter-to-class": "nui-offcanvas--animate-shown",
969
+ "enter-active-class": "ease-in-out",
970
+ "leave-from-class": "nui-offcanvas--animate-shown",
971
+ "leave-to-class": "nui-offcanvas--animate-hidden",
972
+ "leave-active-class": "ease-in-out"
973
+ }, {
974
+ default: v(() => [
975
+ a.value ? (s(), d("div", C({
976
+ key: 0,
977
+ id: c(t)
978
+ }, i.$attrs, {
979
+ class: ["nui-offcanvas", {
980
+ [`nui-offcanvas--${i.position}`]: !0,
981
+ "nui-offcanvas--shadow": !i.push,
982
+ "nui-offcanvas--lg": i.lg,
983
+ "nui-offcanvas--xl": i.xl
984
+ }]
985
+ }), [
986
+ y(i.$slots, "default")
987
+ ], 16, lo)) : p("", !0)
988
+ ]),
989
+ _: 3
990
+ })
991
+ ]));
992
+ }
993
+ }), so = {
994
+ key: 0,
995
+ role: "alert"
996
+ }, no = { class: "flex items-start" }, io = {
997
+ class: "h-6 w-6",
998
+ xmlns: "http://www.w3.org/2000/svg",
999
+ fill: "none",
1000
+ viewBox: "0 0 24 24",
1001
+ stroke: "currentColor"
1002
+ }, ro = {
1003
+ key: 0,
1004
+ "stroke-linecap": "round",
1005
+ "stroke-linejoin": "round",
1006
+ "stroke-width": "2",
1007
+ d: "M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"
1008
+ }, uo = {
1009
+ key: 1,
1010
+ "stroke-linecap": "round",
1011
+ "stroke-linejoin": "round",
1012
+ "stroke-width": "2",
1013
+ d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1014
+ }, co = {
1015
+ key: 2,
1016
+ "stroke-linecap": "round",
1017
+ "stroke-linejoin": "round",
1018
+ "stroke-width": "2",
1019
+ 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"
1020
+ }, po = {
1021
+ key: 3,
1022
+ "stroke-linecap": "round",
1023
+ "stroke-linejoin": "round",
1024
+ "stroke-width": "2",
1025
+ d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
1026
+ }, mo = { class: "flex-grow pt-.5" }, fo = {
1027
+ key: 0,
1028
+ class: "mt-1 text-white text-opacity-80"
1029
+ }, vo = /* @__PURE__ */ f({
1030
+ __name: "notification",
1031
+ props: /* @__PURE__ */ I({
1032
+ color: {},
1033
+ icon: {},
1034
+ message: {},
1035
+ detail: {},
1036
+ dismissible: { type: Boolean, default: !0 },
1037
+ timeout: { default: 3e3 }
1038
+ }, {
1039
+ modelValue: { type: Boolean },
1040
+ modelModifiers: {}
1041
+ }),
1042
+ emits: ["update:modelValue"],
1043
+ setup(n) {
1044
+ const e = n, a = w(n, "modelValue");
1045
+ let t;
1046
+ function o() {
1047
+ clearTimeout(t), a.value && e.timeout && (t = setTimeout(() => a.value = !1, e.timeout));
1048
+ }
1049
+ return T(a, o, { immediate: !0 }), (l, i) => a.value ? (s(), d("div", so, [
1050
+ r("div", {
1051
+ class: g(["rounded-md ring-1 ring-black ring-opacity-10 px-4 py-3 shadow-2xl text-sm opacity-95 hover:opacity-100 transition-opacity", {
1052
+ "bg-secondary-600": !l.color || l.color == "secondary",
1053
+ "bg-primary-400": l.color == "primary",
1054
+ "bg-success-400": l.color == "success",
1055
+ "bg-info-400": l.color == "info",
1056
+ "bg-warning-400": l.color == "warning",
1057
+ "bg-danger-400": l.color == "danger"
1058
+ }])
1059
+ }, [
1060
+ r("div", no, [
1061
+ l.icon ? (s(), d("div", {
1062
+ key: 0,
1063
+ class: g(["mx-auto flex-shrink-0 pr-4", {
1064
+ "text-success-500": l.icon == "success",
1065
+ "text-info-500": l.icon == "info",
1066
+ "text-warning-500": l.icon == "warning",
1067
+ "text-danger-600": l.icon == "error"
1068
+ }])
1069
+ }, [
1070
+ (s(), d("svg", io, [
1071
+ l.icon == "success" ? (s(), d("path", ro)) : l.icon == "info" ? (s(), d("path", uo)) : l.icon == "warning" ? (s(), d("path", co)) : l.icon == "error" ? (s(), d("path", po)) : p("", !0)
1072
+ ]))
1073
+ ], 2)) : p("", !0),
1074
+ r("div", mo, [
1075
+ r("div", {
1076
+ class: g(["text-white text-opacity-90", {
1077
+ "font-medium": l.detail
1078
+ }])
1079
+ }, _(l.message), 3),
1080
+ l.detail ? (s(), d("div", fo, _(l.detail), 1)) : p("", !0)
1081
+ ]),
1082
+ l.dismissible ? (s(), d("div", {
1083
+ key: 1,
1084
+ onClick: i[0] || (i[0] = (m) => a.value = !1),
1085
+ class: "ml-4 flex-shrink-0 text-white text-opacity-80 hover:text-opacity-100 cursor-pointer"
1086
+ }, i[1] || (i[1] = [
1087
+ r("svg", {
1088
+ class: "h-5 w-5",
1089
+ xmlns: "http://www.w3.org/2000/svg",
1090
+ fill: "none",
1091
+ viewBox: "0 0 24 24",
1092
+ stroke: "currentColor"
1093
+ }, [
1094
+ r("path", {
1095
+ "stroke-linecap": "round",
1096
+ "stroke-linejoin": "round",
1097
+ "stroke-width": "2",
1098
+ d: "M6 18L18 6M6 6l12 12"
1099
+ })
1100
+ ], -1)
1101
+ ]))) : p("", !0)
1102
+ ])
1103
+ ], 2)
1104
+ ])) : p("", !0);
1105
+ }
1106
+ }), Xo = /* @__PURE__ */ f({
1107
+ __name: "notificationQueue",
1108
+ props: /* @__PURE__ */ I({
1109
+ length: { default: 3 },
1110
+ timeout: { default: 4e3 },
1111
+ position: { default: "fixed" },
1112
+ positionX: { default: "center" },
1113
+ positionY: { default: "top" }
1114
+ }, {
1115
+ queue: { default: [] },
1116
+ queueModifiers: {}
1117
+ }),
1118
+ emits: ["update:queue"],
1119
+ setup(n) {
1120
+ const e = n, a = w(n, "queue"), t = N([]);
1121
+ let o = 0;
1122
+ function l() {
1123
+ a.value.length === 0 || t.value.length >= e.length || (t.value.push({ ...a.value[0], id: o++, show: !0 }), a.value.shift());
1124
+ }
1125
+ function i(u) {
1126
+ setTimeout(() => {
1127
+ t.value = t.value.filter(
1128
+ (k) => k.id !== u
1129
+ ), l();
1130
+ }, 200);
1131
+ }
1132
+ T(a, l, { immediate: !0, deep: !0 });
1133
+ const m = B(() => {
1134
+ const u = ["opacity-0"];
1135
+ return e.positionX === "right" ? u.push("translate-x-80") : e.positionX === "left" ? u.push("-translate-x-80") : e.positionX === "center" && e.positionY === "top" ? u.push("-translate-y-20") : e.positionX === "center" && e.positionY === "bottom" && u.push("translate-y-20"), u.join(" ");
1136
+ });
1137
+ return (u, k) => (s(), d("div", {
1138
+ class: g(["fixed z-100 w-96 max-w-full flex gap-2", {
1139
+ fixed: u.position == "fixed",
1140
+ absolute: u.position == "absolute",
1141
+ "top-4": u.positionY == "top",
1142
+ "bottom-4": u.positionY == "bottom",
1143
+ "right-4": u.positionX == "right",
1144
+ "left-4": u.positionX == "left",
1145
+ "left-1/2 -translate-x-1/2": u.positionX == "center",
1146
+ "flex-col-reverse": u.positionY === "top",
1147
+ "flex-col": u.positionY === "bottom"
1148
+ }])
1149
+ }, [
1150
+ M(he, {
1151
+ appear: "",
1152
+ "enter-from-class": m.value,
1153
+ "enter-active-class": "ease-out",
1154
+ "leave-to-class": m.value,
1155
+ "leave-active-class": "ease-in"
1156
+ }, {
1157
+ default: v(() => [
1158
+ (s(!0), d(Y, null, D(t.value, (b) => (s(), h(vo, {
1159
+ key: b.id,
1160
+ color: b.color,
1161
+ icon: b.type,
1162
+ message: b.message,
1163
+ detail: b.detail,
1164
+ timeout: b.timeout ?? u.timeout,
1165
+ modelValue: b.show,
1166
+ "onUpdate:modelValue": [(E) => b.show = E, (E) => i(b.id)],
1167
+ class: "transition-all duration-200"
1168
+ }, null, 8, ["color", "icon", "message", "detail", "timeout", "modelValue", "onUpdate:modelValue"]))), 128))
1169
+ ]),
1170
+ _: 1
1171
+ }, 8, ["enter-from-class", "leave-to-class"])
1172
+ ], 2));
1173
+ }
1174
+ }), ho = ["aria-valuenow"], Zo = /* @__PURE__ */ f({
1175
+ __name: "progressbar",
1176
+ props: {
1177
+ value: {},
1178
+ color: { default: "primary" },
1179
+ height: { default: 5 },
1180
+ rounded: { type: Boolean, default: !0 }
1181
+ },
1182
+ setup(n) {
1183
+ const e = n, a = B(() => e.value === void 0);
1184
+ return (t, o) => (s(), d("div", {
1185
+ class: g(["overflow-hidden text-xs w-full flex-1", {
1186
+ rounded: t.rounded,
1187
+ "bg-primary-200": t.color == "primary",
1188
+ "bg-success-200": t.color == "success",
1189
+ "bg-info-200": t.color == "info",
1190
+ "bg-warning-200": t.color == "warning",
1191
+ "bg-danger-200": t.color == "danger"
1192
+ }]),
1193
+ style: O({ height: t.height + "px" }),
1194
+ role: "progressbar",
1195
+ "aria-valuemin": "0",
1196
+ "aria-valuemax": "100",
1197
+ "aria-valuenow": t.value
1198
+ }, [
1199
+ r("div", {
1200
+ style: O(`width:${t.value}%`),
1201
+ class: g([{
1202
+ "bg-primary-500": t.color == "primary",
1203
+ "bg-success-500": t.color == "success",
1204
+ "bg-info-500": t.color == "info",
1205
+ "bg-warning-500": t.color == "warning",
1206
+ "bg-danger-500": t.color == "danger",
1207
+ "progress-infinite": a.value
1208
+ }, "h-full shadow-none relative text-center whitespace-nowrap text-white justify-center"])
1209
+ }, null, 6)
1210
+ ], 14, ho));
1211
+ }
1212
+ }), bo = {
1213
+ key: 0,
1214
+ class: "z-50"
1215
+ }, yo = { class: "fixed inset-0 overflow-y-auto" }, go = { class: "modal__dialog" }, qo = /* @__PURE__ */ f({
1216
+ inheritAttrs: !1,
1217
+ __name: "modal",
1218
+ props: {
1219
+ modelValue: { type: Boolean },
1220
+ modelModifiers: {}
1221
+ },
1222
+ emits: ["update:modelValue"],
1223
+ setup(n) {
1224
+ const e = w(n, "modelValue");
1225
+ function a() {
1226
+ e.value = !1;
1227
+ }
1228
+ return T(e, (t) => {
1229
+ t ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
1230
+ }), (t, o) => (s(), h(H, { to: "body" }, [
1231
+ M(A, {
1232
+ appear: "",
1233
+ name: "modal",
1234
+ duration: { enter: 300, leave: 200 }
1235
+ }, {
1236
+ default: v(() => [
1237
+ e.value ? (s(), d("div", bo, [
1238
+ o[0] || (o[0] = r("div", {
1239
+ class: "modal__backdrop fixed inset-0 bg-primary-50/60 backdrop-blur-sm",
1240
+ "aria-hidden": "true"
1241
+ }, null, -1)),
1242
+ r("div", yo, [
1243
+ r("div", {
1244
+ onClick: be(a, ["self"]),
1245
+ class: "min-h-full flex items-center justify-center p-4 sm:p-6"
1246
+ }, [
1247
+ r("div", go, [
1248
+ y(t.$slots, "default", { close: a })
1249
+ ])
1250
+ ])
1251
+ ])
1252
+ ])) : p("", !0)
1253
+ ]),
1254
+ _: 3
1255
+ })
1256
+ ]));
1257
+ }
1258
+ });
1259
+ export {
1260
+ $o as Btn,
1261
+ Co as Checkbox,
1262
+ zo as Combobox,
1263
+ To as ComboboxInput,
1264
+ So as ComboboxOption,
1265
+ Ao as ComboboxOptions,
1266
+ Bo as Input,
1267
+ Ho as Menu,
1268
+ Po as MenuItem,
1269
+ jo as MenuItems,
1270
+ qo as Modal,
1271
+ vo as Notification,
1272
+ Xo as NotificationQueue,
1273
+ No as Offcanvas,
1274
+ Fo as Popover,
1275
+ Lo as PopoverDialog,
1276
+ Zo as Progressbar,
1277
+ Io as Radio,
1278
+ Mo as Select,
1279
+ Eo as Switch,
1280
+ Oo as Tab,
1281
+ Ro as TabContainer,
1282
+ Uo as TabList,
1283
+ Go as TabPanel,
1284
+ Vo as Textarea,
1285
+ ye as useClassList
1286
+ };