@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.
Files changed (100) hide show
  1. package/dist/assets/btn.css +1 -1
  2. package/dist/assets/formControl.css +1 -1
  3. package/dist/assets/formControl2.css +1 -1
  4. package/dist/assets/inputGroup.css +1 -1
  5. package/dist/assets/modal.css +1 -1
  6. package/dist/assets/offcanvas.css +1 -1
  7. package/dist/assets/textarea.css +1 -1
  8. package/dist/btn.js +1 -1
  9. package/dist/btn2.js +2 -2
  10. package/dist/checkbox.js +1 -1
  11. 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
  12. 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
  13. 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
  14. 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
  15. 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
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. 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
  31. 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
  32. 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
  33. 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
  34. package/dist/chunks/switch.vue_vue_type_style_index_0_lang.DX8AF2Bu.js +58 -0
  35. 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
  36. 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
  37. 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
  38. package/dist/combobox.js +1 -1
  39. package/dist/comboboxButton.js +1 -1
  40. package/dist/comboboxInput.js +1 -1
  41. package/dist/comboboxOption.js +1 -1
  42. package/dist/comboboxOptions.js +1 -1
  43. package/dist/formControl.js +1 -1
  44. package/dist/formControl2.js +14 -14
  45. package/dist/hint.js +1 -1
  46. package/dist/index.js +10 -28
  47. package/dist/index2.js +2 -2
  48. package/dist/index3.js +28 -10
  49. package/dist/input.js +1 -1
  50. package/dist/inputGroup.js +1 -1
  51. package/dist/label.js +1 -1
  52. package/dist/main.js +25 -25
  53. package/dist/menuItem.js +1 -1
  54. package/dist/menuItems.js +1 -1
  55. package/dist/modal.js +1 -1
  56. package/dist/notification.js +1 -1
  57. package/dist/notificationQueue.js +1 -1
  58. package/dist/offcanvas.js +1 -1
  59. package/dist/popoverDialog.js +1 -1
  60. package/dist/progressbar.js +1 -1
  61. package/dist/radio.js +1 -1
  62. package/dist/select.js +1 -1
  63. package/dist/selectbox.js +1 -1
  64. package/dist/switch.js +1 -1
  65. package/dist/tab.js +1 -1
  66. package/dist/tabList.js +1 -1
  67. package/dist/textarea.js +1 -1
  68. package/dist/types/components/btn.vue.d.ts +5 -4
  69. package/dist/types/components/formControl.vue.d.ts +5 -3
  70. package/dist/types/components/input_controls/checkbox.vue.d.ts +8 -6
  71. package/dist/types/components/input_controls/combobox/combobox.vue.d.ts +7 -5
  72. package/dist/types/components/input_controls/combobox/comboboxButton.vue.d.ts +3 -2
  73. package/dist/types/components/input_controls/combobox/comboboxInput.vue.d.ts +5 -4
  74. package/dist/types/components/input_controls/combobox/comboboxOption.vue.d.ts +5 -4
  75. package/dist/types/components/input_controls/combobox/comboboxOptions.vue.d.ts +5 -4
  76. package/dist/types/components/input_controls/common/btn.vue.d.ts +3 -2
  77. package/dist/types/components/input_controls/common/formControl.vue.d.ts +5 -4
  78. package/dist/types/components/input_controls/common/hint.vue.d.ts +3 -2
  79. package/dist/types/components/input_controls/common/inputGroup.vue.d.ts +5 -4
  80. package/dist/types/components/input_controls/common/label.vue.d.ts +3 -2
  81. package/dist/types/components/input_controls/input/input.vue.d.ts +8 -6
  82. package/dist/types/components/input_controls/radio.vue.d.ts +4 -2
  83. package/dist/types/components/input_controls/select/select.vue.d.ts +15 -10
  84. package/dist/types/components/input_controls/selectbox/selectbox.stories.d.ts +30 -24
  85. package/dist/types/components/input_controls/selectbox/selectbox.vue.d.ts +15 -10
  86. package/dist/types/components/input_controls/switch.vue.d.ts +8 -6
  87. package/dist/types/components/input_controls/textarea.vue.d.ts +4 -2
  88. package/dist/types/components/menu/menuItem.vue.d.ts +5 -4
  89. package/dist/types/components/menu/menuItems.vue.d.ts +5 -4
  90. package/dist/types/components/modal.vue.d.ts +7 -6
  91. package/dist/types/components/notifications/notification.vue.d.ts +4 -2
  92. package/dist/types/components/notifications/notificationQueue.vue.d.ts +4 -2
  93. package/dist/types/components/offcanvas.vue.d.ts +7 -5
  94. package/dist/types/components/popoverDialog.vue.d.ts +5 -4
  95. package/dist/types/components/progressbar.vue.d.ts +2 -1
  96. package/dist/types/components/tabs/tab.vue.d.ts +5 -4
  97. package/dist/types/components/tabs/tabList.vue.d.ts +3 -2
  98. package/package.json +6 -6
  99. package/dist/chunks/switch.vue_vue_type_style_index_0_lang.B5M6C42g.js +0 -58
  100. /package/dist/assets/{theme.css → mixins.css} +0 -0
@@ -1,4 +1,4 @@
1
- import { defineComponent as u, mergeModels as k, useModel as h, watch as f, createElementBlock as t, createCommentVNode as n, openBlock as i, createElementVNode as s, normalizeClass as d, toDisplayString as r } from "vue";
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__ */ k({
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 = h(e, "modelValue");
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 f(o, m, { immediate: !0 }), (C, a) => o.value ? (i(), t("div", v, [
58
- s("div", {
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 ? (i(), t("div", {
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
- (i(), t("svg", w, [
66
- e.icon == "success" ? (i(), t("path", g)) : e.icon == "info" ? (i(), t("path", _)) : e.icon == "warning" ? (i(), t("path", y)) : e.icon == "danger" ? (i(), t("path", M)) : n("", !0)
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)) : n("", !0),
69
- s("div", x, [
70
- s("div", {
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 ? (i(), t("div", B, r(e.detail), 1)) : n("", !0)
75
+ e.detail ? (t(), i("div", B, r(e.detail), 1)) : s("", !0)
76
76
  ]),
77
- e.dismissible ? (i(), t("div", {
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
- s("svg", {
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
- s("path", {
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
- ])])) : n("", !0)
95
+ ])])) : s("", !0)
96
96
  ], 2)
97
- ])) : n("", !0);
97
+ ])) : s("", !0);
98
98
  }
99
99
  });
100
100
  export {
@@ -1,8 +1,8 @@
1
- import { defineComponent as p, mergeModels as h, useModel as q, ref as v, watch as g, computed as x, createElementBlock as m, openBlock as u, normalizeClass as _, createVNode as X, TransitionGroup as w, withCtx as b, Fragment as y, renderList as C, createBlock as V } from "vue";
2
- import { _ as Y } from "./notification.vue_vue_type_style_index_0_lang.RHzcHM7o.js";
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__ */ h({
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 = q(e, "queue"), a = v([]);
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
- g(n, s, { immediate: !0, deep: !0 });
30
- const l = x(() => {
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: _(["dai-notification-queue", {
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(w, {
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: b(() => [
53
- (u(!0), m(y, null, C(a.value, (i) => (u(), V(Y, {
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, mergeModels as d, useModel as r, useId as f, watch as m, onMounted as v, onUnmounted as p, createBlock as h, openBlock as l, Teleport as g, createVNode as y, Transition as k, withCtx as w, createElementBlock as B, createCommentVNode as C, mergeProps as x, unref as V, renderSlot as b } from "vue";
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__ */ d({
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 = r(t, "modelValue"), a = o.id ?? f(), { classList: s } = L(document.body, "nui-body-push");
20
- m(n, () => {
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 v(() => {
29
+ return m(() => {
30
30
  window.addEventListener("click", i, { passive: !0 });
31
- }), p(() => {
31
+ }), v(() => {
32
32
  window.removeEventListener("click", i);
33
- }), (e, c) => (l(), h(g, { to: "body" }, [
34
- y(k, {
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: w(() => [
44
- n.value ? (l(), B("div", x({
43
+ default: k(() => [
44
+ n.value ? (l(), w("div", B({
45
45
  key: 0,
46
- id: V(a)
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
- b(e.$slots, "default")
56
- ], 16, M)) : C("", !0)
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, createBlock as r, openBlock as t, Transition as i, withCtx as o, createVNode as p, unref as l, renderSlot as n } from "vue";
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) => (t(), r(i, {
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, createElementBlock as i, openBlock as c, normalizeStyle as a, normalizeClass as n, createElementVNode as u } from "vue";
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) => (c(), i("div", {
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, 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";
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__ */ y({
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 = V(e, "modelValue"), i = p(), n = E("formElement"), { isValid: f } = B(
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) => (o(), t("div", {
31
- class: k(["flex items-start gap-3", d.$attrs.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
- x(l("input", b({
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
- [g, r.value]
47
+ [b, r.value]
48
48
  ])
49
49
  ]),
50
- e.label ? (o(), t("div", w, [
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
- }, u(e.label), 9, $),
55
- e.hint ? (o(), t("p", D, u(e.hint), 1)) : c("", !0)
56
- ])) : c("", !0)
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, 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";
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.BDPmQzJj.js";
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__ */ g({
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 || B(), d = V(e, "modelValue"), u = y("formElement"), { isValid: v, validationMessage: c, validate: T } = $(
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(), w(F, m(o, {
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: h(() => [
46
- E(s("select", m({
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
- M(i.$slots, "default", {}, () => [
55
- (n(!0), f(b, null, k(e.options, (l) => (n(), f("option", {
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
- }, x(l[e.optionText]), 9, S))), 128))
58
+ }, k(l[e.optionText]), 9, S))), 128))
59
59
  ])
60
60
  ], 16, L), [
61
- [C, d.value]
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, 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";
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.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";
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__ */ p({
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 = c(e, "modelValue");
38
- return (M, i) => (a(), d(l(g), f(u, {
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(y, null, B(e.options, (o) => (a(), d(l(k), {
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(x(o[e.optionText]), 1)
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, createBlock as o, openBlock as r, unref as l, withCtx as n, renderSlot as i } from "vue";
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) => (r(), o(l(s), {
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, createBlock as u, openBlock as d, unref as _, withCtx as p, createElementVNode as m, renderSlot as b, normalizeStyle as v } from "vue";
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) => (d(), u(_(h), {
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: v(l.value)
29
+ style: b(l.value)
30
30
  }, null, 4),
31
- b(t.$slots, "default")
31
+ v(t.$slots, "default")
32
32
  ]),
33
33
  _: 3
34
34
  }, 512));
@@ -1,10 +1,10 @@
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";
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.BDPmQzJj.js";
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__ */ p({
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 || h(), r = g(s, "modelValue"), l = V("formElement"), { isValid: n, validationMessage: f, validate: c } = $(
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 x(d), (e, t) => (y(), E(B, u(a, {
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: M(() => [
35
- _(w("textarea", u({
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
- [z, r.value]
47
+ [w, r.value]
48
48
  ])
49
49
  ]),
50
50
  _: 1
package/dist/combobox.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/combobox.vue_vue_type_style_index_0_lang.BlQL2V7j.js";
1
+ import { _ as f } from "./chunks/combobox.vue_vue_type_style_index_0_lang.BM1fsgGg.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/comboboxButton.vue_vue_type_style_index_0_lang.B2_SbS8t.js";
1
+ import { _ as f } from "./chunks/comboboxButton.vue_vue_type_style_index_0_lang.BW2Z0Fou.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/comboboxInput.vue_vue_type_script_setup_true_lang.r8_P3SHy.js";
1
+ import { _ as f } from "./chunks/comboboxInput.vue_vue_type_script_setup_true_lang.DGuHr7IE.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/comboboxOption.vue_vue_type_style_index_0_lang.BY-JfDPY.js";
1
+ import { _ as f } from "./chunks/comboboxOption.vue_vue_type_style_index_0_lang.BUX-uGiu.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/comboboxOptions.vue_vue_type_style_index_0_lang.OHgMyOoq.js";
1
+ import { _ as f } from "./chunks/comboboxOptions.vue_vue_type_style_index_0_lang.mLedCwfy.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./chunks/formControl.vue_vue_type_style_index_0_lang.BDPmQzJj.js";
1
+ import { _ as f } from "./chunks/formControl.vue_vue_type_style_index_0_lang.DRmpDdyQ.js";
2
2
  export {
3
3
  f as default
4
4
  };