@wikicasa-dev/components 1.9.31 → 1.9.32
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/CheckboxBtn.js +10 -10
- package/dist/assets/CheckboxBtn.css +1 -1
- package/package.json +1 -1
package/dist/CheckboxBtn.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as m, mergeModels as s, useId as g, useAttrs as C, useModel as y, openBlock as d, createElementBlock as u, normalizeClass as a, withModifiers as
|
|
1
|
+
import { defineComponent as m, mergeModels as s, useId as g, useAttrs as C, useModel as y, openBlock as d, createElementBlock as u, normalizeClass as a, withModifiers as r, createElementVNode as k, unref as c, renderSlot as v, toDisplayString as V, createCommentVNode as w } from "vue";
|
|
2
2
|
import { _ as $ } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
3
3
|
import './assets/CheckboxBtn.css';const B = ["id"], I = ["id", "data-cy", "checked", "disabled"], M = ["for"], q = /* @__PURE__ */ m({
|
|
4
4
|
__name: "CheckboxBtn",
|
|
@@ -11,22 +11,22 @@ import './assets/CheckboxBtn.css';const B = ["id"], I = ["id", "data-cy", "check
|
|
|
11
11
|
isValid: { default: null },
|
|
12
12
|
containerId: {},
|
|
13
13
|
containerClass: {},
|
|
14
|
-
handleLabelClick: { type: Boolean }
|
|
14
|
+
handleLabelClick: { type: Boolean, default: !0 }
|
|
15
15
|
}, {
|
|
16
16
|
modelValue: { type: Boolean, default: !1 },
|
|
17
17
|
modelModifiers: {}
|
|
18
18
|
}),
|
|
19
19
|
emits: /* @__PURE__ */ s(["click", "change"], ["update:modelValue"]),
|
|
20
20
|
setup(i, { emit: p }) {
|
|
21
|
-
const l = g(),
|
|
22
|
-
const e =
|
|
23
|
-
|
|
21
|
+
const l = g(), f = C(), n = y(i, "modelValue"), o = p, b = () => {
|
|
22
|
+
const e = f.checked ?? n.value;
|
|
23
|
+
o("change", {
|
|
24
24
|
id: i.id ?? l,
|
|
25
25
|
label: i.label,
|
|
26
26
|
checked: !e
|
|
27
27
|
}), n.value = !e;
|
|
28
28
|
}, h = () => {
|
|
29
|
-
|
|
29
|
+
b(), i.handleLabelClick && o("click");
|
|
30
30
|
};
|
|
31
31
|
return (e, t) => (d(), u("div", {
|
|
32
32
|
id: e.containerId,
|
|
@@ -36,7 +36,7 @@ import './assets/CheckboxBtn.css';const B = ["id"], I = ["id", "data-cy", "check
|
|
|
36
36
|
e.$attrs["wrapper-margin-y"],
|
|
37
37
|
e.containerClass
|
|
38
38
|
]]),
|
|
39
|
-
onClick:
|
|
39
|
+
onClick: r(h, ["stop"])
|
|
40
40
|
}, [
|
|
41
41
|
k("input", {
|
|
42
42
|
id: `${e.id ?? c(l)}`,
|
|
@@ -50,9 +50,9 @@ import './assets/CheckboxBtn.css';const B = ["id"], I = ["id", "data-cy", "check
|
|
|
50
50
|
type: "checkbox",
|
|
51
51
|
checked: e.$attrs.checked ?? n.value,
|
|
52
52
|
disabled: e.$attrs.disabled,
|
|
53
|
-
onChange: t[0] || (t[0] =
|
|
53
|
+
onChange: t[0] || (t[0] = r(() => {
|
|
54
54
|
}, ["prevent", "stop"])),
|
|
55
|
-
onClick: t[1] || (t[1] =
|
|
55
|
+
onClick: t[1] || (t[1] = r(() => {
|
|
56
56
|
}, ["prevent", "stop"]))
|
|
57
57
|
}, null, 42, I),
|
|
58
58
|
v(e.$slots, "label", {}, () => [
|
|
@@ -69,7 +69,7 @@ import './assets/CheckboxBtn.css';const B = ["id"], I = ["id", "data-cy", "check
|
|
|
69
69
|
], !0)
|
|
70
70
|
], 10, B));
|
|
71
71
|
}
|
|
72
|
-
}), N = /* @__PURE__ */ $(q, [["__scopeId", "data-v-
|
|
72
|
+
}), N = /* @__PURE__ */ $(q, [["__scopeId", "data-v-c8d2c078"]]);
|
|
73
73
|
export {
|
|
74
74
|
N as default
|
|
75
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.checked-bg[data-v-
|
|
1
|
+
.checked-bg[data-v-c8d2c078]:checked{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cg transform='translate(-307 -2432)'%3E%3Crect width='16' height='16' fill='%232b5dff' data-name='Rettangolo 2689' rx='3' transform='translate(307 2432)'/%3E%3Cpath fill='none' stroke='%23f4f7ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m319.499 2437.499-6 6Zm-9 3 3 3Z' data-name='Unione 5'/%3E%3C/g%3E%3C/svg%3E")}.checked-bg-invalid[data-v-c8d2c078]:checked{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cg transform='translate(-307 -2432)'%3E%3Crect width='16' height='16' fill='%23FA4F64' data-name='Rettangolo 2689' rx='3' transform='translate(307 2432)'/%3E%3Cpath fill='none' stroke='%23f4f7ff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m319.499 2437.499-6 6Zm-9 3 3 3Z' data-name='Unione 5'/%3E%3C/g%3E%3C/svg%3E")}
|