vlite3 0.1.1 → 0.1.2

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 (73) hide show
  1. package/components/Accordion/Accordion.vue.d.ts +3 -1
  2. package/components/Accordion/Accordion.vue.js +43 -50
  3. package/components/Accordion/AccordionContent.vue.js +2 -2
  4. package/components/Accordion/AccordionItem.vue.d.ts +5 -3
  5. package/components/Accordion/AccordionItem.vue.js +55 -42
  6. package/components/Accordion/AccordionTrigger.vue.d.ts +6 -3
  7. package/components/Accordion/AccordionTrigger.vue.js +57 -32
  8. package/components/Accordion/types.d.ts +14 -11
  9. package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
  10. package/components/Button.vue.d.ts +1 -1
  11. package/components/Button.vue.js +18 -19
  12. package/components/Carousel/Carousel.vue.d.ts +4 -4
  13. package/components/CheckBox.vue.d.ts +1 -1
  14. package/components/Chip/Chip.vue.d.ts +1 -1
  15. package/components/ColorPicker/ColorPicker.vue.d.ts +1 -1
  16. package/components/ColorPicker/ColorPicker.vue.js +8 -7
  17. package/components/ConfirmationModal.vue.d.ts +18 -2
  18. package/components/ConfirmationModal.vue.js +18 -13
  19. package/components/DataTable/DataTable.vue.js +1 -1
  20. package/components/DataTable/DataTable.vue2.js +51 -51
  21. package/components/Dropdown/Dropdown.vue.d.ts +2 -1
  22. package/components/Dropdown/Dropdown.vue.js +79 -73
  23. package/components/Dropdown/DropdownMenu.vue.d.ts +2 -0
  24. package/components/Dropdown/DropdownMenu.vue.js +54 -48
  25. package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
  26. package/components/Dropdown/DropdownTrigger.vue.js +7 -5
  27. package/components/FilePicker/FilePicker.vue.d.ts +1 -1
  28. package/components/FilePicker/FilePicker.vue.js +44 -46
  29. package/components/FileTree/FileTree.vue.d.ts +3 -3
  30. package/components/FileTree/FileTree.vue.js +66 -68
  31. package/components/FileTree/FileTreeNode.vue.js +121 -92
  32. package/components/FileTree/index.d.ts +2 -0
  33. package/components/FileTree/types.d.ts +13 -5
  34. package/components/FileTree/useTreeSelection.js +25 -0
  35. package/components/Form/CustomFields.vue.d.ts +1 -1
  36. package/components/Form/Form.vue.d.ts +1 -1
  37. package/components/Form/FormField.vue.d.ts +1 -1
  38. package/components/Form/FormFields.vue.d.ts +1 -1
  39. package/components/IconPicker.vue.js +1 -1
  40. package/components/Input.vue.d.ts +1 -1
  41. package/components/Input.vue.js +67 -59
  42. package/components/Modal.vue.d.ts +6 -2
  43. package/components/Modal.vue.js +56 -49
  44. package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
  45. package/components/Navbar/Navbar.vue.d.ts +1 -0
  46. package/components/Navbar/Navbar.vue.js +43 -40
  47. package/components/Navbar/NavbarItem.vue.js +58 -43
  48. package/components/OTPInput/OTPInput.vue.d.ts +1 -1
  49. package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
  50. package/components/PricingPlan/PricingPlanItem.vue.js +4 -4
  51. package/components/SidePanel.vue.d.ts +8 -4
  52. package/components/SidePanel.vue.js +2 -2
  53. package/components/SidePanel.vue2.js +59 -52
  54. package/components/SidebarMenu/SidebarMenu.vue.d.ts +2 -0
  55. package/components/SidebarMenu/SidebarMenu.vue.js +33 -28
  56. package/components/SidebarMenu/SidebarMenuItem.vue.js +267 -5
  57. package/components/SidebarMenu/SidebarMenuItem.vue3.js +5 -0
  58. package/components/SidebarMenu/types.d.ts +9 -26
  59. package/components/Slider.vue.d.ts +2 -0
  60. package/components/Slider.vue.js +99 -66
  61. package/components/Tabes/Tabes.vue.d.ts +1 -1
  62. package/components/Tabes/Tabes.vue.js +17 -17
  63. package/components/ToastNotification.vue.js +2 -2
  64. package/components/ToastNotification.vue2.js +66 -77
  65. package/components/Tooltip.vue.d.ts +7 -1
  66. package/components/Tooltip.vue.js +21 -15
  67. package/composables/useNotifications.d.ts +3 -0
  68. package/composables/useNotifications.js +69 -66
  69. package/index.js +148 -143
  70. package/package.json +1 -1
  71. package/style.css +46 -21
  72. package/types/navbar.type.d.ts +1 -0
  73. package/components/SidebarMenu/SidebarMenuItem.vue2.js +0 -205
@@ -26,8 +26,10 @@ declare const __VLS_component: import('vue').DefineComponent<AccordionProps, {},
26
26
  onChange?: (value: string | string[]) => any;
27
27
  }>, {
28
28
  disabled: boolean;
29
+ class: string;
29
30
  showIndex: boolean;
30
- iconVariant: "simple" | "solid" | "outline" | "primary" | "ghost";
31
+ size: import('./types').AccordionSize;
32
+ iconVariant: import('./types').IconVariant;
31
33
  variant: import('./types').AccordionVariant;
32
34
  attached: boolean;
33
35
  items: import('./types').AccordionItemSchema[];
@@ -1,102 +1,95 @@
1
- import { defineComponent as p, ref as b, watch as f, computed as B, openBlock as s, createElementBlock as m, normalizeClass as k, renderSlot as r, Fragment as $, renderList as x, createBlock as A, createSlots as M, withCtx as v } from "vue";
2
- import O from "./AccordionItem.vue.js";
3
- const j = /* @__PURE__ */ p({
1
+ import { defineComponent as y, ref as I, watch as f, computed as B, openBlock as s, createElementBlock as m, normalizeClass as b, renderSlot as r, Fragment as k, renderList as p, createBlock as z, createSlots as $, withCtx as v, mergeProps as g } from "vue";
2
+ import x from "./AccordionItem.vue.js";
3
+ const S = /* @__PURE__ */ y({
4
4
  __name: "Accordion",
5
5
  props: {
6
- items: { default: () => [] },
7
6
  modelValue: {},
8
- allowMultiple: { type: Boolean, default: !1 },
9
7
  defaultValue: {},
10
- disabled: { type: Boolean, default: !1 },
8
+ items: { default: () => [] },
9
+ allowMultiple: { type: Boolean, default: !1 },
11
10
  variant: { default: "default" },
11
+ size: { default: "md" },
12
12
  attached: { type: Boolean, default: !1 },
13
+ disabled: { type: Boolean, default: !1 },
14
+ showIndex: { type: Boolean, default: !1 },
13
15
  openIcon: {},
14
16
  closeIcon: {},
15
- iconPosition: {},
16
17
  iconVariant: { default: "simple" },
17
18
  activeIconVariant: {},
18
- showIndex: { type: Boolean, default: !1 },
19
- class: {},
20
- itemClass: {},
19
+ class: { default: "" },
21
20
  triggerClass: {},
22
- contentClass: {}
21
+ contentClass: {},
22
+ itemClass: {}
23
23
  },
24
24
  emits: ["update:modelValue", "change"],
25
- setup(t, { emit: g }) {
26
- const l = t, c = g, a = b([]), u = (e) => Array.isArray(e) ? e : typeof e == "string" && e ? [e] : [];
25
+ setup(a, { emit: h }) {
26
+ const l = a, c = h, t = I([]), u = (e) => Array.isArray(e) ? e : typeof e == "string" && e ? [e] : [];
27
27
  f(
28
28
  () => l.modelValue,
29
29
  (e) => {
30
- a.value = u(e);
30
+ t.value = u(e);
31
31
  },
32
32
  { immediate: !0 }
33
33
  ), f(
34
34
  () => l.defaultValue,
35
35
  (e) => {
36
- !l.modelValue && e && (a.value = u(e));
36
+ !l.modelValue && e && (t.value = u(e));
37
37
  },
38
38
  { immediate: !0 }
39
39
  );
40
40
  const d = (e) => {
41
41
  if (l.disabled) return;
42
- const i = a.value.includes(e);
43
- l.allowMultiple ? i ? a.value = a.value.filter((n) => n !== e) : a.value = [...a.value, e] : i ? a.value = [] : a.value = [e], h();
44
- }, h = () => {
45
- const e = l.allowMultiple ? a.value : a.value[0] || "";
42
+ const i = t.value.includes(e);
43
+ l.allowMultiple ? i ? t.value = t.value.filter((n) => n !== e) : t.value = [...t.value, e] : i ? t.value = [] : t.value = [e], V();
44
+ }, V = () => {
45
+ const e = l.allowMultiple ? t.value : t.value[0] || "";
46
46
  c("update:modelValue", e), c("change", e);
47
47
  }, C = B(() => {
48
48
  const e = ["w-full", l.class];
49
- return l.attached && (e.push("rounded-lg overflow-hidden"), (l.variant === "outline" || l.variant === "default") && e.push("border"), l.variant === "solid" && e.push("border")), e.join(" ");
49
+ return l.attached && (e.push("rounded-lg overflow-hidden"), (l.variant === "outline" || l.variant === "default" || l.variant === "solid") && e.push("border")), e.join(" ");
50
50
  });
51
51
  return (e, i) => (s(), m("div", {
52
- class: k(C.value)
52
+ class: b(C.value)
53
53
  }, [
54
54
  r(e.$slots, "default", {}, () => [
55
- (s(!0), m($, null, x(t.items, (n, I) => (s(), A(O, {
55
+ (s(!0), m(k, null, p(a.items, (n, w) => (s(), z(x, {
56
56
  key: n.id,
57
57
  item: n,
58
- isOpen: a.value.includes(n.id),
59
- variant: t.variant,
60
- attached: t.attached,
61
- disabled: t.disabled,
62
- index: I + 1,
63
- showIndex: t.showIndex,
64
- openIcon: t.openIcon,
65
- closeIcon: t.closeIcon,
66
- iconVariant: t.iconVariant,
67
- activeIconVariant: t.activeIconVariant,
68
- triggerClass: t.triggerClass,
69
- contentClass: t.contentClass,
70
- itemClass: t.itemClass,
58
+ "is-open": t.value.includes(n.id),
59
+ variant: a.variant,
60
+ size: a.size,
61
+ attached: a.attached,
62
+ disabled: a.disabled,
63
+ index: w + 1,
64
+ "show-index": a.showIndex,
65
+ "open-icon": a.openIcon,
66
+ "close-icon": a.closeIcon,
67
+ "icon-variant": a.iconVariant,
68
+ "active-icon-variant": a.activeIconVariant,
69
+ "trigger-class": a.triggerClass,
70
+ "content-class": a.contentClass,
71
+ "item-class": a.itemClass,
71
72
  onToggle: d
72
- }, M({ _: 2 }, [
73
+ }, $({ _: 2 }, [
73
74
  e.$slots.trigger ? {
74
75
  name: "trigger",
75
- fn: v(({ item: o, open: V, toggle: w, triggerClass: y }) => [
76
- r(e.$slots, "trigger", {
77
- item: o,
78
- open: V,
79
- toggle: w,
80
- triggerClass: y
81
- })
76
+ fn: v((o) => [
77
+ r(e.$slots, "trigger", g({ ref_for: !0 }, o))
82
78
  ]),
83
79
  key: "0"
84
80
  } : void 0,
85
81
  e.$slots.content ? {
86
82
  name: "content",
87
- fn: v(({ item: o }) => [
88
- r(e.$slots, "content", {
89
- close: d,
90
- item: o
91
- })
83
+ fn: v((o) => [
84
+ r(e.$slots, "content", g({ ref_for: !0 }, o, { close: d }))
92
85
  ]),
93
86
  key: "1"
94
87
  } : void 0
95
- ]), 1032, ["item", "isOpen", "variant", "attached", "disabled", "index", "showIndex", "openIcon", "closeIcon", "iconVariant", "activeIconVariant", "triggerClass", "contentClass", "itemClass"]))), 128))
88
+ ]), 1032, ["item", "is-open", "variant", "size", "attached", "disabled", "index", "show-index", "open-icon", "close-icon", "icon-variant", "active-icon-variant", "trigger-class", "content-class", "item-class"]))), 128))
96
89
  ])
97
90
  ], 2));
98
91
  }
99
92
  });
100
93
  export {
101
- j as default
94
+ S as default
102
95
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./AccordionContent.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-66f45fa0"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-aa189e08"]]);
5
5
  export {
6
- c as default
6
+ e as default
7
7
  };
@@ -1,16 +1,17 @@
1
- import { AccordionItemSchema, AccordionVariant } from './types';
1
+ import { AccordionItemSchema, AccordionVariant, AccordionSize, IconVariant } from './types';
2
2
  interface Props {
3
3
  item: AccordionItemSchema;
4
4
  isOpen: boolean;
5
5
  variant?: AccordionVariant;
6
+ size?: AccordionSize;
6
7
  attached?: boolean;
7
8
  disabled?: boolean;
8
9
  index?: number;
9
10
  showIndex?: boolean;
10
11
  openIcon?: string;
11
12
  closeIcon?: string;
12
- iconVariant?: 'simple' | 'solid' | 'outline' | 'primary' | 'ghost';
13
- activeIconVariant?: 'simple' | 'solid' | 'outline' | 'primary' | 'ghost';
13
+ iconVariant?: IconVariant;
14
+ activeIconVariant?: IconVariant;
14
15
  triggerClass?: string;
15
16
  contentClass?: string;
16
17
  itemClass?: string;
@@ -42,6 +43,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
42
43
  disabled: boolean;
43
44
  class: string;
44
45
  showIndex: boolean;
46
+ size: AccordionSize;
45
47
  variant: AccordionVariant;
46
48
  attached: boolean;
47
49
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
@@ -1,15 +1,16 @@
1
- import { defineComponent as y, computed as s, openBlock as l, createElementBlock as d, normalizeClass as c, renderSlot as u, createVNode as f, withCtx as b, createElementVNode as I, toDisplayString as g, createCommentVNode as v, withDirectives as w, createBlock as k, resolveDynamicComponent as B, vShow as V } from "vue";
2
- import p from "./AccordionTrigger.vue.js";
3
- import O from "./AccordionContent.vue.js";
4
- const T = {
1
+ import { defineComponent as I, computed as c, openBlock as l, createElementBlock as m, normalizeClass as u, renderSlot as b, createVNode as f, withCtx as x, createElementVNode as k, toDisplayString as h, createCommentVNode as v, withDirectives as z, createBlock as B, resolveDynamicComponent as V, vShow as O } from "vue";
2
+ import A from "./AccordionTrigger.vue.js";
3
+ import P from "./AccordionContent.vue.js";
4
+ const T = { class: "font-medium" }, D = {
5
5
  key: 0,
6
6
  class: "ml-2 text-sm text-muted-foreground font-normal"
7
- }, A = ["innerHTML"], E = /* @__PURE__ */ y({
7
+ }, N = ["innerHTML"], M = /* @__PURE__ */ I({
8
8
  __name: "AccordionItem",
9
9
  props: {
10
10
  item: {},
11
11
  isOpen: { type: Boolean },
12
12
  variant: { default: "default" },
13
+ size: { default: "md" },
13
14
  attached: { type: Boolean, default: !1 },
14
15
  disabled: { type: Boolean, default: !1 },
15
16
  index: {},
@@ -24,79 +25,91 @@ const T = {
24
25
  class: { default: "" }
25
26
  },
26
27
  emits: ["toggle"],
27
- setup(e, { emit: h }) {
28
- const n = e, C = h, r = () => {
29
- n.item.disabled || n.disabled || C("toggle", n.item.id);
30
- }, x = s(() => {
31
- const { variant: t, attached: i } = n;
32
- if (i) {
33
- const o = "transition-all first:rounded-t-lg last:rounded-b-lg";
34
- let a = "border-b last:border-0";
35
- return t === "default" || t === "outline" ? `${o} ${a}` : t === "solid" ? "border-b last:border-0 bg-transparent" : t === "ghost" ? "bg-transparent border-b last:border-0" : `${o} ${a}`;
36
- }
37
- return t === "solid" ? "mb-2 border rounded-lg overflow-hidden transition-all duration-200" : t === "outline" ? "border mb-2 rounded-lg overflow-hidden" : t === "separated" ? "border mb-4 rounded-lg overflow-hidden" : t === "ghost" ? "border-none bg-transparent mb-1" : "border-b";
38
- }), m = s(() => {
39
- const { variant: t, attached: i, isOpen: o } = n, a = n.triggerClass || "";
40
- return t === "solid" ? `${a} px-4 bg-muted transition-colors` : !i && (t === "ghost" || t === "default") ? `${a} px-0 hover:no-underline` : `${a} px-4 hover:bg-accent`;
41
- }), $ = s(() => {
42
- const { variant: t, attached: i } = n, o = n.contentClass || "";
43
- return t === "solid" ? `${o} px-4 pt-4` : !i && (t === "ghost" || t === "default") ? `${o} px-0` : `${o} px-4`;
28
+ setup(e, { emit: $ }) {
29
+ const n = e, p = $, r = () => {
30
+ n.item.disabled || n.disabled || p("toggle", n.item.id);
31
+ }, C = c(() => {
32
+ const { variant: t, attached: a } = n;
33
+ return a ? "transition-all first:rounded-t-lg last:rounded-b-lg border-b last:border-0" : t === "solid" ? "mb-2 border rounded-lg overflow-hidden transition-all duration-200" : t === "outline" ? "border mb-2 rounded-lg overflow-hidden" : t === "separated" ? "border mb-4 rounded-lg overflow-hidden" : t === "ghost" ? "border-none bg-transparent mb-1 rounded-lg overflow-hidden" : "border-b";
34
+ }), g = c(() => {
35
+ const { variant: t, size: a, isOpen: d } = n, i = n.triggerClass || "", o = "transition-all duration-200 ease-in-out", s = {
36
+ sm: "px-3.5 py-2.5 text-sm",
37
+ md: "px-4 py-3 text-base",
38
+ lg: "px-5 py-4 text-lg"
39
+ }[a];
40
+ return t === "solid" ? `${i} ${s} bg-muted hover:bg-muted/80 ${o}` : t === "ghost" ? d ? `${i} ${s} bg-muted font-medium ${o}` : `${i} ${s} hover:bg-muted/20 bg-transparent ${o}` : t === "outline" || t === "separated" ? d ? `${i} ${s} bg-muted/5 border-b border-border ${o}` : `${i} ${s} hover:bg-muted/5 bg-transparent ${o}` : !n.attached && t === "default" ? `${i} ${{
41
+ sm: "py-2 text-base",
42
+ md: "py-3 text-base",
43
+ lg: "py-4 text-lg"
44
+ }[a]} px-0 hover:no-underline ${o}` : `${i} ${s} hover:bg-muted/5 ${o}`;
45
+ }), y = c(() => {
46
+ const { variant: t, size: a, attached: d } = n, i = n.contentClass || "", o = {
47
+ sm: "px-3.5 pb-3.5 pt-2.5 text-sm",
48
+ md: "px-4 pb-4 pt-4 text-sm",
49
+ lg: "px-5 pb-5 pt-5 text-base"
50
+ };
51
+ return t === "solid" || t === "outline" || t === "separated" || t === "ghost" || d ? `${i} ${o[a]}` : `${i} ${{
52
+ sm: "pb-3.5 pt-2.5 text-sm",
53
+ md: "pb-4 pt-4 text-sm",
54
+ lg: "pb-5 pt-5 text-base"
55
+ }[a]} px-0`;
44
56
  });
45
- return (t, i) => (l(), d("div", {
46
- class: c([x.value, n.class, n.itemClass])
57
+ return (t, a) => (l(), m("div", {
58
+ class: u([C.value, n.class, n.itemClass])
47
59
  }, [
48
- u(t.$slots, "trigger", {
60
+ b(t.$slots, "trigger", {
49
61
  item: e.item,
50
62
  open: e.isOpen,
51
63
  toggle: r,
52
- triggerClass: m.value
64
+ triggerClass: g.value
53
65
  }, () => [
54
- f(p, {
66
+ f(A, {
55
67
  open: e.isOpen,
68
+ size: e.size,
56
69
  disabled: e.item.disabled || e.disabled,
57
70
  icon: e.item.icon,
58
71
  index: e.index,
59
- showIndex: e.showIndex,
72
+ "show-index": e.showIndex,
60
73
  "open-icon": e.openIcon,
61
74
  "close-icon": e.closeIcon,
62
75
  "icon-variant": e.iconVariant,
63
76
  "active-icon-variant": e.activeIconVariant,
64
- class: c(m.value),
77
+ class: u(g.value),
65
78
  onClick: r
66
79
  }, {
67
- default: b(() => [
68
- I("span", null, g(e.item.title), 1),
69
- e.item.description ? (l(), d("span", T, g(e.item.description), 1)) : v("", !0)
80
+ default: x(() => [
81
+ k("span", T, h(e.item.title), 1),
82
+ e.item.description ? (l(), m("span", D, h(e.item.description), 1)) : v("", !0)
70
83
  ]),
71
84
  _: 1
72
- }, 8, ["open", "disabled", "icon", "index", "showIndex", "open-icon", "close-icon", "icon-variant", "active-icon-variant", "class"])
85
+ }, 8, ["open", "size", "disabled", "icon", "index", "show-index", "open-icon", "close-icon", "icon-variant", "active-icon-variant", "class"])
73
86
  ]),
74
- w(f(O, {
75
- class: c($.value)
87
+ z(f(P, {
88
+ class: u(y.value)
76
89
  }, {
77
- default: b(() => [
78
- u(t.$slots, "content", {
90
+ default: x(() => [
91
+ b(t.$slots, "content", {
79
92
  item: e.item,
80
93
  close: r
81
94
  }, () => [
82
- e.item.bodyComponent ? (l(), k(B(e.item.bodyComponent), {
95
+ e.item.bodyComponent ? (l(), B(V(e.item.bodyComponent), {
83
96
  key: 0,
84
97
  item: e.item,
85
98
  close: r
86
- }, null, 8, ["item"])) : e.item.content ? (l(), d("div", {
99
+ }, null, 8, ["item"])) : e.item.content ? (l(), m("div", {
87
100
  key: 1,
88
101
  class: "text-muted-foreground leading-relaxed",
89
102
  innerHTML: e.item.content
90
- }, null, 8, A)) : v("", !0)
103
+ }, null, 8, N)) : v("", !0)
91
104
  ])
92
105
  ]),
93
106
  _: 3
94
107
  }, 8, ["class"]), [
95
- [V, e.isOpen]
108
+ [O, e.isOpen]
96
109
  ])
97
110
  ], 2));
98
111
  }
99
112
  });
100
113
  export {
101
- E as default
114
+ M as default
102
115
  };
@@ -1,3 +1,4 @@
1
+ import { AccordionSize, IconVariant } from './types';
1
2
  interface Props {
2
3
  class?: string;
3
4
  icon?: string;
@@ -5,10 +6,11 @@ interface Props {
5
6
  disabled?: boolean;
6
7
  index?: number;
7
8
  showIndex?: boolean;
9
+ size?: AccordionSize;
8
10
  openIcon?: string;
9
11
  closeIcon?: string;
10
- iconVariant?: 'simple' | 'solid' | 'outline' | 'primary' | 'ghost';
11
- activeIconVariant?: 'simple' | 'solid' | 'outline' | 'primary' | 'ghost';
12
+ iconVariant?: IconVariant;
13
+ activeIconVariant?: IconVariant;
12
14
  chevron?: boolean;
13
15
  }
14
16
  declare function __VLS_template(): {
@@ -28,7 +30,8 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
28
30
  }>, {
29
31
  class: string;
30
32
  showIndex: boolean;
31
- iconVariant: "simple" | "solid" | "outline" | "primary" | "ghost";
33
+ size: AccordionSize;
34
+ iconVariant: IconVariant;
32
35
  chevron: boolean;
33
36
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;
34
37
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
@@ -1,9 +1,6 @@
1
- import { defineComponent as I, computed as o, openBlock as r, createElementBlock as s, normalizeClass as a, createElementVNode as f, toDisplayString as k, createCommentVNode as c, createBlock as w, renderSlot as m, createVNode as C } from "vue";
2
- import p from "../Icon.vue.js";
3
- const V = ["data-state", "disabled"], $ = { class: "flex items-center gap-3" }, B = {
4
- key: 0,
5
- class: "flex items-center justify-center h-7 w-7 rounded-full bg-primary-light text-primary text-xs font-bold shrink-0"
6
- }, j = { class: "flex flex-col" }, E = /* @__PURE__ */ I({
1
+ import { defineComponent as w, computed as o, openBlock as r, createElementBlock as a, normalizeClass as s, createElementVNode as m, toDisplayString as z, createCommentVNode as c, createBlock as C, renderSlot as p, createVNode as V } from "vue";
2
+ import g from "../Icon.vue.js";
3
+ const $ = ["data-state", "disabled"], B = { class: "flex flex-col" }, N = /* @__PURE__ */ w({
7
4
  __name: "AccordionTrigger",
8
5
  props: {
9
6
  class: { default: "" },
@@ -12,6 +9,7 @@ const V = ["data-state", "disabled"], $ = { class: "flex items-center gap-3" },
12
9
  disabled: { type: Boolean },
13
10
  index: {},
14
11
  showIndex: { type: Boolean, default: !1 },
12
+ size: { default: "md" },
15
13
  openIcon: {},
16
14
  closeIcon: {},
17
15
  iconVariant: { default: "simple" },
@@ -19,51 +17,78 @@ const V = ["data-state", "disabled"], $ = { class: "flex items-center gap-3" },
19
17
  chevron: { type: Boolean, default: !0 }
20
18
  },
21
19
  emits: ["click"],
22
- setup(t, { emit: g }) {
23
- const e = t, v = g, h = (n) => {
24
- e.disabled || v("click", n);
25
- }, x = o(() => e.open && e.openIcon ? e.openIcon : !e.open && e.closeIcon ? e.closeIcon : "lucide:chevron-down"), l = o(() => e.openIcon && e.closeIcon ? "" : e.open ? "rotate-180" : ""), i = o(() => e.open && e.activeIconVariant ? e.activeIconVariant : e.iconVariant), b = o(() => {
26
- const n = "flex items-center justify-center shrink-0 transition-all duration-300", u = "h-8 w-8 rounded-full", d = {
20
+ setup(t, { emit: v }) {
21
+ const e = t, x = v, h = (n) => {
22
+ e.disabled || x("click", n);
23
+ }, b = o(() => e.open && e.openIcon ? e.openIcon : !e.open && e.closeIcon ? e.closeIcon : "lucide:chevron-down"), l = o(() => e.openIcon && e.closeIcon ? "" : e.open ? "rotate-180" : ""), i = o(() => e.open && e.activeIconVariant ? e.activeIconVariant : e.iconVariant), y = o(() => {
24
+ const n = "flex items-center justify-center shrink-0 transition-all duration-300", d = {
25
+ sm: "h-6.5 w-6.5",
26
+ md: "h-8 w-8",
27
+ lg: "h-10 w-10"
28
+ }, f = {
27
29
  simple: "text-muted-foreground bg-transparent",
28
30
  solid: "text-foreground bg-muted",
29
31
  outline: "text-foreground border bg-transparent",
30
32
  primary: "text-primary-dark bg-primary-light",
31
33
  ghost: "text-muted-foreground hover:bg-accent bg-transparent"
32
- }, y = d[i.value] || d.simple;
33
- return i.value === "simple" ? `text-muted-foreground group-hover:text-foreground ${l.value}` : `${n} ${u} ${y} ${l.value}`;
34
- });
35
- return (n, u) => (r(), s("button", {
34
+ }, k = f[i.value] || f.simple;
35
+ return i.value === "simple" ? `text-muted-foreground group-hover:text-foreground ${l.value}` : `${n} ${d[e.size]} rounded-full ${k} ${l.value}`;
36
+ }), u = o(() => ({
37
+ sm: "h-3.5 w-3.5",
38
+ md: "h-4 w-4",
39
+ lg: "h-5 w-5"
40
+ })[e.size]), I = o(() => ({
41
+ sm: "h-7 w-7 text-[12px]",
42
+ md: "h-7 w-7 text-xs",
43
+ lg: "h-9 w-9 text-sm"
44
+ })[e.size]);
45
+ return (n, d) => (r(), a("button", {
36
46
  type: "button",
37
- class: a(["group flex flex-1 w-full items-center justify-between py-3 text-left font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", [e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer", e.class]]),
47
+ class: s(["group flex flex-1 w-full items-center justify-between text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", [e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer", e.class]]),
38
48
  "data-state": e.open ? "open" : "closed",
39
49
  disabled: e.disabled,
40
50
  onClick: h
41
51
  }, [
42
- f("div", $, [
43
- t.showIndex && t.index !== void 0 ? (r(), s("div", B, k(t.index), 1)) : c("", !0),
44
- t.icon ? (r(), w(p, {
52
+ m("div", {
53
+ class: s(["flex items-center", t.size == "sm" ? "gap-2" : "gap-2.5"])
54
+ }, [
55
+ t.showIndex && t.index !== void 0 ? (r(), a("div", {
56
+ key: 0,
57
+ class: s([
58
+ "flex items-center justify-center rounded-full bg-primary-light text-primary font-bold shrink-0",
59
+ I.value
60
+ ])
61
+ }, z(t.index), 3)) : c("", !0),
62
+ t.icon ? (r(), C(g, {
45
63
  key: 1,
46
64
  icon: t.icon,
47
- class: "h-5 w-5 shrink-0 text-muted-foreground group-hover:text-foreground transition-colors"
48
- }, null, 8, ["icon"])) : c("", !0),
49
- f("div", j, [
50
- m(n.$slots, "default")
65
+ class: s([
66
+ "shrink-0 text-muted-foreground group-hover:text-foreground transition-colors",
67
+ u.value
68
+ ])
69
+ }, null, 8, ["icon", "class"])) : c("", !0),
70
+ m("div", B, [
71
+ p(n.$slots, "default")
51
72
  ])
52
- ]),
53
- m(n.$slots, "icon", {}, () => [
54
- t.chevron || t.openIcon || t.closeIcon ? (r(), s("div", {
73
+ ], 2),
74
+ p(n.$slots, "icon", {}, () => [
75
+ t.chevron || t.openIcon || t.closeIcon ? (r(), a("div", {
55
76
  key: 0,
56
- class: a(b.value)
77
+ class: s(y.value)
57
78
  }, [
58
- C(p, {
59
- icon: x.value,
60
- class: a(["h-4 w-4 shrink-0 transition-transform duration-200", { "rotate-0": i.value !== "simple" }])
79
+ V(g, {
80
+ icon: b.value,
81
+ class: s([
82
+ "shrink-0 transition-transform duration-200",
83
+ u.value,
84
+ i.value !== "simple" ? "rotate-0" : ""
85
+ ])
61
86
  }, null, 8, ["icon", "class"])
62
87
  ], 2)) : c("", !0)
63
88
  ])
64
- ], 10, V));
89
+ ], 10, $));
65
90
  }
66
91
  });
67
92
  export {
68
- E as default
93
+ N as default
69
94
  };
@@ -1,30 +1,33 @@
1
+ import { Component } from 'vue';
2
+ export type AccordionVariant = 'default' | 'solid' | 'outline' | 'separated' | 'ghost';
3
+ export type AccordionSize = 'sm' | 'md' | 'lg';
4
+ export type IconVariant = 'simple' | 'solid' | 'outline' | 'primary' | 'ghost';
1
5
  export interface AccordionItemSchema {
2
6
  id: string;
3
7
  title: string;
4
8
  description?: string;
5
9
  content?: string;
6
- bodyComponent?: any;
7
- disabled?: boolean;
8
10
  icon?: string;
11
+ disabled?: boolean;
12
+ bodyComponent?: Component | any;
9
13
  [key: string]: any;
10
14
  }
11
- export type AccordionVariant = 'default' | 'solid' | 'outline' | 'ghost' | 'separated';
12
15
  export interface AccordionProps {
13
- items?: AccordionItemSchema[];
14
16
  modelValue?: string | string[];
15
- allowMultiple?: boolean;
16
17
  defaultValue?: string | string[];
17
- disabled?: boolean;
18
+ items?: AccordionItemSchema[];
19
+ allowMultiple?: boolean;
18
20
  variant?: AccordionVariant;
21
+ size?: AccordionSize;
19
22
  attached?: boolean;
23
+ disabled?: boolean;
24
+ showIndex?: boolean;
20
25
  openIcon?: string;
21
26
  closeIcon?: string;
22
- iconPosition?: 'left' | 'right';
23
- iconVariant?: 'simple' | 'solid' | 'outline' | 'primary' | 'ghost';
24
- activeIconVariant?: 'simple' | 'solid' | 'outline' | 'primary' | 'ghost';
25
- showIndex?: boolean;
27
+ iconVariant?: IconVariant;
28
+ activeIconVariant?: IconVariant;
26
29
  class?: string;
27
- itemClass?: string;
28
30
  triggerClass?: string;
29
31
  contentClass?: string;
32
+ itemClass?: string;
30
33
  }
@@ -23,8 +23,8 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
23
23
  }>, {
24
24
  disabled: boolean;
25
25
  alt: string;
26
- modelValue: any;
27
26
  size: AvatarSize;
27
+ modelValue: any;
28
28
  loading: boolean;
29
29
  rounded: AvatarRounded;
30
30
  editable: boolean;
@@ -12,8 +12,8 @@ declare const __VLS_component: import('vue').DefineComponent<ButtonProps, {}, {}
12
12
  disabled: boolean;
13
13
  type: "button" | "submit" | "reset";
14
14
  class: any;
15
- variant: ButtonVariant;
16
15
  size: ButtonSize;
16
+ variant: ButtonVariant;
17
17
  loading: boolean;
18
18
  rounded: ButtonRounded;
19
19
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLButtonElement>;