vlite3 0.4.6 → 0.4.7

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 (108) hide show
  1. package/components/Accordion/AccordionItem.vue.js +33 -32
  2. package/components/Accordion/types.d.ts +2 -0
  3. package/components/Alert.vue.d.ts +2 -0
  4. package/components/Alert.vue.js +38 -36
  5. package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
  6. package/components/AvatarUploader/AvatarUploader.vue.js +25 -24
  7. package/components/Button.vue.d.ts +1 -1
  8. package/components/Button.vue.js +37 -35
  9. package/components/CheckBox.vue.d.ts +1 -0
  10. package/components/CheckBox.vue.js +40 -40
  11. package/components/Chip/Chip.vue.js +55 -55
  12. package/components/Chip/types.d.ts +1 -0
  13. package/components/ChoiceBox/ChoiceBox.vue.d.ts +5 -0
  14. package/components/ChoiceBox/ChoiceBox.vue.js +61 -58
  15. package/components/ColorPicker/ColorPicker.vue.js +3 -2
  16. package/components/ConfirmationModal.vue.d.ts +4 -2
  17. package/components/ConfirmationModal.vue.js +48 -33
  18. package/components/DataList/DataList.vue.d.ts +0 -2
  19. package/components/DataList/DataList.vue.js +39 -35
  20. package/components/DataList/types.d.ts +2 -0
  21. package/components/DataTable/DataTable.vue.d.ts +0 -5
  22. package/components/DataTable/DataTable.vue.js +177 -158
  23. package/components/DataTable/DataTableHeader.vue.js +15 -14
  24. package/components/DataTable/DataTableToolbar.vue.d.ts +1 -1
  25. package/components/DataTable/DataTableToolbar.vue.js +30 -23
  26. package/components/DataTable/types.d.ts +4 -0
  27. package/components/DatePicker.vue.d.ts +1 -0
  28. package/components/DatePicker.vue.js +32 -25
  29. package/components/Dropdown/DropdownBooleanItem.vue.js +18 -17
  30. package/components/Dropdown/DropdownGroupedLayout.vue.js +28 -27
  31. package/components/Dropdown/DropdownItem.vue.js +24 -23
  32. package/components/Dropdown/DropdownMenu.vue.js +100 -91
  33. package/components/Dropdown/composables/useDropdownNavigation.js +24 -23
  34. package/components/Dropdown/composables/useDropdownSelection.js +19 -17
  35. package/components/Empty/Empty.vue.d.ts +2 -2
  36. package/components/Empty/Empty.vue.js +32 -18
  37. package/components/FilePicker/FilePicker.vue.d.ts +3 -1
  38. package/components/FilePicker/FilePicker.vue.js +140 -127
  39. package/components/FileTree/FileTree.vue.js +68 -58
  40. package/components/FileTree/FileTreeNode.vue.js +35 -34
  41. package/components/FileTree/types.d.ts +3 -0
  42. package/components/Form/CustomFields.vue.d.ts +3 -1
  43. package/components/Form/CustomFields.vue.js +2 -2
  44. package/components/Form/CustomFields.vue2.js +92 -80
  45. package/components/Form/Form.vue.d.ts +1 -1
  46. package/components/Form/FormField.vue.d.ts +1 -1
  47. package/components/Form/FormField.vue.js +60 -59
  48. package/components/Form/FormFields.vue.js +2 -2
  49. package/components/Form/FormFields.vue2.js +58 -57
  50. package/components/Form/composables/useForm.js +84 -79
  51. package/components/Form/types.d.ts +4 -0
  52. package/components/GoogleLogin.vue.d.ts +1 -1
  53. package/components/GoogleLogin.vue.js +39 -32
  54. package/components/Heatmap/Heatmap.vue2.js +3 -2
  55. package/components/IconPicker.vue.d.ts +2 -0
  56. package/components/IconPicker.vue.js +37 -29
  57. package/components/Input.vue.d.ts +1 -1
  58. package/components/Input.vue.js +96 -98
  59. package/components/Kanban/KanbanBoard.vue.js +1 -1
  60. package/components/Kanban/KanbanBoard.vue2.js +55 -54
  61. package/components/Kanban/types.d.ts +1 -0
  62. package/components/Masonry/Masonry.vue2.js +3 -2
  63. package/components/Modal.vue.d.ts +2 -0
  64. package/components/Modal.vue.js +62 -57
  65. package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
  66. package/components/MultiSelect/MultiSelect.vue.js +61 -54
  67. package/components/Navbar/Navbar.vue.js +46 -46
  68. package/components/Pagination/Pagination.vue.js +116 -97
  69. package/components/PricingPlan/PricingPlanItem.vue.js +60 -47
  70. package/components/PricingPlan/types.d.ts +5 -0
  71. package/components/Screen/Screen.vue.d.ts +0 -4
  72. package/components/Screen/Screen.vue.js +231 -189
  73. package/components/Screen/ScreenFilter.vue.js +73 -63
  74. package/components/Screen/types.d.ts +5 -0
  75. package/components/SidePanel.vue.d.ts +2 -0
  76. package/components/SidePanel.vue.js +140 -5
  77. package/components/SidePanel.vue2.js +2 -135
  78. package/components/SidebarMenu/SidebarMenuItem.vue.js +131 -130
  79. package/components/SidebarMenu/types.d.ts +1 -0
  80. package/components/Slider.vue.d.ts +1 -0
  81. package/components/Slider.vue.js +71 -69
  82. package/components/Switch.vue.d.ts +1 -0
  83. package/components/Switch.vue.js +23 -18
  84. package/components/Tabes/Tabes.vue.js +20 -19
  85. package/components/Tabes/types.d.ts +1 -0
  86. package/components/Textarea.vue.d.ts +1 -0
  87. package/components/Textarea.vue.js +18 -16
  88. package/components/ThemeToggle.vue.js +24 -14
  89. package/components/Timeline.vue.js +68 -82
  90. package/components/ToastNotification.vue.js +2 -2
  91. package/components/Tooltip.vue.d.ts +4 -3
  92. package/components/Tooltip.vue.js +17 -15
  93. package/components/Workbook/Sheet.vue.js +80 -71
  94. package/components/Workbook/WorkbookAddButton.vue.js +14 -10
  95. package/components/Workbook/types.d.ts +1 -0
  96. package/core/config.d.ts +2 -0
  97. package/index.d.ts +1 -0
  98. package/index.js +28 -26
  99. package/package.json +1 -1
  100. package/style.css +1 -2
  101. package/types/button.d.ts +1 -0
  102. package/types/config.type.d.ts +10 -0
  103. package/types/form.type.d.ts +2 -0
  104. package/types/styles.d.ts +3 -0
  105. package/types/timeline.type.d.ts +2 -0
  106. package/utils/i18n.d.ts +8 -0
  107. package/utils/i18n.js +5 -0
  108. package/utils/index.d.ts +1 -0
@@ -1,37 +1,40 @@
1
- import { defineComponent as W, computed as N, ref as y, provide as E, watch as R, resolveComponent as X, openBlock as a, createElementBlock as i, normalizeClass as D, createElementVNode as h, renderSlot as B, toDisplayString as f, createCommentVNode as m, createBlock as s, unref as I, createVNode as r, resolveDynamicComponent as U, Fragment as P, mergeProps as c, withCtx as o, createTextVNode as v } from "vue";
2
- import Y from "../Input.vue.js";
3
- import u from "../Button.vue.js";
4
- import F from "../Icon.vue.js";
5
- import H from "../Modal.vue.js";
6
- import Z from "../ConfirmationModal.vue.js";
7
- import p from "../Pagination/Pagination.vue.js";
8
- import _ from "../Empty/Empty.vue.js";
9
- import ee from "./ScreenFilter.vue.js";
10
- import { usePersistentState as te } from "../../utils/usePersistentState.js";
11
- const ae = { class: "flex flex-col w-full space-y-8" }, ne = { class: "flex flex-col shrink-0" }, le = {
1
+ import { defineComponent as re, computed as i, ref as w, provide as K, watch as j, resolveComponent as se, openBlock as n, createElementBlock as o, normalizeClass as S, createElementVNode as b, renderSlot as k, toDisplayString as u, createCommentVNode as y, createBlock as s, unref as R, createVNode as f, resolveDynamicComponent as L, Fragment as I, mergeProps as v, withCtx as r, createTextVNode as h } from "vue";
2
+ import ce from "../Input.vue.js";
3
+ import m from "../Button.vue.js";
4
+ import M from "../Icon.vue.js";
5
+ import O from "../Modal.vue.js";
6
+ import ue from "../ConfirmationModal.vue.js";
7
+ import fe from "../Pagination/Pagination.vue.js";
8
+ import me from "../Empty/Empty.vue.js";
9
+ import ve from "./ScreenFilter.vue.js";
10
+ import { usePersistentState as ge } from "../../utils/usePersistentState.js";
11
+ import { $t as c } from "../../utils/i18n.js";
12
+ const ye = { class: "flex flex-col w-full space-y-8" }, he = { class: "flex flex-col shrink-0" }, Be = {
12
13
  key: 0,
13
14
  class: "text-fs-7.5 font-bold text-foreground"
14
- }, de = {
15
+ }, we = {
15
16
  key: 0,
16
17
  class: "text-sm text-gray-700 mt-1 md:max-w-[450px]"
17
- }, ie = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-2.5 w-full justify-end" }, oe = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, se = {
18
+ }, be = { class: "flex flex-col sm:flex-row items-start sm:items-center gap-2.5 w-full justify-end" }, ke = { class: "flex items-center gap-2 w-full sm:w-auto flex-1 md:flex-none justify-start sm:justify-end" }, xe = {
18
19
  key: 1,
19
20
  class: "flex items-center p-1 rounded-md border border-border shrink-0"
20
- }, re = {
21
+ }, Ce = ["title"], Pe = ["title"], De = {
21
22
  key: 4,
22
23
  class: "w-full md:w-60! max-sm:order-last"
23
- }, ue = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, ce = ["href", "target"], fe = ["href", "target"], me = {
24
+ }, Ie = { class: "flex items-center gap-3 max-sm:w-full sm:w-auto max-sm:order-last" }, $e = ["href", "target"], Ve = ["href", "target"], Te = {
24
25
  key: 1,
25
26
  class: "p-8 text-center text-muted-foreground border border-dashed border-border rounded-lg"
26
- }, ve = {
27
+ }, Se = {
27
28
  key: 2,
28
29
  class: "-mt-2"
29
- }, $e = /* @__PURE__ */ W({
30
+ }, Ke = /* @__PURE__ */ re({
30
31
  __name: "Screen",
31
32
  props: {
32
33
  name: { default: "" },
33
- title: { default: "" },
34
- description: { default: "" },
34
+ title: {},
35
+ titleI18n: {},
36
+ description: {},
37
+ descriptionI18n: {},
35
38
  pageInfo: {},
36
39
  data: { default: () => [] },
37
40
  loading: { type: Boolean, default: !1 },
@@ -42,8 +45,10 @@ const ae = { class: "flex flex-col w-full space-y-8" }, ne = { class: "flex flex
42
45
  showItemsPerPage: !1,
43
46
  itemsPerPageOptions: [10, 25, 50, 100]
44
47
  }) },
45
- emptyTitle: { default: "No records found" },
46
- emptyDescription: { default: "There are currently no items to show" },
48
+ emptyTitle: {},
49
+ emptyTitleI18n: {},
50
+ emptyDescription: {},
51
+ emptyDescriptionI18n: {},
47
52
  emptyIcon: { default: "lucide:inbox" },
48
53
  addComponent: {},
49
54
  addBtn: {},
@@ -60,143 +65,178 @@ const ae = { class: "flex flex-col w-full space-y-8" }, ne = { class: "flex flex
60
65
  headerClass: {}
61
66
  },
62
67
  emits: ["add", "delete"],
63
- setup(e, { emit: L }) {
64
- const l = e, j = L, K = N(() => l.name || l.title || "default-screen"), b = te(
65
- `view-mode-${K.value}`,
66
- l.table ? "table" : "list"
67
- ), x = y(""), A = y({}), w = y(l.pageInfo?.currentPage || 1), $ = y(l.pageInfo?.itemsPerPage || l.paginationProps?.itemsPerPage || 10), g = y([]), V = y([]), k = y(!1);
68
- E("screen-selected-rows", g), E("screen-request-delete", (t) => S(t));
69
- const S = (t) => {
70
- V.value = t, k.value = !0;
71
- }, O = () => {
72
- j("delete", V.value), k.value = !1, g.value = [];
73
- }, Q = (t) => {
74
- j("delete", t), g.value = [];
68
+ setup(e, { emit: Q }) {
69
+ const a = e, z = Q, G = i(() => a.name || a.title || "default-screen"), C = ge(
70
+ `view-mode-${G.value}`,
71
+ a.table ? "table" : "list"
72
+ ), $ = w(""), N = w({}), x = w(a.pageInfo?.currentPage || 1), V = w(a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10), B = w([]), T = w([]), P = w(!1);
73
+ K("screen-selected-rows", B), K("screen-request-delete", (t) => A(t));
74
+ const A = (t) => {
75
+ T.value = t, P.value = !0;
76
+ }, J = () => {
77
+ z("delete", T.value), P.value = !1, B.value = [];
78
+ }, W = (t) => {
79
+ z("delete", t), B.value = [];
75
80
  };
76
- R(
77
- () => l.pageInfo?.currentPage,
81
+ j(
82
+ () => a.pageInfo?.currentPage,
78
83
  (t) => {
79
- t && (w.value = t);
84
+ t && (x.value = t);
80
85
  }
81
- ), R(
82
- () => l.pageInfo?.itemsPerPage,
86
+ ), j(
87
+ () => a.pageInfo?.itemsPerPage,
83
88
  (t) => {
84
- t && ($.value = t);
89
+ t && (V.value = t);
85
90
  }
86
91
  );
87
- let T = null;
88
- R(x, (t) => {
89
- T && clearTimeout(T), T = setTimeout(() => {
90
- w.value = 1, C();
92
+ let U = null;
93
+ j($, (t) => {
94
+ U && clearTimeout(U), U = setTimeout(() => {
95
+ x.value = 1, D();
91
96
  }, 300);
92
97
  });
93
- const G = (t) => {
94
- w.value = t, C();
95
- }, J = (t) => {
96
- $.value = t, w.value = 1, C();
97
- }, C = () => {
98
+ const X = (t) => {
99
+ x.value = t, D();
100
+ }, Y = (t) => {
101
+ V.value = t, x.value = 1, D();
102
+ }, D = () => {
98
103
  const t = {
99
104
  pageinfo: {
100
- page: w.value,
101
- limit: $.value
105
+ page: x.value,
106
+ limit: V.value
102
107
  },
103
108
  pagination: {
104
- page: w.value,
105
- limit: $.value
109
+ page: x.value,
110
+ limit: V.value
106
111
  },
107
- search: x.value,
108
- filter: A.value
112
+ search: $.value,
113
+ filter: N.value
109
114
  };
110
- l.refetch && l.refetch(t);
111
- }, z = N(() => b.value === "table" && l.table ? l.table : l.list), M = N(() => l.data && l.data.length > 0);
112
- return (t, n) => {
113
- const q = X("router-link");
114
- return a(), i("div", ae, [
115
- e.customHeader ? B(t.$slots, "custom-header", { key: 1 }) : (a(), i("div", {
115
+ a.refetch && a.refetch(t);
116
+ }, q = i(() => C.value === "table" && a.table ? a.table : a.list), Z = i(() => a.data && a.data.length > 0), E = i(() => a.titleI18n ? c(a.titleI18n) : a.title), F = i(() => a.descriptionI18n ? c(a.descriptionI18n) : a.description), p = i(() => {
117
+ const t = c("vlite.screen.deleteSelected");
118
+ return t !== "vlite.screen.deleteSelected" ? t : "Delete Selected";
119
+ }), _ = i(() => {
120
+ const t = c("vlite.screen.listView");
121
+ return t !== "vlite.screen.listView" ? t : "List View";
122
+ }), ee = i(() => {
123
+ const t = c("vlite.screen.tableView");
124
+ return t !== "vlite.screen.tableView" ? t : "Table View";
125
+ }), te = i(() => {
126
+ const t = c("vlite.screen.refresh");
127
+ return t !== "vlite.screen.refresh" ? t : "Refresh";
128
+ }), ne = i(() => {
129
+ const t = c("vlite.screen.searchPlaceholder");
130
+ return t !== "vlite.screen.searchPlaceholder" ? t : "Search...";
131
+ }), ae = i(() => {
132
+ const t = c("vlite.screen.confirmDeleteTitle");
133
+ return t !== "vlite.screen.confirmDeleteTitle" ? t : "Confirm Deletion";
134
+ }), le = i(() => {
135
+ const t = c("vlite.screen.confirmDeleteDesc", { count: T.value.length });
136
+ return t !== "vlite.screen.confirmDeleteDesc" ? t : `Are you sure you want to delete the selected ${T.value.length > 1 ? "items" : "item"}?`;
137
+ }), ie = i(() => {
138
+ const t = c("vlite.screen.confirmDeleteBtn");
139
+ return t !== "vlite.screen.confirmDeleteBtn" ? t : "Delete";
140
+ }), de = i(() => {
141
+ const t = c("vlite.screen.cancelBtn");
142
+ return t !== "vlite.screen.cancelBtn" ? t : "Cancel";
143
+ }), oe = i(() => {
144
+ const t = c("vlite.screen.missingView");
145
+ return t !== "vlite.screen.missingView" ? t : "Please provide a `:list` or `:table` component.";
146
+ }), g = i(() => {
147
+ if (a.addBtn?.labelI18n) return c(a.addBtn.labelI18n);
148
+ if (a.addBtn?.label) return a.addBtn.label;
149
+ const t = c("vlite.screen.addNew");
150
+ return t !== "vlite.screen.addNew" ? t : "Add New";
151
+ });
152
+ return (t, l) => {
153
+ const H = se("router-link");
154
+ return n(), o("div", ye, [
155
+ e.customHeader ? k(t.$slots, "custom-header", { key: 1 }) : (n(), o("div", {
116
156
  key: 0,
117
- class: D([e.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
157
+ class: S([e.headerClass, "flex flex-col md:flex-row sm:items-start md:items-center justify-between gap-4"])
118
158
  }, [
119
- h("div", ne, [
120
- B(t.$slots, "title", {}, () => [
121
- e.title ? (a(), i("h1", le, f(e.title), 1)) : m("", !0)
159
+ b("div", he, [
160
+ k(t.$slots, "title", {}, () => [
161
+ E.value ? (n(), o("h1", Be, u(E.value), 1)) : y("", !0)
122
162
  ]),
123
- B(t.$slots, "description", {}, () => [
124
- e.description ? (a(), i("p", de, f(e.description), 1)) : m("", !0)
163
+ k(t.$slots, "description", {}, () => [
164
+ F.value ? (n(), o("p", we, u(F.value), 1)) : y("", !0)
125
165
  ])
126
166
  ]),
127
- h("div", ie, [
128
- h("div", oe, [
129
- g.value.length > 0 ? (a(), s(u, {
167
+ b("div", be, [
168
+ b("div", ke, [
169
+ B.value.length > 0 ? (n(), s(m, {
130
170
  key: 0,
131
171
  variant: "outline",
132
172
  class: "hover:bg-destructive/10 shrink-0 h-9! w-9!",
133
173
  icon: "lucide:trash-2",
134
- title: "Delete Selected",
135
- onClick: n[0] || (n[0] = (d) => S(g.value))
136
- })) : m("", !0),
137
- e.table && e.list ? (a(), i("div", se, [
138
- h("button", {
139
- onClick: n[1] || (n[1] = (d) => b.value = "list"),
140
- class: D(["p-1.5 rounded", [
141
- I(b) === "list" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
174
+ title: p.value,
175
+ onClick: l[0] || (l[0] = (d) => A(B.value))
176
+ }, null, 8, ["title"])) : y("", !0),
177
+ e.table && e.list ? (n(), o("div", xe, [
178
+ b("button", {
179
+ onClick: l[1] || (l[1] = (d) => C.value = "list"),
180
+ class: S(["p-1.5 rounded", [
181
+ R(C) === "list" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
142
182
  ]]),
143
- title: "List View"
183
+ title: _.value
144
184
  }, [
145
- r(F, {
185
+ f(M, {
146
186
  icon: "lucide:layout-grid",
147
187
  class: "w-4 h-4"
148
188
  })
149
- ], 2),
150
- h("button", {
151
- onClick: n[2] || (n[2] = (d) => b.value = "table"),
152
- class: D(["p-1.5 rounded", [
153
- I(b) === "table" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
189
+ ], 10, Ce),
190
+ b("button", {
191
+ onClick: l[2] || (l[2] = (d) => C.value = "table"),
192
+ class: S(["p-1.5 rounded", [
193
+ R(C) === "table" ? "bg-secondary/85 dark:bg-secondary shadow-sm text-foreground" : "text-muted-foreground hover:text-foreground"
154
194
  ]]),
155
- title: "Table View"
195
+ title: ee.value
156
196
  }, [
157
- r(F, {
197
+ f(M, {
158
198
  icon: "lucide:list",
159
199
  class: "w-4 h-4"
160
200
  })
161
- ], 2)
162
- ])) : m("", !0),
163
- B(t.$slots, "before-search"),
164
- e.showRefresh ? (a(), s(u, {
201
+ ], 10, Pe)
202
+ ])) : y("", !0),
203
+ k(t.$slots, "before-search"),
204
+ e.showRefresh ? (n(), s(m, {
165
205
  key: 2,
166
206
  variant: "outline",
167
207
  icon: "lucide:refresh-cw",
168
208
  size: "lg",
169
209
  class: "shrink-0 h-9! w-9!",
170
- title: "Refresh",
210
+ title: te.value,
171
211
  disabled: e.loading,
172
- onClick: C
173
- }, null, 8, ["disabled"])) : m("", !0),
174
- e.filterSchema && e.filterSchema.length > 0 ? (a(), s(ee, {
212
+ onClick: D
213
+ }, null, 8, ["title", "disabled"])) : y("", !0),
214
+ e.filterSchema && e.filterSchema.length > 0 ? (n(), s(ve, {
175
215
  key: 3,
176
216
  schema: e.filterSchema,
177
217
  type: e.filterType,
178
- modelValue: A.value,
179
- "onUpdate:modelValue": n[3] || (n[3] = (d) => A.value = d),
180
- onChange: C
181
- }, null, 8, ["schema", "type", "modelValue"])) : m("", !0),
182
- e.canSearch ? (a(), i("div", re, [
183
- r(Y, {
218
+ modelValue: N.value,
219
+ "onUpdate:modelValue": l[3] || (l[3] = (d) => N.value = d),
220
+ onChange: D
221
+ }, null, 8, ["schema", "type", "modelValue"])) : y("", !0),
222
+ e.canSearch ? (n(), o("div", De, [
223
+ f(ce, {
184
224
  lazy: "",
185
- modelValue: x.value,
186
- "onUpdate:modelValue": n[4] || (n[4] = (d) => x.value = d),
225
+ modelValue: $.value,
226
+ "onUpdate:modelValue": l[4] || (l[4] = (d) => $.value = d),
187
227
  icon: "lucide:search",
188
- placeholder: "Search...",
228
+ placeholder: ne.value,
189
229
  variant: "outline",
190
230
  class: "bg-background w-full",
191
231
  "show-clear-button": !0
192
- }, null, 8, ["modelValue"])
193
- ])) : m("", !0)
232
+ }, null, 8, ["modelValue", "placeholder"])
233
+ ])) : y("", !0)
194
234
  ]),
195
- h("div", ue, [
196
- B(t.$slots, "actions", {}, () => [
197
- e.addComponent ? (a(), s(U(e.addComponent), { key: 0 })) : e.canAdd ? (a(), i(P, { key: 1 }, [
198
- e.addBtn ? (a(), i(P, { key: 0 }, [
199
- e.addBtn.modal ? (a(), s(H, c({
235
+ b("div", Ie, [
236
+ k(t.$slots, "actions", {}, () => [
237
+ e.addComponent ? (n(), s(L(e.addComponent), { key: 0 })) : e.canAdd ? (n(), o(I, { key: 1 }, [
238
+ e.addBtn ? (n(), o(I, { key: 0 }, [
239
+ e.addBtn.modal ? (n(), s(O, v({
200
240
  key: 0,
201
241
  body: e.addBtn.modal
202
242
  }, e.addBtn.modalProps, {
@@ -205,211 +245,213 @@ const ae = { class: "flex flex-col w-full space-y-8" }, ne = { class: "flex flex
205
245
  triggerClass: "w-full",
206
246
  loading: e.loading
207
247
  }), {
208
- trigger: o(() => [
209
- r(u, c({
248
+ trigger: r(() => [
249
+ f(m, v({
210
250
  class: "w-full",
211
251
  icon: e.addBtn.icon || "fluent:add-16-filled",
212
252
  variant: e.addBtn.variant || "primary"
213
253
  }, e.addBtn.buttonProps), {
214
- default: o(() => [
215
- v(f(e.addBtn.label || "Add"), 1)
254
+ default: r(() => [
255
+ h(u(g.value), 1)
216
256
  ]),
217
257
  _: 1
218
258
  }, 16, ["icon", "variant"])
219
259
  ]),
220
260
  _: 1
221
- }, 16, ["body", "refetch", "data", "loading"])) : e.addBtn.to ? (a(), s(q, {
261
+ }, 16, ["body", "refetch", "data", "loading"])) : e.addBtn.to ? (n(), s(H, {
222
262
  key: 1,
223
263
  to: e.addBtn.to,
224
264
  class: "inline-flex w-full sm:w-auto"
225
265
  }, {
226
- default: o(() => [
227
- r(u, c({
266
+ default: r(() => [
267
+ f(m, v({
228
268
  class: "w-full",
229
269
  icon: e.addBtn.icon || "fluent:add-16-filled",
230
270
  variant: e.addBtn.variant || "primary"
231
271
  }, e.addBtn.buttonProps), {
232
- default: o(() => [
233
- v(f(e.addBtn.label || "Add"), 1)
272
+ default: r(() => [
273
+ h(u(g.value), 1)
234
274
  ]),
235
275
  _: 1
236
276
  }, 16, ["icon", "variant"])
237
277
  ]),
238
278
  _: 1
239
- }, 8, ["to"])) : e.addBtn.href ? (a(), i("a", {
279
+ }, 8, ["to"])) : e.addBtn.href ? (n(), o("a", {
240
280
  key: 2,
241
281
  href: e.addBtn.href,
242
282
  target: e.addBtn.target,
243
283
  class: "inline-flex w-full sm:w-auto"
244
284
  }, [
245
- r(u, c({
285
+ f(m, v({
246
286
  class: "w-full",
247
287
  icon: e.addBtn.icon || "fluent:add-16-filled",
248
288
  variant: e.addBtn.variant || "primary"
249
289
  }, e.addBtn.buttonProps), {
250
- default: o(() => [
251
- v(f(e.addBtn.label || "Add"), 1)
290
+ default: r(() => [
291
+ h(u(g.value), 1)
252
292
  ]),
253
293
  _: 1
254
294
  }, 16, ["icon", "variant"])
255
- ], 8, ce)) : (a(), s(u, c({
295
+ ], 8, $e)) : (n(), s(m, v({
256
296
  key: 3,
257
297
  class: "w-full sm:w-auto",
258
298
  icon: e.addBtn.icon || "fluent:add-16-filled",
259
299
  variant: e.addBtn.variant || "primary"
260
300
  }, e.addBtn.buttonProps, {
261
- onClick: n[5] || (n[5] = (d) => e.addBtn.onClick ? e.addBtn.onClick() : t.$emit("add"))
301
+ onClick: l[5] || (l[5] = (d) => e.addBtn.onClick ? e.addBtn.onClick() : t.$emit("add"))
262
302
  }), {
263
- default: o(() => [
264
- v(f(e.addBtn.label || "Add"), 1)
303
+ default: r(() => [
304
+ h(u(g.value), 1)
265
305
  ]),
266
306
  _: 1
267
307
  }, 16, ["icon", "variant"]))
268
- ], 64)) : (a(), s(u, {
308
+ ], 64)) : (n(), s(m, {
269
309
  key: 1,
270
310
  class: "w-full sm:w-auto",
271
311
  icon: "fluent:add-16-filled",
272
312
  variant: "primary",
273
- onClick: n[6] || (n[6] = (d) => t.$emit("add"))
313
+ onClick: l[6] || (l[6] = (d) => t.$emit("add"))
274
314
  }, {
275
- default: o(() => [...n[12] || (n[12] = [
276
- v(" Add ", -1)
277
- ])]),
315
+ default: r(() => [
316
+ h(u(g.value), 1)
317
+ ]),
278
318
  _: 1
279
319
  }))
280
- ], 64)) : m("", !0)
320
+ ], 64)) : y("", !0)
281
321
  ]),
282
- B(t.$slots, "after-add")
322
+ k(t.$slots, "after-add")
283
323
  ])
284
324
  ])
285
325
  ], 2)),
286
- h("div", {
287
- class: D(["flex-1 w-full relative min-h-[300px]", e.containerClass])
326
+ b("div", {
327
+ class: S(["flex-1 w-full relative min-h-[300px]", e.containerClass])
288
328
  }, [
289
- !M.value && !e.loading ? B(t.$slots, "empty", { key: 0 }, () => [
290
- r(I(_), {
329
+ !Z.value && !e.loading ? k(t.$slots, "empty", { key: 0 }, () => [
330
+ f(R(me), {
291
331
  title: e.emptyTitle,
332
+ titleI18n: e.emptyTitleI18n,
292
333
  description: e.emptyDescription,
334
+ descriptionI18n: e.emptyDescriptionI18n,
293
335
  icon: e.emptyIcon
294
336
  }, {
295
- action: o(() => [
296
- e.addComponent ? (a(), s(U(e.addComponent), { key: 0 })) : e.canAdd ? (a(), i(P, { key: 1 }, [
297
- e.addBtn ? (a(), i(P, { key: 0 }, [
298
- e.addBtn.modal ? (a(), s(H, c({
337
+ action: r(() => [
338
+ e.addComponent ? (n(), s(L(e.addComponent), { key: 0 })) : e.canAdd ? (n(), o(I, { key: 1 }, [
339
+ e.addBtn ? (n(), o(I, { key: 0 }, [
340
+ e.addBtn.modal ? (n(), s(O, v({
299
341
  key: 0,
300
342
  body: e.addBtn.modal
301
343
  }, e.addBtn.modalProps), {
302
- trigger: o(() => [
303
- r(u, c({
344
+ trigger: r(() => [
345
+ f(m, v({
304
346
  icon: e.addBtn.icon || "fluent:add-16-filled",
305
347
  variant: e.addBtn.variant || "primary",
306
348
  rounded: "full",
307
349
  class: "px-6!"
308
350
  }, e.addBtn.buttonProps), {
309
- default: o(() => [
310
- v(f(e.addBtn.label || "Add New"), 1)
351
+ default: r(() => [
352
+ h(u(g.value), 1)
311
353
  ]),
312
354
  _: 1
313
355
  }, 16, ["icon", "variant"])
314
356
  ]),
315
357
  _: 1
316
- }, 16, ["body"])) : e.addBtn.to ? (a(), s(q, {
358
+ }, 16, ["body"])) : e.addBtn.to ? (n(), s(H, {
317
359
  key: 1,
318
360
  to: e.addBtn.to,
319
361
  class: "inline-flex"
320
362
  }, {
321
- default: o(() => [
322
- r(u, c({
363
+ default: r(() => [
364
+ f(m, v({
323
365
  icon: e.addBtn.icon || "fluent:add-16-filled",
324
366
  variant: e.addBtn.variant || "outline"
325
367
  }, e.addBtn.buttonProps), {
326
- default: o(() => [
327
- v(f(e.addBtn.label || "Add New"), 1)
368
+ default: r(() => [
369
+ h(u(g.value), 1)
328
370
  ]),
329
371
  _: 1
330
372
  }, 16, ["icon", "variant"])
331
373
  ]),
332
374
  _: 1
333
- }, 8, ["to"])) : e.addBtn.href ? (a(), i("a", {
375
+ }, 8, ["to"])) : e.addBtn.href ? (n(), o("a", {
334
376
  key: 2,
335
377
  href: e.addBtn.href,
336
378
  target: e.addBtn.target,
337
379
  class: "inline-flex"
338
380
  }, [
339
- r(u, c({
381
+ f(m, v({
340
382
  icon: e.addBtn.icon || "lucide:plus",
341
383
  variant: e.addBtn.variant || "outline"
342
384
  }, e.addBtn.buttonProps), {
343
- default: o(() => [
344
- v(f(e.addBtn.label || "Add New"), 1)
385
+ default: r(() => [
386
+ h(u(g.value), 1)
345
387
  ]),
346
388
  _: 1
347
389
  }, 16, ["icon", "variant"])
348
- ], 8, fe)) : (a(), s(u, c({
390
+ ], 8, Ve)) : (n(), s(m, v({
349
391
  key: 3,
350
392
  icon: e.addBtn.icon || "lucide:plus",
351
393
  variant: e.addBtn.variant || "outline"
352
394
  }, e.addBtn.buttonProps, {
353
- onClick: n[7] || (n[7] = (d) => e.addBtn.onClick ? e.addBtn.onClick() : t.$emit("add"))
395
+ onClick: l[7] || (l[7] = (d) => e.addBtn.onClick ? e.addBtn.onClick() : t.$emit("add"))
354
396
  }), {
355
- default: o(() => [
356
- v(f(e.addBtn.label || "Add New"), 1)
397
+ default: r(() => [
398
+ h(u(g.value), 1)
357
399
  ]),
358
400
  _: 1
359
401
  }, 16, ["icon", "variant"]))
360
- ], 64)) : (a(), s(u, {
402
+ ], 64)) : (n(), s(m, {
361
403
  key: 1,
362
404
  icon: "lucide:plus",
363
405
  variant: "outline",
364
- onClick: n[8] || (n[8] = (d) => t.$emit("add"))
406
+ onClick: l[8] || (l[8] = (d) => t.$emit("add"))
365
407
  }, {
366
- default: o(() => [...n[13] || (n[13] = [
367
- v(" Add New ", -1)
368
- ])]),
408
+ default: r(() => [
409
+ h(u(g.value), 1)
410
+ ]),
369
411
  _: 1
370
412
  }))
371
- ], 64)) : m("", !0)
413
+ ], 64)) : y("", !0)
372
414
  ]),
373
415
  _: 1
374
- }, 8, ["title", "description", "icon"])
375
- ]) : (a(), i(P, { key: 1 }, [
376
- z.value ? (a(), s(U(z.value), {
416
+ }, 8, ["title", "titleI18n", "description", "descriptionI18n", "icon"])
417
+ ]) : (n(), o(I, { key: 1 }, [
418
+ q.value ? (n(), s(L(q.value), {
377
419
  key: 0,
378
420
  data: e.data,
379
421
  loading: e.loading,
380
422
  refetch: e.refetch,
381
- selectedRows: g.value,
382
- "onUpdate:selectedRows": n[9] || (n[9] = (d) => g.value = d),
383
- delete: S,
384
- onDelete: Q
385
- }, null, 40, ["data", "loading", "refetch", "selectedRows"])) : (a(), i("div", me, " Please provide a `:list` or `:table` component. "))
423
+ selectedRows: B.value,
424
+ "onUpdate:selectedRows": l[9] || (l[9] = (d) => B.value = d),
425
+ delete: A,
426
+ onDelete: W
427
+ }, null, 40, ["data", "loading", "refetch", "selectedRows"])) : (n(), o("div", Te, u(oe.value), 1))
386
428
  ], 64))
387
429
  ], 2),
388
- e.pagination && e.pageInfo && e.pageInfo.totalPages > 1 ? (a(), i("div", ve, [
389
- r(I(p), c({
430
+ e.pagination && e.pageInfo && e.pageInfo.totalPages > 1 ? (n(), o("div", Se, [
431
+ f(R(fe), v({
390
432
  "current-page": e.pageInfo.currentPage,
391
433
  "total-pages": e.pageInfo.totalPages,
392
434
  "total-items": e.pageInfo.totalItems
393
435
  }, e.paginationProps, {
394
- onChange: G,
395
- "onUpdate:itemsPerPage": J
436
+ onChange: X,
437
+ "onUpdate:itemsPerPage": Y
396
438
  }), null, 16, ["current-page", "total-pages", "total-items"])
397
- ])) : m("", !0),
398
- r(Z, {
399
- show: k.value,
400
- "onUpdate:show": n[10] || (n[10] = (d) => k.value = d),
401
- title: "Confirm Deletion",
402
- description: `Are you sure you want to delete the selected ${V.value.length > 1 ? "items" : "item"}?`,
403
- "confirm-text": "Delete",
404
- "cancel-text": "Cancel",
439
+ ])) : y("", !0),
440
+ f(ue, {
441
+ show: P.value,
442
+ "onUpdate:show": l[10] || (l[10] = (d) => P.value = d),
443
+ title: ae.value,
444
+ description: le.value,
445
+ "confirm-text": ie.value,
446
+ "cancel-text": de.value,
405
447
  variant: "danger",
406
- onConfirm: O,
407
- onCancel: n[11] || (n[11] = (d) => k.value = !1)
408
- }, null, 8, ["show", "description"])
448
+ onConfirm: J,
449
+ onCancel: l[11] || (l[11] = (d) => P.value = !1)
450
+ }, null, 8, ["show", "title", "description", "confirm-text", "cancel-text"])
409
451
  ]);
410
452
  };
411
453
  }
412
454
  });
413
455
  export {
414
- $e as default
456
+ Ke as default
415
457
  };