@wikicasa-dev/components 2.0.5-0.alpha-6 → 2.0.5
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/BaseAccordion.js +1 -1
- package/dist/BaseAccordionBtn.js +1 -1
- package/dist/BaseAccordionContent.js +1 -1
- package/dist/BaseAccordionItem.js +1 -1
- package/dist/BaseAlert.js +1 -1
- package/dist/BaseAutocomplete.js +1 -1
- package/dist/BaseBadge.js +1 -1
- package/dist/BaseBreadcrumb.js +1 -1
- package/dist/BaseButton.js +1 -1
- package/dist/BaseCard.js +16 -16
- package/dist/BaseComplexToggle.js +4 -4
- package/dist/BaseDropDown.js +1 -1
- package/dist/BaseFloatingLabel.js +19 -21
- package/dist/BaseIcon.js +4 -4
- package/dist/BaseInput.js +100 -106
- package/dist/BaseModal.js +1 -1
- package/dist/BasePagination.js +1 -1
- package/dist/BasePaper.js +2 -2
- package/dist/BaseShimmerLoader.js +2 -2
- package/dist/BaseSlider.js +222 -173
- package/dist/BaseSnackbar.js +3 -3
- package/dist/BaseTabList.js +1 -1
- package/dist/BaseTabPanel.js +1 -1
- package/dist/BaseTabView.js +1 -1
- package/dist/BaseTextarea.js +15 -16
- package/dist/BaseToggle.js +4 -4
- package/dist/BaseTooltip.js +3 -3
- package/dist/BaseUploadFile.js +1 -1
- package/dist/CheckboxBtn.js +6 -10
- package/dist/CheckboxGroup.js +1 -1
- package/dist/DoughnutChart.js +1 -1
- package/dist/IntersectionObservable.js +1 -1
- package/dist/IntersectionObserver.js +1 -1
- package/dist/LineChart.js +1 -1
- package/dist/RadioButton.js +1 -1
- package/dist/RadioGroup.js +1 -1
- package/dist/SelectItem.js +1 -1
- package/dist/ShimmerMultiLine.js +1 -1
- package/dist/StaticSpinner.js +2 -2
- package/dist/SwiperCarousel.js +1 -1
- package/dist/SwiperSlide.js +2 -2
- package/dist/UIKit/AccessibleSelect.vue.d.ts +103 -49
- package/dist/UIKit/Accordion/BaseAccordion.vue.d.ts +12 -9
- package/dist/UIKit/Accordion/BaseAccordionBtn.vue.d.ts +17 -12
- package/dist/UIKit/Accordion/BaseAccordionContent.vue.d.ts +14 -10
- package/dist/UIKit/Accordion/BaseAccordionItem.vue.d.ts +33 -20
- package/dist/UIKit/BaseAlert.vue.d.ts +8 -8
- package/dist/UIKit/BaseAutocomplete.vue.d.ts +198 -39
- package/dist/UIKit/BaseBadge.vue.d.ts +7 -7
- package/dist/UIKit/BaseBreadcrumb.vue.d.ts +10 -8
- package/dist/UIKit/BaseButton.vue.d.ts +30 -17
- package/dist/UIKit/BaseCard.vue.d.ts +23 -14
- package/dist/UIKit/BaseComplexToggle.vue.d.ts +6 -7
- package/dist/UIKit/BaseDropDown.vue.d.ts +40 -39
- package/dist/UIKit/BaseFloatingLabel.vue.d.ts +13 -8
- package/dist/UIKit/BaseIcon.vue.d.ts +9 -3
- package/dist/UIKit/BaseInput.vue.d.ts +20 -20
- package/dist/UIKit/BaseModal.vue.d.ts +60 -35
- package/dist/UIKit/BasePagination.vue.d.ts +14 -7
- package/dist/UIKit/BaseSelect/SelectItem.vue.d.ts +12 -10
- package/dist/UIKit/BaseSlider.vue.d.ts +175 -20
- package/dist/UIKit/BaseSnackbar.vue.d.ts +14 -7
- package/dist/UIKit/BaseTextarea.vue.d.ts +10 -9
- package/dist/UIKit/BaseToggle.vue.d.ts +5 -6
- package/dist/UIKit/BaseTooltip.vue.d.ts +20 -13
- package/dist/UIKit/BaseUploadFile.vue.d.ts +19 -13
- package/dist/UIKit/Checkbox/CheckboxBtn.vue.d.ts +31 -18
- package/dist/UIKit/Checkbox/CheckboxGroup.vue.d.ts +43 -23
- package/dist/UIKit/Radio/RadioButton.vue.d.ts +11 -7
- package/dist/UIKit/Radio/RadioGroup.vue.d.ts +7 -8
- package/dist/UIKit/ShimmerLoader/BaseShimmerLoader.vue.d.ts +6 -6
- package/dist/UIKit/ShimmerLoader/ShimmerMultiLine.vue.d.ts +8 -54
- package/dist/UIKit/StaticSpinner.vue.d.ts +5 -3
- package/dist/UIKit/Tab/BaseTab.vue.d.ts +10 -8
- package/dist/UIKit/Tab/BaseTabList.vue.d.ts +7 -5
- package/dist/UIKit/Tab/BaseTabPanel.vue.d.ts +11 -9
- package/dist/UIKit/Tab/BaseTabView.vue.d.ts +8 -8
- package/dist/UIKit/types.d.ts +1 -4
- package/dist/assets/BaseAlert.css +1 -1
- package/dist/assets/BaseBadge.css +1 -1
- package/dist/assets/BaseCard.css +1 -1
- package/dist/assets/BaseFloatingLabel.css +1 -1
- package/dist/assets/BaseInput.css +1 -1
- package/dist/assets/BaseSlider.css +1 -1
- package/dist/assets/BaseTextarea.css +1 -1
- package/dist/assets/BaseTooltip.css +1 -1
- package/dist/assets/CheckboxBtn.css +1 -1
- package/dist/assets/SwiperCarousel.css +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/chart/DoughnutChart.vue.d.ts +5 -3
- package/dist/chart/LineChart.vue.d.ts +6 -16
- package/dist/chart/composables/useChartjsModules.d.ts +1 -1
- package/dist/chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.YIp2u7gd.js +231 -0
- package/dist/chunks/{ArrowIcon.Bq6Xr3uH.js → ArrowIcon.CCFMdsq6.js} +1 -1
- package/dist/chunks/{BaseAccordion.vue_vue_type_script_setup_true_lang.C34SZThb.js → BaseAccordion.vue_vue_type_script_setup_true_lang.R7qkuKlw.js} +2 -2
- package/dist/chunks/{BaseAccordionBtn.vue_vue_type_script_setup_true_lang.APN3hif2.js → BaseAccordionBtn.vue_vue_type_script_setup_true_lang.DsDqk9iP.js} +4 -4
- package/dist/chunks/{BaseAccordionContent.vue_vue_type_script_setup_true_lang.Dn4qNu2R.js → BaseAccordionContent.vue_vue_type_script_setup_true_lang.C0aiiljz.js} +2 -2
- package/dist/chunks/{BaseAccordionItem.vue_vue_type_script_setup_true_lang.Dpjir3yq.js → BaseAccordionItem.vue_vue_type_script_setup_true_lang.Caagpb9M.js} +8 -8
- package/dist/chunks/{BaseAlert.vue_vue_type_style_index_0_lang.DUWb9d9_.js → BaseAlert.vue_vue_type_style_index_0_lang.BtqP_iYL.js} +2 -2
- package/dist/chunks/{BaseAutocomplete.vue_vue_type_script_setup_true_lang.C64T2OK4.js → BaseAutocomplete.vue_vue_type_script_setup_true_lang.m5rScY4N.js} +84 -89
- package/dist/chunks/{BaseBadge.vue_vue_type_style_index_0_lang.D2PAy8_x.js → BaseBadge.vue_vue_type_style_index_0_lang.BOA1gBKu.js} +2 -2
- package/dist/chunks/{BaseBreadcrumb.vue_vue_type_script_setup_true_lang.DlSPjwQe.js → BaseBreadcrumb.vue_vue_type_script_setup_true_lang.BH2c3gOe.js} +18 -18
- package/dist/chunks/{BaseButton.vue_vue_type_script_setup_true_lang.ChUdDzP1.js → BaseButton.vue_vue_type_script_setup_true_lang.BWZPE2Gf.js} +4 -4
- package/dist/chunks/{BaseDropDown.vue_vue_type_script_setup_true_lang.DoEvtblv.js → BaseDropDown.vue_vue_type_script_setup_true_lang.BscSQ5bW.js} +46 -59
- package/dist/chunks/BaseModal.vue_vue_type_style_index_0_lang.CautEumd.js +142 -0
- package/dist/chunks/BasePagination.vue_vue_type_script_setup_true_lang.DxPb8OYe.js +163 -0
- package/dist/chunks/{BaseTabList.vue_vue_type_script_setup_true_lang.CHOGs5d-.js → BaseTabList.vue_vue_type_script_setup_true_lang.CohlLou1.js} +2 -2
- package/dist/chunks/{BaseTabPanel.vue_vue_type_script_setup_true_lang.CVJUssBq.js → BaseTabPanel.vue_vue_type_script_setup_true_lang.DoZHWHt1.js} +2 -2
- package/dist/chunks/BaseTabView.vue_vue_type_script_setup_true_lang.Ar2KNVYH.js +95 -0
- package/dist/chunks/{BaseUploadFile.vue_vue_type_script_setup_true_lang.Cgu0FMFv.js → BaseUploadFile.vue_vue_type_script_setup_true_lang.2elmVcZt.js} +1 -1
- package/dist/chunks/{CheckboxGroup.vue_vue_type_script_setup_true_lang.CAO5UUO3.js → CheckboxGroup.vue_vue_type_script_setup_true_lang.JlHKkjHJ.js} +37 -37
- package/dist/chunks/{CloseIcon.BZ4U3aiI.js → CloseIcon.DIkr4soH.js} +1 -1
- package/dist/chunks/{DoughnutChart.vue_vue_type_script_setup_true_lang.B8wxbJBV.js → DoughnutChart.vue_vue_type_script_setup_true_lang.C4QPaUsI.js} +3 -3
- package/dist/chunks/{IntersectionObservable.vue_vue_type_script_setup_true_lang.DC17cx-h.js → IntersectionObservable.vue_vue_type_script_setup_true_lang.BBMxY-re.js} +2 -2
- package/dist/chunks/{IntersectionObserver.vue_vue_type_script_setup_true_lang.BKewKDXG.js → IntersectionObserver.vue_vue_type_script_setup_true_lang.CQHjzQc3.js} +2 -2
- package/dist/chunks/LineChart.vue_vue_type_script_setup_true_lang.CNkvmtfq.js +37 -0
- package/dist/chunks/ObjectUtils.BOUbloeg.js +10 -0
- package/dist/chunks/PharmacyIcon.56ql_DYl.js +19 -0
- package/dist/chunks/{RadioButton.vue_vue_type_script_setup_true_lang.DRQnjRA7.js → RadioButton.vue_vue_type_script_setup_true_lang.CiJAhkRj.js} +2 -2
- package/dist/chunks/{RadioGroup.vue_vue_type_script_setup_true_lang.CpsMf2PN.js → RadioGroup.vue_vue_type_script_setup_true_lang.BalzO73O.js} +6 -6
- package/dist/chunks/{SelectItem.vue_vue_type_script_setup_true_lang.Drq_K7Vx.js → SelectItem.vue_vue_type_script_setup_true_lang.GPFf7fjA.js} +2 -2
- package/dist/chunks/{ShimmerMultiLine.vue_vue_type_script_setup_true_lang.CF7CkxXk.js → ShimmerMultiLine.vue_vue_type_script_setup_true_lang.DuLXZx8X.js} +3 -3
- package/dist/chunks/SwiperCarousel.DWUl3bgn.js +718 -0
- package/dist/chunks/{index.D_1s8S8L.js → index.D6IWh9UY.js} +7 -9
- package/dist/chunks/{useBreakpoints.BXk8Xcw3.js → types-B0dZ7OiV.D29wNgoj.js} +832 -2812
- package/dist/chunks/useKeyboardController.CutKeclN.js +41 -0
- package/dist/components/IntersectionObserver/IntersectionObservable.vue.d.ts +9 -10
- package/dist/components/IntersectionObserver/IntersectionObserver.vue.d.ts +2 -5
- package/dist/components/carousel/SwiperCarousel.vue.d.ts +9 -9
- package/dist/components/carousel/SwiperSlide.vue.d.ts +2 -3
- package/dist/index.d.ts +1 -2
- package/dist/index.js +33 -35
- package/dist/useChartjsModules.js +1 -1
- package/package.json +28 -30
- package/dist/SimpleSlider.js +0 -83
- package/dist/UIKit/Slider/SimpleSlider.vue.d.ts +0 -19
- package/dist/assets/SimpleSlider.css +0 -1
- package/dist/chunks/AccessibleSelect.vue_vue_type_script_setup_true_lang.aBS46udY.js +0 -246
- package/dist/chunks/BaseModal.vue_vue_type_style_index_0_lang.Cy2ThBHM.js +0 -151
- package/dist/chunks/BasePagination.vue_vue_type_script_setup_true_lang.D_X7MS6X.js +0 -164
- package/dist/chunks/BaseTabView.vue_vue_type_script_setup_true_lang.CUgJNst9.js +0 -105
- package/dist/chunks/LineChart.vue_vue_type_script_setup_true_lang.CXNsFiyD.js +0 -42
- package/dist/chunks/ObjectUtils.DwkJjVq1.js +0 -10
- package/dist/chunks/PharmacyIcon.DEQ8mOEJ.js +0 -11
- package/dist/chunks/SwiperCarousel.C8hJ7R2K.js +0 -749
- package/dist/chunks/polyline.DjpLdMaW.js +0 -5256
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { _ as
|
|
3
|
-
import { a as
|
|
4
|
-
import "./PharmacyIcon.
|
|
5
|
-
import { A as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as D, useId as S, ref as m, computed as L, useTemplateRef as E, watch as r, onBeforeMount as I, onMounted as A, onUnmounted as O, openBlock as s, createElementBlock as W, normalizeClass as i, withModifiers as w, renderSlot as v, createVNode as $, 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
|
+
import { a as V } from "./ArrowIcon.CCFMdsq6.js";
|
|
4
|
+
import "./PharmacyIcon.56ql_DYl.js";
|
|
5
|
+
import { A as K } from "./useKeyboardController.CutKeclN.js";
|
|
6
|
+
const q = ["innerHTML"], G = /* @__PURE__ */ D({
|
|
7
7
|
inheritAttrs: !1,
|
|
8
8
|
__name: "BaseDropDown",
|
|
9
|
-
props:
|
|
9
|
+
props: {
|
|
10
10
|
dropdownClasses: { default: "" },
|
|
11
11
|
btnClasses: { default: "" },
|
|
12
12
|
withArrowIcon: { type: Boolean, default: !1 },
|
|
@@ -22,20 +22,15 @@ const F = ["innerHTML"], Z = /* @__PURE__ */ M({
|
|
|
22
22
|
keepState: { default: "" },
|
|
23
23
|
activateKeyboardController: { type: Boolean, default: !0 },
|
|
24
24
|
dataCy: { default: "" }
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
}),
|
|
31
|
-
emits: /* @__PURE__ */ b(["click", "update:dropdownState"], ["update:toggleDropdown"]),
|
|
32
|
-
setup(p, { emit: B }) {
|
|
33
|
-
const o = p, c = A(), k = B, f = E(p, "toggleDropdown"), t = h(!1), d = h([]), S = O(() => d.value.length), w = W("dropdown"), { activeIdx: m, selectedIdx: r } = j({
|
|
34
|
-
optionsLength: S,
|
|
25
|
+
},
|
|
26
|
+
emits: ["click", "update:dropdownState"],
|
|
27
|
+
setup(C, { emit: y }) {
|
|
28
|
+
const o = C, u = S(), p = y, t = m(!1), n = m([]), g = L(() => n.value.length), c = E("dropdown"), { activeIdx: B, selectedIdx: k } = K({
|
|
29
|
+
optionsLength: g,
|
|
35
30
|
isDropdownOpen: t,
|
|
36
31
|
activate: o.activateKeyboardController
|
|
37
32
|
});
|
|
38
|
-
|
|
33
|
+
r(
|
|
39
34
|
() => o.openDropdown,
|
|
40
35
|
(e) => {
|
|
41
36
|
t.value = e;
|
|
@@ -43,40 +38,34 @@ const F = ["innerHTML"], Z = /* @__PURE__ */ M({
|
|
|
43
38
|
{
|
|
44
39
|
immediate: !0
|
|
45
40
|
}
|
|
46
|
-
),
|
|
47
|
-
|
|
48
|
-
}),
|
|
49
|
-
e
|
|
50
|
-
}), n(r, (e) => {
|
|
51
|
-
e !== -1 && d.value[e].querySelector("a")?.click();
|
|
41
|
+
), r(t, (e) => {
|
|
42
|
+
p("update:dropdownState", e);
|
|
43
|
+
}), r(k, (e) => {
|
|
44
|
+
e !== -1 && n.value[e].querySelector("a")?.click();
|
|
52
45
|
});
|
|
53
|
-
const
|
|
46
|
+
const f = () => {
|
|
54
47
|
t.value = !1;
|
|
55
|
-
},
|
|
48
|
+
}, d = () => {
|
|
56
49
|
o.keepState === "closed" && !t.value || o.keepState === "opened" && t.value || (t.value = !t.value);
|
|
57
|
-
}, I = (e) => {
|
|
58
|
-
e != null && (m.value = e);
|
|
59
|
-
}, L = (e) => {
|
|
60
|
-
e != null && (r.value = e);
|
|
61
50
|
};
|
|
62
|
-
return
|
|
63
|
-
o.closeWhenClickedOutside && document.body.addEventListener("click",
|
|
64
|
-
}),
|
|
65
|
-
|
|
66
|
-
}),
|
|
67
|
-
o.closeWhenClickedOutside && document.body.removeEventListener("click",
|
|
68
|
-
}), (e,
|
|
51
|
+
return I(() => {
|
|
52
|
+
o.closeWhenClickedOutside && document.body.addEventListener("click", f);
|
|
53
|
+
}), A(() => {
|
|
54
|
+
c.value && (n.value = c.value.children || []);
|
|
55
|
+
}), O(() => {
|
|
56
|
+
o.closeWhenClickedOutside && document.body.removeEventListener("click", f);
|
|
57
|
+
}), (e, l) => (s(), W("div", {
|
|
69
58
|
class: i(["uikit-relative uikit-block", e.$attrs.class]),
|
|
70
|
-
onClick:
|
|
71
|
-
|
|
59
|
+
onClick: l[1] || (l[1] = w((z) => {
|
|
60
|
+
p("click"), d();
|
|
72
61
|
}, ["stop"]))
|
|
73
62
|
}, [
|
|
74
|
-
|
|
75
|
-
toggleDropdown:
|
|
63
|
+
v(e.$slots, "btn_slot", {
|
|
64
|
+
toggleDropdown: d,
|
|
76
65
|
isOpen: t.value
|
|
77
66
|
}, () => [
|
|
78
|
-
|
|
79
|
-
id:
|
|
67
|
+
$(T, {
|
|
68
|
+
id: a(u),
|
|
80
69
|
type: "button",
|
|
81
70
|
"data-cy": e.dataCy,
|
|
82
71
|
class: i([
|
|
@@ -86,24 +75,24 @@ const F = ["innerHTML"], Z = /* @__PURE__ */ M({
|
|
|
86
75
|
"aria-expanded": t.value,
|
|
87
76
|
"btn-class": "uikit-btn-single-selection"
|
|
88
77
|
}, {
|
|
89
|
-
default:
|
|
90
|
-
|
|
78
|
+
default: b(() => [
|
|
79
|
+
M("span", {
|
|
91
80
|
class: i(["uikit-mr-5px", e.labelClasses]),
|
|
92
81
|
innerHTML: e.btnLabel
|
|
93
|
-
}, null, 10,
|
|
94
|
-
e.withArrowIcon ? (
|
|
82
|
+
}, null, 10, q),
|
|
83
|
+
e.withArrowIcon ? (s(), h(a(V), {
|
|
95
84
|
key: 0,
|
|
96
85
|
class: i(["uikit-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", t.value ? "uikit-rotate-180" : ""]),
|
|
97
86
|
width: e.arrowWidth,
|
|
98
87
|
height: e.arrowWidth,
|
|
99
88
|
"stroke-color": e.arrowStrokeColor
|
|
100
|
-
}, null, 8, ["class", "width", "height", "stroke-color"])) :
|
|
89
|
+
}, null, 8, ["class", "width", "height", "stroke-color"])) : H("", !0)
|
|
101
90
|
]),
|
|
102
91
|
_: 1
|
|
103
92
|
}, 8, ["id", "data-cy", "class", "aria-expanded"])
|
|
104
93
|
]),
|
|
105
|
-
(
|
|
106
|
-
id: "dropdown_" +
|
|
94
|
+
(s(), h(N(e.dropdownElement), {
|
|
95
|
+
id: "dropdown_" + a(u),
|
|
107
96
|
ref: "dropdown",
|
|
108
97
|
"data-cy": e.dataCy && `${e.dataCy}_dropdown`,
|
|
109
98
|
class: i(["uikit-max-h-[220px] uikit-w-full uikit-min-w-[90px] uikit-flex-col uikit-overflow-y-auto uikit-border uikit-border-solid uikit-border-w-lavender uikit-bg-white uikit-pl-0 uikit-opacity-100 uikit-shadow uikit-no-scrollbar", [
|
|
@@ -114,17 +103,15 @@ const F = ["innerHTML"], Z = /* @__PURE__ */ M({
|
|
|
114
103
|
{ "uikit-absolute": e.isAbsolute }
|
|
115
104
|
]]),
|
|
116
105
|
"aria-hidden": !t.value,
|
|
117
|
-
onClick:
|
|
106
|
+
onClick: l[0] || (l[0] = w(() => {
|
|
118
107
|
}, ["stop"]))
|
|
119
108
|
}, {
|
|
120
|
-
default:
|
|
121
|
-
|
|
109
|
+
default: b(() => [
|
|
110
|
+
v(e.$slots, "default", {
|
|
122
111
|
isOpen: t.value,
|
|
123
|
-
toggleDropdown:
|
|
124
|
-
activeIdx:
|
|
125
|
-
selectedIdx:
|
|
126
|
-
setActiveIdx: I,
|
|
127
|
-
setSelectedIdx: L
|
|
112
|
+
toggleDropdown: d,
|
|
113
|
+
activeIdx: a(B),
|
|
114
|
+
selectedIdx: a(k)
|
|
128
115
|
})
|
|
129
116
|
]),
|
|
130
117
|
_: 3
|
|
@@ -133,5 +120,5 @@ const F = ["innerHTML"], Z = /* @__PURE__ */ M({
|
|
|
133
120
|
}
|
|
134
121
|
});
|
|
135
122
|
export {
|
|
136
|
-
|
|
123
|
+
G as _
|
|
137
124
|
};
|
|
@@ -0,0 +1,142 @@
|
|
|
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
|
+
import "./types-B0dZ7OiV.D29wNgoj.js";
|
|
3
|
+
import { _ as K } from "./BaseButton.vue_vue_type_script_setup_true_lang.BWZPE2Gf.js";
|
|
4
|
+
import { l as N } from "./CloseIcon.DIkr4soH.js";
|
|
5
|
+
import "./PharmacyIcon.56ql_DYl.js";
|
|
6
|
+
import '../assets/BaseModal.css';const w = () => navigator?.userAgent.includes("Windows"), V = (a, r) => new Promise((s, u) => {
|
|
7
|
+
setTimeout(() => {
|
|
8
|
+
try {
|
|
9
|
+
a && a(), s();
|
|
10
|
+
} catch {
|
|
11
|
+
u();
|
|
12
|
+
}
|
|
13
|
+
}, r);
|
|
14
|
+
}), A = ["id", "data-cy"], D = ["innerHTML"], j = /* @__PURE__ */ L({
|
|
15
|
+
__name: "BaseModal",
|
|
16
|
+
props: {
|
|
17
|
+
id: { default: "base-bt-modal" },
|
|
18
|
+
size: { default: "modal-md" },
|
|
19
|
+
customBackdropClasses: { default: "" },
|
|
20
|
+
customModalDialogClasses: { default: "" },
|
|
21
|
+
customModalHeaderClasses: { default: "" },
|
|
22
|
+
customModalBodyClasses: { default: "" },
|
|
23
|
+
customModalFooterClasses: { default: "" },
|
|
24
|
+
withCloseIcon: { type: Boolean, default: !0 },
|
|
25
|
+
showModal: { type: Boolean, default: !0 },
|
|
26
|
+
closeIcon: { default: "" },
|
|
27
|
+
headerTitle: { default: "" },
|
|
28
|
+
autoClose: {},
|
|
29
|
+
fullHeight: { type: Boolean, default: !1 },
|
|
30
|
+
closeOnClickOut: { type: Boolean, default: !0 },
|
|
31
|
+
centered: { type: Boolean, default: !1 }
|
|
32
|
+
},
|
|
33
|
+
emits: ["closed", "opened"],
|
|
34
|
+
setup(a, { emit: r }) {
|
|
35
|
+
const s = a, u = r, t = d(!1), m = d(null), g = d(null), c = d(!1), p = ({ key: e }) => {
|
|
36
|
+
e === "Escape" && i();
|
|
37
|
+
}, C = () => {
|
|
38
|
+
document?.body.addEventListener("keydown", p);
|
|
39
|
+
}, f = () => {
|
|
40
|
+
document?.body.removeEventListener("keydown", p);
|
|
41
|
+
}, x = async () => {
|
|
42
|
+
t.value = !0, I(() => {
|
|
43
|
+
C(), document?.documentElement.classList.add("uikit-no-scrolling"), w() ? document?.body.classList.add("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.add("uikit-no-scrolling");
|
|
44
|
+
}), u("opened"), s.autoClose !== void 0 && setTimeout(() => {
|
|
45
|
+
i();
|
|
46
|
+
}, s.autoClose);
|
|
47
|
+
}, M = async () => {
|
|
48
|
+
s.closeOnClickOut && await i();
|
|
49
|
+
}, i = async () => {
|
|
50
|
+
t.value = !1, f(), 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 V(() => {
|
|
51
|
+
m.value?.classList.add("uikit-hidden"), u("closed");
|
|
52
|
+
}, 250);
|
|
53
|
+
};
|
|
54
|
+
return B(() => {
|
|
55
|
+
f(), document?.documentElement.classList.remove("uikit-no-scrolling"), w() ? document?.body.classList.remove("uikit-no-scrolling", "sm:uikit-pr-15px") : document?.body.classList.remove("uikit-no-scrolling");
|
|
56
|
+
}), E(
|
|
57
|
+
() => s.showModal,
|
|
58
|
+
async (e) => {
|
|
59
|
+
!e && !t.value ? c.value = !0 : c.value = !1, e && !t.value && await x(), !e && t.value && await i(), t.value = e;
|
|
60
|
+
},
|
|
61
|
+
{ immediate: !0 }
|
|
62
|
+
), (e, b) => (k(), y($, { to: "body" }, [
|
|
63
|
+
l("div", {
|
|
64
|
+
ref_key: "backdropEl",
|
|
65
|
+
ref: m,
|
|
66
|
+
class: o(["bbt-backdrop uikit-fixed uikit-left-0 uikit-top-0 uikit-h-full uikit-w-full", [
|
|
67
|
+
e.customBackdropClasses,
|
|
68
|
+
{
|
|
69
|
+
"uikit-animate-[backdrop-opacity_0.3s_ease-out_0s_backwards] uikit-bg-w-secondary/70": t.value
|
|
70
|
+
},
|
|
71
|
+
{ "uikit-bg-transparent": !t.value },
|
|
72
|
+
{ "sm:uikit-pt-[30px]": !e.centered },
|
|
73
|
+
{ hide: c.value }
|
|
74
|
+
]]),
|
|
75
|
+
style: { "z-index": "1062" },
|
|
76
|
+
onClick: M
|
|
77
|
+
}, [
|
|
78
|
+
l("dialog", {
|
|
79
|
+
id: e.id,
|
|
80
|
+
ref_key: "modalEl",
|
|
81
|
+
ref: g,
|
|
82
|
+
"data-cy": e.$attrs["data-cy"],
|
|
83
|
+
class: o(["uikit-modal-dialog transition-y uikit-mx-auto uikit-block uikit-w-full uikit-overflow-y-auto uikit-overflow-x-hidden uikit-rounded uikit-border-none uikit-bg-transparent uikit-bg-white uikit-p-0 uikit-shadow-lg uikit-no-scrollbar uikit-safe-bottom max-sm:uikit-fixed max-sm:uikit-bottom-0 max-sm:uikit-max-h-[95%] max-sm:uikit-rounded-bl-none max-sm:uikit-rounded-br-none sm:uikit-h-auto", [
|
|
84
|
+
e.customModalDialogClasses,
|
|
85
|
+
{ show: t.value },
|
|
86
|
+
{ "closed uikit-overflow-hidden": !t.value },
|
|
87
|
+
{ centered: e.centered },
|
|
88
|
+
`base-${e.size}`,
|
|
89
|
+
e.fullHeight ? "uikit-h-[95%]" : "uikit-h-auto"
|
|
90
|
+
]]),
|
|
91
|
+
onClick: b[0] || (b[0] = v(() => {
|
|
92
|
+
}, ["stop"]))
|
|
93
|
+
}, [
|
|
94
|
+
l("div", {
|
|
95
|
+
class: o(["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]])
|
|
96
|
+
}, [
|
|
97
|
+
e.withCloseIcon ? (k(), y(K, {
|
|
98
|
+
key: 0,
|
|
99
|
+
id: "close-icon-btn",
|
|
100
|
+
"data-cy": "bbt-default-close-icon-btn",
|
|
101
|
+
class: o(["uikit-absolute uikit-right-15px uikit-top-15px uikit-z-10 uikit-bg-transparent", e.$attrs["close-icon-btn-classes"]]),
|
|
102
|
+
type: "button",
|
|
103
|
+
"aria-label": "Close",
|
|
104
|
+
"with-min-width": !0,
|
|
105
|
+
onClick: v(i, ["prevent", "stop"])
|
|
106
|
+
}, {
|
|
107
|
+
default: T(() => [
|
|
108
|
+
z(H(N), {
|
|
109
|
+
class: "bbt-close-icon uikit-box-border uikit-p-5px",
|
|
110
|
+
width: 30,
|
|
111
|
+
height: 30
|
|
112
|
+
})
|
|
113
|
+
]),
|
|
114
|
+
_: 1
|
|
115
|
+
}, 8, ["class"])) : h("", !0),
|
|
116
|
+
n(e.$slots, "header", { closeModal: i }, () => [
|
|
117
|
+
l("span", {
|
|
118
|
+
class: o(["uikit-w-auto uikit-text-18 uikit-font-semibold sm:uikit-text-22", e.$attrs["title-classes"]]),
|
|
119
|
+
innerHTML: e.headerTitle
|
|
120
|
+
}, null, 10, D)
|
|
121
|
+
])
|
|
122
|
+
], 2),
|
|
123
|
+
l("div", {
|
|
124
|
+
class: o(["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]])
|
|
125
|
+
}, [
|
|
126
|
+
n(e.$slots, "body", { closeModal: i })
|
|
127
|
+
], 2),
|
|
128
|
+
e.$slots.footer ? (k(), O("div", {
|
|
129
|
+
key: 0,
|
|
130
|
+
class: o(["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])
|
|
131
|
+
}, [
|
|
132
|
+
n(e.$slots, "footer", { closeModal: i })
|
|
133
|
+
], 2)) : h("", !0),
|
|
134
|
+
n(e.$slots, "fixed-bottom")
|
|
135
|
+
], 10, A)
|
|
136
|
+
], 2)
|
|
137
|
+
]));
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
export {
|
|
141
|
+
j as _
|
|
142
|
+
};
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { defineComponent as P, mergeModels as S, useModel as $, computed as k, openBlock as r, createElementBlock as n, createElementVNode as h, normalizeClass as g, createVNode as y, unref as p, toDisplayString as v, createCommentVNode as a, Fragment as m, renderList as C } from "vue";
|
|
2
|
+
import "./types-B0dZ7OiV.D29wNgoj.js";
|
|
3
|
+
import { a as N } from "./ArrowIcon.CCFMdsq6.js";
|
|
4
|
+
import "./PharmacyIcon.56ql_DYl.js";
|
|
5
|
+
function d(s, l = !1) {
|
|
6
|
+
return s == null ? "" : B(l ? Math.round(s) : Math.floor(s), 0);
|
|
7
|
+
}
|
|
8
|
+
function B(s, l) {
|
|
9
|
+
return !s && s !== 0 ? "" : s.toLocaleString(
|
|
10
|
+
"it-IT",
|
|
11
|
+
// usare una stringa tipo 'en-US' per sovrascrivere la lingua del browser
|
|
12
|
+
{
|
|
13
|
+
minimumFractionDigits: l,
|
|
14
|
+
maximumFractionDigits: l
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
const F = {
|
|
19
|
+
"aria-label": "Page navigation",
|
|
20
|
+
class: "uikit-overflow-auto"
|
|
21
|
+
}, _ = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "uikit-text-14 uikit-m-0 uikit-flex uikit-list-none uikit-content-center uikit-gap-4 uikit-p-0 uikit-pl-0 uikit-font-semibold sm:uikit-gap-5"
|
|
24
|
+
}, D = {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: "uikit-mx-10px uikit-select-none"
|
|
27
|
+
}, O = {
|
|
28
|
+
key: 1,
|
|
29
|
+
class: "font-weight-bold uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white"
|
|
30
|
+
}, V = ["onClick"], A = ["onClick"], E = {
|
|
31
|
+
key: 0,
|
|
32
|
+
class: "uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white"
|
|
33
|
+
}, z = {
|
|
34
|
+
key: 0,
|
|
35
|
+
class: "uikit-mx-10px uikit-select-none"
|
|
36
|
+
}, J = /* @__PURE__ */ P({
|
|
37
|
+
__name: "BasePagination",
|
|
38
|
+
props: /* @__PURE__ */ S({
|
|
39
|
+
count: { default: 0 },
|
|
40
|
+
limit: { default: 25 },
|
|
41
|
+
siblings: { default: 3 },
|
|
42
|
+
additionalCount: { default: 0 },
|
|
43
|
+
arrowColor: { default: "#2B5DFF" },
|
|
44
|
+
small: { type: Boolean, default: !1 },
|
|
45
|
+
prevLabel: { default: "" },
|
|
46
|
+
nextLabel: { default: "" }
|
|
47
|
+
}, {
|
|
48
|
+
pageNumber: { default: 1 },
|
|
49
|
+
pageNumberModifiers: {}
|
|
50
|
+
}),
|
|
51
|
+
emits: ["update:pageNumber"],
|
|
52
|
+
setup(s) {
|
|
53
|
+
const l = s, u = $(s, "pageNumber"), o = k(
|
|
54
|
+
() => Math.ceil((l.count + l.additionalCount) / l.limit)
|
|
55
|
+
), f = k(
|
|
56
|
+
() => (u.value || 0) > l.siblings + 2
|
|
57
|
+
), b = k(
|
|
58
|
+
() => (u.value || 0) < o.value - l.siblings - 1
|
|
59
|
+
), w = k(() => {
|
|
60
|
+
let i = u.value || 0, t = 0;
|
|
61
|
+
for (; i > 2 && t < l.siblings; )
|
|
62
|
+
i--, t++;
|
|
63
|
+
return t;
|
|
64
|
+
}), x = k(() => {
|
|
65
|
+
let i = u.value || 0, t = 0;
|
|
66
|
+
for (; i < o.value - 1 && t < l.siblings; )
|
|
67
|
+
i++, t++;
|
|
68
|
+
return t;
|
|
69
|
+
}), M = k(() => {
|
|
70
|
+
const e = w.value + /* Filling with the remaining right siblings */
|
|
71
|
+
Math.abs(x.value - l.siblings) + /* If there is no suspension points on the right, let's fill it */
|
|
72
|
+
new Number(!b.value).valueOf() + /* If the pageNumber is the same of the last, let's fill it */
|
|
73
|
+
new Number(u.value === o.value).valueOf();
|
|
74
|
+
let i = Math.max((u.value || 0) - e, 2);
|
|
75
|
+
const t = [];
|
|
76
|
+
for (i; i < (u.value || 0); i++) t.push(i);
|
|
77
|
+
return t;
|
|
78
|
+
}), L = k(() => {
|
|
79
|
+
const e = x.value + /* Filling with the remaining left siblings */
|
|
80
|
+
Math.abs(w.value - l.siblings) + /* If there is no suspension points on the left, let's fill it */
|
|
81
|
+
new Number(!f.value).valueOf() + /* If the pageNumber is the same of the firstPage, let's fill it */
|
|
82
|
+
new Number(u.value === 1).valueOf();
|
|
83
|
+
let i = Math.min(u.value || 0, o.value - 1);
|
|
84
|
+
const t = [];
|
|
85
|
+
for (i; i < Math.min((u.value || 0) + e, o.value - 1); i++)
|
|
86
|
+
t.push(i + 1);
|
|
87
|
+
return t;
|
|
88
|
+
}), c = (e) => {
|
|
89
|
+
let i = e;
|
|
90
|
+
e < 1 ? i = 1 : e > o.value && (i = o.value), u.value = i;
|
|
91
|
+
};
|
|
92
|
+
return (e, i) => (r(), n("nav", F, [
|
|
93
|
+
l.count > 0 ? (r(), n("ul", _, [
|
|
94
|
+
h("li", {
|
|
95
|
+
class: g(["arrow-button prev-page uikit-h-30x uikit-flex uikit-min-w-[30px] uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px", {
|
|
96
|
+
"uikit-cursor-pointer hover:uikit-bg-w-primary [&_>_svg]:hover:uikit-brightness-0 [&_>_svg]:hover:uikit-invert": u.value !== 1,
|
|
97
|
+
" hover:uikit-text-white": e.small && u.value !== 1,
|
|
98
|
+
"uikit-rounded-xs": e.small && e.prevLabel
|
|
99
|
+
}]),
|
|
100
|
+
onClick: i[0] || (i[0] = (t) => c((u.value || 0) - 1))
|
|
101
|
+
}, [
|
|
102
|
+
y(p(N), {
|
|
103
|
+
width: 20,
|
|
104
|
+
height: 11,
|
|
105
|
+
"stroke-color": u.value === 1 ? "#8996A9" : e.arrowColor,
|
|
106
|
+
class: "uikit-inline-block uikit-rotate-90"
|
|
107
|
+
}, null, 8, ["stroke-color"]),
|
|
108
|
+
e.small && e.prevLabel ? (r(), n("span", D, v(e.prevLabel), 1)) : a("", !0)
|
|
109
|
+
], 2),
|
|
110
|
+
e.small ? a("", !0) : (r(), n(m, { key: 0 }, [
|
|
111
|
+
(u.value || 0) > 1 ? (r(), n("li", {
|
|
112
|
+
key: 0,
|
|
113
|
+
class: "page uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white",
|
|
114
|
+
onClick: i[1] || (i[1] = (t) => c(0))
|
|
115
|
+
}, " 1 ")) : a("", !0),
|
|
116
|
+
f.value ? (r(), n("li", O, " ... ")) : a("", !0),
|
|
117
|
+
(r(!0), n(m, null, C(M.value, (t) => (r(), n("li", {
|
|
118
|
+
key: t,
|
|
119
|
+
class: "uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white",
|
|
120
|
+
onClick: (j) => c(t)
|
|
121
|
+
}, v(p(d)(t)), 9, V))), 128))
|
|
122
|
+
], 64)),
|
|
123
|
+
h("li", {
|
|
124
|
+
class: g(["selected uikit-pointer-events-none uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px", {
|
|
125
|
+
"uikit-bg-w-primary uikit-text-white hover:uikit-bg-w-primary hover:uikit-text-white": !e.small
|
|
126
|
+
}])
|
|
127
|
+
}, v(u.value || 0), 3),
|
|
128
|
+
e.small ? a("", !0) : (r(), n(m, { key: 1 }, [
|
|
129
|
+
(r(!0), n(m, null, C(L.value, (t) => (r(), n("li", {
|
|
130
|
+
key: t,
|
|
131
|
+
class: "uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white",
|
|
132
|
+
onClick: (j) => c(t)
|
|
133
|
+
}, v(p(d)(t)), 9, A))), 128)),
|
|
134
|
+
b.value ? (r(), n("li", E, " ... ")) : a("", !0),
|
|
135
|
+
(u.value || 0) < o.value ? (r(), n("li", {
|
|
136
|
+
key: 1,
|
|
137
|
+
class: "uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-cursor-pointer uikit-select-none uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px hover:uikit-bg-w-primary hover:uikit-text-white",
|
|
138
|
+
onClick: i[2] || (i[2] = (t) => c(o.value))
|
|
139
|
+
}, v(p(d)(o.value)), 1)) : a("", !0)
|
|
140
|
+
], 64)),
|
|
141
|
+
h("li", {
|
|
142
|
+
class: g(["arrow-button next-page uikit-flex uikit-h-30px uikit-min-w-[30px] uikit-items-center uikit-justify-center uikit-rounded-circle uikit-p-5px", {
|
|
143
|
+
"uikit-cursor-pointer hover:uikit-bg-w-primary [&_>_svg]:hover:uikit-brightness-0 [&_>_svg]:hover:uikit-invert": (u.value || 0) < o.value,
|
|
144
|
+
" hover:uikit-text-white": e.small && (u.value || 0) < o.value,
|
|
145
|
+
"uikit-rounded-xs": e.small && e.nextLabel
|
|
146
|
+
}]),
|
|
147
|
+
onClick: i[3] || (i[3] = (t) => c((u.value || 0) + 1))
|
|
148
|
+
}, [
|
|
149
|
+
e.small && e.nextLabel ? (r(), n("span", z, v(e.nextLabel), 1)) : a("", !0),
|
|
150
|
+
y(p(N), {
|
|
151
|
+
"stroke-color": (u.value || 0) === o.value ? "#8996A9" : e.arrowColor,
|
|
152
|
+
width: 20,
|
|
153
|
+
height: 11,
|
|
154
|
+
class: "uikit-inline-block -uikit-rotate-90"
|
|
155
|
+
}, null, 8, ["stroke-color"])
|
|
156
|
+
], 2)
|
|
157
|
+
])) : a("", !0)
|
|
158
|
+
]));
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
export {
|
|
162
|
+
J as _
|
|
163
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as p, inject as l,
|
|
1
|
+
import { defineComponent as p, inject as l, openBlock as a, createElementBlock as r, normalizeClass as o, Fragment as m, renderList as h, unref as i, toDisplayString as y, createBlock as C, resolveDynamicComponent as _, createCommentVNode as f } from "vue";
|
|
2
2
|
const v = ["aria-labelledby"], B = ["id", "data-cy", "aria-selected", "aria-controls", "tabindex", "onClick"], F = { key: 0 }, $ = /* @__PURE__ */ p({
|
|
3
3
|
__name: "BaseTabList",
|
|
4
4
|
props: {
|
|
@@ -33,7 +33,7 @@ const v = ["aria-labelledby"], B = ["id", "data-cy", "aria-selected", "aria-cont
|
|
|
33
33
|
i(b)(t, e), u("tabClick", k, t, e);
|
|
34
34
|
}
|
|
35
35
|
}, [
|
|
36
|
-
e["header-title"] ? (a(), r("span", F,
|
|
36
|
+
e["header-title"] ? (a(), r("span", F, y(e["header-title"]), 1)) : e.renderFn.children && e.renderFn.children.header ? (a(), C(_(e.renderFn.children.header), { key: 1 })) : f("", !0)
|
|
37
37
|
], 10, B))), 128))
|
|
38
38
|
], 10, v));
|
|
39
39
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as a, withDirectives as l,
|
|
1
|
+
import { defineComponent as a, withDirectives as l, openBlock as o, createElementBlock as s, normalizeClass as t, renderSlot as r, vShow as i } from "vue";
|
|
2
2
|
const n = ["id", "aria-labelledby"], b = /* @__PURE__ */ a({
|
|
3
3
|
__name: "BaseTabPanel",
|
|
4
4
|
props: {
|
|
@@ -7,7 +7,7 @@ const n = ["id", "aria-labelledby"], b = /* @__PURE__ */ a({
|
|
|
7
7
|
labelledBy: {}
|
|
8
8
|
},
|
|
9
9
|
setup(d) {
|
|
10
|
-
return (e, p) => l((
|
|
10
|
+
return (e, p) => l((o(), s("div", {
|
|
11
11
|
id: e.id,
|
|
12
12
|
role: "tabpanel",
|
|
13
13
|
"aria-labelledby": e.labelledBy,
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { defineComponent as E, mergeModels as y, useModel as M, ref as u, useId as N, useSlots as S, computed as z, provide as b, watch as k, 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
|
+
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.CohlLou1.js";
|
|
4
|
+
const Q = ["id"], Z = /* @__PURE__ */ E({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "BaseTabView",
|
|
7
|
+
props: /* @__PURE__ */ y({
|
|
8
|
+
tabsPosition: { default: "top" },
|
|
9
|
+
tabViewDescription: {},
|
|
10
|
+
tabListClasses: { default: "" }
|
|
11
|
+
}, {
|
|
12
|
+
activeIdx: { default: 0 },
|
|
13
|
+
activeIdxModifiers: {}
|
|
14
|
+
}),
|
|
15
|
+
emits: /* @__PURE__ */ y(["tabClicked"], ["update:activeIdx"]),
|
|
16
|
+
setup(g, { emit: P }) {
|
|
17
|
+
const B = P, r = M(g, "activeIdx"), $ = u(""), d = u(null), x = u(null), i = N(), f = S(), c = (e) => e.props ?? null, m = (e) => e.type.__name === "BaseTab", h = (e, a) => ({
|
|
18
|
+
renderFn: e,
|
|
19
|
+
tabId: T(a),
|
|
20
|
+
"active-tab-panel-idx": c(e)?.["active-tab-panel-idx"] ?? a,
|
|
21
|
+
"header-title": c(e)?.["header-title"] || "",
|
|
22
|
+
class: c(e)?.class || "",
|
|
23
|
+
"tab-panel-classes": c(e)?.["tab-panel-classes"] || "",
|
|
24
|
+
"data-cy": c(e)?.["data-cy"] || ""
|
|
25
|
+
}), l = z(() => f.default ? f.default().reduce((e, a) => (a.children && Array.isArray(a.children) ? a.children.forEach((t) => {
|
|
26
|
+
m(t) && e.push(h(t, e.length));
|
|
27
|
+
}) : m(a) && e.push(h(a, e.length)), e), []) : []);
|
|
28
|
+
b("tabs", l), b("isTabActive", (e) => r.value === e);
|
|
29
|
+
const A = (e) => d.value === e, T = (e) => `base-tab-${e}-${i}`, F = (e) => `base-tab-panel-${e}-${i}`, V = (e) => l.value.find((a) => a["active-tab-panel-idx"] === e)?.tabId, w = (e) => {
|
|
30
|
+
$.value = T(e);
|
|
31
|
+
}, D = (e) => {
|
|
32
|
+
const a = l.value.at(e ?? -1);
|
|
33
|
+
d.value = a?.["active-tab-panel-idx"] ?? null;
|
|
34
|
+
};
|
|
35
|
+
b("handleClick", (e, a) => {
|
|
36
|
+
w(e), r.value = e, B("tabClicked", { tabIdx: e, tabElement: a });
|
|
37
|
+
}), k(
|
|
38
|
+
r,
|
|
39
|
+
(e) => {
|
|
40
|
+
D(e ?? -1);
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
immediate: !0
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
const L = (e, a) => {
|
|
47
|
+
for (let t = 0; t < e.length; t++)
|
|
48
|
+
if (e[t] !== a[t]) return t;
|
|
49
|
+
return null;
|
|
50
|
+
};
|
|
51
|
+
return k(
|
|
52
|
+
() => l.value.map((e) => e["active-tab-panel-idx"]),
|
|
53
|
+
(e, a) => {
|
|
54
|
+
const t = L(e, a);
|
|
55
|
+
if (t === null) return;
|
|
56
|
+
const s = l.value[t]["active-tab-panel-idx"];
|
|
57
|
+
r.value !== t || s === void 0 || (d.value = s);
|
|
58
|
+
}
|
|
59
|
+
), (e, a) => (n(), C("div", {
|
|
60
|
+
ref_key: "root",
|
|
61
|
+
ref: x,
|
|
62
|
+
class: I(e.$attrs.class)
|
|
63
|
+
}, [
|
|
64
|
+
j("span", {
|
|
65
|
+
id: `tablist-${p(i)}`,
|
|
66
|
+
class: "uikit-sr-only"
|
|
67
|
+
}, q(e.tabViewDescription), 9, Q),
|
|
68
|
+
e.tabsPosition === "top" ? (n(), o(_, {
|
|
69
|
+
key: 0,
|
|
70
|
+
uid: p(i),
|
|
71
|
+
"tab-list-classes": e.tabListClasses
|
|
72
|
+
}, null, 8, ["uid", "tab-list-classes"])) : v("", !0),
|
|
73
|
+
(n(!0), C(G, null, H(l.value, (t, s) => (n(), o(O, {
|
|
74
|
+
id: F(s),
|
|
75
|
+
key: s,
|
|
76
|
+
"labelled-by": V(s) || "",
|
|
77
|
+
active: A(s),
|
|
78
|
+
class: I(t["tab-panel-classes"])
|
|
79
|
+
}, {
|
|
80
|
+
default: J(() => [
|
|
81
|
+
t.renderFn.children && t.renderFn.children.default ? (n(), o(K(t.renderFn.children.default), { key: 0 })) : v("", !0)
|
|
82
|
+
]),
|
|
83
|
+
_: 2
|
|
84
|
+
}, 1032, ["id", "labelled-by", "active", "class"]))), 128)),
|
|
85
|
+
e.tabsPosition === "bottom" ? (n(), o(_, {
|
|
86
|
+
key: 1,
|
|
87
|
+
uid: p(i),
|
|
88
|
+
"tab-list-classes": e.tabListClasses
|
|
89
|
+
}, null, 8, ["uid", "tab-list-classes"])) : v("", !0)
|
|
90
|
+
], 2));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
export {
|
|
94
|
+
Z as _
|
|
95
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as c, ref as b, watch as m,
|
|
1
|
+
import { defineComponent as c, ref as b, watch as m, openBlock as s, createElementBlock as o, normalizeClass as t, createElementVNode as l, createCommentVNode as n, createBlock as h, renderSlot as v } from "vue";
|
|
2
2
|
import w from "../BaseFloatingLabel.js";
|
|
3
3
|
const C = ["innerHTML"], g = ["for"], y = ["id", "multiple", "accept"], B = /* @__PURE__ */ c({
|
|
4
4
|
inheritAttrs: !1,
|