@wikicasa-dev/components 2.2.8-alpha.18 → 2.2.8-alpha.19

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-thumbs.css';/* empty css */
2
+ import '../assets/swiper-keyboard.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-thumbs.css';/* empty css */
2
+ import '../assets/swiper-keyboard.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-thumbs.css';/* empty css */
2
+ import '../assets/swiper-keyboard.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-thumbs.css';/* empty css */
2
+ import '../assets/swiper-keyboard.css';/* empty css */
3
3
  export {
4
4
  p as Thumbs
5
5
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as K, mergeModels as T, useModel as B, useTemplateRef as m, shallowRef as s, onBeforeMount as L, watch as b, nextTick as N, createBlock as M, openBlock as c, withCtx as y, createElementBlock as V, 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";
1
+ import { defineComponent as K, mergeModels as T, useModel as B, 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 V, 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
2
  import J from "../BaseDropDown.vue.js";
3
3
  import '../../../../../assets/BaseDropDown.css';/* empty css */
4
4
  import Q from "../BaseSelect/SelectItem.vue.js";
@@ -25,42 +25,44 @@ const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ie = /* @__PURE__ */ K
25
25
  }),
26
26
  emits: /* @__PURE__ */ T(["click", "update:inputValue", "keydown"], ["update:open", "update:modelValue"]),
27
27
  setup(l, { expose: $, emit: F }) {
28
- const u = B(l, "open"), a = B(l, "modelValue"), p = F, U = m("inputRef"), n = s(a.value?.label || ""), C = s(0), k = s(!1), w = s(null), i = s([]), O = m("dropdownRef"), h = m("hiddenSpan"), x = () => {
29
- n.value = "", a.value = null, p("update:inputValue", "");
28
+ const u = B(l, "open"), a = B(l, "modelValue"), p = F, O = b("inputRef"), o = s(a.value?.label || ""), k = s(0), m = s(!1), w = s(null), i = s([]), U = b("dropdownRef"), h = b("hiddenSpan"), x = () => {
29
+ o.value = "", a.value = null, p("update:inputValue", "");
30
30
  }, E = async (t) => {
31
31
  if (p("update:inputValue", t), !t) {
32
32
  i.value = [], u.value = !1;
33
33
  return;
34
34
  }
35
- i.value = await w.value?.(t) || [], k.value = !0, u.value = !!i.value.length;
35
+ i.value = await w.value?.(t) || [], m.value = !0, u.value = !!i.value.length;
36
36
  }, g = (t = -1) => {
37
37
  const e = i.value[t];
38
- !e || e.id === a.value?.id || (l.onOptionSelectedCb?.(e), n.value = e.label, u.value = !1, a.value = e, i.value = []);
38
+ !e || e.id === a.value?.id || (l.onOptionSelectedCb?.(e), o.value = e.label, u.value = !1, a.value = e, i.value = []);
39
39
  }, R = () => {
40
- U.value?.select();
40
+ O.value?.select();
41
41
  };
42
42
  return L(() => {
43
43
  w.value = Y({ delay: 300 }, l.onInputChangeCb);
44
- }), b(
45
- [n, () => h.value],
44
+ }), y(
45
+ [o, () => h.value],
46
46
  ([t, e]) => {
47
47
  e && N(() => {
48
- e && (console.log("DEBUG:updating icon positioning", {
48
+ if (!e) return;
49
+ const n = e.offsetWidth;
50
+ n !== k.value && (console.log("DEBUG:updating icon positioning", {
49
51
  curInputValue: t
50
- }), C.value = e.offsetWidth);
52
+ }), k.value = n);
51
53
  });
52
54
  },
53
55
  { immediate: !0 }
54
- ), b(
55
- () => O.value?.selectedIdx,
56
+ ), y(
57
+ () => U.value?.selectedIdx,
56
58
  (t) => {
57
59
  const e = t ?? -1;
58
60
  e !== -1 && g(e);
59
61
  }
60
- ), b(
62
+ ), y(
61
63
  a,
62
64
  (t, e) => {
63
- t === e || t?.label === n.value || (n.value = t?.label || "");
65
+ t === e || t?.label === o.value || (o.value = t?.label || "");
64
66
  },
65
67
  { immediate: !0 }
66
68
  ), $({
@@ -74,12 +76,12 @@ const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ie = /* @__PURE__ */ K
74
76
  "open-dropdown": u.value,
75
77
  "keep-state": !i.value.length || l.keepState === "closed" ? "closed" : "opened",
76
78
  "activate-keyboard-controller": l.enableKeyboardController,
77
- "reset-keyboard-controller": k.value,
78
- "onUpdate:resetKeyboardController": e[2] || (e[2] = (o) => k.value = o),
79
- "onUpdate:dropdownState": e[3] || (e[3] = (o) => u.value = o),
80
- onClick: e[4] || (e[4] = (o) => p("click"))
79
+ "reset-keyboard-controller": m.value,
80
+ "onUpdate:resetKeyboardController": e[2] || (e[2] = (n) => m.value = n),
81
+ "onUpdate:dropdownState": e[3] || (e[3] = (n) => u.value = n),
82
+ onClick: e[4] || (e[4] = (n) => p("click"))
81
83
  }, {
82
- btn_slot: y(() => [
84
+ btn_slot: C(() => [
83
85
  d("div", {
84
86
  class: v(["uikit-text-16", l.triggerWrapperClasses])
85
87
  }, [
@@ -90,7 +92,7 @@ const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ie = /* @__PURE__ */ K
90
92
  A(d("input", {
91
93
  ref: "inputRef",
92
94
  "onUpdate:modelValue": [
93
- e[0] || (e[0] = (o) => n.value = o),
95
+ e[0] || (e[0] = (n) => o.value = n),
94
96
  E
95
97
  ],
96
98
  readonly: !!a.value?.label,
@@ -100,9 +102,9 @@ const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ie = /* @__PURE__ */ K
100
102
  fontSize: "inherit"
101
103
  },
102
104
  placeholder: l.placeholder,
103
- onKeydown: e[1] || (e[1] = (o) => p("keydown", o))
105
+ onKeydown: e[1] || (e[1] = (n) => p("keydown", n))
104
106
  }, null, 42, Z), [
105
- [G, n.value]
107
+ [G, o.value]
106
108
  ]),
107
109
  d("span", {
108
110
  ref_key: "hiddenSpan",
@@ -112,14 +114,14 @@ const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ie = /* @__PURE__ */ K
112
114
  font: "inherit",
113
115
  fontSize: "inherit"
114
116
  }
115
- }, P(n.value), 513),
117
+ }, P(o.value), 513),
116
118
  a.value?.label ? (c(), V("button", {
117
119
  key: 0,
118
120
  type: "button",
119
121
  class: v(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none", l.clearButton?.classes]),
120
122
  "aria-label": "Clear input",
121
123
  style: j({
122
- left: `${C.value + (l.clearButton?.offset || 10)}px`
124
+ left: `${k.value + (l.clearButton?.offset || 10)}px`
123
125
  }),
124
126
  onClick: X(x, ["stop"])
125
127
  }, [
@@ -131,15 +133,15 @@ const Z = ["readonly", "placeholder"], _ = ["innerHTML"], ie = /* @__PURE__ */ K
131
133
  f(t.$slots, "right-icon")
132
134
  ], 2)
133
135
  ]),
134
- default: y(({ activeIdx: o, setActiveIdx: z }) => [
136
+ default: C(({ activeIdx: n, setActiveIdx: z }) => [
135
137
  (c(!0), V(W, null, I(i.value, (S, r) => (c(), M(Q, {
136
138
  key: r,
137
- active: o === r,
139
+ active: n === r,
138
140
  class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
139
141
  onClick: (D) => g(r),
140
142
  onMouseover: (D) => z(r)
141
143
  }, {
142
- default: y(() => [
144
+ default: C(() => [
143
145
  f(t.$slots, "option-content", {
144
146
  option: S,
145
147
  idx: r
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.2.8-alpha.18",
3
+ "version": "2.2.8-alpha.19",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",