@wikicasa-dev/components 2.2.9-alpha.5 → 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.
- package/dist/Swiper/autoplay.js +1 -1
- package/dist/Swiper/controller.js +1 -1
- package/dist/Swiper/keyboard.js +1 -1
- package/dist/Swiper/thumbs.js +1 -1
- package/dist/UIKit/AccessibleSelect.d.ts +4 -4
- package/dist/UIKit/AccessibleSelect.js +3 -2
- package/dist/UIKit/Autocomplete/ClearableAutocomplete.d.ts +9 -3
- package/dist/UIKit/BaseAutocomplete.d.ts +4 -4
- package/dist/UIKit/BaseButton.d.ts +14 -8
- package/dist/UIKit/BaseCard.js +1 -3
- package/dist/UIKit/BaseDropDown.d.ts +17 -11
- package/dist/UIKit/BaseFloatingLabel.js +4 -4
- package/dist/UIKit/BaseInput.d.ts +3 -2
- package/dist/UIKit/BaseInput.js +1 -1
- package/dist/UIKit/BaseTextarea.d.ts +2 -2
- package/dist/assets/AccessibleSelect.css +1 -0
- package/dist/assets/BaseCard.css +1 -1
- package/dist/assets/BaseDropDown.css +1 -1
- package/dist/assets/BaseFloatingLabel.css +1 -1
- package/dist/assets/BaseInput.css +1 -1
- package/dist/assets/tailwind.css +1 -1
- package/dist/composables/mock.d.ts +25 -0
- package/dist/composables/mock.js +49 -0
- package/dist/index.js +85 -83
- package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +151 -157
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js +4 -6
- package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +120 -99
- package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +36 -36
- package/dist/packages/components/lib/UIKit/BaseButton.vue.js +28 -24
- package/dist/packages/components/lib/UIKit/BaseCard.vue.js +13 -13
- package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +102 -105
- package/dist/packages/components/lib/UIKit/BaseFloatingLabel.vue.js +8 -8
- package/dist/packages/components/lib/UIKit/BaseInput.vue.js +74 -73
- package/dist/packages/components/lib/UIKit/BaseModal.vue.js +42 -36
- package/dist/packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js +18 -17
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +22 -24
- package/package.json +6 -5
- /package/dist/assets/{swiper-controller.css → swiper-autoplay.css} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as I, ref as n, useTemplateRef as T, onUnmounted as z, watch as H, createBlock as O, openBlock as
|
|
2
|
-
import { isWindows as
|
|
1
|
+
import { defineComponent as I, ref as n, useTemplateRef as T, onUnmounted as z, watch as H, createBlock as O, openBlock as m, Teleport as $, createElementVNode as a, normalizeClass as s, createElementBlock as y, createCommentVNode as h, renderSlot as d, withModifiers as D, createVNode as F, unref as K, nextTick as N } from "vue";
|
|
2
|
+
import { isWindows as g, awaitableSetTimeout as S } from "@wikicasa-dev/utilities";
|
|
3
3
|
import { CloseIcon as V } from "@wikicasa-dev/svg-icons";
|
|
4
|
-
const
|
|
4
|
+
const P = ["id", "data-cy"], U = ["innerHTML"], j = /* @__PURE__ */ I({
|
|
5
5
|
__name: "BaseModal",
|
|
6
6
|
props: {
|
|
7
7
|
id: { default: "base-bt-modal" },
|
|
@@ -24,25 +24,25 @@ const F = ["id", "data-cy"], U = ["innerHTML"], R = /* @__PURE__ */ I({
|
|
|
24
24
|
titleClasses: {}
|
|
25
25
|
},
|
|
26
26
|
emits: ["closed", "opened", "dialogClick"],
|
|
27
|
-
setup(e, { emit:
|
|
28
|
-
const c =
|
|
27
|
+
setup(e, { emit: w }) {
|
|
28
|
+
const c = w, i = n(!1), r = n(null), l = T("modalDialog"), k = n(!1), u = n(!1), f = ({ key: t }) => {
|
|
29
29
|
t === "Escape" && o();
|
|
30
|
-
},
|
|
30
|
+
}, C = () => {
|
|
31
31
|
document?.body.addEventListener("keydown", f);
|
|
32
32
|
}, b = () => {
|
|
33
33
|
document?.body.removeEventListener("keydown", f);
|
|
34
|
-
},
|
|
34
|
+
}, x = async () => {
|
|
35
35
|
i.value = !0, N(() => {
|
|
36
|
-
|
|
36
|
+
C(), g() ? document?.body.classList.add("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.add("uikit-no-scrolling");
|
|
37
37
|
}), c("opened"), e.autoClose !== void 0 && setTimeout(() => {
|
|
38
38
|
o();
|
|
39
39
|
}, e.autoClose);
|
|
40
|
+
}, p = (t) => {
|
|
41
|
+
l.value && l.value.contains(t.target) && (u.value = !0);
|
|
40
42
|
}, M = (t) => {
|
|
41
|
-
|
|
42
|
-
}, B = (t) => {
|
|
43
|
-
|
|
44
|
-
}, L = async () => {
|
|
45
|
-
if (e.closeOnClickOut) {
|
|
43
|
+
l.value && l.value.contains(t.target) && (u.value = !1);
|
|
44
|
+
}, B = async (t) => {
|
|
45
|
+
if (!r.value?.contains(t.target) && e.closeOnClickOut) {
|
|
46
46
|
if (u.value) {
|
|
47
47
|
u.value = !1;
|
|
48
48
|
return;
|
|
@@ -51,21 +51,25 @@ const F = ["id", "data-cy"], U = ["innerHTML"], R = /* @__PURE__ */ I({
|
|
|
51
51
|
}
|
|
52
52
|
}, o = async () => {
|
|
53
53
|
i.value = !1, b(), document?.documentElement.classList.remove("uikit-no-scrolling"), navigator.userAgent.includes("Windows") ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling"), await S(() => {
|
|
54
|
-
|
|
54
|
+
r.value?.classList.add("uikit-hidden"), c("closed");
|
|
55
55
|
}, 250);
|
|
56
56
|
};
|
|
57
|
-
|
|
58
|
-
b(), document?.documentElement.classList.remove("uikit-no-scrolling"),
|
|
57
|
+
z(() => {
|
|
58
|
+
b(), document?.documentElement.classList.remove("uikit-no-scrolling"), g() ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling");
|
|
59
59
|
}), H(
|
|
60
60
|
() => e.showModal,
|
|
61
61
|
async (t) => {
|
|
62
|
-
!t && !i.value ? k.value = !0 : k.value = !1, t && !i.value && await
|
|
62
|
+
!t && !i.value ? k.value = !0 : k.value = !1, t && !i.value && await x(), !t && i.value && await o(), i.value = t;
|
|
63
63
|
},
|
|
64
64
|
{ immediate: !0 }
|
|
65
|
-
)
|
|
66
|
-
|
|
65
|
+
);
|
|
66
|
+
const L = (t) => {
|
|
67
|
+
l.value === t.target && t.stopPropagation();
|
|
68
|
+
};
|
|
69
|
+
return (t, v) => (m(), O($, { to: "body" }, [
|
|
70
|
+
a("div", {
|
|
67
71
|
ref_key: "backdropEl",
|
|
68
|
-
ref:
|
|
72
|
+
ref: r,
|
|
69
73
|
class: s(["bbt-backdrop uikit-fixed uikit-left-0 uikit-top-0 uikit-h-full uikit-w-full", [
|
|
70
74
|
e.customBackdropClasses,
|
|
71
75
|
{
|
|
@@ -76,11 +80,11 @@ const F = ["id", "data-cy"], U = ["innerHTML"], R = /* @__PURE__ */ I({
|
|
|
76
80
|
{ hide: k.value }
|
|
77
81
|
]]),
|
|
78
82
|
style: { "z-index": "1062" },
|
|
79
|
-
onClick:
|
|
80
|
-
onMousedown:
|
|
81
|
-
onMouseup:
|
|
83
|
+
onClick: B,
|
|
84
|
+
onMousedown: p,
|
|
85
|
+
onMouseup: M
|
|
82
86
|
}, [
|
|
83
|
-
|
|
87
|
+
a("dialog", {
|
|
84
88
|
id: e.id,
|
|
85
89
|
ref: "modalDialog",
|
|
86
90
|
"data-cy": e.dataCy,
|
|
@@ -94,50 +98,52 @@ const F = ["id", "data-cy"], U = ["innerHTML"], R = /* @__PURE__ */ I({
|
|
|
94
98
|
`base-${e.size}`,
|
|
95
99
|
e.fullHeight ? "uikit-h-[95%]" : "uikit-h-auto"
|
|
96
100
|
]]),
|
|
97
|
-
|
|
101
|
+
tabindex: "-1",
|
|
102
|
+
onClick: v[0] || (v[0] = (E) => c("dialogClick", E)),
|
|
103
|
+
onFocusin: L
|
|
98
104
|
}, [
|
|
99
|
-
|
|
105
|
+
a("div", {
|
|
100
106
|
class: s(["default-header uikit-sticky uikit-top-0 uikit-z-10 uikit-rounded-t uikit-border-0 uikit-bg-white uikit-px-4 uikit-pb-10px uikit-pt-20px sm:uikit-px-6", [e.customModalHeaderClasses]])
|
|
101
107
|
}, [
|
|
102
|
-
e.withCloseIcon ? (
|
|
108
|
+
e.withCloseIcon ? (m(), y("button", {
|
|
103
109
|
key: 0,
|
|
104
110
|
id: "close-icon-btn",
|
|
105
111
|
"data-cy": "bbt-default-close-icon-btn",
|
|
106
112
|
class: s(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent uikit-p-5px", e.closeIconBtnClasses]),
|
|
107
113
|
type: "button",
|
|
108
114
|
"aria-label": "Close",
|
|
109
|
-
onClick:
|
|
115
|
+
onClick: D(o, ["prevent", "stop"])
|
|
110
116
|
}, [
|
|
111
|
-
|
|
117
|
+
F(K(V), {
|
|
112
118
|
class: s(["bbt-close-icon uikit-box-border", e.closeIcon?.classes]),
|
|
113
119
|
width: e.closeIcon?.size || 20,
|
|
114
120
|
height: e.closeIcon?.size || 20
|
|
115
121
|
}, null, 8, ["class", "width", "height"])
|
|
116
|
-
], 2)) :
|
|
122
|
+
], 2)) : h("", !0),
|
|
117
123
|
d(t.$slots, "header", { closeModal: o }, () => [
|
|
118
|
-
|
|
124
|
+
a("span", {
|
|
119
125
|
class: s(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", e.titleClasses]),
|
|
120
126
|
innerHTML: e.headerTitle
|
|
121
127
|
}, null, 10, U)
|
|
122
128
|
])
|
|
123
129
|
], 2),
|
|
124
|
-
|
|
130
|
+
a("div", {
|
|
125
131
|
class: s(["uikit-bbt-body uikit-flex-auto uikit-overflow-y-auto uikit-overflow-x-hidden uikit-px-4 uikit-pb-0 uikit-no-scrollbar sm:uikit-px-6 sm:uikit-pb-25px", [e.customModalBodyClasses]])
|
|
126
132
|
}, [
|
|
127
133
|
d(t.$slots, "body", { closeModal: o })
|
|
128
134
|
], 2),
|
|
129
|
-
t.$slots.footer ? (
|
|
135
|
+
t.$slots.footer ? (m(), y("div", {
|
|
130
136
|
key: 0,
|
|
131
137
|
class: s(["uikit-bbt-footer uikit-sticky uikit-bottom-0 uikit-border-0 uikit-bg-white uikit-px-4 uikit-py-15px sm:uikit-px-6", e.customModalFooterClasses])
|
|
132
138
|
}, [
|
|
133
139
|
d(t.$slots, "footer", { closeModal: o })
|
|
134
|
-
], 2)) :
|
|
140
|
+
], 2)) : h("", !0),
|
|
135
141
|
d(t.$slots, "fixed-bottom")
|
|
136
|
-
],
|
|
142
|
+
], 42, P)
|
|
137
143
|
], 34)
|
|
138
144
|
]));
|
|
139
145
|
}
|
|
140
146
|
});
|
|
141
147
|
export {
|
|
142
|
-
|
|
148
|
+
j as default
|
|
143
149
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as u, useTemplateRef as
|
|
2
|
-
const
|
|
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(
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
() =>
|
|
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 &&
|
|
16
|
-
|
|
15
|
+
e && m(() => {
|
|
16
|
+
n.value && n.value.focus();
|
|
17
17
|
});
|
|
18
18
|
},
|
|
19
19
|
{ immediate: !0 }
|
|
20
|
-
), (e,
|
|
20
|
+
), (e, l) => (f(), r("li", {
|
|
21
21
|
ref: "liItem",
|
|
22
|
-
class:
|
|
23
|
-
{ "active uikit-bg-w-cultured":
|
|
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:
|
|
29
|
-
onMouseover:
|
|
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
|
-
|
|
32
|
+
k(e.$slots, "default", { itemIdx: t.idx }, () => [
|
|
32
33
|
x("span", {
|
|
33
|
-
innerHTML:
|
|
34
|
-
}, null, 8,
|
|
34
|
+
innerHTML: i.label
|
|
35
|
+
}, null, 8, p)
|
|
35
36
|
])
|
|
36
|
-
], 42,
|
|
37
|
+
], 42, b));
|
|
37
38
|
}
|
|
38
39
|
});
|
|
39
40
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { CheckIcon as
|
|
3
|
-
import { CheckboxRoot as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as s, useId as m, watch as f, createElementBlock as h, openBlock as d, createVNode as o, renderSlot as b, unref as i, normalizeClass as C, withCtx as u, createBlock as x, createCommentVNode as y, createTextVNode as V, toDisplayString as g } from "vue";
|
|
2
|
+
import { CheckIcon as B } from "@wikicasa-dev/svg-icons";
|
|
3
|
+
import { CheckboxRoot as p, CheckboxIndicator as w } from "reka-ui";
|
|
4
|
+
const z = /* @__PURE__ */ s({
|
|
5
5
|
__name: "CheckboxBtn",
|
|
6
6
|
props: {
|
|
7
7
|
id: {},
|
|
@@ -15,9 +15,9 @@ const N = ["for"], j = /* @__PURE__ */ m({
|
|
|
15
15
|
modelValue: { type: Boolean, default: !1 }
|
|
16
16
|
},
|
|
17
17
|
emits: ["click", "update:modelValue", "change"],
|
|
18
|
-
setup(e, { emit:
|
|
19
|
-
const
|
|
20
|
-
|
|
18
|
+
setup(e, { emit: c }) {
|
|
19
|
+
const n = m(), a = c;
|
|
20
|
+
f(
|
|
21
21
|
() => e.checked,
|
|
22
22
|
(t) => {
|
|
23
23
|
t !== void 0 && a("update:modelValue", t);
|
|
@@ -25,22 +25,20 @@ const N = ["for"], j = /* @__PURE__ */ m({
|
|
|
25
25
|
);
|
|
26
26
|
const k = (t) => {
|
|
27
27
|
t !== "indeterminate" && (a("change", {
|
|
28
|
-
id: e.id ??
|
|
28
|
+
id: e.id ?? n,
|
|
29
29
|
label: e.label,
|
|
30
30
|
checked: t
|
|
31
31
|
}), a("update:modelValue", t));
|
|
32
32
|
};
|
|
33
|
-
return (t,
|
|
33
|
+
return (t, l) => (d(), h("label", {
|
|
34
34
|
class: "uikit-checkbox-btn uikit-flex uikit-items-center uikit-gap-[12px]",
|
|
35
|
-
|
|
36
|
-
onClick: o[0] || (o[0] = (s) => a("click", s))
|
|
35
|
+
onClick: l[0] || (l[0] = (r) => a("click", r))
|
|
37
36
|
}, [
|
|
38
|
-
|
|
39
|
-
id: d.value,
|
|
37
|
+
o(i(p), {
|
|
40
38
|
"model-value": e.modelValue,
|
|
41
39
|
"data-cy": e.dataCy,
|
|
42
40
|
disabled: e.disabled,
|
|
43
|
-
class:
|
|
41
|
+
class: C(["uikit-inline-flex uikit-size-[20px] uikit-shrink-0 uikit-items-center uikit-justify-center uikit-rounded-[4px] uikit-p-0 data-[state='unchecked']:uikit-border data-[state='unchecked']:uikit-border-solid data-[state='unchecked']:uikit-border-w-lightgray", [
|
|
44
42
|
{
|
|
45
43
|
"uikit-bg-white": !e.modelValue,
|
|
46
44
|
"uikit-bg-w-primary": e.modelValue
|
|
@@ -49,27 +47,27 @@ const N = ["for"], j = /* @__PURE__ */ m({
|
|
|
49
47
|
]]),
|
|
50
48
|
"onUpdate:modelValue": k
|
|
51
49
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
|
|
54
|
-
default:
|
|
55
|
-
e.modelValue === !0 ? (
|
|
50
|
+
default: u(() => [
|
|
51
|
+
o(i(w), { class: "uikit-flex" }, {
|
|
52
|
+
default: u(() => [
|
|
53
|
+
e.modelValue === !0 ? (d(), x(i(B), {
|
|
56
54
|
key: 0,
|
|
57
55
|
"fill-color": "#fff",
|
|
58
56
|
width: 12,
|
|
59
57
|
height: 14
|
|
60
|
-
})) :
|
|
58
|
+
})) : y("", !0)
|
|
61
59
|
]),
|
|
62
60
|
_: 1
|
|
63
61
|
})
|
|
64
62
|
]),
|
|
65
63
|
_: 1
|
|
66
|
-
}, 8, ["
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
}, 8, ["model-value", "data-cy", "disabled", "class"]),
|
|
65
|
+
b(t.$slots, "label", {}, () => [
|
|
66
|
+
V(g(e.label), 1)
|
|
69
67
|
])
|
|
70
|
-
]
|
|
68
|
+
]));
|
|
71
69
|
}
|
|
72
70
|
});
|
|
73
71
|
export {
|
|
74
|
-
|
|
72
|
+
z as default
|
|
75
73
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wikicasa-dev/components",
|
|
3
|
-
"version": "2.2.9-alpha.
|
|
3
|
+
"version": "2.2.9-alpha.50",
|
|
4
4
|
"description": "Wikicasa frontend components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"default": "./dist/index.js"
|
|
18
18
|
},
|
|
19
19
|
"./style": "./dist/assets/tailwind.css",
|
|
20
|
+
"./css/*": "./dist/assets/*.css",
|
|
20
21
|
"./generic/*": {
|
|
21
22
|
"import": "./dist/components/*.js",
|
|
22
23
|
"types": "./dist/components/*.d.ts"
|
|
@@ -43,8 +44,8 @@
|
|
|
43
44
|
"peerDependencies": {
|
|
44
45
|
"vue": "^3.5.0",
|
|
45
46
|
"date-fns": "^4.0.0",
|
|
46
|
-
"@wikicasa-dev/svg-icons": "^1.2.
|
|
47
|
-
"@wikicasa-dev/vue-composables": "
|
|
47
|
+
"@wikicasa-dev/svg-icons": "^1.2.28-alpha.1",
|
|
48
|
+
"@wikicasa-dev/vue-composables": "0.0.33-alpha.2",
|
|
48
49
|
"@wikicasa-dev/types": "^2.4.0",
|
|
49
50
|
"@wikicasa-dev/utilities": "^1.2.0"
|
|
50
51
|
},
|
|
@@ -63,8 +64,8 @@
|
|
|
63
64
|
"@vitejs/plugin-vue": "^6.0.2",
|
|
64
65
|
"@vue/eslint-config-prettier": "^10.2.0",
|
|
65
66
|
"@vue/eslint-config-typescript": "^14.6.0",
|
|
66
|
-
"@wikicasa-dev/svg-icons": "1.2.
|
|
67
|
-
"@wikicasa-dev/vue-composables": "0.0.
|
|
67
|
+
"@wikicasa-dev/svg-icons": "1.2.28-alpha.1",
|
|
68
|
+
"@wikicasa-dev/vue-composables": "0.0.33-alpha.2",
|
|
68
69
|
"@wikicasa-dev/tailwind-plugins": "^0.0.3",
|
|
69
70
|
"@wikicasa-dev/types": "2.4.6",
|
|
70
71
|
"@wikicasa-dev/utilities": "1.2.0",
|
|
File without changes
|