@wikicasa-dev/components 2.2.9-alpha.13 → 2.2.9-alpha.15

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-keyboard.css';/* empty css */
2
+ import '../assets/swiper-thumbs.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-keyboard.css';/* empty css */
2
+ import '../assets/swiper-thumbs.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-keyboard.css';/* empty css */
2
+ import '../assets/swiper-thumbs.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-keyboard.css';/* empty css */
2
+ import '../assets/swiper-thumbs.css';/* empty css */
3
3
  export {
4
4
  p as Thumbs
5
5
  };
@@ -15,25 +15,23 @@ export interface ClearableAutocompleteProps<TID extends string | number | undefi
15
15
  offset?: number;
16
16
  };
17
17
  keepState?: Nullable<"closed" | "open">;
18
- /**
19
- * If true, `onInputChangeCb` and `update:input-value` event will be disabled.
20
- * The input value will still be updated internally and synced with the model value
21
- */
22
- disableAutocomplete?: boolean;
18
+ disableCb?: boolean;
23
19
  onInputChangeCb: (v: string) => Promise<AccessibleSelectOptions<TPayload, TID>[]>;
24
20
  onOptionSelectedCb?: Nullable<(v: AccessibleSelectOptions<TPayload, TID>) => void>;
25
21
  }
26
22
  declare const _default: <TID extends string | number | undefined, TPayload>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
27
23
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
28
24
  readonly "onUpdate:modelValue"?: ((value: Nullable<AccessibleSelectOptions<TPayload, TID>>) => any) | undefined;
25
+ readonly onInput?: ((args_0: InputEvent) => any) | undefined;
29
26
  readonly onClick?: ((args_0: MouseEvent) => any) | undefined;
30
27
  readonly onKeydown?: ((args_0: KeyboardEvent) => any) | undefined;
31
28
  readonly "onUpdate:open"?: ((value: boolean) => any) | undefined;
29
+ readonly "onUpdate:inputValue"?: ((value: string) => any) | undefined;
32
30
  readonly onInputClick?: ((args_0: MouseEvent) => any) | undefined;
33
- readonly "onUpdate:input-value"?: ((args_0: string) => any) | undefined;
34
- } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onClick" | "onKeydown" | "onUpdate:open" | "onInputClick" | "onUpdate:input-value"> & ({
31
+ } & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onUpdate:modelValue" | "onClick" | "onInput" | "onKeydown" | "onUpdate:open" | "onUpdate:inputValue" | "onInputClick"> & ({
35
32
  open?: boolean;
36
33
  modelValue?: Nullable<AccessibleSelectOptions<TPayload, TID>>;
34
+ inputValue?: string;
37
35
  } & ClearableAutocompleteProps<TID, TPayload>) & Partial<{}>> & import('vue').PublicProps;
38
36
  expose(exposed: import('vue').ShallowUnwrapRef<{
39
37
  getRootElement: () => HTMLDivElement | null | undefined;
@@ -50,7 +48,7 @@ declare const _default: <TID extends string | number | undefined, TPayload>(__VL
50
48
  idx: number;
51
49
  }): any;
52
50
  };
53
- emit: (((evt: "click", args_0: MouseEvent) => void) & ((evt: "keydown", args_0: KeyboardEvent) => void) & ((evt: "inputClick", args_0: MouseEvent) => void) & ((evt: "update:input-value", args_0: string) => void)) & (((evt: "update:modelValue", value: Nullable<AccessibleSelectOptions<TPayload, TID>>) => void) & ((evt: "update:open", value: boolean) => void));
51
+ emit: (((evt: "input", args_0: InputEvent) => void) & ((evt: "click", args_0: MouseEvent) => void) & ((evt: "keydown", args_0: KeyboardEvent) => void) & ((evt: "inputClick", args_0: MouseEvent) => void)) & (((evt: "update:modelValue", value: Nullable<AccessibleSelectOptions<TPayload, TID>>) => void) & ((evt: "update:open", value: boolean) => void) & ((evt: "update:inputValue", value: string) => void));
54
52
  }>) => import('vue').VNode & {
55
53
  __ctx?: Awaited<typeof __VLS_setup>;
56
54
  };
@@ -16,7 +16,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
16
16
  title?: string;
17
17
  dataCy?: string;
18
18
  type?: "button" | "submit" | "reset" | undefined;
19
- }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
+ }, {
20
+ getRootElement: () => HTMLButtonElement | null;
21
+ }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
22
  click: (e: Event) => any;
21
23
  mouseover: (e: Event) => any;
22
24
  mouseout: (e: Event) => any;
@@ -39,7 +41,9 @@ declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<{
39
41
  onClick?: ((e: Event) => any) | undefined;
40
42
  onMouseover?: ((e: Event) => any) | undefined;
41
43
  onMouseout?: ((e: Event) => any) | undefined;
42
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>, {
44
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
45
+ buttonEl: HTMLButtonElement;
46
+ }, HTMLButtonElement>, {
43
47
  default?(_: {
44
48
  hover: boolean;
45
49
  }): any;
@@ -1,11 +1,11 @@
1
- import { defineComponent as W, mergeModels as $, useModel as F, shallowRef as p, useId as D, useTemplateRef as b, onBeforeMount as N, watch as C, nextTick as H, createBlock as O, openBlock as y, withCtx as w, createElementBlock as P, Fragment as X, renderList as j, renderSlot as f, createElementVNode as u, normalizeClass as v, withDirectives as R, unref as q, vModelText as G, toDisplayString as J, withModifiers as Q, normalizeStyle as Y, createTextVNode as Z, vShow as _ } from "vue";
2
- import ee from "../BaseDropDown.vue.js";
1
+ import { defineComponent as W, mergeModels as V, useModel as C, useId as D, useTemplateRef as b, shallowRef as c, onBeforeMount as N, watch as y, nextTick as A, createBlock as $, openBlock as w, withCtx as h, createElementBlock as H, Fragment as P, renderList as X, renderSlot as f, createElementVNode as u, normalizeClass as v, withDirectives as F, unref as j, vModelText as q, toDisplayString as G, withModifiers as J, normalizeStyle as Q, createTextVNode as Y, vShow as Z } from "vue";
2
+ import _ from "../BaseDropDown.vue.js";
3
3
  import '../../../../../assets/BaseDropDown.css';/* empty css */
4
- import te from "../BaseSelect/SelectItem.vue.js";
5
- import { debounce as le } from "@wikicasa-dev/utilities";
6
- const oe = ["id", "data-cy", "placeholder"], ne = ["innerHTML"], pe = /* @__PURE__ */ W({
4
+ import ee from "../BaseSelect/SelectItem.vue.js";
5
+ import { debounce as te } from "@wikicasa-dev/utilities";
6
+ const le = ["id", "data-cy", "placeholder"], ne = ["innerHTML"], de = /* @__PURE__ */ W({
7
7
  __name: "ClearableAutocomplete",
8
- props: /* @__PURE__ */ $({
8
+ props: /* @__PURE__ */ V({
9
9
  dataCy: {},
10
10
  placeholder: {},
11
11
  enableKeyboardController: { type: Boolean, default: !0 },
@@ -15,64 +15,68 @@ const oe = ["id", "data-cy", "placeholder"], ne = ["innerHTML"], pe = /* @__PURE
15
15
  dropdownClasses: {},
16
16
  clearButton: {},
17
17
  keepState: {},
18
- disableAutocomplete: { type: Boolean, default: !1 },
18
+ disableCb: { type: Boolean, default: !1 },
19
19
  onInputChangeCb: { type: Function },
20
20
  onOptionSelectedCb: { type: [Function, null] }
21
21
  }, {
22
22
  open: { type: Boolean, default: !1 },
23
23
  openModifiers: {},
24
24
  modelValue: { default: null },
25
- modelModifiers: {}
25
+ modelModifiers: {},
26
+ inputValue: {
27
+ default: ""
28
+ },
29
+ inputValueModifiers: {}
26
30
  }),
27
- emits: /* @__PURE__ */ $(["click", "inputClick", "keydown", "update:input-value"], ["update:open", "update:modelValue"]),
28
- setup(l, { expose: V, emit: x }) {
29
- const s = F(l, "open"), i = F(l, "modelValue"), n = p(i.value?.label ?? ""), r = x, E = D(), k = b("inputRef"), c = p(0), m = p(!1), h = p(null), a = p([]), g = b("dropdownRef"), S = b("hiddenSpan"), I = () => {
30
- i.value = null, n.value = "", r("update:input-value", "");
31
- }, T = (t) => {
32
- n.value = t, !l.disableAutocomplete && r("update:input-value", t);
33
- }, U = async (t) => {
31
+ emits: /* @__PURE__ */ V(["input", "click", "inputClick", "keydown"], ["update:open", "update:modelValue", "update:inputValue"]),
32
+ setup(l, { expose: O, emit: R }) {
33
+ const s = C(l, "open"), i = C(l, "modelValue"), o = C(l, "inputValue");
34
+ o.value = o.value ?? i.value?.label ?? "";
35
+ const d = R, x = D(), k = b("inputRef"), p = c(0), m = c(!1), g = c(null), a = c([]), S = b("dropdownRef"), T = b("hiddenSpan"), E = () => {
36
+ o.value = "", i.value = null;
37
+ }, I = async (t) => {
34
38
  if (!t) {
35
39
  a.value = [], s.value = !1;
36
40
  return;
37
41
  }
38
- l.disableAutocomplete || (a.value = await h.value?.(t) || [], m.value = !0, s.value = !!a.value.length);
42
+ l.disableCb || (a.value = await g.value?.(t) || [], m.value = !0, s.value = !!a.value.length);
39
43
  }, B = (t = -1) => {
40
44
  const e = a.value[t];
41
- !e || e.id === i.value?.id || (l.onOptionSelectedCb?.(e), n.value = e.label, s.value = !1, i.value = e, a.value = []);
42
- }, A = () => {
45
+ !e || e.id === i.value?.id || (l.onOptionSelectedCb?.(e), o.value = e.label, s.value = !1, i.value = e, a.value = []);
46
+ }, U = () => {
43
47
  k.value?.select();
44
48
  }, z = () => {
45
49
  k.value?.focus();
46
50
  };
47
51
  return N(() => {
48
- h.value = le({ delay: 300 }, l.onInputChangeCb);
49
- }), C(
50
- [n, () => S.value],
52
+ g.value = te({ delay: 300 }, l.onInputChangeCb);
53
+ }), y(
54
+ [o, () => T.value],
51
55
  ([, t]) => {
52
- t && H(() => {
56
+ t && A(() => {
53
57
  if (!t) return;
54
58
  const e = t.offsetWidth;
55
- e !== c.value && (c.value = e);
59
+ e !== p.value && (p.value = e);
56
60
  });
57
61
  },
58
62
  { immediate: !0 }
59
- ), C(
60
- () => g.value?.selectedIdx,
63
+ ), y(
64
+ () => S.value?.selectedIdx,
61
65
  (t) => {
62
66
  const e = t ?? -1;
63
67
  e !== -1 && B(e);
64
68
  }
65
- ), C(
69
+ ), y(
66
70
  i,
67
71
  (t, e) => {
68
- t === e || t?.label === n.value || T(t?.label || "");
72
+ t === e || t?.label === o.value || (o.value = t?.label || "");
69
73
  },
70
74
  { immediate: !0 }
71
- ), V({
72
- getRootElement: () => g.value?.getRootElement(),
73
- select: A,
75
+ ), O({
76
+ getRootElement: () => S.value?.getRootElement(),
77
+ select: U,
74
78
  focus: z
75
- }), (t, e) => (y(), O(ee, {
79
+ }), (t, e) => (w(), $(_, {
76
80
  ref: "dropdownRef",
77
81
  class: "uikit-clearable-autocomplete",
78
82
  "data-cy": l.dataCy,
@@ -82,27 +86,25 @@ const oe = ["id", "data-cy", "placeholder"], ne = ["innerHTML"], pe = /* @__PURE
82
86
  "keep-state": !a.value.length || l.keepState === "closed" ? "closed" : "opened",
83
87
  "activate-keyboard-controller": l.enableKeyboardController,
84
88
  "reset-keyboard-controller": m.value,
85
- "onUpdate:resetKeyboardController": e[5] || (e[5] = (o) => m.value = o),
86
- "onUpdate:dropdownState": e[6] || (e[6] = (o) => s.value = o)
89
+ "onUpdate:resetKeyboardController": e[5] || (e[5] = (n) => m.value = n),
90
+ "onUpdate:dropdownState": e[6] || (e[6] = (n) => s.value = n)
87
91
  }, {
88
- btn_slot: w(() => [
92
+ btn_slot: h(() => [
89
93
  u("div", {
90
94
  class: v(["uikit-text-16", l.triggerWrapperClasses]),
91
- onClick: e[4] || (e[4] = (o) => r("click", o))
95
+ onClick: e[4] || (e[4] = (n) => d("click", n))
92
96
  }, [
93
97
  f(t.$slots, "left-icon"),
94
98
  u("div", {
95
99
  class: v(["uikit-relative", l.inputWrapperClasses])
96
100
  }, [
97
- R(u("input", {
101
+ F(u("input", {
98
102
  ref: "inputRef",
99
103
  "onUpdate:modelValue": [
100
- e[0] || (e[0] = (o) => n.value = o),
101
- e[1] || (e[1] = (o) => {
102
- T(o), U(o);
103
- })
104
+ e[0] || (e[0] = (n) => o.value = n),
105
+ I
104
106
  ],
105
- id: q(E),
107
+ id: j(x),
106
108
  "data-cy": l.dataCy ? `ac_input_${l.dataCy}` : "",
107
109
  type: "text",
108
110
  autocomplete: "off",
@@ -112,53 +114,54 @@ const oe = ["id", "data-cy", "placeholder"], ne = ["innerHTML"], pe = /* @__PURE
112
114
  fontSize: "inherit"
113
115
  },
114
116
  placeholder: l.placeholder,
115
- onKeydown: e[2] || (e[2] = (o) => r("keydown", o)),
116
- onClick: e[3] || (e[3] = (o) => {
117
- r("inputClick", o), k.value?.select();
117
+ onKeydown: e[1] || (e[1] = (n) => d("keydown", n)),
118
+ onInput: e[2] || (e[2] = (n) => d("input", n)),
119
+ onClick: e[3] || (e[3] = (n) => {
120
+ d("inputClick", n), k.value?.select();
118
121
  })
119
- }, null, 42, oe), [
120
- [G, n.value]
122
+ }, null, 42, le), [
123
+ [q, o.value]
121
124
  ]),
122
125
  u("span", {
123
126
  ref_key: "hiddenSpan",
124
- ref: S,
127
+ ref: T,
125
128
  class: "uikit-invisible uikit-absolute uikit-left-0 uikit-top-0 uikit-whitespace-pre",
126
129
  style: {
127
130
  font: "inherit",
128
131
  fontSize: "inherit"
129
132
  }
130
- }, J(n.value), 513),
131
- R(u("button", {
133
+ }, G(o.value), 513),
134
+ F(u("button", {
132
135
  type: "button",
133
136
  class: v(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none", l.clearButton?.classes]),
134
137
  "aria-label": "Clear input",
135
- style: Y({
136
- left: `${c.value + (l.clearButton?.offset || 10)}px`
138
+ style: Q({
139
+ left: `${p.value + (l.clearButton?.offset || 10)}px`
137
140
  }),
138
- onClick: Q(I, ["stop"])
141
+ onClick: J(E, ["stop"])
139
142
  }, [
140
143
  f(t.$slots, "clear-icon", {}, () => [
141
- e[7] || (e[7] = Z("X", -1))
144
+ e[7] || (e[7] = Y("X", -1))
142
145
  ])
143
146
  ], 6), [
144
- [_, i.value?.label && c.value]
147
+ [Z, i.value?.label && p.value]
145
148
  ])
146
149
  ], 2),
147
150
  f(t.$slots, "right-icon")
148
151
  ], 2)
149
152
  ]),
150
- default: w(({ activeIdx: o, setActiveIdx: K }) => [
151
- (y(!0), P(X, null, j(a.value, (M, d) => (y(), O(te, {
152
- key: d,
153
- active: o === d,
153
+ default: h(({ activeIdx: n, setActiveIdx: K }) => [
154
+ (w(!0), H(P, null, X(a.value, (M, r) => (w(), $(ee, {
155
+ key: r,
156
+ active: n === r,
154
157
  class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
155
- onClick: (L) => B(d),
156
- onMouseover: (L) => K(d)
158
+ onClick: (L) => B(r),
159
+ onMouseover: (L) => K(r)
157
160
  }, {
158
- default: w(() => [
161
+ default: h(() => [
159
162
  f(t.$slots, "option-content", {
160
163
  option: M,
161
- idx: d
164
+ idx: r
162
165
  }, () => [
163
166
  u("span", {
164
167
  innerHTML: M.label
@@ -173,5 +176,5 @@ const oe = ["id", "data-cy", "placeholder"], ne = ["innerHTML"], pe = /* @__PURE
173
176
  }
174
177
  });
175
178
  export {
176
- pe as default
179
+ de as default
177
180
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as c, ref as b, computed as l, createElementBlock as f, openBlock as v, withModifiers as s, normalizeStyle as B, normalizeClass as C, renderSlot as u, createVNode as M } from "vue";
2
- import z from "../../../../UIKit/StaticSpinner.js";
3
- const L = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "title"], $ = /* @__PURE__ */ c({
1
+ import { defineComponent as y, useTemplateRef as v, shallowRef as B, computed as n, createElementBlock as C, openBlock as M, withModifiers as s, normalizeStyle as h, normalizeClass as z, renderSlot as u, createVNode as L } from "vue";
2
+ import g from "../../../../UIKit/StaticSpinner.js";
3
+ const w = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "title"], A = /* @__PURE__ */ y({
4
4
  __name: "BaseButton",
5
5
  props: {
6
6
  btnClass: { default: "uikit-btn-w-primary" },
@@ -16,17 +16,20 @@ const L = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
16
16
  type: {}
17
17
  },
18
18
  emits: ["mouseover", "mouseout", "click"],
19
- setup(e, { emit: d }) {
20
- const o = d, n = b(!1), r = l(() => e.size ? `uikit-btn-${e.size}` : ""), m = l(() => e.outlined ? "uikit-btn-outline" : ""), k = () => {
21
- n.value = !0;
22
- }, y = () => {
23
- n.value = !1;
19
+ setup(e, { expose: d, emit: r }) {
20
+ const a = r, m = v("buttonEl"), l = B(!1), b = n(() => e.size ? `uikit-btn-${e.size}` : ""), c = n(() => e.outlined ? "uikit-btn-outline" : ""), f = () => {
21
+ l.value = !0;
22
+ }, k = () => {
23
+ l.value = !1;
24
24
  };
25
- return (a, t) => (v(), f("button", {
26
- id: a.$attrs.id,
25
+ return d({
26
+ getRootElement: () => m.value
27
+ }), (o, t) => (M(), C("button", {
28
+ ref: "buttonEl",
29
+ id: o.$attrs.id,
27
30
  "data-cy": e.dataCy,
28
31
  type: e.type,
29
- class: C([
32
+ class: z([
30
33
  "uikit-btn",
31
34
  {
32
35
  "uikit-btn-empty": !e.withMinWidth,
@@ -34,33 +37,33 @@ const L = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
34
37
  "uikit-flex uikit-items-center uikit-justify-center": e.isLoading
35
38
  },
36
39
  e.btnClass,
37
- r.value,
38
- m.value
40
+ b.value,
41
+ c.value
39
42
  ]),
40
- style: B(a.$attrs.style),
43
+ style: h(o.$attrs.style),
41
44
  "data-active": e.keepActive,
42
45
  disabled: e.isLoading || e.disabled,
43
46
  "aria-label": e.ariaLabel,
44
47
  title: e.title,
45
48
  onMouseover: t[0] || (t[0] = s((i) => {
46
- k(), o("mouseover", i);
49
+ f(), a("mouseover", i);
47
50
  }, ["stop"])),
48
51
  onMouseout: t[1] || (t[1] = s((i) => {
49
- y(), o("mouseout", i);
52
+ k(), a("mouseout", i);
50
53
  }, ["stop"])),
51
- onClick: t[2] || (t[2] = (i) => o("click", i))
54
+ onClick: t[2] || (t[2] = (i) => a("click", i))
52
55
  }, [
53
- e.isLoading ? u(a.$slots, "spinner", { key: 1 }, () => [
54
- M(z, {
56
+ e.isLoading ? u(o.$slots, "spinner", { key: 1 }, () => [
57
+ L(g, {
55
58
  "stroke-color": e.outlined ? "#ACB4C3" : "#fff"
56
59
  }, null, 8, ["stroke-color"])
57
- ]) : u(a.$slots, "default", {
60
+ ]) : u(o.$slots, "default", {
58
61
  key: 0,
59
- hover: n.value
62
+ hover: l.value
60
63
  })
61
- ], 46, L));
64
+ ], 46, w));
62
65
  }
63
66
  });
64
67
  export {
65
- $ as default
68
+ A as default
66
69
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as u, useTemplateRef as r, watch as m, nextTick as c, createElementBlock as d, openBlock as f, normalizeClass as k, renderSlot as v, createElementVNode as x } from "vue";
2
- const p = ["tabindex"], b = ["innerHTML"], $ = /* @__PURE__ */ u({
1
+ import { defineComponent as u, useTemplateRef as c, watch as d, nextTick as m, createElementBlock as r, openBlock as f, normalizeClass as v, renderSlot as k, createElementVNode as x } from "vue";
2
+ const b = ["data-active", "tabindex"], p = ["innerHTML"], $ = /* @__PURE__ */ u({
3
3
  __name: "SelectItem",
4
4
  props: {
5
5
  label: { default: "" },
@@ -7,33 +7,34 @@ const p = ["tabindex"], b = ["innerHTML"], $ = /* @__PURE__ */ u({
7
7
  idx: { default: -1 }
8
8
  },
9
9
  emits: ["click", "mouseover"],
10
- setup(l, { emit: a }) {
11
- const n = a, t = l, o = r("liItem");
12
- return m(
13
- () => t.active,
10
+ setup(t, { emit: o }) {
11
+ const a = o, i = t, n = c("liItem");
12
+ return d(
13
+ () => i.active,
14
14
  (e) => {
15
- e && c(() => {
16
- o.value && o.value.focus();
15
+ e && m(() => {
16
+ n.value && n.value.focus();
17
17
  });
18
18
  },
19
19
  { immediate: !0 }
20
- ), (e, i) => (f(), d("li", {
20
+ ), (e, l) => (f(), r("li", {
21
21
  ref: "liItem",
22
- class: k(["uikit-list-none uikit-text-w-black", [
23
- { "active uikit-bg-w-cultured": l.active },
22
+ class: v(["uikit-list-none uikit-text-w-black", [
23
+ { "active uikit-bg-w-cultured": t.active },
24
24
  "uikit-outline-none",
25
25
  e.$attrs.class
26
26
  ]]),
27
+ "data-active": t.active,
27
28
  tabindex: e.$attrs.tabindex ?? -1,
28
- onClick: i[0] || (i[0] = (s) => n("click", t.idx)),
29
- onMouseover: i[1] || (i[1] = (s) => n("mouseover", t.idx))
29
+ onClick: l[0] || (l[0] = (s) => a("click", i.idx)),
30
+ onMouseover: l[1] || (l[1] = (s) => a("mouseover", i.idx))
30
31
  }, [
31
- v(e.$slots, "default", { itemIdx: l.idx }, () => [
32
+ k(e.$slots, "default", { itemIdx: t.idx }, () => [
32
33
  x("span", {
33
- innerHTML: t.label
34
- }, null, 8, b)
34
+ innerHTML: i.label
35
+ }, null, 8, p)
35
36
  ])
36
- ], 42, p));
37
+ ], 42, b));
37
38
  }
38
39
  });
39
40
  export {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.2.9-alpha.13",
3
+ "version": "2.2.9-alpha.15",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",