@wikicasa-dev/components 2.1.4-alpha.22 → 2.1.4-alpha.24
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/UIKit/AccessibleSelect.d.ts +2 -2
- package/dist/UIKit/Accordion/BaseAccordion.d.ts +26 -28
- package/dist/UIKit/Accordion/BaseAccordionContent.d.ts +4 -4
- package/dist/UIKit/Accordion/BaseAccordionItem.d.ts +14 -40
- package/dist/UIKit/Accordion/BaseAccordionItem.js +3 -2
- package/dist/UIKit/BaseAutocomplete.d.ts +2 -2
- package/dist/UIKit/BaseDropDown.js +3 -2
- package/dist/UIKit/BaseInput.d.ts +2 -2
- package/dist/UIKit/BaseSelect.d.ts +2 -2
- package/dist/UIKit/BaseTextarea.d.ts +2 -2
- package/dist/UIKit/Checkbox/CheckboxBtn.d.ts +2 -2
- package/dist/UIKit/Radio/RadioButton.d.ts +2 -2
- package/dist/UIKit/types.d.ts +1 -2
- package/dist/assets/packages/components/lib/UIKit/Accordion/BaseAccordionItem.css +1 -0
- package/dist/assets/packages/components/lib/UIKit/BaseAutocomplete.css +1 -1
- package/dist/assets/packages/components/lib/UIKit/BaseDropDown.css +1 -0
- package/dist/assets/packages/components/src/tailwind.css +1 -1
- package/dist/index.js +93 -91
- package/dist/node_modules/.pnpm/@wikicasa-dev_utilities@1.1.22-alpha.4/node_modules/@wikicasa-dev/utilities/dist/utils/ObjectUtils.js +4 -6
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js +25 -29
- package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js +58 -127
- package/dist/packages/components/lib/UIKit/BaseAutocomplete.vue.js +32 -31
- package/dist/packages/components/lib/UIKit/BaseDropDown.vue.js +18 -18
- package/dist/packages/components/lib/UIKit/InputDropdown.vue.js +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,104 +1,106 @@
|
|
|
1
|
-
import './assets/packages/components/lib/UIKit/Navigation/NavigationBar.css';import './assets/packages/components/lib/UIKit/BaseBreadcrumb.css';import './assets/packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.css';import './assets/packages/components/lib/UIKit/BaseModal.css';import './assets/packages/components/lib/UIKit/BaseSelect.css';import './assets/packages/components/lib/UIKit/BasePin.css';import './assets/packages/components/lib/UIKit/BaseInput.css';import './assets/packages/components/lib/UIKit/BaseFloatingLabel.css';import './assets/packages/components/lib/UIKit/BaseBadge.css';import './assets/packages/components/lib/UIKit/BaseAutocomplete.css';import './assets/packages/components/lib/UIKit/BaseAlert.css';import './assets/packages/components/src/tailwind.css';/* empty css */
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
6
|
-
|
|
7
|
-
import { default as T } from "./packages/components/lib/UIKit/
|
|
8
|
-
import { default as w } from "./packages/components/lib/UIKit/Checkbox/
|
|
9
|
-
import { default as k } from "./packages/components/lib/UIKit/
|
|
10
|
-
import { default as P } from "./packages/components/lib/UIKit/Tab/
|
|
11
|
-
import { default as G } from "./packages/components/lib/UIKit/
|
|
12
|
-
import { default as N } from "./packages/components/lib/UIKit/Radio/
|
|
13
|
-
import { default as R } from "./packages/components/lib/UIKit/
|
|
14
|
-
import { default as V } from "./packages/components/lib/UIKit/
|
|
1
|
+
import './assets/packages/components/lib/UIKit/Navigation/NavigationBar.css';import './assets/packages/components/lib/UIKit/BaseBreadcrumb.css';import './assets/packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.css';import './assets/packages/components/lib/UIKit/BaseModal.css';import './assets/packages/components/lib/UIKit/BaseSelect.css';import './assets/packages/components/lib/UIKit/BasePin.css';import './assets/packages/components/lib/UIKit/BaseInput.css';import './assets/packages/components/lib/UIKit/BaseFloatingLabel.css';import './assets/packages/components/lib/UIKit/BaseDropDown.css';import './assets/packages/components/lib/UIKit/BaseBadge.css';import './assets/packages/components/lib/UIKit/BaseAutocomplete.css';import './assets/packages/components/lib/UIKit/BaseAlert.css';import './assets/packages/components/lib/UIKit/Accordion/BaseAccordionItem.css';import './assets/packages/components/src/tailwind.css';/* empty css */
|
|
2
|
+
import { default as c } from "./packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js";
|
|
3
|
+
import { default as b } from "./packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js";
|
|
4
|
+
import { default as C } from "./packages/components/lib/UIKit/Accordion/BaseAccordionContent.vue.js";
|
|
5
|
+
import { default as A } from "./packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { default as T } from "./packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js";
|
|
8
|
+
import { default as w } from "./packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js";
|
|
9
|
+
import { default as k } from "./packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js";
|
|
10
|
+
import { default as P } from "./packages/components/lib/UIKit/Tab/BaseTab.vue.js";
|
|
11
|
+
import { default as G } from "./packages/components/lib/UIKit/Tab/BaseTabView.vue.js";
|
|
12
|
+
import { default as N } from "./packages/components/lib/UIKit/Radio/RadioButton.vue.js";
|
|
13
|
+
import { default as R } from "./packages/components/lib/UIKit/Radio/RadioGroup.vue.js";
|
|
14
|
+
import { default as V } from "./packages/components/lib/UIKit/AccessibleSelect.vue.js";
|
|
15
|
+
import { default as q } from "./packages/components/lib/UIKit/BaseAlert.vue.js";
|
|
15
16
|
/* empty css */
|
|
16
|
-
import { default as
|
|
17
|
+
import { default as z } from "./packages/components/lib/UIKit/BaseAutocomplete.vue.js";
|
|
17
18
|
/* empty css */
|
|
18
|
-
import { default as
|
|
19
|
+
import { default as H } from "./packages/components/lib/UIKit/BaseBadge.vue.js";
|
|
19
20
|
/* empty css */
|
|
20
|
-
import { default as
|
|
21
|
-
import { default as
|
|
22
|
-
import { default as
|
|
23
|
-
import { default as
|
|
24
|
-
|
|
21
|
+
import { default as K } from "./packages/components/lib/UIKit/BaseButton.vue.js";
|
|
22
|
+
import { default as W } from "./UIKit/BaseCard.js";
|
|
23
|
+
import { default as Y } from "./UIKit/BaseComplexToggle.js";
|
|
24
|
+
import { default as _ } from "./packages/components/lib/UIKit/BaseDropDown.vue.js";
|
|
25
|
+
/* empty css */
|
|
26
|
+
import { default as ee } from "./packages/components/lib/UIKit/BaseFloatingLabel.vue.js";
|
|
25
27
|
/* empty css */
|
|
26
|
-
import { default as
|
|
27
|
-
import { default as
|
|
28
|
+
import { default as oe } from "./UIKit/BaseIcon.js";
|
|
29
|
+
import { default as re } from "./packages/components/lib/UIKit/BaseInput.vue.js";
|
|
28
30
|
/* empty css */
|
|
29
|
-
import { default as
|
|
30
|
-
import { default as
|
|
31
|
-
import { default as
|
|
31
|
+
import { default as se } from "./packages/components/lib/UIKit/BasePagination.vue.js";
|
|
32
|
+
import { default as me } from "./UIKit/BasePaper.js";
|
|
33
|
+
import { default as de } from "./packages/components/lib/UIKit/BasePin.vue.js";
|
|
32
34
|
/* empty css */
|
|
33
|
-
import { default as
|
|
35
|
+
import { default as xe } from "./packages/components/lib/UIKit/BaseSelect.vue.js";
|
|
34
36
|
/* empty css */
|
|
35
|
-
import { default as
|
|
36
|
-
import { default as
|
|
37
|
-
import { default as
|
|
38
|
-
import { default as
|
|
39
|
-
import { default as
|
|
40
|
-
import { default as
|
|
37
|
+
import { default as Be } from "./packages/components/lib/UIKit/BaseSlider.vue.js";
|
|
38
|
+
import { default as ce } from "./UIKit/BaseTextarea.js";
|
|
39
|
+
import { default as be } from "./packages/components/lib/UIKit/BaseToggle.vue.js";
|
|
40
|
+
import { default as Ce } from "./UIKit/BaseTooltip.js";
|
|
41
|
+
import { default as Ae } from "./packages/components/lib/UIKit/BaseUploadFile.vue.js";
|
|
42
|
+
import { default as Te } from "./packages/components/lib/UIKit/BaseModal.vue.js";
|
|
41
43
|
/* empty css */
|
|
42
|
-
import { default as
|
|
43
|
-
import { default as
|
|
44
|
-
import { default as
|
|
44
|
+
import { default as we } from "./UIKit/BaseSnackbar.js";
|
|
45
|
+
import { default as ke } from "./UIKit/StaticSpinner.js";
|
|
46
|
+
import { default as Pe } from "./packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js";
|
|
45
47
|
/* empty css */
|
|
46
|
-
import { default as
|
|
47
|
-
import { default as
|
|
48
|
-
import { default as
|
|
49
|
-
import { default as
|
|
50
|
-
import { default as
|
|
51
|
-
import { default as
|
|
52
|
-
import { default as
|
|
53
|
-
import { default as
|
|
48
|
+
import { default as Ge } from "./packages/components/lib/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js";
|
|
49
|
+
import { default as Ne } from "./packages/components/lib/chart/DoughnutChart.vue.js";
|
|
50
|
+
import { default as Re } from "./packages/components/lib/chart/LineChart.vue.js";
|
|
51
|
+
import { default as Ve } from "./packages/components/lib/components/IntersectionObserver/IntersectionObservable.vue.js";
|
|
52
|
+
import { default as qe } from "./packages/components/lib/components/IntersectionObserver/IntersectionObserver.vue.js";
|
|
53
|
+
import { default as ze } from "./components/carousel/SwiperCarousel.js";
|
|
54
|
+
import { default as He } from "./components/carousel/SwiperSlide.js";
|
|
55
|
+
import { default as Ke } from "./packages/components/lib/UIKit/BaseBreadcrumb.vue.js";
|
|
54
56
|
/* empty css */
|
|
55
|
-
import { default as
|
|
57
|
+
import { default as We } from "./packages/components/lib/UIKit/Navigation/NavigationBar.vue.js";
|
|
56
58
|
/* empty css */
|
|
57
|
-
import { default as
|
|
59
|
+
import { default as Ye } from "./packages/components/lib/UIKit/Navigation/NavigationBarItem.vue.js";
|
|
58
60
|
export {
|
|
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
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
61
|
+
V as AccessibleSelect,
|
|
62
|
+
c as BaseAccordion,
|
|
63
|
+
b as BaseAccordionBtn,
|
|
64
|
+
C as BaseAccordionContent,
|
|
65
|
+
A as BaseAccordionItem,
|
|
66
|
+
q as BaseAlert,
|
|
67
|
+
z as BaseAutocomplete,
|
|
68
|
+
H as BaseBadge,
|
|
69
|
+
Ke as BaseBreadcrumb,
|
|
70
|
+
K as BaseButton,
|
|
71
|
+
W as BaseCard,
|
|
72
|
+
Y as BaseComplexToggle,
|
|
73
|
+
_ as BaseDropDown,
|
|
74
|
+
ee as BaseFloatingLabel,
|
|
75
|
+
oe as BaseIcon,
|
|
76
|
+
re as BaseInput,
|
|
77
|
+
Te as BaseModal,
|
|
78
|
+
se as BasePagination,
|
|
79
|
+
me as BasePaper,
|
|
80
|
+
de as BasePin,
|
|
81
|
+
xe as BaseSelect,
|
|
82
|
+
Pe as BaseShimmerLoader,
|
|
83
|
+
Be as BaseSlider,
|
|
84
|
+
we as BaseSnackbar,
|
|
85
|
+
P as BaseTab,
|
|
86
|
+
G as BaseTabView,
|
|
87
|
+
ce as BaseTextarea,
|
|
88
|
+
be as BaseToggle,
|
|
89
|
+
Ce as BaseTooltip,
|
|
90
|
+
Ae as BaseUploadFile,
|
|
91
|
+
w as CheckboxBtn,
|
|
92
|
+
k as CheckboxGroup,
|
|
93
|
+
Ne as DoughnutChart,
|
|
94
|
+
Ve as IntersectionObservable,
|
|
95
|
+
qe as IntersectionObserver,
|
|
96
|
+
Re as LineChart,
|
|
97
|
+
We as NavigationBar,
|
|
98
|
+
Ye as NavigationBarItem,
|
|
99
|
+
N as RadioButton,
|
|
100
|
+
R as RadioGroup,
|
|
101
|
+
T as SelectItem,
|
|
102
|
+
Ge as ShimmerMultiLine,
|
|
103
|
+
ke as StaticSpinner,
|
|
104
|
+
ze as SwiperCarousel,
|
|
105
|
+
He as SwiperSlide
|
|
104
106
|
};
|
|
@@ -1,34 +1,30 @@
|
|
|
1
|
-
import { defineComponent as s,
|
|
2
|
-
import "
|
|
3
|
-
|
|
4
|
-
import "date-fns";
|
|
5
|
-
import "../../../../../_virtual/polyline.js";
|
|
6
|
-
const y = /* @__PURE__ */ s({
|
|
1
|
+
import { defineComponent as r, mergeModels as i, useModel as s, provide as d, createBlock as p, openBlock as u, unref as n, withCtx as m, renderSlot as c } from "vue";
|
|
2
|
+
import { AccordionRoot as f } from "reka-ui";
|
|
3
|
+
const b = /* @__PURE__ */ r({
|
|
7
4
|
__name: "BaseAccordion",
|
|
8
|
-
props: {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
});
|
|
5
|
+
props: /* @__PURE__ */ i({
|
|
6
|
+
collapsible: { type: Boolean },
|
|
7
|
+
type: {}
|
|
8
|
+
}, {
|
|
9
|
+
modelValue: {},
|
|
10
|
+
modelModifiers: {}
|
|
11
|
+
}),
|
|
12
|
+
emits: ["update:modelValue"],
|
|
13
|
+
setup(t) {
|
|
14
|
+
const l = s(t, "modelValue");
|
|
15
|
+
return d("isActive", (e) => typeof l.value == "string" ? l.value === e : !!l.value?.find((o) => o === e)), (e, o) => (u(), p(n(f), {
|
|
16
|
+
collapsible: e.collapsible,
|
|
17
|
+
type: e.type,
|
|
18
|
+
modelValue: l.value,
|
|
19
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => l.value = a)
|
|
20
|
+
}, {
|
|
21
|
+
default: m(() => [
|
|
22
|
+
c(e.$slots, "default")
|
|
23
|
+
]),
|
|
24
|
+
_: 3
|
|
25
|
+
}, 8, ["collapsible", "type", "modelValue"]));
|
|
30
26
|
}
|
|
31
27
|
});
|
|
32
28
|
export {
|
|
33
|
-
|
|
29
|
+
b as default
|
|
34
30
|
};
|
|
@@ -1,143 +1,74 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { ArrowIcon as E } from "../../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_/node_modules/@wikicasa-dev/svg-icons/dist/ArrowIcon.js";
|
|
1
|
+
import { defineComponent as l, inject as n, createBlock as u, openBlock as d, unref as t, withCtx as s, createVNode as i, renderSlot as r, normalizeClass as o, createTextVNode as c, toDisplayString as k } from "vue";
|
|
2
|
+
import { AccordionItem as f, AccordionHeader as m, AccordionTrigger as h, AccordionContent as p } from "reka-ui";
|
|
3
|
+
import { ArrowIcon as C } from "../../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_/node_modules/@wikicasa-dev/svg-icons/dist/ArrowIcon.js";
|
|
5
4
|
import "../../../../../node_modules/.pnpm/@wikicasa-dev_svg-icons@1.2.15-alpha.1_vue@3.5.16_typescript@5.8.3_/node_modules/@wikicasa-dev/svg-icons/dist/PharmacyIcon.js";
|
|
6
|
-
const
|
|
7
|
-
inheritAttrs: !1,
|
|
5
|
+
const $ = /* @__PURE__ */ l({
|
|
8
6
|
__name: "BaseAccordionItem",
|
|
9
7
|
props: {
|
|
10
8
|
title: {},
|
|
11
|
-
id: {},
|
|
12
|
-
active: { type: Boolean, default: !1 },
|
|
13
9
|
arrowColor: {},
|
|
14
10
|
arrowWidth: { default: 12 },
|
|
15
|
-
onContainerClickExpand: { type: Boolean, default: !1 },
|
|
16
|
-
rootClasses: {},
|
|
17
11
|
dataCy: {},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
accordionOpenClasses: {},
|
|
24
|
-
accordionCloseClasses: {},
|
|
25
|
-
accordionClasses: {}
|
|
12
|
+
value: {},
|
|
13
|
+
triggerClasses: {},
|
|
14
|
+
headerClasses: {},
|
|
15
|
+
contentClasses: {},
|
|
16
|
+
arrowClasses: {}
|
|
26
17
|
},
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
!0
|
|
39
|
-
), p = (e, t = !1) => {
|
|
40
|
-
a(t ? "accordionOpened" : "accordionClosed", e), a("update:accordionState", t);
|
|
41
|
-
};
|
|
42
|
-
r && (r.value[i.id] = { id: i.id, title: i.title, active: i.active }), l(
|
|
43
|
-
() => d(r),
|
|
44
|
-
(e) => {
|
|
45
|
-
const t = e?.[i.id];
|
|
46
|
-
!t || o.value === t.active || (o.value = t.active ?? !1, p(
|
|
47
|
-
{ id: i.id, title: i.title, active: t.active },
|
|
48
|
-
t.active
|
|
49
|
-
));
|
|
50
|
-
},
|
|
51
|
-
{ deep: !0, immediate: !0 }
|
|
52
|
-
), l(o, (e) => {
|
|
53
|
-
o.value = e, p({ id: i.id, title: i.title, active: o.value }, e);
|
|
54
|
-
}), l(
|
|
55
|
-
() => i.active,
|
|
56
|
-
(e) => {
|
|
57
|
-
o.value = e;
|
|
58
|
-
},
|
|
59
|
-
{ immediate: !0 }
|
|
60
|
-
);
|
|
61
|
-
const n = () => {
|
|
62
|
-
o.value = !o.value;
|
|
63
|
-
};
|
|
64
|
-
return (e, t) => (u(), v("div", {
|
|
65
|
-
class: m(e.rootClasses)
|
|
66
|
-
}, [
|
|
67
|
-
!e.$slots.custom_content && !e.$slots.custom_btn && !e.$slots.custom_accordion ? (u(), v("div", W, [
|
|
68
|
-
f("button", {
|
|
69
|
-
id: `accordion-title-${e.id}`,
|
|
70
|
-
type: "button",
|
|
71
|
-
class: m(["uikit-flex uikit-w-full uikit-items-center uikit-justify-between uikit-border-0 uikit-bg-white uikit-px-[20px] uikit-py-md uikit-text-left uikit-font-semibold uikit-transition-colors active:max-sm:uikit-bg-w-cultured hover:sm:uikit-bg-w-cultured", e.btnClasses]),
|
|
72
|
-
"data-cy": e.dataCy,
|
|
73
|
-
"aria-expanded": o.value,
|
|
74
|
-
"aria-controls": `accordion-text-${e.id}`,
|
|
75
|
-
onClick: t[0] || (t[0] = O((N) => {
|
|
76
|
-
n(), d(b)?.({ id: e.id, title: e.title, active: o.value }), a("click");
|
|
77
|
-
}, ["prevent", "stop"]))
|
|
78
|
-
}, [
|
|
79
|
-
f("span", {
|
|
80
|
-
itemprop: e.itemProp,
|
|
81
|
-
innerHTML: e.title
|
|
82
|
-
}, null, 8, M),
|
|
83
|
-
k(d(E), {
|
|
84
|
-
class: m([
|
|
85
|
-
"uikit-flex-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none",
|
|
86
|
-
[o.value ? "uikit-rotate-180" : "", e.arrowClasses]
|
|
87
|
-
]),
|
|
88
|
-
"arrow-classes": e.arrowClasses,
|
|
89
|
-
width: e.arrowWidth,
|
|
90
|
-
height: e.arrowWidth
|
|
91
|
-
}, null, 8, ["class", "arrow-classes", "width", "height"])
|
|
92
|
-
], 10, I)
|
|
93
|
-
])) : (e.$slots.custom_content || e.$slots.custom_btn) && !e.$slots.custom_accordion ? (u(), y(A, {
|
|
94
|
-
key: 1,
|
|
95
|
-
id: e.id,
|
|
96
|
-
"btn-wrapper-classes": e.btnWrapperClasses,
|
|
97
|
-
"btn-classes": e.btnClasses,
|
|
98
|
-
"arrow-color": e.arrowColor,
|
|
99
|
-
"arrow-classes": e.arrowClasses,
|
|
100
|
-
"toggle-accordion": n,
|
|
101
|
-
"on-container-click-expand": e.onContainerClickExpand,
|
|
102
|
-
"accordion-open": o.value
|
|
103
|
-
}, {
|
|
104
|
-
custom_content: c(() => [
|
|
105
|
-
s(e.$slots, "custom_content")
|
|
106
|
-
]),
|
|
107
|
-
custom_btn: c(() => [
|
|
108
|
-
s(e.$slots, "custom_btn", {
|
|
109
|
-
btnId: `btn-${e.id}`,
|
|
110
|
-
isOpen: o.value,
|
|
111
|
-
toggleAccordion: n
|
|
112
|
-
})
|
|
113
|
-
]),
|
|
114
|
-
_: 3
|
|
115
|
-
}, 8, ["id", "btn-wrapper-classes", "btn-classes", "arrow-color", "arrow-classes", "on-container-click-expand", "accordion-open"])) : g("", !0),
|
|
116
|
-
s(e.$slots, "custom_accordion", {
|
|
117
|
-
id: e.id,
|
|
118
|
-
isOpen: o.value,
|
|
119
|
-
toggleAccordion: n
|
|
120
|
-
}, () => [
|
|
121
|
-
k(B, {
|
|
122
|
-
id: e.id,
|
|
123
|
-
"accordion-open": o.value,
|
|
124
|
-
"accordion-open-classes": e.accordionOpenClasses,
|
|
125
|
-
"accordion-close-classes": e.accordionCloseClasses,
|
|
126
|
-
"accordion-content-classes": e.accordionContentClasses,
|
|
127
|
-
"accordion-classes": e.accordionClasses
|
|
18
|
+
setup(w) {
|
|
19
|
+
const a = n("isActive");
|
|
20
|
+
return (e, g) => (d(), u(t(f), {
|
|
21
|
+
value: e.value,
|
|
22
|
+
"data-cy": e.dataCy
|
|
23
|
+
}, {
|
|
24
|
+
default: s(() => [
|
|
25
|
+
i(t(m), {
|
|
26
|
+
class: "uikit-flex uikit-justify-between uikit-items-center",
|
|
27
|
+
"header-classes": e.headerClasses
|
|
128
28
|
}, {
|
|
129
|
-
|
|
130
|
-
|
|
29
|
+
default: s(() => [
|
|
30
|
+
r(e.$slots, "headerContent"),
|
|
31
|
+
i(t(h), {
|
|
32
|
+
class: o([
|
|
33
|
+
e.triggerClasses,
|
|
34
|
+
{
|
|
35
|
+
"uikit-inline-flex uikit-cursor-pointer uikit-items-center uikit-justify-between uikit-border-0 uikit-bg-transparent uikit-px-md uikit-py-md uikit-text-left uikit-font-semibold": !e.$slots.trigger,
|
|
36
|
+
"uikit-w-full": !e.$slots.headerContent
|
|
37
|
+
}
|
|
38
|
+
])
|
|
39
|
+
}, {
|
|
40
|
+
default: s(() => [
|
|
41
|
+
r(e.$slots, "trigger", {
|
|
42
|
+
active: t(a)(e.value)
|
|
43
|
+
}, () => [
|
|
44
|
+
c(k(e.title) + " ", 1),
|
|
45
|
+
i(t(C), {
|
|
46
|
+
class: o(["uikit-flex-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", [t(a)(e.value) ? "uikit-rotate-180" : "", e.arrowClasses]]),
|
|
47
|
+
"arrow-classes": e.arrowClasses,
|
|
48
|
+
width: e.arrowWidth,
|
|
49
|
+
height: e.arrowWidth
|
|
50
|
+
}, null, 8, ["class", "arrow-classes", "width", "height"])
|
|
51
|
+
])
|
|
52
|
+
]),
|
|
53
|
+
_: 3
|
|
54
|
+
}, 8, ["class"])
|
|
131
55
|
]),
|
|
132
|
-
|
|
133
|
-
|
|
56
|
+
_: 3
|
|
57
|
+
}, 8, ["header-classes"]),
|
|
58
|
+
i(t(p), {
|
|
59
|
+
class: "uikit-px-md uikit-base-accordion-item-content",
|
|
60
|
+
"content-classes": e.contentClasses
|
|
61
|
+
}, {
|
|
62
|
+
default: s(() => [
|
|
63
|
+
r(e.$slots, "default")
|
|
134
64
|
]),
|
|
135
65
|
_: 3
|
|
136
|
-
}, 8, ["
|
|
137
|
-
])
|
|
138
|
-
|
|
66
|
+
}, 8, ["content-classes"])
|
|
67
|
+
]),
|
|
68
|
+
_: 3
|
|
69
|
+
}, 8, ["value", "data-cy"]));
|
|
139
70
|
}
|
|
140
71
|
});
|
|
141
72
|
export {
|
|
142
|
-
|
|
73
|
+
$ as default
|
|
143
74
|
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { defineComponent as H, mergeModels as g, useModel as K, ref as r, computed as $, onBeforeMount as N, watch as
|
|
1
|
+
import { defineComponent as H, mergeModels as g, useModel as K, ref as r, computed as $, onBeforeMount as N, watch as b, createBlock as w, openBlock as m, normalizeClass as U, withCtx as c, renderSlot as B, createElementBlock as A, Fragment as F, renderList as T, unref as S, createCommentVNode as j, createElementVNode as V, resolveDynamicComponent as W, createVNode as X, createSlots as q, withDirectives as G, vShow as J } from "vue";
|
|
2
2
|
import Q from "./BaseInput.vue.js";
|
|
3
|
-
import '../../../../assets/packages/components/lib/UIKit/BaseInput.css';/* empty css */
|
|
3
|
+
import '../../../../assets/packages/components/lib/UIKit/BaseDropDown.css';import '../../../../assets/packages/components/lib/UIKit/BaseInput.css';/* empty css */
|
|
4
4
|
import R from "./BaseDropDown.vue.js";
|
|
5
|
+
/* empty css */
|
|
5
6
|
import { debounce as Y } from "../../../../node_modules/.pnpm/@wikicasa-dev_utilities@1.1.22-alpha.4/node_modules/@wikicasa-dev/utilities/dist/utils/FunctionUtils.js";
|
|
6
7
|
import Z from "./BaseSelect/SelectItem.vue.js";
|
|
7
8
|
import { useKeyboardController as x } from "../../../../node_modules/.pnpm/@wikicasa-dev_vue-composables@0.0.24-alpha.5_vue@3.5.16_typescript@5.8.3_/node_modules/@wikicasa-dev/vue-composables/dist/useKeyboardController.js";
|
|
8
|
-
const _ = ["onClick"], ee = ["innerHTML"],
|
|
9
|
+
const _ = ["onClick"], ee = ["innerHTML"], de = /* @__PURE__ */ H({
|
|
9
10
|
__name: "BaseAutocomplete",
|
|
10
11
|
props: /* @__PURE__ */ g({
|
|
11
12
|
isValid: { default: null },
|
|
@@ -14,7 +15,7 @@ const _ = ["onClick"], ee = ["innerHTML"], se = /* @__PURE__ */ H({
|
|
|
14
15
|
onOptionSelectedCb: { default: null },
|
|
15
16
|
keepState: { default: null },
|
|
16
17
|
cleanupOnClose: { type: Boolean, default: !0 },
|
|
17
|
-
dropdownClasses: {
|
|
18
|
+
dropdownClasses: {},
|
|
18
19
|
closeDropdownOnBodyPressed: { type: Boolean, default: !0 },
|
|
19
20
|
inputClasses: {},
|
|
20
21
|
fieldsetClasses: {},
|
|
@@ -31,69 +32,69 @@ const _ = ["onClick"], ee = ["innerHTML"], se = /* @__PURE__ */ H({
|
|
|
31
32
|
modelModifiers: {}
|
|
32
33
|
}),
|
|
33
34
|
emits: /* @__PURE__ */ g(["update:dropdownState", "changedValue", "click", "keydown", "keydownEnterPressed"], ["update:modelValue"]),
|
|
34
|
-
setup(
|
|
35
|
-
const u = K(
|
|
35
|
+
setup(n, { expose: D, emit: I }) {
|
|
36
|
+
const u = K(n, "modelValue"), s = I, i = r(""), a = r([]), p = r(null), o = r(!1), C = r(null), O = $(() => a.value.length);
|
|
36
37
|
N(() => {
|
|
37
|
-
|
|
38
|
+
p.value = Y({ delay: 300 }, n.onInputChangeCb);
|
|
38
39
|
});
|
|
39
40
|
const { activeIdx: v, selectedIdx: d } = x({
|
|
40
41
|
optionsLength: O,
|
|
41
|
-
isDropdownOpen:
|
|
42
|
+
isDropdownOpen: o,
|
|
42
43
|
disableSpaceHandler: !0
|
|
43
44
|
}), y = $(() => d.value !== -1), M = async (e) => {
|
|
44
|
-
if (i.value !== e && (s("changedValue", e), i.value = e, !!
|
|
45
|
+
if (i.value !== e && (s("changedValue", e), i.value = e, !!n.onInputChangeCb)) {
|
|
45
46
|
if (!e || y.value) {
|
|
46
|
-
a.value = [], d.value = -1, v.value = -1, u.value && (u.value.label = ""),
|
|
47
|
+
a.value = [], d.value = -1, v.value = -1, u.value && (u.value.label = ""), o.value = !1, await p.value?.("");
|
|
47
48
|
return;
|
|
48
49
|
}
|
|
49
|
-
|
|
50
|
+
n.disableCb || !p.value || (a.value = await p.value(e), o.value = !!a.value.length);
|
|
50
51
|
}
|
|
51
52
|
}, h = (e, t) => {
|
|
52
|
-
|
|
53
|
+
n.onOptionSelectedCb && n.onOptionSelectedCb(e), n.cleanupOnClose && (a.value = []), i.value = e.label, u.value = e, o.value = !1, d.value = t;
|
|
53
54
|
}, E = () => {
|
|
54
|
-
a.value.length &&
|
|
55
|
+
a.value.length && n.keepState !== "closed" && (o.value = !0);
|
|
55
56
|
};
|
|
56
|
-
|
|
57
|
+
b(
|
|
57
58
|
u,
|
|
58
59
|
(e, t) => {
|
|
59
60
|
e === t || e?.label === i.value || (i.value = e?.label || "");
|
|
60
61
|
},
|
|
61
62
|
{ immediate: !0 }
|
|
62
|
-
),
|
|
63
|
+
), b(d, (e) => {
|
|
63
64
|
if (e === -1 || !a.value.length) return;
|
|
64
65
|
const t = a.value[e];
|
|
65
66
|
y.value && t.label === u.value?.label || h(t, e);
|
|
66
|
-
}),
|
|
67
|
-
|
|
67
|
+
}), b(
|
|
68
|
+
o,
|
|
68
69
|
(e) => {
|
|
69
70
|
s("update:dropdownState", e);
|
|
70
71
|
},
|
|
71
72
|
{ immediate: !0 }
|
|
72
73
|
);
|
|
73
74
|
const P = () => {
|
|
74
|
-
|
|
75
|
+
C.value?.select();
|
|
75
76
|
}, L = () => {
|
|
76
|
-
s("click"), E(), a.value.length && (
|
|
77
|
+
s("click"), E(), a.value.length && (o.value = !0);
|
|
77
78
|
};
|
|
78
79
|
return D({
|
|
79
80
|
select: P
|
|
80
|
-
}), (e, t) => (m(),
|
|
81
|
-
open:
|
|
82
|
-
"onUpdate:open": t[3] || (t[3] = (l) =>
|
|
83
|
-
class: U(
|
|
81
|
+
}), (e, t) => (m(), w(R, {
|
|
82
|
+
open: o.value,
|
|
83
|
+
"onUpdate:open": t[3] || (t[3] = (l) => o.value = l),
|
|
84
|
+
class: U(["uikit-base-autocomplete-dropdown", e.$attrs.class]),
|
|
84
85
|
"data-cy": e.dataCy ? e.dataCy : `ac_${e.$attrs.id}`,
|
|
85
86
|
"dropdown-element": "ul",
|
|
86
|
-
"dropdown-classes": ["
|
|
87
|
+
"dropdown-classes": ["uikit-z-30", e.dropdownClasses],
|
|
87
88
|
"close-when-clicked-outside": e.closeDropdownOnBodyPressed,
|
|
88
89
|
"activate-keyboard-controller": !1,
|
|
89
|
-
"onUpdate:dropdownState": t[4] || (t[4] = (l) =>
|
|
90
|
+
"onUpdate:dropdownState": t[4] || (t[4] = (l) => o.value = l),
|
|
90
91
|
onClick: L
|
|
91
92
|
}, {
|
|
92
93
|
button: c(() => [
|
|
93
94
|
X(Q, {
|
|
94
95
|
id: e.$attrs.id ? `ac_input_${e.$attrs.id}` : "",
|
|
95
96
|
ref_key: "baseInput",
|
|
96
|
-
ref:
|
|
97
|
+
ref: C,
|
|
97
98
|
class: "uikit-base-autocomplete",
|
|
98
99
|
"data-cy": e.dataCy ? `ac_input_${e.dataCy}` : `ac_input_${e.$attrs.id}`,
|
|
99
100
|
"model-value": i.value,
|
|
@@ -133,17 +134,17 @@ const _ = ["onClick"], ee = ["innerHTML"], se = /* @__PURE__ */ H({
|
|
|
133
134
|
options: a.value,
|
|
134
135
|
toggleDropdown: l
|
|
135
136
|
}, () => [
|
|
136
|
-
(m(!0), A(F, null, T(a.value, (
|
|
137
|
+
(m(!0), A(F, null, T(a.value, (f, k) => (m(), w(Z, {
|
|
137
138
|
key: k,
|
|
138
139
|
active: S(v) === k,
|
|
139
140
|
class: "uikit-relative uikit-flex uikit-gap-x-xs uikit-rounded-[5px] uikit-p-md uikit-py-xs uikit-text after:uikit-absolute after:uikit-bottom-0 after:uikit-left-1/2 after:uikit-h-[1px] after:uikit-w-[95%] after:-uikit-translate-x-1/2 after:uikit-bg-w-lightgray after:uikit-content-[''] after:last:uikit-hidden hover:uikit-cursor-pointer",
|
|
140
|
-
onClick: (z) => h(
|
|
141
|
+
onClick: (z) => h(f, k),
|
|
141
142
|
onMouseover: (z) => v.value = k
|
|
142
143
|
}, {
|
|
143
144
|
default: c(() => [
|
|
144
|
-
|
|
145
|
+
f.icon ? (m(), w(W(f.icon), { key: 0 })) : j("", !0),
|
|
145
146
|
V("span", {
|
|
146
|
-
innerHTML:
|
|
147
|
+
innerHTML: f.label
|
|
147
148
|
}, null, 8, ee)
|
|
148
149
|
]),
|
|
149
150
|
_: 2
|
|
@@ -155,5 +156,5 @@ const _ = ["onClick"], ee = ["innerHTML"], se = /* @__PURE__ */ H({
|
|
|
155
156
|
}
|
|
156
157
|
});
|
|
157
158
|
export {
|
|
158
|
-
|
|
159
|
+
de as default
|
|
159
160
|
};
|