@defaultusr/dai-ui 1.2.6 → 1.2.8

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