@wikicasa-dev/components 2.1.4-alpha.23 → 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/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 B } from "./packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js";
3
- import { default as c } from "./packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js";
4
- import { default as b } from "./packages/components/lib/UIKit/Accordion/BaseAccordionContent.vue.js";
5
- import { default as C } from "./packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js";
6
- import { default as A } from "./packages/components/lib/UIKit/BaseSelect/SelectItem.vue.js";
7
- import { default as T } from "./packages/components/lib/UIKit/Checkbox/CheckboxBtn.vue.js";
8
- import { default as w } from "./packages/components/lib/UIKit/Checkbox/CheckboxGroup.vue.js";
9
- import { default as k } from "./packages/components/lib/UIKit/Tab/BaseTab.vue.js";
10
- import { default as P } from "./packages/components/lib/UIKit/Tab/BaseTabView.vue.js";
11
- import { default as G } from "./packages/components/lib/UIKit/Radio/RadioButton.vue.js";
12
- import { default as N } from "./packages/components/lib/UIKit/Radio/RadioGroup.vue.js";
13
- import { default as R } from "./packages/components/lib/UIKit/AccessibleSelect.vue.js";
14
- import { default as V } from "./packages/components/lib/UIKit/BaseAlert.vue.js";
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 q } from "./packages/components/lib/UIKit/BaseAutocomplete.vue.js";
17
+ import { default as z } from "./packages/components/lib/UIKit/BaseAutocomplete.vue.js";
17
18
  /* empty css */
18
- import { default as z } from "./packages/components/lib/UIKit/BaseBadge.vue.js";
19
+ import { default as H } from "./packages/components/lib/UIKit/BaseBadge.vue.js";
19
20
  /* empty css */
20
- import { default as H } from "./packages/components/lib/UIKit/BaseButton.vue.js";
21
- import { default as K } from "./UIKit/BaseCard.js";
22
- import { default as W } from "./UIKit/BaseComplexToggle.js";
23
- import { default as Y } from "./packages/components/lib/UIKit/BaseDropDown.vue.js";
24
- import { default as _ } from "./packages/components/lib/UIKit/BaseFloatingLabel.vue.js";
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 ee } from "./UIKit/BaseIcon.js";
27
- import { default as oe } from "./packages/components/lib/UIKit/BaseInput.vue.js";
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 re } from "./packages/components/lib/UIKit/BasePagination.vue.js";
30
- import { default as se } from "./UIKit/BasePaper.js";
31
- import { default as me } from "./packages/components/lib/UIKit/BasePin.vue.js";
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 de } from "./packages/components/lib/UIKit/BaseSelect.vue.js";
35
+ import { default as xe } from "./packages/components/lib/UIKit/BaseSelect.vue.js";
34
36
  /* empty css */
35
- import { default as xe } from "./packages/components/lib/UIKit/BaseSlider.vue.js";
36
- import { default as Be } from "./UIKit/BaseTextarea.js";
37
- import { default as ce } from "./packages/components/lib/UIKit/BaseToggle.vue.js";
38
- import { default as be } from "./UIKit/BaseTooltip.js";
39
- import { default as Ce } from "./packages/components/lib/UIKit/BaseUploadFile.vue.js";
40
- import { default as Ae } from "./packages/components/lib/UIKit/BaseModal.vue.js";
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 Te } from "./UIKit/BaseSnackbar.js";
43
- import { default as we } from "./UIKit/StaticSpinner.js";
44
- import { default as ke } from "./packages/components/lib/UIKit/ShimmerLoader/BaseShimmerLoader.vue.js";
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 Pe } from "./packages/components/lib/UIKit/ShimmerLoader/ShimmerMultiLine.vue.js";
47
- import { default as Ge } from "./packages/components/lib/chart/DoughnutChart.vue.js";
48
- import { default as Ne } from "./packages/components/lib/chart/LineChart.vue.js";
49
- import { default as Re } from "./packages/components/lib/components/IntersectionObserver/IntersectionObservable.vue.js";
50
- import { default as Ve } from "./packages/components/lib/components/IntersectionObserver/IntersectionObserver.vue.js";
51
- import { default as qe } from "./components/carousel/SwiperCarousel.js";
52
- import { default as ze } from "./components/carousel/SwiperSlide.js";
53
- import { default as He } from "./packages/components/lib/UIKit/BaseBreadcrumb.vue.js";
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 Ke } from "./packages/components/lib/UIKit/Navigation/NavigationBar.vue.js";
57
+ import { default as We } from "./packages/components/lib/UIKit/Navigation/NavigationBar.vue.js";
56
58
  /* empty css */
57
- import { default as We } from "./packages/components/lib/UIKit/Navigation/NavigationBarItem.vue.js";
59
+ import { default as Ye } from "./packages/components/lib/UIKit/Navigation/NavigationBarItem.vue.js";
58
60
  export {
59
- R as AccessibleSelect,
60
- B as BaseAccordion,
61
- c as BaseAccordionBtn,
62
- b as BaseAccordionContent,
63
- C as BaseAccordionItem,
64
- V as BaseAlert,
65
- q as BaseAutocomplete,
66
- z as BaseBadge,
67
- He as BaseBreadcrumb,
68
- H as BaseButton,
69
- K as BaseCard,
70
- W as BaseComplexToggle,
71
- Y as BaseDropDown,
72
- _ as BaseFloatingLabel,
73
- ee as BaseIcon,
74
- oe as BaseInput,
75
- Ae as BaseModal,
76
- re as BasePagination,
77
- se as BasePaper,
78
- me as BasePin,
79
- de as BaseSelect,
80
- ke as BaseShimmerLoader,
81
- xe as BaseSlider,
82
- Te as BaseSnackbar,
83
- k as BaseTab,
84
- P as BaseTabView,
85
- Be as BaseTextarea,
86
- ce as BaseToggle,
87
- be as BaseTooltip,
88
- Ce as BaseUploadFile,
89
- T as CheckboxBtn,
90
- w as CheckboxGroup,
91
- Ge as DoughnutChart,
92
- Re as IntersectionObservable,
93
- Ve as IntersectionObserver,
94
- Ne as LineChart,
95
- Ke as NavigationBar,
96
- We as NavigationBarItem,
97
- G as RadioButton,
98
- N as RadioGroup,
99
- A as SelectItem,
100
- Pe as ShimmerMultiLine,
101
- we as StaticSpinner,
102
- qe as SwiperCarousel,
103
- ze as SwiperSlide
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,10 +1,8 @@
1
- function c(t, s) {
2
- if (t)
3
- for (const o in t)
4
- s[o] = t[o];
1
+ function c(o, t) {
2
+ if (o)
3
+ for (const n in o)
4
+ t[n] = o[n];
5
5
  }
6
- const n = (t) => !t || !Object.keys(t).length;
7
6
  export {
8
- n as isEmptyObject,
9
7
  c as shallowCopyObjectTo
10
8
  };
@@ -1,34 +1,30 @@
1
- import { defineComponent as s, ref as u, provide as i, renderSlot as d } from "vue";
2
- import "../../../../../node_modules/.pnpm/js-cookie@3.0.5/node_modules/js-cookie/dist/js.cookie.js";
3
- import { isEmptyObject as f } from "../../../../../node_modules/.pnpm/@wikicasa-dev_utilities@1.1.22-alpha.4/node_modules/@wikicasa-dev/utilities/dist/utils/ObjectUtils.js";
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
- autoClose: { type: Boolean, default: !0 },
10
- autoUpdate: { type: Boolean, default: !0 }
11
- },
12
- setup(l) {
13
- const n = u(null), o = u(
14
- {}
15
- ), c = (e, t) => {
16
- if (l.autoClose && t && !f(t))
17
- for (const a in t)
18
- a !== `${e}` && (t[a].active = !1);
19
- }, p = (e, t) => {
20
- t && (t[e].active = !(t[e].active ?? !1));
21
- }, r = (e, t) => {
22
- c(e.id, t ?? o.value), n.value = e, p(e.id, t ?? o.value);
23
- };
24
- return i("handleClick", (e) => {
25
- l.autoUpdate && r(e);
26
- }), i("accordionItems", o), (e, t) => d(e.$slots, "default", {
27
- updatePrev: r,
28
- prev: n.value
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
- y as default
29
+ b as default
34
30
  };
@@ -1,136 +1,74 @@
1
- import { defineComponent as h, ref as $, inject as p, watch as l, unref as d, createElementBlock as C, openBlock as u, createBlock as y, createCommentVNode as g, renderSlot as s, createElementVNode as v, withModifiers as O, normalizeClass as f, createVNode as k, withCtx as c } from "vue";
2
- import B from "./BaseAccordionBtn.vue.js";
3
- import A from "./BaseAccordionContent.vue.js";
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 W = { key: 0 }, I = ["id", "data-cy", "aria-expanded", "aria-controls"], M = ["itemprop", "innerHTML"], P = /* @__PURE__ */ h({
5
+ const $ = /* @__PURE__ */ l({
7
6
  __name: "BaseAccordionItem",
8
7
  props: {
9
8
  title: {},
10
- id: {},
11
- active: { type: Boolean, default: !1 },
12
9
  arrowColor: {},
13
10
  arrowWidth: { default: 12 },
14
- onContainerClickExpand: { type: Boolean, default: !1 },
15
11
  dataCy: {},
16
- itemProp: {},
17
- btnClasses: {},
18
- arrowClasses: {},
19
- btnWrapperClasses: {},
20
- accordionContentClasses: {},
21
- accordionOpenClasses: {},
22
- accordionCloseClasses: {},
23
- accordionClasses: {}
12
+ value: {},
13
+ triggerClasses: {},
14
+ headerClasses: {},
15
+ contentClasses: {},
16
+ arrowClasses: {}
24
17
  },
25
- emits: ["click", "accordionOpened", "accordionClosed", "update:accordionState"],
26
- setup(t, { emit: w }) {
27
- const a = w, o = $(!1), r = p(
28
- "accordionItems",
29
- () => {
30
- },
31
- !0
32
- ), b = p(
33
- "handleClick",
34
- () => {
35
- },
36
- !0
37
- ), m = (e, i = !1) => {
38
- a(i ? "accordionOpened" : "accordionClosed", e), a("update:accordionState", i);
39
- };
40
- r && (r.value[t.id] = { id: t.id, title: t.title, active: t.active }), l(
41
- () => d(r),
42
- (e) => {
43
- const i = e?.[t.id];
44
- !i || o.value === i.active || (o.value = i.active ?? !1, m(
45
- { id: t.id, title: t.title, active: i.active },
46
- i.active
47
- ));
48
- },
49
- { deep: !0, immediate: !0 }
50
- ), l(o, (e) => {
51
- o.value = e, m({ id: t.id, title: t.title, active: o.value }, e);
52
- }), l(
53
- () => t.active,
54
- (e) => {
55
- o.value = e;
56
- },
57
- { immediate: !0 }
58
- );
59
- const n = () => {
60
- o.value = !o.value;
61
- };
62
- return (e, i) => (u(), C("div", null, [
63
- !e.$slots.custom_content && !e.$slots.custom_btn && !e.$slots.custom_accordion ? (u(), C("div", W, [
64
- v("button", {
65
- id: `accordion-title-${e.id}`,
66
- type: "button",
67
- class: f(["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]),
68
- "data-cy": e.dataCy,
69
- "aria-expanded": o.value,
70
- "aria-controls": `accordion-text-${e.id}`,
71
- onClick: i[0] || (i[0] = O((N) => {
72
- n(), d(b)?.({ id: e.id, title: e.title, active: o.value }), a("click");
73
- }, ["prevent", "stop"]))
74
- }, [
75
- v("span", {
76
- itemprop: e.itemProp,
77
- innerHTML: e.title
78
- }, null, 8, M),
79
- k(d(E), {
80
- class: f(["uikit-flex-shrink-0 uikit-transition-transform motion-reduce:uikit-transition-none", [o.value ? "uikit-rotate-180" : "", e.arrowClasses]]),
81
- "arrow-classes": e.arrowClasses,
82
- width: e.arrowWidth,
83
- height: e.arrowWidth
84
- }, null, 8, ["class", "arrow-classes", "width", "height"])
85
- ], 10, I)
86
- ])) : (e.$slots.custom_content || e.$slots.custom_btn) && !e.$slots.custom_accordion ? (u(), y(B, {
87
- key: 1,
88
- id: e.id,
89
- "btn-wrapper-classes": e.btnWrapperClasses,
90
- "btn-classes": e.btnClasses,
91
- "arrow-color": e.arrowColor,
92
- "arrow-classes": e.arrowClasses,
93
- "toggle-accordion": n,
94
- "on-container-click-expand": e.onContainerClickExpand,
95
- "accordion-open": o.value
96
- }, {
97
- custom_content: c(() => [
98
- s(e.$slots, "custom_content")
99
- ]),
100
- custom_btn: c(() => [
101
- s(e.$slots, "custom_btn", {
102
- btnId: `btn-${e.id}`,
103
- isOpen: o.value,
104
- toggleAccordion: n
105
- })
106
- ]),
107
- _: 3
108
- }, 8, ["id", "btn-wrapper-classes", "btn-classes", "arrow-color", "arrow-classes", "on-container-click-expand", "accordion-open"])) : g("", !0),
109
- s(e.$slots, "custom_accordion", {
110
- id: e.id,
111
- isOpen: o.value,
112
- toggleAccordion: n
113
- }, () => [
114
- k(A, {
115
- id: e.id,
116
- "accordion-open": o.value,
117
- "accordion-open-classes": e.accordionOpenClasses,
118
- "accordion-close-classes": e.accordionCloseClasses,
119
- "accordion-content-classes": e.accordionContentClasses,
120
- "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
121
28
  }, {
122
- custom_accordion_content: c(() => [
123
- s(e.$slots, "custom_accordion_content", { isOpen: o.value })
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"])
124
55
  ]),
125
- default: c(() => [
126
- s(e.$slots, "default", { isOpen: o.value })
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")
127
64
  ]),
128
65
  _: 3
129
- }, 8, ["id", "accordion-open", "accordion-open-classes", "accordion-close-classes", "accordion-content-classes", "accordion-classes"])
130
- ])
131
- ]));
66
+ }, 8, ["content-classes"])
67
+ ]),
68
+ _: 3
69
+ }, 8, ["value", "data-cy"]));
132
70
  }
133
71
  });
134
72
  export {
135
- P as default
73
+ $ as default
136
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 C, createBlock as b, 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";
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"], se = /* @__PURE__ */ H({
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: { default: "" },
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(o, { expose: D, emit: I }) {
35
- const u = K(o, "modelValue"), s = I, i = r(""), a = r([]), f = r(null), n = r(!1), w = r(null), O = $(() => a.value.length);
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
- f.value = Y({ delay: 300 }, o.onInputChangeCb);
38
+ p.value = Y({ delay: 300 }, n.onInputChangeCb);
38
39
  });
39
40
  const { activeIdx: v, selectedIdx: d } = x({
40
41
  optionsLength: O,
41
- isDropdownOpen: n,
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, !!o.onInputChangeCb)) {
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 = ""), n.value = !1, await f.value?.("");
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
- o.disableCb || !f.value || (a.value = await f.value(e), n.value = !!a.value.length);
50
+ n.disableCb || !p.value || (a.value = await p.value(e), o.value = !!a.value.length);
50
51
  }
51
52
  }, h = (e, t) => {
52
- o.onOptionSelectedCb && o.onOptionSelectedCb(e), o.cleanupOnClose && (a.value = []), i.value = e.label, u.value = e, n.value = !1, d.value = t;
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 && o.keepState !== "closed" && (n.value = !0);
55
+ a.value.length && n.keepState !== "closed" && (o.value = !0);
55
56
  };
56
- C(
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
- ), C(d, (e) => {
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
- }), C(
67
- n,
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
- w.value?.select();
75
+ C.value?.select();
75
76
  }, L = () => {
76
- s("click"), E(), a.value.length && (n.value = !0);
77
+ s("click"), E(), a.value.length && (o.value = !0);
77
78
  };
78
79
  return D({
79
80
  select: P
80
- }), (e, t) => (m(), b(R, {
81
- open: n.value,
82
- "onUpdate:open": t[3] || (t[3] = (l) => n.value = l),
83
- class: U(e.$attrs.class),
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": ["!uikit-max-h-[210px] uikit-z-30", e.dropdownClasses],
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) => n.value = 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: w,
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, (p, k) => (m(), b(Z, {
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(p, k),
141
+ onClick: (z) => h(f, k),
141
142
  onMouseover: (z) => v.value = k
142
143
  }, {
143
144
  default: c(() => [
144
- p.icon ? (m(), b(W(p.icon), { key: 0 })) : j("", !0),
145
+ f.icon ? (m(), w(W(f.icon), { key: 0 })) : j("", !0),
145
146
  V("span", {
146
- innerHTML: p.label
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
- se as default
159
+ de as default
159
160
  };