@bobbykim/mcl-forms 0.7.1 → 0.8.0

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/mcl-forms.js CHANGED
@@ -1,8 +1,8 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('.switch[data-v-8df11a40]{width:var(--switch-width);height:var(--switch-height)}.slider[data-v-8df11a40]:before{content:"";height:var(--slider-size);width:var(--slider-size);left:var(--gutter-size);bottom:var(--gutter-size)}input:checked+.slider[data-v-8df11a40]:before{transform:translate(var(--slider-size))}.options-enter-active[data-v-aa593ff3],.options-leave-active[data-v-aa593ff3]{opacity:1;transition:all .3s}.options-enter-from[data-v-aa593ff3],.options-leave-to[data-v-aa593ff3]{opacity:0;transform:translateY(-10px)}')),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
2
- import { defineComponent as R, useSlots as K, computed as h, openBlock as p, createElementBlock as y, createElementVNode as c, renderSlot as z, normalizeClass as m, toDisplayString as E, ref as B, unref as L, createCommentVNode as F, normalizeStyle as M, withDirectives as I, vModelCheckbox as W, vModelDynamic as Y, createBlock as A, withKeys as J, vModelText as H, createVNode as P, Transition as Q, withCtx as Z, Fragment as ee, renderList as te, pushScopeId as le, popScopeId as oe } from "vue";
3
- import o, { vClickOutside as re } from "@bobbykim/manguito-theme";
4
- import { useResizeObserver as ae } from "@vueuse/core";
5
- const se = ["for"], Ve = /* @__PURE__ */ R({
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.switch[data-v-07d209bd]{width:var(--switch-width);height:var(--switch-height)}.slider[data-v-07d209bd]:before{content:"";height:var(--slider-size);width:var(--slider-size);left:var(--gutter-size);bottom:var(--gutter-size)}input:checked+.slider[data-v-07d209bd]:before{transform:translate(var(--slider-size))}.options-enter-active[data-v-6ce7e157],.options-leave-active[data-v-6ce7e157]{opacity:1;transition:all .3s}.options-enter-from[data-v-6ce7e157],.options-leave-to[data-v-6ce7e157]{opacity:0;transform:translateY(-10px)}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
2
+ import { defineComponent as R, useSlots as Y, computed as v, openBlock as g, createElementBlock as k, createElementVNode as p, renderSlot as A, normalizeClass as b, toDisplayString as I, mergeModels as V, useModel as z, ref as O, unref as L, createCommentVNode as $, normalizeStyle as j, withDirectives as T, vModelCheckbox as H, vModelDynamic as J, createBlock as D, withKeys as P, vModelText as q, createVNode as Q, Transition as Z, withCtx as ee, Fragment as te, renderList as oe, pushScopeId as le, popScopeId as re } from "vue";
3
+ import l, { vClickOutside as ae } from "@bobbykim/manguito-theme";
4
+ import { useResizeObserver as se } from "@vueuse/core";
5
+ const ne = ["for"], Te = /* @__PURE__ */ R({
6
6
  __name: "MclFormGroup",
7
7
  props: {
8
8
  labelFor: {},
@@ -11,35 +11,35 @@ const se = ["for"], Ve = /* @__PURE__ */ R({
11
11
  textBold: { type: Boolean, default: !1 },
12
12
  label: {}
13
13
  },
14
- setup(u) {
15
- const f = u;
16
- K();
17
- const r = h(() => {
18
- const { textColor: i, textSize: n, textBold: v } = f, e = [
19
- o("TEXTCOLOR", i),
20
- o("BODYTEXT", n)
14
+ setup(a) {
15
+ const i = a;
16
+ Y();
17
+ const d = v(() => {
18
+ const { textColor: s, textSize: e, textBold: c } = i, o = [
19
+ l("TEXTCOLOR", s),
20
+ l("BODYTEXT", e)
21
21
  ];
22
- return v && e.push("font-bold"), e.join(" ");
22
+ return c && o.push("font-bold"), o.join(" ");
23
23
  });
24
- return (i, n) => (p(), y("div", null, [
25
- c("label", {
26
- for: i.labelFor,
24
+ return (s, e) => (g(), k("div", null, [
25
+ p("label", {
26
+ for: s.labelFor,
27
27
  class: "inline-block"
28
28
  }, [
29
- z(i.$slots, "label", {}, () => [
30
- c("p", {
31
- class: m(["mb-2xs", r.value])
32
- }, E(i.label), 3)
29
+ A(s.$slots, "label", {}, () => [
30
+ p("p", {
31
+ class: b(["mb-2xs", d.value])
32
+ }, I(s.label), 3)
33
33
  ])
34
- ], 8, se),
35
- z(i.$slots, "default")
34
+ ], 8, ne),
35
+ A(s.$slots, "default")
36
36
  ]));
37
37
  }
38
- }), ne = { class: "shrink-0 my-3xs ml-3xs mr-xs" }, ie = ["id", "required", "accept"], de = /* @__PURE__ */ c("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" }, null, -1), ue = [
39
- de
40
- ], Te = /* @__PURE__ */ R({
38
+ }), ie = { class: "shrink-0 my-3xs ml-3xs mr-xs" }, de = ["id", "required", "accept"], ue = /* @__PURE__ */ p("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" }, null, -1), ce = [
39
+ ue
40
+ ], ze = /* @__PURE__ */ R({
41
41
  __name: "MclInputFile",
42
- props: {
42
+ props: /* @__PURE__ */ V({
43
43
  id: {},
44
44
  displayBorder: { type: Boolean, default: !1 },
45
45
  borderColor: { default: "light-4" },
@@ -52,73 +52,75 @@ const se = ["for"], Ve = /* @__PURE__ */ R({
52
52
  textColor: { default: "black" },
53
53
  displayClear: { type: Boolean, default: !1 },
54
54
  isRequired: { type: Boolean, default: !1 },
55
- accept: { default: "image/jpg,image/jpeg,image/png" },
56
- modelValue: {}
57
- },
55
+ accept: { default: "image/jpg,image/jpeg,image/png" }
56
+ }, {
57
+ modelValue: {},
58
+ modelModifiers: {}
59
+ }),
58
60
  emits: ["update:modelValue"],
59
- setup(u, { emit: f }) {
60
- const r = u, i = f, n = B(), v = B(0), e = () => {
61
- n.value.click();
62
- }, s = (t) => {
63
- const k = t.target.files[0];
64
- i("update:modelValue", k);
65
- }, d = () => {
66
- i("update:modelValue", null), v.value++;
67
- }, x = h(() => {
68
- const { rounded: t, displayBorder: k, borderColor: _, displayShadow: V, bgColor: G } = r, O = [o("BGCOLOR", G)];
69
- return t && O.push("rounded-md"), k && (O.push("border-2"), O.push(o("BORDER", _))), V && O.push("shadow-md"), O.join(" ");
70
- }), l = h(() => {
71
- const { textColor: t } = r;
72
- return [o("TEXTCOLOR", t)].join(" ");
73
- }), C = h(() => {
74
- const { buttonColor: t, buttonTextColor: k, rounded: _ } = r, V = [
75
- o("BGCOLOR", t),
76
- o("TEXTCOLOR", k)
61
+ setup(a) {
62
+ const i = a, d = z(a, "modelValue"), s = O(), e = O(0), c = () => {
63
+ s.value.click();
64
+ }, o = (t) => {
65
+ const f = t.target.files[0];
66
+ d.value = f;
67
+ }, h = () => {
68
+ d.value = null, e.value++;
69
+ }, y = v(() => {
70
+ const { rounded: t, displayBorder: f, borderColor: w, displayShadow: S, bgColor: F } = i, B = [l("BGCOLOR", F)];
71
+ return t && B.push("rounded-md"), f && (B.push("border-2"), B.push(l("BORDER", w))), S && B.push("shadow-md"), B.join(" ");
72
+ }), x = v(() => {
73
+ const { textColor: t } = i;
74
+ return [l("TEXTCOLOR", t)].join(" ");
75
+ }), r = v(() => {
76
+ const { buttonColor: t, buttonTextColor: f, rounded: w } = i, S = [
77
+ l("BGCOLOR", t),
78
+ l("TEXTCOLOR", f)
77
79
  ];
78
- return _ && V.push("rounded-l-md"), V.join(" ");
79
- }), w = h(() => {
80
- const { buttonColor: t, rounded: k } = r, _ = [o("BGCOLOR", t)];
81
- return k && _.push("rounded-r-md"), _.join(" ");
80
+ return w && S.push("rounded-l-md"), S.join(" ");
81
+ }), u = v(() => {
82
+ const { buttonColor: t, rounded: f } = i, w = [l("BGCOLOR", t)];
83
+ return f && w.push("rounded-r-md"), w.join(" ");
82
84
  });
83
- return (t, k) => (p(), y("div", {
84
- class: m(["flex items-center overflow-hidden", x.value])
85
+ return (t, f) => (g(), k("div", {
86
+ class: b(["flex items-center overflow-hidden", y.value])
85
87
  }, [
86
- c("div", ne, [
87
- c("button", {
88
- class: m(["px-xs py-2xs hover:bg-opacity-70 transition-all duration-200 ease-linear max-w-full", C.value]),
89
- onClick: e
90
- }, E(t.buttonText), 3)
88
+ p("div", ie, [
89
+ p("button", {
90
+ class: b(["px-xs py-2xs hover:bg-opacity-70 transition-all duration-200 ease-linear max-w-full", r.value]),
91
+ onClick: c
92
+ }, I(t.buttonText), 3)
91
93
  ]),
92
- (p(), y("input", {
94
+ (g(), k("input", {
93
95
  type: "file",
94
96
  id: t.id,
95
97
  ref_key: "inputRef",
96
- ref: n,
97
- class: m(["file:hidden w-full bg-transparent", [l.value]]),
98
+ ref: s,
99
+ class: b(["file:hidden w-full bg-transparent", [x.value]]),
98
100
  required: t.isRequired,
99
101
  accept: t.accept,
100
- key: v.value,
101
- onChange: s
102
- }, null, 42, ie)),
103
- t.displayClear ? (p(), y("div", {
102
+ key: e.value,
103
+ onChange: o
104
+ }, null, 42, de)),
105
+ t.displayClear ? (g(), k("div", {
104
106
  key: 0,
105
107
  class: "self-stretch my-3xs mr-3xs",
106
- onClick: d
108
+ onClick: h
107
109
  }, [
108
- c("button", {
109
- class: m(["px-xs py-2xs h-full flex items-center hover:bg-opacity-70 transition-all duration-200 ease-linear", [w.value]]),
110
+ p("button", {
111
+ class: b(["px-xs py-2xs h-full flex items-center hover:bg-opacity-70 transition-all duration-200 ease-linear", [u.value]]),
110
112
  "aria-label": "clear"
111
113
  }, [
112
- (p(), y("svg", {
114
+ (g(), k("svg", {
113
115
  xmlns: "http://www.w3.org/2000/svg",
114
116
  viewBox: "0 0 384 512",
115
- class: m(["h-xs", L(o)("SVGFILL", t.buttonTextColor)])
116
- }, ue, 2))
117
+ class: b(["h-xs", L(l)("SVGFILL", t.buttonTextColor)])
118
+ }, ce, 2))
117
119
  ], 2)
118
- ])) : F("", !0)
120
+ ])) : $("", !0)
119
121
  ], 2));
120
122
  }
121
- }), ce = { class: "flex items-center" }, pe = ["id", "value", "checked"], Fe = /* @__PURE__ */ R({
123
+ }), pe = { class: "flex items-center" }, he = ["id", "value", "checked"], Fe = /* @__PURE__ */ R({
122
124
  __name: "MclInputRadio",
123
125
  props: {
124
126
  id: {},
@@ -130,57 +132,59 @@ const se = ["for"], Ve = /* @__PURE__ */ R({
130
132
  checked: { type: Boolean, default: !1 }
131
133
  },
132
134
  emits: ["change"],
133
- setup(u, { emit: f }) {
134
- const r = u, i = B(), n = f, v = () => {
135
- var l;
136
- (l = i.value) == null || l.click();
137
- }, e = h(() => {
138
- const { radioSize: l } = r;
139
- return l === "sm" ? "h-xs w-xs" : l === "lg" ? "h-md w-md" : "h-sm w-sm";
140
- }), s = h(() => {
141
- const { radioSize: l } = r;
142
- return l === "sm" ? "peer-checked:before:h-2xs peer-checked:before:w-2xs" : l === "lg" ? "peer-checked:before:h-xs peer-checked:before:w-xs" : "peer-checked:before:h-[12px] peer-checked:before:w-[12px]";
143
- }), d = h(() => {
144
- const { bgColor: l, checkedColor: C, displayShadow: w } = r, t = [
145
- o("BGCOLOR", l),
146
- o("BEFOREBG", C)
135
+ setup(a, { emit: i }) {
136
+ const d = a, s = O(), e = i, c = () => {
137
+ var r;
138
+ (r = s.value) == null || r.click();
139
+ }, o = v(() => {
140
+ const { radioSize: r } = d;
141
+ return r === "sm" ? "h-xs w-xs" : r === "lg" ? "h-md w-md" : "h-sm w-sm";
142
+ }), h = v(() => {
143
+ const { radioSize: r } = d;
144
+ return r === "sm" ? "peer-checked:before:h-2xs peer-checked:before:w-2xs" : r === "lg" ? "peer-checked:before:h-xs peer-checked:before:w-xs" : "peer-checked:before:h-[12px] peer-checked:before:w-[12px]";
145
+ }), y = v(() => {
146
+ const { bgColor: r, checkedColor: u, displayShadow: t } = d, f = [
147
+ l("BGCOLOR", r),
148
+ l("BEFOREBG", u)
147
149
  ];
148
- return w && t.push("drop-shadow-md"), t.join(" ");
149
- }), x = (l) => {
150
- const C = l.target.value;
151
- n("change", l, C);
150
+ return t && f.push("drop-shadow-md"), f.join(" ");
151
+ }), x = (r) => {
152
+ const u = r.target.value;
153
+ e("change", r, u);
152
154
  };
153
- return (l, C) => (p(), y("div", ce, [
154
- c("input", {
155
- id: l.id,
155
+ return (r, u) => (g(), k("div", pe, [
156
+ p("input", {
157
+ id: r.id,
156
158
  type: "radio",
157
159
  class: "appearance-none peer",
158
160
  ref_key: "radioRef",
159
- ref: i,
160
- value: l.value,
161
- checked: l.checked,
161
+ ref: s,
162
+ value: r.value,
163
+ checked: r.checked,
162
164
  onChange: x
163
- }, null, 40, pe),
164
- c("span", {
165
- class: m(["rounded-full inline-block relative before:absolute before:rounded-full before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2", [e.value, s.value, d.value]]),
166
- onClick: v
165
+ }, null, 40, he),
166
+ p("span", {
167
+ class: b(["rounded-full inline-block relative before:absolute before:rounded-full before:top-1/2 before:left-1/2 before:-translate-x-1/2 before:-translate-y-1/2", [o.value, h.value, y.value]]),
168
+ onClick: c
167
169
  }, null, 2)
168
170
  ]));
169
171
  }
170
- }), he = ["id"], fe = /* @__PURE__ */ R({
172
+ }), fe = ["id"], ge = /* @__PURE__ */ R({
171
173
  __name: "MclInputSwitch",
172
- props: {
174
+ props: /* @__PURE__ */ V({
173
175
  id: {},
174
176
  sliderColor: { default: "light-1" },
175
177
  onColor: { default: "success" },
176
178
  offColor: { default: "dark-1" },
177
179
  switchSize: { default: "md" },
178
- rounded: { type: Boolean, default: !0 },
179
- modelValue: { type: Boolean }
180
- },
180
+ rounded: { type: Boolean, default: !0 }
181
+ }, {
182
+ modelValue: { type: Boolean },
183
+ modelModifiers: {}
184
+ }),
181
185
  emits: ["update:modelValue"],
182
- setup(u, { emit: f }) {
183
- const r = u, i = f, n = B(), v = {
186
+ setup(a) {
187
+ const i = a, d = z(a, "modelValue"), s = O(), e = {
184
188
  primary: "peer-checked/input:bg-primary",
185
189
  secondary: "peer-checked/input:bg-secondary",
186
190
  success: "peer-checked/input:bg-success",
@@ -198,22 +202,15 @@ const se = ["for"], Ve = /* @__PURE__ */ R({
198
202
  transparent: "peer-checked/input:bg-transparent",
199
203
  black: "peer-checked/input:bg-black",
200
204
  white: "peer-checked/input:bg-white"
201
- }, e = () => {
202
- var l;
203
- (l = n.value) == null || l.click();
204
- }, s = h({
205
- get() {
206
- return r.modelValue;
207
- },
208
- set(l) {
209
- i("update:modelValue", l);
210
- }
211
- }), d = h(() => r.switchSize === "sm" ? {
205
+ }, c = () => {
206
+ var y;
207
+ (y = s.value) == null || y.click();
208
+ }, o = v(() => i.switchSize === "sm" ? {
212
209
  "--switch-width": "30px",
213
210
  "--switch-height": "17px",
214
211
  "--slider-size": "13px",
215
212
  "--gutter-size": "2px"
216
- } : r.switchSize === "lg" ? {
213
+ } : i.switchSize === "lg" ? {
217
214
  "--switch-width": "60px",
218
215
  "--switch-height": "34px",
219
216
  "--slider-size": "26px",
@@ -223,62 +220,61 @@ const se = ["for"], Ve = /* @__PURE__ */ R({
223
220
  "--switch-height": "25.5px",
224
221
  "--slider-size": "19.5px",
225
222
  "--gutter-size": "3px"
226
- }), x = h(() => {
227
- const { sliderColor: l, onColor: C, offColor: w, rounded: t } = r, k = [
228
- o("BGCOLOR", w),
229
- o("BEFOREBG", l),
230
- v[C]
223
+ }), h = v(() => {
224
+ const { sliderColor: y, onColor: x, offColor: r, rounded: u } = i, t = [
225
+ l("BGCOLOR", r),
226
+ l("BEFOREBG", y),
227
+ e[x]
231
228
  ];
232
- return t && k.push("rounded-full before:rounded-full"), k.join(" ");
229
+ return u && t.push("rounded-full before:rounded-full"), t.join(" ");
233
230
  });
234
- return (l, C) => (p(), y("div", {
231
+ return (y, x) => (g(), k("div", {
235
232
  class: "switch relative",
236
- style: M(d.value),
237
- onClick: e
233
+ style: j(o.value),
234
+ onClick: c
238
235
  }, [
239
- I(c("input", {
240
- id: l.id,
236
+ T(p("input", {
237
+ id: y.id,
241
238
  class: "hidden peer/input",
242
- "onUpdate:modelValue": C[0] || (C[0] = (w) => s.value = w),
239
+ "onUpdate:modelValue": x[0] || (x[0] = (r) => d.value = r),
243
240
  ref_key: "inputRef",
244
- ref: n,
241
+ ref: s,
245
242
  type: "checkbox"
246
- }, null, 8, he), [
247
- [W, s.value]
243
+ }, null, 8, fe), [
244
+ [H, d.value]
248
245
  ]),
249
- c("span", {
250
- class: m(["slider absolute inset-0 cursor-pointer transition-all duration-300 before:absolute before:transition-all before:duration-300", x.value])
246
+ p("span", {
247
+ class: b(["slider absolute inset-0 cursor-pointer transition-all duration-300 before:absolute before:transition-all before:duration-300", h.value])
251
248
  }, null, 2)
252
249
  ], 4));
253
250
  }
254
- });
255
- const j = (u, f) => {
256
- const r = u.__vccOpts || u;
257
- for (const [i, n] of f)
258
- r[i] = n;
259
- return r;
260
- }, $e = /* @__PURE__ */ j(fe, [["__scopeId", "data-v-8df11a40"]]), q = /* @__PURE__ */ R({
251
+ }), U = (a, i) => {
252
+ const d = a.__vccOpts || a;
253
+ for (const [s, e] of i)
254
+ d[s] = e;
255
+ return d;
256
+ }, Ee = /* @__PURE__ */ U(ge, [["__scopeId", "data-v-07d209bd"]]), N = /* @__PURE__ */ R({
261
257
  __name: "InputHighlight",
262
258
  props: {
263
259
  color: { default: "primary" },
264
260
  rounded: { type: Boolean, default: !1 },
265
261
  offset: { default: 1 }
266
262
  },
267
- setup(u) {
268
- const f = u, r = {
263
+ setup(a) {
264
+ const i = a, d = {
269
265
  1: "-top-1",
270
266
  2.5: "-top-2.5"
271
- }, i = h(() => {
272
- const n = [o("BEFOREBG", f.color)];
273
- return f.rounded && n.push("rounded-b-md"), n.push(r[f.offset]), n.join(" ");
267
+ }, s = v(() => {
268
+ const e = [l("BEFOREBG", i.color)];
269
+ return i.rounded && e.push("rounded-b-md"), e.push(d[i.offset]), e.join(" ");
274
270
  });
275
- return (n, v) => (p(), y("div", {
276
- class: m(["relative h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:w-0 peer-focus:before:w-full before:transition-[width] before:duration-300 before:ease-linear", i.value])
271
+ return (e, c) => (g(), k("div", {
272
+ class: b(["relative h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:w-0 peer-focus:before:w-full before:transition-[width] before:duration-300 before:ease-linear", s.value])
277
273
  }, null, 2));
278
274
  }
279
- }), ge = ["id", "type", "placeholder", "required", "minlength", "maxlength", "pattern"], me = { class: "peer-valid/validation:hidden peer-inavlid/validation:block ml-3xs" }, be = { class: "text-xs text-danger" }, Ee = /* @__PURE__ */ R({
275
+ }), be = ["id", "type", "placeholder", "required", "minlength", "maxlength", "pattern"], me = { class: "peer-valid/validation:hidden peer-inavlid/validation:block ml-3xs" }, ke = { class: "text-xs text-danger" }, Ge = /* @__PURE__ */ R({
280
276
  __name: "MclInputText",
281
- props: {
277
+ props: /* @__PURE__ */ V({
282
278
  id: {},
283
279
  displayBorder: { type: Boolean, default: !1 },
284
280
  borderColor: { default: "light-4" },
@@ -291,74 +287,69 @@ const j = (u, f) => {
291
287
  type: { default: "text" },
292
288
  displayShadow: { type: Boolean, default: !0 },
293
289
  required: { type: Boolean, default: !1 },
294
- modelValue: {},
295
290
  invalidFeedback: {},
296
291
  minLength: {},
297
292
  maxLength: {},
298
293
  pattern: {}
299
- },
294
+ }, {
295
+ modelValue: {},
296
+ modelModifiers: {}
297
+ }),
300
298
  emits: ["update:modelValue"],
301
- setup(u, { emit: f }) {
302
- const r = u, i = f, n = h({
303
- get() {
304
- return r.modelValue;
305
- },
306
- set(e) {
307
- i("update:modelValue", e);
308
- }
309
- }), v = h(() => {
299
+ setup(a) {
300
+ const i = a, d = z(a, "modelValue"), s = v(() => {
310
301
  const {
311
302
  bgColor: e,
312
- displayBorder: s,
313
- borderColor: d,
314
- displayHighlight: x,
315
- displayShadow: l,
316
- rounded: C,
317
- textcolor: w
318
- } = r, t = [
319
- o("BGCOLOR", e),
320
- o("TEXTCOLOR", w)
303
+ displayBorder: c,
304
+ borderColor: o,
305
+ displayHighlight: h,
306
+ displayShadow: y,
307
+ rounded: x,
308
+ textcolor: r
309
+ } = i, u = [
310
+ l("BGCOLOR", e),
311
+ l("TEXTCOLOR", r)
321
312
  ];
322
- return s && (t.push("border-2"), t.push(o("BORDER", d))), x || (t.push(
313
+ return c && (u.push("border-2"), u.push(l("BORDER", o))), h || (u.push(
323
314
  "focus:ring-4 ring-offset-2 transition-all duration-300 ease-linear"
324
- ), t.push(o("FOCUSRING", d))), l && t.push("shadow-md"), C && t.push("rounded-md"), t.join(" ");
315
+ ), u.push(l("FOCUSRING", o))), y && u.push("shadow-md"), x && u.push("rounded-md"), u.join(" ");
325
316
  });
326
- return (e, s) => (p(), y("div", null, [
327
- I(c("input", {
317
+ return (e, c) => (g(), k("div", null, [
318
+ T(p("input", {
328
319
  id: e.id,
329
320
  type: e.type,
330
- class: m(["w-full p-2xs outline-none peer peer/validation", v.value]),
331
- "onUpdate:modelValue": s[0] || (s[0] = (d) => n.value = d),
321
+ class: b(["w-full p-2xs outline-none peer peer/validation", s.value]),
322
+ "onUpdate:modelValue": c[0] || (c[0] = (o) => d.value = o),
332
323
  placeholder: e.placeholder,
333
324
  required: e.required,
334
325
  minlength: e.minLength,
335
326
  maxlength: e.maxLength,
336
327
  pattern: e.pattern
337
- }, null, 10, ge), [
338
- [Y, n.value]
328
+ }, null, 10, be), [
329
+ [J, d.value]
339
330
  ]),
340
- e.displayHighlight ? (p(), A(q, {
331
+ e.displayHighlight ? (g(), D(N, {
341
332
  key: 0,
342
333
  color: e.highlightColor,
343
334
  rounded: e.rounded
344
- }, null, 8, ["color", "rounded"])) : F("", !0),
345
- c("div", me, [
346
- z(e.$slots, "invalid-feedback", {}, () => [
347
- c("span", be, E(e.invalidFeedback), 1)
335
+ }, null, 8, ["color", "rounded"])) : $("", !0),
336
+ p("div", me, [
337
+ A(e.$slots, "invalid-feedback", {}, () => [
338
+ p("span", ke, I(e.invalidFeedback), 1)
348
339
  ])
349
340
  ])
350
341
  ]));
351
342
  }
352
- }), D = (u) => (le("data-v-aa593ff3"), u = u(), oe(), u), ye = ["id", "placeholder", "aria-expanded"], ve = /* @__PURE__ */ D(() => /* @__PURE__ */ c("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" }, null, -1)), Ce = [
353
- ve
354
- ], ke = /* @__PURE__ */ D(() => /* @__PURE__ */ c("path", { d: "M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z" }, null, -1)), we = [
355
- ke
356
- ], xe = {
343
+ }), X = (a) => (le("data-v-6ce7e157"), a = a(), re(), a), ve = ["id", "placeholder", "aria-expanded"], ye = /* @__PURE__ */ X(() => /* @__PURE__ */ p("path", { d: "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z" }, null, -1)), Ce = [
344
+ ye
345
+ ], xe = /* @__PURE__ */ X(() => /* @__PURE__ */ p("path", { d: "M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z" }, null, -1)), we = [
346
+ xe
347
+ ], Be = {
357
348
  key: 0,
358
349
  class: "absolute"
359
- }, Be = ["onClick"], _e = /* @__PURE__ */ R({
350
+ }, Oe = ["onClick"], Re = /* @__PURE__ */ R({
360
351
  __name: "MclSelect",
361
- props: {
352
+ props: /* @__PURE__ */ V({
362
353
  id: {},
363
354
  displayBorder: { type: Boolean, default: !1 },
364
355
  borderColor: { default: "light-4" },
@@ -373,151 +364,152 @@ const j = (u, f) => {
373
364
  required: { type: Boolean, default: !1 },
374
365
  options: {},
375
366
  selectColor: { default: "primary" },
376
- invalidFeedback: { default: "No match." },
377
- modelValue: {}
378
- },
367
+ invalidFeedback: { default: "No match." }
368
+ }, {
369
+ modelValue: {},
370
+ modelModifiers: {}
371
+ }),
379
372
  emits: ["update:modelValue"],
380
- setup(u, { emit: f }) {
381
- const r = u, i = f, n = B(), v = B(), e = B(), s = B(!1), d = B(""), x = () => {
382
- s.value = !0;
383
- }, l = () => {
384
- var a;
385
- d.value = "", s.value = !1, (a = v.value) == null || a.blur(), i("update:modelValue", "");
386
- }, C = () => {
387
- s.value = !1;
388
- }, w = () => {
389
- var a;
390
- s.value = !s.value, s.value === !0 && ((a = v.value) == null || a.focus());
391
- }, t = (a) => {
392
- a.preventDefault(), d.value !== "" && (d.value = ""), i("update:modelValue", "");
393
- }, k = (a, g) => {
394
- a.preventDefault(), d.value = typeof g == "string" ? g : g.text;
395
- const b = typeof g == "string" ? g : g.value;
396
- i("update:modelValue", b), s.value = !1;
397
- }, _ = h(() => {
373
+ setup(a) {
374
+ const i = a, d = z(a, "modelValue"), s = O(), e = O(), c = O(), o = O(!1), h = O(""), y = () => {
375
+ o.value = !0;
376
+ }, x = () => {
377
+ var n;
378
+ h.value = "", o.value = !1, (n = e.value) == null || n.blur(), d.value = "";
379
+ }, r = () => {
380
+ o.value = !1;
381
+ }, u = () => {
382
+ var n;
383
+ o.value = !o.value, o.value === !0 && ((n = e.value) == null || n.focus());
384
+ }, t = (n) => {
385
+ n.preventDefault(), h.value !== "" && (h.value = ""), d.value = "";
386
+ }, f = (n, m) => {
387
+ n.preventDefault(), h.value = typeof m == "string" ? m : m.text;
388
+ const C = typeof m == "string" ? m : m.value;
389
+ d.value = C, o.value = !1;
390
+ }, w = v(() => {
398
391
  const {
399
- bgColor: a,
400
- displayBorder: g,
401
- borderColor: b,
402
- displayHighlight: $,
403
- displayShadow: S,
404
- rounded: U,
405
- textcolor: X
406
- } = r, T = [
407
- o("BGCOLOR", a),
408
- o("TEXTCOLOR", X)
392
+ bgColor: n,
393
+ displayBorder: m,
394
+ borderColor: C,
395
+ displayHighlight: G,
396
+ displayShadow: _,
397
+ rounded: K,
398
+ textcolor: W
399
+ } = i, M = [
400
+ l("BGCOLOR", n),
401
+ l("TEXTCOLOR", W)
409
402
  ];
410
- return g && (T.push("border-2"), T.push(o("BORDER", b))), $ || T.push("ring-offset-2 transition-all duration-300 ease-linear"), S && T.push("shadow-md"), U && T.push("rounded-md"), T.join(" ");
411
- }), V = (a, g) => {
412
- const b = [o("BEFOREBG", a)];
413
- return g && b.push("rounded-b-md"), b.join(" ");
414
- }, G = h(() => {
415
- const { displayHighlight: a, bgColor: g, borderColor: b, rounded: $ } = r, S = [
416
- o("BGCOLOR", g),
417
- o("BORDER", b)
403
+ return m && (M.push("border-2"), M.push(l("BORDER", C))), G || M.push("ring-offset-2 transition-all duration-300 ease-linear"), _ && M.push("shadow-md"), K && M.push("rounded-md"), M.join(" ");
404
+ }), S = (n, m) => {
405
+ const C = [l("BEFOREBG", n)];
406
+ return m && C.push("rounded-b-md"), C.join(" ");
407
+ }, F = v(() => {
408
+ const { displayHighlight: n, bgColor: m, borderColor: C, rounded: G } = i, _ = [
409
+ l("BGCOLOR", m),
410
+ l("BORDER", C)
418
411
  ];
419
- return a || S.push("mt-2xs"), $ && S.push("rounded-md"), S.join(" ");
420
- }), O = h(() => d.value === "" ? r.options : r.options.filter((g) => {
421
- const b = new RegExp(`${d.value}`, "gi");
422
- return typeof g == "string" ? g.match(b) : g.text.match(b);
423
- })), N = h(() => ({ width: `${e.value}px` }));
424
- return ae(n, () => {
425
- n.value && (e.value = n.value.clientWidth);
426
- }), (a, g) => I((p(), y("div", {
427
- onKeyup: J(l, ["esc"]),
412
+ return n || _.push("mt-2xs"), G && _.push("rounded-md"), _.join(" ");
413
+ }), B = v(() => h.value === "" ? i.options : i.options.filter((m) => {
414
+ const C = new RegExp(`${h.value}`, "gi");
415
+ return typeof m == "string" ? m.match(C) : m.text.match(C);
416
+ })), E = v(() => ({ width: `${c.value}px` }));
417
+ return se(s, () => {
418
+ s.value && (c.value = s.value.clientWidth);
419
+ }), (n, m) => T((g(), k("div", {
420
+ onKeyup: P(x, ["esc"]),
428
421
  ref_key: "componentRef",
429
- ref: n
422
+ ref: s
430
423
  }, [
431
- c("div", {
432
- class: m(["p-2xs flex relative gap-3xs", [
433
- !a.displayHighlight && s.value && L(o)("RINGCOLOR", a.borderColor) + " ring-4",
434
- _.value
424
+ p("div", {
425
+ class: b(["p-2xs flex relative gap-3xs", [
426
+ !n.displayHighlight && o.value && L(l)("RINGCOLOR", n.borderColor) + " ring-4",
427
+ w.value
435
428
  ]])
436
429
  }, [
437
- I(c("input", {
438
- id: a.id,
430
+ T(p("input", {
431
+ id: n.id,
439
432
  type: "text",
440
433
  class: "w-full bg-transparent outline-none",
441
- "onUpdate:modelValue": g[0] || (g[0] = (b) => d.value = b),
434
+ "onUpdate:modelValue": m[0] || (m[0] = (C) => h.value = C),
442
435
  ref_key: "inputBox",
443
- ref: v,
436
+ ref: e,
444
437
  role: "combobox",
445
- placeholder: a.placeholder,
438
+ placeholder: n.placeholder,
446
439
  "aria-autocomplete": "list",
447
- "aria-expanded": s.value,
448
- onFocus: x
449
- }, null, 40, ye), [
450
- [H, d.value]
440
+ "aria-expanded": o.value,
441
+ onFocus: y
442
+ }, null, 40, ve), [
443
+ [q, h.value]
451
444
  ]),
452
- c("div", {
453
- class: m(["flex items-center px-3xs", [
454
- d.value === "" ? "hidden cursor-text" : "block cursor-pointer"
445
+ p("div", {
446
+ class: b(["flex items-center px-3xs", [
447
+ h.value === "" ? "hidden cursor-text" : "block cursor-pointer"
455
448
  ]]),
456
449
  onClick: t
457
450
  }, [
458
- (p(), y("svg", {
451
+ (g(), k("svg", {
459
452
  xmlns: "http://www.w3.org/2000/svg",
460
453
  viewBox: "0 0 384 512",
461
- class: m(["h-xs opacity-70", [L(o)("SVGFILL", a.iconColor)]])
454
+ class: b(["h-xs opacity-70", [L(l)("SVGFILL", n.iconColor)]])
462
455
  }, Ce, 2))
463
456
  ], 2),
464
- c("div", {
457
+ p("div", {
465
458
  class: "flex items-center px-3xs",
466
- onClick: w
459
+ onClick: u
467
460
  }, [
468
- (p(), y("svg", {
461
+ (g(), k("svg", {
469
462
  xmlns: "http://www.w3.org/2000/svg",
470
463
  viewBox: "0 0 320 512",
471
- class: m(["h-xs", [
472
- s.value ? "rotate-180" : "rotate-0",
464
+ class: b(["h-xs", [
465
+ o.value ? "rotate-180" : "rotate-0",
473
466
  "transition-transform duration-300 ease-in",
474
- L(o)("SVGFILL", a.iconColor)
467
+ L(l)("SVGFILL", n.iconColor)
475
468
  ]])
476
469
  }, we, 2))
477
470
  ])
478
471
  ], 2),
479
- a.displayHighlight ? (p(), y("div", {
472
+ n.displayHighlight ? (g(), k("div", {
480
473
  key: 0,
481
- class: m(["relative h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:w-0 before:transition-[width] before:duration-300 before:ease-linear -top-1", [
482
- s.value ? "before:w-full" : "before:w-0",
483
- V(a.highlightColor, a.rounded)
474
+ class: b(["relative h-3xs overflow-hidden before:absolute before:bottom-0 before:left-0 before:h-full before:w-0 before:transition-[width] before:duration-300 before:ease-linear -top-1", [
475
+ o.value ? "before:w-full" : "before:w-0",
476
+ S(n.highlightColor, n.rounded)
484
477
  ]])
485
- }, null, 2)) : F("", !0),
486
- P(Q, { name: "options" }, {
487
- default: Z(() => [
488
- s.value ? (p(), y("div", xe, [
489
- c("ul", {
490
- class: m([[G.value], "max-h-[200px] overflow-y-auto border-2"]),
491
- style: M(N.value),
478
+ }, null, 2)) : $("", !0),
479
+ Q(Z, { name: "options" }, {
480
+ default: ee(() => [
481
+ o.value ? (g(), k("div", Be, [
482
+ p("ul", {
483
+ class: b([[F.value], "max-h-[200px] overflow-y-auto border-2"]),
484
+ style: j(E.value),
492
485
  role: "listbox"
493
486
  }, [
494
- (p(!0), y(ee, null, te(O.value, (b, $) => (p(), y("li", {
495
- key: $,
496
- class: m(["p-2xs cursor-pointer", [L(o)("HVBGCOLOR", a.highlightColor)]]),
487
+ (g(!0), k(te, null, oe(B.value, (C, G) => (g(), k("li", {
488
+ key: G,
489
+ class: b(["p-2xs cursor-pointer", [L(l)("HVBGCOLOR", n.highlightColor)]]),
497
490
  role: "option",
498
- onClick: (S) => k(S, b)
499
- }, E(typeof b == "string" ? b : b.text), 11, Be))), 128)),
500
- d.value !== "" && O.value.length === 0 ? (p(), y("li", {
491
+ onClick: (_) => f(_, C)
492
+ }, I(typeof C == "string" ? C : C.text), 11, Oe))), 128)),
493
+ h.value !== "" && B.value.length === 0 ? (g(), k("li", {
501
494
  key: 0,
502
- class: m(["p-2xs cursor-pointer", [L(o)("HVBGCOLOR", a.selectColor)]])
495
+ class: b(["p-2xs cursor-pointer", [L(l)("HVBGCOLOR", n.selectColor)]])
503
496
  }, [
504
- z(a.$slots, "no-match", {}, () => [
505
- c("span", null, E(a.invalidFeedback), 1)
497
+ A(n.$slots, "no-match", {}, () => [
498
+ p("span", null, I(n.invalidFeedback), 1)
506
499
  ], !0)
507
- ], 2)) : F("", !0)
500
+ ], 2)) : $("", !0)
508
501
  ], 6)
509
- ])) : F("", !0)
502
+ ])) : $("", !0)
510
503
  ]),
511
504
  _: 3
512
505
  })
513
506
  ], 32)), [
514
- [L(re), C]
507
+ [L(ae), r]
515
508
  ]);
516
509
  }
517
- });
518
- const Ie = /* @__PURE__ */ j(_e, [["__scopeId", "data-v-aa593ff3"]]), Oe = ["id", "placeholder", "required", "rows"], ze = /* @__PURE__ */ R({
510
+ }), Ie = /* @__PURE__ */ U(Re, [["__scopeId", "data-v-6ce7e157"]]), Se = ["id", "placeholder", "required", "rows"], Ae = /* @__PURE__ */ R({
519
511
  __name: "MclTextArea",
520
- props: {
512
+ props: /* @__PURE__ */ V({
521
513
  id: {},
522
514
  displayBorder: { type: Boolean, default: !1 },
523
515
  borderColor: { default: "light-4" },
@@ -529,61 +521,163 @@ const Ie = /* @__PURE__ */ j(_e, [["__scopeId", "data-v-aa593ff3"]]), Oe = ["id"
529
521
  placeholder: { default: "" },
530
522
  displayShadow: { type: Boolean, default: !0 },
531
523
  required: { type: Boolean, default: !1 },
532
- rows: { default: 5 },
533
- modelValue: {}
534
- },
524
+ rows: { default: 5 }
525
+ }, {
526
+ modelValue: {},
527
+ modelModifiers: {}
528
+ }),
535
529
  emits: ["update:modelValue"],
536
- setup(u, { emit: f }) {
537
- const r = u, i = f, n = h({
538
- get() {
539
- return r.modelValue;
540
- },
541
- set(e) {
542
- i("update:modelValue", e);
543
- }
544
- }), v = h(() => {
530
+ setup(a) {
531
+ const i = a, d = z(a, "modelValue"), s = v(() => {
545
532
  const {
546
533
  bgColor: e,
547
- displayBorder: s,
548
- borderColor: d,
549
- displayHighlight: x,
550
- displayShadow: l,
551
- rounded: C,
552
- textcolor: w
553
- } = r, t = [
554
- o("BGCOLOR", e),
555
- o("TEXTCOLOR", w)
534
+ displayBorder: c,
535
+ borderColor: o,
536
+ displayHighlight: h,
537
+ displayShadow: y,
538
+ rounded: x,
539
+ textcolor: r
540
+ } = i, u = [
541
+ l("BGCOLOR", e),
542
+ l("TEXTCOLOR", r)
556
543
  ];
557
- return s && (t.push("border-2"), t.push(o("BORDER", d))), x || (t.push(
544
+ return c && (u.push("border-2"), u.push(l("BORDER", o))), h || (u.push(
558
545
  "focus:ring-4 ring-offset-2 transition-all duration-300 ease-linear"
559
- ), t.push(o("FOCUSRING", d))), l && t.push("shadow-md"), C && t.push("rounded-md"), t.join(" ");
546
+ ), u.push(l("FOCUSRING", o))), y && u.push("shadow-md"), x && u.push("rounded-md"), u.join(" ");
560
547
  });
561
- return (e, s) => (p(), y("div", null, [
562
- I(c("textarea", {
548
+ return (e, c) => (g(), k("div", null, [
549
+ T(p("textarea", {
563
550
  id: e.id,
564
- class: m(["w-full p-2xs outline-none input__text peer", v.value]),
565
- "onUpdate:modelValue": s[0] || (s[0] = (d) => n.value = d),
551
+ class: b(["w-full p-2xs outline-none input__text peer", s.value]),
552
+ "onUpdate:modelValue": c[0] || (c[0] = (o) => d.value = o),
566
553
  placeholder: e.placeholder,
567
554
  required: e.required,
568
555
  rows: e.rows
569
- }, null, 10, Oe), [
570
- [H, n.value]
556
+ }, null, 10, Se), [
557
+ [q, d.value]
571
558
  ]),
572
- e.displayHighlight ? (p(), A(q, {
559
+ e.displayHighlight ? (g(), D(N, {
573
560
  key: 0,
574
561
  color: e.highlightColor,
575
562
  rounded: e.rounded,
576
563
  offset: 2.5
577
- }, null, 8, ["color", "rounded"])) : F("", !0)
564
+ }, null, 8, ["color", "rounded"])) : $("", !0)
565
+ ]));
566
+ }
567
+ }), _e = { class: "relative" }, Le = ["id", "value", "checked"], je = /* @__PURE__ */ R({
568
+ __name: "MclCheckbox",
569
+ props: /* @__PURE__ */ V({
570
+ id: {},
571
+ inputSize: { default: "md" },
572
+ bgColor: { default: "light-1" },
573
+ checkedBgColor: { default: "warning" },
574
+ checkColor: { default: "dark-3" },
575
+ borderColor: { default: "dark-1" },
576
+ displayShadow: { type: Boolean, default: !1 },
577
+ rounded: { type: Boolean, default: !1 },
578
+ value: {},
579
+ checked: { type: Boolean, default: !1 }
580
+ }, {
581
+ modelValue: { type: Boolean },
582
+ modelModifiers: {}
583
+ }),
584
+ emits: /* @__PURE__ */ V(["checkbox-click"], ["update:modelValue"]),
585
+ setup(a, { emit: i }) {
586
+ const d = {
587
+ primary: "peer-checked/input:bg-primary",
588
+ secondary: "peer-checked/input:bg-secondary",
589
+ success: "peer-checked/input:bg-success",
590
+ info: "peer-checked/input:bg-info",
591
+ warning: "peer-checked/input:bg-warning",
592
+ danger: "peer-checked/input:bg-danger",
593
+ "light-1": "peer-checked/input:bg-light-1",
594
+ "light-2": "peer-checked/input:bg-light-2",
595
+ "light-3": "peer-checked/input:bg-light-3",
596
+ "light-4": "peer-checked/input:bg-light-4",
597
+ "dark-1": "peer-checked/input:bg-dark-1",
598
+ "dark-2": "peer-checked/input:bg-dark-2",
599
+ "dark-3": "peer-checked/input:bg-dark-3",
600
+ "dark-4": "peer-checked/input:bg-dark-1",
601
+ transparent: "peer-checked/input:bg-transparent",
602
+ black: "peer-checked/input:bg-black",
603
+ white: "peer-checked/input:bg-white"
604
+ }, s = {
605
+ primary: "before:text-primary",
606
+ secondary: "before:text-secondary",
607
+ success: "before:text-success",
608
+ info: "before:text-info",
609
+ warning: "before:text-warning",
610
+ danger: "before:text-danger",
611
+ "light-1": "before:text-light-1",
612
+ "light-2": "before:text-light-2",
613
+ "light-3": "before:text-light-3",
614
+ "light-4": "before:text-light-4",
615
+ "dark-1": "before:text-dark-1",
616
+ "dark-2": "before:text-dark-2",
617
+ "dark-3": "before:text-dark-3",
618
+ "dark-4": "before:text-dark-1",
619
+ transparent: "before:text-transparent",
620
+ black: "before:text-black",
621
+ white: "before:text-white"
622
+ }, e = a, c = z(a, "modelValue"), o = O(), h = i, y = () => {
623
+ var t;
624
+ (t = o.value) == null || t.click();
625
+ }, x = (t) => {
626
+ var w;
627
+ const f = t.target.value;
628
+ h(
629
+ "checkbox-click",
630
+ t,
631
+ o.value.checked,
632
+ (w = o.value) != null && w.checked ? f : ""
633
+ );
634
+ }, r = v(() => {
635
+ const { inputSize: t } = e;
636
+ return t === "sm" ? "h-xs w-xs" : t === "lg" ? "h-md w-md" : "h-sm w-sm";
637
+ }), u = v(() => {
638
+ const {
639
+ bgColor: t,
640
+ borderColor: f,
641
+ displayShadow: w,
642
+ rounded: S,
643
+ checkedBgColor: F,
644
+ checkColor: B
645
+ } = e, E = [
646
+ l("BGCOLOR", t),
647
+ l("BORDER", f),
648
+ s[B],
649
+ d[F]
650
+ ];
651
+ return w && E.push("drop-shadow-md"), S && E.push("rounded-md"), E.join(" ");
652
+ });
653
+ return (t, f) => (g(), k("div", _e, [
654
+ T(p("input", {
655
+ id: t.id,
656
+ ref_key: "checkboxRef",
657
+ ref: o,
658
+ type: "checkbox",
659
+ value: t.value,
660
+ checked: t.checked,
661
+ "onUpdate:modelValue": f[0] || (f[0] = (w) => c.value = w),
662
+ class: "appearance-none peer/input",
663
+ onChange: x
664
+ }, null, 40, Le), [
665
+ [H, c.value]
666
+ ]),
667
+ p("span", {
668
+ class: b(["relative border peer-checked/input:border-2 inline-block p-3xs hover:bg-opacity-60 peer-checked/input:hover:bg-opacity-60 peer-checked/input:before:content-['\\2713'] peer-checked/input:before:inline-block peer-checked/input:before:absolute before:top-1/2 before:-translate-y-1/2 before:left-1/2 before:-translate-x-1/2 transition-colors duration-200 ease-linear", [u.value, r.value]]),
669
+ onClick: y
670
+ }, null, 2)
578
671
  ]));
579
672
  }
580
673
  });
581
674
  export {
582
- Ve as MclFormGroup,
583
- Te as MclInputFile,
675
+ je as MclCheckbox,
676
+ Te as MclFormGroup,
677
+ ze as MclInputFile,
584
678
  Fe as MclInputRadio,
585
- $e as MclInputSwitch,
586
- Ee as MclInputText,
679
+ Ee as MclInputSwitch,
680
+ Ge as MclInputText,
587
681
  Ie as MclSelect,
588
- ze as MclTextArea
682
+ Ae as MclTextArea
589
683
  };