@wikicasa-dev/components 2.2.8-alpha.14 → 2.2.8-alpha.15
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/Swiper/autoplay.js +1 -1
- package/dist/Swiper/controller.js +1 -1
- package/dist/Swiper/keyboard.js +1 -1
- package/dist/Swiper/thumbs.js +1 -1
- package/dist/UIKit/Checkbox/CheckboxBtn.d.ts +34 -38
- package/dist/UIKit/Checkbox/CheckboxGroup.d.ts +6 -9
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +2 -2
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +41 -39
- package/package.json +1 -1
- /package/dist/assets/{swiper-controller.css → swiper-thumbs.css} +0 -0
package/dist/Swiper/autoplay.js
CHANGED
package/dist/Swiper/keyboard.js
CHANGED
package/dist/Swiper/thumbs.js
CHANGED
|
@@ -1,44 +1,40 @@
|
|
|
1
1
|
import { ClassTypeProp } from '../types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
2
|
+
declare const _default: <TID extends string | number, TLabel extends string | number>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
4
|
+
readonly "onUpdate:modelValue"?: ((args_0: boolean) => any) | undefined;
|
|
5
|
+
readonly onClick?: ((args_0: MouseEvent) => any) | undefined;
|
|
6
|
+
readonly onChange?: ((args_0: {
|
|
7
|
+
id: TID;
|
|
8
|
+
label: TLabel;
|
|
9
|
+
checked: boolean;
|
|
10
|
+
}) => any) | undefined;
|
|
11
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onClick" | "onChange"> & {
|
|
12
|
+
id?: TID;
|
|
13
|
+
dataCy?: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated Use v-model instead
|
|
17
|
+
*/
|
|
18
|
+
checked?: boolean;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
inputClass?: ClassTypeProp;
|
|
21
|
+
label?: TLabel;
|
|
22
|
+
modelValue?: boolean;
|
|
23
|
+
} & Partial<{}>> & import('vue').PublicProps;
|
|
24
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
25
|
+
attrs: any;
|
|
22
26
|
slots: {
|
|
23
27
|
label?(_: {}): any;
|
|
24
28
|
};
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
emit: ((evt: "update:modelValue", args_0: boolean) => void) & ((evt: "click", args_0: MouseEvent) => void) & ((evt: "change", args_0: {
|
|
30
|
+
id: TID;
|
|
31
|
+
label: TLabel;
|
|
32
|
+
checked: boolean;
|
|
33
|
+
}) => void);
|
|
34
|
+
}>) => import('vue').VNode & {
|
|
35
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
27
36
|
};
|
|
28
|
-
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
29
|
-
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
30
|
-
"update:modelValue": (args_0: boolean) => any;
|
|
31
|
-
click: (args_0: MouseEvent) => any;
|
|
32
|
-
change: (args_0: EventPayload) => any;
|
|
33
|
-
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
34
|
-
"onUpdate:modelValue"?: ((args_0: boolean) => any) | undefined;
|
|
35
|
-
onClick?: ((args_0: MouseEvent) => any) | undefined;
|
|
36
|
-
onChange?: ((args_0: EventPayload) => any) | undefined;
|
|
37
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLLabelElement>;
|
|
38
|
-
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
39
37
|
export default _default;
|
|
40
|
-
type
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
44
|
-
};
|
|
38
|
+
type __VLS_PrettifyLocal<T> = {
|
|
39
|
+
[K in keyof T]: T[K];
|
|
40
|
+
} & {};
|
|
@@ -7,9 +7,6 @@ export type CheckboxButtonType<TID = string | number, TLabel = string | number,
|
|
|
7
7
|
payload?: TPayload;
|
|
8
8
|
dataCy?: string;
|
|
9
9
|
};
|
|
10
|
-
export type CheckboxButtonTypeObj = Omit<CheckboxButtonType, "checked"> & {
|
|
11
|
-
checked: boolean;
|
|
12
|
-
};
|
|
13
10
|
export type GetterIdType<T = CheckboxButtonType | string | number> = (checkboxBtn: T) => string;
|
|
14
11
|
export type CheckboxGroupProps<TID = string | number, TLabel = string | number, TPayload = unknown> = {
|
|
15
12
|
checkboxData?: CheckboxButtonType<TID, TLabel, TPayload>[];
|
|
@@ -36,7 +33,7 @@ export type CheckboxGroupProps<TID = string | number, TLabel = string | number,
|
|
|
36
33
|
};
|
|
37
34
|
declare const _default: <TID extends string | number, TLabel extends string | number, TPayload>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
38
35
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
39
|
-
readonly "onUpdate:modelValue"?: ((args_0: CheckboxButtonType<
|
|
36
|
+
readonly "onUpdate:modelValue"?: ((args_0: CheckboxButtonType<TID, TLabel, TPayload>[]) => any) | undefined;
|
|
40
37
|
readonly onResetted?: (() => any) | undefined;
|
|
41
38
|
readonly onCheckedGroup?: ((args_0: string) => any) | undefined;
|
|
42
39
|
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onResetted" | "onCheckedGroup"> & CheckboxGroupProps<TID, TLabel, TPayload> & Partial<{}>> & import('vue').PublicProps;
|
|
@@ -44,18 +41,18 @@ declare const _default: <TID extends string | number, TLabel extends string | nu
|
|
|
44
41
|
attrs: any;
|
|
45
42
|
slots: {
|
|
46
43
|
default?(_: {
|
|
47
|
-
isActive: (elem: CheckboxButtonType | string | number) => boolean;
|
|
48
|
-
handleChange: (checkboxValue: CheckboxButtonType) => void;
|
|
44
|
+
isActive: (elem: CheckboxButtonType<TID, TLabel, TPayload> | string | number) => boolean;
|
|
45
|
+
handleChange: (checkboxValue: CheckboxButtonType<TID, TLabel, TPayload>) => void;
|
|
49
46
|
checkboxesData: CheckboxButtonType<TID, TLabel, TPayload>[];
|
|
50
47
|
}): any;
|
|
51
48
|
checkbox_elements?(_: {
|
|
52
|
-
isActive: (elem: CheckboxButtonType | string | number) => boolean;
|
|
53
|
-
handleChange: (checkboxValue: CheckboxButtonType) => void;
|
|
49
|
+
isActive: (elem: CheckboxButtonType<TID, TLabel, TPayload> | string | number) => boolean;
|
|
50
|
+
handleChange: (checkboxValue: CheckboxButtonType<TID, TLabel, TPayload>) => void;
|
|
54
51
|
checkboxesData: CheckboxButtonType<TID, TLabel, TPayload>[];
|
|
55
52
|
reset: () => void;
|
|
56
53
|
}): any;
|
|
57
54
|
};
|
|
58
|
-
emit: ((evt: "update:modelValue", args_0: CheckboxButtonType<
|
|
55
|
+
emit: ((evt: "update:modelValue", args_0: CheckboxButtonType<TID, TLabel, TPayload>[]) => void) & ((evt: "resetted") => void) & ((evt: "checkedGroup", args_0: string) => void);
|
|
59
56
|
}>) => import('vue').VNode & {
|
|
60
57
|
__ctx?: Awaited<typeof __VLS_setup>;
|
|
61
58
|
};
|
|
@@ -14,7 +14,7 @@ const N = ["for"], j = /* @__PURE__ */ m({
|
|
|
14
14
|
label: { default: "" },
|
|
15
15
|
modelValue: { type: Boolean, default: !1 }
|
|
16
16
|
},
|
|
17
|
-
emits: ["click", "
|
|
17
|
+
emits: ["click", "update:modelValue", "change"],
|
|
18
18
|
setup(e, { emit: r }) {
|
|
19
19
|
const l = f(), d = h(() => `${e.id ?? l}`), a = r;
|
|
20
20
|
b(
|
|
@@ -40,7 +40,7 @@ const N = ["for"], j = /* @__PURE__ */ m({
|
|
|
40
40
|
"model-value": e.modelValue,
|
|
41
41
|
"data-cy": e.dataCy,
|
|
42
42
|
disabled: e.disabled,
|
|
43
|
-
class: y(["
|
|
43
|
+
class: y(["uikit-inline-flex uikit-size-[20px] uikit-items-center uikit-justify-center uikit-rounded-[4px] uikit-p-0 data-[state='unchecked']:uikit-border data-[state='unchecked']:uikit-border-solid data-[state='unchecked']:uikit-border-w-lightgray", [
|
|
44
44
|
{
|
|
45
45
|
"uikit-bg-white": !e.modelValue,
|
|
46
46
|
"uikit-bg-w-primary": e.modelValue
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { stringToHyphened as
|
|
3
|
-
import
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as p, ref as v, computed as h, watch as D, renderSlot as b, createElementVNode as E, normalizeClass as $, createElementBlock as B, createCommentVNode as A, openBlock as g, Fragment as I, renderList as R, createBlock as K, unref as V } from "vue";
|
|
2
|
+
import { stringToHyphened as L, isArrNullOrEmpty as G } from "@wikicasa-dev/utilities";
|
|
3
|
+
import N from "./CheckboxBtn.vue.js";
|
|
4
|
+
const T = ["id", "data-cy"], S = /* @__PURE__ */ p({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "CheckboxGroup",
|
|
7
7
|
props: {
|
|
@@ -14,36 +14,38 @@ const N = ["id", "data-cy"], O = /* @__PURE__ */ x({
|
|
|
14
14
|
autoCheckResetAll: { type: Boolean, default: !1 },
|
|
15
15
|
autoCheckResetEmpty: { type: Boolean, default: !1 },
|
|
16
16
|
manualToggleResetButton: { type: Boolean, default: !1 },
|
|
17
|
-
getKey: { type: Function, default: (
|
|
17
|
+
getKey: { type: Function, default: (a) => typeof a == "string" || typeof a == "number" ? `${a}` : `${a.id}` },
|
|
18
18
|
groupId: { default: "" },
|
|
19
19
|
dataCy: { default: "" }
|
|
20
20
|
},
|
|
21
21
|
emits: ["resetted", "update:modelValue", "checkedGroup"],
|
|
22
|
-
setup(
|
|
23
|
-
const o =
|
|
22
|
+
setup(a, { emit: C }) {
|
|
23
|
+
const o = a, s = C, l = v(
|
|
24
|
+
/* @__PURE__ */ new Map()
|
|
25
|
+
), r = h(() => {
|
|
24
26
|
for (const e of o.checkboxData)
|
|
25
27
|
if (e.reset) return e;
|
|
26
28
|
return null;
|
|
27
29
|
}), y = h(() => o.checkboxData.length), f = h(() => {
|
|
28
30
|
let e = 0;
|
|
29
|
-
return l.value.forEach((
|
|
30
|
-
|
|
31
|
+
return l.value.forEach((t) => {
|
|
32
|
+
t.checked && e++;
|
|
31
33
|
}), e;
|
|
32
34
|
});
|
|
33
35
|
(() => {
|
|
34
36
|
const e = [];
|
|
35
|
-
for (const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
),
|
|
37
|
+
for (const t of o.checkboxData)
|
|
38
|
+
l.value.set(`${t.id}`, {
|
|
39
|
+
...t,
|
|
40
|
+
checked: !!t.checked
|
|
41
|
+
}), t.checked && e.push(t);
|
|
40
42
|
s("update:modelValue", e);
|
|
41
43
|
})();
|
|
42
|
-
const u = (e,
|
|
44
|
+
const u = (e, t) => {
|
|
43
45
|
const c = l.value.get(e);
|
|
44
46
|
if (c) {
|
|
45
|
-
if (
|
|
46
|
-
l.value.set(e, { ...c, ...
|
|
47
|
+
if (t) {
|
|
48
|
+
l.value.set(e, { ...c, ...t });
|
|
47
49
|
return;
|
|
48
50
|
}
|
|
49
51
|
l.value.set(e, { ...c, checked: !c.checked });
|
|
@@ -55,55 +57,55 @@ const N = ["id", "data-cy"], O = /* @__PURE__ */ x({
|
|
|
55
57
|
}, m = () => {
|
|
56
58
|
k(), s("update:modelValue", []), s("resetted");
|
|
57
59
|
}, d = (e) => l.value.get(o.getKey(e))?.checked ?? !1, i = (e) => {
|
|
58
|
-
if (
|
|
59
|
-
const
|
|
60
|
-
|
|
60
|
+
if (G(o.checkboxData)) return;
|
|
61
|
+
const t = l.value.get(e.id);
|
|
62
|
+
t?.reset && e.checked ? k() : r.value && !t?.reset && u(o.getKey(r.value), { checked: !1 }), u(`${e.id}`), o.autoCheckResetAll && r.value && f.value === y.value - 1 && l.value.forEach((n) => {
|
|
61
63
|
n.checked = !!n.reset;
|
|
62
|
-
}), o.autoCheckResetEmpty && r.value && !f.value && (!o.manualToggleResetButton || !
|
|
64
|
+
}), o.autoCheckResetEmpty && r.value && !f.value && (!o.manualToggleResetButton || !t?.reset) && u(o.getKey(r.value), { checked: !0 });
|
|
63
65
|
const c = [];
|
|
64
66
|
l.value.forEach((n) => {
|
|
65
67
|
n.checked && c.push(n);
|
|
66
68
|
}), s("update:modelValue", c), s("checkedGroup", o.groupId);
|
|
67
69
|
};
|
|
68
|
-
return
|
|
70
|
+
return D(
|
|
69
71
|
() => o.reset,
|
|
70
72
|
(e) => {
|
|
71
73
|
e && m();
|
|
72
74
|
}
|
|
73
|
-
), (e,
|
|
75
|
+
), (e, t) => b(e.$slots, "default", {
|
|
74
76
|
isActive: d,
|
|
75
77
|
handleChange: i,
|
|
76
|
-
checkboxesData:
|
|
78
|
+
checkboxesData: a.checkboxData
|
|
77
79
|
}, () => [
|
|
78
|
-
|
|
79
|
-
id:
|
|
80
|
-
class:
|
|
81
|
-
"data-cy":
|
|
80
|
+
E("div", {
|
|
81
|
+
id: a.groupId,
|
|
82
|
+
class: $(["checkbox-group-container", e.$attrs.class || ""]),
|
|
83
|
+
"data-cy": a.dataCy
|
|
82
84
|
}, [
|
|
83
85
|
b(e.$slots, "checkbox_elements", {
|
|
84
86
|
isActive: d,
|
|
85
87
|
handleChange: i,
|
|
86
|
-
checkboxesData:
|
|
88
|
+
checkboxesData: a.checkboxData,
|
|
87
89
|
reset: m
|
|
88
90
|
}, () => [
|
|
89
|
-
|
|
90
|
-
id:
|
|
91
|
+
a.checkboxData ? (g(!0), B(I, { key: 0 }, R(a.checkboxData, (c, n) => (g(), K(N, {
|
|
92
|
+
id: a.getKey(c),
|
|
91
93
|
key: n,
|
|
92
|
-
"data-cy": c.dataCy ?? `checkbox_${
|
|
94
|
+
"data-cy": c.dataCy ?? `checkbox_${V(L)(`${c.label}`)}`,
|
|
93
95
|
label: c.label,
|
|
94
|
-
inline:
|
|
96
|
+
inline: a.formCheckInline,
|
|
95
97
|
"model-value": d(c),
|
|
96
98
|
"container-class": [
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
a.formCheckInline ? "uikit-mr-10px" : "uikit-mb-10px",
|
|
100
|
+
a.checkboxContainerClasses
|
|
99
101
|
],
|
|
100
|
-
onChange: i
|
|
101
|
-
}, null, 8, ["id", "data-cy", "label", "inline", "model-value", "container-class"]))), 128)) :
|
|
102
|
+
onChange: t[0] || (t[0] = (x) => i(x))
|
|
103
|
+
}, null, 8, ["id", "data-cy", "label", "inline", "model-value", "container-class"]))), 128)) : A("", !0)
|
|
102
104
|
])
|
|
103
|
-
], 10,
|
|
105
|
+
], 10, T)
|
|
104
106
|
]);
|
|
105
107
|
}
|
|
106
108
|
});
|
|
107
109
|
export {
|
|
108
|
-
|
|
110
|
+
S as default
|
|
109
111
|
};
|
package/package.json
CHANGED
|
File without changes
|