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,51 +1,52 @@
1
- import { defineComponent as g, computed as o, openBlock as n, createElementBlock as l, normalizeClass as r, createElementVNode as s, toDisplayString as x, createVNode as b, createCommentVNode as y } from "vue";
2
- import v from "../Icon.vue.js";
3
- import { $t as C } from "../../utils/i18n.js";
4
- const w = { class: "text-xs font-bold! uppercase tracking-wider text-gray-900 truncate" }, S = {
1
+ import { defineComponent as x, computed as r, openBlock as n, createElementBlock as l, normalizeClass as o, createElementVNode as s, toDisplayString as y, createVNode as b, createCommentVNode as v } from "vue";
2
+ import C from "../Icon.vue.js";
3
+ import { $t as w } from "../../utils/i18n.js";
4
+ const S = { class: "text-xs font-bold! uppercase tracking-wider text-gray-900 truncate" }, k = {
5
5
  key: 0,
6
6
  class: "w-4 h-4 shrink-0"
7
- }, M = /* @__PURE__ */ g({
7
+ }, M = /* @__PURE__ */ x({
8
8
  __name: "DataTableHeader",
9
9
  props: {
10
10
  header: {},
11
11
  sortConfig: {},
12
12
  compact: { type: Boolean, default: !1 },
13
+ size: { default: "md" },
13
14
  tableSortable: { type: Boolean, default: !0 }
14
15
  },
15
16
  emits: ["sort"],
16
17
  setup(t, { emit: i }) {
17
- const e = t, c = i, a = o(() => e.header.sortKey || e.header.field), d = o(
18
+ const e = t, c = i, a = r(() => e.header.sortKey || e.header.field), d = r(
18
19
  () => e.sortConfig?.field === a.value && e.sortConfig?.order
19
- ), f = o(() => !e.sortConfig || e.sortConfig.field !== a.value ? "lucide:chevrons-up-down" : e.sortConfig.order === "asc" ? "lucide:arrow-up" : e.sortConfig.order === "desc" ? "lucide:arrow-down" : "lucide:chevrons-up-down"), u = () => {
20
+ ), u = r(() => !e.sortConfig || e.sortConfig.field !== a.value ? "lucide:chevrons-up-down" : e.sortConfig.order === "asc" ? "lucide:arrow-up" : e.sortConfig.order === "desc" ? "lucide:arrow-down" : "lucide:chevrons-up-down"), f = () => {
20
21
  e.tableSortable && e.header.sortable !== !1 && c("sort", e.header.field);
21
- }, h = o(() => ({
22
+ }, h = r(() => ({
22
23
  left: "justify-start text-left",
23
24
  center: "justify-center text-center",
24
25
  right: "justify-end text-right"
25
- })[e.header.align || "left"]), m = o(
26
- () => e.header.titleI18n ? C(e.header.titleI18n) : e.header.title
27
- );
28
- return (p, k) => (n(), l("th", {
26
+ })[e.header.align || "left"]), m = r(
27
+ () => e.header.titleI18n ? w(e.header.titleI18n) : e.header.title
28
+ ), p = r(() => e.size === "xs" || e.compact ? "py-1.5!" : e.size === "sm" ? "py-2!" : e.size === "lg" ? "py-4!" : "py-3!");
29
+ return (g, z) => (n(), l("th", {
29
30
  scope: "col",
30
- class: r(["px-3 text-left align-middle font-medium text-muted-foreground transition-colors [&:has([role=checkbox])]:pr-0 overflow-hidden max-w-[400px]", [
31
- t.compact ? "py-2.5!" : "py-3!",
31
+ class: o(["group/th px-3 text-left align-middle font-medium text-muted-foreground transition-colors [&:has([role=checkbox])]:pr-0 overflow-hidden max-w-[400px]", [
32
+ p.value,
32
33
  t.header.sortable !== !1 && t.tableSortable ? "cursor-pointer hover:bg-muted/50" : "",
33
34
  t.header.hideOnMobile ? "hidden md:table-cell" : ""
34
35
  ]]),
35
- onClick: u
36
+ onClick: f
36
37
  }, [
37
38
  s("div", {
38
- class: r(["flex items-center gap-2 space-x-2", h.value])
39
+ class: o(["flex items-center gap-2 space-x-2", h.value])
39
40
  }, [
40
- s("span", w, x(m.value), 1),
41
- t.tableSortable && t.header.sortable !== !1 ? (n(), l("span", S, [
42
- b(v, {
43
- icon: f.value,
44
- class: r(["w-3.5 h-3.5 transition-all text-muted-foreground mt-0.5", [
45
- d.value ? "opacity-100 text-foreground" : "opacity-0 group-hover:opacity-100"
41
+ s("span", S, y(m.value), 1),
42
+ t.tableSortable && t.header.sortable !== !1 ? (n(), l("span", k, [
43
+ b(C, {
44
+ icon: u.value,
45
+ class: o(["w-3.5 h-3.5 transition-all text-muted-foreground mt-0.5", [
46
+ d.value ? "opacity-100 text-foreground" : "opacity-0 group-hover/th:opacity-100"
46
47
  ]])
47
48
  }, null, 8, ["icon", "class"])
48
- ])) : y("", !0)
49
+ ])) : v("", !0)
49
50
  ], 2)
50
51
  ], 2));
51
52
  }
@@ -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
  }
@@ -1,13 +1,13 @@
1
- import { defineComponent as z, computed as m, openBlock as x, createBlock as k, unref as D, withCtx as h, createElementVNode as L, createVNode as g, renderSlot as B, mergeProps as P } from "vue";
2
- import V from "./Button.vue.js";
3
- import U from "./Dropdown/Dropdown.vue.js";
1
+ import { defineComponent as z, computed as m, openBlock as w, createBlock as $, unref as D, withCtx as h, createElementVNode as p, createVNode as g, renderSlot as L, mergeProps as x } from "vue";
2
+ import P from "./Button.vue.js";
3
+ import B from "./Dropdown/Dropdown.vue.js";
4
4
  import "@iconify/vue";
5
- import { $t as I } from "../utils/i18n.js";
5
+ import { $t as V } from "../utils/i18n.js";
6
6
  /* empty css */
7
7
  /* empty css */
8
- import j, { TimePicker as C } from "v-datepicker-lite";
8
+ import U, { TimePicker as j } from "v-datepicker-lite";
9
9
  import "v-datepicker-lite/style.css";
10
- const F = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ z({
10
+ const C = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ z({
11
11
  __name: "DatePicker",
12
12
  props: {
13
13
  placeholder: {},
@@ -29,45 +29,45 @@ const F = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ z({
29
29
  readonly: { type: Boolean }
30
30
  },
31
31
  emits: ["update:modelValue", "change"],
32
- setup(t, { emit: N }) {
33
- const r = t, y = N, a = m({
32
+ setup(t, { emit: I }) {
33
+ const r = t, y = I, a = m({
34
34
  get: () => r.modelValue ?? r.value,
35
35
  set: (e) => {
36
36
  y("update:modelValue", e), y("change", e);
37
37
  }
38
- }), T = (e) => e instanceof Date ? e.getHours() !== 0 || e.getMinutes() !== 0 : typeof e == "string" ? e.includes("T") || /\d{2}:\d{2}/.test(e) : !1, u = (e) => {
38
+ }), N = (e) => e instanceof Date ? e.getHours() !== 0 || e.getMinutes() !== 0 : typeof e == "string" ? e.includes("T") || /\d{2}:\d{2}/.test(e) : !1, u = (e) => {
39
39
  if (!e) return null;
40
40
  if (e instanceof Date)
41
41
  return isNaN(e.getTime()) ? null : new Date(e.getFullYear(), e.getMonth(), e.getDate());
42
42
  if (typeof e == "string") {
43
43
  if (/^\d{4}-\d{2}-\d{2}$/.test(e)) {
44
- const [l, d, o] = e.split("-").map(Number);
45
- return new Date(l, d - 1, o);
44
+ const [d, l, o] = e.split("-").map(Number);
45
+ return new Date(d, l - 1, o);
46
46
  }
47
47
  if (e.includes("T")) {
48
- const l = e.split("T")[0], [d, o, s] = l.split("-").map(Number);
49
- return new Date(d, o - 1, s);
48
+ const d = e.split("T")[0], [l, o, s] = d.split("-").map(Number);
49
+ return new Date(l, o - 1, s);
50
50
  }
51
51
  const i = new Date(e);
52
52
  return isNaN(i.getTime()) ? null : i;
53
53
  }
54
54
  return null;
55
55
  }, c = (e) => {
56
- const n = e.getFullYear(), i = String(e.getMonth() + 1).padStart(2, "0"), l = String(e.getDate()).padStart(2, "0");
57
- return `${n}-${i}-${l}`;
56
+ const n = e.getFullYear(), i = String(e.getMonth() + 1).padStart(2, "0"), d = String(e.getDate()).padStart(2, "0");
57
+ return `${n}-${i}-${d}`;
58
58
  }, b = (e) => {
59
59
  try {
60
60
  if (e && typeof e == "object") {
61
- const d = e.startDate || e.start, o = e.endDate || e.end;
62
- if (d && o) {
63
- const s = u(d), w = u(o);
64
- if (s && w) return { startDate: s, endDate: w };
61
+ const l = e.startDate || e.start, o = e.endDate || e.end;
62
+ if (l && o) {
63
+ const s = u(l), k = u(o);
64
+ if (s && k) return { startDate: s, endDate: k };
65
65
  }
66
66
  }
67
67
  const n = u(e);
68
68
  if (!n) return null;
69
- const i = new Date(n), l = new Date(n);
70
- return l.setDate(i.getDate() + 6), { startDate: i, endDate: l };
69
+ const i = new Date(n), d = new Date(n);
70
+ return d.setDate(i.getDate() + 6), { startDate: i, endDate: d };
71
71
  } catch {
72
72
  return null;
73
73
  }
@@ -99,7 +99,7 @@ const F = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ z({
99
99
  }
100
100
  const e = new Date(a.value);
101
101
  if (isNaN(e.getTime())) return String(a.value);
102
- const n = r.mode === "dateTime" && T(a.value);
102
+ const n = r.mode === "dateTime" && N(a.value);
103
103
  return e.toLocaleDateString("en-US", {
104
104
  month: "short",
105
105
  day: "numeric",
@@ -110,9 +110,9 @@ const F = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ z({
110
110
  return String(a.value);
111
111
  }
112
112
  }), v = m(() => {
113
- if (r.placeholderI18n) return I(r.placeholderI18n);
113
+ if (r.placeholderI18n) return V(r.placeholderI18n);
114
114
  if (r.placeholder !== void 0) return r.placeholder;
115
- const e = I("vlite.datePicker.placeholder");
115
+ const e = V("vlite.datePicker.placeholder");
116
116
  return e !== "vlite.datePicker.placeholder" ? e : "Select date";
117
117
  }), S = (e) => {
118
118
  if (r.mode === "week") {
@@ -133,8 +133,8 @@ const F = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ z({
133
133
  }
134
134
  }
135
135
  a.value = e;
136
- }, $ = m(() => r.mode === "week" && a.value && typeof a.value == "object" && (a.value.startDate || a.value.start) || a.value);
137
- return (e, n) => t.mode !== "time" ? (x(), k(D(U), {
136
+ }, T = m(() => r.mode === "week" && a.value && typeof a.value == "object" && (a.value.startDate || a.value.start) || a.value);
137
+ return (e, n) => t.mode !== "time" ? (w(), $(D(B), {
138
138
  key: 0,
139
139
  position: "bottom-start",
140
140
  class: "w-full",
@@ -143,23 +143,26 @@ const F = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ z({
143
143
  disabled: t.disabled || t.readonly
144
144
  }, {
145
145
  trigger: h(() => [
146
- B(e.$slots, "default", {
146
+ L(e.$slots, "default", {
147
147
  value: a.value,
148
148
  displayValue: f.value
149
149
  }, () => [
150
- g(V, P({
150
+ g(P, x({
151
151
  text: f.value?.replace("-", "—") || v.value,
152
152
  variant: t.variant || "outline",
153
153
  size: t.size || "md",
154
154
  icon: t.icon || "lucide:calendar",
155
155
  disabled: t.disabled
156
- }, t.btnProps, { class: "w-full justify-start text-left font-normal" }), null, 16, ["text", "variant", "size", "icon", "disabled"])
156
+ }, t.btnProps, {
157
+ class: "w-full justify-start text-left font-normal",
158
+ "data-testid": e.$attrs["data-testid"] || (e.$attrs.name ? `datepicker-${e.$attrs.name}` : "datepicker")
159
+ }), null, 16, ["text", "variant", "size", "icon", "disabled", "data-testid"])
157
160
  ])
158
161
  ]),
159
162
  default: h(() => [
160
- L("div", F, [
161
- g(D(j), {
162
- value: $.value,
163
+ p("div", C, [
164
+ g(D(U), {
165
+ value: T.value,
163
166
  mode: t.mode,
164
167
  "min-date": t.minDate,
165
168
  "max-date": t.maxDate,
@@ -174,7 +177,7 @@ const F = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ z({
174
177
  ])
175
178
  ]),
176
179
  _: 3
177
- }, 8, ["teleport", "disabled"])) : (x(), k(D(C), {
180
+ }, 8, ["teleport", "disabled"])) : (w(), $(D(j), {
178
181
  key: 1,
179
182
  "model-value": a.value,
180
183
  "onUpdate:modelValue": [
@@ -192,13 +195,16 @@ const F = { class: "overflow-hidden min-w-[300px]" }, G = /* @__PURE__ */ z({
192
195
  readonly: t.readonly
193
196
  }, {
194
197
  default: h(() => [
195
- g(V, P({
198
+ g(P, x({
196
199
  text: f.value || v.value,
197
200
  variant: t.variant || "outline",
198
201
  size: t.size || "md",
199
202
  icon: t.icon || (t.mode === "time" ? "lucide:clock" : "lucide:calendar"),
200
203
  disabled: t.disabled
201
- }, t.btnProps, { class: "w-full justify-start text-left font-normal" }), null, 16, ["text", "variant", "size", "icon", "disabled"])
204
+ }, t.btnProps, {
205
+ class: "w-full justify-start text-left font-normal",
206
+ "data-testid": e.$attrs["data-testid"] || (e.$attrs.name ? `timepicker-${e.$attrs.name}` : "timepicker")
207
+ }), null, 16, ["text", "variant", "size", "icon", "disabled", "data-testid"])
202
208
  ]),
203
209
  _: 1
204
210
  }, 8, ["model-value", "mode", "min-date", "max-date", "disabled-dates", "minuteInterval", "disabled", "readonly"]));
@@ -1,5 +1,5 @@
1
- import { defineComponent as F, ref as b, watch as L, computed as u, openBlock as d, createBlock as m, unref as v, withCtx as D, createElementVNode as i, createElementBlock as w, Fragment as T, renderList as z, createCommentVNode as B, createVNode as h, normalizeClass as y, toDisplayString as x, createTextVNode as E } from "vue";
2
- import $ from "./Dropdown/Dropdown.vue.js";
1
+ import { defineComponent as $, ref as b, watch as F, computed as u, openBlock as d, createBlock as m, unref as v, withCtx as D, createElementVNode as i, createElementBlock as w, Fragment as L, renderList as T, createCommentVNode as z, createVNode as h, normalizeClass as y, toDisplayString as x, createTextVNode as B } from "vue";
2
+ import E from "./Dropdown/Dropdown.vue.js";
3
3
  import R from "./Icon.vue.js";
4
4
  import { $t as l } from "../utils/i18n.js";
5
5
  /* empty css */
@@ -10,7 +10,7 @@ import "v-datepicker-lite/style.css";
10
10
  const j = { class: "flex items-center justify-start gap-2 w-full" }, H = { class: "flex flex-col sm:flex-row bg-background rounded-md" }, Q = {
11
11
  key: 0,
12
12
  class: "flex flex-col gap-1 sm:pr-3 py-2 sm:border-r border-border max-h-[280px]"
13
- }, O = { class: "flex flex-col sm:flex-row items-center gap-4 py-2 p-3" }, I = { class: "border border-border rounded-md overflow-hidden bg-background" }, U = { class: "flex items-center justify-center shrink-0" }, q = { class: "border border-border rounded-md overflow-hidden bg-background" }, te = /* @__PURE__ */ F({
13
+ }, O = { class: "flex flex-col sm:flex-row items-center gap-4 py-2 p-3" }, I = { class: "border border-border rounded-md overflow-hidden bg-background" }, U = { class: "flex items-center justify-center shrink-0" }, q = { class: "border border-border rounded-md overflow-hidden bg-background" }, te = /* @__PURE__ */ $({
14
14
  __name: "DateRangePicker",
15
15
  props: {
16
16
  modelValue: {},
@@ -28,7 +28,7 @@ const j = { class: "flex items-center justify-start gap-2 w-full" }, H = { class
28
28
  emits: ["update:modelValue", "change"],
29
29
  setup(s, { emit: M }) {
30
30
  const g = s, k = M, o = b(!1), c = b(0);
31
- L(o, (a) => {
31
+ F(o, (a) => {
32
32
  a && c.value++;
33
33
  });
34
34
  const n = u({
@@ -46,13 +46,13 @@ const j = { class: "flex items-center justify-start gap-2 w-full" }, H = { class
46
46
  n.value = { ...n.value, startDate: a };
47
47
  }, S = (a) => {
48
48
  n.value = { ...n.value, endDate: a };
49
- }, _ = u(() => {
49
+ }, C = u(() => {
50
50
  if (n.value.endDate) {
51
51
  const a = new Date(n.value.endDate);
52
52
  if (!isNaN(a.getTime())) return a.toISOString();
53
53
  }
54
54
  return g.maxDate;
55
- }), C = u(() => {
55
+ }), N = u(() => {
56
56
  if (n.value.startDate) {
57
57
  const a = new Date(n.value.startDate);
58
58
  if (!isNaN(a.getTime())) return a.toISOString();
@@ -66,7 +66,7 @@ const j = { class: "flex items-center justify-start gap-2 w-full" }, H = { class
66
66
  } catch {
67
67
  return "";
68
68
  }
69
- }, N = u(() => [
69
+ }, V = u(() => [
70
70
  {
71
71
  label: l("vlite.dateRangePicker.today") !== "vlite.dateRangePicker.today" ? l("vlite.dateRangePicker.today") : "Today",
72
72
  value: "today",
@@ -112,7 +112,7 @@ const j = { class: "flex items-center justify-start gap-2 w-full" }, H = { class
112
112
  value: "last_year",
113
113
  icon: "lucide:history"
114
114
  }
115
- ]), V = (a) => {
115
+ ]), _ = (a) => {
116
116
  const e = /* @__PURE__ */ new Date();
117
117
  let t = /* @__PURE__ */ new Date(), r = /* @__PURE__ */ new Date();
118
118
  switch (e.setHours(0, 0, 0, 0), t.setHours(0, 0, 0, 0), r.setHours(0, 0, 0, 0), a.value) {
@@ -146,7 +146,7 @@ const j = { class: "flex items-center justify-start gap-2 w-full" }, H = { class
146
146
  }
147
147
  n.value = { startDate: t, endDate: r }, c.value++, o.value = !1;
148
148
  };
149
- return (a, e) => (d(), m(v($), {
149
+ return (a, e) => (d(), m(v(E), {
150
150
  isOpen: o.value,
151
151
  "onUpdate:isOpen": e[0] || (e[0] = (t) => o.value = t),
152
152
  position: "bottom-start",
@@ -160,36 +160,37 @@ const j = { class: "flex items-center justify-start gap-2 w-full" }, H = { class
160
160
  variant: s.variant || "outline",
161
161
  size: s.size || "md",
162
162
  disabled: s.disabled,
163
- class: y(["w-full justify-between text-left font-normal", [s.triggerClass, { "ring-1 ring-ring ring-offset-[1]": t }]])
163
+ class: y(["w-full justify-between text-left font-normal", [s.triggerClass, { "ring-1 ring-ring ring-offset-[1]": t }]]),
164
+ "data-testid": a.$attrs["data-testid"] || (a.$attrs.name ? `daterange-${a.$attrs.name}` : "daterange")
164
165
  }, {
165
166
  default: D(() => [
166
167
  i("div", j, [
167
168
  i("span", {
168
169
  class: y({ "text-muted-foreground": !n.value.startDate })
169
170
  }, x(n.value.startDate ? f(n.value.startDate) : s.placeholderStart), 3),
170
- e[1] || (e[1] = E(" — ", -1)),
171
+ e[1] || (e[1] = B(" — ", -1)),
171
172
  i("span", {
172
173
  class: y({ "text-muted-foreground": !n.value.endDate })
173
174
  }, x(n.value.endDate ? f(n.value.endDate) : s.placeholderEnd), 3)
174
175
  ])
175
176
  ]),
176
177
  _: 1
177
- }, 8, ["variant", "size", "disabled", "class"])
178
+ }, 8, ["variant", "size", "disabled", "class", "data-testid"])
178
179
  ]),
179
180
  menu: D(() => [
180
181
  i("div", H, [
181
182
  s.showQuickRanges ? (d(), w("div", Q, [
182
183
  e[2] || (e[2] = i("div", { class: "text-xs pl-2 pb-2 font-semibold text-muted-foreground uppercase tracking-wider" }, " Quick Ranges ", -1)),
183
- (d(!0), w(T, null, z(N.value, (t) => (d(), m(P, {
184
+ (d(!0), w(L, null, T(V.value, (t) => (d(), m(P, {
184
185
  key: t.value,
185
186
  text: t.label,
186
187
  icon: t.icon,
187
188
  variant: "ghost",
188
189
  size: "sm",
189
190
  class: "justify-start w-full font-normal",
190
- onClick: (r) => V(t)
191
+ onClick: (r) => _(t)
191
192
  }, null, 8, ["text", "icon", "onClick"]))), 128))
192
- ])) : B("", !0),
193
+ ])) : z("", !0),
193
194
  i("div", O, [
194
195
  i("div", I, [
195
196
  (d(), m(v(p), {
@@ -197,7 +198,7 @@ const j = { class: "flex items-center justify-start gap-2 w-full" }, H = { class
197
198
  value: n.value.startDate,
198
199
  onChange: Y,
199
200
  mode: "date",
200
- "max-date": _.value,
201
+ "max-date": C.value,
201
202
  "min-date": s.minDate,
202
203
  disabled: s.disabled,
203
204
  class: "min-w-[270px]",
@@ -220,7 +221,7 @@ const j = { class: "flex items-center justify-start gap-2 w-full" }, H = { class
220
221
  value: n.value.endDate,
221
222
  onChange: S,
222
223
  mode: "date",
223
- "min-date": C.value,
224
+ "min-date": N.value,
224
225
  "max-date": s.maxDate,
225
226
  class: "min-w-[270px]",
226
227
  disabled: s.disabled,
@@ -22,6 +22,7 @@ type __VLS_Props = {
22
22
  nestedPosition?: TooltTipPlacement;
23
23
  nestedOffset?: [number, number];
24
24
  showSelectedLabel?: boolean;
25
+ showSelectedIcon?: boolean;
25
26
  selectable?: boolean;
26
27
  doubleConfirmation?: boolean;
27
28
  layout?: 'default' | 'grouped';
@@ -36,12 +37,14 @@ type __VLS_Props = {
36
37
  direction?: 'ltr' | 'rtl';
37
38
  isNested?: boolean;
38
39
  disabled?: boolean;
40
+ readonly?: boolean;
39
41
  };
40
42
  declare function __VLS_template(): {
41
43
  attrs: Partial<{}>;
42
44
  slots: {
43
45
  trigger?(_: {
44
46
  selectedLabel: string;
47
+ selectedIcon: string;
45
48
  isOpen: boolean;
46
49
  }): any;
47
50
  default?(_: {}): any;
@@ -85,6 +88,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
85
88
  }>, {
86
89
  columns: number | string;
87
90
  loading: boolean;
91
+ readonly: boolean;
88
92
  disabled: boolean;
89
93
  direction: "ltr" | "rtl";
90
94
  selectable: boolean;
@@ -104,6 +108,7 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
104
108
  isOpen: boolean;
105
109
  teleport: boolean;
106
110
  showSelectedLabel: boolean;
111
+ showSelectedIcon: boolean;
107
112
  doubleConfirmation: boolean;
108
113
  isNested: boolean;
109
114
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;