@defaultusr/dai-ui 1.2.7 → 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.
- package/dist/assets/btn.css +1 -0
- package/dist/assets/btn2.css +1 -0
- package/dist/assets/checkbox.css +1 -0
- package/dist/assets/combobox.css +1 -0
- package/dist/assets/comboboxButton.css +1 -0
- package/dist/assets/comboboxOption.css +1 -0
- package/dist/assets/comboboxOptions.css +1 -0
- package/dist/assets/formControl.css +1 -0
- package/dist/assets/formControl2.css +1 -0
- package/dist/assets/hint.css +1 -0
- package/dist/assets/input.css +1 -0
- package/dist/assets/inputGroup.css +1 -0
- package/dist/assets/label.css +1 -0
- package/dist/assets/menuItem.css +1 -0
- package/dist/assets/menuItems.css +1 -0
- package/dist/assets/modal.css +1 -0
- package/dist/assets/notification.css +1 -0
- package/dist/assets/notificationQueue.css +1 -0
- package/dist/assets/offcanvas.css +1 -0
- package/dist/assets/popoverDialog.css +1 -0
- package/dist/assets/progressbar.css +1 -0
- package/dist/assets/radio.css +1 -0
- package/dist/assets/select.css +1 -0
- package/dist/assets/styles.css +1 -0
- package/dist/assets/switch.css +1 -0
- package/dist/assets/tab.css +1 -0
- package/dist/assets/tabList.css +1 -0
- package/dist/assets/textarea.css +1 -0
- package/dist/assets/theme.css +0 -0
- package/dist/btn.js +4 -0
- package/dist/btn2.js +21 -0
- package/dist/checkbox.js +4 -0
- package/dist/chunks/btn.vue_vue_type_style_index_0_lang.5BQwBY73.js +86 -0
- package/dist/chunks/checkbox.vue_vue_type_style_index_0_lang.B_oNe5jU.js +90 -0
- package/dist/chunks/combobox.vue_vue_type_style_index_0_lang.BlQL2V7j.js +66 -0
- package/dist/chunks/comboboxButton.vue_vue_type_style_index_0_lang.B2_SbS8t.js +47 -0
- package/dist/chunks/comboboxInput.vue_vue_type_script_setup_true_lang.r8_P3SHy.js +16 -0
- package/dist/chunks/comboboxOption.vue_vue_type_style_index_0_lang.BY-JfDPY.js +38 -0
- package/dist/chunks/comboboxOptions.vue_vue_type_style_index_0_lang.OHgMyOoq.js +24 -0
- package/dist/chunks/formControl.vue_vue_type_style_index_0_lang.BDPmQzJj.js +82 -0
- package/dist/chunks/hint.vue_vue_type_style_index_0_lang.SPjr3dc1.js +17 -0
- package/dist/chunks/input.vue_vue_type_style_index_0_lang.D3fu8I8W.js +169 -0
- package/dist/chunks/inputGroup.vue_vue_type_style_index_0_lang.DSVR29CT.js +42 -0
- package/dist/chunks/label.vue_vue_type_style_index_0_lang.CwYm9LGb.js +17 -0
- package/dist/chunks/menuItem.vue_vue_type_style_index_0_lang._R8jj8CJ.js +30 -0
- package/dist/chunks/menuItems.vue_vue_type_style_index_0_lang.7SUAn0w9.js +24 -0
- package/dist/chunks/modal.vue_vue_type_style_index_0_lang.D0DMfpMl.js +52 -0
- package/dist/chunks/notification.vue_vue_type_style_index_0_lang.RHzcHM7o.js +102 -0
- package/dist/chunks/notificationQueue.vue_vue_type_style_index_0_lang.CewiEx4A.js +72 -0
- package/dist/chunks/offcanvas.vue_vue_type_style_index_0_lang.klTcX-xU.js +65 -0
- package/dist/chunks/popoverDialog.vue_vue_type_style_index_0_lang.C9Gy_hn0.js +24 -0
- package/dist/chunks/progressbar.vue_vue_type_style_index_0_lang.orj5zxpX.js +43 -0
- package/dist/chunks/radio.vue_vue_type_style_index_0_lang.Cb2ovoqT.js +62 -0
- package/dist/chunks/select.vue_vue_type_style_index_0_lang.B6lvc8dR.js +82 -0
- package/dist/chunks/selectbox.vue_vue_type_script_setup_true_lang.CGBGE61U.js +66 -0
- package/dist/chunks/switch.vue_vue_type_style_index_0_lang.B5M6C42g.js +58 -0
- package/dist/chunks/tab.vue_vue_type_style_index_0_lang.O7L_ECaN.js +26 -0
- package/dist/chunks/tabList.vue_vue_type_style_index_0_lang.iu2mVb2k.js +39 -0
- package/dist/chunks/textarea.vue_vue_type_style_index_0_lang.hsJmfBbY.js +56 -0
- package/dist/classList.js +23 -0
- package/dist/combobox.js +4 -0
- package/dist/comboboxButton.js +4 -0
- package/dist/comboboxInput.js +4 -0
- package/dist/comboboxOption.js +4 -0
- package/dist/comboboxOptions.js +4 -0
- package/dist/formControl.js +4 -0
- package/dist/formControl2.js +80 -0
- package/dist/hint.js +4 -0
- package/dist/index.js +30 -0
- package/dist/index2.js +6 -0
- package/dist/index3.js +12 -0
- package/dist/input.js +4 -0
- package/dist/inputGroup.js +4 -0
- package/dist/label.js +4 -0
- package/dist/main.js +57 -1394
- package/dist/menuItem.js +4 -0
- package/dist/menuItems.js +4 -0
- package/dist/modal.js +4 -0
- package/dist/notification.js +4 -0
- package/dist/notificationQueue.js +4 -0
- package/dist/offcanvas.js +4 -0
- package/dist/popoverDialog.js +4 -0
- package/dist/progressbar.js +4 -0
- package/dist/radio.js +4 -0
- package/dist/select.js +4 -0
- package/dist/selectbox.js +4 -0
- package/dist/switch.js +4 -0
- package/dist/tab.js +4 -0
- package/dist/tabList.js +4 -0
- package/dist/textarea.js +4 -0
- package/package.json +1 -1
- package/dist/assets/main.css +0 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineComponent as a, createBlock as r, openBlock as t, Transition as i, withCtx as o, createVNode as p, unref as l, renderSlot as n } from "vue";
|
|
2
|
+
import { PopoverDialog as s } from "vue-composable-ui";
|
|
3
|
+
import '../assets/popoverDialog.css';const f = /* @__PURE__ */ a({
|
|
4
|
+
__name: "popoverDialog",
|
|
5
|
+
setup(d) {
|
|
6
|
+
return (e, c) => (t(), r(i, {
|
|
7
|
+
"enter-from-class": "dai-popover-dialog--anim",
|
|
8
|
+
"leave-to-class": "dai-popover-dialog--anim"
|
|
9
|
+
}, {
|
|
10
|
+
default: o(() => [
|
|
11
|
+
p(l(s), { class: "dai-popover-dialog" }, {
|
|
12
|
+
default: o(() => [
|
|
13
|
+
n(e.$slots, "default")
|
|
14
|
+
]),
|
|
15
|
+
_: 3
|
|
16
|
+
})
|
|
17
|
+
]),
|
|
18
|
+
_: 3
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
f as _
|
|
24
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent as l, computed as t, createElementBlock as i, openBlock as c, normalizeStyle as a, normalizeClass as n, createElementVNode as u } from "vue";
|
|
2
|
+
import '../assets/progressbar.css';const s = ["aria-valuenow"], m = /* @__PURE__ */ l({
|
|
3
|
+
__name: "progressbar",
|
|
4
|
+
props: {
|
|
5
|
+
value: {},
|
|
6
|
+
color: { default: "primary" },
|
|
7
|
+
height: { default: 5 },
|
|
8
|
+
rounded: { type: Boolean, default: !0 }
|
|
9
|
+
},
|
|
10
|
+
setup(e) {
|
|
11
|
+
const r = e, o = t(() => r.value === void 0);
|
|
12
|
+
return (d, g) => (c(), i("div", {
|
|
13
|
+
class: n(["overflow-hidden text-xs w-full flex-1", {
|
|
14
|
+
rounded: e.rounded,
|
|
15
|
+
"bg-primary-200": e.color == "primary",
|
|
16
|
+
"bg-success-200": e.color == "success",
|
|
17
|
+
"bg-info-200": e.color == "info",
|
|
18
|
+
"bg-warning-200": e.color == "warning",
|
|
19
|
+
"bg-danger-200": e.color == "danger"
|
|
20
|
+
}]),
|
|
21
|
+
style: a({ height: e.height + "px" }),
|
|
22
|
+
role: "progressbar",
|
|
23
|
+
"aria-valuemin": "0",
|
|
24
|
+
"aria-valuemax": "100",
|
|
25
|
+
"aria-valuenow": e.value
|
|
26
|
+
}, [
|
|
27
|
+
u("div", {
|
|
28
|
+
style: a(`width:${e.value}%`),
|
|
29
|
+
class: n([{
|
|
30
|
+
"bg-primary-500": e.color == "primary",
|
|
31
|
+
"bg-success-500": e.color == "success",
|
|
32
|
+
"bg-info-500": e.color == "info",
|
|
33
|
+
"bg-warning-500": e.color == "warning",
|
|
34
|
+
"bg-danger-500": e.color == "danger",
|
|
35
|
+
"progress-infinite": o.value
|
|
36
|
+
}, "h-full shadow-none relative text-center whitespace-nowrap text-white justify-center"])
|
|
37
|
+
}, null, 6)
|
|
38
|
+
], 14, s));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
m as _
|
|
43
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { defineComponent as h, mergeModels as y, useModel as V, useId as p, useTemplateRef as E, createElementBlock as t, openBlock as o, normalizeClass as k, createElementVNode as l, createCommentVNode as c, withDirectives as x, mergeProps as b, unref as a, vModelRadio as g, toDisplayString as u } from "vue";
|
|
2
|
+
import { useFormControl as B } from "vue-composable-ui";
|
|
3
|
+
import '../assets/radio.css';const C = { class: "flex items-center h-5" }, M = ["value", "id"], w = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "text-sm"
|
|
6
|
+
}, $ = ["for"], D = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "text-secondary-500 dark:text-secondary-400"
|
|
9
|
+
}, z = /* @__PURE__ */ h({
|
|
10
|
+
inheritAttrs: !1,
|
|
11
|
+
__name: "radio",
|
|
12
|
+
props: /* @__PURE__ */ y({
|
|
13
|
+
value: {},
|
|
14
|
+
color: { default: "primary" },
|
|
15
|
+
validators: {},
|
|
16
|
+
showValidationError: { type: Boolean, default: !0 },
|
|
17
|
+
label: {},
|
|
18
|
+
hint: {}
|
|
19
|
+
}, {
|
|
20
|
+
modelValue: { type: Boolean },
|
|
21
|
+
modelModifiers: {}
|
|
22
|
+
}),
|
|
23
|
+
emits: ["update:modelValue"],
|
|
24
|
+
setup(e) {
|
|
25
|
+
const s = e, r = V(e, "modelValue"), i = p(), n = E("formElement"), { isValid: f } = B(
|
|
26
|
+
n,
|
|
27
|
+
s.validators,
|
|
28
|
+
s.showValidationError
|
|
29
|
+
);
|
|
30
|
+
return (d, m) => (o(), t("div", {
|
|
31
|
+
class: k(["flex items-start gap-3", d.$attrs.class])
|
|
32
|
+
}, [
|
|
33
|
+
l("div", C, [
|
|
34
|
+
x(l("input", b({
|
|
35
|
+
type: "radio",
|
|
36
|
+
ref_key: "formElement",
|
|
37
|
+
ref: n,
|
|
38
|
+
"onUpdate:modelValue": m[0] || (m[0] = (v) => r.value = v)
|
|
39
|
+
}, { ...d.$attrs, class: "" }, {
|
|
40
|
+
value: e.value,
|
|
41
|
+
id: a(i),
|
|
42
|
+
class: ["radio", {
|
|
43
|
+
[`radio--${e.color}`]: e.color,
|
|
44
|
+
"radio--invalid": !a(f)
|
|
45
|
+
}]
|
|
46
|
+
}), null, 16, M), [
|
|
47
|
+
[g, r.value]
|
|
48
|
+
])
|
|
49
|
+
]),
|
|
50
|
+
e.label ? (o(), t("div", w, [
|
|
51
|
+
l("label", {
|
|
52
|
+
for: a(i),
|
|
53
|
+
class: "font-medium select-none cursor-pointer"
|
|
54
|
+
}, u(e.label), 9, $),
|
|
55
|
+
e.hint ? (o(), t("p", D, u(e.hint), 1)) : c("", !0)
|
|
56
|
+
])) : c("", !0)
|
|
57
|
+
], 2));
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
z as _
|
|
62
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent as p, mergeModels as g, useId as B, useModel as V, useTemplateRef as y, createBlock as w, openBlock as n, mergeProps as m, unref as a, withCtx as h, withDirectives as E, createElementVNode as s, renderSlot as M, createElementBlock as f, Fragment as b, renderList as k, toDisplayString as x, vModelSelect as C } from "vue";
|
|
2
|
+
import { useFormControl as $ } from "vue-composable-ui";
|
|
3
|
+
import { _ as F } from "./formControl.vue_vue_type_style_index_0_lang.BDPmQzJj.js";
|
|
4
|
+
import '../assets/select.css';const L = ["id"], S = ["value"], z = /* @__PURE__ */ p({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "select",
|
|
7
|
+
props: /* @__PURE__ */ g({
|
|
8
|
+
id: {},
|
|
9
|
+
options: {},
|
|
10
|
+
optionText: { default: "text" },
|
|
11
|
+
optionValue: { default: "value" },
|
|
12
|
+
validators: {},
|
|
13
|
+
showValidationError: { type: Boolean, default: !1 },
|
|
14
|
+
labelPosition: {},
|
|
15
|
+
hint: {},
|
|
16
|
+
validationMessage: {},
|
|
17
|
+
lg: { type: Boolean },
|
|
18
|
+
sm: { type: Boolean },
|
|
19
|
+
outlined: { type: Boolean },
|
|
20
|
+
muted: { type: Boolean },
|
|
21
|
+
label: {},
|
|
22
|
+
labelFor: {},
|
|
23
|
+
size: {},
|
|
24
|
+
variant: {},
|
|
25
|
+
rounded: { type: Boolean },
|
|
26
|
+
disabled: { type: Boolean },
|
|
27
|
+
invalid: { type: Boolean }
|
|
28
|
+
}, {
|
|
29
|
+
modelValue: {},
|
|
30
|
+
modelModifiers: {}
|
|
31
|
+
}),
|
|
32
|
+
emits: ["update:modelValue"],
|
|
33
|
+
setup(e) {
|
|
34
|
+
const o = e, r = o.id || B(), d = V(e, "modelValue"), u = y("formElement"), { isValid: v, validationMessage: c, validate: T } = $(
|
|
35
|
+
u,
|
|
36
|
+
o.validators,
|
|
37
|
+
o.showValidationError
|
|
38
|
+
);
|
|
39
|
+
return (i, t) => (n(), w(F, m(o, {
|
|
40
|
+
"label-for": a(r),
|
|
41
|
+
"validation-message": e.showValidationError ? "" : a(c),
|
|
42
|
+
invalid: o.invalid || !a(v),
|
|
43
|
+
class: i.$attrs.class
|
|
44
|
+
}), {
|
|
45
|
+
default: h(() => [
|
|
46
|
+
E(s("select", m({
|
|
47
|
+
ref_key: "formElement",
|
|
48
|
+
ref: u
|
|
49
|
+
}, { ...i.$attrs, class: void 0 }, {
|
|
50
|
+
id: a(r),
|
|
51
|
+
"onUpdate:modelValue": t[0] || (t[0] = (l) => d.value = l),
|
|
52
|
+
class: "dai-form-control__input-group__control dai-select"
|
|
53
|
+
}), [
|
|
54
|
+
M(i.$slots, "default", {}, () => [
|
|
55
|
+
(n(!0), f(b, null, k(e.options, (l) => (n(), f("option", {
|
|
56
|
+
value: l[e.optionValue],
|
|
57
|
+
key: l[e.optionValue]
|
|
58
|
+
}, x(l[e.optionText]), 9, S))), 128))
|
|
59
|
+
])
|
|
60
|
+
], 16, L), [
|
|
61
|
+
[C, d.value]
|
|
62
|
+
]),
|
|
63
|
+
t[1] || (t[1] = s("svg", {
|
|
64
|
+
class: "dai-select__chevron",
|
|
65
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
66
|
+
viewBox: "0 0 16 16"
|
|
67
|
+
}, [
|
|
68
|
+
s("path", {
|
|
69
|
+
fill: "currentColor",
|
|
70
|
+
"fill-rule": "evenodd",
|
|
71
|
+
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",
|
|
72
|
+
"clip-rule": "evenodd"
|
|
73
|
+
})
|
|
74
|
+
], -1))
|
|
75
|
+
]),
|
|
76
|
+
_: 3
|
|
77
|
+
}, 16, ["label-for", "validation-message", "invalid", "class"]));
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
export {
|
|
81
|
+
z as _
|
|
82
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineComponent as s, mergeModels as p, useModel as c, createBlock as d, openBlock as a, unref as l, mergeProps as f, withCtx as t, createVNode as r, createElementBlock as V, Fragment as y, renderList as B, createTextVNode as v, toDisplayString as x } from "vue";
|
|
2
|
+
import { _ as g } from "./combobox.vue_vue_type_style_index_0_lang.BlQL2V7j.js";
|
|
3
|
+
import "vue-composable-ui";
|
|
4
|
+
import { _ as h } from "./comboboxButton.vue_vue_type_style_index_0_lang.B2_SbS8t.js";
|
|
5
|
+
import { _ as b } from "./comboboxOptions.vue_vue_type_style_index_0_lang.OHgMyOoq.js";
|
|
6
|
+
import { _ as k } from "./comboboxOption.vue_vue_type_style_index_0_lang.BY-JfDPY.js";
|
|
7
|
+
const N = /* @__PURE__ */ s({
|
|
8
|
+
__name: "selectbox",
|
|
9
|
+
props: /* @__PURE__ */ p({
|
|
10
|
+
options: {},
|
|
11
|
+
optionText: { default: "text" },
|
|
12
|
+
optionValue: { default: "value" },
|
|
13
|
+
placeholder: {},
|
|
14
|
+
id: {},
|
|
15
|
+
validators: {},
|
|
16
|
+
showValidationError: { type: Boolean },
|
|
17
|
+
labelPosition: {},
|
|
18
|
+
hint: {},
|
|
19
|
+
validationMessage: {},
|
|
20
|
+
lg: { type: Boolean },
|
|
21
|
+
sm: { type: Boolean },
|
|
22
|
+
outlined: { type: Boolean },
|
|
23
|
+
muted: { type: Boolean },
|
|
24
|
+
label: {},
|
|
25
|
+
labelFor: {},
|
|
26
|
+
size: {},
|
|
27
|
+
variant: {},
|
|
28
|
+
rounded: { type: Boolean },
|
|
29
|
+
disabled: { type: Boolean },
|
|
30
|
+
invalid: { type: Boolean }
|
|
31
|
+
}, {
|
|
32
|
+
modelValue: {},
|
|
33
|
+
modelModifiers: {}
|
|
34
|
+
}),
|
|
35
|
+
emits: ["update:modelValue"],
|
|
36
|
+
setup(e) {
|
|
37
|
+
const u = e, n = c(e, "modelValue");
|
|
38
|
+
return (M, i) => (a(), d(l(g), f(u, {
|
|
39
|
+
displayValue: (o) => e.options.find((m) => m[e.optionValue] === o)?.[e.optionText] || "",
|
|
40
|
+
modelValue: n.value,
|
|
41
|
+
"onUpdate:modelValue": i[0] || (i[0] = (o) => n.value = o)
|
|
42
|
+
}), {
|
|
43
|
+
default: t(() => [
|
|
44
|
+
r(l(h), { placeholder: e.placeholder }, null, 8, ["placeholder"]),
|
|
45
|
+
r(l(b), null, {
|
|
46
|
+
default: t(() => [
|
|
47
|
+
(a(!0), V(y, null, B(e.options, (o) => (a(), d(l(k), {
|
|
48
|
+
key: o[e.optionValue],
|
|
49
|
+
value: o[e.optionValue]
|
|
50
|
+
}, {
|
|
51
|
+
default: t(() => [
|
|
52
|
+
v(x(o[e.optionText]), 1)
|
|
53
|
+
]),
|
|
54
|
+
_: 2
|
|
55
|
+
}, 1032, ["value"]))), 128))
|
|
56
|
+
]),
|
|
57
|
+
_: 1
|
|
58
|
+
})
|
|
59
|
+
]),
|
|
60
|
+
_: 1
|
|
61
|
+
}, 16, ["displayValue", "modelValue"]));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
export {
|
|
65
|
+
N as _
|
|
66
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineComponent as f, mergeModels as w, useModel as k, useId as b, createElementBlock as v, openBlock as i, createElementVNode as s, createBlock as n, createCommentVNode as d, normalizeClass as _, unref as r, withCtx as c, renderSlot as u, createTextVNode as m, toDisplayString as h } from "vue";
|
|
2
|
+
import { _ as $ } from "./label.vue_vue_type_style_index_0_lang.CwYm9LGb.js";
|
|
3
|
+
import { _ as V } from "./hint.vue_vue_type_style_index_0_lang.SPjr3dc1.js";
|
|
4
|
+
import '../assets/switch.css';const p = { class: "dai-switch-control" }, y = ["id", "aria-checked"], g = /* @__PURE__ */ f({
|
|
5
|
+
__name: "switch",
|
|
6
|
+
props: /* @__PURE__ */ w({
|
|
7
|
+
label: {},
|
|
8
|
+
hint: {}
|
|
9
|
+
}, {
|
|
10
|
+
modelValue: { type: Boolean },
|
|
11
|
+
modelModifiers: {}
|
|
12
|
+
}),
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(e) {
|
|
15
|
+
const t = k(e, "modelValue"), a = b();
|
|
16
|
+
return (o, l) => (i(), v("div", p, [
|
|
17
|
+
s("button", {
|
|
18
|
+
onClick: l[0] || (l[0] = (C) => t.value = !t.value),
|
|
19
|
+
id: r(a),
|
|
20
|
+
"aria-checked": t.value,
|
|
21
|
+
role: "switch",
|
|
22
|
+
type: "button",
|
|
23
|
+
tabindex: "0",
|
|
24
|
+
class: _(["dai-switch", [t.value ? "dai-switch--on" : "dai-switch--off"]])
|
|
25
|
+
}, [...l[1] || (l[1] = [
|
|
26
|
+
s("div", {
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
class: "dai-switch__thumb"
|
|
29
|
+
}, null, -1)
|
|
30
|
+
])], 10, y),
|
|
31
|
+
e.label || o.$slots.default ? (i(), n($, {
|
|
32
|
+
key: 0,
|
|
33
|
+
for: r(a)
|
|
34
|
+
}, {
|
|
35
|
+
default: c(() => [
|
|
36
|
+
u(o.$slots, "default", {}, () => [
|
|
37
|
+
m(h(e.label), 1)
|
|
38
|
+
])
|
|
39
|
+
]),
|
|
40
|
+
_: 3
|
|
41
|
+
}, 8, ["for"])) : d("", !0),
|
|
42
|
+
e.hint || o.$slots.hint ? (i(), n(V, {
|
|
43
|
+
key: 1,
|
|
44
|
+
class: "dai-switch-control__hint"
|
|
45
|
+
}, {
|
|
46
|
+
default: c(() => [
|
|
47
|
+
u(o.$slots, "hint", {}, () => [
|
|
48
|
+
m(h(e.hint), 1)
|
|
49
|
+
])
|
|
50
|
+
]),
|
|
51
|
+
_: 3
|
|
52
|
+
})) : d("", !0)
|
|
53
|
+
]));
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
export {
|
|
57
|
+
g as _
|
|
58
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineComponent as t, createBlock as o, openBlock as r, unref as l, withCtx as n, renderSlot as i } from "vue";
|
|
2
|
+
import { Tab as s } from "vue-composable-ui";
|
|
3
|
+
import '../assets/tab.css';const f = /* @__PURE__ */ t({
|
|
4
|
+
__name: "tab",
|
|
5
|
+
props: {
|
|
6
|
+
id: {},
|
|
7
|
+
ariaControls: {},
|
|
8
|
+
value: {}
|
|
9
|
+
},
|
|
10
|
+
setup(a) {
|
|
11
|
+
return (e, c) => (r(), o(l(s), {
|
|
12
|
+
id: a.id,
|
|
13
|
+
"aria-controls": a.ariaControls,
|
|
14
|
+
value: a.value,
|
|
15
|
+
class: "dai-tab"
|
|
16
|
+
}, {
|
|
17
|
+
default: n(() => [
|
|
18
|
+
i(e.$slots, "default")
|
|
19
|
+
]),
|
|
20
|
+
_: 3
|
|
21
|
+
}, 8, ["id", "aria-controls", "value"]));
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
f as _
|
|
26
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { defineComponent as a, useTemplateRef as f, ref as o, onMounted as n, nextTick as c, createBlock as u, openBlock as d, unref as _, withCtx as p, createElementVNode as m, renderSlot as b, normalizeStyle as v } from "vue";
|
|
2
|
+
import { TabList as h } from "vue-composable-ui";
|
|
3
|
+
import '../assets/tabList.css';const x = /* @__PURE__ */ a({
|
|
4
|
+
__name: "tabList",
|
|
5
|
+
setup(k) {
|
|
6
|
+
const r = f("tablist"), s = f("slider"), l = o({});
|
|
7
|
+
function i() {
|
|
8
|
+
if (!s.value) return;
|
|
9
|
+
const t = r.value?.$el;
|
|
10
|
+
if (!t) return;
|
|
11
|
+
const e = t.querySelector("[aria-selected=true]");
|
|
12
|
+
e && (l.value = {
|
|
13
|
+
left: `${e.offsetLeft}px`,
|
|
14
|
+
right: `${t.offsetWidth - e.offsetLeft - e.offsetWidth}px`,
|
|
15
|
+
transition: s.value.offsetLeft > e.offsetLeft ? "left .2s, right .5s" : "left .5s, right .2s"
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
return n(() => c(i)), (t, e) => (d(), u(_(h), {
|
|
19
|
+
ref_key: "tablist",
|
|
20
|
+
ref: r,
|
|
21
|
+
onClickPassive: i,
|
|
22
|
+
class: "dai-tab-list"
|
|
23
|
+
}, {
|
|
24
|
+
default: p(() => [
|
|
25
|
+
m("div", {
|
|
26
|
+
ref_key: "slider",
|
|
27
|
+
ref: s,
|
|
28
|
+
class: "dai-tab-list__slider",
|
|
29
|
+
style: v(l.value)
|
|
30
|
+
}, null, 4),
|
|
31
|
+
b(t.$slots, "default")
|
|
32
|
+
]),
|
|
33
|
+
_: 3
|
|
34
|
+
}, 512));
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
export {
|
|
38
|
+
x as _
|
|
39
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineComponent as v, mergeModels as p, useId as h, useModel as g, useTemplateRef as V, onMounted as x, createBlock as E, openBlock as y, mergeProps as u, unref as o, withCtx as M, withDirectives as _, createElementVNode as w, vModelText as z } from "vue";
|
|
2
|
+
import { useFormControl as $ } from "vue-composable-ui";
|
|
3
|
+
import { _ as B } from "./formControl.vue_vue_type_style_index_0_lang.BDPmQzJj.js";
|
|
4
|
+
import '../assets/textarea.css';const k = ["id"], b = /* @__PURE__ */ v({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "textarea",
|
|
7
|
+
props: /* @__PURE__ */ p({
|
|
8
|
+
id: {},
|
|
9
|
+
autosize: { type: Boolean },
|
|
10
|
+
validators: {},
|
|
11
|
+
showValidationError: { type: Boolean, default: !1 }
|
|
12
|
+
}, {
|
|
13
|
+
modelValue: {},
|
|
14
|
+
modelModifiers: {}
|
|
15
|
+
}),
|
|
16
|
+
emits: ["update:modelValue"],
|
|
17
|
+
setup(s) {
|
|
18
|
+
const a = s, i = a.id || h(), r = g(s, "modelValue"), l = V("formElement"), { isValid: n, validationMessage: f, validate: c } = $(
|
|
19
|
+
l,
|
|
20
|
+
a.validators,
|
|
21
|
+
a.showValidationError
|
|
22
|
+
);
|
|
23
|
+
function d() {
|
|
24
|
+
if (!a.autosize) return;
|
|
25
|
+
const e = l.value, t = e.offsetHeight - e.clientHeight;
|
|
26
|
+
e.style.height = "auto", e.style.height = `${e.scrollHeight + t}px`;
|
|
27
|
+
}
|
|
28
|
+
return x(d), (e, t) => (y(), E(B, u(a, {
|
|
29
|
+
"label-for": o(i),
|
|
30
|
+
"validation-message": s.showValidationError ? "" : o(f),
|
|
31
|
+
invalid: !o(n),
|
|
32
|
+
class: e.$attrs.class
|
|
33
|
+
}), {
|
|
34
|
+
default: M(() => [
|
|
35
|
+
_(w("textarea", u({
|
|
36
|
+
ref_key: "formElement",
|
|
37
|
+
ref: l
|
|
38
|
+
}, { ...e.$attrs, class: void 0 }, {
|
|
39
|
+
id: o(i),
|
|
40
|
+
"onUpdate:modelValue": t[0] || (t[0] = (m) => r.value = m),
|
|
41
|
+
onKeyupPassive: t[1] || (t[1] = (m) => !o(n) && o(c)()),
|
|
42
|
+
onInputPassive: d,
|
|
43
|
+
class: ["form-control__textarea", {
|
|
44
|
+
"form-control__textarea--autosize": s.autosize
|
|
45
|
+
}]
|
|
46
|
+
}), null, 16, k), [
|
|
47
|
+
[z, r.value]
|
|
48
|
+
])
|
|
49
|
+
]),
|
|
50
|
+
_: 1
|
|
51
|
+
}, 16, ["label-for", "validation-message", "invalid", "class"]));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
export {
|
|
55
|
+
b as _
|
|
56
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { reactive as r, watch as a, onUnmounted as c } from "vue";
|
|
2
|
+
function m(e, ...n) {
|
|
3
|
+
let s = [];
|
|
4
|
+
const t = r(n);
|
|
5
|
+
function o() {
|
|
6
|
+
t.length && (e.classList.add(...t), s = [...t]);
|
|
7
|
+
}
|
|
8
|
+
function i() {
|
|
9
|
+
e.classList.remove(...s);
|
|
10
|
+
}
|
|
11
|
+
return a(
|
|
12
|
+
t,
|
|
13
|
+
() => {
|
|
14
|
+
i(), o();
|
|
15
|
+
},
|
|
16
|
+
{ immediate: !0 }
|
|
17
|
+
), c(i), {
|
|
18
|
+
classList: t
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
m as useClassList
|
|
23
|
+
};
|
package/dist/combobox.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { defineComponent as f, useId as u, computed as b, createElementBlock as o, openBlock as t, normalizeClass as v, createCommentVNode as n, createElementVNode as i, unref as s, toDisplayString as d, renderSlot as y, createTextVNode as g } from "vue";
|
|
2
|
+
import './assets/formControl2.css';const h = ["id"], B = ["for"], I = { class: "form-control__container" }, k = { class: "form-control__input-group" }, w = ["for"], C = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "form-control__hint"
|
|
5
|
+
}, M = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "form-control__validation-message",
|
|
8
|
+
role: "alert"
|
|
9
|
+
}, $ = /* @__PURE__ */ f({
|
|
10
|
+
inheritAttrs: !1,
|
|
11
|
+
__name: "formControl",
|
|
12
|
+
props: {
|
|
13
|
+
id: {},
|
|
14
|
+
containerId: {},
|
|
15
|
+
label: {},
|
|
16
|
+
labelInline: { type: Boolean },
|
|
17
|
+
labelInside: { type: Boolean },
|
|
18
|
+
hint: {},
|
|
19
|
+
validationMessage: {},
|
|
20
|
+
outlined: { type: Boolean },
|
|
21
|
+
muted: { type: Boolean },
|
|
22
|
+
rounded: { type: Boolean },
|
|
23
|
+
disabled: { type: Boolean },
|
|
24
|
+
invalid: { type: Boolean },
|
|
25
|
+
lg: { type: Boolean },
|
|
26
|
+
sm: { type: Boolean },
|
|
27
|
+
autocomplete: { type: [String, Boolean], default: "off" }
|
|
28
|
+
},
|
|
29
|
+
setup(e) {
|
|
30
|
+
const l = e, r = l.id || u(), m = b(() => typeof l.autocomplete == "string" ? l.autocomplete : l.autocomplete ? "on" : "off");
|
|
31
|
+
return (a, c) => (t(), o("div", {
|
|
32
|
+
id: e.containerId,
|
|
33
|
+
class: v(["form-control", {
|
|
34
|
+
[a.$attrs.class]: a.$attrs.class,
|
|
35
|
+
"form-control--label-inline": e.labelInline,
|
|
36
|
+
"form-control--label-inside": e.labelInside,
|
|
37
|
+
"form-control--outlined": e.outlined,
|
|
38
|
+
"form-control--muted": e.muted,
|
|
39
|
+
"form-control--rounded": e.rounded,
|
|
40
|
+
"form-control--disabled": e.disabled,
|
|
41
|
+
"form-control--invalid": e.invalid,
|
|
42
|
+
"form-control--lg": e.lg,
|
|
43
|
+
"form-control--sm": e.sm
|
|
44
|
+
}])
|
|
45
|
+
}, [
|
|
46
|
+
e.label && !e.labelInside ? (t(), o("label", {
|
|
47
|
+
key: 0,
|
|
48
|
+
for: s(r)
|
|
49
|
+
}, d(e.label), 9, B)) : n("", !0),
|
|
50
|
+
i("div", I, [
|
|
51
|
+
i("div", k, [
|
|
52
|
+
e.label && e.labelInside ? (t(), o("label", {
|
|
53
|
+
key: 0,
|
|
54
|
+
for: s(r)
|
|
55
|
+
}, d(e.label), 9, w)) : n("", !0),
|
|
56
|
+
y(a.$slots, "default", {
|
|
57
|
+
attrs: { id: s(r), disabled: e.disabled, autocomplete: m.value, ...a.$attrs, class: "" }
|
|
58
|
+
})
|
|
59
|
+
]),
|
|
60
|
+
e.hint ? (t(), o("div", C, d(e.hint), 1)) : n("", !0),
|
|
61
|
+
e.validationMessage ? (t(), o("div", M, [
|
|
62
|
+
c[0] || (c[0] = i("svg", {
|
|
63
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
64
|
+
viewBox: "0 0 256 256",
|
|
65
|
+
class: ""
|
|
66
|
+
}, [
|
|
67
|
+
i("path", {
|
|
68
|
+
fill: "currentColor",
|
|
69
|
+
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"
|
|
70
|
+
})
|
|
71
|
+
], -1)),
|
|
72
|
+
g(" " + d(e.validationMessage), 1)
|
|
73
|
+
])) : n("", !0)
|
|
74
|
+
])
|
|
75
|
+
], 10, h));
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
export {
|
|
79
|
+
$ as default
|
|
80
|
+
};
|
package/dist/hint.js
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { _ as t } from "./chunks/label.vue_vue_type_style_index_0_lang.CwYm9LGb.js";
|
|
2
|
+
import { _ as x } from "./chunks/hint.vue_vue_type_style_index_0_lang.SPjr3dc1.js";
|
|
3
|
+
import { _ as a } from "./chunks/combobox.vue_vue_type_style_index_0_lang.BlQL2V7j.js";
|
|
4
|
+
import { _ as s } from "./chunks/comboboxInput.vue_vue_type_script_setup_true_lang.r8_P3SHy.js";
|
|
5
|
+
import { _ } from "./chunks/comboboxButton.vue_vue_type_style_index_0_lang.B2_SbS8t.js";
|
|
6
|
+
import { _ as n } from "./chunks/comboboxOptions.vue_vue_type_style_index_0_lang.OHgMyOoq.js";
|
|
7
|
+
import { _ as i } from "./chunks/comboboxOption.vue_vue_type_style_index_0_lang.BY-JfDPY.js";
|
|
8
|
+
import { _ as l } from "./chunks/input.vue_vue_type_style_index_0_lang.D3fu8I8W.js";
|
|
9
|
+
import { _ as S } from "./chunks/select.vue_vue_type_style_index_0_lang.B6lvc8dR.js";
|
|
10
|
+
import { _ as I } from "./chunks/selectbox.vue_vue_type_script_setup_true_lang.CGBGE61U.js";
|
|
11
|
+
import { _ as d } from "./chunks/textarea.vue_vue_type_style_index_0_lang.hsJmfBbY.js";
|
|
12
|
+
import { _ as w } from "./chunks/checkbox.vue_vue_type_style_index_0_lang.B_oNe5jU.js";
|
|
13
|
+
import { _ as H } from "./chunks/radio.vue_vue_type_style_index_0_lang.Cb2ovoqT.js";
|
|
14
|
+
import { _ as R } from "./chunks/switch.vue_vue_type_style_index_0_lang.B5M6C42g.js";
|
|
15
|
+
export {
|
|
16
|
+
w as Checkbox,
|
|
17
|
+
a as Combobox,
|
|
18
|
+
_ as ComboboxButton,
|
|
19
|
+
s as ComboboxInput,
|
|
20
|
+
i as ComboboxOption,
|
|
21
|
+
n as ComboboxOptions,
|
|
22
|
+
x as Hint,
|
|
23
|
+
l as Input,
|
|
24
|
+
t as Label,
|
|
25
|
+
H as Radio,
|
|
26
|
+
S as Select,
|
|
27
|
+
I as Selectbox,
|
|
28
|
+
R as Switch,
|
|
29
|
+
d as Textarea
|
|
30
|
+
};
|
package/dist/index2.js
ADDED
package/dist/index3.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { _ as m } from "./chunks/combobox.vue_vue_type_style_index_0_lang.BlQL2V7j.js";
|
|
2
|
+
import { _ as t } from "./chunks/comboboxInput.vue_vue_type_script_setup_true_lang.r8_P3SHy.js";
|
|
3
|
+
import { _ as p } from "./chunks/comboboxButton.vue_vue_type_style_index_0_lang.B2_SbS8t.js";
|
|
4
|
+
import { _ as a } from "./chunks/comboboxOptions.vue_vue_type_style_index_0_lang.OHgMyOoq.js";
|
|
5
|
+
import { _ as f } from "./chunks/comboboxOption.vue_vue_type_style_index_0_lang.BY-JfDPY.js";
|
|
6
|
+
export {
|
|
7
|
+
m as Combobox,
|
|
8
|
+
p as ComboboxButton,
|
|
9
|
+
t as ComboboxInput,
|
|
10
|
+
f as ComboboxOption,
|
|
11
|
+
a as ComboboxOptions
|
|
12
|
+
};
|
package/dist/input.js
ADDED