@wikicasa-dev/components 1.3.1 → 1.3.3
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.
- package/dist/BaseAutocomplete.js +1 -1
- package/dist/BaseDropDown.js +1 -1
- package/dist/SelectItem.js +1 -1
- package/dist/UIKit/BaseAutocomplete.vue.d.ts +13 -4
- package/dist/UIKit/Radio/RadioGroup.vue.d.ts +2 -0
- package/dist/chunks/{BaseAutocomplete.vue_vue_type_script_setup_true_lang.KqJ6OB8f.js → BaseAutocomplete.vue_vue_type_script_setup_true_lang.CZDTP9DW.js} +14 -13
- package/dist/chunks/{BaseDropDown.vue_vue_type_script_setup_true_lang.C4VH7V0e.js → BaseDropDown.vue_vue_type_script_setup_true_lang.BTIpnAy4.js} +1 -1
- package/dist/chunks/{SelectItem.vue_vue_type_script_setup_true_lang.BOLdDTLM.js → SelectItem.vue_vue_type_script_setup_true_lang.Colhxc7n.js} +1 -1
- package/dist/index.js +3 -3
- package/package.json +2 -2
package/dist/BaseAutocomplete.js
CHANGED
package/dist/BaseDropDown.js
CHANGED
package/dist/SelectItem.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccessibleSelectOptions, Nullable } from "@wikicasa-dev/types";
|
|
1
|
+
import { AccessibleSelectOptions, Nullable, BaseAutocompleteThemes } from "@wikicasa-dev/types";
|
|
2
2
|
type ModelValueType<T = unknown> = AccessibleSelectOptions<T>;
|
|
3
3
|
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
4
4
|
modelValue: import("vue").PropType<ModelValueType<unknown> | undefined>;
|
|
@@ -11,13 +11,17 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
11
11
|
default: null;
|
|
12
12
|
};
|
|
13
13
|
theme: {
|
|
14
|
-
type: import("vue").PropType<
|
|
14
|
+
type: import("vue").PropType<BaseAutocompleteThemes>;
|
|
15
15
|
default: string;
|
|
16
16
|
};
|
|
17
17
|
border: {
|
|
18
18
|
type: import("vue").PropType<boolean>;
|
|
19
19
|
default: boolean;
|
|
20
20
|
};
|
|
21
|
+
dropdownClasses: {
|
|
22
|
+
type: import("vue").PropType<string>;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
21
25
|
keepState: {
|
|
22
26
|
type: import("vue").PropType<Nullable<"closed" | "open">>;
|
|
23
27
|
default: null;
|
|
@@ -56,13 +60,17 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
56
60
|
default: null;
|
|
57
61
|
};
|
|
58
62
|
theme: {
|
|
59
|
-
type: import("vue").PropType<
|
|
63
|
+
type: import("vue").PropType<BaseAutocompleteThemes>;
|
|
60
64
|
default: string;
|
|
61
65
|
};
|
|
62
66
|
border: {
|
|
63
67
|
type: import("vue").PropType<boolean>;
|
|
64
68
|
default: boolean;
|
|
65
69
|
};
|
|
70
|
+
dropdownClasses: {
|
|
71
|
+
type: import("vue").PropType<string>;
|
|
72
|
+
default: string;
|
|
73
|
+
};
|
|
66
74
|
keepState: {
|
|
67
75
|
type: import("vue").PropType<Nullable<"closed" | "open">>;
|
|
68
76
|
default: null;
|
|
@@ -91,8 +99,9 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
|
|
91
99
|
}, {
|
|
92
100
|
label: string;
|
|
93
101
|
isValid: Nullable<boolean>;
|
|
94
|
-
theme:
|
|
102
|
+
theme: BaseAutocompleteThemes;
|
|
95
103
|
border: boolean;
|
|
104
|
+
dropdownClasses: string;
|
|
96
105
|
keepState: Nullable<"closed" | "open">;
|
|
97
106
|
disableCb: boolean;
|
|
98
107
|
onOptionSelectedCb: Nullable<(v: AccessibleSelectOptions) => void>;
|
|
@@ -26,6 +26,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
26
26
|
activeValue: {
|
|
27
27
|
id?: string | number | null | undefined;
|
|
28
28
|
label: string | number;
|
|
29
|
+
payload?: unknown;
|
|
29
30
|
} | null;
|
|
30
31
|
reset: () => void;
|
|
31
32
|
isActive: (elem: RadioButtonType) => boolean;
|
|
@@ -35,6 +36,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
|
|
|
35
36
|
activeValue: {
|
|
36
37
|
id?: string | number | null | undefined;
|
|
37
38
|
label: string | number;
|
|
39
|
+
payload?: unknown;
|
|
38
40
|
} | null;
|
|
39
41
|
reset: () => void;
|
|
40
42
|
isActive: (elem: RadioButtonType) => boolean;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { defineComponent as H, mergeModels as S, useModel as z, ref as s, computed as
|
|
1
|
+
import { defineComponent as H, mergeModels as S, useModel as z, ref as s, computed as f, onBeforeMount as E, watch as C, openBlock as g, createBlock as V, normalizeClass as J, withCtx as c, createVNode as K, renderSlot as B, createElementBlock as U, Fragment as A, renderList as F, unref as P, createElementVNode as W } from "vue";
|
|
2
2
|
import j from "../BaseInput.js";
|
|
3
|
-
import { _ as q } from "./BaseDropDown.vue_vue_type_script_setup_true_lang.
|
|
3
|
+
import { _ as q } from "./BaseDropDown.vue_vue_type_script_setup_true_lang.BTIpnAy4.js";
|
|
4
4
|
import "./js.cookie.BQua9eWh.js";
|
|
5
|
-
import { _ as G } from "./SelectItem.vue_vue_type_script_setup_true_lang.
|
|
5
|
+
import { _ as G } from "./SelectItem.vue_vue_type_script_setup_true_lang.Colhxc7n.js";
|
|
6
6
|
import { useKeyboardController as Q } from "../useKeyboardController.js";
|
|
7
|
-
function R(u,
|
|
7
|
+
function R(u, k) {
|
|
8
8
|
return (...v) => new Promise((t, n) => {
|
|
9
9
|
u.id && clearTimeout(u.id), u.id = setTimeout(() => {
|
|
10
10
|
try {
|
|
11
|
-
const i =
|
|
11
|
+
const i = k(...v);
|
|
12
12
|
t(i);
|
|
13
13
|
} catch (i) {
|
|
14
14
|
n(i);
|
|
@@ -27,7 +27,8 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ H({
|
|
|
27
27
|
onInputChangeCb: {},
|
|
28
28
|
onOptionSelectedCb: { default: null },
|
|
29
29
|
keepState: { default: null },
|
|
30
|
-
cleanupOnClose: { type: Boolean, default: !0 }
|
|
30
|
+
cleanupOnClose: { type: Boolean, default: !0 },
|
|
31
|
+
dropdownClasses: { default: "" }
|
|
31
32
|
}, {
|
|
32
33
|
modelValue: {
|
|
33
34
|
default() {
|
|
@@ -37,8 +38,8 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ H({
|
|
|
37
38
|
modelModifiers: {}
|
|
38
39
|
}),
|
|
39
40
|
emits: /* @__PURE__ */ S(["dropdownClosed", "changedValue", "click", "keydown"], ["update:modelValue"]),
|
|
40
|
-
setup(u, { expose:
|
|
41
|
-
const t = u, n = z(u, "modelValue"), i = v, d = s(""), a = s([]), m = s(null), p = s(!1), l = s(!1), y = s(null), O =
|
|
41
|
+
setup(u, { expose: k, emit: v }) {
|
|
42
|
+
const t = u, n = z(u, "modelValue"), i = v, d = s(""), a = s([]), m = s(null), p = s(!1), l = s(!1), y = s(null), O = f(() => a.value.length);
|
|
42
43
|
E(() => {
|
|
43
44
|
d.value = n.value?.label || "", m.value = R({ delay: 300 }, t.onInputChangeCb);
|
|
44
45
|
});
|
|
@@ -46,7 +47,7 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ H({
|
|
|
46
47
|
optionsLength: O,
|
|
47
48
|
isDropdownOpen: l,
|
|
48
49
|
disableSpaceHandler: !0
|
|
49
|
-
}), M =
|
|
50
|
+
}), M = f(() => {
|
|
50
51
|
switch (t.theme) {
|
|
51
52
|
case "bordered":
|
|
52
53
|
return "";
|
|
@@ -57,7 +58,7 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ H({
|
|
|
57
58
|
default:
|
|
58
59
|
return "";
|
|
59
60
|
}
|
|
60
|
-
}), I =
|
|
61
|
+
}), I = f(() => {
|
|
61
62
|
switch (t.theme) {
|
|
62
63
|
case "bordered":
|
|
63
64
|
return "";
|
|
@@ -68,7 +69,7 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ H({
|
|
|
68
69
|
default:
|
|
69
70
|
return "";
|
|
70
71
|
}
|
|
71
|
-
}), T =
|
|
72
|
+
}), T = f(() => {
|
|
72
73
|
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";
|
|
73
74
|
switch (t.theme) {
|
|
74
75
|
case "bordered":
|
|
@@ -105,7 +106,7 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ H({
|
|
|
105
106
|
(e) => {
|
|
106
107
|
e === "closed" ? l.value = !1 : e === "open" && a.value.length && (l.value = !0), t.cleanupOnClose && (a.value = []), i("dropdownClosed", l.value);
|
|
107
108
|
}
|
|
108
|
-
),
|
|
109
|
+
), k({
|
|
109
110
|
select: () => {
|
|
110
111
|
y.value?.select();
|
|
111
112
|
}
|
|
@@ -122,7 +123,7 @@ const X = ["innerHTML"], oe = /* @__PURE__ */ H({
|
|
|
122
123
|
},
|
|
123
124
|
T.value,
|
|
124
125
|
"!uikit-max-h-[210px] uikit-z-10",
|
|
125
|
-
e
|
|
126
|
+
e.dropdownClasses
|
|
126
127
|
],
|
|
127
128
|
"open-dropdown": l.value,
|
|
128
129
|
"keep-state": !a.value.length || t.keepState === "closed" ? "closed" : "opened",
|
|
@@ -88,7 +88,7 @@ const S = ["innerHTML"], M = /* @__PURE__ */ w({
|
|
|
88
88
|
id: "dropdown_" + e.id,
|
|
89
89
|
ref: "dropdown",
|
|
90
90
|
"data-cy": e.$attrs["data-cy"] && `${e.$attrs["data-cy"]}_dropdown`,
|
|
91
|
-
class: i(["uikit-max-h-[220px] uikit-w-full uikit-min-w-[90px] uikit-flex-col uikit-overflow-y-auto uikit-border uikit-border-solid uikit-border-w-lavender uikit-bg-white uikit-opacity-100 uikit-shadow uikit-no-scrollbar", [
|
|
91
|
+
class: i(["uikit-max-h-[220px] uikit-w-full uikit-min-w-[90px] uikit-flex-col uikit-overflow-y-auto uikit-border uikit-border-solid uikit-border-w-lavender uikit-bg-white uikit-pl-0 uikit-opacity-100 uikit-shadow uikit-no-scrollbar", [
|
|
92
92
|
e.dropdownClasses,
|
|
93
93
|
t.value ? "uikit-flex" : "uikit-hidden",
|
|
94
94
|
{ "uikit-bottom-[55px] uikit-rounded-xs": e.direction === "up" },
|
|
@@ -20,7 +20,7 @@ const b = ["tabindex"], x = ["innerHTML"], I = /* @__PURE__ */ r({
|
|
|
20
20
|
), (e, i) => (c(), f("li", {
|
|
21
21
|
ref_key: "liItem",
|
|
22
22
|
ref: l,
|
|
23
|
-
class: k(["uikit-text-w-black", [
|
|
23
|
+
class: k(["uikit-list-none uikit-text-w-black", [
|
|
24
24
|
{ "active uikit-bg-w-cultured": e.active },
|
|
25
25
|
"uikit-outline-none",
|
|
26
26
|
e.$attrs.class
|
package/dist/index.js
CHANGED
|
@@ -3,19 +3,19 @@ import { _ as a } from "./chunks/BaseAccordion.vue_vue_type_script_setup_true_la
|
|
|
3
3
|
import { _ as t } from "./chunks/BaseAccordionBtn.vue_vue_type_script_setup_true_lang.CrVwjQqr.js";
|
|
4
4
|
import { _ as f } from "./chunks/BaseAccordionContent.vue_vue_type_script_setup_true_lang.N7oILwdv.js";
|
|
5
5
|
import { _ as m } from "./chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.ofUooWrJ.js";
|
|
6
|
-
import { _ as l } from "./chunks/SelectItem.vue_vue_type_script_setup_true_lang.
|
|
6
|
+
import { _ as l } from "./chunks/SelectItem.vue_vue_type_script_setup_true_lang.Colhxc7n.js";
|
|
7
7
|
import { default as B } from "./CheckboxBtn.js";
|
|
8
8
|
import { _ as n } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.DDtN9_Bg.js";
|
|
9
9
|
import { _ as c } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang.DR6a7QAi.js";
|
|
10
10
|
import { _ as b } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.C-jm5z4e.js";
|
|
11
11
|
import { _ as A } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.lyHlWiC5.js";
|
|
12
12
|
import { _ as C } from "./chunks/BaseAlert.vue_vue_type_script_setup_true_lang.HqYdk4yE.js";
|
|
13
|
-
import { _ as T } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.
|
|
13
|
+
import { _ as T } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.CZDTP9DW.js";
|
|
14
14
|
import { _ as w } from "./chunks/BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js";
|
|
15
15
|
import { _ as k } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.BrJbAMJ8.js";
|
|
16
16
|
import { _ as F } from "./chunks/BaseCard.vue_vue_type_style_index_0_lang.w5aEohzG.js";
|
|
17
17
|
import { default as O } from "./BaseComplexToggle.js";
|
|
18
|
-
import { _ as R } from "./chunks/BaseDropDown.vue_vue_type_script_setup_true_lang.
|
|
18
|
+
import { _ as R } from "./chunks/BaseDropDown.vue_vue_type_script_setup_true_lang.BTIpnAy4.js";
|
|
19
19
|
import { default as M } from "./BaseFloatingLabel.js";
|
|
20
20
|
import { default as U } from "./BaseIcon.js";
|
|
21
21
|
import { default as j } from "./BaseInput.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "Wikicasa frontend components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@storybook/vue3-vite": "^8.0.2",
|
|
49
49
|
"@types/node": "^20.5.0",
|
|
50
50
|
"@vitejs/plugin-vue": "^5.0.4",
|
|
51
|
-
"@wikicasa-dev/types": "^1.0.
|
|
51
|
+
"@wikicasa-dev/types": "^1.0.4",
|
|
52
52
|
"@wikicasa-dev/utilities": "^0.2.1",
|
|
53
53
|
"@wikicasa-dev/svg-icons": "^0.0.1",
|
|
54
54
|
"@wikicasa-dev/vue-composables": "^0.0.3",
|