@wikicasa-dev/components 2.2.8-alpha.7 → 2.2.9-alpha.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/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/Autocomplete/ClearableAutocomplete.d.ts +26 -13
- package/dist/UIKit/BaseAutocomplete.d.ts +7 -7
- package/dist/UIKit/BaseDropDown.d.ts +3 -0
- package/dist/UIKit/BaseFloatingLabel.js +4 -4
- package/dist/UIKit/BaseModal.d.ts +4 -0
- package/dist/UIKit/Checkbox/CheckboxBtn.d.ts +34 -38
- package/dist/UIKit/Checkbox/CheckboxBtn.js +3 -2
- package/dist/UIKit/Checkbox/CheckboxGroup.d.ts +6 -9
- package/dist/assets/BaseFloatingLabel.css +1 -1
- package/dist/assets/CheckboxBtn.css +1 -0
- package/dist/assets/tailwind.css +1 -1
- package/dist/components/carousel/SwiperCarousel.d.ts +8 -8
- package/dist/index.js +84 -83
- package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +30 -31
- package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +98 -76
- package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +1 -4
- package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +101 -96
- package/dist/packages/components/lib/UIKit/BaseFloatingLabel.vue.js +8 -8
- package/dist/packages/components/lib/UIKit/BaseModal.vue.js +11 -10
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +3 -3
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +42 -39
- package/package.json +3 -3
- /package/dist/assets/{swiper-controller.css → swiper-thumbs.css} +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { stringToHyphened as
|
|
3
|
-
import
|
|
4
|
-
|
|
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
|
+
import '../../../../../assets/CheckboxBtn.css';/* empty css */
|
|
5
|
+
const T = ["id", "data-cy"], j = /* @__PURE__ */ p({
|
|
5
6
|
inheritAttrs: !1,
|
|
6
7
|
__name: "CheckboxGroup",
|
|
7
8
|
props: {
|
|
@@ -14,36 +15,38 @@ const N = ["id", "data-cy"], O = /* @__PURE__ */ x({
|
|
|
14
15
|
autoCheckResetAll: { type: Boolean, default: !1 },
|
|
15
16
|
autoCheckResetEmpty: { type: Boolean, default: !1 },
|
|
16
17
|
manualToggleResetButton: { type: Boolean, default: !1 },
|
|
17
|
-
getKey: { type: Function, default: (
|
|
18
|
+
getKey: { type: Function, default: (a) => typeof a == "string" || typeof a == "number" ? `${a}` : `${a.id}` },
|
|
18
19
|
groupId: { default: "" },
|
|
19
20
|
dataCy: { default: "" }
|
|
20
21
|
},
|
|
21
22
|
emits: ["resetted", "update:modelValue", "checkedGroup"],
|
|
22
|
-
setup(
|
|
23
|
-
const o =
|
|
23
|
+
setup(a, { emit: C }) {
|
|
24
|
+
const o = a, s = C, l = v(
|
|
25
|
+
/* @__PURE__ */ new Map()
|
|
26
|
+
), r = h(() => {
|
|
24
27
|
for (const e of o.checkboxData)
|
|
25
28
|
if (e.reset) return e;
|
|
26
29
|
return null;
|
|
27
30
|
}), y = h(() => o.checkboxData.length), f = h(() => {
|
|
28
31
|
let e = 0;
|
|
29
|
-
return l.value.forEach((
|
|
30
|
-
|
|
32
|
+
return l.value.forEach((t) => {
|
|
33
|
+
t.checked && e++;
|
|
31
34
|
}), e;
|
|
32
35
|
});
|
|
33
36
|
(() => {
|
|
34
37
|
const e = [];
|
|
35
|
-
for (const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
),
|
|
38
|
+
for (const t of o.checkboxData)
|
|
39
|
+
l.value.set(`${t.id}`, {
|
|
40
|
+
...t,
|
|
41
|
+
checked: !!t.checked
|
|
42
|
+
}), t.checked && e.push(t);
|
|
40
43
|
s("update:modelValue", e);
|
|
41
44
|
})();
|
|
42
|
-
const u = (e,
|
|
45
|
+
const u = (e, t) => {
|
|
43
46
|
const c = l.value.get(e);
|
|
44
47
|
if (c) {
|
|
45
|
-
if (
|
|
46
|
-
l.value.set(e, { ...c, ...
|
|
48
|
+
if (t) {
|
|
49
|
+
l.value.set(e, { ...c, ...t });
|
|
47
50
|
return;
|
|
48
51
|
}
|
|
49
52
|
l.value.set(e, { ...c, checked: !c.checked });
|
|
@@ -55,55 +58,55 @@ const N = ["id", "data-cy"], O = /* @__PURE__ */ x({
|
|
|
55
58
|
}, m = () => {
|
|
56
59
|
k(), s("update:modelValue", []), s("resetted");
|
|
57
60
|
}, d = (e) => l.value.get(o.getKey(e))?.checked ?? !1, i = (e) => {
|
|
58
|
-
if (
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
+
if (G(o.checkboxData)) return;
|
|
62
|
+
const t = l.value.get(e.id);
|
|
63
|
+
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
64
|
n.checked = !!n.reset;
|
|
62
|
-
}), o.autoCheckResetEmpty && r.value && !f.value && (!o.manualToggleResetButton || !
|
|
65
|
+
}), o.autoCheckResetEmpty && r.value && !f.value && (!o.manualToggleResetButton || !t?.reset) && u(o.getKey(r.value), { checked: !0 });
|
|
63
66
|
const c = [];
|
|
64
67
|
l.value.forEach((n) => {
|
|
65
68
|
n.checked && c.push(n);
|
|
66
69
|
}), s("update:modelValue", c), s("checkedGroup", o.groupId);
|
|
67
70
|
};
|
|
68
|
-
return
|
|
71
|
+
return D(
|
|
69
72
|
() => o.reset,
|
|
70
73
|
(e) => {
|
|
71
74
|
e && m();
|
|
72
75
|
}
|
|
73
|
-
), (e,
|
|
76
|
+
), (e, t) => b(e.$slots, "default", {
|
|
74
77
|
isActive: d,
|
|
75
78
|
handleChange: i,
|
|
76
|
-
checkboxesData:
|
|
79
|
+
checkboxesData: a.checkboxData
|
|
77
80
|
}, () => [
|
|
78
|
-
|
|
79
|
-
id:
|
|
80
|
-
class:
|
|
81
|
-
"data-cy":
|
|
81
|
+
E("div", {
|
|
82
|
+
id: a.groupId,
|
|
83
|
+
class: $(["checkbox-group-container", e.$attrs.class || ""]),
|
|
84
|
+
"data-cy": a.dataCy
|
|
82
85
|
}, [
|
|
83
86
|
b(e.$slots, "checkbox_elements", {
|
|
84
87
|
isActive: d,
|
|
85
88
|
handleChange: i,
|
|
86
|
-
checkboxesData:
|
|
89
|
+
checkboxesData: a.checkboxData,
|
|
87
90
|
reset: m
|
|
88
91
|
}, () => [
|
|
89
|
-
|
|
90
|
-
id:
|
|
92
|
+
a.checkboxData ? (g(!0), B(I, { key: 0 }, R(a.checkboxData, (c, n) => (g(), K(N, {
|
|
93
|
+
id: a.getKey(c),
|
|
91
94
|
key: n,
|
|
92
|
-
"data-cy": c.dataCy ?? `checkbox_${
|
|
95
|
+
"data-cy": c.dataCy ?? `checkbox_${V(L)(`${c.label}`)}`,
|
|
93
96
|
label: c.label,
|
|
94
|
-
inline:
|
|
97
|
+
inline: a.formCheckInline,
|
|
95
98
|
"model-value": d(c),
|
|
96
99
|
"container-class": [
|
|
97
|
-
|
|
98
|
-
|
|
100
|
+
a.formCheckInline ? "uikit-mr-10px" : "uikit-mb-10px",
|
|
101
|
+
a.checkboxContainerClasses
|
|
99
102
|
],
|
|
100
|
-
onChange: i
|
|
101
|
-
}, null, 8, ["id", "data-cy", "label", "inline", "model-value", "container-class"]))), 128)) :
|
|
103
|
+
onChange: t[0] || (t[0] = (x) => i(x))
|
|
104
|
+
}, null, 8, ["id", "data-cy", "label", "inline", "model-value", "container-class"]))), 128)) : A("", !0)
|
|
102
105
|
])
|
|
103
|
-
], 10,
|
|
106
|
+
], 10, T)
|
|
104
107
|
]);
|
|
105
108
|
}
|
|
106
109
|
});
|
|
107
110
|
export {
|
|
108
|
-
|
|
111
|
+
j as default
|
|
109
112
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/components",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.9-alpha.0",
|
|
4
4
|
"description": "Wikicasa frontend components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"vue": "^3.5.0",
|
|
45
45
|
"date-fns": "^4.0.0",
|
|
46
46
|
"@wikicasa-dev/svg-icons": "^1.2.24",
|
|
47
|
-
"@wikicasa-dev/vue-composables": "^0.0.
|
|
47
|
+
"@wikicasa-dev/vue-composables": "^0.0.29",
|
|
48
48
|
"@wikicasa-dev/types": "^2.4.0",
|
|
49
49
|
"@wikicasa-dev/utilities": "^1.2.0"
|
|
50
50
|
},
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
65
65
|
"@vue/eslint-config-typescript": "^14.6.0",
|
|
66
66
|
"@wikicasa-dev/svg-icons": "1.2.24",
|
|
67
|
-
"@wikicasa-dev/vue-composables": "0.0.
|
|
67
|
+
"@wikicasa-dev/vue-composables": "0.0.29",
|
|
68
68
|
"@wikicasa-dev/tailwind-plugins": "^0.0.3",
|
|
69
69
|
"@wikicasa-dev/types": "2.4.6",
|
|
70
70
|
"@wikicasa-dev/utilities": "1.2.0",
|
|
File without changes
|