@wikicasa-dev/components 2.2.9-alpha.29 → 2.2.9-alpha.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/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 +3 -5
- package/dist/UIKit/AccessibleSelect.js +2 -3
- package/dist/UIKit/Autocomplete/ClearableAutocomplete.d.ts +4 -10
- package/dist/UIKit/BaseButton.d.ts +2 -6
- package/dist/UIKit/BaseDropDown.d.ts +2 -16
- package/dist/assets/BaseDropDown.css +1 -1
- package/dist/assets/tailwind.css +1 -1
- package/dist/index.js +83 -84
- package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +153 -146
- package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +99 -115
- package/dist/packages/components/lib/UIKit/BaseButton.vue.js +23 -26
- package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +93 -100
- package/dist/packages/components/lib/UIKit/BaseModal.vue.js +38 -44
- package/dist/packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js +17 -18
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js +26 -24
- package/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +14 -14
- package/package.json +5 -5
- package/dist/assets/AccessibleSelect.css +0 -1
- /package/dist/assets/{swiper-keyboard.css → swiper-thumbs.css} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
const
|
|
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({
|
|
4
4
|
__name: "BaseButton",
|
|
5
5
|
props: {
|
|
6
6
|
btnClass: { default: "uikit-btn-w-primary" },
|
|
@@ -16,20 +16,17 @@ const w = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
|
|
|
16
16
|
type: {}
|
|
17
17
|
},
|
|
18
18
|
emits: ["mouseover", "mouseout", "click"],
|
|
19
|
-
setup(e, {
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
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;
|
|
24
24
|
};
|
|
25
|
-
return
|
|
26
|
-
|
|
27
|
-
}), (o, t) => (M(), C("button", {
|
|
28
|
-
ref: "buttonEl",
|
|
29
|
-
id: o.$attrs.id,
|
|
25
|
+
return (a, t) => (v(), f("button", {
|
|
26
|
+
id: a.$attrs.id,
|
|
30
27
|
"data-cy": e.dataCy,
|
|
31
28
|
type: e.type,
|
|
32
|
-
class:
|
|
29
|
+
class: C([
|
|
33
30
|
"uikit-btn",
|
|
34
31
|
{
|
|
35
32
|
"uikit-btn-empty": !e.withMinWidth,
|
|
@@ -37,33 +34,33 @@ const w = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "ti
|
|
|
37
34
|
"uikit-flex uikit-items-center uikit-justify-center": e.isLoading
|
|
38
35
|
},
|
|
39
36
|
e.btnClass,
|
|
40
|
-
|
|
41
|
-
|
|
37
|
+
r.value,
|
|
38
|
+
m.value
|
|
42
39
|
]),
|
|
43
|
-
style:
|
|
40
|
+
style: B(a.$attrs.style),
|
|
44
41
|
"data-active": e.keepActive,
|
|
45
42
|
disabled: e.isLoading || e.disabled,
|
|
46
43
|
"aria-label": e.ariaLabel,
|
|
47
44
|
title: e.title,
|
|
48
45
|
onMouseover: t[0] || (t[0] = s((i) => {
|
|
49
|
-
|
|
46
|
+
k(), o("mouseover", i);
|
|
50
47
|
}, ["stop"])),
|
|
51
48
|
onMouseout: t[1] || (t[1] = s((i) => {
|
|
52
|
-
|
|
49
|
+
y(), o("mouseout", i);
|
|
53
50
|
}, ["stop"])),
|
|
54
|
-
onClick: t[2] || (t[2] = (i) =>
|
|
51
|
+
onClick: t[2] || (t[2] = (i) => o("click", i))
|
|
55
52
|
}, [
|
|
56
|
-
e.isLoading ? u(
|
|
57
|
-
|
|
53
|
+
e.isLoading ? u(a.$slots, "spinner", { key: 1 }, () => [
|
|
54
|
+
M(z, {
|
|
58
55
|
"stroke-color": e.outlined ? "#ACB4C3" : "#fff"
|
|
59
56
|
}, null, 8, ["stroke-color"])
|
|
60
|
-
]) : u(
|
|
57
|
+
]) : u(a.$slots, "default", {
|
|
61
58
|
key: 0,
|
|
62
|
-
hover:
|
|
59
|
+
hover: n.value
|
|
63
60
|
})
|
|
64
|
-
], 46,
|
|
61
|
+
], 46, L));
|
|
65
62
|
}
|
|
66
63
|
});
|
|
67
64
|
export {
|
|
68
|
-
|
|
65
|
+
$ as default
|
|
69
66
|
};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { ArrowIcon as
|
|
4
|
-
import { useKeyboardController as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as N, mergeModels as D, useId as R, useModel as E, shallowRef as x, computed as V, useTemplateRef as I, onMounted as z, onUnmounted as q, watch as l, nextTick as U, createElementBlock as j, openBlock as f, normalizeClass as i, renderSlot as K, createBlock as B, createVNode as F, unref as r, withCtx as L, createElementVNode as G, createCommentVNode as J, resolveDynamicComponent as P } from "vue";
|
|
2
|
+
import Q from "./BaseButton.vue.js";
|
|
3
|
+
import { ArrowIcon as X } from "@wikicasa-dev/svg-icons";
|
|
4
|
+
import { useKeyboardController as Y } from "@wikicasa-dev/vue-composables";
|
|
5
|
+
const Z = ["innerHTML"], le = /* @__PURE__ */ N({
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
__name: "BaseDropDown",
|
|
8
|
-
props: /* @__PURE__ */
|
|
9
|
-
dropdownAttrs: {},
|
|
8
|
+
props: /* @__PURE__ */ D({
|
|
10
9
|
dropdownClasses: { default: "" },
|
|
11
10
|
btnClasses: { default: "" },
|
|
12
11
|
withArrowIcon: { type: Boolean, default: !1 },
|
|
@@ -21,142 +20,136 @@ const _ = ["innerHTML"], ae = /* @__PURE__ */ T({
|
|
|
21
20
|
dropdownElement: { default: "div" },
|
|
22
21
|
keepState: { default: "" },
|
|
23
22
|
activateKeyboardController: { type: Boolean, default: !0 },
|
|
24
|
-
closeKeys: { type: [Boolean, Array], default: () => ["Escape", "Enter"] },
|
|
25
23
|
dataCy: { default: "" }
|
|
26
24
|
}, {
|
|
27
25
|
toggleDropdown: { type: Boolean, default: void 0 },
|
|
28
26
|
toggleDropdownModifiers: {},
|
|
29
27
|
resetKeyboardController: { type: Boolean, default: !1 },
|
|
30
|
-
resetKeyboardControllerModifiers: {}
|
|
31
|
-
open: { type: Boolean, default: !1 },
|
|
32
|
-
openModifiers: {}
|
|
28
|
+
resetKeyboardControllerModifiers: {}
|
|
33
29
|
}),
|
|
34
|
-
emits: /* @__PURE__ */
|
|
35
|
-
setup(
|
|
36
|
-
const n =
|
|
37
|
-
|
|
30
|
+
emits: /* @__PURE__ */ D(["click", "update:dropdownState"], ["update:toggleDropdown", "update:resetKeyboardController"]),
|
|
31
|
+
setup(o, { expose: S, emit: A }) {
|
|
32
|
+
const n = o, k = R(), v = A, w = E(o, "toggleDropdown"), m = E(
|
|
33
|
+
o,
|
|
38
34
|
"resetKeyboardController"
|
|
39
|
-
)
|
|
40
|
-
let
|
|
41
|
-
const
|
|
35
|
+
);
|
|
36
|
+
let p = !1;
|
|
37
|
+
const t = x(!1), u = x([]), M = V(() => u.value.length), s = I("container"), y = I("dropdown"), { activeIdx: d, selectedIdx: a, onKeyDownHandler: O } = Y({
|
|
42
38
|
optionsLength: M,
|
|
43
|
-
isDropdownOpen:
|
|
44
|
-
global: !1
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
o.value = !1;
|
|
39
|
+
isDropdownOpen: t,
|
|
40
|
+
global: !1
|
|
41
|
+
}), W = () => {
|
|
42
|
+
t.value = !1;
|
|
48
43
|
}, b = ({ target: e }) => {
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
|
|
52
|
-
}, W = (e) => {
|
|
53
|
-
n.activateKeyboardController && O(e);
|
|
54
|
-
}, f = () => {
|
|
55
|
-
n.keepState === "closed" && !o.value || n.keepState === "opened" && o.value || (o.value = !o.value);
|
|
44
|
+
s.value?.contains(e) || W();
|
|
45
|
+
}, h = (e) => {
|
|
46
|
+
t.value && s.value?.contains(document.activeElement) && e.key === "Tab" && (t.value = !1);
|
|
56
47
|
}, $ = (e) => {
|
|
57
|
-
|
|
48
|
+
n.activateKeyboardController && O(e);
|
|
49
|
+
}, c = () => {
|
|
50
|
+
n.keepState === "closed" && !t.value || n.keepState === "opened" && t.value || (t.value = !t.value);
|
|
51
|
+
}, T = (e) => {
|
|
52
|
+
e != null && (d.value = e);
|
|
58
53
|
}, H = (e) => {
|
|
59
|
-
e != null && (
|
|
60
|
-
},
|
|
61
|
-
|
|
54
|
+
e != null && (a.value = e);
|
|
55
|
+
}, C = () => {
|
|
56
|
+
y.value && (u.value = Array.from(y.value.children));
|
|
62
57
|
};
|
|
63
58
|
return z(() => {
|
|
64
|
-
|
|
59
|
+
C();
|
|
65
60
|
}), q(() => {
|
|
66
|
-
n.closeWhenClickedOutside && (document.removeEventListener("click", b), document.removeEventListener("
|
|
67
|
-
}), l(
|
|
68
|
-
e && (
|
|
69
|
-
|
|
61
|
+
n.closeWhenClickedOutside && (document.removeEventListener("click", b), document.removeEventListener("keydown", h));
|
|
62
|
+
}), l(m, (e) => {
|
|
63
|
+
e && (d.value = -1, a.value = -1, U(() => {
|
|
64
|
+
C(), m.value = !1;
|
|
70
65
|
}));
|
|
71
66
|
}), l(
|
|
72
67
|
() => n.openDropdown,
|
|
73
68
|
(e) => {
|
|
74
|
-
|
|
69
|
+
t.value = e;
|
|
75
70
|
},
|
|
76
71
|
{
|
|
77
72
|
immediate: !0
|
|
78
73
|
}
|
|
79
|
-
), l(
|
|
80
|
-
|
|
81
|
-
}), l(
|
|
82
|
-
!e ||
|
|
83
|
-
}), l(
|
|
84
|
-
e && (
|
|
85
|
-
}), l(
|
|
86
|
-
e !== -1 &&
|
|
87
|
-
}),
|
|
88
|
-
activeIdx:
|
|
89
|
-
selectedIdx:
|
|
90
|
-
getRootElement: () =>
|
|
91
|
-
|
|
92
|
-
}), (e, E) => (k(), P("div", {
|
|
74
|
+
), l(t, (e) => {
|
|
75
|
+
v("update:dropdownState", e);
|
|
76
|
+
}), l(t, (e) => {
|
|
77
|
+
!e || p || !n.closeWhenClickedOutside || (document.addEventListener("click", b), document.addEventListener("keydown", h), p = !0);
|
|
78
|
+
}), l(w, (e) => {
|
|
79
|
+
e && (t.value = !t.value, w.value = !1);
|
|
80
|
+
}), l(a, (e) => {
|
|
81
|
+
e !== -1 && u.value[e].querySelector("a")?.click();
|
|
82
|
+
}), S({
|
|
83
|
+
activeIdx: d,
|
|
84
|
+
selectedIdx: a,
|
|
85
|
+
getRootElement: () => s.value
|
|
86
|
+
}), (e, g) => (f(), j("div", {
|
|
93
87
|
ref: "container",
|
|
94
|
-
class:
|
|
95
|
-
onKeydown:
|
|
88
|
+
class: i(["uikit-relative uikit-block", e.$attrs.class]),
|
|
89
|
+
onKeydown: $
|
|
96
90
|
}, [
|
|
97
|
-
|
|
98
|
-
toggleDropdown:
|
|
99
|
-
isOpen:
|
|
100
|
-
activeIdx: a(i)
|
|
91
|
+
K(e.$slots, "btn_slot", {
|
|
92
|
+
toggleDropdown: c,
|
|
93
|
+
isOpen: t.value
|
|
101
94
|
}, () => [
|
|
102
|
-
|
|
103
|
-
id:
|
|
95
|
+
F(Q, {
|
|
96
|
+
id: r(k),
|
|
104
97
|
type: "button",
|
|
105
|
-
"data-cy":
|
|
106
|
-
class:
|
|
98
|
+
"data-cy": o.dataCy,
|
|
99
|
+
class: i([
|
|
107
100
|
"!uikit-flex uikit-w-full uikit-items-center uikit-truncate",
|
|
108
|
-
|
|
101
|
+
o.btnClasses
|
|
109
102
|
]),
|
|
110
|
-
"aria-expanded":
|
|
103
|
+
"aria-expanded": t.value,
|
|
111
104
|
"btn-class": "uikit-btn-single-selection",
|
|
112
|
-
onClick:
|
|
113
|
-
|
|
105
|
+
onClick: g[0] || (g[0] = (_) => {
|
|
106
|
+
v("click"), c();
|
|
114
107
|
})
|
|
115
108
|
}, {
|
|
116
|
-
default:
|
|
117
|
-
|
|
118
|
-
class:
|
|
119
|
-
innerHTML:
|
|
120
|
-
}, null, 10,
|
|
121
|
-
|
|
109
|
+
default: L(() => [
|
|
110
|
+
G("span", {
|
|
111
|
+
class: i(["uikit-mr-5px", o.labelClasses]),
|
|
112
|
+
innerHTML: o.btnLabel
|
|
113
|
+
}, null, 10, Z),
|
|
114
|
+
o.withArrowIcon ? (f(), B(r(X), {
|
|
122
115
|
key: 0,
|
|
123
|
-
class:
|
|
124
|
-
width:
|
|
125
|
-
height:
|
|
126
|
-
"stroke-color":
|
|
127
|
-
}, null, 8, ["class", "width", "height", "stroke-color"])) :
|
|
116
|
+
class: i(["uikit-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", t.value ? "uikit-rotate-180" : ""]),
|
|
117
|
+
width: o.arrowWidth,
|
|
118
|
+
height: o.arrowWidth,
|
|
119
|
+
"stroke-color": o.arrowStrokeColor
|
|
120
|
+
}, null, 8, ["class", "width", "height", "stroke-color"])) : J("", !0)
|
|
128
121
|
]),
|
|
129
122
|
_: 1
|
|
130
123
|
}, 8, ["id", "data-cy", "class", "aria-expanded"])
|
|
131
124
|
]),
|
|
132
|
-
(
|
|
133
|
-
id: "dropdown_" +
|
|
125
|
+
(f(), B(P(o.dropdownElement), {
|
|
126
|
+
id: "dropdown_" + r(k),
|
|
134
127
|
ref: "dropdown",
|
|
135
|
-
"data-cy":
|
|
136
|
-
class: ["uikit-dropdown-content uikit-w-full uikit-flex-col uikit-overflow-y-auto uikit-border-solid uikit-bg-white uikit-pl-0 uikit-opacity-100 uikit-shadow uikit-no-scrollbar", [
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
{ "uikit-bottom-[55px]":
|
|
140
|
-
{ "uikit-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
"
|
|
144
|
-
},
|
|
145
|
-
default:
|
|
146
|
-
|
|
147
|
-
isOpen:
|
|
148
|
-
toggleDropdown:
|
|
149
|
-
activeIdx:
|
|
150
|
-
selectedIdx: a
|
|
151
|
-
setActiveIdx:
|
|
128
|
+
"data-cy": o.dataCy && `${o.dataCy}_dropdown`,
|
|
129
|
+
class: i(["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", [
|
|
130
|
+
o.dropdownClasses,
|
|
131
|
+
t.value ? "uikit-flex" : "uikit-hidden",
|
|
132
|
+
{ "uikit-bottom-[55px] uikit-rounded-xs": o.direction === "up" },
|
|
133
|
+
{ "uikit-rounded-b uikit-border-t-0": o.direction === "down" },
|
|
134
|
+
{ "uikit-absolute": o.isAbsolute }
|
|
135
|
+
]]),
|
|
136
|
+
"aria-hidden": !t.value
|
|
137
|
+
}, {
|
|
138
|
+
default: L(() => [
|
|
139
|
+
K(e.$slots, "default", {
|
|
140
|
+
isOpen: t.value,
|
|
141
|
+
toggleDropdown: c,
|
|
142
|
+
activeIdx: r(d),
|
|
143
|
+
selectedIdx: r(a),
|
|
144
|
+
setActiveIdx: T,
|
|
152
145
|
setSelectedIdx: H
|
|
153
146
|
})
|
|
154
147
|
]),
|
|
155
148
|
_: 3
|
|
156
|
-
},
|
|
149
|
+
}, 8, ["id", "data-cy", "class", "aria-hidden"]))
|
|
157
150
|
], 34));
|
|
158
151
|
}
|
|
159
152
|
});
|
|
160
153
|
export {
|
|
161
|
-
|
|
154
|
+
le as default
|
|
162
155
|
};
|
|
@@ -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 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
|
+
import { isWindows as C, awaitableSetTimeout as S } from "@wikicasa-dev/utilities";
|
|
3
3
|
import { CloseIcon as V } from "@wikicasa-dev/svg-icons";
|
|
4
|
-
const
|
|
4
|
+
const F = ["id", "data-cy"], U = ["innerHTML"], R = /* @__PURE__ */ I({
|
|
5
5
|
__name: "BaseModal",
|
|
6
6
|
props: {
|
|
7
7
|
id: { default: "base-bt-modal" },
|
|
@@ -24,25 +24,25 @@ const P = ["id", "data-cy"], U = ["innerHTML"], j = /* @__PURE__ */ I({
|
|
|
24
24
|
titleClasses: {}
|
|
25
25
|
},
|
|
26
26
|
emits: ["closed", "opened", "dialogClick"],
|
|
27
|
-
setup(e, { emit:
|
|
28
|
-
const c =
|
|
27
|
+
setup(e, { emit: g }) {
|
|
28
|
+
const c = g, i = n(!1), m = n(null), a = T("modalDialog"), k = n(!1), u = n(!1), f = ({ key: t }) => {
|
|
29
29
|
t === "Escape" && o();
|
|
30
|
-
},
|
|
30
|
+
}, x = () => {
|
|
31
31
|
document?.body.addEventListener("keydown", f);
|
|
32
32
|
}, b = () => {
|
|
33
33
|
document?.body.removeEventListener("keydown", f);
|
|
34
|
-
},
|
|
34
|
+
}, p = async () => {
|
|
35
35
|
i.value = !0, N(() => {
|
|
36
|
-
|
|
36
|
+
x(), C() ? 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);
|
|
42
40
|
}, M = (t) => {
|
|
43
|
-
|
|
44
|
-
}, B =
|
|
45
|
-
|
|
41
|
+
a.value && a.value.contains(t.target) && (u.value = !0);
|
|
42
|
+
}, B = (t) => {
|
|
43
|
+
a.value && a.value.contains(t.target) && (u.value = !1);
|
|
44
|
+
}, L = async () => {
|
|
45
|
+
if (e.closeOnClickOut) {
|
|
46
46
|
if (u.value) {
|
|
47
47
|
u.value = !1;
|
|
48
48
|
return;
|
|
@@ -51,25 +51,21 @@ const P = ["id", "data-cy"], U = ["innerHTML"], j = /* @__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
|
+
m.value?.classList.add("uikit-hidden"), c("closed");
|
|
55
55
|
}, 250);
|
|
56
56
|
};
|
|
57
|
-
z(() => {
|
|
58
|
-
b(), document?.documentElement.classList.remove("uikit-no-scrolling"),
|
|
57
|
+
return z(() => {
|
|
58
|
+
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
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 p(), !t && i.value && await o(), i.value = t;
|
|
63
63
|
},
|
|
64
64
|
{ immediate: !0 }
|
|
65
|
-
)
|
|
66
|
-
|
|
67
|
-
l.value === t.target && t.stopPropagation();
|
|
68
|
-
};
|
|
69
|
-
return (t, v) => (m(), O($, { to: "body" }, [
|
|
70
|
-
a("div", {
|
|
65
|
+
), (t, v) => (r(), O($, { to: "body" }, [
|
|
66
|
+
l("div", {
|
|
71
67
|
ref_key: "backdropEl",
|
|
72
|
-
ref:
|
|
68
|
+
ref: m,
|
|
73
69
|
class: s(["bbt-backdrop uikit-fixed uikit-left-0 uikit-top-0 uikit-h-full uikit-w-full", [
|
|
74
70
|
e.customBackdropClasses,
|
|
75
71
|
{
|
|
@@ -80,11 +76,11 @@ const P = ["id", "data-cy"], U = ["innerHTML"], j = /* @__PURE__ */ I({
|
|
|
80
76
|
{ hide: k.value }
|
|
81
77
|
]]),
|
|
82
78
|
style: { "z-index": "1062" },
|
|
83
|
-
onClick:
|
|
84
|
-
onMousedown:
|
|
85
|
-
onMouseup:
|
|
79
|
+
onClick: L,
|
|
80
|
+
onMousedown: M,
|
|
81
|
+
onMouseup: B
|
|
86
82
|
}, [
|
|
87
|
-
|
|
83
|
+
l("dialog", {
|
|
88
84
|
id: e.id,
|
|
89
85
|
ref: "modalDialog",
|
|
90
86
|
"data-cy": e.dataCy,
|
|
@@ -98,52 +94,50 @@ const P = ["id", "data-cy"], U = ["innerHTML"], j = /* @__PURE__ */ I({
|
|
|
98
94
|
`base-${e.size}`,
|
|
99
95
|
e.fullHeight ? "uikit-h-[95%]" : "uikit-h-auto"
|
|
100
96
|
]]),
|
|
101
|
-
|
|
102
|
-
onClick: v[0] || (v[0] = (E) => c("dialogClick", E)),
|
|
103
|
-
onFocusin: L
|
|
97
|
+
onClick: v[0] || (v[0] = y((E) => c("dialogClick", E), ["stop"]))
|
|
104
98
|
}, [
|
|
105
|
-
|
|
99
|
+
l("div", {
|
|
106
100
|
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]])
|
|
107
101
|
}, [
|
|
108
|
-
e.withCloseIcon ? (
|
|
102
|
+
e.withCloseIcon ? (r(), h("button", {
|
|
109
103
|
key: 0,
|
|
110
104
|
id: "close-icon-btn",
|
|
111
105
|
"data-cy": "bbt-default-close-icon-btn",
|
|
112
106
|
class: s(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent uikit-p-5px", e.closeIconBtnClasses]),
|
|
113
107
|
type: "button",
|
|
114
108
|
"aria-label": "Close",
|
|
115
|
-
onClick:
|
|
109
|
+
onClick: y(o, ["prevent", "stop"])
|
|
116
110
|
}, [
|
|
117
|
-
|
|
111
|
+
D(K(V), {
|
|
118
112
|
class: s(["bbt-close-icon uikit-box-border", e.closeIcon?.classes]),
|
|
119
|
-
width: e.closeIcon?.size ||
|
|
120
|
-
height: e.closeIcon?.size ||
|
|
113
|
+
width: e.closeIcon?.size || 30,
|
|
114
|
+
height: e.closeIcon?.size || 30
|
|
121
115
|
}, null, 8, ["class", "width", "height"])
|
|
122
|
-
], 2)) :
|
|
116
|
+
], 2)) : w("", !0),
|
|
123
117
|
d(t.$slots, "header", { closeModal: o }, () => [
|
|
124
|
-
|
|
118
|
+
l("span", {
|
|
125
119
|
class: s(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", e.titleClasses]),
|
|
126
120
|
innerHTML: e.headerTitle
|
|
127
121
|
}, null, 10, U)
|
|
128
122
|
])
|
|
129
123
|
], 2),
|
|
130
|
-
|
|
124
|
+
l("div", {
|
|
131
125
|
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]])
|
|
132
126
|
}, [
|
|
133
127
|
d(t.$slots, "body", { closeModal: o })
|
|
134
128
|
], 2),
|
|
135
|
-
t.$slots.footer ? (
|
|
129
|
+
t.$slots.footer ? (r(), h("div", {
|
|
136
130
|
key: 0,
|
|
137
131
|
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])
|
|
138
132
|
}, [
|
|
139
133
|
d(t.$slots, "footer", { closeModal: o })
|
|
140
|
-
], 2)) :
|
|
134
|
+
], 2)) : w("", !0),
|
|
141
135
|
d(t.$slots, "fixed-bottom")
|
|
142
|
-
],
|
|
136
|
+
], 10, F)
|
|
143
137
|
], 34)
|
|
144
138
|
]));
|
|
145
139
|
}
|
|
146
140
|
});
|
|
147
141
|
export {
|
|
148
|
-
|
|
142
|
+
R as default
|
|
149
143
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as u, useTemplateRef as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as u, useTemplateRef as r, watch as m, nextTick as c, createElementBlock as d, openBlock as f, normalizeClass as k, renderSlot as v, createElementVNode as x } from "vue";
|
|
2
|
+
const p = ["tabindex"], b = ["innerHTML"], $ = /* @__PURE__ */ u({
|
|
3
3
|
__name: "SelectItem",
|
|
4
4
|
props: {
|
|
5
5
|
label: { default: "" },
|
|
@@ -7,34 +7,33 @@ const b = ["data-active", "tabindex"], p = ["innerHTML"], $ = /* @__PURE__ */ u(
|
|
|
7
7
|
idx: { default: -1 }
|
|
8
8
|
},
|
|
9
9
|
emits: ["click", "mouseover"],
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
() =>
|
|
10
|
+
setup(l, { emit: a }) {
|
|
11
|
+
const n = a, t = l, o = r("liItem");
|
|
12
|
+
return m(
|
|
13
|
+
() => t.active,
|
|
14
14
|
(e) => {
|
|
15
|
-
e &&
|
|
16
|
-
|
|
15
|
+
e && c(() => {
|
|
16
|
+
o.value && o.value.focus();
|
|
17
17
|
});
|
|
18
18
|
},
|
|
19
19
|
{ immediate: !0 }
|
|
20
|
-
), (e,
|
|
20
|
+
), (e, i) => (f(), d("li", {
|
|
21
21
|
ref: "liItem",
|
|
22
|
-
class:
|
|
23
|
-
{ "active uikit-bg-w-cultured":
|
|
22
|
+
class: k(["uikit-list-none uikit-text-w-black", [
|
|
23
|
+
{ "active uikit-bg-w-cultured": l.active },
|
|
24
24
|
"uikit-outline-none",
|
|
25
25
|
e.$attrs.class
|
|
26
26
|
]]),
|
|
27
|
-
"data-active": t.active,
|
|
28
27
|
tabindex: e.$attrs.tabindex ?? -1,
|
|
29
|
-
onClick:
|
|
30
|
-
onMouseover:
|
|
28
|
+
onClick: i[0] || (i[0] = (s) => n("click", t.idx)),
|
|
29
|
+
onMouseover: i[1] || (i[1] = (s) => n("mouseover", t.idx))
|
|
31
30
|
}, [
|
|
32
|
-
|
|
31
|
+
v(e.$slots, "default", { itemIdx: l.idx }, () => [
|
|
33
32
|
x("span", {
|
|
34
|
-
innerHTML:
|
|
35
|
-
}, null, 8,
|
|
33
|
+
innerHTML: t.label
|
|
34
|
+
}, null, 8, b)
|
|
36
35
|
])
|
|
37
|
-
], 42,
|
|
36
|
+
], 42, p));
|
|
38
37
|
}
|
|
39
38
|
});
|
|
40
39
|
export {
|