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