@wikicasa-dev/components 2.2.8-alpha.27 → 2.2.8-alpha.28

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.
@@ -1,5 +1,5 @@
1
1
  import { Autoplay as t } from "swiper/modules";
2
- import '../assets/swiper-autoplay.css';/* empty css */
2
+ import '../assets/swiper-controller.css';/* empty css */
3
3
  export {
4
4
  t as Autoplay
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Controller as e } from "swiper/modules";
2
- import '../assets/swiper-autoplay.css';/* empty css */
2
+ import '../assets/swiper-controller.css';/* empty css */
3
3
  export {
4
4
  e as Controller
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Keyboard as m } from "swiper/modules";
2
- import '../assets/swiper-autoplay.css';/* empty css */
2
+ import '../assets/swiper-controller.css';/* empty css */
3
3
  export {
4
4
  m as Keyboard
5
5
  };
@@ -1,5 +1,5 @@
1
1
  import { Thumbs as p } from "swiper/modules";
2
- import '../assets/swiper-autoplay.css';/* empty css */
2
+ import '../assets/swiper-controller.css';/* empty css */
3
3
  export {
4
4
  p as Thumbs
5
5
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as K, mergeModels as B, useModel as V, useTemplateRef as b, shallowRef as s, onBeforeMount as L, watch as y, nextTick as N, createBlock as M, openBlock as c, withCtx as C, createElementBlock as F, Fragment as W, renderList as I, renderSlot as f, createElementVNode as d, normalizeClass as v, withDirectives as A, createCommentVNode as H, vModelText as G, toDisplayString as P, normalizeStyle as X, createTextVNode as j } from "vue";
2
- import q from "../BaseDropDown.vue.js";
1
+ import { defineComponent as K, mergeModels as B, useModel as M, useTemplateRef as b, shallowRef as s, onBeforeMount as L, watch as y, nextTick as N, createBlock as V, openBlock as c, withCtx as C, createElementBlock as F, Fragment as W, renderList as I, renderSlot as f, createElementVNode as d, normalizeClass as v, withDirectives as A, createCommentVNode as H, vModelText as G, toDisplayString as P, withModifiers as X, normalizeStyle as j, createTextVNode as q } from "vue";
2
+ import J from "../BaseDropDown.vue.js";
3
3
  import '../../../../../assets/BaseDropDown.css';/* empty css */
4
- import J from "../BaseSelect/SelectItem.vue.js";
5
- import { debounce as Q } from "@wikicasa-dev/utilities";
6
- const Y = ["readonly", "placeholder"], Z = ["innerHTML"], ae = /* @__PURE__ */ K({
4
+ import Q from "../BaseSelect/SelectItem.vue.js";
5
+ import { debounce as Y } from "@wikicasa-dev/utilities";
6
+ const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ie = /* @__PURE__ */ K({
7
7
  __name: "ClearableAutocomplete",
8
8
  props: /* @__PURE__ */ B({
9
9
  dataCy: {},
@@ -25,8 +25,8 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], ae = /* @__PURE__ */ K
25
25
  }),
26
26
  emits: /* @__PURE__ */ B(["click", "update:inputValue", "keydown"], ["update:open", "update:modelValue"]),
27
27
  setup(l, { expose: $, emit: E }) {
28
- const u = V(l, "open"), a = V(l, "modelValue"), p = E, O = b("inputRef"), o = s(a.value?.label || ""), k = s(0), m = s(!1), w = s(null), i = s([]), g = b("dropdownRef"), h = b("hiddenSpan"), R = () => {
29
- o.value = "", a.value = null, p("update:inputValue", "");
28
+ const u = M(l, "open"), a = M(l, "modelValue"), p = E, O = b("inputRef"), n = s(a.value?.label || ""), k = s(0), m = s(!1), w = s(null), i = s([]), h = b("dropdownRef"), g = b("hiddenSpan"), R = () => {
29
+ n.value = "", a.value = null, p("update:inputValue", "");
30
30
  }, U = async (t) => {
31
31
  if (p("update:inputValue", t), !t) {
32
32
  i.value = [], u.value = !1;
@@ -35,26 +35,26 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], ae = /* @__PURE__ */ K
35
35
  i.value = await w.value?.(t) || [], m.value = !0, u.value = !!i.value.length;
36
36
  }, S = (t = -1) => {
37
37
  const e = i.value[t];
38
- !e || e.id === a.value?.id || (l.onOptionSelectedCb?.(e), o.value = e.label, u.value = !1, a.value = e, i.value = []);
38
+ !e || e.id === a.value?.id || (l.onOptionSelectedCb?.(e), n.value = e.label, u.value = !1, a.value = e, i.value = []);
39
39
  }, x = () => {
40
40
  O.value?.select();
41
41
  };
42
42
  return L(() => {
43
- w.value = Q({ delay: 300 }, l.onInputChangeCb);
43
+ w.value = Y({ delay: 300 }, l.onInputChangeCb);
44
44
  }), y(
45
- [o, () => h.value],
45
+ [n, () => g.value],
46
46
  ([t, e]) => {
47
47
  e && N(() => {
48
48
  if (!e) return;
49
- const n = e.offsetWidth;
50
- n !== k.value && (console.log("DEBUG:updating icon positioning", {
49
+ const o = e.offsetWidth;
50
+ o !== k.value && (console.log("DEBUG:updating icon positioning", {
51
51
  curInputValue: t
52
- }), k.value = n);
52
+ }), k.value = o);
53
53
  });
54
54
  },
55
55
  { immediate: !0 }
56
56
  ), y(
57
- () => g.value?.selectedIdx,
57
+ () => h.value?.selectedIdx,
58
58
  (t) => {
59
59
  const e = t ?? -1;
60
60
  e !== -1 && S(e);
@@ -62,13 +62,13 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], ae = /* @__PURE__ */ K
62
62
  ), y(
63
63
  a,
64
64
  (t, e) => {
65
- t === e || t?.label === o.value || (o.value = t?.label || "");
65
+ t === e || t?.label === n.value || (n.value = t?.label || "");
66
66
  },
67
67
  { immediate: !0 }
68
68
  ), $({
69
69
  select: x,
70
- getRootElement: () => g.value?.getRootElement()
71
- }), (t, e) => (c(), M(q, {
70
+ getRootElement: () => h.value?.getRootElement()
71
+ }), (t, e) => (c(), V(J, {
72
72
  ref: "dropdownRef",
73
73
  class: "uikit-clearable-autocomplete",
74
74
  "data-cy": l.dataCy,
@@ -78,13 +78,13 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], ae = /* @__PURE__ */ K
78
78
  "keep-state": !i.value.length || l.keepState === "closed" ? "closed" : "opened",
79
79
  "activate-keyboard-controller": l.enableKeyboardController,
80
80
  "reset-keyboard-controller": m.value,
81
- "onUpdate:resetKeyboardController": e[3] || (e[3] = (n) => m.value = n),
82
- "onUpdate:dropdownState": e[4] || (e[4] = (n) => u.value = n)
81
+ "onUpdate:resetKeyboardController": e[3] || (e[3] = (o) => m.value = o),
82
+ "onUpdate:dropdownState": e[4] || (e[4] = (o) => u.value = o)
83
83
  }, {
84
84
  btn_slot: C(() => [
85
85
  d("div", {
86
86
  class: v(["uikit-text-16", l.triggerWrapperClasses]),
87
- onClick: e[2] || (e[2] = (n) => p("click", n))
87
+ onClick: e[2] || (e[2] = (o) => p("click", o))
88
88
  }, [
89
89
  f(t.$slots, "left-icon"),
90
90
  d("div", {
@@ -93,7 +93,7 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], ae = /* @__PURE__ */ K
93
93
  A(d("input", {
94
94
  ref: "inputRef",
95
95
  "onUpdate:modelValue": [
96
- e[0] || (e[0] = (n) => o.value = n),
96
+ e[0] || (e[0] = (o) => n.value = o),
97
97
  U
98
98
  ],
99
99
  readonly: !!a.value?.label,
@@ -103,41 +103,41 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], ae = /* @__PURE__ */ K
103
103
  fontSize: "inherit"
104
104
  },
105
105
  placeholder: l.placeholder,
106
- onKeydown: e[1] || (e[1] = (n) => p("keydown", n))
107
- }, null, 42, Y), [
108
- [G, o.value]
106
+ onKeydown: e[1] || (e[1] = (o) => p("keydown", o))
107
+ }, null, 42, Z), [
108
+ [G, n.value]
109
109
  ]),
110
110
  d("span", {
111
111
  ref_key: "hiddenSpan",
112
- ref: h,
112
+ ref: g,
113
113
  class: "uikit-invisible uikit-absolute uikit-left-0 uikit-top-0 uikit-whitespace-pre",
114
114
  style: {
115
115
  font: "inherit",
116
116
  fontSize: "inherit"
117
117
  }
118
- }, P(o.value), 513),
118
+ }, P(n.value), 513),
119
119
  a.value?.label ? (c(), F("button", {
120
120
  key: 0,
121
121
  type: "button",
122
122
  class: v(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none", l.clearButton?.classes]),
123
123
  "aria-label": "Clear input",
124
- style: X({
124
+ style: j({
125
125
  left: `${k.value + (l.clearButton?.offset || 10)}px`
126
126
  }),
127
- onClick: R
127
+ onClick: X(R, ["stop"])
128
128
  }, [
129
129
  f(t.$slots, "clear-icon", {}, () => [
130
- e[5] || (e[5] = j("X", -1))
130
+ e[5] || (e[5] = q("X", -1))
131
131
  ])
132
132
  ], 6)) : H("", !0)
133
133
  ], 2),
134
134
  f(t.$slots, "right-icon")
135
135
  ], 2)
136
136
  ]),
137
- default: C(({ activeIdx: n, setActiveIdx: z }) => [
138
- (c(!0), F(W, null, I(i.value, (T, r) => (c(), M(J, {
137
+ default: C(({ activeIdx: o, setActiveIdx: z }) => [
138
+ (c(!0), F(W, null, I(i.value, (T, r) => (c(), V(Q, {
139
139
  key: r,
140
- active: n === r,
140
+ active: o === r,
141
141
  class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
142
142
  onClick: (D) => S(r),
143
143
  onMouseover: (D) => z(r)
@@ -149,7 +149,7 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], ae = /* @__PURE__ */ K
149
149
  }, () => [
150
150
  d("span", {
151
151
  innerHTML: T.label
152
- }, null, 8, Z)
152
+ }, null, 8, _)
153
153
  ])
154
154
  ]),
155
155
  _: 2
@@ -160,5 +160,5 @@ const Y = ["readonly", "placeholder"], Z = ["innerHTML"], ae = /* @__PURE__ */ K
160
160
  }
161
161
  });
162
162
  export {
163
- ae as default
163
+ ie as default
164
164
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.2.8-alpha.27",
3
+ "version": "2.2.8-alpha.28",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",