@wikicasa-dev/components 2.2.9-alpha.4 → 2.2.9-alpha.41
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/BaseDropDown.d.ts +17 -11
- package/dist/UIKit/BaseInput.d.ts +2 -2
- package/dist/UIKit/BaseInput.js +2 -2
- package/dist/UIKit/BaseTextarea.d.ts +2 -2
- package/dist/assets/AccessibleSelect.css +1 -0
- package/dist/assets/BaseDropDown.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 +84 -83
- package/dist/packages/components/lib/UIKit/AccessibleSelect.vue.js +150 -157
- package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +116 -100
- 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/BaseDropDown.vue.js +102 -105
- 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/dist/packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js +14 -14
- package/package.json +6 -5
- /package/dist/assets/{swiper-controller.css → swiper-keyboard.css} +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ref as _, onMounted as A, onUnmounted as D, unref as p } from "vue";
|
|
2
|
+
const u = "ArrowUp", a = "ArrowDown", c = "Enter", i = "Escape", v = " ", d = "PageUp", K = "Home", E = "PageDown", m = "End", O = (l) => {
|
|
3
|
+
const {
|
|
4
|
+
isDropdownOpen: t,
|
|
5
|
+
disableSpaceHandler: P,
|
|
6
|
+
global: f = !0,
|
|
7
|
+
closeKeys: Y = [i, c]
|
|
8
|
+
} = l, n = _(-1), o = _(-1), w = l.activate === void 0 ? !0 : l.activate, y = () => {
|
|
9
|
+
n.value = -1, o.value = -1, t && (t.value = !1);
|
|
10
|
+
}, k = (e) => {
|
|
11
|
+
t && Y.includes(e) && (t.value = !1);
|
|
12
|
+
}, r = (e) => {
|
|
13
|
+
if (!t?.value || ![
|
|
14
|
+
u,
|
|
15
|
+
a,
|
|
16
|
+
c,
|
|
17
|
+
i,
|
|
18
|
+
v,
|
|
19
|
+
d,
|
|
20
|
+
K,
|
|
21
|
+
E,
|
|
22
|
+
m
|
|
23
|
+
].includes(e.key))
|
|
24
|
+
return;
|
|
25
|
+
const s = p(l.optionsLength);
|
|
26
|
+
if ([u, a, d, E].includes(e.key) && e.preventDefault(), e.key === u)
|
|
27
|
+
n.value = n.value === 0 ? s - 1 : n.value - 1;
|
|
28
|
+
else if (e.key === a)
|
|
29
|
+
n.value = (n.value + 1) % s;
|
|
30
|
+
else if (e.key === c || e.key === v) {
|
|
31
|
+
if (e.key === v && P) return;
|
|
32
|
+
o.value = n.value, k(e.key);
|
|
33
|
+
} else e.key === i ? (n.value = o.value, k(e.key)) : e.key === d || e.key === K ? n.value = 0 : (e.key === E || e.key === m) && (n.value = s - 1);
|
|
34
|
+
e.stopPropagation();
|
|
35
|
+
};
|
|
36
|
+
return w ? (A(() => {
|
|
37
|
+
!document || !f || document.addEventListener("keydown", r);
|
|
38
|
+
}), D(() => {
|
|
39
|
+
!document || !f || document.removeEventListener("keydown", r);
|
|
40
|
+
}), {
|
|
41
|
+
activeIdx: n,
|
|
42
|
+
selectedIdx: o,
|
|
43
|
+
onKeyDownHandler: r,
|
|
44
|
+
$reset: y
|
|
45
|
+
}) : { activeIdx: n, selectedIdx: o, $reset: y, onKeyDownHandler: r };
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
O as useKeyboardController
|
|
49
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -1,93 +1,94 @@
|
|
|
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/ClearableAutocomplete.css';import './assets/BaseAutocomplete.css';import './assets/BaseAlert.css';import './assets/CheckboxBtn.css';import './assets/BaseAccordionItem.css';/* empty css */
|
|
6
|
-
import { default as
|
|
7
|
-
import { default as
|
|
1
|
+
import { default as x } from "./packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js";
|
|
2
|
+
import { default as B } from "./packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js";
|
|
3
|
+
import { default as c } from "./packages/components/lib/UIKit/Accordion/BaseAccordionContent.vue.js";
|
|
4
|
+
import { default as b } 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/ClearableAutocomplete.css';import './assets/BaseAutocomplete.css';import './assets/BaseAlert.css';import './assets/AccessibleSelect.css';import './assets/CheckboxBtn.css';import './assets/BaseAccordionItem.css';/* empty css */
|
|
6
|
+
import { default as g } from "./packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js";
|
|
7
|
+
import { default as h } from "./packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
13
|
-
import { default as
|
|
14
|
-
import { default as
|
|
15
|
-
|
|
9
|
+
import { default as I } from "./packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js";
|
|
10
|
+
import { default as L } from "./packages/components/lib/UIKit/Tab/BaseTabView.vue.js";
|
|
11
|
+
import { default as D } from "./packages/components/lib/UIKit/Tab/BaseTab.vue.js";
|
|
12
|
+
import { default as F } from "./packages/components/lib/UIKit/Radio/RadioButton.vue.js";
|
|
13
|
+
import { default as M } from "./packages/components/lib/UIKit/Radio/RadioGroup.vue.js";
|
|
14
|
+
import { default as R } from "./packages/components/lib/UIKit/AccessibleSelect.vue.js";
|
|
15
|
+
/* empty css */
|
|
16
|
+
import { default as U } from "./packages/components/lib/UIKit/BaseAlert.vue.js";
|
|
16
17
|
/* empty css */
|
|
17
|
-
import { default as
|
|
18
|
+
import { default as j } from "./packages/components/lib/UIKit/BaseAutocomplete.vue.js";
|
|
18
19
|
/* empty css */
|
|
19
|
-
import { default as
|
|
20
|
+
import { default as y } from "./packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js";
|
|
20
21
|
/* empty css */
|
|
21
|
-
import { default as
|
|
22
|
+
import { default as E } from "./packages/components/lib/UIKit/BaseBadge.vue.js";
|
|
22
23
|
/* empty css */
|
|
23
|
-
import { default as
|
|
24
|
-
import { default as
|
|
25
|
-
import { default as
|
|
26
|
-
import { default as
|
|
24
|
+
import { default as J } from "./packages/components/lib/UIKit/BaseButton.vue.js";
|
|
25
|
+
import { default as N } from "./UIKit/BaseCard.js";
|
|
26
|
+
import { default as W } from "./UIKit/BaseComplexToggle.js";
|
|
27
|
+
import { default as Y } from "./packages/components/lib/UIKit/BaseDropDown.vue.js";
|
|
27
28
|
/* empty css */
|
|
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
|
|
36
|
-
import { default as
|
|
29
|
+
import { default as _ } from "./UIKit/BaseFloatingLabel.js";
|
|
30
|
+
import { default as ee } from "./UIKit/BaseInput.js";
|
|
31
|
+
import { default as oe } from "./packages/components/lib/UIKit/BasePagination.vue.js";
|
|
32
|
+
import { default as re } from "./UIKit/BaseSlider.js";
|
|
33
|
+
import { default as se } from "./UIKit/BaseTextarea.js";
|
|
34
|
+
import { default as pe } from "./UIKit/BaseToggle.js";
|
|
35
|
+
import { default as de } from "./UIKit/BaseTooltip.js";
|
|
36
|
+
import { default as xe } from "./packages/components/lib/UIKit/BaseUploadFile.vue.js";
|
|
37
|
+
import { default as Be } from "./packages/components/lib/UIKit/BaseModal.vue.js";
|
|
37
38
|
/* empty css */
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
41
|
-
import { default as
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
39
|
+
import { default as ce } from "./UIKit/StaticSpinner.js";
|
|
40
|
+
import { default as be } from "./UIKit/ShimmerLoader/BaseShimmerLoader.js";
|
|
41
|
+
import { default as ge } from "./packages/components/lib/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js";
|
|
42
|
+
import { default as he } from "./packages/components/lib/chart/DoughnutChart.vue.js";
|
|
43
|
+
import { default as Ie } from "./packages/components/lib/chart/LineChart.vue.js";
|
|
44
|
+
import { default as Le } from "./UIKit/Slider/SimpleSlider.js";
|
|
45
|
+
import { default as De } from "./packages/components/lib/UIKit/BaseSnackbar.vue.js";
|
|
45
46
|
/* empty css */
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
47
|
+
import { default as Fe } from "./packages/components/lib/components/IntersectionObserver/IntersectionObservable.vue.js";
|
|
48
|
+
import { default as Me } from "./packages/components/lib/components/IntersectionObserver/IntersectionObserver.vue.js";
|
|
49
|
+
import { default as Re } from "./components/carousel/SwiperCarousel.js";
|
|
50
|
+
import { default as Ue } from "./components/carousel/SwiperSlide.js";
|
|
51
|
+
import { default as je } from "./packages/components/lib/UIKit/BaseBreadcrumb.vue.js";
|
|
51
52
|
export {
|
|
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
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
53
|
+
R as AccessibleSelect,
|
|
54
|
+
x as BaseAccordion,
|
|
55
|
+
B as BaseAccordionBtn,
|
|
56
|
+
c as BaseAccordionContent,
|
|
57
|
+
b as BaseAccordionItem,
|
|
58
|
+
U as BaseAlert,
|
|
59
|
+
j as BaseAutocomplete,
|
|
60
|
+
E as BaseBadge,
|
|
61
|
+
je as BaseBreadcrumb,
|
|
62
|
+
J as BaseButton,
|
|
63
|
+
N as BaseCard,
|
|
64
|
+
W as BaseComplexToggle,
|
|
65
|
+
Y as BaseDropDown,
|
|
66
|
+
_ as BaseFloatingLabel,
|
|
67
|
+
ee as BaseInput,
|
|
68
|
+
Be as BaseModal,
|
|
69
|
+
oe as BasePagination,
|
|
70
|
+
be as BaseShimmerLoader,
|
|
71
|
+
re as BaseSlider,
|
|
72
|
+
De as BaseSnackbar,
|
|
73
|
+
D as BaseTab,
|
|
74
|
+
L as BaseTabView,
|
|
75
|
+
se as BaseTextarea,
|
|
76
|
+
pe as BaseToggle,
|
|
77
|
+
de as BaseTooltip,
|
|
78
|
+
xe as BaseUploadFile,
|
|
79
|
+
h as CheckboxBtn,
|
|
80
|
+
I as CheckboxGroup,
|
|
81
|
+
y as ClearableAutocomplete,
|
|
82
|
+
he as DoughnutChart,
|
|
83
|
+
Fe as IntersectionObservable,
|
|
84
|
+
Me as IntersectionObserver,
|
|
85
|
+
Ie as LineChart,
|
|
86
|
+
F as RadioButton,
|
|
87
|
+
M as RadioGroup,
|
|
88
|
+
g as SelectItem,
|
|
89
|
+
ge as ShimmerMultiLine,
|
|
90
|
+
Le as SimpleSlider,
|
|
91
|
+
ce as StaticSpinner,
|
|
92
|
+
Re as SwiperCarousel,
|
|
93
|
+
Ue as SwiperSlide
|
|
93
94
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { defineComponent as B, mergeModels as y, useModel as p, useId as F, useTemplateRef as z, computed as C, watch as I, createElementBlock as o, openBlock as l, createVNode as $, createCommentVNode as r, normalizeClass as s, withCtx as x, Fragment as g, renderList as N, withModifiers as f, createElementVNode as u, renderSlot as P, createBlock as A, unref as M } from "vue";
|
|
2
|
+
import { WarningIconRounded as E, ArrowIcon as R } from "@wikicasa-dev/svg-icons";
|
|
3
|
+
import S from "./BaseDropDown.vue.js";
|
|
4
|
+
import '../../../../assets/BaseDropDown.css';/* empty css */
|
|
5
|
+
const q = { class: "uikit-relative uikit-flex uikit-h-12 uikit-items-center" }, K = ["id", "innerHTML"], j = ["onClick"], U = ["id", "data-cy", "aria-required", "aria-controls", "aria-labelledby", "aria-expanded", "aria-activedescendant", "aria-invalid", "aria-describedby", "onClick", "onKeydown"], W = ["innerHTML"], D = { class: "uikit-pointer-events-none uikit-mt-1 uikit-inline-flex" }, G = ["innerHTML"], J = ["id", "aria-selected", "onClick", "onMouseover"], O = { class: "uikit-inline-block uikit-cursor-pointer uikit-text-sm" }, Q = ["name", "checked", "onInput"], X = ["innerHTML"], Y = ["id", "arial-live", "innerHTML"], Z = ["id", "arial-live", "innerHTML"], le = /* @__PURE__ */ B({
|
|
6
6
|
__name: "AccessibleSelect",
|
|
7
|
-
props: /* @__PURE__ */
|
|
7
|
+
props: /* @__PURE__ */ y({
|
|
8
8
|
label: { default: "" },
|
|
9
9
|
dropdownPosition: { default: "bottom" },
|
|
10
10
|
namespace: {},
|
|
@@ -28,179 +28,172 @@ const j = ["id", "innerHTML"], K = ["id", "data-cy", "aria-required", "aria-cont
|
|
|
28
28
|
default: () => ({ id: "", label: "" })
|
|
29
29
|
},
|
|
30
30
|
modelModifiers: {},
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
open: { type: Boolean, default: !1 },
|
|
32
|
+
openModifiers: {}
|
|
33
33
|
}),
|
|
34
|
-
emits: /* @__PURE__ */
|
|
35
|
-
setup(e, { emit:
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
isDropdownOpen: t
|
|
39
|
-
}), w = (i) => {
|
|
40
|
-
t.value = !1, k.value = i;
|
|
34
|
+
emits: /* @__PURE__ */ y(["click", "update:dropdownState"], ["update:modelValue", "update:open"]),
|
|
35
|
+
setup(e, { emit: V }) {
|
|
36
|
+
const T = V, k = p(e, "modelValue"), m = p(e, "open"), L = F(), H = z("dropdownRef"), t = C(() => e.namespace || L), w = C(() => !!k.value.label), h = (i) => {
|
|
37
|
+
m.value = !1, k.value = i;
|
|
41
38
|
};
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
]]),
|
|
71
|
-
innerHTML: e.label
|
|
72
|
-
}, null, 10, j)) : r("", !0),
|
|
73
|
-
i.$slots.lefticon ? (n(), u("span", {
|
|
74
|
-
key: 1,
|
|
75
|
-
class: "uikit-z-20 uikit-mt-2 uikit-pl-2",
|
|
76
|
-
onClick: s[0] || (s[0] = c((d) => t.value = !t.value, ["stop"]))
|
|
77
|
-
}, [
|
|
78
|
-
z(i.$slots, "lefticon")
|
|
79
|
-
])) : r("", !0),
|
|
80
|
-
o("button", {
|
|
81
|
-
id: `${l.value}_btn`,
|
|
82
|
-
ref: "btnEl",
|
|
83
|
-
type: "button",
|
|
84
|
-
"data-cy": e.dataCy,
|
|
85
|
-
class: a(["uikit-peer uikit-relative uikit-z-10 uikit-flex uikit-h-full uikit-w-full uikit-items-center uikit-justify-between uikit-truncate uikit-border-0 uikit-bg-transparent uikit-pr-4 uikit-text-left focus-visible:uikit-outline-0", [i.$slots.lefticon ? "uikit-pl-2" : "uikit-pl-4", e.btnClasses]]),
|
|
86
|
-
"aria-required": !!i.$attrs.required,
|
|
87
|
-
role: "combobox",
|
|
88
|
-
"aria-haspopup": "listbox",
|
|
89
|
-
"aria-controls": `${l.value}_dropdown`,
|
|
90
|
-
"aria-labelledby": `${l.value}_label ${l.value}_btn`,
|
|
91
|
-
"aria-expanded": t.value,
|
|
92
|
-
"aria-activedescendant": b(v) >= 0 && t.value ? `${l.value}_element_${e.options[b(v)].label}` : "",
|
|
93
|
-
"aria-invalid": e.isValid === !1,
|
|
94
|
-
"aria-describedby": e.isValid === !1 ? `${l.value}_invalid_msg` : void 0,
|
|
95
|
-
onClick: s[1] || (s[1] = (d) => {
|
|
96
|
-
t.value = !t.value, y("click", d);
|
|
97
|
-
})
|
|
98
|
-
}, [
|
|
99
|
-
o("span", {
|
|
100
|
-
class: a(["uikit-pointer-events-none uikit-mt-1", e.btnTextClasses]),
|
|
101
|
-
innerHTML: k.value.visibleLabel || k.value.label
|
|
102
|
-
}, null, 10, R),
|
|
103
|
-
o("span", U, [
|
|
104
|
-
e.isValid == !1 ? (n(), A(b(S), {
|
|
39
|
+
return I(
|
|
40
|
+
() => H.value?.selectedIdx,
|
|
41
|
+
(i) => {
|
|
42
|
+
i === void 0 || i === -1 || (h(e.options[i]), m.value = !1);
|
|
43
|
+
}
|
|
44
|
+
), (i, v) => (l(), o("div", null, [
|
|
45
|
+
$(S, {
|
|
46
|
+
ref: "dropdownRef",
|
|
47
|
+
open: m.value,
|
|
48
|
+
"onUpdate:open": v[1] || (v[1] = (d) => m.value = d),
|
|
49
|
+
class: s([e.wrapperClasses]),
|
|
50
|
+
"activate-keyboard-controller": "",
|
|
51
|
+
"close-when-clicked-outside": e.closeOnBodyPressed,
|
|
52
|
+
direction: e.dropdownPosition === "top" ? "up" : "down",
|
|
53
|
+
"dropdown-element": "ul",
|
|
54
|
+
"dropdown-classes": [
|
|
55
|
+
"uikit-select-dropdown uikit-z-30 uikit-mb-0",
|
|
56
|
+
e.dropdownClasses
|
|
57
|
+
],
|
|
58
|
+
"dropdown-attrs": {
|
|
59
|
+
role: "listbox",
|
|
60
|
+
tabindex: -1,
|
|
61
|
+
"aria-multiselectable": !1
|
|
62
|
+
}
|
|
63
|
+
}, {
|
|
64
|
+
btn_slot: x(({ toggleDropdown: d, isOpen: b, activeIdx: a, setSelectedIdx: c }) => [
|
|
65
|
+
u("div", q, [
|
|
66
|
+
e.label ? (l(), o("label", {
|
|
105
67
|
key: 0,
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
class: a(["uikit-transition-transform motion-reduce:uikit-transition-none", [
|
|
113
|
-
t.value ? "uikit-rotate-180" : "",
|
|
114
|
-
e.arrowIcon?.classes
|
|
68
|
+
id: `${t.value}_label`,
|
|
69
|
+
class: s(["uikit-pointer-events-none uikit-absolute uikit-z-10 uikit-text-sm uikit-font-medium uikit-transition-all uikit-ease-in-out", [
|
|
70
|
+
w.value ? "as-floating -uikit-top-1 uikit-left-[22px] uikit-text-w-black" : "as-inline uikit-top-4 uikit-text-w-gray",
|
|
71
|
+
e.labelClasses,
|
|
72
|
+
{ "uikit-left-9": i.$slots.lefticon && !w.value },
|
|
73
|
+
{ "uikit-left-4": !i.$slots.lefticon && !w.value }
|
|
115
74
|
]]),
|
|
116
|
-
width: e.arrowIcon?.width ?? 18,
|
|
117
|
-
height: e.arrowIcon?.height ?? 18,
|
|
118
|
-
"stroke-color": e.isValid ? "#2B5DFF" : e.isValid === !1 ? "#FA4F64" : e.arrowIcon?.strokeColor ?? "#222"
|
|
119
|
-
}, null, 8, ["class", "width", "height", "stroke-color"])
|
|
120
|
-
])
|
|
121
|
-
], 10, K),
|
|
122
|
-
o("fieldset", {
|
|
123
|
-
"aria-hidden": "true",
|
|
124
|
-
class: a(["uikit-pointer-events-none uikit-absolute uikit-bottom-0 uikit-left-0 uikit-right-0 uikit-m-0 uikit-box-border uikit-h-12 uikit-cursor-pointer uikit-rounded-xs uikit-bg-white uikit-px-2 uikit-py-0 peer-focus:uikit-border-2", [
|
|
125
|
-
e.fieldsetClasses,
|
|
126
|
-
e.isValid ? "uikit-border-w-primary" : e.isValid === !1 ? "uikit-border-w-danger" : "uikit-border-w-secondary",
|
|
127
|
-
{
|
|
128
|
-
"uikit-border uikit-border-solid peer-focus:uikit-border-w-primary peer-focus-visible:uikit-border-2 peer-focus-visible:uikit-border-w-primary peer-aria-invalid:uikit-border-w-danger": e.border
|
|
129
|
-
},
|
|
130
|
-
{ "uikit-border-0 peer-focus:uikit-border-0": !e.border }
|
|
131
|
-
]])
|
|
132
|
-
}, [
|
|
133
|
-
o("legend", {
|
|
134
|
-
class: a([[e.legendClasses, { "uikit-m-0 uikit-w-0": !e.label }], "uikit-ml-2 uikit-h-3 uikit-px-0 uikit-text-sm"])
|
|
135
|
-
}, [
|
|
136
|
-
e.label ? (n(), u("span", {
|
|
137
|
-
key: 0,
|
|
138
|
-
class: a(["uikit-mx-5px", [k.value.label ? "uikit-invisible" : "uikit-hidden"]]),
|
|
139
75
|
innerHTML: e.label
|
|
140
|
-
}, null, 10,
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
76
|
+
}, null, 10, K)) : r("", !0),
|
|
77
|
+
i.$slots.lefticon ? (l(), o("span", {
|
|
78
|
+
key: 1,
|
|
79
|
+
class: "uikit-z-20 uikit-mt-2 uikit-pl-2",
|
|
80
|
+
onClick: f((n) => d(), ["stop"])
|
|
81
|
+
}, [
|
|
82
|
+
P(i.$slots, "lefticon")
|
|
83
|
+
], 8, j)) : r("", !0),
|
|
84
|
+
u("button", {
|
|
85
|
+
id: `${t.value}_btn`,
|
|
86
|
+
ref: "btnEl",
|
|
87
|
+
type: "button",
|
|
88
|
+
"data-cy": e.dataCy,
|
|
89
|
+
class: s(["uikit-peer uikit-relative uikit-z-10 uikit-flex uikit-h-full uikit-w-full uikit-items-center uikit-justify-between uikit-truncate uikit-border-0 uikit-bg-transparent uikit-pr-4 uikit-text-left focus-visible:uikit-outline-0", [i.$slots.lefticon ? "uikit-pl-2" : "uikit-pl-4", e.btnClasses]]),
|
|
90
|
+
"aria-required": !!i.$attrs.required,
|
|
91
|
+
role: "combobox",
|
|
92
|
+
"aria-haspopup": "listbox",
|
|
93
|
+
"aria-controls": `${t.value}_dropdown`,
|
|
94
|
+
"aria-labelledby": `${t.value}_label ${t.value}_btn`,
|
|
95
|
+
"aria-expanded": b,
|
|
96
|
+
"aria-activedescendant": a >= 0 && b ? `${t.value}_element_${e.options[a].label}` : "",
|
|
97
|
+
"aria-invalid": e.isValid === !1,
|
|
98
|
+
"aria-describedby": e.isValid === !1 ? `${t.value}_invalid_msg` : void 0,
|
|
99
|
+
onClick: (n) => {
|
|
100
|
+
d(), T("click", n);
|
|
101
|
+
},
|
|
102
|
+
onKeydown: (n) => {
|
|
103
|
+
["Enter", "Space"].includes(n.key) && (n.preventDefault(), n.stopPropagation(), c(a), d());
|
|
104
|
+
}
|
|
105
|
+
}, [
|
|
106
|
+
u("span", {
|
|
107
|
+
class: s(["uikit-pointer-events-none uikit-mt-1", e.btnTextClasses]),
|
|
108
|
+
innerHTML: k.value?.visibleLabel || k.value?.label
|
|
109
|
+
}, null, 10, W),
|
|
110
|
+
u("span", D, [
|
|
111
|
+
e.isValid == !1 ? (l(), A(M(E), {
|
|
112
|
+
key: 0,
|
|
113
|
+
class: "uikit-mr-1",
|
|
114
|
+
width: 20,
|
|
115
|
+
height: 20,
|
|
116
|
+
"stroke-color": "#FA4F64"
|
|
117
|
+
})) : r("", !0),
|
|
118
|
+
$(M(R), {
|
|
119
|
+
class: s(["uikit-transition-transform motion-reduce:uikit-transition-none", [b ? "uikit-rotate-180" : "", e.arrowIcon?.classes]]),
|
|
120
|
+
width: e.arrowIcon?.width ?? 18,
|
|
121
|
+
height: e.arrowIcon?.height ?? 18,
|
|
122
|
+
"stroke-color": e.isValid ? "#2B5DFF" : e.isValid === !1 ? "#FA4F64" : e.arrowIcon?.strokeColor ?? "#222"
|
|
123
|
+
}, null, 8, ["class", "width", "height", "stroke-color"])
|
|
124
|
+
])
|
|
125
|
+
], 42, U),
|
|
126
|
+
u("fieldset", {
|
|
127
|
+
"aria-hidden": "true",
|
|
128
|
+
class: s(["uikit-pointer-events-none uikit-absolute uikit-bottom-0 uikit-left-0 uikit-right-0 uikit-m-0 uikit-box-border uikit-h-12 uikit-cursor-pointer uikit-rounded-xs uikit-bg-white uikit-px-2 uikit-py-0 peer-focus:uikit-border-2", [
|
|
129
|
+
e.fieldsetClasses,
|
|
130
|
+
e.isValid ? "uikit-border-w-primary" : e.isValid === !1 ? "uikit-border-w-danger" : "uikit-border-w-secondary",
|
|
131
|
+
{
|
|
132
|
+
"uikit-border uikit-border-solid peer-focus:uikit-border-w-primary peer-focus-visible:uikit-border-2 peer-focus-visible:uikit-border-w-primary peer-aria-invalid:uikit-border-w-danger": e.border
|
|
133
|
+
},
|
|
134
|
+
{ "uikit-border-0 peer-focus:uikit-border-0": !e.border }
|
|
135
|
+
]])
|
|
136
|
+
}, [
|
|
137
|
+
u("legend", {
|
|
138
|
+
class: s([[e.legendClasses, { "uikit-m-0 uikit-w-0": !e.label }], "uikit-ml-2 uikit-h-3 uikit-px-0 uikit-text-sm"])
|
|
139
|
+
}, [
|
|
140
|
+
e.label ? (l(), o("span", {
|
|
141
|
+
key: 0,
|
|
142
|
+
class: s(["uikit-mx-5px", [
|
|
143
|
+
k.value.label ? "uikit-invisible" : "uikit-hidden"
|
|
144
|
+
]]),
|
|
145
|
+
innerHTML: e.label
|
|
146
|
+
}, null, 10, G)) : r("", !0)
|
|
147
|
+
], 2)
|
|
148
|
+
], 2)
|
|
149
|
+
])
|
|
150
|
+
]),
|
|
151
|
+
default: x(({ activeIdx: d, setActiveIdx: b }) => [
|
|
152
|
+
(l(!0), o(g, null, N(e.options, (a, c) => (l(), o("li", {
|
|
153
|
+
id: `${t.value}_element_${e.options[c].label}`,
|
|
154
|
+
key: `${a.label}_${c}`,
|
|
163
155
|
role: "option",
|
|
164
|
-
"aria-selected":
|
|
165
|
-
class:
|
|
166
|
-
onClick:
|
|
167
|
-
onMouseover:
|
|
168
|
-
onBlur:
|
|
156
|
+
"aria-selected": d === c,
|
|
157
|
+
class: s(["uikit-m-1 uikit-cursor-pointer uikit-px-20px uikit-py-10px uikit-text aria-selected:uikit-rounded-xs aria-selected:uikit-bg-w-cultured", e.dropdownItemClasses]),
|
|
158
|
+
onClick: f((n) => h(a), ["stop"]),
|
|
159
|
+
onMouseover: f((n) => b(c), ["stop"]),
|
|
160
|
+
onBlur: v[0] || (v[0] = f(() => {
|
|
169
161
|
}, ["stop"]))
|
|
170
162
|
}, [
|
|
171
|
-
|
|
172
|
-
|
|
163
|
+
u("label", O, [
|
|
164
|
+
u("input", {
|
|
173
165
|
tabindex: "-1",
|
|
174
166
|
class: "uikit-m-0 uikit-appearance-none",
|
|
175
|
-
name: `${
|
|
167
|
+
name: `${t.value}_radio`,
|
|
176
168
|
type: "radio",
|
|
177
|
-
checked:
|
|
178
|
-
onInput:
|
|
179
|
-
}, null, 40,
|
|
180
|
-
|
|
181
|
-
innerHTML:
|
|
182
|
-
}, null, 8,
|
|
169
|
+
checked: a.label === k.value.label,
|
|
170
|
+
onInput: f((n) => h(a), ["stop"])
|
|
171
|
+
}, null, 40, Q),
|
|
172
|
+
u("span", {
|
|
173
|
+
innerHTML: a.label
|
|
174
|
+
}, null, 8, X)
|
|
183
175
|
])
|
|
184
176
|
], 42, J))), 128))
|
|
185
|
-
],
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
177
|
+
]),
|
|
178
|
+
_: 3
|
|
179
|
+
}, 8, ["open", "class", "close-when-clicked-outside", "direction", "dropdown-classes"]),
|
|
180
|
+
e.feedback ? (l(), o(g, { key: 0 }, [
|
|
181
|
+
e.feedback.valid ? (l(), o("span", {
|
|
189
182
|
key: 0,
|
|
190
|
-
id: `${
|
|
183
|
+
id: `${t.value}_valid_msg`,
|
|
191
184
|
"arial-live": i.$attrs["aria-live"],
|
|
192
185
|
class: "uikit-mt-1 uikit-inline-block uikit-text-12",
|
|
193
186
|
innerHTML: e.isValid ? e.feedback.valid : ""
|
|
194
|
-
}, null, 8,
|
|
195
|
-
e.feedback.invalid ? (
|
|
187
|
+
}, null, 8, Y)) : r("", !0),
|
|
188
|
+
e.feedback.invalid ? (l(), o("span", {
|
|
196
189
|
key: 1,
|
|
197
|
-
id: `${
|
|
190
|
+
id: `${t.value}_invalid_msg`,
|
|
198
191
|
"arial-live": i.$attrs["aria-live"],
|
|
199
192
|
class: "uikit-mt-1 uikit-inline-block uikit-text-12 uikit-text-w-danger",
|
|
200
193
|
innerHTML: e.isValid === !1 ? e.feedback.invalid : ""
|
|
201
|
-
}, null, 8,
|
|
194
|
+
}, null, 8, Z)) : r("", !0)
|
|
202
195
|
], 64)) : r("", !0)
|
|
203
|
-
]
|
|
196
|
+
]));
|
|
204
197
|
}
|
|
205
198
|
});
|
|
206
199
|
export {
|