@wikicasa-dev/components 2.2.8-alpha.18 → 2.2.8-alpha.2
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/UIKit/Accordion/BaseAccordionItem.d.ts +1 -6
- package/dist/UIKit/BaseAutocomplete.d.ts +7 -7
- package/dist/UIKit/BaseDropDown.d.ts +1 -7
- package/dist/UIKit/BaseModal.d.ts +0 -4
- package/dist/UIKit/Checkbox/CheckboxBtn.d.ts +38 -34
- package/dist/UIKit/Checkbox/CheckboxGroup.d.ts +9 -6
- package/dist/assets/tailwind.css +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +77 -80
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js +25 -31
- package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +4 -1
- package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +61 -77
- package/dist/packages/components/lib/UIKit/BaseModal.vue.js +10 -11
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +2 -2
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +39 -41
- package/package.json +3 -3
- package/dist/UIKit/Autocomplete/ClearableAutocomplete.d.ts +0 -52
- package/dist/UIKit/Autocomplete/ClearableAutocomplete.js +0 -5
- package/dist/assets/ClearableAutocomplete.css +0 -1
- package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +0 -161
package/dist/index.js
CHANGED
|
@@ -1,92 +1,89 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import './assets/BaseSnackbar.css';import './assets/BaseModal.css';import './assets/BaseDropDown.css';import './assets/BaseBadge.css';import './assets/
|
|
6
|
-
import { default as
|
|
1
|
+
import { default as m } from "./packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js";
|
|
2
|
+
import { default as u } from "./packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js";
|
|
3
|
+
import { default as i } from "./packages/components/lib/UIKit/Accordion/BaseAccordionContent.vue.js";
|
|
4
|
+
import { default as n } from "./packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js";
|
|
5
|
+
import './assets/BaseSnackbar.css';import './assets/BaseModal.css';import './assets/BaseDropDown.css';import './assets/BaseBadge.css';import './assets/BaseAutocomplete.css';import './assets/BaseAlert.css';import './assets/BaseAccordionItem.css';/* empty css */
|
|
6
|
+
import { default as S } from "./packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js";
|
|
7
7
|
import { default as g } from "./packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js";
|
|
8
8
|
import { default as h } from "./packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js";
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
9
|
+
import { default as T } from "./packages/components/lib/UIKit/Tab/BaseTabView.vue.js";
|
|
10
|
+
import { default as w } from "./packages/components/lib/UIKit/Tab/BaseTab.vue.js";
|
|
11
|
+
import { default as k } from "./packages/components/lib/UIKit/Radio/RadioButton.vue.js";
|
|
12
|
+
import { default as v } from "./packages/components/lib/UIKit/Radio/RadioGroup.vue.js";
|
|
13
|
+
import { default as G } from "./packages/components/lib/UIKit/AccessibleSelect.vue.js";
|
|
14
|
+
import { default as O } from "./packages/components/lib/UIKit/BaseAlert.vue.js";
|
|
15
15
|
/* empty css */
|
|
16
|
-
import { default as
|
|
16
|
+
import { default as P } from "./packages/components/lib/UIKit/BaseAutocomplete.vue.js";
|
|
17
17
|
/* empty css */
|
|
18
|
-
import { default as
|
|
19
|
-
/* empty css */
|
|
20
|
-
import { default as y } from "./packages/components/lib/UIKit/BaseBadge.vue.js";
|
|
18
|
+
import { default as V } from "./packages/components/lib/UIKit/BaseBadge.vue.js";
|
|
21
19
|
/* empty css */
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
20
|
+
import { default as q } from "./packages/components/lib/UIKit/BaseButton.vue.js";
|
|
21
|
+
import { default as z } from "./UIKit/BaseCard.js";
|
|
22
|
+
import { default as H } from "./UIKit/BaseComplexToggle.js";
|
|
23
|
+
import { default as K } from "./packages/components/lib/UIKit/BaseDropDown.vue.js";
|
|
26
24
|
/* empty css */
|
|
27
|
-
import { default as
|
|
28
|
-
import { default as
|
|
29
|
-
import { default as
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
32
|
-
import { default as
|
|
33
|
-
import { default as
|
|
34
|
-
import { default as
|
|
35
|
-
import { default as
|
|
25
|
+
import { default as Q } from "./UIKit/BaseFloatingLabel.js";
|
|
26
|
+
import { default as X } from "./UIKit/BaseInput.js";
|
|
27
|
+
import { default as Z } from "./packages/components/lib/UIKit/BasePagination.vue.js";
|
|
28
|
+
import { default as $ } from "./UIKit/BaseSlider.js";
|
|
29
|
+
import { default as ae } from "./UIKit/BaseTextarea.js";
|
|
30
|
+
import { default as te } from "./UIKit/BaseToggle.js";
|
|
31
|
+
import { default as fe } from "./UIKit/BaseTooltip.js";
|
|
32
|
+
import { default as le } from "./packages/components/lib/UIKit/BaseUploadFile.vue.js";
|
|
33
|
+
import { default as me } from "./packages/components/lib/UIKit/BaseModal.vue.js";
|
|
36
34
|
/* empty css */
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
35
|
+
import { default as ue } from "./UIKit/StaticSpinner.js";
|
|
36
|
+
import { default as ie } from "./UIKit/ShimmerLoader/BaseShimmerLoader.js";
|
|
37
|
+
import { default as ne } from "./packages/components/lib/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js";
|
|
38
|
+
import { default as Se } from "./packages/components/lib/chart/DoughnutChart.vue.js";
|
|
39
|
+
import { default as ge } from "./packages/components/lib/chart/LineChart.vue.js";
|
|
40
|
+
import { default as he } from "./UIKit/Slider/SimpleSlider.js";
|
|
41
|
+
import { default as Te } from "./packages/components/lib/UIKit/BaseSnackbar.vue.js";
|
|
44
42
|
/* empty css */
|
|
45
|
-
import { default as
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
43
|
+
import { default as we } from "./packages/components/lib/components/IntersectionObserver/IntersectionObservable.vue.js";
|
|
44
|
+
import { default as ke } from "./packages/components/lib/components/IntersectionObserver/IntersectionObserver.vue.js";
|
|
45
|
+
import { default as ve } from "./components/carousel/SwiperCarousel.js";
|
|
46
|
+
import { default as Ge } from "./components/carousel/SwiperSlide.js";
|
|
47
|
+
import { default as Oe } from "./packages/components/lib/UIKit/BaseBreadcrumb.vue.js";
|
|
50
48
|
export {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
49
|
+
G as AccessibleSelect,
|
|
50
|
+
m as BaseAccordion,
|
|
51
|
+
u as BaseAccordionBtn,
|
|
52
|
+
i as BaseAccordionContent,
|
|
53
|
+
n as BaseAccordionItem,
|
|
54
|
+
O as BaseAlert,
|
|
55
|
+
P as BaseAutocomplete,
|
|
56
|
+
V as BaseBadge,
|
|
57
|
+
Oe as BaseBreadcrumb,
|
|
58
|
+
q as BaseButton,
|
|
59
|
+
z as BaseCard,
|
|
60
|
+
H as BaseComplexToggle,
|
|
61
|
+
K as BaseDropDown,
|
|
62
|
+
Q as BaseFloatingLabel,
|
|
63
|
+
X as BaseInput,
|
|
64
|
+
me as BaseModal,
|
|
65
|
+
Z as BasePagination,
|
|
66
|
+
ie as BaseShimmerLoader,
|
|
67
|
+
$ as BaseSlider,
|
|
68
|
+
Te as BaseSnackbar,
|
|
69
|
+
w as BaseTab,
|
|
70
|
+
T as BaseTabView,
|
|
71
|
+
ae as BaseTextarea,
|
|
72
|
+
te as BaseToggle,
|
|
73
|
+
fe as BaseTooltip,
|
|
74
|
+
le as BaseUploadFile,
|
|
77
75
|
g as CheckboxBtn,
|
|
78
76
|
h as CheckboxGroup,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Re as SwiperSlide
|
|
77
|
+
Se as DoughnutChart,
|
|
78
|
+
we as IntersectionObservable,
|
|
79
|
+
ke as IntersectionObserver,
|
|
80
|
+
ge as LineChart,
|
|
81
|
+
k as RadioButton,
|
|
82
|
+
v as RadioGroup,
|
|
83
|
+
S as SelectItem,
|
|
84
|
+
ne as ShimmerMultiLine,
|
|
85
|
+
he as SimpleSlider,
|
|
86
|
+
ue as StaticSpinner,
|
|
87
|
+
ve as SwiperCarousel,
|
|
88
|
+
Ge as SwiperSlide
|
|
92
89
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as n, inject as c, createBlock as u, openBlock as d, unref as t, withCtx as
|
|
2
|
-
import { AccordionItem as h, AccordionHeader as m, AccordionTrigger as
|
|
3
|
-
import { ArrowIcon as
|
|
1
|
+
import { defineComponent as n, inject as c, createBlock as u, openBlock as d, unref as t, withCtx as s, createVNode as a, renderSlot as r, normalizeClass as l, createTextVNode as k, toDisplayString as f } from "vue";
|
|
2
|
+
import { AccordionItem as h, AccordionHeader as m, AccordionTrigger as C, AccordionContent as w } from "reka-ui";
|
|
3
|
+
import { ArrowIcon as g } from "@wikicasa-dev/svg-icons";
|
|
4
4
|
const b = /* @__PURE__ */ n({
|
|
5
5
|
__name: "BaseAccordionItem",
|
|
6
6
|
props: {
|
|
@@ -12,8 +12,7 @@ const b = /* @__PURE__ */ n({
|
|
|
12
12
|
triggerClasses: {},
|
|
13
13
|
headerClasses: {},
|
|
14
14
|
contentClasses: {},
|
|
15
|
-
arrowClasses: {}
|
|
16
|
-
headerTag: { default: "h3" }
|
|
15
|
+
arrowClasses: {}
|
|
17
16
|
},
|
|
18
17
|
setup(e) {
|
|
19
18
|
const o = c("isActive");
|
|
@@ -21,32 +20,29 @@ const b = /* @__PURE__ */ n({
|
|
|
21
20
|
value: e.value,
|
|
22
21
|
"data-cy": e.dataCy
|
|
23
22
|
}, {
|
|
24
|
-
default:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
e.headerClasses,
|
|
29
|
-
"uikit-flex uikit-items-center uikit-justify-between"
|
|
30
|
-
])
|
|
23
|
+
default: s(() => [
|
|
24
|
+
a(t(m), {
|
|
25
|
+
class: "uikit-flex uikit-items-center uikit-justify-between",
|
|
26
|
+
"header-classes": e.headerClasses
|
|
31
27
|
}, {
|
|
32
|
-
default:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class:
|
|
28
|
+
default: s(() => [
|
|
29
|
+
r(i.$slots, "header-content"),
|
|
30
|
+
a(t(C), {
|
|
31
|
+
class: l([
|
|
36
32
|
e.triggerClasses,
|
|
37
33
|
{
|
|
38
34
|
"uikit-inline-flex uikit-cursor-pointer uikit-items-center uikit-justify-between uikit-border-0 uikit-bg-transparent uikit-px-[16px] uikit-py-[16px] uikit-text-left uikit-font-semibold": !i.$slots.trigger,
|
|
39
|
-
"uikit-w-full": !i.$slots
|
|
35
|
+
"uikit-w-full": !i.$slots.headerContent
|
|
40
36
|
}
|
|
41
37
|
])
|
|
42
38
|
}, {
|
|
43
|
-
default:
|
|
44
|
-
|
|
39
|
+
default: s(() => [
|
|
40
|
+
r(i.$slots, "trigger", {
|
|
45
41
|
active: t(o)(e.value)
|
|
46
42
|
}, () => [
|
|
47
|
-
f(
|
|
48
|
-
|
|
49
|
-
class:
|
|
43
|
+
k(f(e.title) + " ", 1),
|
|
44
|
+
a(t(g), {
|
|
45
|
+
class: l(["uikit-flex-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", [t(o)(e.value) ? "uikit-rotate-180" : "", e.arrowClasses]]),
|
|
50
46
|
"arrow-classes": e.arrowClasses,
|
|
51
47
|
width: e.arrowWidth,
|
|
52
48
|
height: e.arrowWidth
|
|
@@ -57,18 +53,16 @@ const b = /* @__PURE__ */ n({
|
|
|
57
53
|
}, 8, ["class"])
|
|
58
54
|
]),
|
|
59
55
|
_: 3
|
|
60
|
-
}, 8, ["
|
|
61
|
-
|
|
62
|
-
class:
|
|
63
|
-
|
|
64
|
-
"uikit-base-accordion-item-content uikit-px-[16px]"
|
|
65
|
-
])
|
|
56
|
+
}, 8, ["header-classes"]),
|
|
57
|
+
a(t(w), {
|
|
58
|
+
class: "uikit-base-accordion-item-content uikit-px-[16px]",
|
|
59
|
+
"content-classes": e.contentClasses
|
|
66
60
|
}, {
|
|
67
|
-
default:
|
|
68
|
-
|
|
61
|
+
default: s(() => [
|
|
62
|
+
r(i.$slots, "default")
|
|
69
63
|
]),
|
|
70
64
|
_: 3
|
|
71
|
-
}, 8, ["
|
|
65
|
+
}, 8, ["content-classes"])
|
|
72
66
|
]),
|
|
73
67
|
_: 3
|
|
74
68
|
}, 8, ["value", "data-cy"]));
|
|
@@ -31,7 +31,10 @@ const Q = ["innerHTML"], ne = /* @__PURE__ */ x({
|
|
|
31
31
|
}),
|
|
32
32
|
emits: /* @__PURE__ */ $(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
|
|
33
33
|
setup(t, { expose: S, emit: V }) {
|
|
34
|
-
const u = F(
|
|
34
|
+
const u = F(
|
|
35
|
+
t,
|
|
36
|
+
"modelValue"
|
|
37
|
+
), r = V, i = d(""), a = d([]), v = d(null), b = d(!1), n = d(!1), C = d(null), B = k(() => a.value.length);
|
|
35
38
|
L(() => {
|
|
36
39
|
v.value = q({ delay: 300 }, t.onInputChangeCb);
|
|
37
40
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { defineComponent as L, mergeModels as
|
|
2
|
-
import
|
|
3
|
-
import { ArrowIcon as
|
|
4
|
-
import { useKeyboardController as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as L, mergeModels as b, useId as M, useModel as A, ref as h, computed as E, useTemplateRef as O, watch as d, onBeforeMount as W, onMounted as $, onUnmounted as H, createElementBlock as K, openBlock as c, withModifiers as y, normalizeClass as l, renderSlot as C, createBlock as g, createVNode as N, unref as n, withCtx as D, createElementVNode as T, createCommentVNode as V, resolveDynamicComponent as q } from "vue";
|
|
2
|
+
import z from "./BaseButton.vue.js";
|
|
3
|
+
import { ArrowIcon as R } from "@wikicasa-dev/svg-icons";
|
|
4
|
+
import { useKeyboardController as U } from "@wikicasa-dev/vue-composables";
|
|
5
|
+
const j = ["innerHTML"], X = /* @__PURE__ */ L({
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "BaseDropDown",
|
|
8
|
-
props: /* @__PURE__ */
|
|
8
|
+
props: /* @__PURE__ */ b({
|
|
9
9
|
dropdownClasses: { default: "" },
|
|
10
10
|
btnClasses: { default: "" },
|
|
11
11
|
withArrowIcon: { type: Boolean, default: !1 },
|
|
@@ -23,103 +23,87 @@ const Q = ["innerHTML"], te = /* @__PURE__ */ L({
|
|
|
23
23
|
dataCy: { default: "" }
|
|
24
24
|
}, {
|
|
25
25
|
toggleDropdown: { type: Boolean, default: void 0 },
|
|
26
|
-
toggleDropdownModifiers: {}
|
|
27
|
-
resetKeyboardController: { type: Boolean, default: !1 },
|
|
28
|
-
resetKeyboardControllerModifiers: {}
|
|
26
|
+
toggleDropdownModifiers: {}
|
|
29
27
|
}),
|
|
30
|
-
emits: /* @__PURE__ */
|
|
31
|
-
setup(t, {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
"resetKeyboardController"
|
|
35
|
-
), o = O(!1), s = W([]), M = $(() => s.value.length), p = T("dropdown"), { activeIdx: r, selectedIdx: i } = P({
|
|
36
|
-
optionsLength: M,
|
|
28
|
+
emits: /* @__PURE__ */ b(["click", "update:dropdownState"], ["update:toggleDropdown"]),
|
|
29
|
+
setup(t, { emit: B }) {
|
|
30
|
+
const i = t, f = M(), k = B, w = A(t, "toggleDropdown"), o = h(!1), r = h([]), x = E(() => r.value.length), v = O("dropdown"), { activeIdx: m, selectedIdx: u } = U({
|
|
31
|
+
optionsLength: x,
|
|
37
32
|
isDropdownOpen: o,
|
|
38
|
-
activate:
|
|
33
|
+
activate: i.activateKeyboardController
|
|
39
34
|
});
|
|
40
|
-
|
|
41
|
-
() =>
|
|
35
|
+
d(
|
|
36
|
+
() => i.openDropdown,
|
|
42
37
|
(e) => {
|
|
43
38
|
o.value = e;
|
|
44
39
|
},
|
|
45
40
|
{
|
|
46
41
|
immediate: !0
|
|
47
42
|
}
|
|
48
|
-
),
|
|
49
|
-
|
|
50
|
-
}),
|
|
51
|
-
e && (o.value = !o.value,
|
|
52
|
-
}),
|
|
53
|
-
e !== -1 &&
|
|
43
|
+
), d(o, (e) => {
|
|
44
|
+
k("update:dropdownState", e);
|
|
45
|
+
}), d(w, (e) => {
|
|
46
|
+
e && (o.value = !o.value, w.value = !1);
|
|
47
|
+
}), d(u, (e) => {
|
|
48
|
+
e !== -1 && r.value[e].querySelector("a")?.click();
|
|
54
49
|
});
|
|
55
|
-
const
|
|
50
|
+
const p = () => {
|
|
56
51
|
o.value = !1;
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
e != null && (
|
|
61
|
-
},
|
|
62
|
-
e != null && (
|
|
52
|
+
}, s = () => {
|
|
53
|
+
i.keepState === "closed" && !o.value || i.keepState === "opened" && o.value || (o.value = !o.value);
|
|
54
|
+
}, I = (e) => {
|
|
55
|
+
e != null && (m.value = e);
|
|
56
|
+
}, S = (e) => {
|
|
57
|
+
e != null && (u.value = e);
|
|
63
58
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}), a(m, (e) => {
|
|
75
|
-
e && (r.value = -1, i.value = -1, R(() => {
|
|
76
|
-
y(), m.value = !1;
|
|
77
|
-
}));
|
|
78
|
-
}), I({
|
|
79
|
-
activeIdx: r,
|
|
80
|
-
selectedIdx: i
|
|
81
|
-
}), (e, u) => (f(), q("div", {
|
|
82
|
-
class: n(["uikit-relative uikit-block", e.$attrs.class]),
|
|
83
|
-
onClick: u[1] || (u[1] = g((X) => {
|
|
84
|
-
w("click"), c();
|
|
59
|
+
return W(() => {
|
|
60
|
+
i.closeWhenClickedOutside && document.body.addEventListener("click", p);
|
|
61
|
+
}), $(() => {
|
|
62
|
+
v.value && (r.value = v.value.children || []);
|
|
63
|
+
}), H(() => {
|
|
64
|
+
i.closeWhenClickedOutside && document.body.removeEventListener("click", p);
|
|
65
|
+
}), (e, a) => (c(), K("div", {
|
|
66
|
+
class: l(["uikit-relative uikit-block", e.$attrs.class]),
|
|
67
|
+
onClick: a[1] || (a[1] = y((F) => {
|
|
68
|
+
k("click"), s();
|
|
85
69
|
}, ["stop"]))
|
|
86
70
|
}, [
|
|
87
|
-
|
|
88
|
-
toggleDropdown:
|
|
71
|
+
C(e.$slots, "btn_slot", {
|
|
72
|
+
toggleDropdown: s,
|
|
89
73
|
isOpen: o.value
|
|
90
74
|
}, () => [
|
|
91
|
-
z
|
|
92
|
-
id:
|
|
75
|
+
N(z, {
|
|
76
|
+
id: n(f),
|
|
93
77
|
type: "button",
|
|
94
78
|
"data-cy": t.dataCy,
|
|
95
|
-
class:
|
|
79
|
+
class: l([
|
|
96
80
|
"!uikit-flex uikit-w-full uikit-items-center uikit-truncate",
|
|
97
81
|
t.btnClasses
|
|
98
82
|
]),
|
|
99
83
|
"aria-expanded": o.value,
|
|
100
84
|
"btn-class": "uikit-btn-single-selection"
|
|
101
85
|
}, {
|
|
102
|
-
default:
|
|
103
|
-
|
|
104
|
-
class:
|
|
86
|
+
default: D(() => [
|
|
87
|
+
T("span", {
|
|
88
|
+
class: l(["uikit-mr-5px", t.labelClasses]),
|
|
105
89
|
innerHTML: t.btnLabel
|
|
106
|
-
}, null, 10,
|
|
107
|
-
t.withArrowIcon ? (
|
|
90
|
+
}, null, 10, j),
|
|
91
|
+
t.withArrowIcon ? (c(), g(n(R), {
|
|
108
92
|
key: 0,
|
|
109
|
-
class:
|
|
93
|
+
class: l(["uikit-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", o.value ? "uikit-rotate-180" : ""]),
|
|
110
94
|
width: t.arrowWidth,
|
|
111
95
|
height: t.arrowWidth,
|
|
112
96
|
"stroke-color": t.arrowStrokeColor
|
|
113
|
-
}, null, 8, ["class", "width", "height", "stroke-color"])) :
|
|
97
|
+
}, null, 8, ["class", "width", "height", "stroke-color"])) : V("", !0)
|
|
114
98
|
]),
|
|
115
99
|
_: 1
|
|
116
100
|
}, 8, ["id", "data-cy", "class", "aria-expanded"])
|
|
117
101
|
]),
|
|
118
|
-
(
|
|
119
|
-
id: "dropdown_" +
|
|
102
|
+
(c(), g(q(t.dropdownElement), {
|
|
103
|
+
id: "dropdown_" + n(f),
|
|
120
104
|
ref: "dropdown",
|
|
121
105
|
"data-cy": t.dataCy && `${t.dataCy}_dropdown`,
|
|
122
|
-
class:
|
|
106
|
+
class: l(["uikit-dropdown-content uikit-w-full uikit-flex-col uikit-overflow-y-auto uikit-border uikit-border-solid uikit-bg-white uikit-pl-0 uikit-opacity-100 uikit-shadow uikit-no-scrollbar", [
|
|
123
107
|
t.dropdownClasses,
|
|
124
108
|
o.value ? "uikit-flex" : "uikit-hidden",
|
|
125
109
|
{ "uikit-bottom-[55px] uikit-rounded-xs": t.direction === "up" },
|
|
@@ -127,17 +111,17 @@ const Q = ["innerHTML"], te = /* @__PURE__ */ L({
|
|
|
127
111
|
{ "uikit-absolute": t.isAbsolute }
|
|
128
112
|
]]),
|
|
129
113
|
"aria-hidden": !o.value,
|
|
130
|
-
onClick:
|
|
114
|
+
onClick: a[0] || (a[0] = y(() => {
|
|
131
115
|
}, ["stop"]))
|
|
132
116
|
}, {
|
|
133
|
-
default:
|
|
134
|
-
|
|
117
|
+
default: D(() => [
|
|
118
|
+
C(e.$slots, "default", {
|
|
135
119
|
isOpen: o.value,
|
|
136
|
-
toggleDropdown:
|
|
137
|
-
activeIdx:
|
|
138
|
-
selectedIdx:
|
|
139
|
-
setActiveIdx:
|
|
140
|
-
setSelectedIdx:
|
|
120
|
+
toggleDropdown: s,
|
|
121
|
+
activeIdx: n(m),
|
|
122
|
+
selectedIdx: n(u),
|
|
123
|
+
setActiveIdx: I,
|
|
124
|
+
setSelectedIdx: S
|
|
141
125
|
})
|
|
142
126
|
]),
|
|
143
127
|
_: 3
|
|
@@ -146,5 +130,5 @@ const Q = ["innerHTML"], te = /* @__PURE__ */ L({
|
|
|
146
130
|
}
|
|
147
131
|
});
|
|
148
132
|
export {
|
|
149
|
-
|
|
133
|
+
X as default
|
|
150
134
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as T, ref as n, useTemplateRef as z, onUnmounted as H, watch as I, createBlock as O, openBlock as r, Teleport as $, createElementVNode as l, normalizeClass as s, withModifiers as y, createElementBlock as h, createCommentVNode as w, renderSlot as d, createVNode as D, unref as K, nextTick as N } from "vue";
|
|
2
2
|
import { isWindows as C, awaitableSetTimeout as S } from "@wikicasa-dev/utilities";
|
|
3
3
|
import { CloseIcon as V } from "@wikicasa-dev/svg-icons";
|
|
4
|
-
const F = ["id", "data-cy"], U = ["innerHTML"], R = /* @__PURE__ */
|
|
4
|
+
const F = ["id", "data-cy"], U = ["innerHTML"], R = /* @__PURE__ */ T({
|
|
5
5
|
__name: "BaseModal",
|
|
6
6
|
props: {
|
|
7
7
|
id: { default: "base-bt-modal" },
|
|
@@ -11,7 +11,6 @@ const F = ["id", "data-cy"], U = ["innerHTML"], R = /* @__PURE__ */ I({
|
|
|
11
11
|
customModalHeaderClasses: {},
|
|
12
12
|
customModalBodyClasses: {},
|
|
13
13
|
customModalFooterClasses: {},
|
|
14
|
-
closeIcon: {},
|
|
15
14
|
withCloseIcon: { type: Boolean, default: !0 },
|
|
16
15
|
showModal: { type: Boolean, default: !0 },
|
|
17
16
|
headerTitle: { default: "" },
|
|
@@ -25,7 +24,7 @@ const F = ["id", "data-cy"], U = ["innerHTML"], R = /* @__PURE__ */ I({
|
|
|
25
24
|
},
|
|
26
25
|
emits: ["closed", "opened", "dialogClick"],
|
|
27
26
|
setup(e, { emit: g }) {
|
|
28
|
-
const c = g, i = n(!1), m = n(null), a =
|
|
27
|
+
const c = g, i = n(!1), m = n(null), a = z("modalDialog"), k = n(!1), u = n(!1), f = ({ key: t }) => {
|
|
29
28
|
t === "Escape" && o();
|
|
30
29
|
}, x = () => {
|
|
31
30
|
document?.body.addEventListener("keydown", f);
|
|
@@ -54,9 +53,9 @@ const F = ["id", "data-cy"], U = ["innerHTML"], R = /* @__PURE__ */ I({
|
|
|
54
53
|
m.value?.classList.add("uikit-hidden"), c("closed");
|
|
55
54
|
}, 250);
|
|
56
55
|
};
|
|
57
|
-
return
|
|
56
|
+
return H(() => {
|
|
58
57
|
b(), document?.documentElement.classList.remove("uikit-no-scrolling"), C() ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling");
|
|
59
|
-
}),
|
|
58
|
+
}), I(
|
|
60
59
|
() => e.showModal,
|
|
61
60
|
async (t) => {
|
|
62
61
|
!t && !i.value ? k.value = !0 : k.value = !1, t && !i.value && await p(), !t && i.value && await o(), i.value = t;
|
|
@@ -103,16 +102,16 @@ const F = ["id", "data-cy"], U = ["innerHTML"], R = /* @__PURE__ */ I({
|
|
|
103
102
|
key: 0,
|
|
104
103
|
id: "close-icon-btn",
|
|
105
104
|
"data-cy": "bbt-default-close-icon-btn",
|
|
106
|
-
class: s(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent
|
|
105
|
+
class: s(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent", e.closeIconBtnClasses]),
|
|
107
106
|
type: "button",
|
|
108
107
|
"aria-label": "Close",
|
|
109
108
|
onClick: y(o, ["prevent", "stop"])
|
|
110
109
|
}, [
|
|
111
110
|
D(K(V), {
|
|
112
|
-
class:
|
|
113
|
-
width:
|
|
114
|
-
height:
|
|
115
|
-
}
|
|
111
|
+
class: "bbt-close-icon uikit-box-border uikit-p-5px",
|
|
112
|
+
width: 30,
|
|
113
|
+
height: 30
|
|
114
|
+
})
|
|
116
115
|
], 2)) : w("", !0),
|
|
117
116
|
d(t.$slots, "header", { closeModal: o }, () => [
|
|
118
117
|
l("span", {
|
|
@@ -14,7 +14,7 @@ const N = ["for"], j = /* @__PURE__ */ m({
|
|
|
14
14
|
label: { default: "" },
|
|
15
15
|
modelValue: { type: Boolean, default: !1 }
|
|
16
16
|
},
|
|
17
|
-
emits: ["click", "
|
|
17
|
+
emits: ["click", "change", "update:modelValue"],
|
|
18
18
|
setup(e, { emit: r }) {
|
|
19
19
|
const l = f(), d = h(() => `${e.id ?? l}`), a = r;
|
|
20
20
|
b(
|
|
@@ -40,7 +40,7 @@ const N = ["for"], j = /* @__PURE__ */ m({
|
|
|
40
40
|
"model-value": e.modelValue,
|
|
41
41
|
"data-cy": e.dataCy,
|
|
42
42
|
disabled: e.disabled,
|
|
43
|
-
class: y(["uikit-inline-flex uikit-size-[20px] uikit-items-center uikit-justify-center uikit-rounded-[4px] uikit-p-0 data-[state='unchecked']:uikit-border data-[state='unchecked']:uikit-border-solid
|
|
43
|
+
class: y(["data-[state='unchecked']:uikit-border-w-lightgray uikit-inline-flex uikit-size-[20px] uikit-items-center uikit-justify-center uikit-rounded-[4px] uikit-p-0 data-[state='unchecked']:uikit-border data-[state='unchecked']:uikit-border-solid", [
|
|
44
44
|
{
|
|
45
45
|
"uikit-bg-white": !e.modelValue,
|
|
46
46
|
"uikit-bg-w-primary": e.modelValue
|