vlite3 1.1.4 → 1.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/README.md +5 -0
  2. package/components/CategoryManager/CategoryManager.vue.js +1 -1
  3. package/components/Chart/BarChart.vue.d.ts +48 -0
  4. package/components/Chart/CircleChart.vue.d.ts +47 -0
  5. package/components/Chart/LineChart.vue.d.ts +55 -0
  6. package/components/Chart/PieChart.vue.d.ts +49 -0
  7. package/components/Chart/index.d.ts +5 -0
  8. package/components/Chart/types.d.ts +135 -0
  9. package/components/Chart/utils.d.ts +40 -0
  10. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  11. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  12. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  13. package/components/CommandPalette/{CommandPaletteItem.vue2.js → CommandPaletteItem.vue.js} +1 -1
  14. package/components/Comment/CommentEditor.vue.d.ts +41 -0
  15. package/components/Comment/CommentEditor.vue.js +221 -0
  16. package/components/Comment/CommentEditor.vue2.js +4 -0
  17. package/components/Comment/CommentItem.vue.d.ts +70 -0
  18. package/components/Comment/CommentItem.vue.js +7 -0
  19. package/components/Comment/CommentItem.vue2.js +322 -0
  20. package/components/Comment/CommentThread.vue.d.ts +64 -0
  21. package/components/Comment/CommentThread.vue.js +185 -0
  22. package/components/Comment/CommentThread.vue2.js +4 -0
  23. package/components/Comment/index.d.ts +4 -0
  24. package/components/Comment/types.d.ts +34 -0
  25. package/components/DataTable/DataTable.vue.d.ts +2 -4
  26. package/components/DataTable/DataTable.vue.js +175 -226
  27. package/components/DataTable/DataTableHeader.vue.d.ts +2 -0
  28. package/components/DataTable/DataTableHeader.vue.js +24 -23
  29. package/components/DataTable/DataTableRow.vue.d.ts +2 -0
  30. package/components/DataTable/DataTableRow.vue.js +32 -31
  31. package/components/DataTable/types.d.ts +2 -9
  32. package/components/Dropdown/Dropdown.vue.d.ts +2 -0
  33. package/components/Dropdown/Dropdown.vue.js +60 -58
  34. package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
  35. package/components/Dropdown/DropdownTrigger.vue.js +7 -6
  36. package/components/Empty/Empty.vue.js +7 -5
  37. package/components/Empty/index.d.ts +1 -1
  38. package/components/Empty/variants/Variant12.vue.d.ts +22 -0
  39. package/components/Empty/variants/Variant12.vue.js +35 -0
  40. package/components/Empty/variants/Variant12.vue2.js +4 -0
  41. package/components/Footer/Footer.vue.d.ts +3 -0
  42. package/components/Footer/Variant1.vue.d.ts +20 -0
  43. package/components/Footer/Variant2.vue.d.ts +20 -0
  44. package/components/Footer/Variant3.vue.d.ts +12 -0
  45. package/components/Footer/index.d.ts +2 -0
  46. package/components/Footer/types.d.ts +73 -0
  47. package/components/Form/CustomFields.vue.d.ts +2 -0
  48. package/components/Form/CustomFields.vue.js +2 -2
  49. package/components/Form/CustomFields.vue2.js +125 -122
  50. package/components/Form/FormField.vue.js +1 -1
  51. package/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
  52. package/components/MultiSelect/MultiSelect.vue.js +95 -94
  53. package/components/NavbarCommandPalette.vue.js +1 -1
  54. package/components/NumberInput.vue.js +1 -1
  55. package/components/NumberInput.vue2.js +39 -38
  56. package/components/RichTextEditor/RichTextLinkPopover.vue.d.ts +26 -0
  57. package/components/RichTextEditor/RichTextReader.vue.d.ts +7 -0
  58. package/components/RichTextEditor/RichTextToolbar.vue.d.ts +24 -0
  59. package/components/RichTextEditor/composables/useRichTextImageUpload.d.ts +14 -0
  60. package/components/RichTextEditor/composables/useRichTextLinks.d.ts +32 -0
  61. package/components/RichTextEditor/index.d.ts +2 -0
  62. package/components/Screen/Screen.vue.js +45 -46
  63. package/components/Screen/ScreenFilter.vue.js +1 -1
  64. package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
  65. package/components/SidebarMenu/SidebarMenu.vue.js +192 -91
  66. package/components/SidebarMenu/SidebarMenu.vue3.js +5 -0
  67. package/components/SidebarMenu/SidebarMenuItem.vue.js +170 -157
  68. package/components/SidebarMenu/types.d.ts +12 -3
  69. package/components/{DataTable/DataTableToolbar.vue.d.ts → Splitter/Splitter.vue.d.ts} +18 -15
  70. package/components/Splitter/Splitter.vue.js +64 -0
  71. package/components/Splitter/Splitter.vue2.js +4 -0
  72. package/components/Splitter/index.d.ts +1 -0
  73. package/components/StatusChip/status-map.js +34 -2
  74. package/components/index.d.ts +4 -0
  75. package/core/config.d.ts +18 -0
  76. package/index.d.ts +2 -0
  77. package/index.js +316 -307
  78. package/package.json +1 -1
  79. package/style.css +42 -6
  80. package/types/config.type.d.ts +2 -0
  81. package/components/DataTable/DataTableToolbar.vue.js +0 -60
  82. package/components/DataTable/DataTableToolbar.vue2.js +0 -4
  83. package/components/SidebarMenu/SidebarMenu.vue2.js +0 -4
  84. /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
@@ -9,6 +9,7 @@ interface Props {
9
9
  hoverable?: boolean;
10
10
  striped?: boolean;
11
11
  compact?: boolean;
12
+ size?: 'xs' | 'sm' | 'md' | 'lg';
12
13
  }
13
14
  declare function __VLS_template(): {
14
15
  attrs: Partial<{}>;
@@ -35,6 +36,7 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
35
36
  index: number;
36
37
  }) => any;
37
38
  }>, {
39
+ size: "xs" | "sm" | "md" | "lg";
38
40
  striped: boolean;
39
41
  compact: boolean;
40
42
  selectable: boolean;
@@ -1,8 +1,8 @@
1
- import { defineComponent as S, computed as p, openBlock as o, createElementBlock as d, normalizeClass as a, withModifiers as B, createElementVNode as r, createVNode as M, createCommentVNode as W, Fragment as z, renderList as N, normalizeStyle as V, renderSlot as h, createBlock as f } from "vue";
2
- import F from "../CheckBox.vue.js";
3
- import L from "../Price/Price.vue.js";
4
- import $ from "../DateTime/DateTime.vue.js";
5
- const T = ["data-state"], E = { class: "flex items-center justify-center" }, H = { class: "max-h-[80px] overflow-y-auto w-full" }, I = ["title", "innerHTML"], j = /* @__PURE__ */ S({
1
+ import { defineComponent as S, computed as z, openBlock as c, createElementBlock as m, normalizeClass as u, withModifiers as B, createElementVNode as a, createVNode as M, createCommentVNode as W, Fragment as N, renderList as V, normalizeStyle as h, renderSlot as F, createBlock as f } from "vue";
2
+ import L from "../CheckBox.vue.js";
3
+ import $ from "../Price/Price.vue.js";
4
+ import T from "../DateTime/DateTime.vue.js";
5
+ const E = ["data-state"], H = { class: "flex items-center justify-center" }, I = { class: "max-h-[80px] overflow-y-auto w-full" }, R = ["title", "innerHTML"], q = /* @__PURE__ */ S({
6
6
  __name: "DataTableRow",
7
7
  props: {
8
8
  row: {},
@@ -13,22 +13,23 @@ const T = ["data-state"], E = { class: "flex items-center justify-center" }, H =
13
13
  isSelected: { type: Boolean, default: !1 },
14
14
  hoverable: { type: Boolean, default: !0 },
15
15
  striped: { type: Boolean, default: !1 },
16
- compact: { type: Boolean, default: !1 }
16
+ compact: { type: Boolean, default: !1 },
17
+ size: { default: "md" }
17
18
  },
18
19
  emits: ["select", "rowClick"],
19
20
  setup(i, { emit: w }) {
20
- const m = i, u = w, n = (e, l) => {
21
+ const o = i, r = w, n = (e, l) => {
21
22
  if (!(!e || !l))
22
23
  return l.includes(".") ? l.split(".").reduce((t, s) => t?.[s], e) : e[l];
23
24
  }, x = (e, l, t) => e.format ? e.format(l, t) : l == null ? "-" : e.type === "number" ? new Intl.NumberFormat("en-US").format(Number(l)) : String(l), g = (e, l, t) => {
24
25
  const s = [];
25
26
  if (e.width && /(?:^|\s|:)w-/.test(e.width) && s.push(e.width), e.minWidth && /(?:^|\s|:)min-w-/.test(e.minWidth) && s.push(e.minWidth), e.capitalize && s.push("capitalize"), e.addStatusColor) {
26
- const c = y(l);
27
- c && s.push(c);
27
+ const d = y(l);
28
+ d && s.push(d);
28
29
  }
29
30
  if (typeof e.class == "function") {
30
- const c = e.class(l, t);
31
- c && s.push(c);
31
+ const d = e.class(l, t);
32
+ d && s.push(d);
32
33
  } else e.class && s.push(e.class);
33
34
  return s.join(" ");
34
35
  }, y = (e) => {
@@ -52,13 +53,13 @@ const T = ["data-state"], E = { class: "flex items-center justify-center" }, H =
52
53
  left: "text-left",
53
54
  center: "text-center",
54
55
  right: "text-right"
55
- })[e.align || "left"], k = p(() => n(m.row, m.keyField)), v = () => {
56
- u("rowClick", { row: m.row, index: m.index });
56
+ })[e.align || "left"], p = z(() => n(o.row, o.keyField)), k = () => o.size === "xs" || o.compact ? "py-1.5! -text-fs-1.5! pr-3 max-sm:pr-10!" : o.size === "sm" ? "py-2! -text-fs-1.5! pr-4 max-sm:pr-10!" : o.size === "lg" ? "py-4! text-base pr-6 max-sm:pr-12!" : "py-3! pr-5! max-sm:pr-10! -text-fs-1.5!", v = () => {
57
+ r("rowClick", { row: o.row, index: o.index });
57
58
  }, C = () => {
58
- u("select", k.value);
59
+ r("select", p.value);
59
60
  };
60
- return (e, l) => (o(), d("tr", {
61
- class: a(["border-b data-[state=selected]:bg-muted h-full", [
61
+ return (e, l) => (c(), m("tr", {
62
+ class: u(["border-b data-[state=selected]:bg-muted h-full", [
62
63
  i.hoverable ? "hover:bg-muted/20" : "",
63
64
  i.striped && i.index % 2 === 1 ? "bg-muted/20" : "bg-background",
64
65
  i.isSelected ? "bg-muted! hover:bg-muted/30" : "",
@@ -67,62 +68,62 @@ const T = ["data-state"], E = { class: "flex items-center justify-center" }, H =
67
68
  "data-state": i.isSelected ? "selected" : void 0,
68
69
  onClick: v
69
70
  }, [
70
- i.selectable ? (o(), d("td", {
71
+ i.selectable ? (c(), m("td", {
71
72
  key: 0,
72
73
  class: "px-0! py-1! align-middle text-center",
73
74
  onClick: l[0] || (l[0] = B(() => {
74
75
  }, ["stop"]))
75
76
  }, [
76
- r("div", E, [
77
- M(F, {
77
+ a("div", H, [
78
+ M(L, {
78
79
  "model-value": i.isSelected,
79
80
  size: "xs",
80
81
  "onUpdate:modelValue": C
81
82
  }, null, 8, ["model-value"])
82
83
  ])
83
84
  ])) : W("", !0),
84
- (o(!0), d(z, null, N(i.headers, (t) => (o(), d("td", {
85
+ (c(!0), m(N, null, V(i.headers, (t) => (c(), m("td", {
85
86
  key: t.field,
86
- class: a(["align-middle overflow-hidden max-w-[400px] whitespace-normal break-words", [
87
- i.compact ? "py-1! -text-fs-1.5! max-sm:pr-10!" : "py-3! pr-5! max-sm:pr-10! -text-fs-1.5!",
87
+ class: u(["align-middle overflow-hidden max-w-[400px] whitespace-normal wrap-break-word", [
88
+ k(),
88
89
  b(t),
89
90
  t.hideOnMobile ? "hidden md:table-cell" : "",
90
91
  g(t, n(i.row, t.field), i.row)
91
92
  ]]),
92
- style: V({
93
+ style: h({
93
94
  ...t.width && !/(?:^|\s|:)w-/.test(t.width) ? { width: t.width } : {},
94
95
  ...t.minWidth && !/(?:^|\s|:)min-w-/.test(t.minWidth) ? { minWidth: t.minWidth } : {}
95
96
  })
96
97
  }, [
97
- r("div", H, [
98
- h(e.$slots, t.field, {
98
+ a("div", I, [
99
+ F(e.$slots, t.field, {
99
100
  value: n(i.row, t.field),
100
101
  row: i.row,
101
102
  index: i.index,
102
103
  field: t.field
103
104
  }, () => [
104
- t.type === "price" ? (o(), f(L, {
105
+ t.type === "price" ? (c(), f($, {
105
106
  key: 0,
106
107
  value: n(i.row, t.field),
107
108
  class: "block",
108
109
  title: String(n(i.row, t.field))
109
- }, null, 8, ["value", "title"])) : t.type === "date" ? (o(), f($, {
110
+ }, null, 8, ["value", "title"])) : t.type === "date" ? (c(), f(T, {
110
111
  key: 1,
111
112
  value: n(i.row, t.field),
112
113
  class: "block",
113
114
  title: String(n(i.row, t.field))
114
- }, null, 8, ["value", "title"])) : (o(), d("span", {
115
+ }, null, 8, ["value", "title"])) : (c(), m("span", {
115
116
  key: 2,
116
117
  class: "block",
117
118
  title: String(n(i.row, t.field)),
118
119
  innerHTML: x(t, n(i.row, t.field), i.row)
119
- }, null, 8, I))
120
+ }, null, 8, R))
120
121
  ])
121
122
  ])
122
123
  ], 6))), 128))
123
- ], 10, T));
124
+ ], 10, E));
124
125
  }
125
126
  });
126
127
  export {
127
- j as default
128
+ q as default
128
129
  };
@@ -11,7 +11,6 @@ export interface SortConfig {
11
11
  export interface TableState {
12
12
  pagination: PaginationConfig;
13
13
  sort: SortConfig;
14
- search: string;
15
14
  filter: Record<string, any>;
16
15
  }
17
16
  export interface FilterConfig {
@@ -19,7 +18,6 @@ export interface FilterConfig {
19
18
  }
20
19
  export interface TableFilter {
21
20
  pagination: PaginationConfig;
22
- search: string;
23
21
  sort: SortConfig;
24
22
  filter: FilterConfig;
25
23
  }
@@ -48,12 +46,6 @@ export interface TableHeader {
48
46
  export interface DataTableProps {
49
47
  rows: any[];
50
48
  selectedRows?: any[];
51
- search?: string;
52
- showSearch?: boolean;
53
- searchPlaceholder?: string;
54
- searchPlaceholderI18n?: string;
55
- toolbarClass?: string;
56
- toolbarSearchClass?: string;
57
49
  headers: TableHeader[];
58
50
  /**
59
51
  * Unique row identifier field.
@@ -78,6 +70,8 @@ export interface DataTableProps {
78
70
  class?: string;
79
71
  sortable?: boolean;
80
72
  variant?: 'default' | 'raised';
73
+ headerVariant?: 'default' | 'minimal';
74
+ size?: 'xs' | 'sm' | 'md' | 'lg';
81
75
  }
82
76
  export interface SelectionState {
83
77
  selected: any[];
@@ -98,7 +92,6 @@ export interface RowClickPayload {
98
92
  * Undefined when DataTable is used standalone (outside Screen).
99
93
  */
100
94
  export interface ScreenContext {
101
- disableSearch: boolean;
102
95
  forceSelectable: boolean;
103
96
  onTableChange?: (state: TableState) => void;
104
97
  }
@@ -37,6 +37,7 @@ type __VLS_Props = {
37
37
  direction?: 'ltr' | 'rtl';
38
38
  isNested?: boolean;
39
39
  disabled?: boolean;
40
+ readonly?: boolean;
40
41
  };
41
42
  declare function __VLS_template(): {
42
43
  attrs: Partial<{}>;
@@ -87,6 +88,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
87
88
  }>, {
88
89
  columns: number | string;
89
90
  loading: boolean;
91
+ readonly: boolean;
90
92
  disabled: boolean;
91
93
  direction: "ltr" | "rtl";
92
94
  selectable: boolean;
@@ -2,9 +2,9 @@ import { defineComponent as oe, ref as i, computed as f, inject as ae, onMounted
2
2
  import ve from "v-tooltip-lite";
3
3
  import "v-tooltip-lite/style.css";
4
4
  import he from "./DropdownMenu.vue.js";
5
- import ge from "./DropdownTrigger.vue.js";
6
- import pe from "../ConfirmationModal.vue.js";
7
- import { useDropdownIds as ye } from "./composables/useDropdownIds.js";
5
+ import ye from "./DropdownTrigger.vue.js";
6
+ import ge from "../ConfirmationModal.vue.js";
7
+ import { useDropdownIds as pe } from "./composables/useDropdownIds.js";
8
8
  import { useDropdownSelection as be } from "./composables/useDropdownSelection.js";
9
9
  import { useDropdownHydration as Ce } from "./composables/useDropdownHydration.js";
10
10
  const Oe = {
@@ -48,36 +48,37 @@ const Oe = {
48
48
  triggerProps: {},
49
49
  direction: { default: "ltr" },
50
50
  isNested: { type: Boolean, default: !1 },
51
- disabled: { type: Boolean, default: !1 }
51
+ disabled: { type: Boolean, default: !1 },
52
+ readonly: { type: Boolean, default: !1 }
52
53
  },
53
54
  emits: ["onSelect", "update:modelValue", "onOpen", "onClose", "update:isOpen", "load-more", "search"],
54
55
  setup(t, { emit: q }) {
55
- const o = t, h = q, y = i(!1), g = i(null), r = i({
56
+ const l = t, h = q, p = i(!1), y = i(null), r = i({
56
57
  title: "Confirm Selection",
57
58
  description: "Are you sure you want to select this option?",
58
59
  confirmText: "Confirm",
59
60
  cancelText: "Cancel",
60
61
  variant: "primary"
61
- }), F = f(() => o.position ? o.position : o.direction === "rtl" ? "bottom-end" : "bottom-start"), G = f(() => o.nestedPosition ? o.nestedPosition : o.direction === "rtl" ? "left-start" : "right-start"), b = i(o.isOpen || !1), C = i(0), J = `dropdown-${Math.random().toString(36).substring(2, 9)}`, w = f(() => o.menuId || J), p = i([]), s = ae("dropdown-context", null), K = (e) => {
62
- p.value.includes(e) || p.value.push(e), s?.registerChildId?.(e);
62
+ }), F = f(() => l.position ? l.position : l.direction === "rtl" ? "bottom-end" : "bottom-start"), G = f(() => l.nestedPosition ? l.nestedPosition : l.direction === "rtl" ? "left-start" : "right-start"), b = i(l.isOpen || !1), C = i(0), J = `dropdown-${Math.random().toString(36).substring(2, 9)}`, w = f(() => l.menuId || J), g = i([]), s = ae("dropdown-context", null), K = (e) => {
63
+ g.value.includes(e) || g.value.push(e), s?.registerChildId?.(e);
63
64
  }, Q = (e) => {
64
- p.value = p.value.filter((n) => n !== e), s?.unregisterChildId?.(e);
65
+ g.value = g.value.filter((o) => o !== e), s?.unregisterChildId?.(e);
65
66
  };
66
67
  ie(() => {
67
68
  s?.registerChildId && s.registerChildId(`#${w.value}`);
68
69
  }), se(() => {
69
70
  s?.unregisterChildId && s.unregisterChildId(`#${w.value}`);
70
71
  }), P(
71
- () => o.isOpen,
72
+ () => l.isOpen,
72
73
  (e) => {
73
74
  if (e !== void 0) {
74
- if (o.disabled && e) return;
75
+ if ((l.disabled || l.readonly) && e) return;
75
76
  b.value = e;
76
77
  }
77
78
  }
78
79
  );
79
80
  const N = (e) => {
80
- if (o.disabled) {
81
+ if (l.disabled || l.readonly) {
81
82
  b.value = !1, h("update:isOpen", !1);
82
83
  return;
83
84
  }
@@ -95,54 +96,54 @@ const Oe = {
95
96
  registerChildId: K,
96
97
  unregisterChildId: Q
97
98
  }), R("modal-context", null);
98
- const I = f(() => o.options ? o.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), S = i([]), A = i(!1), $ = i(!1);
99
+ const I = f(() => l.options ? l.options.map((e) => typeof e == "string" || typeof e == "number" ? { label: String(e), value: String(e) } : e) : []), S = i([]), A = i(!1), $ = i(!1);
99
100
  P(
100
101
  I,
101
102
  (e) => {
102
103
  if (e) {
103
- if (o.remote) {
104
- const n = [...S.value];
105
- e.forEach((l) => {
106
- n.some((a) => a.value !== void 0 && l.value !== void 0 ? typeof a.value == "object" && a.key && l.key ? a.key === l.key && a.value[a.key] === l.value[l.key] : a.value === l.value : a.label === l.label) || n.push(l);
107
- }), S.value = n;
104
+ if (l.remote) {
105
+ const o = [...S.value];
106
+ e.forEach((n) => {
107
+ o.some((a) => a.value !== void 0 && n.value !== void 0 ? typeof a.value == "object" && a.key && n.key ? a.key === n.key && a.value[a.key] === n.value[n.key] : a.value === n.value : a.label === n.label) || o.push(n);
108
+ }), S.value = o;
108
109
  } else
109
110
  S.value = e;
110
111
  !A.value && e.length > 0 && (A.value = !0, setTimeout(() => {
111
- $.value = !0, H(T.value);
112
+ $.value = !0, H(B.value);
112
113
  }, 10));
113
114
  }
114
115
  },
115
116
  { immediate: !0 }
116
117
  );
117
118
  const c = f(() => {
118
- const e = [...S.value], n = new Set(e.map((l) => l.value ?? l.label));
119
- return k.value.forEach((l, d) => {
120
- n.has(d) || (e.unshift(l), n.add(d));
119
+ const e = [...S.value], o = new Set(e.map((n) => n.value ?? n.label));
120
+ return k.value.forEach((n, d) => {
121
+ o.has(d) || (e.unshift(n), o.add(d));
121
122
  }), e;
122
123
  }), { selectedBuffer: k, isHydrating: X, hydrateSelected: H } = Ce({
123
- fetchSelected: o.fetchSelected,
124
+ fetchSelected: l.fetchSelected,
124
125
  getAvailableOptions: () => c.value,
125
126
  isReady: () => $.value
126
- }), { getAllRecursiveIds: Y } = ye(), Z = re({
127
- ...de(o),
127
+ }), { getAllRecursiveIds: Y } = pe(), Z = re({
128
+ ...de(l),
128
129
  options: c
129
- }), { currentValue: T, selectedLabel: D, selectedIcon: L, selectOption: _ } = be(
130
+ }), { currentValue: B, selectedLabel: D, selectedIcon: L, selectOption: _ } = be(
130
131
  Z,
131
132
  h
132
133
  ), ee = f(() => {
133
- const e = o.ignoreClickOutside || [], n = Y(c.value);
134
- return [.../* @__PURE__ */ new Set([...e, ...n, ...p.value])];
134
+ const e = l.ignoreClickOutside || [], o = Y(c.value);
135
+ return [.../* @__PURE__ */ new Set([...e, ...o, ...g.value])];
135
136
  });
136
137
  P(
137
- () => T.value,
138
+ () => B.value,
138
139
  (e) => {
139
140
  $.value && H(e);
140
141
  },
141
142
  { deep: !0 }
142
143
  );
143
144
  const te = (e) => {
144
- if (o.disabled || e.disabled) return;
145
- o.doubleConfirmation || !!e.confirmation ? (g.value = e, typeof e.confirmation == "object" ? r.value = {
145
+ if (l.disabled || l.readonly || e.disabled) return;
146
+ l.doubleConfirmation || !!e.confirmation ? (y.value = e, typeof e.confirmation == "object" ? r.value = {
146
147
  title: e.confirmation.title || "Confirm Selection",
147
148
  description: e.confirmation.description || "Are you sure you want to select this option?",
148
149
  confirmText: e.confirmation.confirmText || "Confirm",
@@ -154,29 +155,29 @@ const Oe = {
154
155
  confirmText: "Confirm",
155
156
  cancelText: "Cancel",
156
157
  variant: "primary"
157
- }, y.value = !0, O()) : (V(e), o.closeOnSelect && O());
158
+ }, p.value = !0, O()) : (V(e), l.closeOnSelect && O());
158
159
  }, V = (e) => {
159
- if (o.disabled || e.disabled) return;
160
- const n = e.value ?? e.label;
161
- k.value.has(n) || k.value.set(n, e);
162
- const l = _(e);
163
- if (!o.isNested) {
160
+ if (l.disabled || l.readonly || e.disabled) return;
161
+ const o = e.value ?? e.label;
162
+ k.value.has(o) || k.value.set(o, e);
163
+ const n = _(e);
164
+ if (!l.isNested) {
164
165
  const d = e._originalOption || e, a = d.value ?? d.label;
165
- (e._path || [d]).forEach((B) => {
166
- typeof B.onSelect == "function" && B.onSelect({
166
+ (e._path || [d]).forEach((T) => {
167
+ typeof T.onSelect == "function" && T.onSelect({
167
168
  value: a,
168
- option: B,
169
+ option: T,
169
170
  data: c.value || [],
170
- values: l
171
+ values: n
171
172
  });
172
173
  });
173
174
  }
174
175
  }, le = () => {
175
- g.value && (V(g.value), g.value = null, y.value = !1);
176
+ y.value && (V(y.value), y.value = null, p.value = !1);
176
177
  }, ne = () => {
177
- g.value = null, y.value = !1;
178
+ y.value = null, p.value = !1;
178
179
  };
179
- return (e, n) => (x(), z("div", {
180
+ return (e, o) => (x(), z("div", {
180
181
  class: "relative inline-block text-left",
181
182
  style: ue({ direction: t.direction })
182
183
  }, [
@@ -193,35 +194,36 @@ const Oe = {
193
194
  ignoreClickOutside: ee.value,
194
195
  class: "w-full",
195
196
  className: "dropdown " + (t.className || ""),
196
- onOnShow: n[2] || (n[2] = (l) => e.$emit("onOpen")),
197
- onOnHide: n[3] || (n[3] = (l) => e.$emit("onClose")),
197
+ onOnShow: o[2] || (o[2] = (n) => e.$emit("onOpen")),
198
+ onOnHide: o[3] || (o[3] = (n) => e.$emit("onClose")),
198
199
  "onUpdate:isOpen": N,
199
200
  triggerClass: "w-full",
200
201
  styles: { padding: "0" }
201
202
  }, {
202
- trigger: m(({ isOpen: l }) => [
203
- v(e.$slots, "trigger", j(U({ selectedLabel: u(D), selectedIcon: t.showSelectedIcon ? u(L) : void 0, isOpen: l })), () => [
204
- M(ge, {
203
+ trigger: m(({ isOpen: n }) => [
204
+ v(e.$slots, "trigger", j(U({ selectedLabel: u(D), selectedIcon: t.showSelectedIcon ? u(L) : void 0, isOpen: n })), () => [
205
+ M(ye, {
205
206
  "selected-label": u(D),
206
207
  "selected-icon": t.showSelectedIcon ? u(L) : void 0,
207
- "is-open": l,
208
+ "is-open": n,
208
209
  direction: t.direction,
209
210
  disabled: t.disabled,
211
+ readonly: t.readonly,
210
212
  triggerProps: t.triggerProps,
211
213
  class: "w-full"
212
- }, null, 8, ["selected-label", "selected-icon", "is-open", "direction", "disabled", "triggerProps"])
214
+ }, null, 8, ["selected-label", "selected-icon", "is-open", "direction", "disabled", "readonly", "triggerProps"])
213
215
  ])
214
216
  ]),
215
217
  default: m(() => [
216
218
  e.$slots?.default ? (x(), z("span", Oe, [
217
219
  v(e.$slots, "default")
218
220
  ])) : E("", !0),
219
- !t.disabled && (I.value.length || c.value.length || e.$slots.menu || e.$slots.item || t.remote || t.searchable) ? (x(), ce(he, {
221
+ !(t.disabled || t.readonly) && (I.value.length || c.value.length || e.$slots.menu || e.$slots.item || t.remote || t.searchable) ? (x(), ce(he, {
220
222
  key: 1,
221
223
  options: I.value,
222
224
  cachedOptions: c.value,
223
225
  class: fe(t.className),
224
- selected: u(T),
226
+ selected: u(B),
225
227
  selectedIndex: t.selectedIndex,
226
228
  maxHeight: t.maxHeight,
227
229
  nestedPosition: G.value,
@@ -237,8 +239,8 @@ const Oe = {
237
239
  debounceTime: t.debounceTime,
238
240
  onSelect: te,
239
241
  onClose: O,
240
- onLoadMore: n[0] || (n[0] = (l) => e.$emit("load-more")),
241
- onSearch: n[1] || (n[1] = (l) => e.$emit("search", l))
242
+ onLoadMore: o[0] || (o[0] = (n) => e.$emit("load-more")),
243
+ onSearch: o[1] || (o[1] = (n) => e.$emit("search", n))
242
244
  }, me({ _: 2 }, [
243
245
  e.$slots.menu ? {
244
246
  name: "menu",
@@ -249,8 +251,8 @@ const Oe = {
249
251
  } : void 0,
250
252
  e.$slots.item ? {
251
253
  name: "item",
252
- fn: m((l) => [
253
- v(e.$slots, "item", j(U(l)))
254
+ fn: m((n) => [
255
+ v(e.$slots, "item", j(U(n)))
254
256
  ]),
255
257
  key: "1"
256
258
  } : void 0,
@@ -272,8 +274,8 @@ const Oe = {
272
274
  ]),
273
275
  _: 3
274
276
  }, 8, ["teleport", "offset", "placement", "isOpen", "keepAlive", "menuId", "ignoreClickOutside", "className"]),
275
- M(pe, {
276
- show: y.value,
277
+ M(ge, {
278
+ show: p.value,
277
279
  title: r.value.title,
278
280
  description: r.value.description,
279
281
  "confirm-text": r.value.confirmText,
@@ -5,11 +5,13 @@ interface Props {
5
5
  placeholder?: string;
6
6
  isOpen?: boolean;
7
7
  disabled?: boolean;
8
+ readonly?: boolean;
8
9
  className?: string;
9
10
  direction?: 'ltr' | 'rtl';
10
11
  triggerProps?: ButtonProps;
11
12
  }
12
13
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
14
+ readonly: boolean;
13
15
  placeholder: string;
14
16
  disabled: boolean;
15
17
  direction: "ltr" | "rtl";
@@ -1,5 +1,5 @@
1
- import { defineComponent as a, openBlock as l, createBlock as o, mergeProps as i } from "vue";
2
- import d from "../Button.vue.js";
1
+ import { defineComponent as a, openBlock as l, createBlock as d, mergeProps as n } from "vue";
2
+ import o from "../Button.vue.js";
3
3
  const s = /* @__PURE__ */ a({
4
4
  __name: "DropdownTrigger",
5
5
  props: {
@@ -8,23 +8,24 @@ const s = /* @__PURE__ */ a({
8
8
  placeholder: { default: "Select an option" },
9
9
  isOpen: { type: Boolean },
10
10
  disabled: { type: Boolean, default: !1 },
11
+ readonly: { type: Boolean, default: !1 },
11
12
  className: {},
12
13
  direction: { default: "ltr" },
13
14
  triggerProps: {}
14
15
  },
15
16
  setup(e) {
16
- return (t, n) => (l(), o(d, i({
17
+ return (t, i) => (l(), d(o, n({
17
18
  text: e.selectedLabel || e.placeholder,
18
- iconRight: "iconamoon:arrow-down-2",
19
+ iconRight: e.disabled || e.readonly ? void 0 : "iconamoon:arrow-down-2",
19
20
  variant: "outline",
20
21
  disabled: e.disabled,
21
22
  dir: e.direction
22
23
  }, e.triggerProps, {
23
24
  icon: e.selectedIcon || e.triggerProps?.icon,
24
- class: ["w-full justify-between! font-normal px-2.5!", e.className],
25
+ class: ["w-full justify-between! font-normal px-2.5!", [e.className, e.readonly && !e.disabled ? "pointer-events-none" : ""]],
25
26
  "icon-right-class": "ml-auto!",
26
27
  "data-testid": t.$attrs["data-testid"] || "dropdown-trigger"
27
- }), null, 16, ["text", "disabled", "dir", "icon", "class", "data-testid"]));
28
+ }), null, 16, ["text", "iconRight", "disabled", "dir", "icon", "class", "data-testid"]));
28
29
  }
29
30
  });
30
31
  export {
@@ -12,7 +12,8 @@ import P from "./variants/Variant8.vue.js";
12
12
  import R from "./variants/Variant9.vue.js";
13
13
  import T from "./variants/Variant10.vue.js";
14
14
  import j from "./variants/Variant11.vue.js";
15
- const z = { class: "flex items-center justify-center min-h-[300px] w-full py-2" }, tt = /* @__PURE__ */ d({
15
+ import z from "./variants/Variant12.vue.js";
16
+ const N = { class: "flex items-center justify-center w-full py-2" }, rt = /* @__PURE__ */ d({
16
17
  __name: "Empty",
17
18
  props: {
18
19
  title: {},
@@ -44,17 +45,18 @@ const z = { class: "flex items-center justify-center min-h-[300px] w-full py-2"
44
45
  variant8: t(P),
45
46
  variant9: t(R),
46
47
  variant10: t(T),
47
- variant11: t(j)
48
+ variant11: t(j),
49
+ variant12: t(z)
48
50
  }, v = n(
49
51
  () => a[p.value] || a.variant1
50
52
  );
51
- return (r, N) => (m(), u("div", z, [
53
+ return (r, q) => (m(), u("div", N, [
52
54
  (m(), $(y(v.value), {
53
55
  title: f.value,
54
56
  description: l.value,
55
57
  icon: o.icon
56
58
  }, h({ _: 2 }, [
57
- I(r.$slots, (q, s) => ({
59
+ I(r.$slots, (A, s) => ({
58
60
  name: s,
59
61
  fn: g((_) => [
60
62
  C(r.$slots, s, k(w(_ || {})))
@@ -65,5 +67,5 @@ const z = { class: "flex items-center justify-center min-h-[300px] w-full py-2"
65
67
  }
66
68
  });
67
69
  export {
68
- tt as default
70
+ rt as default
69
71
  };
@@ -1,2 +1,2 @@
1
1
  export { default as Empty } from './Empty.vue';
2
- export type EmptyVariant = 'variant1' | 'variant2' | 'variant3' | 'variant4' | 'variant5' | 'variant6' | 'variant7' | 'variant8' | 'variant9' | 'variant10' | 'variant11';
2
+ export type EmptyVariant = 'variant1' | 'variant2' | 'variant3' | 'variant4' | 'variant5' | 'variant6' | 'variant7' | 'variant8' | 'variant9' | 'variant10' | 'variant11' | 'variant12';
@@ -0,0 +1,22 @@
1
+ type __VLS_Props = {
2
+ title: string;
3
+ description: string;
4
+ icon: string;
5
+ };
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ action?(_: {}): any;
10
+ };
11
+ refs: {};
12
+ rootEl: HTMLDivElement;
13
+ };
14
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
15
+ 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>;
16
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
+ export default _default;
18
+ type __VLS_WithTemplateSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,35 @@
1
+ import { defineComponent as s, openBlock as n, createElementBlock as r, createElementVNode as t, createVNode as i, toDisplayString as c, renderSlot as d, createCommentVNode as l } from "vue";
2
+ import a from "../../Icon.vue.js";
3
+ const m = { class: "flex w-full flex-col items-center justify-center p-8 min-h-[250px] text-center" }, u = { class: "mb-4 flex h-14 w-14 items-center justify-center rounded-2xl bg-muted/30 border border-border/40 shadow-[0_2px_10px_-4px_rgba(0,0,0,0.05)]" }, x = { class: "text-lg font-semibold text-foreground tracking-tight" }, f = ["innerHTML"], _ = {
4
+ key: 0,
5
+ class: "mt-6"
6
+ }, b = /* @__PURE__ */ s({
7
+ __name: "Variant12",
8
+ props: {
9
+ title: {},
10
+ description: {},
11
+ icon: {}
12
+ },
13
+ setup(e) {
14
+ return (o, h) => (n(), r("div", m, [
15
+ t("div", u, [
16
+ i(a, {
17
+ icon: e.icon,
18
+ class: "h-6 w-6 text-muted-foreground",
19
+ "stroke-width": "1.5"
20
+ }, null, 8, ["icon"])
21
+ ]),
22
+ t("h3", x, c(e.title), 1),
23
+ t("p", {
24
+ class: "mt-2 text-sm text-muted-foreground max-w-sm mx-auto leading-relaxed",
25
+ innerHTML: e.description
26
+ }, null, 8, f),
27
+ o.$slots.action ? (n(), r("div", _, [
28
+ d(o.$slots, "action")
29
+ ])) : l("", !0)
30
+ ]));
31
+ }
32
+ });
33
+ export {
34
+ b as default
35
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Variant12.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,3 @@
1
+ import { FooterProps } from './types';
2
+ declare const _default: import('vue').DefineComponent<FooterProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<FooterProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLElement>;
3
+ export default _default;