@wikicasa-dev/components 1.9.30 → 1.9.31
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
CHANGED
|
@@ -1,70 +1,75 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
import './assets/CheckboxBtn.css';const
|
|
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 o, createElementVNode as k, unref as c, renderSlot as v, toDisplayString as V, createCommentVNode as w } from "vue";
|
|
2
|
+
import { _ as $ } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
3
|
+
import './assets/CheckboxBtn.css';const B = ["id"], I = ["id", "data-cy", "checked", "disabled"], M = ["for"], q = /* @__PURE__ */ m({
|
|
4
4
|
__name: "CheckboxBtn",
|
|
5
|
-
props: {
|
|
5
|
+
props: /* @__PURE__ */ s({
|
|
6
6
|
id: {},
|
|
7
|
-
inputClass: {
|
|
7
|
+
inputClass: {},
|
|
8
8
|
inline: { type: Boolean, default: !1 },
|
|
9
9
|
label: { default: "" },
|
|
10
|
-
labelClass: {
|
|
10
|
+
labelClass: {},
|
|
11
11
|
isValid: { default: null },
|
|
12
|
+
containerId: {},
|
|
13
|
+
containerClass: {},
|
|
14
|
+
handleLabelClick: { type: Boolean }
|
|
15
|
+
}, {
|
|
12
16
|
modelValue: { type: Boolean, default: !1 },
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
id: i.id,
|
|
17
|
+
modelModifiers: {}
|
|
18
|
+
}),
|
|
19
|
+
emits: /* @__PURE__ */ s(["click", "change"], ["update:modelValue"]),
|
|
20
|
+
setup(i, { emit: p }) {
|
|
21
|
+
const l = g(), b = C(), n = y(i, "modelValue"), r = p, f = () => {
|
|
22
|
+
const e = b.checked ?? n.value;
|
|
23
|
+
r("change", {
|
|
24
|
+
id: i.id ?? l,
|
|
22
25
|
label: i.label,
|
|
23
|
-
checked: !
|
|
24
|
-
}),
|
|
25
|
-
},
|
|
26
|
-
|
|
26
|
+
checked: !e
|
|
27
|
+
}), n.value = !e;
|
|
28
|
+
}, h = () => {
|
|
29
|
+
f(), i.handleLabelClick && r("click");
|
|
27
30
|
};
|
|
28
|
-
return (e,
|
|
31
|
+
return (e, t) => (d(), u("div", {
|
|
29
32
|
id: e.containerId,
|
|
30
|
-
class:
|
|
33
|
+
class: a(["uikit-group uikit-relative uikit-block uikit-pl-25px hover:uikit-cursor-pointer", [
|
|
31
34
|
{ "uikit-mr-4 uikit-inline-flex uikit-items-center": e.inline },
|
|
32
35
|
{ "uikit-py-10px": !e.inline && !e.$attrs["wrapper-margin-y"] },
|
|
33
36
|
e.$attrs["wrapper-margin-y"],
|
|
34
37
|
e.containerClass
|
|
35
38
|
]]),
|
|
36
|
-
onClick:
|
|
39
|
+
onClick: o(h, ["stop"])
|
|
37
40
|
}, [
|
|
38
|
-
|
|
39
|
-
id: `${e.id}`,
|
|
41
|
+
k("input", {
|
|
42
|
+
id: `${e.id ?? c(l)}`,
|
|
40
43
|
ref: "checkbox",
|
|
41
44
|
"data-cy": e.$attrs["data-cy"],
|
|
42
|
-
class:
|
|
45
|
+
class: a(["uikit-pointer-events-none uikit-absolute uikit-left-0 uikit-h-4 uikit-w-4 uikit-appearance-none uikit-rounded-3xs uikit-border uikit-border-solid uikit-border-w-secondary uikit-bg-white checked:uikit-bg-center checked:uikit-bg-no-repeat group-hover:uikit-cursor-pointer", [
|
|
43
46
|
{ "!uikit-border-w-danger": e.isValid === !1 },
|
|
44
47
|
e.inputClass,
|
|
45
48
|
e.isValid === !1 ? "checked-bg-invalid" : "checked-bg"
|
|
46
49
|
]]),
|
|
47
50
|
type: "checkbox",
|
|
48
|
-
checked: e.$attrs.checked
|
|
51
|
+
checked: e.$attrs.checked ?? n.value,
|
|
49
52
|
disabled: e.$attrs.disabled,
|
|
50
|
-
onChange:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
53
|
+
onChange: t[0] || (t[0] = o(() => {
|
|
54
|
+
}, ["prevent", "stop"])),
|
|
55
|
+
onClick: t[1] || (t[1] = o(() => {
|
|
56
|
+
}, ["prevent", "stop"]))
|
|
57
|
+
}, null, 42, I),
|
|
58
|
+
v(e.$slots, "label", {}, () => [
|
|
59
|
+
k("label", {
|
|
60
|
+
class: a(["uikit-pl-10px uikit-text-sm group-hover:uikit-cursor-pointer", [e.labelClass, { "uikit-text-w-danger": e.isValid === !1 }]]),
|
|
61
|
+
for: `${e.id ?? c(l)}`
|
|
62
|
+
}, V(e.label), 11, M),
|
|
63
|
+
e.$attrs.required ? (d(), u("span", {
|
|
59
64
|
key: 0,
|
|
60
|
-
class:
|
|
65
|
+
class: a(["required after:uikit-content-['*']", [
|
|
61
66
|
e.isValid !== !1 ? "after:uikit-text-w-primary" : "after:uikit-text-w-danger"
|
|
62
67
|
]])
|
|
63
|
-
}, null, 2)) :
|
|
68
|
+
}, null, 2)) : w("", !0)
|
|
64
69
|
], !0)
|
|
65
|
-
], 10,
|
|
70
|
+
], 10, B));
|
|
66
71
|
}
|
|
67
|
-
}),
|
|
72
|
+
}), N = /* @__PURE__ */ $(q, [["__scopeId", "data-v-3b5fa0e9"]]);
|
|
68
73
|
export {
|
|
69
|
-
|
|
74
|
+
N as default
|
|
70
75
|
};
|
|
@@ -8,86 +8,73 @@ type EventPayload = {
|
|
|
8
8
|
declare function __VLS_template(): {
|
|
9
9
|
label?(_: {}): any;
|
|
10
10
|
};
|
|
11
|
-
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
12
|
+
modelValue: import('vue').PropType<boolean | undefined>;
|
|
13
|
+
id: {
|
|
14
|
+
type: import('vue').PropType<string | number>;
|
|
15
|
+
};
|
|
16
|
+
inputClass: {
|
|
17
|
+
type: import('vue').PropType<string>;
|
|
18
|
+
};
|
|
19
|
+
inline: {
|
|
20
|
+
type: import('vue').PropType<boolean>;
|
|
21
|
+
};
|
|
22
|
+
label: {
|
|
23
|
+
type: import('vue').PropType<string | number>;
|
|
24
|
+
};
|
|
25
|
+
labelClass: {
|
|
26
|
+
type: import('vue').PropType<string>;
|
|
27
|
+
};
|
|
28
|
+
isValid: {
|
|
29
|
+
type: import('vue').PropType<Nullable<boolean>>;
|
|
30
|
+
};
|
|
31
|
+
containerId: {
|
|
32
|
+
type: import('vue').PropType<string>;
|
|
33
|
+
};
|
|
34
|
+
containerClass: {
|
|
35
|
+
type: import('vue').PropType<string>;
|
|
36
|
+
};
|
|
37
|
+
handleLabelClick: {
|
|
38
|
+
type: import('vue').PropType<boolean>;
|
|
39
|
+
};
|
|
40
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
33
41
|
click: () => void;
|
|
34
42
|
change: (args_0: EventPayload) => void;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
id:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
isValid:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
43
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
44
|
+
modelValue: import('vue').PropType<boolean | undefined>;
|
|
45
|
+
id: {
|
|
46
|
+
type: import('vue').PropType<string | number>;
|
|
47
|
+
};
|
|
48
|
+
inputClass: {
|
|
49
|
+
type: import('vue').PropType<string>;
|
|
50
|
+
};
|
|
51
|
+
inline: {
|
|
52
|
+
type: import('vue').PropType<boolean>;
|
|
53
|
+
};
|
|
54
|
+
label: {
|
|
55
|
+
type: import('vue').PropType<string | number>;
|
|
56
|
+
};
|
|
57
|
+
labelClass: {
|
|
58
|
+
type: import('vue').PropType<string>;
|
|
59
|
+
};
|
|
60
|
+
isValid: {
|
|
61
|
+
type: import('vue').PropType<Nullable<boolean>>;
|
|
62
|
+
};
|
|
63
|
+
containerId: {
|
|
64
|
+
type: import('vue').PropType<string>;
|
|
65
|
+
};
|
|
66
|
+
containerClass: {
|
|
67
|
+
type: import('vue').PropType<string>;
|
|
68
|
+
};
|
|
69
|
+
handleLabelClick: {
|
|
70
|
+
type: import('vue').PropType<boolean>;
|
|
71
|
+
};
|
|
72
|
+
}>> & Readonly<{
|
|
58
73
|
onClick?: (() => any) | undefined;
|
|
59
74
|
onChange?: ((args_0: EventPayload) => any) | undefined;
|
|
60
|
-
|
|
61
|
-
}>, {
|
|
62
|
-
label: string | number;
|
|
63
|
-
containerClass: string;
|
|
64
|
-
isValid: Nullable<boolean>;
|
|
65
|
-
modelValue: boolean;
|
|
66
|
-
inputClass: string;
|
|
67
|
-
inline: boolean;
|
|
68
|
-
labelClass: string;
|
|
69
|
-
containerId: string;
|
|
70
|
-
handleLabelClick: boolean;
|
|
71
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
75
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
72
76
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
73
77
|
export default _default;
|
|
74
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
75
|
-
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
76
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
77
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
78
|
-
} : {
|
|
79
|
-
type: import('vue').PropType<T[K]>;
|
|
80
|
-
required: true;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
type __VLS_WithDefaults<P, D> = {
|
|
84
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
|
85
|
-
default: D[K];
|
|
86
|
-
}> : P[K];
|
|
87
|
-
};
|
|
88
|
-
type __VLS_Prettify<T> = {
|
|
89
|
-
[K in keyof T]: T[K];
|
|
90
|
-
} & {};
|
|
91
78
|
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
92
79
|
new (): {
|
|
93
80
|
$slots: S;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.checked-bg[data-v-
|
|
1
|
+
.checked-bg[data-v-3b5fa0e9]: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-3b5fa0e9]: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")}
|