@wikicasa-dev/components 1.10.1 → 2.0.1
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/BaseButton.js +1 -1
- package/dist/BaseDropDown.js +1 -1
- package/dist/BaseIcon.js +24 -36
- package/dist/BaseModal.js +1 -1
- package/dist/BaseTabList.js +1 -1
- package/dist/BaseTabView.js +1 -1
- package/dist/CheckboxBtn.js +39 -40
- package/dist/CheckboxGroup.js +1 -1
- package/dist/RadioButton.js +1 -1
- package/dist/RadioGroup.js +1 -1
- package/dist/StaticSpinner.js +2 -2
- package/dist/UIKit/AccessibleSelect.vue.d.ts +35 -0
- package/dist/UIKit/BaseButton.vue.d.ts +21 -26
- package/dist/UIKit/BaseDropDown.vue.d.ts +3 -0
- package/dist/UIKit/BaseFloatingLabel.vue.d.ts +1 -1
- package/dist/UIKit/BaseIcon.vue.d.ts +16 -49
- package/dist/UIKit/BaseUploadFile.vue.d.ts +2 -2
- package/dist/UIKit/Checkbox/CheckboxBtn.vue.d.ts +21 -9
- package/dist/UIKit/Checkbox/CheckboxGroup.vue.d.ts +36 -15
- package/dist/UIKit/Radio/RadioButton.vue.d.ts +18 -9
- package/dist/UIKit/Radio/RadioGroup.vue.d.ts +16 -16
- package/dist/UIKit/StaticSpinner.vue.d.ts +1 -4
- package/dist/UIKit/types.d.ts +5 -0
- package/dist/assets/BaseIcon.css +1 -1
- package/dist/assets/CheckboxBtn.css +1 -1
- package/dist/assets/StaticSpinner.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/chunks/{AccessibleSelect.vue_vue_type_script_setup_true_lang.BlYI8zO3.js → AccessibleSelect.vue_vue_type_script_setup_true_lang.MhVm5k0I.js} +43 -35
- package/dist/chunks/{BaseAutocomplete.vue_vue_type_script_setup_true_lang.FVR77AHA.js → BaseAutocomplete.vue_vue_type_script_setup_true_lang.CwGssIPe.js} +1 -1
- package/dist/chunks/BaseButton.vue_vue_type_script_setup_true_lang.BWZPE2Gf.js +66 -0
- package/dist/chunks/{BaseDropDown.vue_vue_type_script_setup_true_lang.B6bPMnvl.js → BaseDropDown.vue_vue_type_script_setup_true_lang.H0XcZCcL.js} +16 -15
- package/dist/chunks/{BaseModal.vue_vue_type_style_index_0_lang.Bl0EkSNw.js → BaseModal.vue_vue_type_style_index_0_lang.CautEumd.js} +2 -2
- package/dist/chunks/{BaseTabView.vue_vue_type_script_setup_true_lang.CrzWV8VV.js → BaseTabView.vue_vue_type_script_setup_true_lang.7M1aa7PG.js} +1 -1
- package/dist/chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.JlHKkjHJ.js +111 -0
- package/dist/chunks/RadioButton.vue_vue_type_script_setup_true_lang.CiJAhkRj.js +58 -0
- package/dist/chunks/RadioGroup.vue_vue_type_script_setup_true_lang.BalzO73O.js +62 -0
- package/dist/index.js +9 -9
- package/package.json +1 -1
- package/dist/chunks/BaseButton.vue_vue_type_script_setup_true_lang.dlLTK59i.js +0 -79
- package/dist/chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.D-AjsQLI.js +0 -100
- package/dist/chunks/RadioButton.vue_vue_type_script_setup_true_lang.DR6a7QAi.js +0 -53
- package/dist/chunks/RadioGroup.vue_vue_type_script_setup_true_lang.BYlMCUWP.js +0 -59
- package/dist/chunks/{BaseTabList.vue_vue_type_script_setup_true_lang.BEX0zH-7.js → BaseTabList.vue_vue_type_script_setup_true_lang.tsvA8m8Z.js} +1 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { defineComponent as y, ref as b, computed as s, openBlock as f, createElementBlock as v, normalizeClass as B, normalizeStyle as C, withModifiers as l, renderSlot as u, createVNode as c } from "vue";
|
|
2
|
+
import M from "../StaticSpinner.js";
|
|
3
|
+
const z = ["id", "data-cy", "type", "data-active", "disabled", "aria-label", "title"], S = /* @__PURE__ */ y({
|
|
4
|
+
__name: "BaseButton",
|
|
5
|
+
props: {
|
|
6
|
+
btnClass: { default: "uikit-btn-w-primary" },
|
|
7
|
+
outlined: { type: Boolean },
|
|
8
|
+
size: {},
|
|
9
|
+
withMinWidth: { type: Boolean, default: !0 },
|
|
10
|
+
keepActive: { type: Boolean },
|
|
11
|
+
isLoading: { type: Boolean },
|
|
12
|
+
disabled: { type: Boolean },
|
|
13
|
+
ariaLabel: {},
|
|
14
|
+
title: {},
|
|
15
|
+
dataCy: {},
|
|
16
|
+
type: {}
|
|
17
|
+
},
|
|
18
|
+
emits: ["mouseover", "mouseout", "click"],
|
|
19
|
+
setup(o, { emit: r }) {
|
|
20
|
+
const a = r, n = b(!1), d = s(() => o.size ? `uikit-btn-${o.size}` : ""), m = s(() => o.outlined ? "uikit-btn-outline" : ""), p = () => {
|
|
21
|
+
n.value = !0;
|
|
22
|
+
}, k = () => {
|
|
23
|
+
n.value = !1;
|
|
24
|
+
};
|
|
25
|
+
return (e, t) => (f(), v("button", {
|
|
26
|
+
id: e.$attrs.id,
|
|
27
|
+
"data-cy": e.dataCy,
|
|
28
|
+
type: e.type,
|
|
29
|
+
class: B([
|
|
30
|
+
"uikit-btn",
|
|
31
|
+
{
|
|
32
|
+
"uikit-btn-empty": !e.withMinWidth,
|
|
33
|
+
"active uikit-font-medium": e.keepActive,
|
|
34
|
+
"uikit-flex uikit-items-center uikit-justify-center": e.isLoading
|
|
35
|
+
},
|
|
36
|
+
e.btnClass,
|
|
37
|
+
d.value,
|
|
38
|
+
m.value
|
|
39
|
+
]),
|
|
40
|
+
style: C(e.$attrs.style),
|
|
41
|
+
"data-active": e.keepActive,
|
|
42
|
+
disabled: e.isLoading || e.disabled,
|
|
43
|
+
"aria-label": e.ariaLabel,
|
|
44
|
+
title: e.title,
|
|
45
|
+
onMouseover: t[0] || (t[0] = l((i) => {
|
|
46
|
+
p(), a("mouseover", i);
|
|
47
|
+
}, ["stop"])),
|
|
48
|
+
onMouseout: t[1] || (t[1] = l((i) => {
|
|
49
|
+
k(), a("mouseout", i);
|
|
50
|
+
}, ["stop"])),
|
|
51
|
+
onClick: t[2] || (t[2] = (i) => a("click", i))
|
|
52
|
+
}, [
|
|
53
|
+
e.isLoading ? u(e.$slots, "spinner", { key: 1 }, () => [
|
|
54
|
+
c(M, {
|
|
55
|
+
"stroke-color": e.outlined ? "#ACB4C3" : "#fff"
|
|
56
|
+
}, null, 8, ["stroke-color"])
|
|
57
|
+
]) : u(e.$slots, "default", {
|
|
58
|
+
key: 0,
|
|
59
|
+
hover: n.value
|
|
60
|
+
})
|
|
61
|
+
], 46, z));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
export {
|
|
65
|
+
S as _
|
|
66
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as T } from "./BaseButton.vue_vue_type_script_setup_true_lang.
|
|
1
|
+
import { defineComponent as D, useId as $, ref as m, computed as L, useTemplateRef as E, watch as r, onBeforeMount as I, onMounted as S, onUnmounted as A, openBlock as s, createElementBlock as O, normalizeClass as i, withModifiers as w, renderSlot as v, createVNode as W, unref as a, withCtx as b, createElementVNode as M, createBlock as h, createCommentVNode as H, resolveDynamicComponent as N } from "vue";
|
|
2
|
+
import { _ as T } from "./BaseButton.vue_vue_type_script_setup_true_lang.BWZPE2Gf.js";
|
|
3
3
|
import { a as V } from "./ArrowIcon.CCFMdsq6.js";
|
|
4
4
|
import "./PharmacyIcon.56ql_DYl.js";
|
|
5
5
|
import { A as K } from "./useKeyboardController.CutKeclN.js";
|
|
6
|
-
const q = ["innerHTML"], G = /* @__PURE__ */
|
|
6
|
+
const q = ["innerHTML"], G = /* @__PURE__ */ D({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "BaseDropDown",
|
|
9
9
|
props: {
|
|
@@ -19,11 +19,12 @@ const q = ["innerHTML"], G = /* @__PURE__ */ $({
|
|
|
19
19
|
closeWhenClickedOutside: { type: Boolean, default: !0 },
|
|
20
20
|
dropdownElement: { default: "div" },
|
|
21
21
|
keepState: { default: "" },
|
|
22
|
-
activateKeyboardController: { type: Boolean, default: !0 }
|
|
22
|
+
activateKeyboardController: { type: Boolean, default: !0 },
|
|
23
|
+
dataCy: { default: "" }
|
|
23
24
|
},
|
|
24
25
|
emits: ["click", "update:dropdownState"],
|
|
25
26
|
setup(y, { emit: C }) {
|
|
26
|
-
const o = y, u =
|
|
27
|
+
const o = y, u = $(), p = C, t = m(!1), n = m([]), g = L(() => n.value.length), c = E("dropdown"), { activeIdx: B, selectedIdx: k } = K({
|
|
27
28
|
optionsLength: g,
|
|
28
29
|
isDropdownOpen: t,
|
|
29
30
|
activate: o.activateKeyboardController
|
|
@@ -37,9 +38,9 @@ const q = ["innerHTML"], G = /* @__PURE__ */ $({
|
|
|
37
38
|
immediate: !0
|
|
38
39
|
}
|
|
39
40
|
), r(t, (e) => {
|
|
40
|
-
|
|
41
|
+
p("update:dropdownState", e);
|
|
41
42
|
}), r(k, (e) => {
|
|
42
|
-
e !== -1 &&
|
|
43
|
+
e !== -1 && n.value[e].querySelector("a")?.click();
|
|
43
44
|
});
|
|
44
45
|
const f = () => {
|
|
45
46
|
t.value = !1;
|
|
@@ -47,15 +48,15 @@ const q = ["innerHTML"], G = /* @__PURE__ */ $({
|
|
|
47
48
|
o.keepState === "closed" && !t.value || o.keepState === "opened" && t.value || (t.value = !t.value);
|
|
48
49
|
};
|
|
49
50
|
return I(() => {
|
|
50
|
-
o.closeWhenClickedOutside && document
|
|
51
|
+
o.closeWhenClickedOutside && document.body.addEventListener("click", f);
|
|
51
52
|
}), S(() => {
|
|
52
|
-
|
|
53
|
+
c.value && (n.value = c.value.children || []);
|
|
53
54
|
}), A(() => {
|
|
54
|
-
o.closeWhenClickedOutside && document
|
|
55
|
-
}), (e,
|
|
55
|
+
o.closeWhenClickedOutside && document.body.removeEventListener("click", f);
|
|
56
|
+
}), (e, l) => (s(), O("div", {
|
|
56
57
|
class: i(["uikit-relative uikit-block", e.$attrs.class]),
|
|
57
|
-
onClick:
|
|
58
|
-
|
|
58
|
+
onClick: l[1] || (l[1] = w((z) => {
|
|
59
|
+
p("click"), d();
|
|
59
60
|
}, ["stop"]))
|
|
60
61
|
}, [
|
|
61
62
|
v(e.$slots, "btn_slot", {
|
|
@@ -65,7 +66,7 @@ const q = ["innerHTML"], G = /* @__PURE__ */ $({
|
|
|
65
66
|
W(T, {
|
|
66
67
|
id: a(u),
|
|
67
68
|
type: "button",
|
|
68
|
-
"data-cy": e
|
|
69
|
+
"data-cy": e.dataCy,
|
|
69
70
|
class: i([
|
|
70
71
|
"!uikit-flex uikit-w-full uikit-items-center uikit-truncate",
|
|
71
72
|
e.btnClasses
|
|
@@ -101,7 +102,7 @@ const q = ["innerHTML"], G = /* @__PURE__ */ $({
|
|
|
101
102
|
{ "uikit-absolute": e.isAbsolute }
|
|
102
103
|
]]),
|
|
103
104
|
"aria-hidden": !t.value,
|
|
104
|
-
onClick:
|
|
105
|
+
onClick: l[0] || (l[0] = w(() => {
|
|
105
106
|
}, ["stop"]))
|
|
106
107
|
}, {
|
|
107
108
|
default: b(() => [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as L, ref as d, onUnmounted as B, watch as E, openBlock as k, createBlock as y, Teleport as $, createElementVNode as l, normalizeClass as o, withModifiers as v, withCtx as T, createVNode as z, unref as H, createCommentVNode as h, renderSlot as n, createElementBlock as O, nextTick as I } from "vue";
|
|
2
2
|
import "./types-B0dZ7OiV.D29wNgoj.js";
|
|
3
|
-
import { _ as K } from "./BaseButton.vue_vue_type_script_setup_true_lang.
|
|
3
|
+
import { _ as K } from "./BaseButton.vue_vue_type_script_setup_true_lang.BWZPE2Gf.js";
|
|
4
4
|
import { l as N } from "./CloseIcon.DIkr4soH.js";
|
|
5
5
|
import "./PharmacyIcon.56ql_DYl.js";
|
|
6
6
|
import '../assets/BaseModal.css';const w = () => navigator?.userAgent.includes("Windows"), V = (a, r) => new Promise((s, u) => {
|
|
@@ -101,7 +101,7 @@ import '../assets/BaseModal.css';const w = () => navigator?.userAgent.includes("
|
|
|
101
101
|
class: o(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent", e.$attrs["close-icon-btn-classes"]]),
|
|
102
102
|
type: "button",
|
|
103
103
|
"aria-label": "Close",
|
|
104
|
-
"
|
|
104
|
+
"with-min-width": !0,
|
|
105
105
|
onClick: v(i, ["prevent", "stop"])
|
|
106
106
|
}, {
|
|
107
107
|
default: T(() => [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as E, mergeModels as k, useModel as M, ref as u, useId as N, useSlots as S, computed as z, provide as b, watch as y, openBlock as n, createElementBlock as C, normalizeClass as I, createElementVNode as j, unref as p, toDisplayString as q, createBlock as o, createCommentVNode as v, Fragment as G, renderList as H, withCtx as J, resolveDynamicComponent as K } from "vue";
|
|
2
2
|
import { _ as O } from "./BaseTabPanel.vue_vue_type_script_setup_true_lang.DoZHWHt1.js";
|
|
3
|
-
import { _ } from "./BaseTabList.vue_vue_type_script_setup_true_lang.
|
|
3
|
+
import { _ } from "./BaseTabList.vue_vue_type_script_setup_true_lang.tsvA8m8Z.js";
|
|
4
4
|
const Q = ["id"], Z = /* @__PURE__ */ E({
|
|
5
5
|
inheritAttrs: !1,
|
|
6
6
|
__name: "BaseTabView",
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { defineComponent as v, ref as x, computed as h, watch as D, renderSlot as m, createElementVNode as E, normalizeClass as $, openBlock as b, createElementBlock as B, Fragment as I, renderList as R, createBlock as A, unref as K, createCommentVNode as L } from "vue";
|
|
2
|
+
import "./types-B0dZ7OiV.D29wNgoj.js";
|
|
3
|
+
import V from "../CheckboxBtn.js";
|
|
4
|
+
const w = (a) => !a?.length, G = (a = "") => !a || !a.trim() ? "" : (a = a.trim(), a.replace(" ", "-").toLowerCase()), S = ["id", "data-cy"], z = /* @__PURE__ */ v({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "CheckboxGroup",
|
|
7
|
+
props: {
|
|
8
|
+
checkboxData: { default() {
|
|
9
|
+
return [];
|
|
10
|
+
} },
|
|
11
|
+
formCheckInline: { type: Boolean, default: !1 },
|
|
12
|
+
reset: { type: Boolean, default: !1 },
|
|
13
|
+
checkboxContainerClasses: { default: "" },
|
|
14
|
+
autoCheckResetAll: { type: Boolean, default: !1 },
|
|
15
|
+
autoCheckResetEmpty: { type: Boolean, default: !1 },
|
|
16
|
+
manualToggleResetButton: { type: Boolean, default: !1 },
|
|
17
|
+
getKey: { default() {
|
|
18
|
+
return (a) => typeof a == "string" || typeof a == "number" ? `${a}` : `${a.id}`;
|
|
19
|
+
} },
|
|
20
|
+
groupId: { default: "" },
|
|
21
|
+
dataCy: { default: "" }
|
|
22
|
+
},
|
|
23
|
+
emits: ["resetted", "update:modelValue", "checkedGroup"],
|
|
24
|
+
setup(a, { emit: g }) {
|
|
25
|
+
const o = a, s = g, l = x(/* @__PURE__ */ new Map()), r = h(() => {
|
|
26
|
+
for (const e of o.checkboxData)
|
|
27
|
+
if (e.reset) return e;
|
|
28
|
+
return null;
|
|
29
|
+
}), C = h(() => o.checkboxData.length), f = h(() => {
|
|
30
|
+
let e = 0;
|
|
31
|
+
return l.value.forEach((t) => {
|
|
32
|
+
t.checked && e++;
|
|
33
|
+
}), e;
|
|
34
|
+
});
|
|
35
|
+
(() => {
|
|
36
|
+
const e = [];
|
|
37
|
+
for (const t of o.checkboxData)
|
|
38
|
+
t.checked = !!t.checked, l.value.set(
|
|
39
|
+
`${t.id}`,
|
|
40
|
+
t
|
|
41
|
+
), t.checked && e.push(t);
|
|
42
|
+
console.log("initialSelected", e), s("update:modelValue", e);
|
|
43
|
+
})();
|
|
44
|
+
const u = (e, t) => {
|
|
45
|
+
const c = l.value.get(e);
|
|
46
|
+
if (c) {
|
|
47
|
+
if (t) {
|
|
48
|
+
l.value.set(e, { ...c, ...t });
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
l.value.set(e, { ...c, checked: !c.checked });
|
|
52
|
+
}
|
|
53
|
+
}, k = () => {
|
|
54
|
+
l.value.forEach((e) => {
|
|
55
|
+
e.checked = !1;
|
|
56
|
+
});
|
|
57
|
+
}, p = () => {
|
|
58
|
+
k(), s("update:modelValue", []), s("resetted");
|
|
59
|
+
}, d = (e) => l.value.get(o.getKey(e))?.checked ?? !1, i = (e) => {
|
|
60
|
+
if (w(o.checkboxData)) return;
|
|
61
|
+
const t = l.value.get(e.id);
|
|
62
|
+
t?.reset && e.checked ? k() : r.value && !t?.reset && u(o.getKey(r.value), { checked: !1 }), u(`${e.id}`), o.autoCheckResetAll && r.value && f.value === C.value - 1 && l.value.forEach((n) => {
|
|
63
|
+
n.checked = !!n.reset;
|
|
64
|
+
}), o.autoCheckResetEmpty && r.value && !f.value && (!o.manualToggleResetButton || !t?.reset) && u(o.getKey(r.value), { checked: !0 });
|
|
65
|
+
const c = [];
|
|
66
|
+
l.value.forEach((n) => {
|
|
67
|
+
n.checked && c.push(n);
|
|
68
|
+
}), s("update:modelValue", c), s("checkedGroup", o.groupId);
|
|
69
|
+
};
|
|
70
|
+
return D(
|
|
71
|
+
() => o.reset,
|
|
72
|
+
(e) => {
|
|
73
|
+
e && p();
|
|
74
|
+
}
|
|
75
|
+
), (e, t) => m(e.$slots, "default", {
|
|
76
|
+
isActive: d,
|
|
77
|
+
handleChange: i,
|
|
78
|
+
checkboxesData: e.checkboxData
|
|
79
|
+
}, () => [
|
|
80
|
+
E("div", {
|
|
81
|
+
id: e.groupId,
|
|
82
|
+
class: $(["checkbox-group-container", e.$attrs.class || ""]),
|
|
83
|
+
"data-cy": e.dataCy
|
|
84
|
+
}, [
|
|
85
|
+
m(e.$slots, "checkbox_elements", {
|
|
86
|
+
isActive: d,
|
|
87
|
+
handleChange: i,
|
|
88
|
+
checkboxesData: e.checkboxData,
|
|
89
|
+
reset: p
|
|
90
|
+
}, () => [
|
|
91
|
+
e.checkboxData ? (b(!0), B(I, { key: 0 }, R(e.checkboxData, (c, n, y) => (b(), A(V, {
|
|
92
|
+
id: e.getKey(c),
|
|
93
|
+
key: y,
|
|
94
|
+
"data-cy": `checkbox_${K(G)(`${c.label}`)}`,
|
|
95
|
+
label: c.label,
|
|
96
|
+
inline: e.formCheckInline,
|
|
97
|
+
"model-value": d(c),
|
|
98
|
+
"container-class": [
|
|
99
|
+
e.formCheckInline ? "uikit-mr-10px" : "uikit-mb-10px",
|
|
100
|
+
e.checkboxContainerClasses
|
|
101
|
+
],
|
|
102
|
+
onChange: i
|
|
103
|
+
}, null, 8, ["id", "data-cy", "label", "inline", "model-value", "container-class"]))), 128)) : L("", !0)
|
|
104
|
+
])
|
|
105
|
+
], 10, S)
|
|
106
|
+
]);
|
|
107
|
+
}
|
|
108
|
+
});
|
|
109
|
+
export {
|
|
110
|
+
z as _
|
|
111
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineComponent as k, useId as m, computed as c, openBlock as p, createElementBlock as b, withModifiers as l, createElementVNode as n, normalizeClass as u, createTextVNode as f, toDisplayString as h } from "vue";
|
|
2
|
+
const C = ["id", "name", "checked"], V = ["for"], y = /* @__PURE__ */ k({
|
|
3
|
+
__name: "RadioButton",
|
|
4
|
+
props: {
|
|
5
|
+
id: {},
|
|
6
|
+
name: {},
|
|
7
|
+
label: {},
|
|
8
|
+
modelValue: { type: Boolean, default: !1 },
|
|
9
|
+
inputClasses: {},
|
|
10
|
+
labelClasses: {}
|
|
11
|
+
},
|
|
12
|
+
emits: ["change", "update:modelValue"],
|
|
13
|
+
setup(i, { emit: d }) {
|
|
14
|
+
const o = d, a = m(), s = c(() => `${i.id ?? a}`), r = () => {
|
|
15
|
+
if (i.modelValue) return;
|
|
16
|
+
const e = {
|
|
17
|
+
id: i.id ?? a,
|
|
18
|
+
label: i.label,
|
|
19
|
+
name: i.name
|
|
20
|
+
};
|
|
21
|
+
o("change", e), o("update:modelValue", !i.modelValue);
|
|
22
|
+
};
|
|
23
|
+
return (e, t) => (p(), b("div", {
|
|
24
|
+
class: "uikit-inline-block",
|
|
25
|
+
onClick: l(r, ["stop"])
|
|
26
|
+
}, [
|
|
27
|
+
n("input", {
|
|
28
|
+
id: s.value,
|
|
29
|
+
ref: "checkbox",
|
|
30
|
+
type: "radio",
|
|
31
|
+
class: "uikit-pointer-events-none uikit-hidden",
|
|
32
|
+
name: e.name,
|
|
33
|
+
checked: e.modelValue,
|
|
34
|
+
onChange: t[0] || (t[0] = l(() => {
|
|
35
|
+
}, ["prevent"])),
|
|
36
|
+
onClick: t[1] || (t[1] = l(() => {
|
|
37
|
+
}, ["prevent"]))
|
|
38
|
+
}, null, 40, C),
|
|
39
|
+
n("label", {
|
|
40
|
+
class: u([e.labelClasses, "uikit-flex uikit-cursor-pointer uikit-items-center uikit-text-sm"]),
|
|
41
|
+
for: s.value
|
|
42
|
+
}, [
|
|
43
|
+
n("span", {
|
|
44
|
+
class: u(["uikit-flex-no-shrink uikit-mr-2 uikit-inline-block uikit-h-4 uikit-w-4 uikit-transform uikit-rounded-full uikit-border uikit-border-solid uikit-border-w-secondary uikit-transition-colors uikit-duration-200", [
|
|
45
|
+
{
|
|
46
|
+
"checked uikit-border-w-primary uikit-bg-w-primary uikit-shadow-[0_0_0_2px_white_inset]": e.modelValue
|
|
47
|
+
},
|
|
48
|
+
e.inputClasses
|
|
49
|
+
]])
|
|
50
|
+
}, null, 2),
|
|
51
|
+
f(" " + h(e.label), 1)
|
|
52
|
+
], 10, V)
|
|
53
|
+
]));
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
export {
|
|
57
|
+
y as _
|
|
58
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { defineComponent as p, mergeModels as d, useModel as C, ref as h, watch as $, renderSlot as u, createElementVNode as V, normalizeClass as c, openBlock as m, createElementBlock as R, Fragment as g, renderList as k, createBlock as y } from "vue";
|
|
2
|
+
import { _ } from "./RadioButton.vue_vue_type_script_setup_true_lang.CiJAhkRj.js";
|
|
3
|
+
const b = ["data-cy"], E = /* @__PURE__ */ p({
|
|
4
|
+
inheritAttrs: !1,
|
|
5
|
+
__name: "RadioGroup",
|
|
6
|
+
props: /* @__PURE__ */ d({
|
|
7
|
+
radioValues: { default: () => [] },
|
|
8
|
+
dataCy: {},
|
|
9
|
+
radioContainerClasses: {}
|
|
10
|
+
}, {
|
|
11
|
+
resetRadio: {
|
|
12
|
+
default: !1
|
|
13
|
+
},
|
|
14
|
+
resetRadioModifiers: {}
|
|
15
|
+
}),
|
|
16
|
+
emits: /* @__PURE__ */ d(["update:modelValue"], ["update:resetRadio"]),
|
|
17
|
+
setup(o, { emit: f }) {
|
|
18
|
+
const i = f, n = C(o, "resetRadio"), a = h(null), l = (e) => {
|
|
19
|
+
a.value = e, i("update:modelValue", e);
|
|
20
|
+
}, t = () => {
|
|
21
|
+
a.value = null, n.value = !1, i("update:modelValue", null);
|
|
22
|
+
}, r = (e) => a.value ? `${a.value.id}` == `${e.id}` : !1;
|
|
23
|
+
return (() => {
|
|
24
|
+
for (const e of o.radioValues)
|
|
25
|
+
if (e.active) {
|
|
26
|
+
l(e);
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
})(), $(n, (e) => {
|
|
30
|
+
console.log("watch:resetRadio", e), e && t();
|
|
31
|
+
}), (e, M) => u(e.$slots, "default", {
|
|
32
|
+
handleClick: l,
|
|
33
|
+
activeValue: a.value,
|
|
34
|
+
reset: t,
|
|
35
|
+
isActive: r
|
|
36
|
+
}, () => [
|
|
37
|
+
V("div", {
|
|
38
|
+
class: c(["radio-group-container", e.$attrs.class]),
|
|
39
|
+
"data-cy": e.dataCy
|
|
40
|
+
}, [
|
|
41
|
+
u(e.$slots, "radio_elements", {
|
|
42
|
+
handleClick: l,
|
|
43
|
+
activeValue: a.value,
|
|
44
|
+
reset: t,
|
|
45
|
+
isActive: r
|
|
46
|
+
}, () => [
|
|
47
|
+
(m(!0), R(g, null, k(e.radioValues, (s, v) => (m(), y(_, {
|
|
48
|
+
id: s.id,
|
|
49
|
+
key: v,
|
|
50
|
+
class: c(e.radioContainerClasses),
|
|
51
|
+
label: `${s.label}`,
|
|
52
|
+
"model-value": `${s.id}` == `${a.value?.id}`,
|
|
53
|
+
onChange: l
|
|
54
|
+
}, null, 8, ["id", "class", "label", "model-value"]))), 128))
|
|
55
|
+
])
|
|
56
|
+
], 10, b)
|
|
57
|
+
]);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
export {
|
|
61
|
+
E as _
|
|
62
|
+
};
|
package/dist/index.js
CHANGED
|
@@ -4,19 +4,19 @@ import { _ as f } from "./chunks/BaseAccordionContent.vue_vue_type_script_setup_
|
|
|
4
4
|
import { _ as m } from "./chunks/BaseAccordionItem.vue_vue_type_script_setup_true_lang.Caagpb9M.js";
|
|
5
5
|
import { _ as l } from "./chunks/SelectItem.vue_vue_type_script_setup_true_lang.GPFf7fjA.js";
|
|
6
6
|
import { default as d } from "./CheckboxBtn.js";
|
|
7
|
-
import { _ as n } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.
|
|
7
|
+
import { _ as n } from "./chunks/CheckboxGroup.vue_vue_type_script_setup_true_lang.JlHKkjHJ.js";
|
|
8
8
|
import { _ } from "./chunks/BaseTab.vue_vue_type_script_setup_true_lang.Cu67jd8K.js";
|
|
9
|
-
import { _ as S } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.
|
|
10
|
-
import { _ as g } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang.
|
|
11
|
-
import { _ as h } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.
|
|
12
|
-
import { _ as I } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.
|
|
9
|
+
import { _ as S } from "./chunks/BaseTabView.vue_vue_type_script_setup_true_lang.7M1aa7PG.js";
|
|
10
|
+
import { _ as g } from "./chunks/RadioButton.vue_vue_type_script_setup_true_lang.CiJAhkRj.js";
|
|
11
|
+
import { _ as h } from "./chunks/RadioGroup.vue_vue_type_script_setup_true_lang.BalzO73O.js";
|
|
12
|
+
import { _ as I } from "./chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.MhVm5k0I.js";
|
|
13
13
|
import { _ as w } from "./chunks/BaseAlert.vue_vue_type_style_index_0_lang.BtqP_iYL.js";
|
|
14
|
-
import { _ as k } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.
|
|
14
|
+
import { _ as k } from "./chunks/BaseAutocomplete.vue_vue_type_script_setup_true_lang.CwGssIPe.js";
|
|
15
15
|
import { _ as v } from "./chunks/BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js";
|
|
16
|
-
import { _ as G } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.
|
|
16
|
+
import { _ as G } from "./chunks/BaseButton.vue_vue_type_script_setup_true_lang.BWZPE2Gf.js";
|
|
17
17
|
import { default as O } from "./BaseCard.js";
|
|
18
18
|
import { default as R } from "./BaseComplexToggle.js";
|
|
19
|
-
import { _ as V } from "./chunks/BaseDropDown.vue_vue_type_script_setup_true_lang.
|
|
19
|
+
import { _ as V } from "./chunks/BaseDropDown.vue_vue_type_script_setup_true_lang.H0XcZCcL.js";
|
|
20
20
|
import { default as q } from "./BaseFloatingLabel.js";
|
|
21
21
|
import { default as z } from "./BaseIcon.js";
|
|
22
22
|
import { default as H } from "./BaseInput.js";
|
|
@@ -27,7 +27,7 @@ import { default as Z } from "./BaseTextarea.js";
|
|
|
27
27
|
import { default as ee } from "./BaseToggle.js";
|
|
28
28
|
import { default as re } from "./BaseTooltip.js";
|
|
29
29
|
import { _ as te } from "./chunks/BaseUploadFile.vue_vue_type_script_setup_true_lang.2elmVcZt.js";
|
|
30
|
-
import { _ as fe } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.
|
|
30
|
+
import { _ as fe } from "./chunks/BaseModal.vue_vue_type_style_index_0_lang.CautEumd.js";
|
|
31
31
|
import { default as me } from "./BaseSnackbar.js";
|
|
32
32
|
import { default as le } from "./StaticSpinner.js";
|
|
33
33
|
import { default as de } from "./BaseShimmerLoader.js";
|
package/package.json
CHANGED
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { defineComponent as v, ref as s, computed as u, onBeforeMount as b, openBlock as r, createElementBlock as B, normalizeClass as $, normalizeStyle as g, withModifiers as d, createBlock as N, createCommentVNode as z, renderSlot as m, createVNode as C } from "vue";
|
|
2
|
-
import L from "../BaseIcon.js";
|
|
3
|
-
import M from "../StaticSpinner.js";
|
|
4
|
-
const H = ["id", "data-cy", "type", "data-active", "disabled", "aria-labelledby"], E = /* @__PURE__ */ v({
|
|
5
|
-
__name: "BaseButton",
|
|
6
|
-
props: {
|
|
7
|
-
lazyLoadIcon: { type: Boolean, default: !0 },
|
|
8
|
-
btnClass: { default: "uikit-btn-w-primary" },
|
|
9
|
-
outlined: { type: Boolean, default: !1 },
|
|
10
|
-
size: { default: "" },
|
|
11
|
-
iconName: { default: "" },
|
|
12
|
-
iconNameHovering: { default: "" },
|
|
13
|
-
iconClass: { default: "uikit-mr-[5px]" },
|
|
14
|
-
isEmpty: { type: Boolean, default: !1 },
|
|
15
|
-
keepActive: { type: Boolean, default: !1 },
|
|
16
|
-
isLoading: { type: Boolean, default: !1 },
|
|
17
|
-
disabled: { type: Boolean, default: !1 }
|
|
18
|
-
},
|
|
19
|
-
emits: ["mouseover", "mouseout", "click"],
|
|
20
|
-
setup(f) {
|
|
21
|
-
const o = f, i = s(!1), n = s(""), p = u(() => o.size ? `uikit-btn-${o.size}` : ""), y = u(() => o.outlined ? "uikit-btn-outline" : "");
|
|
22
|
-
b(() => {
|
|
23
|
-
n.value = o.iconName ?? "";
|
|
24
|
-
});
|
|
25
|
-
const c = () => {
|
|
26
|
-
i.value = !0, o.iconNameHovering && l(o.iconNameHovering);
|
|
27
|
-
}, k = () => {
|
|
28
|
-
i.value = !1, o.iconNameHovering && l(o.iconName);
|
|
29
|
-
}, l = (e) => {
|
|
30
|
-
n.value = e;
|
|
31
|
-
};
|
|
32
|
-
return (e, t) => (r(), B("button", {
|
|
33
|
-
id: e.$attrs.id,
|
|
34
|
-
"data-cy": e.$attrs["data-cy"],
|
|
35
|
-
type: e.$attrs.type,
|
|
36
|
-
class: $([
|
|
37
|
-
{
|
|
38
|
-
"uikit-btn": !e.isEmpty,
|
|
39
|
-
"uikit-btn-empty": e.isEmpty,
|
|
40
|
-
"active uikit-font-medium": e.keepActive,
|
|
41
|
-
"uikit-flex uikit-items-center uikit-justify-center": e.iconName || e.isLoading
|
|
42
|
-
},
|
|
43
|
-
e.btnClass,
|
|
44
|
-
p.value,
|
|
45
|
-
y.value
|
|
46
|
-
]),
|
|
47
|
-
style: g(e.$attrs.style),
|
|
48
|
-
"data-active": e.keepActive,
|
|
49
|
-
disabled: e.isLoading || e.disabled,
|
|
50
|
-
"aria-labelledby": e.$attrs.id,
|
|
51
|
-
onMouseover: t[0] || (t[0] = d((a) => {
|
|
52
|
-
c(), e.$emit("mouseover", a);
|
|
53
|
-
}, ["stop"])),
|
|
54
|
-
onMouseout: t[1] || (t[1] = d((a) => {
|
|
55
|
-
k(), e.$emit("mouseout", a);
|
|
56
|
-
}, ["stop"])),
|
|
57
|
-
onClick: t[2] || (t[2] = (a) => e.$emit("click", a))
|
|
58
|
-
}, [
|
|
59
|
-
e.iconName && !e.isLoading ? (r(), N(L, {
|
|
60
|
-
key: e.$attrs.id ? e.$attrs.id : `btn-${e.iconName}`,
|
|
61
|
-
"icon-name": n.value,
|
|
62
|
-
"icon-class": e.iconClass,
|
|
63
|
-
"alt-attribute": "button icon",
|
|
64
|
-
"lazy-loading": e.lazyLoadIcon
|
|
65
|
-
}, null, 8, ["icon-name", "icon-class", "lazy-loading"])) : z("", !0),
|
|
66
|
-
e.isLoading ? m(e.$slots, "spinner", { key: 2 }, () => [
|
|
67
|
-
C(M, {
|
|
68
|
-
"stroke-color": e.outlined ? "#ACB4C3" : "#fff"
|
|
69
|
-
}, null, 8, ["stroke-color"])
|
|
70
|
-
]) : m(e.$slots, "default", {
|
|
71
|
-
key: 1,
|
|
72
|
-
hover: i.value
|
|
73
|
-
})
|
|
74
|
-
], 46, H));
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
export {
|
|
78
|
-
E as _
|
|
79
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { defineComponent as y, useAttrs as C, ref as j, computed as i, watch as O, renderSlot as p, createElementVNode as $, normalizeClass as B, openBlock as m, createElementBlock as E, Fragment as R, renderList as w, createBlock as A, unref as K, createCommentVNode as L } from "vue";
|
|
2
|
-
import "./types-B0dZ7OiV.D29wNgoj.js";
|
|
3
|
-
import { s as G } from "./ObjectUtils.BOUbloeg.js";
|
|
4
|
-
import D from "../CheckboxBtn.js";
|
|
5
|
-
const I = (l = "") => !l || !l.trim() ? "" : (l = l.trim(), l.replace(" ", "-").toLowerCase()), M = ["id", "data-cy"], q = /* @__PURE__ */ y({
|
|
6
|
-
inheritAttrs: !1,
|
|
7
|
-
__name: "CheckboxGroup",
|
|
8
|
-
props: {
|
|
9
|
-
valuesObj: { default() {
|
|
10
|
-
return {};
|
|
11
|
-
} },
|
|
12
|
-
formCheckInline: { type: Boolean, default: !1 },
|
|
13
|
-
customClass: { default: "" },
|
|
14
|
-
reset: { type: Boolean, default: !1 },
|
|
15
|
-
autoCheckResetAll: { type: Boolean, default: !1 },
|
|
16
|
-
autoCheckResetEmpty: { type: Boolean, default: !1 },
|
|
17
|
-
manualToggleResetButton: { type: Boolean, default: !1 },
|
|
18
|
-
getKey: { default() {
|
|
19
|
-
return (l) => typeof l == "string" || typeof l == "number" ? `${l}` : `${l.id}`;
|
|
20
|
-
} }
|
|
21
|
-
},
|
|
22
|
-
emits: ["resetted", "update:modelValue", "checkedGroup"],
|
|
23
|
-
setup(l, { emit: k }) {
|
|
24
|
-
const v = C(), a = l, r = k, o = j(/* @__PURE__ */ new Map()), n = i(() => {
|
|
25
|
-
for (const e in a.valuesObj) {
|
|
26
|
-
const s = a.valuesObj[e];
|
|
27
|
-
if (s.reset) return s;
|
|
28
|
-
}
|
|
29
|
-
return null;
|
|
30
|
-
}), b = i(
|
|
31
|
-
() => Object.keys(a.valuesObj).length
|
|
32
|
-
), h = i(() => {
|
|
33
|
-
let e = 0;
|
|
34
|
-
return o.value.forEach((s) => {
|
|
35
|
-
s.checked && e++;
|
|
36
|
-
}), e;
|
|
37
|
-
});
|
|
38
|
-
O(
|
|
39
|
-
() => a.reset,
|
|
40
|
-
(e) => {
|
|
41
|
-
e && (f(), r("update:modelValue", []), r("resetted"));
|
|
42
|
-
}
|
|
43
|
-
), (() => {
|
|
44
|
-
const e = [];
|
|
45
|
-
for (const s in a.valuesObj) {
|
|
46
|
-
const t = a.valuesObj[s];
|
|
47
|
-
t.checked = !!t.checked, o.value.set(s, t), t.checked && e.push(t);
|
|
48
|
-
}
|
|
49
|
-
r("update:modelValue", e);
|
|
50
|
-
})();
|
|
51
|
-
const c = (e, s) => {
|
|
52
|
-
const t = o.value.get(e);
|
|
53
|
-
t && o.value.set(e, { ...t, ...s });
|
|
54
|
-
}, f = () => {
|
|
55
|
-
o.value.forEach((e) => {
|
|
56
|
-
e.checked = !1;
|
|
57
|
-
});
|
|
58
|
-
}, u = (e) => o.value.get(a.getKey(e))?.checked ?? !1, d = (e) => {
|
|
59
|
-
if (!a.valuesObj || G(a.valuesObj)) return;
|
|
60
|
-
a.valuesObj[e.id].reset && e.checked ? f() : n.value && !a.valuesObj[e.id].reset && c(a.getKey(n.value), { checked: !1 }), c(e.id, { checked: !!e.checked }), a.autoCheckResetAll && n.value && h.value === b.value - 1 && o.value.forEach((t) => {
|
|
61
|
-
t.checked = !!t.reset;
|
|
62
|
-
}), a.autoCheckResetEmpty && n.value && !h.value && (!a.manualToggleResetButton || !a.valuesObj[e.id].reset) && c(a.getKey(n.value), { checked: !0 });
|
|
63
|
-
const s = [];
|
|
64
|
-
o.value.forEach((t) => {
|
|
65
|
-
t.checked && s.push(t);
|
|
66
|
-
}), r("update:modelValue", s), r("checkedGroup", v["group-id"] || "");
|
|
67
|
-
};
|
|
68
|
-
return (e, s) => p(e.$slots, "default", {
|
|
69
|
-
isActive: u,
|
|
70
|
-
handleChange: d,
|
|
71
|
-
checkboxesData: e.valuesObj
|
|
72
|
-
}, () => [
|
|
73
|
-
$("div", {
|
|
74
|
-
id: e.$attrs["group-id"] || "",
|
|
75
|
-
class: B(["checkbox-group-container", e.$attrs.class || ""]),
|
|
76
|
-
"data-cy": e.$attrs["data-cy"] || ""
|
|
77
|
-
}, [
|
|
78
|
-
p(e.$slots, "checkbox_elements", {
|
|
79
|
-
isActive: u,
|
|
80
|
-
handleChange: d,
|
|
81
|
-
checkboxesData: e.valuesObj
|
|
82
|
-
}, () => [
|
|
83
|
-
e.valuesObj ? (m(!0), E(R, { key: 0 }, w(e.valuesObj, (t, S, g) => (m(), A(D, {
|
|
84
|
-
id: e.getKey(t),
|
|
85
|
-
key: g,
|
|
86
|
-
"data-cy": `checkbox_${K(I)(`${t.label}`)}`,
|
|
87
|
-
label: t.label,
|
|
88
|
-
inline: e.formCheckInline,
|
|
89
|
-
"wrapper-margin-y": e.$attrs["checkbox-padding-y"],
|
|
90
|
-
"model-value": u(t),
|
|
91
|
-
onChange: d
|
|
92
|
-
}, null, 8, ["id", "data-cy", "label", "inline", "wrapper-margin-y", "model-value"]))), 128)) : L("", !0)
|
|
93
|
-
])
|
|
94
|
-
], 10, M)
|
|
95
|
-
]);
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
export {
|
|
99
|
-
q as _
|
|
100
|
-
};
|