@wikicasa-dev/components 2.2.9-alpha.37 → 2.2.9-alpha.4

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 (55) hide show
  1. package/dist/Swiper/autoplay.js +1 -1
  2. package/dist/Swiper/controller.js +1 -1
  3. package/dist/Swiper/free-mode.js +1 -1
  4. package/dist/Swiper/keyboard.js +1 -1
  5. package/dist/Swiper/navigation.js +1 -1
  6. package/dist/Swiper/pagination.js +1 -1
  7. package/dist/Swiper/thumbs.js +1 -1
  8. package/dist/UIKit/AccessibleSelect.d.ts +4 -4
  9. package/dist/UIKit/AccessibleSelect.js +2 -3
  10. package/dist/UIKit/Accordion/BaseAccordionItem.js +1 -1
  11. package/dist/UIKit/Autocomplete/ClearableAutocomplete.d.ts +3 -9
  12. package/dist/UIKit/Autocomplete/ClearableAutocomplete.js +1 -1
  13. package/dist/UIKit/BaseAlert.js +1 -1
  14. package/dist/UIKit/BaseAutocomplete.d.ts +2 -2
  15. package/dist/UIKit/BaseAutocomplete.js +1 -1
  16. package/dist/UIKit/BaseBadge.js +1 -1
  17. package/dist/UIKit/BaseButton.d.ts +8 -14
  18. package/dist/UIKit/BaseCard.js +1 -1
  19. package/dist/UIKit/BaseComplexToggle.js +1 -1
  20. package/dist/UIKit/BaseDropDown.d.ts +11 -17
  21. package/dist/UIKit/BaseDropDown.js +1 -1
  22. package/dist/UIKit/BaseFloatingLabel.js +1 -1
  23. package/dist/UIKit/BaseInput.d.ts +2 -2
  24. package/dist/UIKit/BaseInput.js +3 -3
  25. package/dist/UIKit/BaseModal.js +1 -1
  26. package/dist/UIKit/BaseSlider.js +1 -1
  27. package/dist/UIKit/BaseSnackbar.js +1 -1
  28. package/dist/UIKit/BaseTextarea.d.ts +2 -2
  29. package/dist/UIKit/BaseTextarea.js +1 -1
  30. package/dist/UIKit/BaseToggle.js +1 -1
  31. package/dist/UIKit/BaseTooltip.js +1 -1
  32. package/dist/UIKit/Checkbox/CheckboxBtn.js +1 -1
  33. package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.js +1 -1
  34. package/dist/UIKit/Slider/SimpleSlider.js +1 -1
  35. package/dist/UIKit/StaticSpinner.js +1 -1
  36. package/dist/assets/BaseDropDown.css +1 -1
  37. package/dist/assets/BaseInput.css +1 -1
  38. package/dist/assets/tailwind.css +1 -1
  39. package/dist/components/carousel/SwiperCarousel.js +1 -1
  40. package/dist/index.js +83 -84
  41. package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +157 -150
  42. package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +101 -117
  43. package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +6 -6
  44. package/dist/packages/components/lib/UIKit/BaseButton.vue.js +24 -28
  45. package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +105 -102
  46. package/dist/packages/components/lib/UIKit/BaseModal.vue.js +36 -42
  47. package/dist/packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js +17 -18
  48. package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +26 -24
  49. package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +15 -15
  50. package/dist/packages/components/lib/components/carousel/SwiperCarousel.vue.js +1 -1
  51. package/package.json +5 -6
  52. package/dist/assets/AccessibleSelect.css +0 -1
  53. package/dist/composables/mock.d.ts +0 -25
  54. package/dist/composables/mock.js +0 -49
  55. /package/dist/assets/{swiper-keyboard.css → swiper-controller.css} +0 -0
@@ -1,8 +1,8 @@
1
- import { defineComponent as v, ref as D, computed as h, watch as E, renderSlot as b, createElementVNode as $, normalizeClass as g, createElementBlock as B, createCommentVNode as A, openBlock as C, Fragment as I, renderList as R, createBlock as K, unref as V } from "vue";
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
2
  import { stringToHyphened as L, isArrNullOrEmpty as G } from "@wikicasa-dev/utilities";
3
3
  import N from "./CheckboxBtn.vue.js";
4
- /* empty css */
5
- const T = ["id", "data-cy"], j = /* @__PURE__ */ v({
4
+ import '../../../../../assets/CheckboxBtn.css';/* empty css */
5
+ const T = ["id", "data-cy"], j = /* @__PURE__ */ p({
6
6
  inheritAttrs: !1,
7
7
  __name: "CheckboxGroup",
8
8
  props: {
@@ -20,14 +20,14 @@ const T = ["id", "data-cy"], j = /* @__PURE__ */ v({
20
20
  dataCy: { default: "" }
21
21
  },
22
22
  emits: ["resetted", "update:modelValue", "checkedGroup"],
23
- setup(a, { emit: y }) {
24
- const o = a, s = y, l = D(
23
+ setup(a, { emit: C }) {
24
+ const o = a, s = C, l = v(
25
25
  /* @__PURE__ */ new Map()
26
26
  ), r = h(() => {
27
27
  for (const e of o.checkboxData)
28
28
  if (e.reset) return e;
29
29
  return null;
30
- }), x = h(() => o.checkboxData.length), f = h(() => {
30
+ }), y = h(() => o.checkboxData.length), f = h(() => {
31
31
  let e = 0;
32
32
  return l.value.forEach((t) => {
33
33
  t.checked && e++;
@@ -60,7 +60,7 @@ const T = ["id", "data-cy"], j = /* @__PURE__ */ v({
60
60
  }, d = (e) => l.value.get(o.getKey(e))?.checked ?? !1, i = (e) => {
61
61
  if (G(o.checkboxData)) return;
62
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 === x.value - 1 && l.value.forEach((n) => {
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) => {
64
64
  n.checked = !!n.reset;
65
65
  }), o.autoCheckResetEmpty && r.value && !f.value && (!o.manualToggleResetButton || !t?.reset) && u(o.getKey(r.value), { checked: !0 });
66
66
  const c = [];
@@ -68,7 +68,7 @@ const T = ["id", "data-cy"], j = /* @__PURE__ */ v({
68
68
  n.checked && c.push(n);
69
69
  }), s("update:modelValue", c), s("checkedGroup", o.groupId);
70
70
  };
71
- return E(
71
+ return D(
72
72
  () => o.reset,
73
73
  (e) => {
74
74
  e && m();
@@ -78,9 +78,9 @@ const T = ["id", "data-cy"], j = /* @__PURE__ */ v({
78
78
  handleChange: i,
79
79
  checkboxesData: a.checkboxData
80
80
  }, () => [
81
- $("div", {
81
+ E("div", {
82
82
  id: a.groupId,
83
- class: g(["checkbox-group-container", e.$attrs.class || ""]),
83
+ class: $(["checkbox-group-container", e.$attrs.class || ""]),
84
84
  "data-cy": a.dataCy
85
85
  }, [
86
86
  b(e.$slots, "checkbox_elements", {
@@ -89,19 +89,19 @@ const T = ["id", "data-cy"], j = /* @__PURE__ */ v({
89
89
  checkboxesData: a.checkboxData,
90
90
  reset: m
91
91
  }, () => [
92
- a.checkboxData ? (C(!0), B(I, { key: 0 }, R(a.checkboxData, (c, n) => (C(), K(N, {
92
+ a.checkboxData ? (g(!0), B(I, { key: 0 }, R(a.checkboxData, (c, n) => (g(), K(N, {
93
93
  id: a.getKey(c),
94
94
  key: n,
95
95
  "data-cy": c.dataCy ?? `checkbox_${V(L)(`${c.label}`)}`,
96
96
  label: c.label,
97
97
  inline: a.formCheckInline,
98
98
  "model-value": d(c),
99
- class: g([
99
+ "container-class": [
100
100
  a.formCheckInline ? "uikit-mr-10px" : "uikit-mb-10px",
101
101
  a.checkboxContainerClasses
102
- ]),
103
- onChange: t[0] || (t[0] = (p) => i(p))
104
- }, null, 8, ["id", "data-cy", "label", "inline", "model-value", "class"]))), 128)) : A("", !0)
102
+ ],
103
+ onChange: t[0] || (t[0] = (x) => i(x))
104
+ }, null, 8, ["id", "data-cy", "label", "inline", "model-value", "container-class"]))), 128)) : A("", !0)
105
105
  ])
106
106
  ], 10, T)
107
107
  ]);
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as Q, reactive as U, ref as k, useId as X, computed as f, onMounted as Y, watch as x, nextTick as V, createElementBlock as l, openBlock as u, normalizeClass as d, createElementVNode as v, createCommentVNode as $, renderSlot as M, Fragment as P, renderList as E, mergeProps as F, withModifiers as O } from "vue";
2
2
  import { Swiper as T } from "swiper";
3
3
  import { Zoom as _ } from "swiper/modules";
4
- /* empty css */
4
+ import '../../../../../assets/swiper-zoom.css';import '../../../../../assets/swiper-swiper.css';/* empty css */
5
5
  /* empty css */
6
6
  import { shallowCopyObjectTo as ee } from "@wikicasa-dev/utilities";
7
7
  const te = ["id"], se = ["id", "data-cy"], ie = ["data-idx", "alt", "width", "height", "onLoad"], ae = ["id"], re = ["alt"], ce = /* @__PURE__ */ Q({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.2.9-alpha.37",
3
+ "version": "2.2.9-alpha.4",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -17,7 +17,6 @@
17
17
  "default": "./dist/index.js"
18
18
  },
19
19
  "./style": "./dist/assets/tailwind.css",
20
- "./css/*": "./dist/assets/*.css",
21
20
  "./generic/*": {
22
21
  "import": "./dist/components/*.js",
23
22
  "types": "./dist/components/*.d.ts"
@@ -44,8 +43,8 @@
44
43
  "peerDependencies": {
45
44
  "vue": "^3.5.0",
46
45
  "date-fns": "^4.0.0",
47
- "@wikicasa-dev/svg-icons": "^1.2.28-alpha.1",
48
- "@wikicasa-dev/vue-composables": "0.0.33-alpha.2",
46
+ "@wikicasa-dev/svg-icons": "^1.2.24",
47
+ "@wikicasa-dev/vue-composables": "^0.0.29",
49
48
  "@wikicasa-dev/types": "^2.4.0",
50
49
  "@wikicasa-dev/utilities": "^1.2.0"
51
50
  },
@@ -64,8 +63,8 @@
64
63
  "@vitejs/plugin-vue": "^6.0.2",
65
64
  "@vue/eslint-config-prettier": "^10.2.0",
66
65
  "@vue/eslint-config-typescript": "^14.6.0",
67
- "@wikicasa-dev/svg-icons": "1.2.28-alpha.1",
68
- "@wikicasa-dev/vue-composables": "0.0.33-alpha.2",
66
+ "@wikicasa-dev/svg-icons": "1.2.24",
67
+ "@wikicasa-dev/vue-composables": "0.0.29",
69
68
  "@wikicasa-dev/tailwind-plugins": "^0.0.3",
70
69
  "@wikicasa-dev/types": "2.4.6",
71
70
  "@wikicasa-dev/utilities": "1.2.0",
@@ -1 +0,0 @@
1
- .uikit-select-dropdown.uikit-dropdown-content{--dropdown-border-color: #B4C2F0;--dropdown-max-height: 225px;--dropdown-min-width: unset;--dropdown-margin-top: 10px;margin-top:var(--dropdown-margin-top)}.uikit-select-dropdown.uikit-dropdown-content[data-side=down]{--dropdown-border-top-width: 1px;--dropdown-border-top-left-radius: 12px;--dropdown-border-top-right-radius: 12px;--dropdown-border-bottom-left-radius: 12px;--dropdown-border-bottom-right-radius: 12px}
@@ -1,25 +0,0 @@
1
- import { Ref } from 'vue';
2
- interface KeyboardControllerProps {
3
- optionsLength: Ref<number> | number;
4
- isDropdownOpen?: Ref<boolean>;
5
- disableSpaceHandler?: boolean;
6
- activate?: boolean;
7
- /**
8
- * If true, the listener will be initialized on the document element
9
- */
10
- global?: boolean;
11
- /**
12
- * List of keys that will close the dropdown.
13
- * For the full list of keys, see
14
- * @link https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values
15
- * @default "Escape" and "Enter"
16
- */
17
- closeKeys?: string[];
18
- }
19
- export declare const useKeyboardController: (props: KeyboardControllerProps) => {
20
- activeIdx: Ref<number, number>;
21
- selectedIdx: Ref<number, number>;
22
- $reset: () => void;
23
- onKeyDownHandler: (e: KeyboardEvent) => void;
24
- };
25
- export {};
@@ -1,49 +0,0 @@
1
- import { ref as _, onMounted as A, onUnmounted as D, unref as p } from "vue";
2
- const u = "ArrowUp", a = "ArrowDown", c = "Enter", i = "Escape", v = " ", d = "PageUp", K = "Home", E = "PageDown", m = "End", O = (l) => {
3
- const {
4
- isDropdownOpen: t,
5
- disableSpaceHandler: P,
6
- global: f = !0,
7
- closeKeys: Y = [i, c]
8
- } = l, n = _(-1), o = _(-1), w = l.activate === void 0 ? !0 : l.activate, y = () => {
9
- n.value = -1, o.value = -1, t && (t.value = !1);
10
- }, k = (e) => {
11
- t && Y.includes(e) && (t.value = !1);
12
- }, r = (e) => {
13
- if (!t?.value || ![
14
- u,
15
- a,
16
- c,
17
- i,
18
- v,
19
- d,
20
- K,
21
- E,
22
- m
23
- ].includes(e.key))
24
- return;
25
- const s = p(l.optionsLength);
26
- if ([u, a, d, E].includes(e.key) && e.preventDefault(), e.key === u)
27
- n.value = n.value === 0 ? s - 1 : n.value - 1;
28
- else if (e.key === a)
29
- n.value = (n.value + 1) % s;
30
- else if (e.key === c || e.key === v) {
31
- if (e.key === v && P) return;
32
- o.value = n.value, k(e.key);
33
- } else e.key === i ? (n.value = o.value, k(e.key)) : e.key === d || e.key === K ? n.value = 0 : (e.key === E || e.key === m) && (n.value = s - 1);
34
- e.stopPropagation();
35
- };
36
- return w ? (A(() => {
37
- !document || !f || document.addEventListener("keydown", r);
38
- }), D(() => {
39
- !document || !f || document.removeEventListener("keydown", r);
40
- }), {
41
- activeIdx: n,
42
- selectedIdx: o,
43
- onKeyDownHandler: r,
44
- $reset: y
45
- }) : { activeIdx: n, selectedIdx: o, $reset: y, onKeyDownHandler: r };
46
- };
47
- export {
48
- O as useKeyboardController
49
- };