@wikicasa-dev/components 1.2.46 → 1.2.48
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/AccessibleSelect.js +1 -1
- package/dist/BaseAutocomplete.js +1 -1
- package/dist/BaseDropDown.js +1 -1
- package/dist/SwiperCarousel.js +1 -1
- package/dist/SwiperSlide.js +14 -0
- package/dist/UIKit/BaseCard.vue.d.ts +2 -2
- package/dist/UIKit/BaseDropDown.vue.d.ts +1 -0
- package/dist/UIKit/BaseInput.vue.d.ts +1 -1
- package/dist/UIKit/Checkbox/CheckboxBtn.vue.d.ts +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.lyHlWiC5.js +239 -0
- package/dist/chunks/{BaseAutocomplete.vue_vue_type_script_setup_true_lang.DkNApxB4.js → BaseAutocomplete.vue_vue_type_script_setup_true_lang.Ct4_y9HP.js} +1 -1
- package/dist/chunks/{BaseDropDown.vue_vue_type_script_setup_true_lang.D9uxpIpT.js → BaseDropDown.vue_vue_type_script_setup_true_lang.C4VH7V0e.js} +18 -15
- package/dist/chunks/{SwiperCarousel.vue_vue_type_style_index_0_lang.BHI3p0bd.js → SwiperCarousel.vue_vue_type_style_index_0_lang.C_fZeeSF.js} +100 -100
- package/dist/chunks/{index.CdEglHxG.js → index.CAhFeT_E.js} +2 -2
- package/dist/components/carousel/SwiperCarousel.vue.d.ts +2 -2
- package/dist/components/carousel/SwiperSlide.vue.d.ts +9 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +15 -13
- package/package.json +2 -1
- package/dist/chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.CJSkDBar.js +0 -204
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
import { h as f, defineComponent as H, ref as y, computed as T, watch as C, onMounted as F, onUnmounted as B, openBlock as l, createElementBlock as o, Fragment as v, createElementVNode as t, normalizeClass as a, createCommentVNode as u, renderSlot as E, unref as k, withModifiers as p, createBlock as A, createVNode as q, renderList as z } from "vue";
|
|
2
|
-
import { useKeyboardController as N } from "../useKeyboardController.js";
|
|
3
|
-
import { d as P } from "./ArrowIcon.CklBXJPN.js";
|
|
4
|
-
import { o as j } from "./DefaultValues-k7iQWtC2.CPFgoBrE.js";
|
|
5
|
-
const D = (n, { attrs: d }) => {
|
|
6
|
-
n = { ...j(), ...n };
|
|
7
|
-
const { width: s, height: e } = n;
|
|
8
|
-
return f(
|
|
9
|
-
"svg",
|
|
10
|
-
{
|
|
11
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
12
|
-
viewBox: "0 0 11.175 13.409",
|
|
13
|
-
width: `${s}`,
|
|
14
|
-
height: `${e}`,
|
|
15
|
-
class: n.class ?? "",
|
|
16
|
-
"aria-hidden": d["aria-hidden"] ?? "true",
|
|
17
|
-
fill: "none",
|
|
18
|
-
stroke: d["stroke-color"] ?? "#FA4F64"
|
|
19
|
-
},
|
|
20
|
-
[
|
|
21
|
-
f("circle", {
|
|
22
|
-
cx: 6,
|
|
23
|
-
cy: 6,
|
|
24
|
-
r: 4.5
|
|
25
|
-
}),
|
|
26
|
-
f("path", {
|
|
27
|
-
"stroke-linejoin": "round",
|
|
28
|
-
d: "M5.8 3.6h.4L6 6.5z"
|
|
29
|
-
}),
|
|
30
|
-
f("circle", {
|
|
31
|
-
cx: 6,
|
|
32
|
-
cy: 8.2,
|
|
33
|
-
r: 0.6,
|
|
34
|
-
fill: d["stroke-color"] ?? "#FA4F64",
|
|
35
|
-
stroke: "none"
|
|
36
|
-
})
|
|
37
|
-
]
|
|
38
|
-
);
|
|
39
|
-
}, S = ["id", "innerHTML"], K = ["id", "data-cy", "aria-required", "aria-controls", "aria-labelledby", "aria-expanded", "aria-activedescendant", "aria-invalid", "aria-describedby"], O = ["innerHTML"], U = { class: "uikit-inline-flex" }, G = ["innerHTML"], I = ["data-cy"], J = ["id", "aria-selected", "onClick", "onMouseover"], Q = { class: "uikit-inline-block uikit-cursor-pointer uikit-text-sm" }, R = ["name", "checked", "onInput"], W = ["innerHTML"], X = ["id", "arial-live", "innerHTML"], Y = ["id", "arial-live", "innerHTML"], ei = /* @__PURE__ */ H({
|
|
40
|
-
inheritAttrs: !1,
|
|
41
|
-
__name: "AccessibleSelect",
|
|
42
|
-
props: {
|
|
43
|
-
label: { default: "" },
|
|
44
|
-
dropdownPosition: { default: "bottom" },
|
|
45
|
-
namespace: {},
|
|
46
|
-
options: {},
|
|
47
|
-
modelValue: { default: () => ({
|
|
48
|
-
id: "",
|
|
49
|
-
label: ""
|
|
50
|
-
}) },
|
|
51
|
-
isValid: { type: [Boolean, null], default: null },
|
|
52
|
-
feedback: {}
|
|
53
|
-
},
|
|
54
|
-
emits: ["update:modelValue"],
|
|
55
|
-
setup(n, { emit: d }) {
|
|
56
|
-
const s = n, e = y(!1), g = y(null), V = T(() => !!s.modelValue.label), L = d, { activeIdx: c, selectedIdx: M } = N({
|
|
57
|
-
optionsLength: s.options.length,
|
|
58
|
-
isDropdownOpen: e
|
|
59
|
-
}), h = (i) => {
|
|
60
|
-
e.value = !1, L("update:modelValue", i);
|
|
61
|
-
};
|
|
62
|
-
C(M, (i) => {
|
|
63
|
-
h(s.options[i]), e.value = !1;
|
|
64
|
-
});
|
|
65
|
-
const w = () => {
|
|
66
|
-
e.value = !1;
|
|
67
|
-
};
|
|
68
|
-
return F(() => {
|
|
69
|
-
document && document.addEventListener("click", w);
|
|
70
|
-
}), B(() => {
|
|
71
|
-
document && document.removeEventListener("click", w);
|
|
72
|
-
}), (i, b) => (l(), o(v, null, [
|
|
73
|
-
t("div", {
|
|
74
|
-
class: a(["uikit-relative uikit-flex uikit-items-center", [i.label ? "uikit-h-[52px]" : "uikit-h-[42px]", i.$attrs.class]])
|
|
75
|
-
}, [
|
|
76
|
-
i.label ? (l(), o("label", {
|
|
77
|
-
key: 0,
|
|
78
|
-
id: `${i.namespace}_label`,
|
|
79
|
-
class: a(["uikit-absolute uikit-text-sm uikit-font-medium uikit-transition-all uikit-ease-in-out", [
|
|
80
|
-
V.value ? "as-floating -uikit-top-1 uikit-left-[22px] uikit-text-w-black" : "as-inline uikit-left-4 uikit-top-4 uikit-text-w-gray",
|
|
81
|
-
i.$attrs["label-classes"]
|
|
82
|
-
]]),
|
|
83
|
-
innerHTML: i.label
|
|
84
|
-
}, null, 10, S)) : u("", !0),
|
|
85
|
-
E(i.$slots, "lefticon"),
|
|
86
|
-
t("button", {
|
|
87
|
-
id: `${i.namespace}_btn`,
|
|
88
|
-
ref_key: "btnEl",
|
|
89
|
-
ref: g,
|
|
90
|
-
type: "button",
|
|
91
|
-
"data-cy": i.$attrs["data-cy"],
|
|
92
|
-
class: a(["uikit-peer uikit-flex uikit-h-full uikit-w-full uikit-items-center uikit-justify-between uikit-truncate uikit-border-0 uikit-bg-white uikit-px-4 uikit-text-left focus-visible:uikit-outline-0", i.$attrs["btn-classes"]]),
|
|
93
|
-
"aria-required": !!i.$attrs.required,
|
|
94
|
-
role: "combobox",
|
|
95
|
-
"aria-haspopup": "listbox",
|
|
96
|
-
"aria-controls": `${i.namespace}_dropdown`,
|
|
97
|
-
"aria-labelledby": `${i.namespace}_label ${i.namespace}_btn`,
|
|
98
|
-
"aria-expanded": e.value,
|
|
99
|
-
"aria-activedescendant": k(c) >= 0 && e.value ? `${i.namespace}_element_${i.options[k(c)].label}` : "",
|
|
100
|
-
"aria-invalid": s.isValid === !1,
|
|
101
|
-
"aria-describedby": s.isValid === !1 ? `${i.namespace}_invalid_msg` : void 0,
|
|
102
|
-
onClick: b[0] || (b[0] = p((r) => e.value = !e.value, ["stop"]))
|
|
103
|
-
}, [
|
|
104
|
-
t("span", {
|
|
105
|
-
class: a(i.$attrs["btn-text-classes"]),
|
|
106
|
-
innerHTML: i.modelValue.visibleLabel || i.modelValue.label
|
|
107
|
-
}, null, 10, O),
|
|
108
|
-
t("span", U, [
|
|
109
|
-
s.isValid == !1 ? (l(), A(k(D), {
|
|
110
|
-
key: 0,
|
|
111
|
-
class: "uikit-mr-1",
|
|
112
|
-
width: 20,
|
|
113
|
-
height: 20
|
|
114
|
-
})) : u("", !0),
|
|
115
|
-
q(k(P), {
|
|
116
|
-
class: a(["uikit-transition-transform motion-reduce:uikit-transition-none", e.value && "uikit-rotate-180"]),
|
|
117
|
-
width: 18,
|
|
118
|
-
height: 18,
|
|
119
|
-
"stroke-color": i.isValid ? "#2B5DFF" : i.isValid === !1 ? "#FA4F64" : "#222"
|
|
120
|
-
}, null, 8, ["class", "stroke-color"])
|
|
121
|
-
])
|
|
122
|
-
], 10, K),
|
|
123
|
-
t("fieldset", {
|
|
124
|
-
"aria-hidden": "true",
|
|
125
|
-
class: a(["uikit-pointer-events-none uikit-absolute -uikit-top-[1px] uikit-bottom-0 uikit-left-0 uikit-right-0 uikit-box-border uikit-cursor-pointer uikit-rounded-xs uikit-border uikit-border-solid uikit-px-2 peer-focus:uikit-border-2 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", [
|
|
126
|
-
i.label ? "uikit-h-12" : "uikit-h-[42px]",
|
|
127
|
-
i.$attrs["fieldset-classes"],
|
|
128
|
-
i.isValid ? "uikit-border-w-primary" : i.isValid === !1 ? "uikit-border-w-danger" : "uikit-border-w-secondary"
|
|
129
|
-
]])
|
|
130
|
-
}, [
|
|
131
|
-
i.label ? (l(), o("legend", {
|
|
132
|
-
key: 0,
|
|
133
|
-
class: a([i.$attrs["legend-classes"], "uikit-ml-2 uikit-h-3 uikit-px-0"])
|
|
134
|
-
}, [
|
|
135
|
-
t("span", {
|
|
136
|
-
class: a(["uikit-mx-5px", i.modelValue.label ? "uikit-invisible" : "uikit-hidden"]),
|
|
137
|
-
innerHTML: i.label
|
|
138
|
-
}, null, 10, G)
|
|
139
|
-
], 2)) : u("", !0)
|
|
140
|
-
], 2),
|
|
141
|
-
t("ul", {
|
|
142
|
-
"data-cy": i.$attrs["data-cy"] && `${i.$attrs["data-cy"]}_dropdown`,
|
|
143
|
-
role: "listbox",
|
|
144
|
-
tabindex: -1,
|
|
145
|
-
"aria-multiselectable": !1,
|
|
146
|
-
class: a(["uikit-absolute uikit-z-10 uikit-m-0 uikit-max-h-[225px] uikit-w-full uikit-min-w-full uikit-list-none uikit-overflow-y-auto uikit-p-0 uikit-no-scrollbar", [
|
|
147
|
-
{ "uikit-h-0 uikit-w-0 uikit-overflow-hidden": !e.value },
|
|
148
|
-
{
|
|
149
|
-
"uikit-rounded-xs uikit-border uikit-border-solid uikit-border-w-secondary uikit-bg-white": e.value
|
|
150
|
-
},
|
|
151
|
-
{ "uikit-bottom-[55px]": i.dropdownPosition === "top" },
|
|
152
|
-
{ "uikit-top-[55px]": i.dropdownPosition === "bottom" },
|
|
153
|
-
i.$attrs["dropdown-classes"]
|
|
154
|
-
]]),
|
|
155
|
-
onClick: b[1] || (b[1] = p(() => {
|
|
156
|
-
}, ["stop"]))
|
|
157
|
-
}, [
|
|
158
|
-
(l(!0), o(v, null, z(i.options, (r, m) => (l(), o("li", {
|
|
159
|
-
id: `${i.namespace}_element_${i.options[m].label}`,
|
|
160
|
-
key: `${r.label}_${m}`,
|
|
161
|
-
role: "option",
|
|
162
|
-
"aria-selected": k(c) === m,
|
|
163
|
-
class: a(["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", i.$attrs["dropdown-item-classes"]]),
|
|
164
|
-
onClick: p(($) => h(r), ["stop"]),
|
|
165
|
-
onMouseover: p(($) => c.value = m, ["stop"])
|
|
166
|
-
}, [
|
|
167
|
-
t("label", Q, [
|
|
168
|
-
t("input", {
|
|
169
|
-
tabindex: "-1",
|
|
170
|
-
class: "uikit-appearance-none",
|
|
171
|
-
name: `${i.namespace}_radio`,
|
|
172
|
-
type: "radio",
|
|
173
|
-
checked: r.label === i.modelValue.label,
|
|
174
|
-
onInput: p(($) => h(r), ["stop"])
|
|
175
|
-
}, null, 40, R),
|
|
176
|
-
t("span", {
|
|
177
|
-
innerHTML: r.label
|
|
178
|
-
}, null, 8, W)
|
|
179
|
-
])
|
|
180
|
-
], 42, J))), 128))
|
|
181
|
-
], 10, I)
|
|
182
|
-
], 2),
|
|
183
|
-
i.feedback ? (l(), o(v, { key: 0 }, [
|
|
184
|
-
i.feedback.valid ? (l(), o("span", {
|
|
185
|
-
key: 0,
|
|
186
|
-
id: `${i.namespace}_valid_msg`,
|
|
187
|
-
"arial-live": i.$attrs["aria-live"],
|
|
188
|
-
class: "uikit-mb-2 uikit-text-sm",
|
|
189
|
-
innerHTML: i.isValid ? i.feedback.valid : ""
|
|
190
|
-
}, null, 8, X)) : u("", !0),
|
|
191
|
-
i.feedback.invalid ? (l(), o("span", {
|
|
192
|
-
key: 1,
|
|
193
|
-
id: `${i.namespace}_invalid_msg`,
|
|
194
|
-
"arial-live": i.$attrs["aria-live"],
|
|
195
|
-
class: "uikit-mb-2 uikit-text-sm uikit-text-w-danger",
|
|
196
|
-
innerHTML: i.isValid === !1 ? i.feedback.invalid : ""
|
|
197
|
-
}, null, 8, Y)) : u("", !0)
|
|
198
|
-
], 64)) : u("", !0)
|
|
199
|
-
], 64));
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
export {
|
|
203
|
-
ei as _
|
|
204
|
-
};
|