@wikicasa-dev/components 2.3.1-alpha.0 → 2.3.1-alpha.10

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.
Files changed (48) hide show
  1. package/dist/UIKit/Accordion/AccordionContentPrimitive.d.ts +19 -0
  2. package/dist/UIKit/Accordion/AccordionContentPrimitive.js +4 -0
  3. package/dist/UIKit/Accordion/AccordionHeaderPrimitive.d.ts +11 -0
  4. package/dist/UIKit/Accordion/AccordionHeaderPrimitive.js +4 -0
  5. package/dist/UIKit/Accordion/AccordionItemPrimitive.d.ts +13 -0
  6. package/dist/UIKit/Accordion/AccordionItemPrimitive.js +4 -0
  7. package/dist/UIKit/Accordion/AccordionTriggerPrimitive.d.ts +13 -0
  8. package/dist/UIKit/Accordion/AccordionTriggerPrimitive.js +4 -0
  9. package/dist/UIKit/Accordion/BaseAccordion.d.ts +15 -18
  10. package/dist/UIKit/Accordion/BaseAccordionItem.d.ts +12 -21
  11. package/dist/UIKit/Autocomplete/ClearableAutocomplete.d.ts +1 -1
  12. package/dist/UIKit/BaseAutocomplete.d.ts +1 -1
  13. package/dist/UIKit/BaseButton.d.ts +2 -2
  14. package/dist/UIKit/BaseDropDown.d.ts +1 -1
  15. package/dist/UIKit/BaseSnackbar.d.ts +1 -1
  16. package/dist/UIKit/BaseToggle.d.ts +1 -0
  17. package/dist/UIKit/Checkbox/CheckboxBtn.d.ts +1 -1
  18. package/dist/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.d.ts +26 -0
  19. package/dist/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.js +4 -0
  20. package/dist/UIKit/Checkbox/v2/CheckboxGroupPrimitive.d.ts +21 -0
  21. package/dist/UIKit/Checkbox/v2/CheckboxGroupPrimitive.js +4 -0
  22. package/dist/UIKit/Radio/v2/RadioGroupItemPrimitive.d.ts +21 -0
  23. package/dist/UIKit/Radio/v2/RadioGroupItemPrimitive.js +4 -0
  24. package/dist/assets/BaseAccordionItem.css +1 -1
  25. package/dist/assets/BaseSnackbar.css +1 -1
  26. package/dist/assets/tailwind.css +1 -1
  27. package/dist/index.d.ts +7 -3
  28. package/dist/index.js +96 -88
  29. package/dist/packages/components/lib/UIKit/Accordion/AccordionContentPrimitive.vue.js +22 -0
  30. package/dist/packages/components/lib/UIKit/Accordion/AccordionHeaderPrimitive.vue.js +21 -0
  31. package/dist/packages/components/lib/UIKit/Accordion/AccordionItemPrimitive.vue.js +24 -0
  32. package/dist/packages/components/lib/UIKit/Accordion/AccordionTriggerPrimitive.vue.js +22 -0
  33. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordion.vue.js +22 -14
  34. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionItem.vue.js +36 -36
  35. package/dist/packages/components/lib/UIKit/Autocomplete/ClearableAutocomplete.vue.js +17 -17
  36. package/dist/packages/components/lib/UIKit/BaseSnackbar.vue.js +9 -9
  37. package/dist/packages/components/lib/UIKit/BaseToggle.vue.js +16 -14
  38. package/dist/packages/components/lib/UIKit/Checkbox/v2/CheckboxGroupItemPrimitive.vue.js +33 -0
  39. package/dist/packages/components/lib/UIKit/Checkbox/v2/CheckboxGroupPrimitive.vue.js +35 -0
  40. package/dist/packages/components/lib/UIKit/Radio/v2/RadioGroupItemPrimitive.vue.js +31 -0
  41. package/dist/types/index.d.ts +9 -1
  42. package/package.json +3 -3
  43. package/dist/UIKit/Accordion/BaseAccordionBtn.d.ts +0 -34
  44. package/dist/UIKit/Accordion/BaseAccordionBtn.js +0 -4
  45. package/dist/UIKit/Accordion/BaseAccordionContent.d.ts +0 -30
  46. package/dist/UIKit/Accordion/BaseAccordionContent.js +0 -4
  47. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js +0 -59
  48. package/dist/packages/components/lib/UIKit/Accordion/BaseAccordionContent.vue.js +0 -34
@@ -1,13 +1,13 @@
1
- import { defineComponent as x, mergeModels as I, useModel as w, ref as b, watch as y, nextTick as $, createBlock as s, openBlock as r, unref as i, withCtx as a, renderSlot as f, createVNode as n, normalizeClass as m, createCommentVNode as p, normalizeStyle as B } from "vue";
1
+ import { defineComponent as x, mergeModels as b, useModel as w, ref as I, watch as y, nextTick as $, createBlock as s, openBlock as r, unref as i, withCtx as a, renderSlot as f, createVNode as n, normalizeClass as m, createCommentVNode as p, normalizeStyle as B } from "vue";
2
2
  import { CloseIcon as V } from "@wikicasa-dev/svg-icons";
3
3
  import { ToastProvider as D, ToastRoot as M, ToastTitle as P, ToastDescription as z, ToastClose as S, ToastAction as A, ProgressRoot as N, ProgressIndicator as R, ToastPortal as U, ToastViewport as h } from "reka-ui";
4
4
  const q = /* @__PURE__ */ x({
5
5
  inheritAttrs: !1,
6
6
  __name: "BaseSnackbar",
7
- props: /* @__PURE__ */ I({
7
+ props: /* @__PURE__ */ b({
8
8
  alertClass: { default: "primary" },
9
9
  duration: { default: 3e3 },
10
- swipeDirection: { default: "right" },
10
+ swipeDirection: { default: "left" },
11
11
  to: { type: [String, Boolean], default: "body" },
12
12
  dataCy: { default: "" },
13
13
  withCloseIcon: { type: Boolean, default: !0 },
@@ -21,26 +21,26 @@ const q = /* @__PURE__ */ x({
21
21
  }),
22
22
  emits: ["update:open", "update:refresh"],
23
23
  setup(t) {
24
- const l = w(t, "open"), v = w(t, "refresh"), o = b(0);
24
+ const l = w(t, "open"), v = w(t, "refresh"), o = I(0);
25
25
  let k, c;
26
- const g = (e = 3e3) => {
26
+ const T = (e = 3e3) => {
27
27
  o.value = 0;
28
28
  const u = Date.now();
29
29
  c = setInterval(() => {
30
30
  const C = Date.now() - u;
31
31
  o.value = Math.min(100, C / e * 100), o.value >= 100 && clearInterval(c);
32
32
  }, 30);
33
- }, T = () => {
33
+ }, g = () => {
34
34
  clearTimeout(k), k = setTimeout(() => {
35
35
  l.value = !1;
36
- }, t.duration), g(t.duration);
36
+ }, t.duration), T(t.duration);
37
37
  };
38
38
  return y(
39
39
  l,
40
40
  (e) => {
41
41
  $(() => {
42
42
  if (e) {
43
- T();
43
+ g();
44
44
  return;
45
45
  }
46
46
  clearInterval(c), clearTimeout(k), o.value = 0;
@@ -60,7 +60,7 @@ const q = /* @__PURE__ */ x({
60
60
  open: l.value,
61
61
  "onUpdate:open": u[1] || (u[1] = (d) => l.value = d),
62
62
  duration: t.duration,
63
- class: m(["uikit-toast-root uikit-relative uikit-flex uikit-gap-[8px] uikit-overflow-hidden uikit-rounded-[4px] uikit-p-[16px] uikit-text-16 uikit-font-medium uikit-shadow-surface sm:uikit-max-w-[460px]", ["uikit-alert", `uikit-alert-w-${t.alertClass}`, e.$attrs.class]]),
63
+ class: m(["uikit-toast-root uikit-relative uikit-box-border uikit-flex uikit-gap-[8px] uikit-overflow-hidden uikit-rounded-[4px] uikit-p-[16px] uikit-text-16 uikit-font-medium uikit-shadow-surface sm:uikit-max-w-[460px]", ["uikit-alert", `uikit-alert-w-${t.alertClass}`, e.$attrs.class]]),
64
64
  "data-cy": t.dataCy,
65
65
  type: t.type
66
66
  }, {
@@ -1,38 +1,40 @@
1
- import { defineComponent as s, mergeModels as n, useModel as d, createElementBlock as k, openBlock as c, renderSlot as u, createVNode as a, createCommentVNode as m, unref as o, withCtx as f, createElementVNode as p } from "vue";
1
+ import { defineComponent as s, mergeModels as d, useModel as n, createElementBlock as k, openBlock as c, renderSlot as a, createVNode as u, createCommentVNode as m, unref as o, withCtx as f, createElementVNode as p } from "vue";
2
2
  import { SwitchRoot as b, SwitchThumb as h } from "reka-ui";
3
- const g = { class: "uikit-flex uikit-items-center uikit-gap-[8px]" }, w = ["innerHTML"], y = /* @__PURE__ */ s({
3
+ const g = { class: "uikit-flex uikit-items-center uikit-gap-[8px]" }, w = ["innerHTML"], V = /* @__PURE__ */ s({
4
4
  inheritAttrs: !1,
5
5
  __name: "BaseToggle",
6
- props: /* @__PURE__ */ n({
7
- label: {}
6
+ props: /* @__PURE__ */ d({
7
+ label: {},
8
+ dataCy: {}
8
9
  }, {
9
10
  modelValue: { type: Boolean, default: !1 },
10
11
  modelModifiers: {}
11
12
  }),
12
13
  emits: ["update:modelValue"],
13
- setup(t) {
14
- const i = d(t, "modelValue");
15
- return (e, l) => (c(), k("div", g, [
16
- u(e.$slots, "leftLabel"),
17
- a(o(b), {
14
+ setup(e) {
15
+ const i = n(e, "modelValue");
16
+ return (t, l) => (c(), k("div", g, [
17
+ a(t.$slots, "leftLabel"),
18
+ u(o(b), {
18
19
  modelValue: i.value,
19
20
  "onUpdate:modelValue": l[0] || (l[0] = (r) => i.value = r),
21
+ "data-cy": e.dataCy,
20
22
  class: "uikit-flex uikit-h-[20px] uikit-w-[40px] uikit-cursor-pointer uikit-rounded-full uikit-p-0 uikit-transition-[background] uikit-will-change-[background] focus-visible:uikit-outline-w-primary data-[state=checked]:uikit-bg-w-primary data-[state=unchecked]:uikit-bg-w-cultured"
21
23
  }, {
22
24
  default: f(() => [
23
- a(o(h), { class: "uikit-box-border uikit-flex uikit-size-[20px] uikit-translate-x-0 uikit-items-center uikit-justify-center uikit-rounded-full uikit-border uikit-border-solid uikit-border-w-lightgray uikit-bg-white uikit-shadow-xl uikit-transition-transform uikit-will-change-transform data-[state=checked]:uikit-translate-x-full" })
25
+ u(o(h), { class: "uikit-box-border uikit-flex uikit-size-[20px] uikit-translate-x-0 uikit-items-center uikit-justify-center uikit-rounded-full uikit-border uikit-border-solid uikit-border-w-lightgray uikit-bg-white uikit-shadow-xl uikit-transition-transform uikit-will-change-transform data-[state=checked]:uikit-translate-x-full" })
24
26
  ]),
25
27
  _: 1
26
- }, 8, ["modelValue"]),
27
- e.$slots.leftLabel ? m("", !0) : u(e.$slots, "rightLabel", { key: 0 }, () => [
28
+ }, 8, ["modelValue", "data-cy"]),
29
+ t.$slots.leftLabel ? m("", !0) : a(t.$slots, "rightLabel", { key: 0 }, () => [
28
30
  p("span", {
29
31
  class: "uikit-ml-[10px]",
30
- innerHTML: t.label
32
+ innerHTML: e.label
31
33
  }, null, 8, w)
32
34
  ])
33
35
  ]));
34
36
  }
35
37
  });
36
38
  export {
37
- y as default
39
+ V as default
38
40
  };
@@ -0,0 +1,33 @@
1
+ import { defineComponent as n, createPropsRestProxy as p, createBlock as u, openBlock as i, unref as m, mergeProps as s, withCtx as c, renderSlot as y, normalizeProps as f, guardReactiveProps as C } from "vue";
2
+ import { CheckboxRoot as B } from "reka-ui";
3
+ const V = /* @__PURE__ */ n({
4
+ __name: "CheckboxGroupItemPrimitive",
5
+ props: {
6
+ dataCy: {},
7
+ value: {},
8
+ defaultValue: { type: [Boolean, String] },
9
+ modelValue: { type: [Boolean, String, null] },
10
+ disabled: { type: Boolean },
11
+ id: {},
12
+ asChild: { type: Boolean },
13
+ as: {},
14
+ name: {},
15
+ required: { type: Boolean }
16
+ },
17
+ emits: ["update:modelValue"],
18
+ setup(t, { emit: a }) {
19
+ const r = p(t, ["dataCy"]), l = a;
20
+ return (d, o) => (i(), u(m(B), s(r, {
21
+ "data-cy": t.dataCy,
22
+ "onUpdate:modelValue": o[0] || (o[0] = (e) => l("update:modelValue", e))
23
+ }), {
24
+ default: c((e) => [
25
+ y(d.$slots, "default", f(C(e)))
26
+ ]),
27
+ _: 3
28
+ }, 16, ["data-cy"]));
29
+ }
30
+ });
31
+ export {
32
+ V as default
33
+ };
@@ -0,0 +1,35 @@
1
+ import { defineComponent as n, createPropsRestProxy as p, createBlock as u, openBlock as i, unref as s, mergeProps as m, withCtx as c, renderSlot as y } from "vue";
2
+ import { CheckboxGroupRoot as f } from "reka-ui";
3
+ const x = /* @__PURE__ */ n({
4
+ __name: "CheckboxGroupPrimitive",
5
+ props: {
6
+ dataCy: {},
7
+ defaultValue: {},
8
+ modelValue: {},
9
+ rovingFocus: { type: Boolean },
10
+ disabled: { type: Boolean },
11
+ as: {},
12
+ asChild: { type: Boolean },
13
+ dir: {},
14
+ orientation: {},
15
+ loop: { type: Boolean },
16
+ name: {},
17
+ required: { type: Boolean }
18
+ },
19
+ emits: ["update:modelValue"],
20
+ setup(e, { emit: t }) {
21
+ const a = p(e, ["dataCy"]), r = t;
22
+ return (l, o) => (i(), u(s(f), m(a, {
23
+ "data-cy": e.dataCy,
24
+ "onUpdate:modelValue": o[0] || (o[0] = (d) => r("update:modelValue", d))
25
+ }), {
26
+ default: c(() => [
27
+ y(l.$slots, "default")
28
+ ]),
29
+ _: 3
30
+ }, 16, ["data-cy"]));
31
+ }
32
+ });
33
+ export {
34
+ x as default
35
+ };
@@ -0,0 +1,31 @@
1
+ import { defineComponent as n, createPropsRestProxy as d, createBlock as l, openBlock as p, unref as m, mergeProps as c, withCtx as u, renderSlot as y, normalizeProps as f, guardReactiveProps as C } from "vue";
2
+ import { RadioGroupItem as P } from "reka-ui";
3
+ const v = /* @__PURE__ */ n({
4
+ __name: "RadioGroupItemPrimitive",
5
+ props: {
6
+ dataCy: {},
7
+ id: {},
8
+ value: {},
9
+ disabled: { type: Boolean },
10
+ asChild: { type: Boolean },
11
+ as: {},
12
+ name: {},
13
+ required: { type: Boolean }
14
+ },
15
+ emits: ["select"],
16
+ setup(t, { emit: a }) {
17
+ const r = d(t, ["dataCy"]), s = a;
18
+ return (i, o) => (p(), l(m(P), c(r, {
19
+ "data-cy": t.dataCy,
20
+ onSelect: o[0] || (o[0] = (e) => s("select", e))
21
+ }), {
22
+ default: u((e) => [
23
+ y(i.$slots, "default", f(C(e)))
24
+ ]),
25
+ _: 3
26
+ }, 16, ["data-cy"]));
27
+ }
28
+ });
29
+ export {
30
+ v as default
31
+ };
@@ -1,5 +1,4 @@
1
1
  export * from '../UIKit/types';
2
- export type { AccordionItemDecorated, AccordionItem, } from '../UIKit/Accordion/BaseAccordion';
3
2
  export type { CheckboxGroupProps, CheckboxButtonType, } from '../UIKit/Checkbox/CheckboxGroup';
4
3
  export type { BaseTabProps } from '../UIKit/Tab/BaseTabView';
5
4
  export type { RadioButtonType } from '../UIKit/Radio/RadioGroup';
@@ -10,4 +9,13 @@ export type { ChartOptions, ChartData } from 'chart.js';
10
9
  export type { BaseAutocompleteThemes } from '../UIKit/BaseAutocomplete';
11
10
  export type { RadioButtonGroupProps } from '../UIKit/Radio/v2/RadioButtonGroup';
12
11
  export type { RadioButtonItemProps } from '../UIKit/Radio/v2/RadioButtonItem';
12
+ export type { RadioGroupItemPrimitiveProps } from '../UIKit/Radio/v2/RadioGroupItemPrimitive';
13
13
  export type { CheckboxButtonGroupProps, CheckboxButtonItem, } from '../UIKit/Checkbox/v2/CheckboxButtonGroup';
14
+ export type { CheckboxGroupPrimitiveProps } from '../UIKit/Checkbox/v2/CheckboxGroupPrimitive';
15
+ export type { CheckboxGroupItemPrimitiveProps } from '../UIKit/Checkbox/v2/CheckboxGroupItemPrimitive';
16
+ export type { BaseAccordionProps } from '../UIKit/Accordion/BaseAccordion';
17
+ export type { BaseAccordionItemProps } from '../UIKit/Accordion/BaseAccordionItem';
18
+ export type { AccordionContentPrimitiveProps } from '../UIKit/Accordion/AccordionContentPrimitive';
19
+ export type { AccordionHeaderPrimitiveProps } from '../UIKit/Accordion/AccordionHeaderPrimitive';
20
+ export type { AccordionItemPrimitiveProps } from '../UIKit/Accordion/AccordionItemPrimitive';
21
+ export type { AccordionTriggerPrimitiveProps } from '../UIKit/Accordion/AccordionTriggerPrimitive';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/components",
3
- "version": "2.3.1-alpha.0",
3
+ "version": "2.3.1-alpha.10",
4
4
  "description": "Wikicasa frontend components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -44,8 +44,8 @@
44
44
  "peerDependencies": {
45
45
  "vue": "^3.5.0",
46
46
  "date-fns": "^4.0.0",
47
- "@wikicasa-dev/svg-icons": "^1.2.28-alpha.1",
48
- "@wikicasa-dev/vue-composables": "0.0.33-alpha.4",
47
+ "@wikicasa-dev/svg-icons": "^1.3.0",
48
+ "@wikicasa-dev/vue-composables": "^0.1.0",
49
49
  "@wikicasa-dev/types": "^2.5.0",
50
50
  "@wikicasa-dev/utilities": "^1.2.0"
51
51
  },
@@ -1,34 +0,0 @@
1
- type __VLS_Props = {
2
- id: string | number;
3
- arrowWidth?: number;
4
- arrowColor?: `#${string}`;
5
- onContainerClickExpand?: boolean;
6
- accordionOpen?: boolean;
7
- toggleAccordion: () => void;
8
- };
9
- declare function __VLS_template(): {
10
- attrs: Partial<{}>;
11
- slots: {
12
- 'custom-content'?(_: {}): any;
13
- custom_btn?(_: {
14
- btnId: string;
15
- isOpen: boolean;
16
- toggleAccordion: () => void;
17
- }): any;
18
- };
19
- refs: {};
20
- rootEl: any;
21
- };
22
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
24
- click: () => any;
25
- }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
26
- onClick?: (() => any) | undefined;
27
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
28
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
29
- export default _default;
30
- type __VLS_WithTemplateSlots<T, S> = T & {
31
- new (): {
32
- $slots: S;
33
- };
34
- };
@@ -1,4 +0,0 @@
1
- import f from "../../packages/components/lib/UIKit/Accordion/BaseAccordionBtn.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1,30 +0,0 @@
1
- import { ClassTypeProp } from '../types';
2
- type __VLS_Props = {
3
- id: string | number;
4
- accordionOpen: boolean;
5
- accordionOpenClasses?: ClassTypeProp;
6
- accordionClosedClasses?: ClassTypeProp;
7
- accordionContentClasses?: ClassTypeProp;
8
- };
9
- declare function __VLS_template(): {
10
- attrs: Partial<{}>;
11
- slots: {
12
- 'custom-accordion-content'?(_: {
13
- isOpen: boolean;
14
- }): any;
15
- default?(_: {
16
- isOpen: boolean;
17
- }): any;
18
- };
19
- refs: {};
20
- rootEl: HTMLDivElement;
21
- };
22
- type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
23
- declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
24
- declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
25
- export default _default;
26
- type __VLS_WithTemplateSlots<T, S> = T & {
27
- new (): {
28
- $slots: S;
29
- };
30
- };
@@ -1,4 +0,0 @@
1
- import f from "../../packages/components/lib/UIKit/Accordion/BaseAccordionContent.vue.js";
2
- export {
3
- f as default
4
- };
@@ -1,59 +0,0 @@
1
- import { defineComponent as l, createElementBlock as s, openBlock as d, normalizeClass as n, renderSlot as i, createElementVNode as u, withModifiers as k, createVNode as m, unref as f } from "vue";
2
- import { ArrowIcon as g } from "@wikicasa-dev/svg-icons";
3
- const C = ["id"], w = ["aria-expanded", "aria-controls"], b = /* @__PURE__ */ l({
4
- inheritAttrs: !1,
5
- __name: "BaseAccordionBtn",
6
- props: {
7
- id: {},
8
- arrowWidth: { default: 12 },
9
- arrowColor: {},
10
- onContainerClickExpand: { type: Boolean, default: !1 },
11
- accordionOpen: { type: Boolean, default: !1 },
12
- toggleAccordion: { type: Function }
13
- },
14
- emits: ["click"],
15
- setup(t, { emit: r }) {
16
- const a = r;
17
- return (o, e) => (d(), s("div", {
18
- id: `${t.id}`,
19
- class: n(["uikit-flex uikit-items-center uikit-justify-around", [
20
- o.$attrs["btn-wrapper-classes"],
21
- t.onContainerClickExpand ? "uikit-cursor-pointer" : ""
22
- ]]),
23
- onClick: e[1] || (e[1] = (c) => t.onContainerClickExpand && t.toggleAccordion())
24
- }, [
25
- i(o.$slots, "custom-content"),
26
- i(o.$slots, "custom_btn", {
27
- btnId: `btn-${t.id}`,
28
- isOpen: t.accordionOpen,
29
- toggleAccordion: t.toggleAccordion
30
- }, () => [
31
- u("button", {
32
- type: "button",
33
- class: n(["uikit-border-0 uikit-bg-transparent", o.$attrs["btn-classes"]]),
34
- "aria-expanded": t.accordionOpen,
35
- "aria-controls": `accordion-text-${t.id}`,
36
- onClick: e[0] || (e[0] = k((c) => {
37
- t.toggleAccordion(), a("click");
38
- }, ["prevent", "stop"]))
39
- }, [
40
- m(f(g), {
41
- class: n([
42
- "uikit-transition-transform motion-reduce:uikit-transition-none",
43
- [
44
- t.accordionOpen ? "uikit-rotate-180" : "",
45
- o.$attrs["arrow-classes"]
46
- ]
47
- ]),
48
- "stroke-color": t.arrowColor ?? "#222",
49
- width: t.arrowWidth,
50
- height: t.arrowWidth
51
- }, null, 8, ["stroke-color", "class", "width", "height"])
52
- ], 10, w)
53
- ])
54
- ], 10, C));
55
- }
56
- });
57
- export {
58
- b as default
59
- };
@@ -1,34 +0,0 @@
1
- import { defineComponent as n, createElementBlock as a, openBlock as c, normalizeClass as o, renderSlot as t, createElementVNode as d } from "vue";
2
- const s = ["id", "aria-labelledby"], u = /* @__PURE__ */ n({
3
- __name: "BaseAccordionContent",
4
- props: {
5
- id: {},
6
- accordionOpen: { type: Boolean },
7
- accordionOpenClasses: {},
8
- accordionClosedClasses: {},
9
- accordionContentClasses: {}
10
- },
11
- setup(i) {
12
- return (e, r) => (c(), a("div", {
13
- id: `accordion-text-${i.id}`,
14
- role: "region",
15
- "aria-labelledby": `accordion-title-${i.id}`,
16
- class: o(["uikit-grid uikit-overflow-hidden uikit-px-5 uikit-text-sm uikit-text-w-black uikit-transition-[grid-template-rows,opacity,padding,margin] uikit-duration-300 uikit-ease-in-out", [
17
- i.accordionOpen ? i.accordionOpenClasses : i.accordionClosedClasses,
18
- i.accordionOpen ? "uikit-grid-rows-[1fr] uikit-opacity-100" : "uikit-grid-rows-[0fr] uikit-opacity-0",
19
- e.$attrs["accordion-classes"]
20
- ]])
21
- }, [
22
- t(e.$slots, "custom-accordion-content", { isOpen: i.accordionOpen }, () => [
23
- d("div", {
24
- class: o(["uikit-overflow-hidden", i.accordionContentClasses])
25
- }, [
26
- t(e.$slots, "default", { isOpen: i.accordionOpen })
27
- ], 2)
28
- ])
29
- ], 10, s));
30
- }
31
- });
32
- export {
33
- u as default
34
- };