@wikicasa-dev/components 1.7.21 → 1.7.23

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,4 +1,4 @@
1
- import { _ as f } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.DyNyXytE.js";
1
+ import { _ as f } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.qS_LdstC.js";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -51,6 +51,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
51
51
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
52
52
  click: () => void;
53
53
  keydown: (args_0: KeyboardEvent) => void;
54
+ keydownEnterPressed: () => void;
54
55
  "update:dropdownState": (args_0: boolean) => void;
55
56
  changedValue: (args_0: string) => void;
56
57
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
@@ -102,6 +103,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
102
103
  }>> & {
103
104
  onKeydown?: ((args_0: KeyboardEvent) => any) | undefined;
104
105
  onClick?: (() => any) | undefined;
106
+ onKeydownEnterPressed?: (() => any) | undefined;
105
107
  "onUpdate:dropdownState"?: ((args_0: boolean) => any) | undefined;
106
108
  onChangedValue?: ((args_0: string) => any) | undefined;
107
109
  }, {
@@ -1,22 +1,22 @@
1
- import { defineComponent as P, mergeModels as S, useModel as z, ref as s, computed as k, onBeforeMount as E, watch as f, openBlock as y, createBlock as V, normalizeClass as K, withCtx as c, createVNode as N, renderSlot as B, createElementBlock as U, Fragment as A, renderList as F, unref as W, createElementVNode as j } from "vue";
1
+ import { defineComponent as L, mergeModels as S, useModel as H, ref as s, computed as k, onBeforeMount as K, watch as f, openBlock as y, createBlock as V, normalizeClass as z, withCtx as c, createVNode as N, renderSlot as B, createElementBlock as U, Fragment as A, renderList as F, unref as W, createElementVNode as j } from "vue";
2
2
  import q from "../BaseInput.js";
3
3
  import { _ as G } from "./BaseDropDown.vue_vue_type_script_setup_true_lang.BRcL69nu.js";
4
4
  import "./js.cookie.BQua9eWh.js";
5
5
  import { _ as J } from "./SelectItem.vue_vue_type_script_setup_true_lang.Colhxc7n.js";
6
6
  import { useKeyboardController as Q } from "../useKeyboardController.js";
7
- function R(d, v) {
8
- return (...m) => new Promise((t, i) => {
9
- d.id && clearTimeout(d.id), d.id = setTimeout(() => {
7
+ function R(i, v) {
8
+ return (...m) => new Promise((l, d) => {
9
+ i.id && clearTimeout(i.id), i.id = setTimeout(() => {
10
10
  try {
11
- const r = v(...m);
12
- t(r);
13
- } catch (r) {
14
- i(r);
11
+ const a = v(...m);
12
+ l(a);
13
+ } catch (a) {
14
+ d(a);
15
15
  }
16
- }, d.delay);
16
+ }, i.delay);
17
17
  });
18
18
  }
19
- const X = ["innerHTML"], oe = /* @__PURE__ */ P({
19
+ const X = ["innerHTML"], oe = /* @__PURE__ */ L({
20
20
  __name: "BaseAutocomplete",
21
21
  props: /* @__PURE__ */ S({
22
22
  border: { type: Boolean, default: !0 },
@@ -38,18 +38,18 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ P({
38
38
  },
39
39
  modelModifiers: {}
40
40
  }),
41
- emits: /* @__PURE__ */ S(["update:dropdownState", "changedValue", "click", "keydown"], ["update:modelValue"]),
42
- setup(d, { expose: v, emit: m }) {
43
- const t = d, i = z(d, "modelValue"), r = m, u = s(""), n = s([]), h = s(null), p = s(!1), o = s(!1), g = s(null), O = k(() => n.value.length);
44
- E(() => {
45
- u.value = i.value?.label || "", h.value = R({ delay: 300 }, t.onInputChangeCb);
41
+ emits: /* @__PURE__ */ S(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
42
+ setup(i, { expose: v, emit: m }) {
43
+ const l = i, d = H(i, "modelValue"), a = m, u = s(""), n = s([]), h = s(null), p = s(!1), o = s(!1), g = s(null), O = k(() => n.value.length);
44
+ K(() => {
45
+ u.value = d.value?.label || "", h.value = R({ delay: 300 }, l.onInputChangeCb);
46
46
  });
47
47
  const { activeIdx: w, selectedIdx: C } = Q({
48
48
  optionsLength: O,
49
49
  isDropdownOpen: o,
50
50
  disableSpaceHandler: !0
51
51
  }), M = k(() => {
52
- switch (t.theme) {
52
+ switch (l.theme) {
53
53
  case "bordered":
54
54
  return "";
55
55
  case "all-bordered":
@@ -60,7 +60,7 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ P({
60
60
  return "";
61
61
  }
62
62
  }), I = k(() => {
63
- switch (t.theme) {
63
+ switch (l.theme) {
64
64
  case "bordered":
65
65
  return "";
66
66
  case "all-bordered":
@@ -70,9 +70,9 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ P({
70
70
  default:
71
71
  return "";
72
72
  }
73
- }), D = k(() => {
73
+ }), P = k(() => {
74
74
  const e = "uikit-rounded-b-xl uikit-shadow uikit-rounded-t-none uikit-mb-0 !uikit-mt-0 uikit-text-w-black !uikit-rounded-b-xl !uikit-rounded-t-none";
75
- switch (t.theme) {
75
+ switch (l.theme) {
76
76
  case "bordered":
77
77
  return "before:uikit-content-[''] before:uikit-absolute before:uikit-w-1/2 before:uikit-border-b before:uikit-border-b-w-lavender before:[border-bottom-style:solid] before:uikit-right-1/4 uikit-rounded-b-xl uikit-shadow uikit-rounded-t-none uikit-mt-5px uikit-mb-0";
78
78
  case "all-bordered":
@@ -82,39 +82,39 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ P({
82
82
  default:
83
83
  return "";
84
84
  }
85
- }), T = async (e) => {
86
- if (u.value !== e && (r("changedValue", e), u.value = e, !!t.onInputChangeCb)) {
85
+ }), D = async (e) => {
86
+ if (u.value !== e && (a("changedValue", e), u.value = e, !!l.onInputChangeCb)) {
87
87
  if (!e || p.value) {
88
- n.value = [], p.value = !1, C.value = -1, w.value = -1, i.value && (i.value.label = ""), o.value = !1, await h.value(null);
88
+ n.value = [], p.value = !1, C.value = -1, w.value = -1, d.value && (d.value.label = ""), o.value = !1, await h.value(null);
89
89
  return;
90
90
  }
91
- t.disableCb || (n.value = await h.value(e), o.value = !!n.value.length);
91
+ l.disableCb || (n.value = await h.value(e), o.value = !!n.value.length);
92
92
  }
93
- }, $ = (e, l) => {
94
- t.onOptionSelectedCb && t.onOptionSelectedCb(e), t.cleanupOnClose && (n.value = []), p.value = !0, u.value = e.label, i.value = e, o.value = !1, C.value = l;
95
- }, L = () => {
96
- n.value.length && t.keepState !== "closed" && (o.value = !0);
93
+ }, $ = (e, t) => {
94
+ l.onOptionSelectedCb && l.onOptionSelectedCb(e), l.cleanupOnClose && (n.value = []), p.value = !0, u.value = e.label, d.value = e, o.value = !1, C.value = t;
95
+ }, E = () => {
96
+ n.value.length && l.keepState !== "closed" && (o.value = !0);
97
97
  };
98
- return f(i, (e, l) => {
99
- e !== l && (u.value = e?.label || "");
98
+ return f(d, (e, t) => {
99
+ e !== t && (u.value = e?.label || "");
100
100
  }), f(C, (e) => {
101
101
  if (e === -1 || !n.value.length)
102
102
  return;
103
- const l = n.value[e];
104
- p.value && l.label === i.value?.label || $(l, e);
103
+ const t = n.value[e];
104
+ p.value && t.label === d.value?.label || $(t, e);
105
105
  }), f(
106
- () => t.keepState,
106
+ () => l.keepState,
107
107
  (e) => {
108
- e === "closed" ? (o.value = !1, t.cleanupOnClose && (n.value = [])) : e === "open" && n.value.length && (o.value = !0);
108
+ e === "closed" ? (o.value = !1, l.cleanupOnClose && (n.value = [])) : e === "open" && n.value.length && (o.value = !0);
109
109
  }
110
110
  ), f(o, (e) => {
111
- r("update:dropdownState", e);
111
+ a("update:dropdownState", e);
112
112
  }), v({
113
113
  select: () => {
114
114
  g.value?.select();
115
115
  }
116
- }), (e, l) => (y(), V(G, {
117
- class: K(e.$attrs["root-classes"]),
116
+ }), (e, t) => (y(), V(G, {
117
+ class: z(e.$attrs["root-classes"]),
118
118
  "data-cy": `ac_${e.$attrs.id}`,
119
119
  "dropdown-element": "ul",
120
120
  "dropdown-classes": [
@@ -124,15 +124,15 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ P({
124
124
  {
125
125
  "uikit-mt-10px !uikit-border !uikit-border-w-secondary !uikit-rounded-xs": !e.theme
126
126
  },
127
- D.value,
127
+ P.value,
128
128
  "!uikit-max-h-[210px] uikit-z-30",
129
129
  e.dropdownClasses
130
130
  ],
131
131
  "open-dropdown": o.value,
132
- "keep-state": !n.value.length || t.keepState === "closed" ? "closed" : "opened",
133
- "onUpdate:dropdownState": l[2] || (l[2] = (a) => o.value = a),
134
- onClick: l[3] || (l[3] = (a) => {
135
- r("click"), L();
132
+ "keep-state": !n.value.length || l.keepState === "closed" ? "closed" : "opened",
133
+ "onUpdate:dropdownState": t[3] || (t[3] = (r) => o.value = r),
134
+ onClick: t[4] || (t[4] = (r) => {
135
+ a("click"), E();
136
136
  }),
137
137
  "close-when-clicked-outside": e.closeDropdownOnBodyPressed
138
138
  }, {
@@ -151,29 +151,30 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ P({
151
151
  "with-right-icon": !!e.$slots.righticon,
152
152
  "input-class": [M.value, e.$attrs["input-classes"]],
153
153
  "fieldset-classes": [I.value, e.$attrs["fieldset-classes"]],
154
- "onUpdate:modelValue": l[0] || (l[0] = (a) => T(a === void 0 ? "" : `${a}`)),
155
- onKeydown: l[1] || (l[1] = (a) => r("keydown", a))
154
+ "onUpdate:modelValue": t[0] || (t[0] = (r) => D(r === void 0 ? "" : `${r}`)),
155
+ onKeydown: t[1] || (t[1] = (r) => a("keydown", r)),
156
+ onKeydownEnterPressed: t[2] || (t[2] = () => a("keydownEnterPressed"))
156
157
  }, {
157
158
  leftIcon: c(() => [
158
159
  B(e.$slots, "lefticon")
159
160
  ]),
160
- righticon: c(({ handleClean: a }) => [
161
- B(e.$slots, "righticon", { handleClean: a })
161
+ righticon: c(({ handleClean: r }) => [
162
+ B(e.$slots, "righticon", { handleClean: r })
162
163
  ]),
163
164
  _: 3
164
165
  }, 8, ["id", "data-cy", "label-text", "model-value", "is-valid", "disabled", "placeholder", "with-left-icon", "with-right-icon", "input-class", "fieldset-classes"])
165
166
  ]),
166
167
  default: c(() => [
167
- (y(!0), U(A, null, F(n.value, (a, b) => (y(), V(J, {
168
+ (y(!0), U(A, null, F(n.value, (r, b) => (y(), V(J, {
168
169
  key: b,
169
170
  active: W(w) === b,
170
171
  class: "uikit-m-1 uikit-rounded-[5px] uikit-px-5 uikit-py-10px hover:uikit-cursor-pointer",
171
- onClick: (H) => $(a, b),
172
- onMouseover: (H) => w.value = b
172
+ onClick: (T) => $(r, b),
173
+ onMouseover: (T) => w.value = b
173
174
  }, {
174
175
  default: c(() => [
175
176
  j("span", {
176
- innerHTML: a.label
177
+ innerHTML: r.label
177
178
  }, null, 8, X)
178
179
  ]),
179
180
  _: 2
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ import SelectItem from './UIKit/BaseSelect/SelectItem.vue';
6
6
  import CheckboxBtn from './UIKit/Checkbox/CheckboxBtn.vue';
7
7
  import CheckboxGroup from './UIKit/Checkbox/CheckboxGroup.vue';
8
8
  import BaseTab from './UIKit/Tab/BaseTab.vue';
9
- import BaseTabList from './UIKit/Tab/BaseTabView.vue';
9
+ import BaseTabView from './UIKit/Tab/BaseTabView.vue';
10
10
  import RadioButton from './UIKit/Radio/RadioButton.vue';
11
11
  import RadioGroup from './UIKit/Radio/RadioGroup.vue';
12
12
  import AccessibleSelect from './UIKit/AccessibleSelect.vue';
@@ -38,4 +38,4 @@ import SwiperCarousel from './components/carousel/SwiperCarousel.vue';
38
38
  import SwiperSlide from './components/carousel/SwiperSlide.vue';
39
39
  import { useValidator } from './composables/useValidator';
40
40
  export type { ChartOptions, ChartData } from "chart.js";
41
- export { DoughnutChart, LineChart, BaseAccordion, BaseAccordionBtn, BaseAccordionContent, BaseAccordionItem, SelectItem, BaseAlert, BaseAutocomplete, BaseBadge, BaseButton, AccessibleSelect, BaseComplexToggle, BaseDropDown, BaseFloatingLabel, BaseCard, BaseIcon, BaseInput, BaseNavItem, BasePagination, BasePaper, BaseSlider, BaseTab, BaseTextarea, BaseToggle, BaseTooltip, BaseUploadFile, CheckboxBtn, CheckboxGroup, RadioButton, RadioGroup, SwiperCarousel, SwiperSlide, IntersectionObservable, IntersectionObserver, useValidator, BaseModal, BaseSnackbar, BaseTabList, };
41
+ export { DoughnutChart, LineChart, BaseAccordion, BaseAccordionBtn, BaseAccordionContent, BaseAccordionItem, SelectItem, BaseAlert, BaseAutocomplete, BaseBadge, BaseButton, AccessibleSelect, BaseComplexToggle, BaseDropDown, BaseFloatingLabel, BaseCard, BaseIcon, BaseInput, BaseNavItem, BasePagination, BasePaper, BaseSlider, BaseTab, BaseTextarea, BaseToggle, BaseTooltip, BaseUploadFile, CheckboxBtn, CheckboxGroup, RadioButton, RadioGroup, SwiperCarousel, SwiperSlide, IntersectionObservable, IntersectionObserver, useValidator, BaseModal, BaseSnackbar, BaseTabView, };
package/dist/index.js CHANGED
@@ -11,13 +11,13 @@ import { _ as b } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang
11
11
  import { _ as C } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang.DR6a7QAi.js";
12
12
  import { _ as I } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.DTUA_Q5e.js";
13
13
  import { _ as T } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.5pqk7vlZ.js";
14
- import { _ as k } from "./chunks/BaseAlert.vue_vue_type_style_index_0_lang.BtqP_iYL.js";
15
- import { _ as w } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.DyNyXytE.js";
16
- import { _ as L } from "./chunks/BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js";
17
- import { _ as G } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.BwONsejV.js";
14
+ import { _ as w } from "./chunks/BaseAlert.vue_vue_type_style_index_0_lang.BtqP_iYL.js";
15
+ import { _ as v } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.qS_LdstC.js";
16
+ import { _ as F } from "./chunks/BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js";
17
+ import { _ as L } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.BwONsejV.js";
18
18
  import { _ as P } from "./chunks/BaseCard.vue_vue_type_style_index_0_lang.w5aEohzG.js";
19
- import { default as M } from "./BaseComplexToggle.js";
20
- import { _ as U } from "./chunks/BaseDropDown.vue_vue_type_script_setup_true_lang.BRcL69nu.js";
19
+ import { default as V } from "./BaseComplexToggle.js";
20
+ import { _ as N } from "./chunks/BaseDropDown.vue_vue_type_script_setup_true_lang.BRcL69nu.js";
21
21
  import { default as j } from "./BaseFloatingLabel.js";
22
22
  import { default as y } from "./BaseIcon.js";
23
23
  import { default as E } from "./BaseInput.js";
@@ -44,13 +44,13 @@ export {
44
44
  t as BaseAccordionBtn,
45
45
  f as BaseAccordionContent,
46
46
  m as BaseAccordionItem,
47
- k as BaseAlert,
48
- w as BaseAutocomplete,
49
- L as BaseBadge,
50
- G as BaseButton,
47
+ w as BaseAlert,
48
+ v as BaseAutocomplete,
49
+ F as BaseBadge,
50
+ L as BaseButton,
51
51
  P as BaseCard,
52
- M as BaseComplexToggle,
53
- U as BaseDropDown,
52
+ V as BaseComplexToggle,
53
+ N as BaseDropDown,
54
54
  j as BaseFloatingLabel,
55
55
  y as BaseIcon,
56
56
  E as BaseInput,
@@ -61,7 +61,7 @@ export {
61
61
  Z as BaseSlider,
62
62
  le as BaseSnackbar,
63
63
  i as BaseTab,
64
- b as BaseTabList,
64
+ b as BaseTabView,
65
65
  ee as BaseTextarea,
66
66
  ae as BaseToggle,
67
67
  te as BaseTooltip,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "1.7.21",
3
+ "version": "1.7.23",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",