vlite3 1.1.2 → 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 (149) hide show
  1. package/README.md +5 -0
  2. package/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -1
  3. package/components/AttachmentsList/AttachmentsList.vue.js +237 -163
  4. package/components/Avatar.vue.js +1 -1
  5. package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
  6. package/components/Button.vue.js +30 -28
  7. package/components/Carousel/Carousel.vue.d.ts +2 -2
  8. package/components/CategoryManager/CategoryManager.vue.d.ts +10 -2
  9. package/components/CategoryManager/CategoryManager.vue.js +138 -119
  10. package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
  11. package/components/CategoryManager/CategoryNode.vue.js +93 -88
  12. package/components/Chart/BarChart.vue.d.ts +48 -0
  13. package/components/Chart/CircleChart.vue.d.ts +47 -0
  14. package/components/Chart/LineChart.vue.d.ts +55 -0
  15. package/components/Chart/PieChart.vue.d.ts +49 -0
  16. package/components/Chart/index.d.ts +5 -0
  17. package/components/Chart/types.d.ts +135 -0
  18. package/components/Chart/utils.d.ts +40 -0
  19. package/components/Chat/ChatBubble.vue.js +22 -22
  20. package/components/CheckBox.vue.js +29 -28
  21. package/components/ColorPicker/ColorIro.vue3.js +2 -2
  22. package/components/ColorPicker/ColorPicker.vue.js +2 -2
  23. package/components/Comment/CommentEditor.vue.d.ts +41 -0
  24. package/components/Comment/CommentEditor.vue.js +221 -0
  25. package/components/Comment/CommentEditor.vue2.js +4 -0
  26. package/components/Comment/CommentItem.vue.d.ts +70 -0
  27. package/components/Comment/CommentItem.vue.js +7 -0
  28. package/components/Comment/CommentItem.vue2.js +322 -0
  29. package/components/Comment/CommentThread.vue.d.ts +64 -0
  30. package/components/Comment/CommentThread.vue.js +185 -0
  31. package/components/Comment/CommentThread.vue2.js +4 -0
  32. package/components/Comment/index.d.ts +4 -0
  33. package/components/Comment/types.d.ts +34 -0
  34. package/components/ConfirmationModal.vue.js +30 -28
  35. package/components/CopyButton.vue.d.ts +50 -0
  36. package/components/CopyButton.vue.js +69 -0
  37. package/components/CopyButton.vue2.js +4 -0
  38. package/components/DataTable/DataTable.vue.d.ts +2 -4
  39. package/components/DataTable/DataTable.vue.js +184 -235
  40. package/components/DataTable/DataTableHeader.vue.d.ts +2 -0
  41. package/components/DataTable/DataTableHeader.vue.js +24 -23
  42. package/components/DataTable/DataTableRow.vue.d.ts +2 -0
  43. package/components/DataTable/DataTableRow.vue.js +32 -31
  44. package/components/DataTable/types.d.ts +2 -9
  45. package/components/DatePicker.vue.js +41 -35
  46. package/components/DateRangePicker.vue.js +18 -17
  47. package/components/Dropdown/Dropdown.vue.d.ts +5 -0
  48. package/components/Dropdown/Dropdown.vue.js +141 -137
  49. package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
  50. package/components/Dropdown/DropdownItem.vue.js +21 -20
  51. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  52. package/components/Dropdown/DropdownMenu.vue2.js +13 -12
  53. package/components/Dropdown/DropdownTrigger.vue.d.ts +4 -0
  54. package/components/Dropdown/DropdownTrigger.vue.js +12 -7
  55. package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
  56. package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
  57. package/components/Dropdown/composables/useDropdownSelection.js +46 -31
  58. package/components/Empty/Empty.vue.js +7 -5
  59. package/components/Empty/index.d.ts +1 -1
  60. package/components/Empty/variants/Variant12.vue.d.ts +22 -0
  61. package/components/Empty/variants/Variant12.vue.js +35 -0
  62. package/components/Empty/variants/Variant12.vue2.js +4 -0
  63. package/components/FilePicker/FilePicker.vue.js +93 -90
  64. package/components/Footer/Footer.vue.d.ts +3 -0
  65. package/components/Footer/Variant1.vue.d.ts +20 -0
  66. package/components/Footer/Variant2.vue.d.ts +20 -0
  67. package/components/Footer/Variant3.vue.d.ts +12 -0
  68. package/components/Footer/index.d.ts +2 -0
  69. package/components/Footer/types.d.ts +73 -0
  70. package/components/Form/CustomFields.vue.d.ts +2 -0
  71. package/components/Form/CustomFields.vue.js +1 -1
  72. package/components/Form/CustomFields.vue2.js +125 -122
  73. package/components/Form/Form.vue.js +2 -2
  74. package/components/Form/Form.vue2.js +68 -64
  75. package/components/Form/FormField.vue.js +205 -149
  76. package/components/Form/FormFields.vue.js +2 -2
  77. package/components/Form/FormFields.vue2.js +28 -27
  78. package/components/Form/types.d.ts +2 -2
  79. package/components/Form/utils/form.utils.d.ts +3 -3
  80. package/components/Form/utils/form.utils.js +37 -37
  81. package/components/Input.vue.js +64 -62
  82. package/components/Invoice/Invoice.vue.js +9 -7
  83. package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
  84. package/components/Invoice/InvoiceTotals.vue.js +86 -0
  85. package/components/Invoice/InvoiceTotals.vue2.js +4 -0
  86. package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -1
  87. package/components/Invoice/InvoiceVariant1.vue.js +194 -207
  88. package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -1
  89. package/components/Invoice/InvoiceVariant2.vue.js +109 -118
  90. package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -1
  91. package/components/Invoice/InvoiceVariant3.vue.js +157 -167
  92. package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -1
  93. package/components/Invoice/InvoiceVariant4.vue.js +192 -202
  94. package/components/Invoice/index.d.ts +1 -0
  95. package/components/Invoice/types.d.ts +22 -0
  96. package/components/Masonry/Masonry.vue.d.ts +1 -1
  97. package/components/Modal.vue.js +1 -1
  98. package/components/Modal.vue2.js +60 -54
  99. package/components/MultiSelect/MultiSelect.vue.d.ts +2 -0
  100. package/components/MultiSelect/MultiSelect.vue.js +92 -90
  101. package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
  102. package/components/NumberInput.vue.js +2 -2
  103. package/components/NumberInput.vue2.js +127 -121
  104. package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
  105. package/components/RichTextEditor/RichTextLinkPopover.vue.d.ts +26 -0
  106. package/components/RichTextEditor/RichTextReader.vue.d.ts +7 -0
  107. package/components/RichTextEditor/RichTextToolbar.vue.d.ts +24 -0
  108. package/components/RichTextEditor/composables/useRichTextImageUpload.d.ts +14 -0
  109. package/components/RichTextEditor/composables/useRichTextLinks.d.ts +32 -0
  110. package/components/RichTextEditor/index.d.ts +2 -0
  111. package/components/Screen/Screen.vue.js +45 -46
  112. package/components/Screen/ScreenFilter.vue.js +1 -1
  113. package/components/SidePanel.vue.js +2 -2
  114. package/components/SidePanel.vue2.js +58 -52
  115. package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
  116. package/components/SidebarMenu/SidebarMenu.vue.js +192 -91
  117. package/components/SidebarMenu/SidebarMenu.vue3.js +5 -0
  118. package/components/SidebarMenu/SidebarMenuItem.vue.js +170 -157
  119. package/components/SidebarMenu/types.d.ts +12 -3
  120. package/components/{DataTable/DataTableToolbar.vue.d.ts → Splitter/Splitter.vue.d.ts} +18 -15
  121. package/components/Splitter/Splitter.vue.js +64 -0
  122. package/components/Splitter/Splitter.vue2.js +4 -0
  123. package/components/Splitter/index.d.ts +1 -0
  124. package/components/Stats/StatItem.vue.js +96 -91
  125. package/components/Stats/types.d.ts +1 -0
  126. package/components/StatusChip/status-map.js +34 -2
  127. package/components/Switch.vue.d.ts +6 -1
  128. package/components/Switch.vue.js +61 -24
  129. package/components/TagInput/TagInput.vue.d.ts +187 -0
  130. package/components/TagInput/TagInput.vue.js +113 -0
  131. package/components/TagInput/TagInput.vue2.js +4 -0
  132. package/components/TagInput/index.d.ts +1 -0
  133. package/components/Textarea.vue.js +19 -18
  134. package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
  135. package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
  136. package/components/index.d.ts +4 -0
  137. package/core/config.d.ts +54 -0
  138. package/index.d.ts +4 -0
  139. package/index.js +300 -285
  140. package/package.json +1 -1
  141. package/style.css +657 -6
  142. package/types/button.d.ts +1 -1
  143. package/types/config.type.d.ts +2 -0
  144. package/types/styles.d.ts +1 -0
  145. package/utils/functions.js +9 -9
  146. package/components/DataTable/DataTableToolbar.vue.js +0 -60
  147. package/components/DataTable/DataTableToolbar.vue2.js +0 -4
  148. package/components/SidebarMenu/SidebarMenu.vue2.js +0 -4
  149. /package/components/ColorPicker/{ColorIro.vue2.js → ColorIro.vue.js} +0 -0
@@ -1,34 +1,26 @@
1
- import { defineComponent as ye, inject as we, computed as i, ref as y, watch as g, openBlock as r, createElementBlock as m, createBlock as U, normalizeClass as w, createSlots as j, withCtx as x, renderSlot as $, createVNode as B, createCommentVNode as W, createElementVNode as f, Fragment as A, renderList as E, normalizeStyle as L, isMemoSame as Y, mergeProps as X, unref as q } from "vue";
2
- import Pe from "../CheckBox.vue.js";
3
- import Ce from "../Button.vue.js";
4
- import Se from "../ConfirmationModal.vue.js";
5
- import ke from "../Pagination/Pagination.vue.js";
6
- import Ie from "../Empty/Empty.vue.js";
7
- import Te from "./DataTableHeader.vue.js";
8
- import De from "./DataTableRow.vue.js";
9
- import xe from "./DataTableToolbar.vue.js";
10
- import { $t as P } from "../../utils/i18n.js";
11
- import { SCREEN_CONTEXT_KEY as $e } from "./types.js";
12
- const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, Re = { class: "hover:bg-transparent" }, ze = {
1
+ import { defineComponent as he, inject as pe, computed as i, ref as k, watch as S, openBlock as d, createElementBlock as u, createElementVNode as m, normalizeClass as x, createVNode as D, createCommentVNode as V, Fragment as B, renderList as I, createBlock as M, normalizeStyle as j, isMemoSame as F, createSlots as K, withCtx as U, renderSlot as W, mergeProps as O, unref as L } from "vue";
2
+ import be from "../CheckBox.vue.js";
3
+ import we from "../ConfirmationModal.vue.js";
4
+ import ye from "../Pagination/Pagination.vue.js";
5
+ import Pe from "../Empty/Empty.vue.js";
6
+ import Ce from "./DataTableHeader.vue.js";
7
+ import ke from "./DataTableRow.vue.js";
8
+ import { $t as p } from "../../utils/i18n.js";
9
+ import { SCREEN_CONTEXT_KEY as Se } from "./types.js";
10
+ const xe = { class: "space-y-6.5" }, Ie = { class: "overflow-x-auto w-full" }, Te = { class: "hover:bg-transparent" }, De = {
13
11
  key: 0,
14
12
  scope: "col",
15
13
  class: "w-[40px] px-0 text-center font-medium text-muted-foreground",
16
14
  style: { width: "40px" }
17
- }, We = { class: "flex items-center justify-center" }, Ae = { class: "[&_tr:last-child]:border-0" }, Ne = {
15
+ }, Be = { class: "flex items-center justify-center" }, Ee = { class: "[&_tr:last-child]:border-0" }, ze = {
18
16
  key: 0,
19
17
  class: "w-[48px] px-0 py-4 align-middle text-center",
20
18
  style: { width: "48px" }
21
- }, Ve = { key: 2 }, Me = ["colspan"], Ue = { key: 1 }, Qe = /* @__PURE__ */ ye({
19
+ }, Re = { key: 2 }, $e = ["colspan"], Ve = { key: 0 }, Le = /* @__PURE__ */ he({
22
20
  __name: "DataTable",
23
21
  props: {
24
22
  rows: { default: () => [] },
25
23
  selectedRows: { default: () => [] },
26
- search: { default: "" },
27
- showSearch: { type: Boolean, default: !1 },
28
- searchPlaceholder: {},
29
- searchPlaceholderI18n: {},
30
- toolbarClass: {},
31
- toolbarSearchClass: {},
32
24
  headers: { default: () => [] },
33
25
  keyField: { default: "auto" },
34
26
  loading: { type: Boolean, default: !1 },
@@ -54,325 +46,282 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
54
46
  tableClass: {},
55
47
  class: {},
56
48
  sortable: { type: Boolean, default: !1 },
57
- variant: { default: "default" }
49
+ variant: { default: "default" },
50
+ headerVariant: { default: "default" },
51
+ size: { default: "md" }
58
52
  },
59
53
  emits: ["change", "select", "rowClick", "update:itemsPerPage", "update:selectedRows", "delete"],
60
- setup(o, { emit: G }) {
61
- const H = (e, t) => {
54
+ setup(n, { emit: Y }) {
55
+ const X = (e, t) => {
62
56
  if (!(!e || !t))
63
- return t.includes(".") ? t.split(".").reduce((l, n) => l?.[n], e) : e[t];
64
- }, c = (e, t) => H(e, t), J = (e, t) => {
57
+ return t.includes(".") ? t.split(".").reduce((l, o) => l?.[o], e) : e[t];
58
+ }, c = (e, t) => X(e, t), q = (e, t) => {
65
59
  const l = ["id", "_id"];
66
60
  if (t && t !== "auto") return t;
67
61
  if (e && e.length > 0) {
68
- for (const n of l)
69
- if (n in e[0]) return n;
62
+ for (const o of l)
63
+ if (o in e[0]) return o;
70
64
  }
71
65
  return "_id";
72
- }, Q = (e) => e.sortKey || e.field, a = o, b = G, R = we($e, null), F = i(() => R?.disableSearch ? !1 : a.showSearch), C = i(() => a.hideSelectable ? !1 : R ? R.forceSelectable : !0), d = i(() => J(a.rows, a.keyField)), u = y({ field: "", order: "" }), S = y(
66
+ }, G = (e) => e.sortKey || e.field, a = n, g = Y, E = pe(Se, null), b = i(() => a.hideSelectable ? !1 : E ? E.forceSelectable : !0), r = i(() => q(a.rows, a.keyField)), v = k({ field: "", order: "" }), w = k(
73
67
  a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10
74
- ), h = y(a.pageInfo?.currentPage || 1), p = y(a.search || ""), k = y(!1), Z = i(() => a.loading);
75
- g(
76
- () => a.search,
77
- (e) => {
78
- e !== void 0 && e !== p.value && (p.value = e);
79
- }
80
- );
81
- let N = null;
82
- g(p, () => {
83
- N && clearTimeout(N), N = setTimeout(() => {
84
- h.value = 1, z();
85
- }, 300);
86
- }), g(
68
+ ), h = k(a.pageInfo?.currentPage || 1), T = k(!1), H = i(() => a.loading);
69
+ S(
87
70
  () => a.pageInfo?.itemsPerPage,
88
71
  (e) => {
89
- e !== void 0 && (S.value = e);
72
+ e !== void 0 && (w.value = e);
90
73
  }
91
- ), g(
74
+ ), S(
92
75
  () => a.paginationProps?.itemsPerPage,
93
76
  (e) => {
94
- e !== void 0 && (S.value = e);
77
+ e !== void 0 && (w.value = e);
95
78
  }
96
- ), g(
79
+ ), S(
97
80
  () => a.pageInfo?.currentPage,
98
81
  (e) => {
99
82
  e && (h.value = e);
100
83
  }
101
84
  );
102
- const s = y(/* @__PURE__ */ new Set());
103
- g(
85
+ const s = k(/* @__PURE__ */ new Set());
86
+ S(
104
87
  () => a.selectedRows,
105
88
  (e) => {
106
- const t = new Set((e || []).map((l) => c(l, d.value)));
89
+ const t = new Set((e || []).map((l) => c(l, r.value)));
107
90
  (t.size !== s.value.size || [...t].some((l) => !s.value.has(l))) && (s.value = t);
108
91
  },
109
92
  { immediate: !0, deep: !0 }
110
93
  );
111
- const V = i(
112
- () => a.rows.length > 0 && a.rows.every((e) => s.value.has(c(e, d.value)))
113
- ), K = i(() => s.value.size > 0 && !V.value), _ = i(() => {
94
+ const z = i(
95
+ () => a.rows.length > 0 && a.rows.every((e) => s.value.has(c(e, r.value)))
96
+ ), A = i(() => s.value.size > 0 && !z.value), J = i(() => {
114
97
  const e = [...a.selectedRows || [], ...a.rows], t = /* @__PURE__ */ new Map();
115
- return e.forEach((l) => t.set(c(l, d.value), l)), Array.from(s.value).map((l) => t.get(l)).filter(Boolean);
116
- }), ee = (e) => {
98
+ return e.forEach((l) => t.set(c(l, r.value), l)), Array.from(s.value).map((l) => t.get(l)).filter(Boolean);
99
+ }), Q = (e) => {
117
100
  const t = new Set(s.value);
118
- e ? a.rows.forEach((l) => t.add(c(l, d.value))) : a.rows.forEach((l) => t.delete(c(l, d.value))), s.value = t, O();
119
- }, te = (e) => {
101
+ e ? a.rows.forEach((l) => t.add(c(l, r.value))) : a.rows.forEach((l) => t.delete(c(l, r.value))), s.value = t, N();
102
+ }, Z = (e) => {
120
103
  const t = new Set(s.value);
121
- t.has(e) ? t.delete(e) : t.add(e), s.value = t, O();
122
- }, O = () => {
104
+ t.has(e) ? t.delete(e) : t.add(e), s.value = t, N();
105
+ }, N = () => {
123
106
  const e = /* @__PURE__ */ new Set(), t = [];
124
107
  a.rows.forEach((l) => {
125
- const n = c(l, d.value);
126
- s.value.has(n) && (t.push(l), e.add(n));
108
+ const o = c(l, r.value);
109
+ s.value.has(o) && (t.push(l), e.add(o));
127
110
  }), (a.selectedRows || []).forEach((l) => {
128
- const n = c(l, d.value);
129
- !e.has(n) && s.value.has(n) && (t.push(l), e.add(n));
130
- }), b("select", {
111
+ const o = c(l, r.value);
112
+ !e.has(o) && s.value.has(o) && (t.push(l), e.add(o));
113
+ }), g("select", {
131
114
  selected: t,
132
- all: V.value,
133
- indeterminate: K.value
134
- }), b("update:selectedRows", t);
135
- }, le = (e) => {
136
- const t = a.headers.find((n) => n.field === e), l = t ? Q(t) : e;
137
- u.value.field === l ? u.value.order === "asc" ? u.value.order = "desc" : u.value.order === "desc" ? (u.value.order = "", u.value.field = "") : u.value.order = "asc" : (u.value.field = l, u.value.order = "asc"), h.value = 1, z();
138
- }, ae = (e) => {
139
- h.value = e, z();
140
- }, oe = (e) => {
141
- S.value = e, h.value = 1, b("update:itemsPerPage", e), z();
142
- }, se = (e) => b("rowClick", e), ne = () => {
143
- b("delete", _.value), k.value = !1;
115
+ all: z.value,
116
+ indeterminate: A.value
117
+ }), g("update:selectedRows", t);
118
+ }, _ = (e) => {
119
+ const t = a.headers.find((o) => o.field === e), l = t ? G(t) : e;
120
+ v.value.field === l ? v.value.order = v.value.order === "asc" ? "desc" : "asc" : (v.value.field = l, v.value.order = "asc"), h.value = 1, $();
121
+ }, ee = (e) => {
122
+ h.value = e, $();
123
+ }, te = (e) => {
124
+ w.value = e, h.value = 1, g("update:itemsPerPage", e), $();
125
+ }, le = (e) => g("rowClick", e), ae = () => {
126
+ g("delete", J.value), T.value = !1;
144
127
  };
145
- let M = null;
146
- const z = () => {
147
- M && clearTimeout(M), M = setTimeout(() => {
128
+ let R = null;
129
+ const $ = () => {
130
+ R && clearTimeout(R), R = setTimeout(() => {
148
131
  const e = {
149
- pagination: { page: h.value, limit: S.value },
150
- sort: { ...u.value },
151
- search: p.value,
132
+ pagination: { page: h.value, limit: w.value },
133
+ sort: { ...v.value },
152
134
  filter: {}
153
135
  };
154
- b("change", e), R?.onTableChange?.(e);
136
+ g("change", e), E?.onTableChange?.(e);
155
137
  }, 10);
156
138
  };
157
- g(
139
+ S(
158
140
  () => a.rows,
159
141
  () => {
160
- const e = new Set(a.rows.map((t) => c(t, d.value)));
142
+ const e = new Set(a.rows.map((t) => c(t, r.value)));
161
143
  s.value = new Set([...s.value].filter((t) => e.has(t)));
162
144
  }
163
145
  );
164
- const ie = i(() => [
146
+ const ne = i(() => [
165
147
  "w-full flex flex-col",
166
148
  a.variant === "raised" ? "bg-background shadow-sm p-2 rounded-lg" : "bg-background rounded",
167
149
  "overflow-hidden",
168
150
  a.bordered ? "border border-border" : "",
169
151
  a.class
170
- ].join(" ")), re = i(() => ["w-full caption-bottom -text-fs-1", a.tableClass].join(" ")), de = (e) => {
152
+ ].join(" ")), se = i(() => ["w-full caption-bottom -text-fs-1", a.tableClass].join(" ")), oe = (e) => {
171
153
  const t = {};
172
154
  return e.width && !/(?:^|\s|:)w-/.test(e.width) && (t.width = e.width), e.minWidth && !/(?:^|\s|:)min-w-/.test(e.minWidth) && (t.minWidth = e.minWidth), t;
173
- }, ce = (e) => {
155
+ }, ie = (e) => {
174
156
  const t = [];
175
157
  return e.width && /(?:^|\s|:)w-/.test(e.width) && t.push(e.width), e.minWidth && /(?:^|\s|:)min-w-/.test(e.minWidth) && t.push(e.minWidth), t.join(" ");
176
- }, ue = i(
177
- () => a.emptyTitleI18n ? P(a.emptyTitleI18n) : a.emptyTitle
178
- ), me = i(
179
- () => a.emptyDescriptionI18n ? P(a.emptyDescriptionI18n) : a.emptyDescription
180
- ), fe = i(() => {
181
- const e = P("vlite.dataTable.confirmDeleteTitle");
158
+ }, re = i(
159
+ () => a.emptyTitleI18n ? p(a.emptyTitleI18n) : a.emptyTitle
160
+ ), de = i(
161
+ () => a.emptyDescriptionI18n ? p(a.emptyDescriptionI18n) : a.emptyDescription
162
+ ), ce = i(() => {
163
+ const e = p("vlite.dataTable.confirmDeleteTitle");
182
164
  return e !== "vlite.dataTable.confirmDeleteTitle" ? e : "Confirm Deletion";
183
- }), ve = i(() => {
184
- const e = P("vlite.dataTable.confirmDeleteDesc");
165
+ }), ue = i(() => {
166
+ const e = p("vlite.dataTable.confirmDeleteDesc");
185
167
  return e !== "vlite.dataTable.confirmDeleteDesc" ? e : "Are you sure you want to delete the selected items?";
186
- }), he = i(() => {
187
- const e = P("vlite.dataTable.deleteBtn");
168
+ }), me = i(() => {
169
+ const e = p("vlite.dataTable.deleteBtn");
188
170
  return e !== "vlite.dataTable.deleteBtn" ? e : "Delete";
189
- }), ge = i(() => {
190
- const e = P("vlite.dataTable.cancelBtn");
171
+ }), fe = i(() => {
172
+ const e = p("vlite.dataTable.cancelBtn");
191
173
  return e !== "vlite.dataTable.cancelBtn" ? e : "Cancel";
192
174
  });
193
- return (e, t) => (r(), m("div", Be, [
194
- F.value || e.$slots?.["toolbar-left"] || e.$slots?.["toolbar-right"] ? (r(), U(xe, {
195
- key: 0,
196
- modelValue: p.value,
197
- "onUpdate:modelValue": t[1] || (t[1] = (l) => p.value = l),
198
- "show-search": F.value,
199
- placeholder: o.searchPlaceholder,
200
- placeholderI18n: o.searchPlaceholderI18n,
201
- class: w(o.toolbarClass),
202
- "search-class": o.toolbarSearchClass
203
- }, j({ _: 2 }, [
204
- e.$slots?.["toolbar-left"] ? {
205
- name: "left",
206
- fn: x(() => [
207
- $(e.$slots, "toolbar-left")
208
- ]),
209
- key: "0"
210
- } : void 0,
211
- s.value.size > 0 ? {
212
- name: "delete",
213
- fn: x(() => [
214
- B(Ce, {
215
- rounded: "full",
216
- variant: "outline",
217
- size: "lg",
218
- icon: "lucide:trash-2",
219
- onClick: t[0] || (t[0] = (l) => k.value = !0)
220
- })
221
- ]),
222
- key: "1"
223
- } : void 0,
224
- e.$slots?.["toolbar-right"] ? {
225
- name: "right",
226
- fn: x(() => [
227
- $(e.$slots, "toolbar-right")
228
- ]),
229
- key: "2"
230
- } : void 0
231
- ]), 1032, ["modelValue", "show-search", "placeholder", "placeholderI18n", "class", "search-class"])) : W("", !0),
232
- f("div", {
233
- class: w(ie.value)
175
+ return (e, t) => (d(), u("div", xe, [
176
+ m("div", {
177
+ class: x(ne.value)
234
178
  }, [
235
- f("div", Ee, [
236
- f("table", {
237
- class: w([re.value, "data-table"])
179
+ m("div", Ie, [
180
+ m("table", {
181
+ class: x([se.value, "data-table"])
238
182
  }, [
239
- f("thead", {
240
- class: w([
241
- "[&_tr]:border-b [&_tr]:border-border bg-muted",
242
- o.variant === "raised" ? "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg" : ""
183
+ m("thead", {
184
+ class: x([
185
+ "[&_tr]:border-b [&_tr]:border-border",
186
+ n.headerVariant === "minimal" ? "bg-transparent" : "bg-muted",
187
+ n.variant === "raised" ? "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg" : ""
243
188
  ])
244
189
  }, [
245
- f("tr", Re, [
246
- C.value ? (r(), m("th", ze, [
247
- f("div", We, [
248
- B(Pe, {
249
- "model-value": V.value,
250
- indeterminate: K.value,
190
+ m("tr", Te, [
191
+ b.value ? (d(), u("th", De, [
192
+ m("div", Be, [
193
+ D(be, {
194
+ "model-value": z.value,
195
+ indeterminate: A.value,
251
196
  size: "xs",
252
- "onUpdate:modelValue": ee
197
+ "onUpdate:modelValue": Q
253
198
  }, null, 8, ["model-value", "indeterminate"])
254
199
  ])
255
- ])) : W("", !0),
256
- (r(!0), m(A, null, E(o.headers, (l) => (r(), U(Te, {
200
+ ])) : V("", !0),
201
+ (d(!0), u(B, null, I(n.headers, (l) => (d(), M(Ce, {
257
202
  key: l.field,
258
203
  header: l,
259
- "sort-config": u.value,
260
- compact: o.compact,
261
- "table-sortable": o.sortable,
262
- onSort: le,
263
- class: w(["last:pr-5!", ce(l)]),
264
- style: L(de(l))
265
- }, null, 8, ["header", "sort-config", "compact", "table-sortable", "class", "style"]))), 128))
204
+ "sort-config": v.value,
205
+ compact: n.compact,
206
+ size: n.size,
207
+ "table-sortable": n.sortable,
208
+ onSort: _,
209
+ class: x(["last:pr-5!", ie(l)]),
210
+ style: j(oe(l))
211
+ }, null, 8, ["header", "sort-config", "compact", "size", "table-sortable", "class", "style"]))), 128))
266
212
  ])
267
213
  ], 2),
268
- f("tbody", Ae, [
269
- Z.value ? (r(!0), m(A, { key: 0 }, E(Math.min(S.value, 15), (l, n, be, v) => {
270
- const I = [];
271
- if (v && v.key === "skeleton-" + l && Y(v, I)) return v;
272
- const T = (r(), m("tr", {
214
+ m("tbody", Ee, [
215
+ H.value ? (d(!0), u(B, { key: 0 }, I(Math.min(w.value, 15), (l, o, ve, f) => {
216
+ const y = [];
217
+ if (f && f.key === "skeleton-" + l && F(f, y)) return f;
218
+ const P = (d(), u("tr", {
273
219
  key: "skeleton-" + l,
274
220
  class: "border-b border-border/70 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
275
221
  }, [
276
- C.value ? (r(), m("td", Ne, [...t[8] || (t[8] = [
277
- f("div", { class: "flex items-center justify-center" }, [
278
- f("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
222
+ b.value ? (d(), u("td", ze, [...t[6] || (t[6] = [
223
+ m("div", { class: "flex items-center justify-center" }, [
224
+ m("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
279
225
  ], -1)
280
- ])])) : W("", !0),
281
- (r(!0), m(A, null, E(o.headers, (D) => (r(), m("td", {
282
- key: D.field,
283
- class: w(["p-5! align-middle last:pr-6!", [D.hideOnMobile ? "hidden md:table-cell" : ""]])
226
+ ])])) : V("", !0),
227
+ (d(!0), u(B, null, I(n.headers, (C) => (d(), u("td", {
228
+ key: C.field,
229
+ class: x(["p-5! align-middle last:pr-6!", [C.hideOnMobile ? "hidden md:table-cell" : ""]])
284
230
  }, [
285
- f("div", {
231
+ m("div", {
286
232
  class: "rounded-md bg-muted/50 animate-pulse h-4",
287
- style: L({ width: `${50 + Math.random() * 40}%` })
233
+ style: j({ width: `${50 + Math.random() * 40}%` })
288
234
  }, null, 4)
289
235
  ], 2))), 128))
290
236
  ]));
291
- return T.memo = I, T;
292
- }, t, 2), 128)) : o.rows.length > 0 ? (r(!0), m(A, { key: 1 }, E(o.rows, (l, n, be, v) => {
293
- const I = [
237
+ return P.memo = y, P;
238
+ }, t, 0), 128)) : n.rows.length > 0 ? (d(!0), u(B, { key: 1 }, I(n.rows, (l, o, ve, f) => {
239
+ const y = [
294
240
  l,
295
- s.value.has(c(l, d.value)),
296
- C.value,
297
- o.compact,
298
- o.striped,
299
- o.hoverable
241
+ s.value.has(c(l, r.value)),
242
+ b.value,
243
+ n.compact,
244
+ n.size,
245
+ n.striped,
246
+ n.hoverable
300
247
  ];
301
- if (v && v.key === c(l, d.value) && Y(v, I)) return v;
302
- const T = (r(), U(De, {
303
- key: c(l, d.value),
248
+ if (f && f.key === c(l, r.value) && F(f, y)) return f;
249
+ const P = (d(), M(ke, {
250
+ key: c(l, r.value),
304
251
  row: l,
305
- headers: o.headers,
306
- index: n,
307
- "key-field": d.value,
308
- selectable: C.value,
309
- "is-selected": s.value.has(c(l, d.value)),
310
- hoverable: o.hoverable,
311
- striped: o.striped,
312
- compact: o.compact,
313
- onSelect: te,
314
- onRowClick: se,
252
+ headers: n.headers,
253
+ index: o,
254
+ "key-field": r.value,
255
+ selectable: b.value,
256
+ "is-selected": s.value.has(c(l, r.value)),
257
+ hoverable: n.hoverable,
258
+ striped: n.striped,
259
+ compact: n.compact,
260
+ size: n.size,
261
+ onSelect: Z,
262
+ onRowClick: le,
315
263
  class: "[&_td:last-child]:pr-3.5!"
316
- }, j({ _: 2 }, [
317
- E(o.headers, (D) => ({
318
- name: D.field,
319
- fn: x((pe) => [
320
- $(e.$slots, D.field, X({ ref_for: !0 }, pe))
264
+ }, K({ _: 2 }, [
265
+ I(n.headers, (C) => ({
266
+ name: C.field,
267
+ fn: U((ge) => [
268
+ W(e.$slots, C.field, O({ ref_for: !0 }, ge))
321
269
  ])
322
270
  }))
323
- ]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]));
324
- return T.memo = I, T;
325
- }, t, 4), 128)) : (r(), m("tr", Ve, [
326
- f("td", {
327
- colspan: C.value ? o.headers.length + 1 : o.headers.length,
271
+ ]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact", "size"]));
272
+ return P.memo = y, P;
273
+ }, t, 2), 128)) : (d(), u("tr", Re, [
274
+ m("td", {
275
+ colspan: b.value ? n.headers.length + 1 : n.headers.length,
328
276
  class: "align-middle hover:bg-transparent"
329
277
  }, [
330
- $(e.$slots, "empty", {}, () => [
331
- B(q(Ie), {
332
- title: ue.value,
333
- description: me.value,
334
- icon: o.emptyIcon,
335
- class: "border-none! bg-transparent! py-16!"
336
- }, j({ _: 2 }, [
278
+ W(e.$slots, "empty", {}, () => [
279
+ D(L(Pe), {
280
+ title: re.value,
281
+ description: de.value,
282
+ icon: n.emptyIcon,
283
+ variant: "variant12",
284
+ class: "bg-transparent! py-8!"
285
+ }, K({ _: 2 }, [
337
286
  e.$slots["empty-action"] ? {
338
287
  name: "action",
339
- fn: x(() => [
340
- $(e.$slots, "empty-action")
288
+ fn: U(() => [
289
+ W(e.$slots, "empty-action")
341
290
  ]),
342
291
  key: "0"
343
292
  } : void 0
344
293
  ]), 1032, ["title", "description", "icon"])
345
294
  ])
346
- ], 8, Me)
295
+ ], 8, $e)
347
296
  ]))
348
297
  ])
349
298
  ], 2)
350
299
  ])
351
300
  ], 2),
352
- o.showPagination && o.pageInfo && o.pageInfo.totalPages > 1 ? (r(), m("div", Ue, [
353
- B(q(ke), X({
301
+ n.showPagination && n.pageInfo && n.pageInfo.totalPages > 1 ? (d(), u("div", Ve, [
302
+ D(L(ye), O({
354
303
  "current-page": h.value,
355
- "total-pages": o.pageInfo.totalPages,
356
- "total-items": o.pageInfo.totalItems
357
- }, o.paginationProps, {
358
- onChange: ae,
359
- "onUpdate:itemsPerPage": oe
304
+ "total-pages": n.pageInfo.totalPages,
305
+ "total-items": n.pageInfo.totalItems
306
+ }, n.paginationProps, {
307
+ onChange: ee,
308
+ "onUpdate:itemsPerPage": te
360
309
  }), null, 16, ["current-page", "total-pages", "total-items"])
361
- ])) : W("", !0),
362
- B(Se, {
363
- show: k.value,
364
- "onUpdate:show": t[6] || (t[6] = (l) => k.value = l),
365
- title: fe.value,
366
- description: ve.value,
367
- "confirm-text": he.value,
368
- "cancel-text": ge.value,
310
+ ])) : V("", !0),
311
+ D(we, {
312
+ show: T.value,
313
+ "onUpdate:show": t[4] || (t[4] = (l) => T.value = l),
314
+ title: ce.value,
315
+ description: ue.value,
316
+ "confirm-text": me.value,
317
+ "cancel-text": fe.value,
369
318
  variant: "danger",
370
- onConfirm: ne,
371
- onCancel: t[7] || (t[7] = (l) => k.value = !1)
319
+ onConfirm: ae,
320
+ onCancel: t[5] || (t[5] = (l) => T.value = !1)
372
321
  }, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"])
373
322
  ]));
374
323
  }
375
324
  });
376
325
  export {
377
- Qe as default
326
+ Le as default
378
327
  };
@@ -3,6 +3,7 @@ interface Props {
3
3
  header: TableHeader;
4
4
  sortConfig?: SortConfig;
5
5
  compact?: boolean;
6
+ size?: 'xs' | 'sm' | 'md' | 'lg';
6
7
  tableSortable?: boolean;
7
8
  }
8
9
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
@@ -10,6 +11,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
10
11
  }, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
11
12
  onSort?: (field: string) => any;
12
13
  }>, {
14
+ size: "xs" | "sm" | "md" | "lg";
13
15
  compact: boolean;
14
16
  tableSortable: boolean;
15
17
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLTableCellElement>;