@wikicasa-dev/components 2.2.9-alpha.9 → 2.3.1-alpha.0

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 (62) hide show
  1. package/dist/Swiper/autoplay.js +1 -1
  2. package/dist/Swiper/controller.js +1 -1
  3. package/dist/Swiper/keyboard.js +1 -1
  4. package/dist/Swiper/thumbs.js +1 -1
  5. package/dist/UIKit/AccessibleSelect.d.ts +5 -4
  6. package/dist/UIKit/AccessibleSelect.js +3 -2
  7. package/dist/UIKit/Autocomplete/ClearableAutocomplete.d.ts +7 -2
  8. package/dist/UIKit/BaseAutocomplete.d.ts +4 -4
  9. package/dist/UIKit/BaseButton.d.ts +14 -8
  10. package/dist/UIKit/BaseCard.js +1 -3
  11. package/dist/UIKit/BaseDropDown.d.ts +19 -13
  12. package/dist/UIKit/BaseFloatingLabel.js +4 -4
  13. package/dist/UIKit/BaseInput.d.ts +3 -2
  14. package/dist/UIKit/BaseInput.js +1 -1
  15. package/dist/UIKit/BaseSnackbar.d.ts +2 -2
  16. package/dist/UIKit/BaseTextarea.d.ts +2 -2
  17. package/dist/UIKit/BaseToggle.d.ts +5 -8
  18. package/dist/UIKit/BaseToggle.js +1 -4
  19. package/dist/UIKit/Checkbox/CheckboxBtn.d.ts +14 -7
  20. package/dist/UIKit/Checkbox/CheckboxGroup.d.ts +5 -2
  21. package/dist/UIKit/Checkbox/v2/CheckboxButtonGroup.d.ts +40 -0
  22. package/dist/UIKit/Checkbox/v2/CheckboxButtonGroup.js +4 -0
  23. package/dist/UIKit/Radio/RadioButton.d.ts +28 -23
  24. package/dist/UIKit/Radio/RadioGroup.d.ts +49 -50
  25. package/dist/UIKit/Radio/v2/RadioButtonGroup.d.ts +29 -0
  26. package/dist/UIKit/Radio/v2/RadioButtonGroup.js +4 -0
  27. package/dist/UIKit/Radio/v2/RadioButtonItem.d.ts +16 -0
  28. package/dist/UIKit/Radio/v2/RadioButtonItem.js +5 -0
  29. package/dist/assets/AccessibleSelect.css +1 -0
  30. package/dist/assets/BaseCard.css +1 -1
  31. package/dist/assets/BaseDropDown.css +1 -1
  32. package/dist/assets/BaseFloatingLabel.css +1 -1
  33. package/dist/assets/BaseInput.css +1 -1
  34. package/dist/assets/RadioButtonItem.css +1 -0
  35. package/dist/assets/tailwind.css +1 -1
  36. package/dist/composables/mock.d.ts +25 -0
  37. package/dist/composables/mock.js +49 -0
  38. package/dist/index.d.ts +4 -0
  39. package/dist/index.js +94 -83
  40. package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +158 -160
  41. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js +4 -6
  42. package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +112 -106
  43. package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +36 -36
  44. package/dist/packages/components/lib/UIKit/BaseButton.vue.js +28 -24
  45. package/dist/packages/components/lib/UIKit/BaseCard.vue.js +13 -13
  46. package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +102 -105
  47. package/dist/packages/components/lib/UIKit/BaseFloatingLabel.vue.js +8 -8
  48. package/dist/packages/components/lib/UIKit/BaseInput.vue.js +65 -64
  49. package/dist/packages/components/lib/UIKit/BaseModal.vue.js +42 -36
  50. package/dist/packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js +18 -17
  51. package/dist/packages/components/lib/UIKit/BaseToggle.vue.js +25 -29
  52. package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +48 -41
  53. package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +60 -55
  54. package/dist/packages/components/lib/UIKit/Checkbox/v2/CheckboxButtonGroup.vue.js +78 -0
  55. package/dist/packages/components/lib/UIKit/Radio/RadioButton.vue.js +16 -14
  56. package/dist/packages/components/lib/UIKit/Radio/RadioGroup.vue.js +37 -33
  57. package/dist/packages/components/lib/UIKit/Radio/v2/RadioButtonGroup.vue.js +49 -0
  58. package/dist/packages/components/lib/UIKit/Radio/v2/RadioButtonItem.vue.js +45 -0
  59. package/dist/types/index.d.ts +3 -0
  60. package/package.json +8 -7
  61. package/dist/assets/BaseToggle.css +0 -1
  62. /package/dist/assets/{swiper-thumbs.css → swiper-controller.css} +0 -0
@@ -1,20 +1,22 @@
1
- import { defineComponent as D, mergeModels as $, useModel as y, shallowRef as d, useId as N, useTemplateRef as b, onBeforeMount as A, watch as w, nextTick as H, createBlock as F, openBlock as h, withCtx as g, createElementBlock as P, Fragment as X, renderList as j, renderSlot as p, createElementVNode as u, normalizeClass as f, withDirectives as O, 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 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
+ import se 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 ne = ["id", "data-cy", "placeholder"], oe = ["innerHTML"], ce = /* @__PURE__ */ D({
4
+ import re from "../BaseSelect/SelectItem.vue.js";
5
+ import { debounce as de } from "@wikicasa-dev/utilities";
6
+ const ce = ["id", "data-cy", "placeholder"], fe = ["innerHTML"], ye = /* @__PURE__ */ j({
7
7
  __name: "ClearableAutocomplete",
8
- props: /* @__PURE__ */ $({
8
+ props: /* @__PURE__ */ U({
9
9
  dataCy: {},
10
10
  placeholder: {},
11
11
  enableKeyboardController: { type: Boolean, default: !0 },
12
12
  triggerWrapperClasses: {},
13
13
  inputWrapperClasses: {},
14
14
  inputClasses: {},
15
+ hiddenTextClasses: {},
15
16
  dropdownClasses: {},
16
17
  clearButton: {},
17
18
  keepState: {},
19
+ disableCb: { type: Boolean, default: !1 },
18
20
  onInputChangeCb: { type: Function },
19
21
  onOptionSelectedCb: { type: [Function, null] }
20
22
  }, {
@@ -27,160 +29,164 @@ const ne = ["id", "data-cy", "placeholder"], oe = ["innerHTML"], ce = /* @__PURE
27
29
  },
28
30
  inputValueModifiers: {}
29
31
  }),
30
- emits: /* @__PURE__ */ $(["click", "inputClick", "keydown"], ["update:open", "update:modelValue", "update:inputValue"]),
31
- setup(l, { expose: R, emit: x }) {
32
- const s = y(l, "open"), a = y(l, "modelValue"), o = y(l, "inputValue");
33
- o.value = o.value ?? a.value?.label ?? "";
34
- const v = x, k = d(!1), E = N(), m = b("inputRef"), c = d(0), C = d(!1), S = d(null), i = d([]), T = b("dropdownRef"), M = b("hiddenSpan"), U = () => {
35
- o.value = "", a.value = null;
36
- }, I = async (t) => {
37
- if (!t) {
38
- i.value = [], s.value = !1;
32
+ emits: /* @__PURE__ */ U(["input", "click", "inputClick", "keydown"], ["update:open", "update:modelValue", "update:inputValue"]),
33
+ setup(t, { expose: L, emit: D }) {
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;
36
+ }, A = async (l) => {
37
+ if (!l) {
38
+ a.value = [], s.value = !1;
39
39
  return;
40
40
  }
41
- i.value = await S.value?.(t) || [], C.value = !0, s.value = !!i.value.length;
42
- }, B = (t = -1) => {
43
- const e = i.value[t];
44
- !e || e.id === a.value?.id || (l.onOptionSelectedCb?.(e), o.value = e.label, s.value = !1, a.value = e, i.value = []);
45
- }, W = () => {
46
- m.value?.select();
47
- }, z = () => {
48
- m.value?.focus();
41
+ t.disableCb || (a.value = await x.value?.(l) || [], y.value = !0, s.value = !!a.value.length);
42
+ }, F = (l = -1) => {
43
+ const e = a.value[l];
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 = []);
45
+ }, P = () => {
46
+ C.value?.select();
47
+ }, H = () => {
48
+ C.value?.focus();
49
49
  };
50
- return A(() => {
51
- S.value = le({ delay: 300 }, l.onInputChangeCb);
52
- }), w(
53
- [o, () => M.value],
54
- ([, t]) => {
55
- t && H(() => {
56
- if (!t) return;
57
- const e = t.offsetWidth;
58
- e !== c.value && (c.value = e);
59
- });
60
- },
61
- { immediate: !0 }
62
- ), w(
63
- () => T.value?.selectedIdx,
64
- (t) => {
65
- const e = t ?? -1;
66
- e !== -1 && B(e);
50
+ let B = null;
51
+ const $ = () => {
52
+ const l = h.value, e = w.value, n = R.value;
53
+ if (!l || !e) return;
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);
55
+ V !== k.value && (k.value = V);
56
+ };
57
+ return G(() => {
58
+ x.value = de({ delay: 300 }, t.onInputChangeCb);
59
+ }), J(() => {
60
+ w.value && (B = new ResizeObserver(() => {
61
+ $();
62
+ }), B.observe(w.value));
63
+ }), Q(() => {
64
+ B?.disconnect();
65
+ }), E([o, h, R], () => {
66
+ Y($);
67
+ }), E(
68
+ () => O.value?.selectedIdx,
69
+ (l) => {
70
+ const e = l ?? -1;
71
+ e !== -1 && F(e);
67
72
  }
68
- ), w(
69
- a,
70
- (t, e) => {
71
- if (!(t === e || t?.label === o.value)) {
72
- if (k.value) {
73
- k.value = !1;
74
- return;
75
- }
76
- o.value = t?.label || "";
77
- }
73
+ ), E(
74
+ p,
75
+ (l) => {
76
+ if (l?.label === o.value) return;
77
+ const e = l?.label || "";
78
+ o.value = e, e && (r.value = !0);
78
79
  },
79
80
  { immediate: !0 }
80
- ), R({
81
- getRootElement: () => T.value?.getRootElement(),
82
- select: W,
83
- focus: z
84
- }), (t, e) => (h(), F(ee, {
81
+ ), L({
82
+ getRootElement: () => O.value?.getRootElement(),
83
+ select: P,
84
+ focus: H
85
+ }), (l, e) => (M(), z(se, {
85
86
  ref: "dropdownRef",
86
87
  class: "uikit-clearable-autocomplete",
87
- "data-cy": l.dataCy,
88
+ "data-cy": t.dataCy,
88
89
  "dropdown-element": "ul",
89
- "dropdown-classes": ["uikit-z-30", l.dropdownClasses],
90
- "open-dropdown": s.value,
91
- "keep-state": !i.value.length || l.keepState === "closed" ? "closed" : "opened",
92
- "activate-keyboard-controller": l.enableKeyboardController,
93
- "reset-keyboard-controller": C.value,
94
- "onUpdate:resetKeyboardController": e[4] || (e[4] = (n) => C.value = n),
95
- "onUpdate:dropdownState": e[5] || (e[5] = (n) => s.value = n)
90
+ "dropdown-classes": ["uikit-z-30", t.dropdownClasses],
91
+ "keep-state": !a.value.length || t.keepState === "closed" ? "closed" : "opened",
92
+ "activate-keyboard-controller": t.enableKeyboardController,
93
+ "reset-keyboard-controller": y.value,
94
+ "onUpdate:resetKeyboardController": e[5] || (e[5] = (n) => y.value = n),
95
+ open: s.value,
96
+ "onUpdate:open": e[6] || (e[6] = (n) => s.value = n)
96
97
  }, {
97
- btn_slot: g(() => [
98
+ btn_slot: W(() => [
98
99
  u("div", {
99
- class: f(["uikit-text-16", l.triggerWrapperClasses]),
100
- onClick: e[3] || (e[3] = (n) => v("click", n))
100
+ class: f(["uikit-text-16", t.triggerWrapperClasses]),
101
+ onClick: e[4] || (e[4] = (n) => v("click", n))
101
102
  }, [
102
- p(t.$slots, "left-icon"),
103
+ m(l.$slots, "left-icon"),
103
104
  u("div", {
104
- class: f(["uikit-relative", l.inputWrapperClasses])
105
+ ref: "inputWrapperRef",
106
+ class: f(["uikit-relative", t.inputWrapperClasses])
105
107
  }, [
106
- O(u("input", {
108
+ I(u("input", {
107
109
  ref: "inputRef",
108
110
  "onUpdate:modelValue": [
109
111
  e[0] || (e[0] = (n) => o.value = n),
110
- I
112
+ A
111
113
  ],
112
- id: q(E),
113
- "data-cy": l.dataCy ? `ac_input_${l.dataCy}` : "",
114
+ id: te(K),
115
+ "data-cy": t.dataCy ? `ac_input_${t.dataCy}` : "",
114
116
  type: "text",
115
117
  autocomplete: "off",
116
- class: f(["uikit-w-full uikit-border-none focus-visible:uikit-outline-none", l.inputClasses]),
118
+ class: f(["uikit-w-full uikit-border-none focus-visible:uikit-outline-none", t.inputClasses]),
117
119
  style: {
118
120
  font: "inherit",
119
121
  fontSize: "inherit"
120
122
  },
121
- placeholder: l.placeholder,
122
- onKeydown: e[1] || (e[1] = (n) => {
123
- v("keydown", n), o.value && a.value && (k.value = !0, a.value = null);
123
+ placeholder: t.placeholder,
124
+ onKeydown: e[1] || (e[1] = (n) => v("keydown", n)),
125
+ onInput: e[2] || (e[2] = (n) => {
126
+ v("input", n), r.value = !1;
124
127
  }),
125
- onClick: e[2] || (e[2] = (n) => {
126
- v("inputClick", n), m.value?.select();
128
+ onClick: e[3] || (e[3] = (n) => {
129
+ v("inputClick", n), C.value?.select();
127
130
  })
128
- }, null, 42, ne), [
129
- [G, o.value]
131
+ }, null, 42, ce), [
132
+ [le, o.value]
130
133
  ]),
131
134
  u("span", {
132
135
  ref_key: "hiddenSpan",
133
- ref: M,
134
- class: "uikit-invisible uikit-absolute uikit-left-0 uikit-top-0 uikit-whitespace-pre",
136
+ ref: h,
137
+ class: f(["uikit-invisible uikit-absolute uikit-left-0 uikit-top-0 uikit-whitespace-pre", t.hiddenTextClasses]),
135
138
  style: {
136
139
  font: "inherit",
137
140
  fontSize: "inherit"
138
141
  }
139
- }, J(o.value), 513),
140
- O(u("button", {
142
+ }, ne(o.value), 3),
143
+ I(u("button", {
144
+ ref: "clearButtonRef",
141
145
  type: "button",
142
- class: f(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none", l.clearButton?.classes]),
146
+ class: f(["uikit-clear-btn uikit-absolute uikit-top-1/2 -uikit-translate-y-1/2 uikit-appearance-none", t.clearButton?.classes]),
143
147
  "aria-label": "Clear input",
144
- style: Y({
145
- left: `${c.value + (l.clearButton?.offset || 10)}px`
148
+ style: ae({
149
+ left: `${k.value + (t.clearButton?.offset || 0)}px`,
150
+ width: t.clearButton?.width ? `${t.clearButton.width}px` : "auto",
151
+ height: t.clearButton?.height ? `${t.clearButton.height}px` : "auto"
146
152
  }),
147
- onClick: Q(U, ["stop"])
153
+ onClick: oe(N, ["stop"])
148
154
  }, [
149
- p(t.$slots, "clear-icon", {}, () => [
150
- e[6] || (e[6] = Z("X", -1))
155
+ m(l.$slots, "clear-icon", {}, () => [
156
+ e[7] || (e[7] = ie("X", -1))
151
157
  ])
152
158
  ], 6), [
153
- [_, a.value?.label && c.value]
159
+ [ue, r.value && k.value]
154
160
  ])
155
161
  ], 2),
156
- p(t.$slots, "right-icon")
162
+ m(l.$slots, "right-icon")
157
163
  ], 2)
158
164
  ]),
159
- default: g(({ activeIdx: n, setActiveIdx: K }) => [
160
- (h(!0), P(X, null, j(i.value, (V, r) => (h(), F(te, {
161
- key: r,
162
- active: n === r,
165
+ default: W(({ activeIdx: n, setActiveIdx: T }) => [
166
+ (M(!0), Z(_, null, ee(a.value, (b, i) => (M(), z(re, {
167
+ key: i,
168
+ active: n === i,
163
169
  class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
164
- onClick: (L) => B(r),
165
- onMouseover: (L) => K(r)
170
+ onClick: (g) => F(i),
171
+ onMouseover: (g) => T(i)
166
172
  }, {
167
- default: g(() => [
168
- p(t.$slots, "option-content", {
169
- option: V,
170
- idx: r
173
+ default: W(() => [
174
+ m(l.$slots, "option-content", {
175
+ option: b,
176
+ idx: i
171
177
  }, () => [
172
178
  u("span", {
173
- innerHTML: V.label
174
- }, null, 8, oe)
179
+ innerHTML: b.label
180
+ }, null, 8, fe)
175
181
  ])
176
182
  ]),
177
183
  _: 2
178
184
  }, 1032, ["active", "onClick", "onMouseover"]))), 128))
179
185
  ]),
180
186
  _: 3
181
- }, 8, ["data-cy", "dropdown-classes", "open-dropdown", "keep-state", "activate-keyboard-controller", "reset-keyboard-controller"]));
187
+ }, 8, ["data-cy", "dropdown-classes", "keep-state", "activate-keyboard-controller", "reset-keyboard-controller", "open"]));
182
188
  }
183
189
  });
184
190
  export {
185
- ce as default
191
+ ye as default
186
192
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as x, mergeModels as $, useModel as F, ref as d, computed as k, onBeforeMount as L, watch as f, createBlock as g, openBlock as w, normalizeClass as H, withCtx as c, createElementBlock as K, Fragment as T, renderList as z, unref as N, renderSlot as p, createElementVNode as U, createVNode as A } from "vue";
2
- import W from "../../../../UIKit/BaseInput.js";
3
- import j from "./BaseDropDown.vue.js";
1
+ import { defineComponent as x, mergeModels as $, useModel as F, shallowRef as d, computed as k, onBeforeMount as L, watch as f, createBlock as g, openBlock as w, normalizeClass as H, withCtx as c, createElementBlock as K, Fragment as T, renderList as z, unref as N, renderSlot as p, createElementVNode as U, createVNode as A } from "vue";
2
+ import R from "../../../../UIKit/BaseInput.js";
3
+ import W from "./BaseDropDown.vue.js";
4
4
  import '../../../../assets/BaseDropDown.css';/* empty css */
5
- import { debounce as q } from "@wikicasa-dev/utilities";
6
- import G from "./BaseSelect/SelectItem.vue.js";
7
- import { useKeyboardController as J } from "@wikicasa-dev/vue-composables";
8
- const Q = ["innerHTML"], ne = /* @__PURE__ */ x({
5
+ import { debounce as j } from "@wikicasa-dev/utilities";
6
+ import q from "./BaseSelect/SelectItem.vue.js";
7
+ import { useKeyboardController as G } from "@wikicasa-dev/vue-composables";
8
+ const J = ["innerHTML"], ne = /* @__PURE__ */ x({
9
9
  __name: "BaseAutocomplete",
10
10
  props: /* @__PURE__ */ $({
11
11
  isValid: { type: [Boolean, null], default: null },
@@ -30,13 +30,13 @@ const Q = ["innerHTML"], ne = /* @__PURE__ */ x({
30
30
  modelModifiers: {}
31
31
  }),
32
32
  emits: /* @__PURE__ */ $(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
33
- setup(t, { expose: S, emit: V }) {
34
- const u = F(t, "modelValue"), r = V, i = d(""), a = d([]), v = d(null), b = d(!1), n = d(!1), C = d(null), B = k(() => a.value.length);
33
+ setup(t, { expose: V, emit: B }) {
34
+ const u = F(t, "modelValue"), r = B, i = d(""), o = d([]), v = d(null), b = d(!1), n = d(!1), C = d(null), S = k(() => o.value.length);
35
35
  L(() => {
36
- v.value = q({ delay: 300 }, t.onInputChangeCb);
36
+ v.value = j({ delay: 300 }, t.onInputChangeCb);
37
37
  });
38
- const { activeIdx: m, selectedIdx: h } = J({
39
- optionsLength: B,
38
+ const { activeIdx: m, selectedIdx: h } = G({
39
+ optionsLength: S,
40
40
  isDropdownOpen: n,
41
41
  disableSpaceHandler: !0
42
42
  }), O = k(() => {
@@ -76,15 +76,15 @@ const Q = ["innerHTML"], ne = /* @__PURE__ */ x({
76
76
  }), D = async (e) => {
77
77
  if (i.value !== e && (r("changedValue", e), i.value = e, !!t.onInputChangeCb)) {
78
78
  if (!e || b.value) {
79
- a.value = [], b.value = !1, h.value = -1, m.value = -1, u.value && (u.value.label = ""), n.value = !1, await v.value(null);
79
+ o.value = [], b.value = !1, h.value = -1, m.value = -1, u.value && (u.value.label = ""), n.value = !1, await v.value?.(null);
80
80
  return;
81
81
  }
82
- t.disableCb || (a.value = await v.value(e), n.value = !!a.value.length);
82
+ t.disableCb || (o.value = await v.value?.(e) || [], n.value = !!o.value.length);
83
83
  }
84
84
  }, y = (e, l) => {
85
- t.onOptionSelectedCb && t.onOptionSelectedCb(e), t.cleanupOnClose && (a.value = []), b.value = !0, i.value = e.label, u.value = e, n.value = !1, h.value = l;
85
+ t.onOptionSelectedCb && t.onOptionSelectedCb(e), t.cleanupOnClose && (o.value = []), b.value = !0, i.value = e.label, u.value = e, n.value = !1, h.value = l;
86
86
  }, E = () => {
87
- a.value.length && t.keepState !== "closed" && (n.value = !0);
87
+ o.value.length && t.keepState !== "closed" && (n.value = !0);
88
88
  };
89
89
  return f(
90
90
  u,
@@ -93,21 +93,21 @@ const Q = ["innerHTML"], ne = /* @__PURE__ */ x({
93
93
  },
94
94
  { immediate: !0 }
95
95
  ), f(h, (e) => {
96
- if (e === -1 || !a.value.length) return;
97
- const l = a.value[e];
96
+ if (e === -1 || !o.value.length) return;
97
+ const l = o.value[e];
98
98
  b.value && l.label === u.value?.label || y(l, e);
99
99
  }), f(
100
100
  () => t.keepState,
101
101
  (e) => {
102
- e === "closed" ? (n.value = !1, t.cleanupOnClose && (a.value = [])) : e === "open" && a.value.length && (n.value = !0);
102
+ e === "closed" ? (n.value = !1, t.cleanupOnClose && (o.value = [])) : e === "open" && o.value.length && (n.value = !0);
103
103
  }
104
104
  ), f(n, (e) => {
105
105
  r("update:dropdownState", e);
106
- }), S({
106
+ }), V({
107
107
  select: () => {
108
108
  C.value?.select();
109
109
  }
110
- }), (e, l) => (w(), g(j, {
110
+ }), (e, l) => (w(), g(W, {
111
111
  class: H(["uikit-autocomplete", e.$attrs["root-classes"]]),
112
112
  "data-cy": t.dataCy ? t.dataCy : `ac_${e.$attrs.id}`,
113
113
  "dropdown-element": "ul",
@@ -122,17 +122,17 @@ const Q = ["innerHTML"], ne = /* @__PURE__ */ x({
122
122
  "uikit-z-30",
123
123
  t.dropdownClasses
124
124
  ],
125
- "open-dropdown": n.value,
126
- "keep-state": !a.value.length || t.keepState === "closed" ? "closed" : "opened",
125
+ open: n.value,
126
+ "keep-state": !o.value.length || t.keepState === "closed" ? "closed" : "opened",
127
127
  "close-when-clicked-outside": t.closeDropdownOnBodyPressed,
128
128
  "activate-keyboard-controller": !1,
129
- "onUpdate:dropdownState": l[3] || (l[3] = (o) => n.value = o),
130
- onClick: l[4] || (l[4] = (o) => {
129
+ "onUpdate:open": l[3] || (l[3] = (a) => n.value = a),
130
+ onClick: l[4] || (l[4] = (a) => {
131
131
  r("click"), E();
132
132
  })
133
133
  }, {
134
134
  btn_slot: c(() => [
135
- A(W, {
135
+ A(R, {
136
136
  id: e.$attrs.id ? `ac_input_${e.$attrs.id}` : "",
137
137
  ref_key: "baseInput",
138
138
  ref: C,
@@ -150,42 +150,42 @@ const Q = ["innerHTML"], ne = /* @__PURE__ */ x({
150
150
  "!uikit-ml-0 !uikit-w-full"
151
151
  ],
152
152
  "fieldset-classes": [I.value, t.fieldsetClasses],
153
- "onUpdate:modelValue": l[0] || (l[0] = (o) => D(o === void 0 ? "" : `${o}`)),
154
- onKeydown: l[1] || (l[1] = (o) => r("keydown", o)),
153
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => D(a === void 0 ? "" : `${a}`)),
154
+ onKeydown: l[1] || (l[1] = (a) => r("keydown", a)),
155
155
  onKeydownEnterPressed: l[2] || (l[2] = () => r("keydownEnterPressed"))
156
156
  }, {
157
157
  leftIcon: c(() => [
158
158
  p(e.$slots, "lefticon")
159
159
  ]),
160
- righticon: c(({ handleClean: o }) => [
161
- p(e.$slots, "righticon", { handleClean: o })
160
+ righticon: c(({ handleClean: a }) => [
161
+ p(e.$slots, "righticon", { handleClean: a })
162
162
  ]),
163
163
  _: 3
164
164
  }, 8, ["id", "data-cy", "label-text", "model-value", "is-valid", "disabled", "placeholder", "with-left-icon", "with-right-icon", "input-class", "fieldset-classes"])
165
165
  ]),
166
166
  default: c(() => [
167
- (w(!0), K(T, null, z(a.value, (o, s) => (w(), g(G, {
167
+ (w(!0), K(T, null, z(o.value, (a, s) => (w(), g(q, {
168
168
  key: s,
169
169
  active: N(m) === s,
170
170
  class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
171
- onClick: (P) => y(o, s),
171
+ onClick: (P) => y(a, s),
172
172
  onMouseover: (P) => m.value = s
173
173
  }, {
174
174
  default: c(() => [
175
175
  p(e.$slots, "option-content", {
176
- option: o,
176
+ option: a,
177
177
  idx: s
178
178
  }, () => [
179
179
  U("span", {
180
- innerHTML: o.label
181
- }, null, 8, Q)
180
+ innerHTML: a.label
181
+ }, null, 8, J)
182
182
  ])
183
183
  ]),
184
184
  _: 2
185
185
  }, 1032, ["active", "onClick", "onMouseover"]))), 128))
186
186
  ]),
187
187
  _: 3
188
- }, 8, ["class", "data-cy", "dropdown-classes", "open-dropdown", "keep-state", "close-when-clicked-outside"]));
188
+ }, 8, ["class", "data-cy", "dropdown-classes", "open", "keep-state", "close-when-clicked-outside"]));
189
189
  }
190
190
  });
191
191
  export {
@@ -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 v, useTemplateRef as c, shallowRef as B, computed as l, createElementBlock as C, openBlock as w, withModifiers as s, normalizeStyle as M, normalizeClass as z, renderSlot as u, createVNode as L } from "vue";
2
+ import g from "../../../../UIKit/StaticSpinner.js";
3
+ const S = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "title"], A = /* @__PURE__ */ v({
4
4
  __name: "BaseButton",
5
5
  props: {
6
6
  btnClass: { default: "uikit-btn-w-primary" },
@@ -15,18 +15,21 @@ const L = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
15
15
  dataCy: {},
16
16
  type: {}
17
17
  },
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;
18
+ emits: ["mouseover", "mouseout", "click", "keydown"],
19
+ setup(e, { expose: d, emit: r }) {
20
+ const o = r, m = c("buttonEl"), a = B(!1), y = l(() => e.size ? `uikit-btn-${e.size}` : ""), k = l(() => e.outlined ? "uikit-btn-outline" : ""), b = () => {
21
+ a.value = !0;
22
+ }, f = () => {
23
+ a.value = !1;
24
24
  };
25
- return (a, t) => (v(), f("button", {
26
- id: a.$attrs.id,
25
+ return d({
26
+ getRootElement: () => m.value
27
+ }), (n, t) => (w(), C("button", {
28
+ ref: "buttonEl",
29
+ id: n.$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,34 @@ 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
+ y.value,
41
+ k.value
39
42
  ]),
40
- style: B(a.$attrs.style),
43
+ style: M(n.$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
+ b(), o("mouseover", i);
47
50
  }, ["stop"])),
48
51
  onMouseout: t[1] || (t[1] = s((i) => {
49
- y(), o("mouseout", i);
52
+ f(), o("mouseout", i);
50
53
  }, ["stop"])),
51
- onClick: t[2] || (t[2] = (i) => o("click", i))
54
+ onClick: t[2] || (t[2] = (i) => o("click", i)),
55
+ onKeydown: t[3] || (t[3] = (i) => o("keydown", i))
52
56
  }, [
53
- e.isLoading ? u(a.$slots, "spinner", { key: 1 }, () => [
54
- M(z, {
57
+ e.isLoading ? u(n.$slots, "spinner", { key: 1 }, () => [
58
+ L(g, {
55
59
  "stroke-color": e.outlined ? "#ACB4C3" : "#fff"
56
60
  }, null, 8, ["stroke-color"])
57
- ]) : u(a.$slots, "default", {
61
+ ]) : u(n.$slots, "default", {
58
62
  key: 0,
59
- hover: n.value
63
+ hover: a.value
60
64
  })
61
- ], 46, L));
65
+ ], 46, S));
62
66
  }
63
67
  });
64
68
  export {
65
- $ as default
69
+ A as default
66
70
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as u, computed as d, createBlock as C, openBlock as y, resolveDynamicComponent as f, normalizeClass as a, withCtx as v, createElementVNode as o, renderSlot as c } from "vue";
2
- const p = /* @__PURE__ */ u({
1
+ import { defineComponent as C, computed as c, createBlock as u, openBlock as y, resolveDynamicComponent as f, normalizeClass as a, withCtx as g, createElementVNode as d, renderSlot as l } from "vue";
2
+ const p = /* @__PURE__ */ C({
3
3
  __name: "BaseCard",
4
4
  props: {
5
5
  type: { default: "" },
@@ -8,24 +8,24 @@ const p = /* @__PURE__ */ u({
8
8
  cardBodyClasses: { default: "" }
9
9
  },
10
10
  emits: ["click"],
11
- setup(e, { emit: l }) {
12
- const n = l, r = d(
11
+ setup(e, { emit: o }) {
12
+ const n = o, r = c(
13
13
  () => e.type === "news" ? "news-card" : e.type
14
- ), i = d(() => e.type ? `${e.type}-img` : "");
15
- return (t, s) => (y(), C(f(e.rootComponent), {
16
- class: a(["card", [r.value]]),
17
- onClick: s[0] || (s[0] = (m) => n("click", m))
14
+ ), i = c(() => e.type ? `${e.type}-img` : "");
15
+ return (s, t) => (y(), u(f(e.rootComponent), {
16
+ class: a(["uikit-card", [r.value]]),
17
+ onClick: t[0] || (t[0] = (m) => n("click", m))
18
18
  }, {
19
- default: v(() => [
20
- o("div", {
19
+ default: g(() => [
20
+ d("div", {
21
21
  class: a(["card-img", [i.value, e.cardImgClasses]])
22
22
  }, [
23
- c(t.$slots, "card-image", {}, void 0, !0)
23
+ l(s.$slots, "card-image")
24
24
  ], 2),
25
- o("div", {
25
+ d("div", {
26
26
  class: a(["card-body", [e.cardBodyClasses]])
27
27
  }, [
28
- c(t.$slots, "card-description", {}, void 0, !0)
28
+ l(s.$slots, "card-description")
29
29
  ], 2)
30
30
  ]),
31
31
  _: 3