@wikicasa-dev/components 2.2.9-alpha.49 → 2.2.9-alpha.50

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-autoplay.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-autoplay.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-autoplay.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-autoplay.css';/* empty css */
3
3
  export {
4
4
  p as Thumbs
5
5
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as j, mergeModels as U, useModel as S, useId as q, useTemplateRef as d, shallowRef as c, onBeforeMount as G, onMounted as J, onUnmounted as Q, watch as E, nextTick as Y, createBlock as z, openBlock as M, withCtx as W, createElementBlock as Z, Fragment as _, renderList as ee, renderSlot as m, createElementVNode as s, normalizeClass as f, withDirectives as I, unref as te, vModelText as le, toDisplayString as ne, withModifiers as oe, normalizeStyle as ae, createTextVNode as ie, vShow as ue } from "vue";
1
+ import { defineComponent as j, mergeModels as U, useModel as S, useId as q, useTemplateRef as d, shallowRef as c, onBeforeMount as G, onMounted as J, onUnmounted as Q, watch as E, nextTick as Y, createBlock as z, openBlock as M, withCtx as W, createElementBlock as Z, Fragment as _, renderList as ee, renderSlot as m, createElementVNode as u, normalizeClass as f, withDirectives as I, unref as te, vModelText as le, toDisplayString as ne, withModifiers as oe, normalizeStyle as ae, createTextVNode as ie, vShow as ue } from "vue";
2
2
  import se from "../BaseDropDown.vue.js";
3
3
  import '../../../../../assets/BaseDropDown.css';/* empty css */
4
4
  import re from "../BaseSelect/SelectItem.vue.js";
@@ -31,19 +31,17 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
31
31
  }),
32
32
  emits: /* @__PURE__ */ U(["input", "click", "inputClick", "keydown"], ["update:open", "update:modelValue", "update:inputValue"]),
33
33
  setup(t, { expose: L, emit: D }) {
34
- const r = S(t, "open"), u = S(t, "modelValue"), o = S(t, "inputValue");
35
- o.value = o.value ?? u.value?.label ?? "";
36
- const p = D, K = q(), C = d("inputRef"), v = c(0), y = c(!1), k = c(!!u.value?.label), x = c(null), a = c([]), O = d("dropdownRef"), h = d("hiddenSpan"), w = d("inputWrapperRef"), R = d("clearButtonRef"), N = () => {
37
- o.value = "", u.value = null, k.value = !1;
34
+ const s = S(t, "open"), p = S(t, "modelValue"), o = S(t, "inputValue"), v = D, K = q(), C = d("inputRef"), k = c(0), y = c(!1), r = c(!1), x = c(null), a = c([]), O = d("dropdownRef"), h = d("hiddenSpan"), w = d("inputWrapperRef"), R = d("clearButtonRef"), N = () => {
35
+ o.value = "", p.value = null, r.value = !1;
38
36
  }, A = async (l) => {
39
37
  if (!l) {
40
- a.value = [], r.value = !1;
38
+ a.value = [], s.value = !1;
41
39
  return;
42
40
  }
43
- t.disableCb || (a.value = await x.value?.(l) || [], y.value = !0, r.value = !!a.value.length);
41
+ t.disableCb || (a.value = await x.value?.(l) || [], y.value = !0, s.value = !!a.value.length);
44
42
  }, F = (l = -1) => {
45
43
  const e = a.value[l];
46
- !e || e.id === u.value?.id || (t.onOptionSelectedCb?.(e), o.value = e.label, r.value = !1, u.value = e, k.value = !0, a.value = []);
44
+ !e || e.id === p.value?.id || (t.onOptionSelectedCb?.(e), o.value = e.label, s.value = !1, p.value = e, r.value = !0, a.value = []);
47
45
  }, P = () => {
48
46
  C.value?.select();
49
47
  }, H = () => {
@@ -54,7 +52,7 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
54
52
  const l = h.value, e = w.value, n = R.value;
55
53
  if (!l || !e) return;
56
54
  const T = l.offsetWidth, b = e.offsetWidth, i = t.clearButton?.offset || 0, g = t.clearButton?.width || n?.offsetWidth || 0, X = b - i - g, V = Math.min(T, X);
57
- V !== v.value && (v.value = V);
55
+ V !== k.value && (k.value = V);
58
56
  };
59
57
  return G(() => {
60
58
  x.value = de({ delay: 300 }, t.onInputChangeCb);
@@ -73,9 +71,11 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
73
71
  e !== -1 && F(e);
74
72
  }
75
73
  ), E(
76
- u,
77
- (l, e) => {
78
- l === e || l?.label === o.value || (o.value = l?.label || "");
74
+ p,
75
+ (l) => {
76
+ if (l?.label === o.value) return;
77
+ const e = l?.label || "";
78
+ o.value = e, e && (r.value = !0);
79
79
  },
80
80
  { immediate: !0 }
81
81
  ), L({
@@ -92,20 +92,20 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
92
92
  "activate-keyboard-controller": t.enableKeyboardController,
93
93
  "reset-keyboard-controller": y.value,
94
94
  "onUpdate:resetKeyboardController": e[5] || (e[5] = (n) => y.value = n),
95
- open: r.value,
96
- "onUpdate:open": e[6] || (e[6] = (n) => r.value = n)
95
+ open: s.value,
96
+ "onUpdate:open": e[6] || (e[6] = (n) => s.value = n)
97
97
  }, {
98
98
  btn_slot: W(() => [
99
- s("div", {
99
+ u("div", {
100
100
  class: f(["uikit-text-16", t.triggerWrapperClasses]),
101
- onClick: e[4] || (e[4] = (n) => p("click", n))
101
+ onClick: e[4] || (e[4] = (n) => v("click", n))
102
102
  }, [
103
103
  m(l.$slots, "left-icon"),
104
- s("div", {
104
+ u("div", {
105
105
  ref: "inputWrapperRef",
106
106
  class: f(["uikit-relative", t.inputWrapperClasses])
107
107
  }, [
108
- I(s("input", {
108
+ I(u("input", {
109
109
  ref: "inputRef",
110
110
  "onUpdate:modelValue": [
111
111
  e[0] || (e[0] = (n) => o.value = n),
@@ -121,17 +121,17 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
121
121
  fontSize: "inherit"
122
122
  },
123
123
  placeholder: t.placeholder,
124
- onKeydown: e[1] || (e[1] = (n) => p("keydown", n)),
124
+ onKeydown: e[1] || (e[1] = (n) => v("keydown", n)),
125
125
  onInput: e[2] || (e[2] = (n) => {
126
- p("input", n), k.value = !1;
126
+ v("input", n), r.value = !1;
127
127
  }),
128
128
  onClick: e[3] || (e[3] = (n) => {
129
- p("inputClick", n), C.value?.select();
129
+ v("inputClick", n), C.value?.select();
130
130
  })
131
131
  }, null, 42, ce), [
132
132
  [le, o.value]
133
133
  ]),
134
- s("span", {
134
+ u("span", {
135
135
  ref_key: "hiddenSpan",
136
136
  ref: h,
137
137
  class: f(["uikit-invisible uikit-absolute uikit-left-0 uikit-top-0 uikit-whitespace-pre", t.hiddenTextClasses]),
@@ -140,13 +140,13 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
140
140
  fontSize: "inherit"
141
141
  }
142
142
  }, ne(o.value), 3),
143
- I(s("button", {
143
+ I(u("button", {
144
144
  ref: "clearButtonRef",
145
145
  type: "button",
146
146
  class: f(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none", t.clearButton?.classes]),
147
147
  "aria-label": "Clear input",
148
148
  style: ae({
149
- left: `${v.value + (t.clearButton?.offset || 0)}px`,
149
+ left: `${k.value + (t.clearButton?.offset || 0)}px`,
150
150
  width: t.clearButton?.width ? `${t.clearButton.width}px` : "auto",
151
151
  height: t.clearButton?.height ? `${t.clearButton.height}px` : "auto"
152
152
  }),
@@ -156,7 +156,7 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
156
156
  e[7] || (e[7] = ie("X", -1))
157
157
  ])
158
158
  ], 6), [
159
- [ue, k.value && v.value]
159
+ [ue, r.value && k.value]
160
160
  ])
161
161
  ], 2),
162
162
  m(l.$slots, "right-icon")
@@ -175,7 +175,7 @@ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE
175
175
  option: b,
176
176
  idx: i
177
177
  }, () => [
178
- s("span", {
178
+ u("span", {
179
179
  innerHTML: b.label
180
180
  }, null, 8, fe)
181
181
  ])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.2.9-alpha.49",
3
+ "version": "2.2.9-alpha.50",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",