@defaultusr/dai-ui 1.2.8 → 1.2.10
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 -1
- package/dist/assets/formControl.css +1 -1
- package/dist/assets/formControl2.css +1 -1
- package/dist/assets/inputGroup.css +1 -1
- package/dist/assets/modal.css +1 -1
- package/dist/assets/offcanvas.css +1 -1
- package/dist/assets/textarea.css +1 -1
- package/dist/btn.js +1 -1
- package/dist/btn2.js +2 -2
- package/dist/checkbox.js +1 -1
- package/dist/chunks/{btn.vue_vue_type_style_index_0_lang.5BQwBY73.js → btn.vue_vue_type_style_index_0_lang.12tGcr-X.js} +1 -1
- package/dist/chunks/{checkbox.vue_vue_type_style_index_0_lang.B_oNe5jU.js → checkbox.vue_vue_type_style_index_0_lang.GL2B1_1I.js} +18 -18
- package/dist/chunks/{combobox.vue_vue_type_style_index_0_lang.BlQL2V7j.js → combobox.vue_vue_type_style_index_0_lang.BM1fsgGg.js} +8 -8
- package/dist/chunks/{comboboxButton.vue_vue_type_style_index_0_lang.B2_SbS8t.js → comboboxButton.vue_vue_type_style_index_0_lang.BW2Z0Fou.js} +7 -7
- package/dist/chunks/{comboboxInput.vue_vue_type_script_setup_true_lang.r8_P3SHy.js → comboboxInput.vue_vue_type_script_setup_true_lang.DGuHr7IE.js} +2 -2
- package/dist/chunks/{comboboxOption.vue_vue_type_style_index_0_lang.BY-JfDPY.js → comboboxOption.vue_vue_type_style_index_0_lang.BUX-uGiu.js} +3 -3
- package/dist/chunks/{comboboxOptions.vue_vue_type_style_index_0_lang.OHgMyOoq.js → comboboxOptions.vue_vue_type_style_index_0_lang.mLedCwfy.js} +2 -2
- package/dist/chunks/{formControl.vue_vue_type_style_index_0_lang.BDPmQzJj.js → formControl.vue_vue_type_style_index_0_lang.DRmpDdyQ.js} +4 -4
- package/dist/chunks/{hint.vue_vue_type_style_index_0_lang.SPjr3dc1.js → hint.vue_vue_type_style_index_0_lang.DYrKdv83.js} +2 -2
- package/dist/chunks/{input.vue_vue_type_style_index_0_lang.D3fu8I8W.js → input.vue_vue_type_style_index_0_lang.BH1fm9ir.js} +12 -12
- package/dist/chunks/{inputGroup.vue_vue_type_style_index_0_lang.DSVR29CT.js → inputGroup.vue_vue_type_style_index_0_lang.CdANUKLU.js} +2 -2
- package/dist/chunks/{label.vue_vue_type_style_index_0_lang.CwYm9LGb.js → label.vue_vue_type_style_index_0_lang.D0NwD6yx.js} +2 -2
- package/dist/chunks/{menuItem.vue_vue_type_style_index_0_lang._R8jj8CJ.js → menuItem.vue_vue_type_style_index_0_lang.Dt6Zl5zF.js} +5 -5
- package/dist/chunks/{menuItems.vue_vue_type_style_index_0_lang.7SUAn0w9.js → menuItems.vue_vue_type_style_index_0_lang.BEJFFXeO.js} +2 -2
- package/dist/chunks/{modal.vue_vue_type_style_index_0_lang.D0DMfpMl.js → modal.vue_vue_type_style_index_0_lang.C3McFUCL.js} +4 -4
- package/dist/chunks/{notification.vue_vue_type_style_index_0_lang.RHzcHM7o.js → notification.vue_vue_type_style_index_0_lang.ouXaxuxK.js} +17 -17
- package/dist/chunks/{notificationQueue.vue_vue_type_style_index_0_lang.CewiEx4A.js → notificationQueue.vue_vue_type_style_index_0_lang.CmvIdz1d.js} +10 -10
- package/dist/chunks/{offcanvas.vue_vue_type_style_index_0_lang.klTcX-xU.js → offcanvas.vue_vue_type_style_index_0_lang.pX4AkwFX.js} +13 -13
- package/dist/chunks/{popoverDialog.vue_vue_type_style_index_0_lang.C9Gy_hn0.js → popoverDialog.vue_vue_type_style_index_0_lang.BQPgFdVd.js} +2 -2
- package/dist/chunks/{progressbar.vue_vue_type_style_index_0_lang.orj5zxpX.js → progressbar.vue_vue_type_style_index_0_lang.DZC-IpoL.js} +2 -2
- package/dist/chunks/{radio.vue_vue_type_style_index_0_lang.Cb2ovoqT.js → radio.vue_vue_type_style_index_0_lang.C_Iy9o5g.js} +11 -11
- package/dist/chunks/{select.vue_vue_type_style_index_0_lang.B6lvc8dR.js → select.vue_vue_type_style_index_0_lang.Yrvru3_T.js} +11 -11
- package/dist/chunks/{selectbox.vue_vue_type_script_setup_true_lang.CGBGE61U.js → selectbox.vue_vue_type_script_setup_true_lang.ByPbVEeF.js} +10 -10
- package/dist/chunks/switch.vue_vue_type_style_index_0_lang.DX8AF2Bu.js +58 -0
- package/dist/chunks/{tab.vue_vue_type_style_index_0_lang.O7L_ECaN.js → tab.vue_vue_type_style_index_0_lang.DhTDvv55.js} +2 -2
- package/dist/chunks/{tabList.vue_vue_type_style_index_0_lang.iu2mVb2k.js → tabList.vue_vue_type_style_index_0_lang.EtvPcPPy.js} +4 -4
- package/dist/chunks/{textarea.vue_vue_type_style_index_0_lang.hsJmfBbY.js → textarea.vue_vue_type_style_index_0_lang.DZTz49sQ.js} +8 -8
- package/dist/combobox.js +1 -1
- package/dist/comboboxButton.js +1 -1
- package/dist/comboboxInput.js +1 -1
- package/dist/comboboxOption.js +1 -1
- package/dist/comboboxOptions.js +1 -1
- package/dist/formControl.js +1 -1
- package/dist/formControl2.js +14 -14
- package/dist/hint.js +1 -1
- package/dist/index.js +10 -28
- package/dist/index2.js +2 -2
- package/dist/index3.js +28 -10
- package/dist/input.js +1 -1
- package/dist/inputGroup.js +1 -1
- package/dist/label.js +1 -1
- package/dist/main.js +25 -25
- package/dist/menuItem.js +1 -1
- package/dist/menuItems.js +1 -1
- package/dist/modal.js +1 -1
- package/dist/notification.js +1 -1
- package/dist/notificationQueue.js +1 -1
- package/dist/offcanvas.js +1 -1
- package/dist/popoverDialog.js +1 -1
- package/dist/progressbar.js +1 -1
- package/dist/radio.js +1 -1
- package/dist/select.js +1 -1
- package/dist/selectbox.js +1 -1
- package/dist/switch.js +1 -1
- package/dist/tab.js +1 -1
- package/dist/tabList.js +1 -1
- package/dist/textarea.js +1 -1
- package/dist/types/components/btn.vue.d.ts +5 -4
- package/dist/types/components/formControl.vue.d.ts +5 -3
- package/dist/types/components/input_controls/checkbox.vue.d.ts +8 -6
- package/dist/types/components/input_controls/combobox/combobox.vue.d.ts +7 -5
- package/dist/types/components/input_controls/combobox/comboboxButton.vue.d.ts +3 -2
- package/dist/types/components/input_controls/combobox/comboboxInput.vue.d.ts +5 -4
- package/dist/types/components/input_controls/combobox/comboboxOption.vue.d.ts +5 -4
- package/dist/types/components/input_controls/combobox/comboboxOptions.vue.d.ts +5 -4
- package/dist/types/components/input_controls/common/btn.vue.d.ts +3 -2
- package/dist/types/components/input_controls/common/formControl.vue.d.ts +5 -4
- package/dist/types/components/input_controls/common/hint.vue.d.ts +3 -2
- package/dist/types/components/input_controls/common/inputGroup.vue.d.ts +5 -4
- package/dist/types/components/input_controls/common/label.vue.d.ts +3 -2
- package/dist/types/components/input_controls/input/input.vue.d.ts +8 -6
- package/dist/types/components/input_controls/radio.vue.d.ts +4 -2
- package/dist/types/components/input_controls/select/select.vue.d.ts +15 -10
- package/dist/types/components/input_controls/selectbox/selectbox.stories.d.ts +30 -24
- package/dist/types/components/input_controls/selectbox/selectbox.vue.d.ts +15 -10
- package/dist/types/components/input_controls/switch.vue.d.ts +8 -6
- package/dist/types/components/input_controls/textarea.vue.d.ts +4 -2
- package/dist/types/components/menu/menuItem.vue.d.ts +5 -4
- package/dist/types/components/menu/menuItems.vue.d.ts +5 -4
- package/dist/types/components/modal.vue.d.ts +7 -6
- package/dist/types/components/notifications/notification.vue.d.ts +4 -2
- package/dist/types/components/notifications/notificationQueue.vue.d.ts +4 -2
- package/dist/types/components/offcanvas.vue.d.ts +7 -5
- package/dist/types/components/popoverDialog.vue.d.ts +5 -4
- package/dist/types/components/progressbar.vue.d.ts +2 -1
- package/dist/types/components/tabs/tab.vue.d.ts +5 -4
- package/dist/types/components/tabs/tabList.vue.d.ts +3 -2
- package/package.json +6 -6
- package/dist/chunks/switch.vue_vue_type_style_index_0_lang.B5M6C42g.js +0 -58
- /package/dist/assets/{theme.css → mixins.css} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as u,
|
|
1
|
+
import { defineComponent as u, useModel as k, watch as h, openBlock as t, createElementBlock as i, createElementVNode as n, normalizeClass as d, createCommentVNode as s, toDisplayString as r, mergeModels as f } from "vue";
|
|
2
2
|
import '../assets/notification.css';const v = {
|
|
3
3
|
key: 0,
|
|
4
4
|
role: "alert"
|
|
@@ -36,7 +36,7 @@ import '../assets/notification.css';const v = {
|
|
|
36
36
|
class: "dai-notification__content__detail"
|
|
37
37
|
}, V = /* @__PURE__ */ u({
|
|
38
38
|
__name: "notification",
|
|
39
|
-
props: /* @__PURE__ */
|
|
39
|
+
props: /* @__PURE__ */ f({
|
|
40
40
|
color: {},
|
|
41
41
|
icon: {},
|
|
42
42
|
message: {},
|
|
@@ -49,52 +49,52 @@ import '../assets/notification.css';const v = {
|
|
|
49
49
|
}),
|
|
50
50
|
emits: ["update:modelValue"],
|
|
51
51
|
setup(e) {
|
|
52
|
-
const l = e, o =
|
|
52
|
+
const l = e, o = k(e, "modelValue");
|
|
53
53
|
let c;
|
|
54
54
|
function m() {
|
|
55
55
|
clearTimeout(c), o.value && l.timeout && (c = setTimeout(() => o.value = !1, l.timeout));
|
|
56
56
|
}
|
|
57
|
-
return
|
|
58
|
-
|
|
57
|
+
return h(o, m, { immediate: !0 }), (C, a) => o.value ? (t(), i("div", v, [
|
|
58
|
+
n("div", {
|
|
59
59
|
class: d(["dai-notification", [`dai-notification--${e.color || "secondary"}`]])
|
|
60
60
|
}, [
|
|
61
|
-
e.icon ? (
|
|
61
|
+
e.icon ? (t(), i("div", {
|
|
62
62
|
key: 0,
|
|
63
63
|
class: d(["dai-notification__icon", [`dai-notification__icon--${e.icon}`]])
|
|
64
64
|
}, [
|
|
65
|
-
(
|
|
66
|
-
e.icon == "success" ? (
|
|
65
|
+
(t(), i("svg", w, [
|
|
66
|
+
e.icon == "success" ? (t(), i("path", g)) : e.icon == "info" ? (t(), i("path", _)) : e.icon == "warning" ? (t(), i("path", y)) : e.icon == "danger" ? (t(), i("path", M)) : s("", !0)
|
|
67
67
|
]))
|
|
68
|
-
], 2)) :
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
], 2)) : s("", !0),
|
|
69
|
+
n("div", x, [
|
|
70
|
+
n("div", {
|
|
71
71
|
class: d(["dai-notification__content__message", {
|
|
72
72
|
"dai-notification__content__message--bold": e.detail
|
|
73
73
|
}])
|
|
74
74
|
}, r(e.message), 3),
|
|
75
|
-
e.detail ? (
|
|
75
|
+
e.detail ? (t(), i("div", B, r(e.detail), 1)) : s("", !0)
|
|
76
76
|
]),
|
|
77
|
-
e.dismissible ? (
|
|
77
|
+
e.dismissible ? (t(), i("div", {
|
|
78
78
|
key: 1,
|
|
79
79
|
onClick: a[0] || (a[0] = (j) => o.value = !1),
|
|
80
80
|
class: "dai-notification__dismiss"
|
|
81
81
|
}, [...a[1] || (a[1] = [
|
|
82
|
-
|
|
82
|
+
n("svg", {
|
|
83
83
|
xmlns: "http://www.w3.org/2000/svg",
|
|
84
84
|
fill: "none",
|
|
85
85
|
viewBox: "0 0 24 24",
|
|
86
86
|
stroke: "currentColor"
|
|
87
87
|
}, [
|
|
88
|
-
|
|
88
|
+
n("path", {
|
|
89
89
|
"stroke-linecap": "round",
|
|
90
90
|
"stroke-linejoin": "round",
|
|
91
91
|
"stroke-width": "2",
|
|
92
92
|
d: "M6 18L18 6M6 6l12 12"
|
|
93
93
|
})
|
|
94
94
|
], -1)
|
|
95
|
-
])])) :
|
|
95
|
+
])])) : s("", !0)
|
|
96
96
|
], 2)
|
|
97
|
-
])) :
|
|
97
|
+
])) : s("", !0);
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
export {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { defineComponent as p,
|
|
2
|
-
import { _ as Y } from "./notification.vue_vue_type_style_index_0_lang.
|
|
1
|
+
import { defineComponent as p, useModel as h, ref as q, watch as v, computed as g, openBlock as u, createElementBlock as m, normalizeClass as x, createVNode as _, TransitionGroup as X, withCtx as w, Fragment as b, renderList as y, createBlock as C, mergeModels as V } from "vue";
|
|
2
|
+
import { _ as Y } from "./notification.vue_vue_type_style_index_0_lang.ouXaxuxK.js";
|
|
3
3
|
import '../assets/notificationQueue.css';const M = /* @__PURE__ */ p({
|
|
4
4
|
__name: "notificationQueue",
|
|
5
|
-
props: /* @__PURE__ */
|
|
5
|
+
props: /* @__PURE__ */ V({
|
|
6
6
|
length: { default: 3 },
|
|
7
7
|
timeout: { default: 4e3 },
|
|
8
8
|
position: { default: "fixed" },
|
|
@@ -14,7 +14,7 @@ import '../assets/notificationQueue.css';const M = /* @__PURE__ */ p({
|
|
|
14
14
|
}),
|
|
15
15
|
emits: ["update:queue"],
|
|
16
16
|
setup(e) {
|
|
17
|
-
const o = e, n =
|
|
17
|
+
const o = e, n = h(e, "queue"), a = q([]);
|
|
18
18
|
let r = 0;
|
|
19
19
|
function s() {
|
|
20
20
|
n.value.length === 0 || a.value.length >= o.length || (a.value.push({ ...n.value[0], id: r++, show: !0 }), n.value.shift());
|
|
@@ -26,13 +26,13 @@ import '../assets/notificationQueue.css';const M = /* @__PURE__ */ p({
|
|
|
26
26
|
), s();
|
|
27
27
|
}, 200);
|
|
28
28
|
}
|
|
29
|
-
|
|
30
|
-
const l =
|
|
29
|
+
v(n, s, { immediate: !0, deep: !0 });
|
|
30
|
+
const l = g(() => {
|
|
31
31
|
const t = ["dai-notification-queue__item--anim"];
|
|
32
32
|
return o.positionX === "right" ? t.push("dai-notification-queue__item--anim-x-right") : o.positionX === "left" ? t.push("dai-notification-queue__item--anim-x-left") : o.positionX === "center" && o.positionY === "top" ? t.push("dai-notification-queue__item--anim-y-top") : o.positionX === "center" && o.positionY === "bottom" && t.push("dai-notification-queue__item--anim-y-bottom"), t.join(" ");
|
|
33
33
|
});
|
|
34
34
|
return (t, c) => (u(), m("div", {
|
|
35
|
-
class:
|
|
35
|
+
class: x(["dai-notification-queue", {
|
|
36
36
|
"dai-notification-queue--fixed": e.position == "fixed",
|
|
37
37
|
"dai-notification-queue--absolute": e.position == "absolute",
|
|
38
38
|
"dai-notification-queue--y-top": e.positionY == "top",
|
|
@@ -42,15 +42,15 @@ import '../assets/notificationQueue.css';const M = /* @__PURE__ */ p({
|
|
|
42
42
|
"dai-notification-queue--x-right": e.positionX == "right"
|
|
43
43
|
}])
|
|
44
44
|
}, [
|
|
45
|
-
X
|
|
45
|
+
_(X, {
|
|
46
46
|
appear: "",
|
|
47
47
|
"enter-from-class": l.value,
|
|
48
48
|
"enter-active-class": "dai-notification-queue__item--anim-in",
|
|
49
49
|
"leave-to-class": l.value,
|
|
50
50
|
"leave-active-class": "dai-notification-queue__item--anim-out"
|
|
51
51
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
(u(!0), m(
|
|
52
|
+
default: w(() => [
|
|
53
|
+
(u(!0), m(b, null, y(a.value, (i) => (u(), C(Y, {
|
|
54
54
|
key: i.id,
|
|
55
55
|
color: i.color,
|
|
56
56
|
icon: i.type,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as u,
|
|
1
|
+
import { defineComponent as u, useModel as d, useId as r, watch as f, onMounted as m, onUnmounted as v, openBlock as l, createBlock as p, Teleport as h, createVNode as g, Transition as y, withCtx as k, createElementBlock as w, mergeProps as B, unref as C, renderSlot as x, createCommentVNode as V, mergeModels as b } from "vue";
|
|
2
2
|
import { useClassList as L } from "../classList.js";
|
|
3
3
|
import '../assets/offcanvas.css';const M = ["id"], E = /* @__PURE__ */ u({
|
|
4
4
|
inheritAttrs: !1,
|
|
5
5
|
__name: "offcanvas",
|
|
6
|
-
props: /* @__PURE__ */
|
|
6
|
+
props: /* @__PURE__ */ b({
|
|
7
7
|
id: {},
|
|
8
8
|
position: { default: "right" },
|
|
9
9
|
push: { type: Boolean },
|
|
@@ -16,8 +16,8 @@ import '../assets/offcanvas.css';const M = ["id"], E = /* @__PURE__ */ u({
|
|
|
16
16
|
}),
|
|
17
17
|
emits: ["update:modelValue"],
|
|
18
18
|
setup(t) {
|
|
19
|
-
const o = t, n =
|
|
20
|
-
|
|
19
|
+
const o = t, n = d(t, "modelValue"), a = o.id ?? r(), { classList: s } = L(document.body, "nui-body-push");
|
|
20
|
+
f(n, () => {
|
|
21
21
|
if (!o.push || (s.splice(1), !n.value))
|
|
22
22
|
return;
|
|
23
23
|
let e = "nui-body-push--" + o.position;
|
|
@@ -26,12 +26,12 @@ import '../assets/offcanvas.css';const M = ["id"], E = /* @__PURE__ */ u({
|
|
|
26
26
|
function i(e) {
|
|
27
27
|
e.target.closest(`#${a}`) || o.closeOnOutsideClick && (n.value = !1);
|
|
28
28
|
}
|
|
29
|
-
return
|
|
29
|
+
return m(() => {
|
|
30
30
|
window.addEventListener("click", i, { passive: !0 });
|
|
31
|
-
}),
|
|
31
|
+
}), v(() => {
|
|
32
32
|
window.removeEventListener("click", i);
|
|
33
|
-
}), (e, c) => (l(), h
|
|
34
|
-
y
|
|
33
|
+
}), (e, c) => (l(), p(h, { to: "body" }, [
|
|
34
|
+
g(y, {
|
|
35
35
|
appear: "",
|
|
36
36
|
"enter-from-class": "nui-offcanvas--animate-hidden",
|
|
37
37
|
"enter-to-class": "nui-offcanvas--animate-shown",
|
|
@@ -40,10 +40,10 @@ import '../assets/offcanvas.css';const M = ["id"], E = /* @__PURE__ */ u({
|
|
|
40
40
|
"leave-to-class": "nui-offcanvas--animate-hidden",
|
|
41
41
|
"leave-active-class": "ease-in-out"
|
|
42
42
|
}, {
|
|
43
|
-
default:
|
|
44
|
-
n.value ? (l(),
|
|
43
|
+
default: k(() => [
|
|
44
|
+
n.value ? (l(), w("div", B({
|
|
45
45
|
key: 0,
|
|
46
|
-
id:
|
|
46
|
+
id: C(a)
|
|
47
47
|
}, e.$attrs, {
|
|
48
48
|
class: ["nui-offcanvas", {
|
|
49
49
|
[`nui-offcanvas--${t.position}`]: !0,
|
|
@@ -52,8 +52,8 @@ import '../assets/offcanvas.css';const M = ["id"], E = /* @__PURE__ */ u({
|
|
|
52
52
|
"nui-offcanvas--xl": t.xl
|
|
53
53
|
}]
|
|
54
54
|
}), [
|
|
55
|
-
|
|
56
|
-
], 16, M)) :
|
|
55
|
+
x(e.$slots, "default")
|
|
56
|
+
], 16, M)) : V("", !0)
|
|
57
57
|
]),
|
|
58
58
|
_: 3
|
|
59
59
|
})
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as a,
|
|
1
|
+
import { defineComponent as a, openBlock as r, createBlock as t, Transition as i, withCtx as o, createVNode as p, unref as l, renderSlot as n } from "vue";
|
|
2
2
|
import { PopoverDialog as s } from "vue-composable-ui";
|
|
3
3
|
import '../assets/popoverDialog.css';const f = /* @__PURE__ */ a({
|
|
4
4
|
__name: "popoverDialog",
|
|
5
5
|
setup(d) {
|
|
6
|
-
return (e, c) => (
|
|
6
|
+
return (e, c) => (r(), t(i, {
|
|
7
7
|
"enter-from-class": "dai-popover-dialog--anim",
|
|
8
8
|
"leave-to-class": "dai-popover-dialog--anim"
|
|
9
9
|
}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as l, computed as t,
|
|
1
|
+
import { defineComponent as l, computed as t, openBlock as i, createElementBlock as c, normalizeStyle as a, normalizeClass as n, createElementVNode as u } from "vue";
|
|
2
2
|
import '../assets/progressbar.css';const s = ["aria-valuenow"], m = /* @__PURE__ */ l({
|
|
3
3
|
__name: "progressbar",
|
|
4
4
|
props: {
|
|
@@ -9,7 +9,7 @@ import '../assets/progressbar.css';const s = ["aria-valuenow"], m = /* @__PURE__
|
|
|
9
9
|
},
|
|
10
10
|
setup(e) {
|
|
11
11
|
const r = e, o = t(() => r.value === void 0);
|
|
12
|
-
return (d, g) => (
|
|
12
|
+
return (d, g) => (i(), c("div", {
|
|
13
13
|
class: n(["overflow-hidden text-xs w-full flex-1", {
|
|
14
14
|
rounded: e.rounded,
|
|
15
15
|
"bg-primary-200": e.color == "primary",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as h,
|
|
1
|
+
import { defineComponent as h, useModel as y, useId as V, useTemplateRef as p, openBlock as t, createElementBlock as o, normalizeClass as E, createElementVNode as l, withDirectives as k, mergeProps as x, unref as a, vModelRadio as b, toDisplayString as c, createCommentVNode as u, mergeModels as g } from "vue";
|
|
2
2
|
import { useFormControl as B } from "vue-composable-ui";
|
|
3
3
|
import '../assets/radio.css';const C = { class: "flex items-center h-5" }, M = ["value", "id"], w = {
|
|
4
4
|
key: 0,
|
|
@@ -9,7 +9,7 @@ import '../assets/radio.css';const C = { class: "flex items-center h-5" }, M = [
|
|
|
9
9
|
}, z = /* @__PURE__ */ h({
|
|
10
10
|
inheritAttrs: !1,
|
|
11
11
|
__name: "radio",
|
|
12
|
-
props: /* @__PURE__ */
|
|
12
|
+
props: /* @__PURE__ */ g({
|
|
13
13
|
value: {},
|
|
14
14
|
color: { default: "primary" },
|
|
15
15
|
validators: {},
|
|
@@ -22,16 +22,16 @@ import '../assets/radio.css';const C = { class: "flex items-center h-5" }, M = [
|
|
|
22
22
|
}),
|
|
23
23
|
emits: ["update:modelValue"],
|
|
24
24
|
setup(e) {
|
|
25
|
-
const s = e, r =
|
|
25
|
+
const s = e, r = y(e, "modelValue"), i = V(), n = p("formElement"), { isValid: f } = B(
|
|
26
26
|
n,
|
|
27
27
|
s.validators,
|
|
28
28
|
s.showValidationError
|
|
29
29
|
);
|
|
30
|
-
return (d, m) => (
|
|
31
|
-
class:
|
|
30
|
+
return (d, m) => (t(), o("div", {
|
|
31
|
+
class: E(["flex items-start gap-3", d.$attrs.class])
|
|
32
32
|
}, [
|
|
33
33
|
l("div", C, [
|
|
34
|
-
|
|
34
|
+
k(l("input", x({
|
|
35
35
|
type: "radio",
|
|
36
36
|
ref_key: "formElement",
|
|
37
37
|
ref: n,
|
|
@@ -44,16 +44,16 @@ import '../assets/radio.css';const C = { class: "flex items-center h-5" }, M = [
|
|
|
44
44
|
"radio--invalid": !a(f)
|
|
45
45
|
}]
|
|
46
46
|
}), null, 16, M), [
|
|
47
|
-
[
|
|
47
|
+
[b, r.value]
|
|
48
48
|
])
|
|
49
49
|
]),
|
|
50
|
-
e.label ? (
|
|
50
|
+
e.label ? (t(), o("div", w, [
|
|
51
51
|
l("label", {
|
|
52
52
|
for: a(i),
|
|
53
53
|
class: "font-medium select-none cursor-pointer"
|
|
54
|
-
},
|
|
55
|
-
e.hint ? (
|
|
56
|
-
])) :
|
|
54
|
+
}, c(e.label), 9, $),
|
|
55
|
+
e.hint ? (t(), o("p", D, c(e.hint), 1)) : u("", !0)
|
|
56
|
+
])) : u("", !0)
|
|
57
57
|
], 2));
|
|
58
58
|
}
|
|
59
59
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as p,
|
|
1
|
+
import { defineComponent as p, useId as g, useModel as B, useTemplateRef as V, openBlock as n, createBlock as y, mergeProps as m, unref as a, withCtx as w, withDirectives as h, createElementVNode as s, renderSlot as E, createElementBlock as f, Fragment as M, renderList as b, toDisplayString as k, vModelSelect as x, mergeModels as C } from "vue";
|
|
2
2
|
import { useFormControl as $ } from "vue-composable-ui";
|
|
3
|
-
import { _ as F } from "./formControl.vue_vue_type_style_index_0_lang.
|
|
3
|
+
import { _ as F } from "./formControl.vue_vue_type_style_index_0_lang.DRmpDdyQ.js";
|
|
4
4
|
import '../assets/select.css';const L = ["id"], S = ["value"], z = /* @__PURE__ */ p({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "select",
|
|
7
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ C({
|
|
8
8
|
id: {},
|
|
9
9
|
options: {},
|
|
10
10
|
optionText: { default: "text" },
|
|
@@ -31,19 +31,19 @@ import '../assets/select.css';const L = ["id"], S = ["value"], z = /* @__PURE__
|
|
|
31
31
|
}),
|
|
32
32
|
emits: ["update:modelValue"],
|
|
33
33
|
setup(e) {
|
|
34
|
-
const o = e, r = o.id ||
|
|
34
|
+
const o = e, r = o.id || g(), d = B(e, "modelValue"), u = V("formElement"), { isValid: v, validationMessage: c, validate: T } = $(
|
|
35
35
|
u,
|
|
36
36
|
o.validators,
|
|
37
37
|
o.showValidationError
|
|
38
38
|
);
|
|
39
|
-
return (i, t) => (n(),
|
|
39
|
+
return (i, t) => (n(), y(F, m(o, {
|
|
40
40
|
"label-for": a(r),
|
|
41
41
|
"validation-message": e.showValidationError ? "" : a(c),
|
|
42
42
|
invalid: o.invalid || !a(v),
|
|
43
43
|
class: i.$attrs.class
|
|
44
44
|
}), {
|
|
45
|
-
default:
|
|
46
|
-
|
|
45
|
+
default: w(() => [
|
|
46
|
+
h(s("select", m({
|
|
47
47
|
ref_key: "formElement",
|
|
48
48
|
ref: u
|
|
49
49
|
}, { ...i.$attrs, class: void 0 }, {
|
|
@@ -51,14 +51,14 @@ import '../assets/select.css';const L = ["id"], S = ["value"], z = /* @__PURE__
|
|
|
51
51
|
"onUpdate:modelValue": t[0] || (t[0] = (l) => d.value = l),
|
|
52
52
|
class: "dai-form-control__input-group__control dai-select"
|
|
53
53
|
}), [
|
|
54
|
-
|
|
55
|
-
(n(!0), f(
|
|
54
|
+
E(i.$slots, "default", {}, () => [
|
|
55
|
+
(n(!0), f(M, null, b(e.options, (l) => (n(), f("option", {
|
|
56
56
|
value: l[e.optionValue],
|
|
57
57
|
key: l[e.optionValue]
|
|
58
|
-
},
|
|
58
|
+
}, k(l[e.optionText]), 9, S))), 128))
|
|
59
59
|
])
|
|
60
60
|
], 16, L), [
|
|
61
|
-
[
|
|
61
|
+
[x, d.value]
|
|
62
62
|
]),
|
|
63
63
|
t[1] || (t[1] = s("svg", {
|
|
64
64
|
class: "dai-select__chevron",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as s,
|
|
2
|
-
import { _ as g } from "./combobox.vue_vue_type_style_index_0_lang.
|
|
1
|
+
import { defineComponent as s, useModel as p, openBlock as a, createBlock as d, unref as l, mergeProps as c, withCtx as t, createVNode as r, createElementBlock as f, Fragment as V, renderList as y, createTextVNode as B, toDisplayString as v, mergeModels as x } from "vue";
|
|
2
|
+
import { _ as g } from "./combobox.vue_vue_type_style_index_0_lang.BM1fsgGg.js";
|
|
3
3
|
import "vue-composable-ui";
|
|
4
|
-
import { _ as h } from "./comboboxButton.vue_vue_type_style_index_0_lang.
|
|
5
|
-
import { _ as b } from "./comboboxOptions.vue_vue_type_style_index_0_lang.
|
|
6
|
-
import { _ as k } from "./comboboxOption.vue_vue_type_style_index_0_lang.
|
|
4
|
+
import { _ as h } from "./comboboxButton.vue_vue_type_style_index_0_lang.BW2Z0Fou.js";
|
|
5
|
+
import { _ as b } from "./comboboxOptions.vue_vue_type_style_index_0_lang.mLedCwfy.js";
|
|
6
|
+
import { _ as k } from "./comboboxOption.vue_vue_type_style_index_0_lang.BUX-uGiu.js";
|
|
7
7
|
const N = /* @__PURE__ */ s({
|
|
8
8
|
__name: "selectbox",
|
|
9
|
-
props: /* @__PURE__ */
|
|
9
|
+
props: /* @__PURE__ */ x({
|
|
10
10
|
options: {},
|
|
11
11
|
optionText: { default: "text" },
|
|
12
12
|
optionValue: { default: "value" },
|
|
@@ -34,8 +34,8 @@ const N = /* @__PURE__ */ s({
|
|
|
34
34
|
}),
|
|
35
35
|
emits: ["update:modelValue"],
|
|
36
36
|
setup(e) {
|
|
37
|
-
const u = e, n =
|
|
38
|
-
return (M, i) => (a(), d(l(g),
|
|
37
|
+
const u = e, n = p(e, "modelValue");
|
|
38
|
+
return (M, i) => (a(), d(l(g), c(u, {
|
|
39
39
|
displayValue: (o) => e.options.find((m) => m[e.optionValue] === o)?.[e.optionText] || "",
|
|
40
40
|
modelValue: n.value,
|
|
41
41
|
"onUpdate:modelValue": i[0] || (i[0] = (o) => n.value = o)
|
|
@@ -44,12 +44,12 @@ const N = /* @__PURE__ */ s({
|
|
|
44
44
|
r(l(h), { placeholder: e.placeholder }, null, 8, ["placeholder"]),
|
|
45
45
|
r(l(b), null, {
|
|
46
46
|
default: t(() => [
|
|
47
|
-
(a(!0), V
|
|
47
|
+
(a(!0), f(V, null, y(e.options, (o) => (a(), d(l(k), {
|
|
48
48
|
key: o[e.optionValue],
|
|
49
49
|
value: o[e.optionValue]
|
|
50
50
|
}, {
|
|
51
51
|
default: t(() => [
|
|
52
|
-
v(
|
|
52
|
+
B(v(o[e.optionText]), 1)
|
|
53
53
|
]),
|
|
54
54
|
_: 2
|
|
55
55
|
}, 1032, ["value"]))), 128))
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineComponent as f, useModel as w, useId as k, openBlock as i, createElementBlock as b, createElementVNode as s, normalizeClass as v, unref as n, createBlock as d, withCtx as r, renderSlot as c, createTextVNode as u, toDisplayString as m, createCommentVNode as h, mergeModels as _ } from "vue";
|
|
2
|
+
import { _ as $ } from "./label.vue_vue_type_style_index_0_lang.D0NwD6yx.js";
|
|
3
|
+
import { _ as V } from "./hint.vue_vue_type_style_index_0_lang.DYrKdv83.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__ */ _({
|
|
7
|
+
label: {},
|
|
8
|
+
hint: {}
|
|
9
|
+
}, {
|
|
10
|
+
modelValue: { type: Boolean },
|
|
11
|
+
modelModifiers: {}
|
|
12
|
+
}),
|
|
13
|
+
emits: ["update:modelValue"],
|
|
14
|
+
setup(e) {
|
|
15
|
+
const t = w(e, "modelValue"), a = k();
|
|
16
|
+
return (o, l) => (i(), b("div", p, [
|
|
17
|
+
s("button", {
|
|
18
|
+
onClick: l[0] || (l[0] = (C) => t.value = !t.value),
|
|
19
|
+
id: n(a),
|
|
20
|
+
"aria-checked": t.value,
|
|
21
|
+
role: "switch",
|
|
22
|
+
type: "button",
|
|
23
|
+
tabindex: "0",
|
|
24
|
+
class: v(["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(), d($, {
|
|
32
|
+
key: 0,
|
|
33
|
+
for: n(a)
|
|
34
|
+
}, {
|
|
35
|
+
default: r(() => [
|
|
36
|
+
c(o.$slots, "default", {}, () => [
|
|
37
|
+
u(m(e.label), 1)
|
|
38
|
+
])
|
|
39
|
+
]),
|
|
40
|
+
_: 3
|
|
41
|
+
}, 8, ["for"])) : h("", !0),
|
|
42
|
+
e.hint || o.$slots.hint ? (i(), d(V, {
|
|
43
|
+
key: 1,
|
|
44
|
+
class: "dai-switch-control__hint"
|
|
45
|
+
}, {
|
|
46
|
+
default: r(() => [
|
|
47
|
+
c(o.$slots, "hint", {}, () => [
|
|
48
|
+
u(m(e.hint), 1)
|
|
49
|
+
])
|
|
50
|
+
]),
|
|
51
|
+
_: 3
|
|
52
|
+
})) : h("", !0)
|
|
53
|
+
]));
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
export {
|
|
57
|
+
g as _
|
|
58
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as t,
|
|
1
|
+
import { defineComponent as t, openBlock as o, createBlock as r, unref as l, withCtx as n, renderSlot as i } from "vue";
|
|
2
2
|
import { Tab as s } from "vue-composable-ui";
|
|
3
3
|
import '../assets/tab.css';const f = /* @__PURE__ */ t({
|
|
4
4
|
__name: "tab",
|
|
@@ -8,7 +8,7 @@ import '../assets/tab.css';const f = /* @__PURE__ */ t({
|
|
|
8
8
|
value: {}
|
|
9
9
|
},
|
|
10
10
|
setup(a) {
|
|
11
|
-
return (e, c) => (
|
|
11
|
+
return (e, c) => (o(), r(l(s), {
|
|
12
12
|
id: a.id,
|
|
13
13
|
"aria-controls": a.ariaControls,
|
|
14
14
|
value: a.value,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as a, useTemplateRef as f, ref as o, onMounted as n, nextTick as c,
|
|
1
|
+
import { defineComponent as a, useTemplateRef as f, ref as o, onMounted as n, nextTick as c, openBlock as u, createBlock as d, unref as _, withCtx as p, createElementVNode as m, normalizeStyle as b, renderSlot as v } from "vue";
|
|
2
2
|
import { TabList as h } from "vue-composable-ui";
|
|
3
3
|
import '../assets/tabList.css';const x = /* @__PURE__ */ a({
|
|
4
4
|
__name: "tabList",
|
|
@@ -15,7 +15,7 @@ import '../assets/tabList.css';const x = /* @__PURE__ */ a({
|
|
|
15
15
|
transition: s.value.offsetLeft > e.offsetLeft ? "left .2s, right .5s" : "left .5s, right .2s"
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
return n(() => c(i)), (t, e) => (
|
|
18
|
+
return n(() => c(i)), (t, e) => (u(), d(_(h), {
|
|
19
19
|
ref_key: "tablist",
|
|
20
20
|
ref: r,
|
|
21
21
|
onClickPassive: i,
|
|
@@ -26,9 +26,9 @@ import '../assets/tabList.css';const x = /* @__PURE__ */ a({
|
|
|
26
26
|
ref_key: "slider",
|
|
27
27
|
ref: s,
|
|
28
28
|
class: "dai-tab-list__slider",
|
|
29
|
-
style:
|
|
29
|
+
style: b(l.value)
|
|
30
30
|
}, null, 4),
|
|
31
|
-
|
|
31
|
+
v(t.$slots, "default")
|
|
32
32
|
]),
|
|
33
33
|
_: 3
|
|
34
34
|
}, 512));
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as v,
|
|
1
|
+
import { defineComponent as v, useId as p, useModel as h, useTemplateRef as g, onMounted as V, openBlock as x, createBlock as E, mergeProps as u, unref as o, withCtx as y, withDirectives as M, createElementVNode as _, vModelText as w, mergeModels as z } from "vue";
|
|
2
2
|
import { useFormControl as $ } from "vue-composable-ui";
|
|
3
|
-
import { _ as B } from "./formControl.vue_vue_type_style_index_0_lang.
|
|
3
|
+
import { _ as B } from "./formControl.vue_vue_type_style_index_0_lang.DRmpDdyQ.js";
|
|
4
4
|
import '../assets/textarea.css';const k = ["id"], b = /* @__PURE__ */ v({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "textarea",
|
|
7
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ z({
|
|
8
8
|
id: {},
|
|
9
9
|
autosize: { type: Boolean },
|
|
10
10
|
validators: {},
|
|
@@ -15,7 +15,7 @@ import '../assets/textarea.css';const k = ["id"], b = /* @__PURE__ */ v({
|
|
|
15
15
|
}),
|
|
16
16
|
emits: ["update:modelValue"],
|
|
17
17
|
setup(s) {
|
|
18
|
-
const a = s, i = a.id ||
|
|
18
|
+
const a = s, i = a.id || p(), r = h(s, "modelValue"), l = g("formElement"), { isValid: n, validationMessage: f, validate: c } = $(
|
|
19
19
|
l,
|
|
20
20
|
a.validators,
|
|
21
21
|
a.showValidationError
|
|
@@ -25,14 +25,14 @@ import '../assets/textarea.css';const k = ["id"], b = /* @__PURE__ */ v({
|
|
|
25
25
|
const e = l.value, t = e.offsetHeight - e.clientHeight;
|
|
26
26
|
e.style.height = "auto", e.style.height = `${e.scrollHeight + t}px`;
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return V(d), (e, t) => (x(), E(B, u(a, {
|
|
29
29
|
"label-for": o(i),
|
|
30
30
|
"validation-message": s.showValidationError ? "" : o(f),
|
|
31
31
|
invalid: !o(n),
|
|
32
32
|
class: e.$attrs.class
|
|
33
33
|
}), {
|
|
34
|
-
default:
|
|
35
|
-
_(
|
|
34
|
+
default: y(() => [
|
|
35
|
+
M(_("textarea", u({
|
|
36
36
|
ref_key: "formElement",
|
|
37
37
|
ref: l
|
|
38
38
|
}, { ...e.$attrs, class: void 0 }, {
|
|
@@ -44,7 +44,7 @@ import '../assets/textarea.css';const k = ["id"], b = /* @__PURE__ */ v({
|
|
|
44
44
|
"form-control__textarea--autosize": s.autosize
|
|
45
45
|
}]
|
|
46
46
|
}), null, 16, k), [
|
|
47
|
-
[
|
|
47
|
+
[w, r.value]
|
|
48
48
|
])
|
|
49
49
|
]),
|
|
50
50
|
_: 1
|
package/dist/combobox.js
CHANGED
package/dist/comboboxButton.js
CHANGED
package/dist/comboboxInput.js
CHANGED
package/dist/comboboxOption.js
CHANGED
package/dist/comboboxOptions.js
CHANGED
package/dist/formControl.js
CHANGED