vlite3 0.4.4 → 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 (109) 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 +91 -88
  51. package/components/Form/types.d.ts +4 -0
  52. package/components/Form/utils/form.utils.js +104 -98
  53. package/components/GoogleLogin.vue.d.ts +1 -1
  54. package/components/GoogleLogin.vue.js +39 -32
  55. package/components/Heatmap/Heatmap.vue2.js +3 -2
  56. package/components/IconPicker.vue.d.ts +2 -0
  57. package/components/IconPicker.vue.js +37 -29
  58. package/components/Input.vue.d.ts +1 -1
  59. package/components/Input.vue.js +96 -98
  60. package/components/Kanban/KanbanBoard.vue.js +1 -1
  61. package/components/Kanban/KanbanBoard.vue2.js +55 -54
  62. package/components/Kanban/types.d.ts +1 -0
  63. package/components/Masonry/Masonry.vue2.js +3 -2
  64. package/components/Modal.vue.d.ts +2 -0
  65. package/components/Modal.vue.js +62 -57
  66. package/components/MultiSelect/MultiSelect.vue.d.ts +1 -1
  67. package/components/MultiSelect/MultiSelect.vue.js +61 -54
  68. package/components/Navbar/Navbar.vue.js +46 -46
  69. package/components/Pagination/Pagination.vue.js +116 -97
  70. package/components/PricingPlan/PricingPlanItem.vue.js +60 -47
  71. package/components/PricingPlan/types.d.ts +5 -0
  72. package/components/Screen/Screen.vue.d.ts +0 -4
  73. package/components/Screen/Screen.vue.js +231 -189
  74. package/components/Screen/ScreenFilter.vue.js +73 -63
  75. package/components/Screen/types.d.ts +5 -0
  76. package/components/SidePanel.vue.d.ts +2 -0
  77. package/components/SidePanel.vue.js +140 -5
  78. package/components/SidePanel.vue2.js +2 -135
  79. package/components/SidebarMenu/SidebarMenuItem.vue.js +131 -130
  80. package/components/SidebarMenu/types.d.ts +1 -0
  81. package/components/Slider.vue.d.ts +1 -0
  82. package/components/Slider.vue.js +71 -69
  83. package/components/Switch.vue.d.ts +1 -0
  84. package/components/Switch.vue.js +23 -18
  85. package/components/Tabes/Tabes.vue.js +20 -19
  86. package/components/Tabes/types.d.ts +1 -0
  87. package/components/Textarea.vue.d.ts +1 -0
  88. package/components/Textarea.vue.js +18 -16
  89. package/components/ThemeToggle.vue.js +24 -14
  90. package/components/Timeline.vue.js +68 -82
  91. package/components/ToastNotification.vue.js +2 -2
  92. package/components/Tooltip.vue.d.ts +4 -3
  93. package/components/Tooltip.vue.js +17 -15
  94. package/components/Workbook/Sheet.vue.js +80 -71
  95. package/components/Workbook/WorkbookAddButton.vue.js +14 -10
  96. package/components/Workbook/types.d.ts +1 -0
  97. package/core/config.d.ts +2 -0
  98. package/index.d.ts +1 -0
  99. package/index.js +28 -26
  100. package/package.json +1 -1
  101. package/style.css +1 -2
  102. package/types/button.d.ts +1 -0
  103. package/types/config.type.d.ts +10 -0
  104. package/types/form.type.d.ts +2 -0
  105. package/types/styles.d.ts +3 -0
  106. package/types/timeline.type.d.ts +2 -0
  107. package/utils/i18n.d.ts +8 -0
  108. package/utils/i18n.js +5 -0
  109. package/utils/index.d.ts +1 -0
@@ -1,58 +1,73 @@
1
- import { defineComponent as x, openBlock as u, createBlock as g, withCtx as i, createElementVNode as n, toDisplayString as d, createVNode as c, renderSlot as r } from "vue";
2
- import p from "./Modal.vue.js";
3
- import m from "./Button.vue.js";
4
- const h = { class: "py-2 px-[2px]" }, w = { class: "mb-1.5" }, C = { class: "text-sm text-muted" }, v = { class: "flex w-full items-center justify-end space-x-2 px-[2px]" }, B = /* @__PURE__ */ x({
1
+ import { defineComponent as I, computed as l, openBlock as y, createBlock as h, withCtx as s, createElementVNode as r, toDisplayString as f, createVNode as m, renderSlot as x } from "vue";
2
+ import w from "./Modal.vue.js";
3
+ import p from "./Button.vue.js";
4
+ import { $t as n } from "../utils/i18n.js";
5
+ const b = { class: "py-2 px-[2px]" }, $ = { class: "mb-1.5 font-semibold text-lg" }, k = { class: "text-sm text-muted-foreground" }, _ = { class: "flex w-full items-center justify-end space-x-2 px-[2px]" }, V = /* @__PURE__ */ I({
5
6
  __name: "ConfirmationModal",
6
7
  props: {
7
8
  show: { type: Boolean, default: !1 },
8
9
  title: {},
10
+ titleI18n: {},
9
11
  description: {},
12
+ descriptionI18n: {},
10
13
  loading: { type: Boolean, default: !1 },
11
- confirmText: { default: "Delete" },
12
- cancelText: { default: "Cancel" },
14
+ confirmText: {},
15
+ confirmTextI18n: {},
16
+ cancelText: {},
17
+ cancelTextI18n: {},
13
18
  variant: { default: "danger" }
14
19
  },
15
20
  emits: ["cancel", "confirm"],
16
- setup(e, { emit: f }) {
17
- const l = f, o = () => {
18
- l("cancel");
19
- };
20
- return (s, t) => (u(), g(p, {
21
- show: e.show,
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), T = l(() => t.descriptionI18n ? n(t.descriptionI18n) : t.description), g = l(() => {
25
+ if (t.confirmTextI18n) return n(t.confirmTextI18n);
26
+ if (t.confirmText) return t.confirmText;
27
+ const e = n("vlite.confirmation.confirm");
28
+ return e !== "vlite.confirmation.confirm" ? e : "Confirm";
29
+ }), C = l(() => {
30
+ if (t.cancelTextI18n) return n(t.cancelTextI18n);
31
+ if (t.cancelText) return t.cancelText;
32
+ const e = n("vlite.confirmation.cancel");
33
+ return e !== "vlite.confirmation.cancel" ? e : "Cancel";
34
+ });
35
+ return (e, i) => (y(), h(w, {
36
+ show: o.show,
22
37
  footerClass: "border-t-0! pt-0! pb-3.5!",
23
38
  "max-width": "max-w-[400px]",
24
- onClose: o,
25
- "onUpdate:show": t[1] || (t[1] = (a) => !a && o())
39
+ onClose: a,
40
+ "onUpdate:show": i[1] || (i[1] = (c) => !c && a())
26
41
  }, {
27
- trigger: i(() => [
28
- r(s.$slots, "trigger", {}, () => [
29
- r(s.$slots, "default")
42
+ trigger: s(() => [
43
+ x(e.$slots, "trigger", {}, () => [
44
+ x(e.$slots, "default")
30
45
  ])
31
46
  ]),
32
- footer: i(({ close: a }) => [
33
- n("div", v, [
34
- c(m, {
47
+ footer: s(({ close: c }) => [
48
+ r("div", _, [
49
+ m(p, {
35
50
  variant: "secondary",
36
- text: e.cancelText,
37
- disabled: e.loading,
51
+ text: C.value,
52
+ disabled: o.loading,
38
53
  size: "sm2",
39
54
  onClick: () => {
40
- a?.(), o?.();
55
+ c?.(), a?.();
41
56
  }
42
57
  }, null, 8, ["text", "disabled", "onClick"]),
43
- c(m, {
58
+ m(p, {
44
59
  size: "sm2",
45
- variant: e.variant,
46
- text: e.confirmText,
47
- loading: e.loading,
48
- onClick: t[0] || (t[0] = (y) => l("confirm"))
60
+ variant: o.variant,
61
+ text: g.value,
62
+ loading: o.loading,
63
+ onClick: i[0] || (i[0] = (B) => d("confirm"))
49
64
  }, null, 8, ["variant", "text", "loading"])
50
65
  ])
51
66
  ]),
52
- default: i(() => [
53
- n("div", h, [
54
- n("h3", w, d(e.title), 1),
55
- n("p", C, d(e.description), 1)
67
+ default: s(() => [
68
+ r("div", b, [
69
+ r("h3", $, f(v.value), 1),
70
+ r("p", k, f(T.value), 1)
56
71
  ])
57
72
  ]),
58
73
  _: 3
@@ -60,5 +75,5 @@ const h = { class: "py-2 px-[2px]" }, w = { class: "mb-1.5" }, C = { class: "tex
60
75
  }
61
76
  });
62
77
  export {
63
- B as default
78
+ V as default
64
79
  };
@@ -33,8 +33,6 @@ declare const __VLS_component: import('vue').DefineComponent<DataListProps, {},
33
33
  data: any[];
34
34
  loading: boolean;
35
35
  className: string;
36
- emptyTitle: string;
37
- emptyDescription: string;
38
36
  emptyIcon: string;
39
37
  showPagination: boolean;
40
38
  paginationProps: import('./types').DataListMetaInfo;
@@ -1,4 +1,4 @@
1
- import { defineComponent as b, ref as D, watch as r, computed as u, openBlock as a, createElementBlock as o, normalizeClass as f, Fragment as P, renderList as y, renderSlot as s, createBlock as k, resolveDynamicComponent as h, createVNode as I, unref as v, mergeProps as p, createCommentVNode as C } from "vue";
1
+ import { defineComponent as N, ref as b, watch as d, computed as u, openBlock as a, createElementBlock as i, normalizeClass as f, Fragment as P, renderList as y, renderSlot as s, createBlock as I, resolveDynamicComponent as k, createVNode as h, unref as v, mergeProps as p, createCommentVNode as T } from "vue";
2
2
  import L from "../Pagination/Pagination.vue.js";
3
3
  import x from "../Empty/Empty.vue.js";
4
4
  const z = { class: "flex flex-col w-full" }, E = {
@@ -7,7 +7,7 @@ const z = { class: "flex flex-col w-full" }, E = {
7
7
  }, F = {
8
8
  key: 3,
9
9
  class: "mt-8 w-full"
10
- }, W = /* @__PURE__ */ b({
10
+ }, j = /* @__PURE__ */ N({
11
11
  __name: "DataList",
12
12
  props: {
13
13
  data: { default: () => [] },
@@ -18,8 +18,10 @@ const z = { class: "flex flex-col w-full" }, E = {
18
18
  skeleton: {},
19
19
  skelton: {},
20
20
  itemProps: { default: () => ({}) },
21
- emptyTitle: { default: "No data found" },
22
- emptyDescription: { default: "We could not find any items to display here." },
21
+ emptyTitle: {},
22
+ emptyTitleI18n: {},
23
+ emptyDescription: {},
24
+ emptyDescriptionI18n: {},
23
25
  emptyIcon: { default: "lucide:inbox" },
24
26
  showPagination: { type: Boolean, default: !0 },
25
27
  paginationProps: { default: () => ({
@@ -32,82 +34,84 @@ const z = { class: "flex flex-col w-full" }, E = {
32
34
  delete: {}
33
35
  },
34
36
  emits: ["change"],
35
- setup(e, { emit: T }) {
36
- const n = e, w = T, i = D(n.pageInfo?.itemsPerPage || n.paginationProps?.itemsPerPage || 10);
37
- r(
37
+ setup(e, { emit: C }) {
38
+ const n = e, w = C, o = b(n.pageInfo?.itemsPerPage || n.paginationProps?.itemsPerPage || 10);
39
+ d(
38
40
  () => n.pageInfo?.itemsPerPage,
39
41
  (t) => {
40
- t !== void 0 && (i.value = t);
42
+ t !== void 0 && (o.value = t);
41
43
  }
42
- ), r(
44
+ ), d(
43
45
  () => n.paginationProps?.itemsPerPage,
44
46
  (t) => {
45
- t !== void 0 && (i.value = t);
47
+ t !== void 0 && (o.value = t);
46
48
  }
47
49
  );
48
50
  let m = null;
49
- const g = (t, c) => {
51
+ const g = (t, r) => {
50
52
  m && clearTimeout(m), m = setTimeout(() => {
51
- w("change", { page: t, limit: c });
53
+ w("change", { page: t, limit: r });
52
54
  }, 10);
53
- }, N = (t) => {
54
- g(t, i.value);
55
55
  }, $ = (t) => {
56
- i.value = t, g(n.pageInfo?.currentPage || 1, t);
56
+ g(t, o.value);
57
+ }, B = (t) => {
58
+ o.value = t, g(n.pageInfo?.currentPage || 1, t);
57
59
  };
58
60
  u(() => n.pageInfo?.currentPage || 1);
59
- const B = u(() => n.pageInfo?.totalPages || 1);
60
- return (t, c) => (a(), o("div", z, [
61
- e.loading ? (a(), o("div", {
61
+ const D = u(() => n.pageInfo?.totalPages || 1);
62
+ return (t, r) => (a(), i("div", z, [
63
+ e.loading ? (a(), i("div", {
62
64
  key: 0,
63
65
  class: f(e.className)
64
66
  }, [
65
- (a(), o(P, null, y(8, (l) => s(t.$slots, "skeleton", {
67
+ (a(), i(P, null, y(8, (l) => s(t.$slots, "skeleton", {
66
68
  key: "skeleton-" + l,
67
69
  index: l
68
70
  }, () => [
69
71
  s(t.$slots, "skelton", { index: l }, () => [
70
- e.skeleton || e.skelton ? (a(), k(h(e.skeleton || e.skelton), { key: 0 })) : (a(), o("div", E))
72
+ e.skeleton || e.skelton ? (a(), I(k(e.skeleton || e.skelton), { key: 0 })) : (a(), i("div", E))
71
73
  ])
72
74
  ])), 64))
73
75
  ], 2)) : !e.data || e.data.length === 0 ? s(t.$slots, "empty", { key: 1 }, () => [
74
- I(v(x), {
76
+ h(v(x), {
75
77
  title: e.emptyTitle,
78
+ titleI18n: e.emptyTitleI18n,
76
79
  description: e.emptyDescription,
80
+ descriptionI18n: e.emptyDescriptionI18n,
77
81
  icon: e.emptyIcon
78
- }, null, 8, ["title", "description", "icon"])
79
- ]) : (a(), o("div", {
82
+ }, null, 8, ["title", "titleI18n", "description", "descriptionI18n", "icon"])
83
+ ]) : (a(), i("div", {
80
84
  key: 2,
81
85
  class: f(e.className)
82
86
  }, [
83
- (a(!0), o(P, null, y(e.data, (l, d) => s(t.$slots, "item", {
84
- key: d,
87
+ (a(!0), i(P, null, y(e.data, (l, c) => s(t.$slots, "item", {
88
+ key: c,
85
89
  item: l,
86
90
  data: e.data,
87
- index: d
91
+ index: c
88
92
  }, () => [
89
- e.item ? (a(), k(h(e.item), p({
93
+ e.item ? (a(), I(k(e.item), p({
90
94
  key: 0,
91
95
  item: l,
92
96
  data: e.data,
93
- index: d
94
- }, { ref_for: !0 }, e.itemProps), null, 16, ["item", "data", "index"])) : C("", !0)
97
+ index: c
98
+ }, { ref_for: !0 }, e.itemProps), null, 16, ["item", "data", "index"])) : T("", !0)
95
99
  ])), 128))
96
100
  ], 2)),
97
- e.showPagination && e.pageInfo && B.value > 1 ? (a(), o("div", F, [
98
- I(v(L), p({
101
+ e.showPagination && e.pageInfo && D.value > 1 ? (a(), i("div", F, [
102
+ h(v(L), p({
99
103
  "current-page": e.pageInfo?.currentPage,
100
104
  "total-pages": e.pageInfo?.totalPages,
101
105
  "total-items": e.pageInfo?.totalItems,
102
106
  navType: "icon"
103
107
  }, e.paginationProps, {
104
- onChange: N,
105
- "onUpdate:itemsPerPage": $
108
+ onChange: $,
109
+ "onUpdate:itemsPerPage": B
106
110
  }), null, 16, ["current-page", "total-pages", "total-items"])
107
- ])) : C("", !0)
111
+ ])) : T("", !0)
108
112
  ]));
109
113
  }
110
114
  });
111
115
  export {
112
- W as default
116
+ j as default
113
117
  };
@@ -10,7 +10,9 @@ export interface DataListProps {
10
10
  skelton?: any;
11
11
  itemProps?: Record<string, any>;
12
12
  emptyTitle?: string;
13
+ emptyTitleI18n?: string;
13
14
  emptyDescription?: string;
15
+ emptyDescriptionI18n?: string;
14
16
  emptyIcon?: string;
15
17
  showPagination?: boolean;
16
18
  paginationProps?: DataListMetaInfo;
@@ -43,11 +43,6 @@ declare const __VLS_component: import('vue').DefineComponent<DataTableProps, {},
43
43
  hoverable: boolean;
44
44
  striped: boolean;
45
45
  selectedRows: any[];
46
- searchPlaceholder: string;
47
- toolbarClass: string;
48
- toolbarSearchClass: string;
49
- emptyTitle: string;
50
- emptyDescription: string;
51
46
  emptyIcon: string;
52
47
  showPagination: boolean;
53
48
  paginationProps: import('./types').DataTablePaginationProps;