vlite3 1.1.1 → 1.1.4

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 (117) hide show
  1. package/components/AttachmentsList/AttachmentsList.vue.d.ts +2 -17
  2. package/components/AttachmentsList/AttachmentsList.vue.js +273 -175
  3. package/components/Avatar.vue.js +1 -1
  4. package/components/AvatarUploader/AvatarUploader.vue.d.ts +1 -1
  5. package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
  6. package/components/Button.vue.d.ts +1 -1
  7. package/components/Button.vue.js +30 -28
  8. package/components/Calendar/Calendar.vue.d.ts +6 -6
  9. package/components/Carousel/Carousel.vue.d.ts +2 -2
  10. package/components/CategoryManager/CategoryManager.vue.d.ts +12 -3
  11. package/components/CategoryManager/CategoryManager.vue.js +204 -145
  12. package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
  13. package/components/CategoryManager/CategoryNode.vue.js +93 -88
  14. package/components/CategoryManager/types.d.ts +14 -0
  15. package/components/Chat/ChatBubble.vue.js +22 -22
  16. package/components/CheckBox.vue.js +29 -28
  17. package/components/Chip/Chip.vue.d.ts +2 -2
  18. package/components/ConfirmationModal.vue.d.ts +2 -2
  19. package/components/ConfirmationModal.vue.js +30 -28
  20. package/components/CopyButton.vue.d.ts +50 -0
  21. package/components/CopyButton.vue.js +69 -0
  22. package/components/CopyButton.vue2.js +4 -0
  23. package/components/CustomFieldsDisplay/CustomFieldsDisplay.vue.d.ts +1 -1
  24. package/components/DataTable/DataTable.vue.d.ts +3 -3
  25. package/components/DataTable/DataTable.vue.js +44 -44
  26. package/components/DatePicker.vue.js +41 -35
  27. package/components/DateRangePicker.vue.js +18 -17
  28. package/components/Dropdown/Dropdown.vue.d.ts +5 -2
  29. package/components/Dropdown/Dropdown.vue.js +117 -115
  30. package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
  31. package/components/Dropdown/DropdownGroupedLayout.vue.d.ts +1 -1
  32. package/components/Dropdown/DropdownItem.vue.js +21 -20
  33. package/components/Dropdown/DropdownMenu.vue.d.ts +1 -1
  34. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  35. package/components/Dropdown/DropdownMenu.vue2.js +13 -12
  36. package/components/Dropdown/DropdownTrigger.vue.d.ts +3 -1
  37. package/components/Dropdown/DropdownTrigger.vue.js +10 -6
  38. package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
  39. package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
  40. package/components/Dropdown/composables/useDropdownSelection.js +46 -31
  41. package/components/FilePicker/FilePicker.vue.d.ts +1 -1
  42. package/components/FilePicker/FilePicker.vue.js +93 -90
  43. package/components/Form/CustomFields.vue.js +2 -2
  44. package/components/Form/Form.vue.js +1 -1
  45. package/components/Form/Form.vue2.js +230 -238
  46. package/components/Form/FormField.vue.d.ts +1 -1
  47. package/components/Form/FormField.vue.js +204 -148
  48. package/components/Form/FormFields.vue.js +2 -2
  49. package/components/Form/FormFields.vue2.js +28 -27
  50. package/components/Form/types.d.ts +2 -2
  51. package/components/Form/utils/form.utils.d.ts +3 -3
  52. package/components/Form/utils/form.utils.js +37 -37
  53. package/components/Input.vue.d.ts +3 -3
  54. package/components/Input.vue.js +64 -62
  55. package/components/Invoice/Invoice.vue.d.ts +1 -4
  56. package/components/Invoice/Invoice.vue.js +22 -13
  57. package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
  58. package/components/Invoice/InvoiceTotals.vue.js +86 -0
  59. package/components/Invoice/InvoiceTotals.vue2.js +4 -0
  60. package/components/Invoice/InvoiceVariant1.vue.d.ts +6 -1
  61. package/components/Invoice/InvoiceVariant1.vue.js +304 -271
  62. package/components/Invoice/InvoiceVariant2.vue.d.ts +6 -1
  63. package/components/Invoice/InvoiceVariant2.vue.js +168 -181
  64. package/components/Invoice/InvoiceVariant3.vue.d.ts +6 -1
  65. package/components/Invoice/InvoiceVariant3.vue.js +215 -182
  66. package/components/Invoice/InvoiceVariant4.vue.d.ts +6 -1
  67. package/components/Invoice/InvoiceVariant4.vue.js +281 -238
  68. package/components/Invoice/index.d.ts +1 -0
  69. package/components/Invoice/types.d.ts +26 -0
  70. package/components/List/List.vue.d.ts +1 -9
  71. package/components/List/List.vue.js +166 -165
  72. package/components/List/ListFieldRow.vue.d.ts +2 -2
  73. package/components/List/ListFieldRow.vue.js +50 -50
  74. package/components/Masonry/Masonry.vue.d.ts +1 -1
  75. package/components/Modal.vue.js +1 -1
  76. package/components/Modal.vue2.js +60 -54
  77. package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
  78. package/components/MultiSelect/MultiSelect.vue.js +47 -46
  79. package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
  80. package/components/Navbar/NavbarItem.vue.d.ts +1 -1
  81. package/components/NumberInput.vue.d.ts +2 -2
  82. package/components/NumberInput.vue.js +2 -2
  83. package/components/NumberInput.vue2.js +121 -116
  84. package/components/OTPInput/OTPInput.vue.d.ts +1 -1
  85. package/components/PricingPlan/PricingPlan.vue.d.ts +2 -2
  86. package/components/SidePanel.vue.js +2 -2
  87. package/components/SidePanel.vue2.js +58 -52
  88. package/components/SidebarMenu/SidebarMenu.vue.d.ts +1 -1
  89. package/components/Stats/StatItem.vue.js +96 -91
  90. package/components/Stats/Stats.vue.d.ts +1 -1
  91. package/components/Stats/types.d.ts +1 -0
  92. package/components/StatusChip/status-map.js +27 -7
  93. package/components/Switch.vue.d.ts +6 -1
  94. package/components/Switch.vue.js +61 -24
  95. package/components/TagInput/TagInput.vue.d.ts +187 -0
  96. package/components/TagInput/TagInput.vue.js +113 -0
  97. package/components/TagInput/TagInput.vue2.js +4 -0
  98. package/components/TagInput/index.d.ts +1 -0
  99. package/components/Textarea.vue.js +19 -18
  100. package/components/ThumbnailSelector/ThumbnailSelector.vue.d.ts +2 -2
  101. package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
  102. package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
  103. package/components/Workbook/Workbook.vue.d.ts +3 -3
  104. package/core/config.d.ts +112 -0
  105. package/core/index.js +17 -5
  106. package/index.d.ts +2 -0
  107. package/index.js +279 -271
  108. package/package.json +1 -1
  109. package/style.css +617 -2
  110. package/types/button.d.ts +1 -1
  111. package/types/config.type.d.ts +6 -0
  112. package/types/list.type.d.ts +6 -0
  113. package/types/styles.d.ts +1 -0
  114. package/utils/configUtils.d.ts +9 -0
  115. package/utils/configUtils.js +7 -0
  116. package/utils/functions.js +9 -9
  117. package/utils/index.d.ts +1 -0
@@ -1,8 +1,8 @@
1
- import { defineComponent as I, computed as l, openBlock as y, createBlock as h, createSlots as w, withCtx as c, createElementVNode as r, toDisplayString as f, createVNode as m, renderSlot as x } from "vue";
1
+ import { defineComponent as I, computed as a, openBlock as w, createBlock as y, mergeProps as h, createSlots as $, withCtx as d, createElementVNode as r, toDisplayString as f, createVNode as p, renderSlot as u } from "vue";
2
2
  import b from "./Modal.vue.js";
3
- import p from "./Button.vue.js";
3
+ import x from "./Button.vue.js";
4
4
  import { $t as n } from "../utils/i18n.js";
5
- const k = { class: "pb-2 px-[2px]" }, $ = { class: "mb-1.5 font-semibold text-lg" }, B = { class: "text-sm text-muted-foreground" }, S = { class: "flex w-full items-center justify-end space-x-2 px-[2px]" }, _ = /* @__PURE__ */ I({
5
+ const k = { class: "pb-2 px-[2px]" }, B = { class: "mb-1.5 font-semibold text-lg" }, S = { class: "text-sm text-muted-foreground" }, z = { class: "flex w-full items-center justify-end space-x-2 px-[2px]" }, E = /* @__PURE__ */ I({
6
6
  __name: "ConfirmationModal",
7
7
  props: {
8
8
  show: { type: Boolean, default: !1 },
@@ -18,69 +18,71 @@ const k = { class: "pb-2 px-[2px]" }, $ = { class: "mb-1.5 font-semibold text-lg
18
18
  variant: { default: "danger" }
19
19
  },
20
20
  emits: ["cancel", "confirm"],
21
- setup(o, { emit: u }) {
22
- const t = o, d = u, a = () => {
23
- d("cancel");
24
- }, v = l(() => t.titleI18n ? n(t.titleI18n) : t.title), g = l(
21
+ setup(o, { emit: v }) {
22
+ const t = o, m = v, l = () => {
23
+ m("cancel");
24
+ }, s = a(() => t.titleI18n ? n(t.titleI18n) : t.title), g = a(
25
25
  () => t.descriptionI18n ? n(t.descriptionI18n) : t.description
26
- ), T = l(() => {
26
+ ), T = a(() => {
27
27
  if (t.confirmTextI18n) return n(t.confirmTextI18n);
28
28
  if (t.confirmText) return t.confirmText;
29
29
  const e = n("vlite.confirmation.confirm");
30
30
  return e !== "vlite.confirmation.confirm" ? e : "Confirm";
31
- }), C = l(() => {
31
+ }), C = a(() => {
32
32
  if (t.cancelTextI18n) return n(t.cancelTextI18n);
33
33
  if (t.cancelText) return t.cancelText;
34
34
  const e = n("vlite.confirmation.cancel");
35
35
  return e !== "vlite.confirmation.cancel" ? e : "Cancel";
36
36
  });
37
- return (e, i) => (y(), h(b, {
38
- show: o.show,
37
+ return (e, i) => (w(), y(b, h({ show: o.show }, e.$attrs, {
38
+ "data-testid": e.$attrs["data-testid"] || (s.value ? `confirm-modal-${s.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "confirm-modal"),
39
39
  footerClass: "border-t-0! pt-0! pb-3.5!",
40
40
  "max-width": "max-w-[400px]",
41
- onClose: a,
42
- "onUpdate:show": i[1] || (i[1] = (s) => !s && a())
43
- }, w({
44
- footer: c(({ close: s }) => [
45
- r("div", S, [
46
- m(p, {
41
+ onClose: l,
42
+ "onUpdate:show": i[1] || (i[1] = (c) => !c && l())
43
+ }), $({
44
+ footer: d(({ close: c }) => [
45
+ r("div", z, [
46
+ p(x, {
47
47
  variant: "secondary",
48
48
  text: C.value,
49
49
  disabled: o.loading,
50
50
  size: "sm2",
51
+ "data-testid": "confirm-modal-cancel",
51
52
  onClick: () => {
52
- s?.(), a?.();
53
+ c?.(), l?.();
53
54
  }
54
55
  }, null, 8, ["text", "disabled", "onClick"]),
55
- m(p, {
56
+ p(x, {
56
57
  size: "sm2",
57
58
  variant: o.variant,
58
59
  text: T.value,
59
60
  loading: o.loading,
60
- onClick: i[0] || (i[0] = (z) => d("confirm"))
61
+ "data-testid": "confirm-modal-confirm",
62
+ onClick: i[0] || (i[0] = (D) => m("confirm"))
61
63
  }, null, 8, ["variant", "text", "loading"])
62
64
  ])
63
65
  ]),
64
- default: c(() => [
66
+ default: d(() => [
65
67
  r("div", k, [
66
- r("h3", $, f(v.value), 1),
67
- r("p", B, f(g.value), 1)
68
+ r("h3", B, f(s.value), 1),
69
+ r("p", S, f(g.value), 1)
68
70
  ])
69
71
  ]),
70
72
  _: 2
71
73
  }, [
72
74
  e.$slots?.trigger ? {
73
75
  name: "trigger",
74
- fn: c(() => [
75
- x(e.$slots, "trigger", {}, () => [
76
- x(e.$slots, "default")
76
+ fn: d(() => [
77
+ u(e.$slots, "trigger", {}, () => [
78
+ u(e.$slots, "default")
77
79
  ])
78
80
  ]),
79
81
  key: "0"
80
82
  } : void 0
81
- ]), 1032, ["show"]));
83
+ ]), 1040, ["show", "data-testid"]));
82
84
  }
83
85
  });
84
86
  export {
85
- _ as default
87
+ E as default
86
88
  };
@@ -0,0 +1,50 @@
1
+ import { ButtonVariant, ButtonSize, ButtonRounded } from '../types';
2
+ export interface CopyButtonProps {
3
+ /** The content to be copied to the clipboard */
4
+ textToCopy: string;
5
+ variant?: ButtonVariant;
6
+ size?: ButtonSize;
7
+ rounded?: ButtonRounded;
8
+ class?: any;
9
+ disabled?: boolean;
10
+ defaultIcon?: string;
11
+ copiedIcon?: string;
12
+ defaultText?: string;
13
+ copiedText?: string;
14
+ defaultTextI18n?: string;
15
+ copiedTextI18n?: string;
16
+ asIcon?: boolean;
17
+ }
18
+ declare function __VLS_template(): {
19
+ attrs: Partial<{}>;
20
+ slots: {
21
+ default?(_: {
22
+ copied: boolean;
23
+ }): any;
24
+ };
25
+ refs: {};
26
+ rootEl: HTMLButtonElement;
27
+ };
28
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
29
+ declare const __VLS_component: import('vue').DefineComponent<CopyButtonProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
30
+ copy: (text: string) => any;
31
+ error: (err: Error) => any;
32
+ }, string, import('vue').PublicProps, Readonly<CopyButtonProps> & Readonly<{
33
+ onCopy?: (text: string) => any;
34
+ onError?: (err: Error) => any;
35
+ }>, {
36
+ variant: ButtonVariant;
37
+ size: ButtonSize;
38
+ asIcon: boolean;
39
+ defaultIcon: string;
40
+ copiedIcon: string;
41
+ defaultTextI18n: string;
42
+ copiedTextI18n: string;
43
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLButtonElement>;
44
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
45
+ export default _default;
46
+ type __VLS_WithTemplateSlots<T, S> = T & {
47
+ new (): {
48
+ $slots: S;
49
+ };
50
+ };
@@ -0,0 +1,69 @@
1
+ import { defineComponent as f, ref as p, computed as l, openBlock as m, createBlock as x, normalizeClass as T, withCtx as y, renderSlot as v, createCommentVNode as I } from "vue";
2
+ import C from "./Button.vue.js";
3
+ import { $t as r } from "../utils/i18n.js";
4
+ const z = /* @__PURE__ */ f({
5
+ __name: "CopyButton",
6
+ props: {
7
+ textToCopy: {},
8
+ variant: { default: "outline" },
9
+ size: { default: "md" },
10
+ rounded: {},
11
+ class: {},
12
+ disabled: { type: Boolean },
13
+ defaultIcon: { default: "lucide:copy" },
14
+ copiedIcon: { default: "lucide:check" },
15
+ defaultText: {},
16
+ copiedText: {},
17
+ defaultTextI18n: { default: "vlite.copyButton.copy" },
18
+ copiedTextI18n: { default: "vlite.copyButton.copied" },
19
+ asIcon: { type: Boolean, default: !1 }
20
+ },
21
+ emits: ["copy", "error"],
22
+ setup(o, { emit: d }) {
23
+ const e = o, c = d, a = p(!1);
24
+ let n = null;
25
+ const u = l(() => a.value ? e.copiedIcon : e.defaultIcon), i = l(() => {
26
+ if (!e.asIcon)
27
+ if (a.value) {
28
+ if (e.copiedText) return e.copiedText;
29
+ const t = r(e.copiedTextI18n);
30
+ return t !== e.copiedTextI18n ? t : "Copied";
31
+ } else {
32
+ if (e.defaultText) return e.defaultText;
33
+ const t = r(e.defaultTextI18n);
34
+ return t !== e.defaultTextI18n ? t : "Copy";
35
+ }
36
+ }), s = async () => {
37
+ if (!e.disabled)
38
+ try {
39
+ await navigator.clipboard.writeText(e.textToCopy), a.value = !0, c("copy", e.textToCopy), n && clearTimeout(n), n = setTimeout(() => {
40
+ a.value = !1;
41
+ }, 500);
42
+ } catch (t) {
43
+ c("error", t instanceof Error ? t : new Error("Copy failed"));
44
+ }
45
+ };
46
+ return (t, B) => (m(), x(C, {
47
+ variant: o.variant,
48
+ size: o.size,
49
+ rounded: o.rounded,
50
+ class: T(e.class),
51
+ disabled: o.disabled,
52
+ icon: u.value,
53
+ text: i.value,
54
+ "as-icon": o.asIcon,
55
+ onClick: s
56
+ }, {
57
+ default: y(() => [
58
+ !o.asIcon && !i.value ? v(t.$slots, "default", {
59
+ key: 0,
60
+ copied: a.value
61
+ }) : I("", !0)
62
+ ]),
63
+ _: 3
64
+ }, 8, ["variant", "size", "rounded", "class", "disabled", "icon", "text", "as-icon"]));
65
+ }
66
+ });
67
+ export {
68
+ z as default
69
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./CopyButton.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -32,8 +32,8 @@ declare function __VLS_template(): {
32
32
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
33
33
  declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {
34
34
  variant: CustomFieldsDisplayVariant;
35
- columns: 1 | 2 | 3 | 4;
36
35
  fields: CustomFieldItem[];
36
+ columns: 1 | 2 | 3 | 4;
37
37
  emptyText: string;
38
38
  keyProp: string;
39
39
  valueProp: string;
@@ -18,24 +18,24 @@ declare function __VLS_template(): {
18
18
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
19
19
  declare const __VLS_component: import('vue').DefineComponent<DataTableProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
20
20
  select: (state: SelectionState) => any;
21
- change: (state: TableState) => any;
22
21
  delete: (rows: any[]) => any;
22
+ change: (state: TableState) => any;
23
23
  "update:itemsPerPage": (value: number) => any;
24
24
  rowClick: (payload: RowClickPayload) => any;
25
25
  "update:selectedRows": (value: any[]) => any;
26
26
  }, string, import('vue').PublicProps, Readonly<DataTableProps> & Readonly<{
27
27
  onSelect?: (state: SelectionState) => any;
28
- onChange?: (state: TableState) => any;
29
28
  onDelete?: (rows: any[]) => any;
29
+ onChange?: (state: TableState) => any;
30
30
  "onUpdate:itemsPerPage"?: (value: number) => any;
31
31
  onRowClick?: (payload: RowClickPayload) => any;
32
32
  "onUpdate:selectedRows"?: (value: any[]) => any;
33
33
  }>, {
34
34
  search: string;
35
35
  variant: "default" | "raised";
36
+ loading: boolean;
36
37
  striped: boolean;
37
38
  compact: boolean;
38
- loading: boolean;
39
39
  rows: any[];
40
40
  showSearch: boolean;
41
41
  headers: TableHeader[];
@@ -1,4 +1,4 @@
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";
1
+ import { defineComponent as ye, inject as we, computed as i, ref as y, watch as g, openBlock as r, createElementBlock as u, createBlock as U, normalizeClass as w, createSlots as j, withCtx as x, renderSlot as $, createVNode as B, createCommentVNode as W, createElementVNode as m, Fragment as A, renderList as E, normalizeStyle as L, isMemoSame as Y, mergeProps as X, unref as q } from "vue";
2
2
  import Pe from "../CheckBox.vue.js";
3
3
  import Ce from "../Button.vue.js";
4
4
  import Se from "../ConfirmationModal.vue.js";
@@ -61,7 +61,7 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
61
61
  const H = (e, t) => {
62
62
  if (!(!e || !t))
63
63
  return t.includes(".") ? t.split(".").reduce((l, n) => l?.[n], e) : e[t];
64
- }, c = (e, t) => H(e, t), J = (e, t) => {
64
+ }, d = (e, t) => H(e, t), J = (e, t) => {
65
65
  const l = ["id", "_id"];
66
66
  if (t && t !== "auto") return t;
67
67
  if (e && e.length > 0) {
@@ -69,7 +69,7 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
69
69
  if (n in e[0]) return n;
70
70
  }
71
71
  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(
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), c = i(() => J(a.rows, a.keyField)), v = y({ field: "", order: "" }), S = y(
73
73
  a.pageInfo?.itemsPerPage || a.paginationProps?.itemsPerPage || 10
74
74
  ), h = y(a.pageInfo?.currentPage || 1), p = y(a.search || ""), k = y(!1), Z = i(() => a.loading);
75
75
  g(
@@ -103,29 +103,29 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
103
103
  g(
104
104
  () => a.selectedRows,
105
105
  (e) => {
106
- const t = new Set((e || []).map((l) => c(l, d.value)));
106
+ const t = new Set((e || []).map((l) => d(l, c.value)));
107
107
  (t.size !== s.value.size || [...t].some((l) => !s.value.has(l))) && (s.value = t);
108
108
  },
109
109
  { immediate: !0, deep: !0 }
110
110
  );
111
111
  const V = i(
112
- () => a.rows.length > 0 && a.rows.every((e) => s.value.has(c(e, d.value)))
112
+ () => a.rows.length > 0 && a.rows.every((e) => s.value.has(d(e, c.value)))
113
113
  ), K = i(() => s.value.size > 0 && !V.value), _ = i(() => {
114
114
  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);
115
+ return e.forEach((l) => t.set(d(l, c.value), l)), Array.from(s.value).map((l) => t.get(l)).filter(Boolean);
116
116
  }), ee = (e) => {
117
117
  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();
118
+ e ? a.rows.forEach((l) => t.add(d(l, c.value))) : a.rows.forEach((l) => t.delete(d(l, c.value))), s.value = t, O();
119
119
  }, te = (e) => {
120
120
  const t = new Set(s.value);
121
121
  t.has(e) ? t.delete(e) : t.add(e), s.value = t, O();
122
122
  }, O = () => {
123
123
  const e = /* @__PURE__ */ new Set(), t = [];
124
124
  a.rows.forEach((l) => {
125
- const n = c(l, d.value);
125
+ const n = d(l, c.value);
126
126
  s.value.has(n) && (t.push(l), e.add(n));
127
127
  }), (a.selectedRows || []).forEach((l) => {
128
- const n = c(l, d.value);
128
+ const n = d(l, c.value);
129
129
  !e.has(n) && s.value.has(n) && (t.push(l), e.add(n));
130
130
  }), b("select", {
131
131
  selected: t,
@@ -134,7 +134,7 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
134
134
  }), b("update:selectedRows", t);
135
135
  }, le = (e) => {
136
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();
137
+ v.value.field === l ? v.value.order = v.value.order === "asc" ? "desc" : "asc" : (v.value.field = l, v.value.order = "asc"), h.value = 1, z();
138
138
  }, ae = (e) => {
139
139
  h.value = e, z();
140
140
  }, oe = (e) => {
@@ -147,7 +147,7 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
147
147
  M && clearTimeout(M), M = setTimeout(() => {
148
148
  const e = {
149
149
  pagination: { page: h.value, limit: S.value },
150
- sort: { ...u.value },
150
+ sort: { ...v.value },
151
151
  search: p.value,
152
152
  filter: {}
153
153
  };
@@ -157,7 +157,7 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
157
157
  g(
158
158
  () => a.rows,
159
159
  () => {
160
- const e = new Set(a.rows.map((t) => c(t, d.value)));
160
+ const e = new Set(a.rows.map((t) => d(t, c.value)));
161
161
  s.value = new Set([...s.value].filter((t) => e.has(t)));
162
162
  }
163
163
  );
@@ -167,10 +167,10 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
167
167
  "overflow-hidden",
168
168
  a.bordered ? "border border-border" : "",
169
169
  a.class
170
- ].join(" ")), re = i(() => ["w-full caption-bottom -text-fs-1", a.tableClass].join(" ")), de = (e) => {
170
+ ].join(" ")), re = i(() => ["w-full caption-bottom -text-fs-1", a.tableClass].join(" ")), ce = (e) => {
171
171
  const t = {};
172
172
  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) => {
173
+ }, de = (e) => {
174
174
  const t = [];
175
175
  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
176
  }, ue = i(
@@ -190,7 +190,7 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
190
190
  const e = P("vlite.dataTable.cancelBtn");
191
191
  return e !== "vlite.dataTable.cancelBtn" ? e : "Cancel";
192
192
  });
193
- return (e, t) => (r(), m("div", Be, [
193
+ return (e, t) => (r(), u("div", Be, [
194
194
  F.value || e.$slots?.["toolbar-left"] || e.$slots?.["toolbar-right"] ? (r(), U(xe, {
195
195
  key: 0,
196
196
  modelValue: p.value,
@@ -229,22 +229,22 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
229
229
  key: "2"
230
230
  } : void 0
231
231
  ]), 1032, ["modelValue", "show-search", "placeholder", "placeholderI18n", "class", "search-class"])) : W("", !0),
232
- f("div", {
232
+ m("div", {
233
233
  class: w(ie.value)
234
234
  }, [
235
- f("div", Ee, [
236
- f("table", {
235
+ m("div", Ee, [
236
+ m("table", {
237
237
  class: w([re.value, "data-table"])
238
238
  }, [
239
- f("thead", {
239
+ m("thead", {
240
240
  class: w([
241
241
  "[&_tr]:border-b [&_tr]:border-border bg-muted",
242
242
  o.variant === "raised" ? "[&_th:first-child]:rounded-tl-lg [&_th:last-child]:rounded-tr-lg" : ""
243
243
  ])
244
244
  }, [
245
- f("tr", Re, [
246
- C.value ? (r(), m("th", ze, [
247
- f("div", We, [
245
+ m("tr", Re, [
246
+ C.value ? (r(), u("th", ze, [
247
+ m("div", We, [
248
248
  B(Pe, {
249
249
  "model-value": V.value,
250
250
  indeterminate: K.value,
@@ -253,60 +253,60 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
253
253
  }, null, 8, ["model-value", "indeterminate"])
254
254
  ])
255
255
  ])) : W("", !0),
256
- (r(!0), m(A, null, E(o.headers, (l) => (r(), U(Te, {
256
+ (r(!0), u(A, null, E(o.headers, (l) => (r(), U(Te, {
257
257
  key: l.field,
258
258
  header: l,
259
- "sort-config": u.value,
259
+ "sort-config": v.value,
260
260
  compact: o.compact,
261
261
  "table-sortable": o.sortable,
262
262
  onSort: le,
263
- class: w(["last:pr-5!", ce(l)]),
264
- style: L(de(l))
263
+ class: w(["last:pr-5!", de(l)]),
264
+ style: L(ce(l))
265
265
  }, null, 8, ["header", "sort-config", "compact", "table-sortable", "class", "style"]))), 128))
266
266
  ])
267
267
  ], 2),
268
- f("tbody", Ae, [
269
- Z.value ? (r(!0), m(A, { key: 0 }, E(Math.min(S.value, 15), (l, n, be, v) => {
268
+ m("tbody", Ae, [
269
+ Z.value ? (r(!0), u(A, { key: 0 }, E(Math.min(S.value, 15), (l, n, be, f) => {
270
270
  const I = [];
271
- if (v && v.key === "skeleton-" + l && Y(v, I)) return v;
272
- const T = (r(), m("tr", {
271
+ if (f && f.key === "skeleton-" + l && Y(f, I)) return f;
272
+ const T = (r(), u("tr", {
273
273
  key: "skeleton-" + l,
274
274
  class: "border-b border-border/70 bg-background transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted"
275
275
  }, [
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" })
276
+ C.value ? (r(), u("td", Ne, [...t[8] || (t[8] = [
277
+ m("div", { class: "flex items-center justify-center" }, [
278
+ m("div", { class: "h-4 w-4 rounded-[4px] bg-muted/50 animate-pulse" })
279
279
  ], -1)
280
280
  ])])) : W("", !0),
281
- (r(!0), m(A, null, E(o.headers, (D) => (r(), m("td", {
281
+ (r(!0), u(A, null, E(o.headers, (D) => (r(), u("td", {
282
282
  key: D.field,
283
283
  class: w(["p-5! align-middle last:pr-6!", [D.hideOnMobile ? "hidden md:table-cell" : ""]])
284
284
  }, [
285
- f("div", {
285
+ m("div", {
286
286
  class: "rounded-md bg-muted/50 animate-pulse h-4",
287
287
  style: L({ width: `${50 + Math.random() * 40}%` })
288
288
  }, null, 4)
289
289
  ], 2))), 128))
290
290
  ]));
291
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) => {
292
+ }, t, 2), 128)) : o.rows.length > 0 ? (r(!0), u(A, { key: 1 }, E(o.rows, (l, n, be, f) => {
293
293
  const I = [
294
294
  l,
295
- s.value.has(c(l, d.value)),
295
+ s.value.has(d(l, c.value)),
296
296
  C.value,
297
297
  o.compact,
298
298
  o.striped,
299
299
  o.hoverable
300
300
  ];
301
- if (v && v.key === c(l, d.value) && Y(v, I)) return v;
301
+ if (f && f.key === d(l, c.value) && Y(f, I)) return f;
302
302
  const T = (r(), U(De, {
303
- key: c(l, d.value),
303
+ key: d(l, c.value),
304
304
  row: l,
305
305
  headers: o.headers,
306
306
  index: n,
307
- "key-field": d.value,
307
+ "key-field": c.value,
308
308
  selectable: C.value,
309
- "is-selected": s.value.has(c(l, d.value)),
309
+ "is-selected": s.value.has(d(l, c.value)),
310
310
  hoverable: o.hoverable,
311
311
  striped: o.striped,
312
312
  compact: o.compact,
@@ -322,8 +322,8 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
322
322
  }))
323
323
  ]), 1032, ["row", "headers", "index", "key-field", "selectable", "is-selected", "hoverable", "striped", "compact"]));
324
324
  return T.memo = I, T;
325
- }, t, 4), 128)) : (r(), m("tr", Ve, [
326
- f("td", {
325
+ }, t, 4), 128)) : (r(), u("tr", Ve, [
326
+ m("td", {
327
327
  colspan: C.value ? o.headers.length + 1 : o.headers.length,
328
328
  class: "align-middle hover:bg-transparent"
329
329
  }, [
@@ -349,7 +349,7 @@ const Be = { class: "space-y-6.5" }, Ee = { class: "overflow-x-auto w-full" }, R
349
349
  ], 2)
350
350
  ])
351
351
  ], 2),
352
- o.showPagination && o.pageInfo && o.pageInfo.totalPages > 1 ? (r(), m("div", Ue, [
352
+ o.showPagination && o.pageInfo && o.pageInfo.totalPages > 1 ? (r(), u("div", Ue, [
353
353
  B(q(ke), X({
354
354
  "current-page": h.value,
355
355
  "total-pages": o.pageInfo.totalPages,