@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.
Files changed (27) hide show
  1. package/dist/Swiper/autoplay.js +1 -1
  2. package/dist/Swiper/controller.js +1 -1
  3. package/dist/Swiper/keyboard.js +1 -1
  4. package/dist/Swiper/thumbs.js +1 -1
  5. package/dist/UIKit/Autocomplete/ClearableAutocomplete.d.ts +26 -13
  6. package/dist/UIKit/BaseAutocomplete.d.ts +7 -7
  7. package/dist/UIKit/BaseDropDown.d.ts +3 -0
  8. package/dist/UIKit/BaseFloatingLabel.js +4 -4
  9. package/dist/UIKit/BaseModal.d.ts +4 -0
  10. package/dist/UIKit/Checkbox/CheckboxBtn.d.ts +34 -38
  11. package/dist/UIKit/Checkbox/CheckboxBtn.js +3 -2
  12. package/dist/UIKit/Checkbox/CheckboxGroup.d.ts +6 -9
  13. package/dist/assets/BaseFloatingLabel.css +1 -1
  14. package/dist/assets/CheckboxBtn.css +1 -0
  15. package/dist/assets/tailwind.css +1 -1
  16. package/dist/components/carousel/SwiperCarousel.d.ts +8 -8
  17. package/dist/index.js +84 -83
  18. package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +30 -31
  19. package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +98 -76
  20. package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +1 -4
  21. package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +101 -96
  22. package/dist/packages/components/lib/UIKit/BaseFloatingLabel.vue.js +8 -8
  23. package/dist/packages/components/lib/UIKit/BaseModal.vue.js +11 -10
  24. package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +3 -3
  25. package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +42 -39
  26. package/package.json +3 -3
  27. /package/dist/assets/{swiper-controller.css → swiper-thumbs.css} +0 -0
@@ -1,7 +1,8 @@
1
- import { defineComponent as x, ref as p, computed as h, watch as v, renderSlot as b, createElementVNode as D, normalizeClass as E, createElementBlock as $, createCommentVNode as B, openBlock as g, Fragment as A, renderList as I, createBlock as R, unref as K } from "vue";
2
- import { stringToHyphened as V, isArrNullOrEmpty as L } from "@wikicasa-dev/utilities";
3
- import G from "./CheckboxBtn.vue.js";
4
- const N = ["id", "data-cy"], O = /* @__PURE__ */ x({
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: (t) => typeof t == "string" || typeof t == "number" ? `${t}` : `${t.id}` },
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(t, { emit: C }) {
23
- const o = t, s = C, l = p(/* @__PURE__ */ new Map()), r = h(() => {
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((a) => {
30
- a.checked && e++;
32
+ return l.value.forEach((t) => {
33
+ t.checked && e++;
31
34
  }), e;
32
35
  });
33
36
  (() => {
34
37
  const e = [];
35
- for (const a of o.checkboxData)
36
- a.checked = !!a.checked, l.value.set(
37
- `${a.id}`,
38
- a
39
- ), a.checked && e.push(a);
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, a) => {
45
+ const u = (e, t) => {
43
46
  const c = l.value.get(e);
44
47
  if (c) {
45
- if (a) {
46
- l.value.set(e, { ...c, ...a });
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 (L(o.checkboxData)) return;
59
- const a = l.value.get(e.id);
60
- a?.reset && e.checked ? k() : r.value && !a?.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
+ 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 || !a?.reset) && u(o.getKey(r.value), { checked: !0 });
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 v(
71
+ return D(
69
72
  () => o.reset,
70
73
  (e) => {
71
74
  e && m();
72
75
  }
73
- ), (e, a) => b(e.$slots, "default", {
76
+ ), (e, t) => b(e.$slots, "default", {
74
77
  isActive: d,
75
78
  handleChange: i,
76
- checkboxesData: t.checkboxData
79
+ checkboxesData: a.checkboxData
77
80
  }, () => [
78
- D("div", {
79
- id: t.groupId,
80
- class: E(["checkbox-group-container", e.$attrs.class || ""]),
81
- "data-cy": t.dataCy
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: t.checkboxData,
89
+ checkboxesData: a.checkboxData,
87
90
  reset: m
88
91
  }, () => [
89
- t.checkboxData ? (g(!0), $(A, { key: 0 }, I(t.checkboxData, (c, n) => (g(), R(G, {
90
- id: t.getKey(c),
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_${K(V)(`${c.label}`)}`,
95
+ "data-cy": c.dataCy ?? `checkbox_${V(L)(`${c.label}`)}`,
93
96
  label: c.label,
94
- inline: t.formCheckInline,
97
+ inline: a.formCheckInline,
95
98
  "model-value": d(c),
96
99
  "container-class": [
97
- t.formCheckInline ? "uikit-mr-10px" : "uikit-mb-10px",
98
- t.checkboxContainerClasses
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)) : B("", !0)
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, N)
106
+ ], 10, T)
104
107
  ]);
105
108
  }
106
109
  });
107
110
  export {
108
- O as default
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.8-alpha.7",
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.27",
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.27",
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",