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,25 +1,26 @@
1
- import { defineComponent as N, computed as z, openBlock as s, createElementBlock as r, normalizeClass as S, createElementVNode as d, Fragment as P, renderList as $, toDisplayString as x, createVNode as b, createCommentVNode as m, createTextVNode as h, createBlock as v, withCtx as w } from "vue";
2
- import O from "../Icon.vue.js";
3
- import o from "../Button.vue.js";
4
- const R = {
1
+ import { defineComponent as A, computed as u, openBlock as i, createElementBlock as r, normalizeClass as z, createElementVNode as g, toDisplayString as l, Fragment as b, renderList as j, createVNode as x, createCommentVNode as f, createTextVNode as y, createBlock as w, withCtx as I } from "vue";
2
+ import F from "../Icon.vue.js";
3
+ import d from "../Button.vue.js";
4
+ import { $t as h } from "../../utils/i18n.js";
5
+ const q = {
5
6
  key: 0,
6
7
  class: "flex flex-wrap items-center justify-center md:justify-start gap-4 order-2 md:order-1"
7
- }, E = {
8
+ }, G = {
8
9
  key: 0,
9
10
  class: "flex items-center gap-2 text-sm text-muted-foreground"
10
- }, V = { class: "relative" }, L = ["value", "disabled"], M = ["value"], A = {
11
+ }, H = { class: "whitespace-nowrap" }, J = { class: "relative" }, K = ["value", "disabled"], Q = ["value"], U = { class: "whitespace-nowrap" }, W = {
11
12
  key: 1,
12
13
  class: "hidden md:block w-px h-4 bg-border"
13
- }, F = {
14
+ }, X = {
14
15
  key: 2,
15
16
  class: "text-sm text-muted-foreground whitespace-nowrap"
16
- }, q = { class: "font-medium text-foreground" }, G = { class: "font-medium text-foreground" }, H = {
17
+ }, Y = { class: "font-medium text-foreground" }, Z = { class: "font-medium text-foreground" }, p = {
17
18
  class: "flex items-center justify-center gap-1 order-1 md:order-2",
18
19
  "aria-label": "Pagination"
19
- }, J = {
20
+ }, _ = {
20
21
  key: 0,
21
22
  class: "px-2 text-gray-400 select-none"
22
- }, W = /* @__PURE__ */ N({
23
+ }, se = /* @__PURE__ */ A({
23
24
  __name: "Pagination",
24
25
  props: {
25
26
  currentPage: { default: 1 },
@@ -35,35 +36,35 @@ const R = {
35
36
  alignment: {}
36
37
  },
37
38
  emits: ["update:currentPage", "change", "update:itemsPerPage", "change:itemsPerPage"],
38
- setup(e, { emit: j }) {
39
- const a = e, u = j, i = (l) => {
40
- a.disabled || l < 1 || l > a.totalPages || l !== a.currentPage && (u("update:currentPage", l), u("change", l));
41
- }, T = (l) => {
42
- const t = l.target, n = parseInt(t.value);
43
- u("update:itemsPerPage", n), u("change:itemsPerPage", n), u("update:currentPage", 1), u("change", 1);
44
- }, D = z(() => {
45
- if (a.totalItems * 2 + 5 >= a.totalPages)
46
- return y(1, a.totalPages);
47
- const t = Math.max(a.currentPage - a.totalItems, 1), n = Math.min(a.currentPage + a.totalItems, a.totalPages), g = t > 2, c = n < a.totalPages - 2, k = 1, I = a.totalPages;
48
- if (!g && c) {
49
- let f = 3 + 2 * a.totalItems;
50
- return [...y(1, f), "DOTS", I];
39
+ setup(e, { emit: T }) {
40
+ const s = e, c = T, o = (t) => {
41
+ s.disabled || t < 1 || t > s.totalPages || t !== s.currentPage && (c("update:currentPage", t), c("change", t));
42
+ }, D = (t) => {
43
+ const n = t.target, a = parseInt(n.value);
44
+ c("update:itemsPerPage", a), c("change:itemsPerPage", a), c("update:currentPage", 1), c("change", 1);
45
+ }, N = u(() => {
46
+ if (s.totalItems * 2 + 5 >= s.totalPages)
47
+ return k(1, s.totalPages);
48
+ const n = Math.max(s.currentPage - s.totalItems, 1), a = Math.min(s.currentPage + s.totalItems, s.totalPages), m = n > 2, P = a < s.totalPages - 2, C = 1, S = s.totalPages;
49
+ if (!m && P) {
50
+ let v = 3 + 2 * s.totalItems;
51
+ return [...k(1, v), "DOTS", S];
51
52
  }
52
- if (g && !c) {
53
- let f = 3 + 2 * a.totalItems, C = y(a.totalPages - f + 1, a.totalPages);
54
- return [k, "DOTS", ...C];
53
+ if (m && !P) {
54
+ let v = 3 + 2 * s.totalItems, $ = k(s.totalPages - v + 1, s.totalPages);
55
+ return [C, "DOTS", ...$];
55
56
  }
56
- if (g && c) {
57
- let f = y(t, n);
58
- return [k, "DOTS", ...f, "DOTS", I];
57
+ if (m && P) {
58
+ let v = k(n, a);
59
+ return [C, "DOTS", ...v, "DOTS", S];
59
60
  }
60
61
  return [];
61
- }), y = (l, t) => {
62
- let n = t - l + 1;
63
- return Array.from({ length: n }, (g, c) => c + l);
64
- }, B = z(() => {
65
- if (a.alignment)
66
- switch (a.alignment) {
62
+ }), k = (t, n) => {
63
+ let a = n - t + 1;
64
+ return Array.from({ length: a }, (m, P) => P + t);
65
+ }, O = u(() => {
66
+ if (s.alignment)
67
+ switch (s.alignment) {
67
68
  case "start":
68
69
  return "justify-start";
69
70
  case "end":
@@ -73,138 +74,156 @@ const R = {
73
74
  default:
74
75
  return "justify-center";
75
76
  }
76
- return a.showPageInfo || a.showItemsPerPage ? "justify-between" : "justify-center";
77
+ return s.showPageInfo || s.showItemsPerPage ? "justify-between" : "justify-center";
78
+ }), B = u(() => {
79
+ const t = h("vlite.pagination.show");
80
+ return t !== "vlite.pagination.show" ? t : "Show";
81
+ }), R = u(() => {
82
+ const t = h("vlite.pagination.perPage");
83
+ return t !== "vlite.pagination.perPage" ? t : "per page";
84
+ }), E = u(() => {
85
+ const t = h("vlite.pagination.page");
86
+ return t !== "vlite.pagination.page" ? t : "Page";
87
+ }), V = u(() => {
88
+ const t = h("vlite.pagination.of");
89
+ return t !== "vlite.pagination.of" ? t : "of";
90
+ }), L = u(() => {
91
+ const t = h("vlite.pagination.previous");
92
+ return t !== "vlite.pagination.previous" ? t : "Previous";
93
+ }), M = u(() => {
94
+ const t = h("vlite.pagination.next");
95
+ return t !== "vlite.pagination.next" ? t : "Next";
77
96
  });
78
- return (l, t) => (s(), r("div", {
79
- class: S(["flex flex-col md:flex-row items-center gap-4 w-full", [B.value]])
97
+ return (t, n) => (i(), r("div", {
98
+ class: z(["flex flex-col md:flex-row items-center gap-4 w-full", [O.value]])
80
99
  }, [
81
- e.showPageInfo || e.showItemsPerPage ? (s(), r("div", R, [
82
- e.showItemsPerPage ? (s(), r("div", E, [
83
- t[8] || (t[8] = d("span", { class: "whitespace-nowrap" }, "Show", -1)),
84
- d("div", V, [
85
- d("select", {
100
+ e.showPageInfo || e.showItemsPerPage ? (i(), r("div", q, [
101
+ e.showItemsPerPage ? (i(), r("div", G, [
102
+ g("span", H, l(B.value), 1),
103
+ g("div", J, [
104
+ g("select", {
86
105
  value: e.itemsPerPage,
87
106
  class: "appearance-none bg-background border border-border hover:border-accent text-foreground py-1 pl-2 pr-6 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-primary text-sm cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed transition-colors",
88
107
  disabled: e.disabled,
89
- onChange: T
108
+ onChange: D
90
109
  }, [
91
- (s(!0), r(P, null, $(e.itemsPerPageOptions, (n) => (s(), r("option", {
92
- key: n,
93
- value: n
94
- }, x(n), 9, M))), 128))
95
- ], 40, L),
96
- b(O, {
110
+ (i(!0), r(b, null, j(e.itemsPerPageOptions, (a) => (i(), r("option", {
111
+ key: a,
112
+ value: a
113
+ }, l(a), 9, Q))), 128))
114
+ ], 40, K),
115
+ x(F, {
97
116
  icon: "lucide:chevron-down",
98
117
  class: "absolute right-1.5 top-1/2 -translate-y-1/2 w-3.5 h-3.5 text-muted-foreground pointer-events-none"
99
118
  })
100
119
  ]),
101
- t[9] || (t[9] = d("span", { class: "whitespace-nowrap" }, "per page", -1))
102
- ])) : m("", !0),
103
- e.showItemsPerPage && e.showPageInfo ? (s(), r("div", A)) : m("", !0),
104
- e.showPageInfo ? (s(), r("span", F, [
105
- t[10] || (t[10] = h(" Page ", -1)),
106
- d("span", q, x(e.currentPage), 1),
107
- t[11] || (t[11] = h(" of ", -1)),
108
- d("span", G, x(e.totalPages), 1)
109
- ])) : m("", !0)
110
- ])) : m("", !0),
111
- d("nav", H, [
112
- e.showEdges ? (s(), v(o, {
120
+ g("span", U, l(R.value), 1)
121
+ ])) : f("", !0),
122
+ e.showItemsPerPage && e.showPageInfo ? (i(), r("div", W)) : f("", !0),
123
+ e.showPageInfo ? (i(), r("span", X, [
124
+ y(l(E.value) + " ", 1),
125
+ g("span", Y, l(e.currentPage), 1),
126
+ y(" " + l(V.value) + " ", 1),
127
+ g("span", Z, l(e.totalPages), 1)
128
+ ])) : f("", !0)
129
+ ])) : f("", !0),
130
+ g("nav", p, [
131
+ e.showEdges ? (i(), w(d, {
113
132
  key: 0,
114
133
  variant: "ghost",
115
134
  size: "sm",
116
135
  icon: "lucide:chevrons-left",
117
136
  disabled: e.disabled || e.currentPage === 1,
118
- onClick: t[0] || (t[0] = (n) => i(1))
119
- }, null, 8, ["disabled"])) : m("", !0),
120
- e.navType === "icon" ? (s(), v(o, {
137
+ onClick: n[0] || (n[0] = (a) => o(1))
138
+ }, null, 8, ["disabled"])) : f("", !0),
139
+ e.navType === "icon" ? (i(), w(d, {
121
140
  key: 1,
122
141
  variant: "ghost",
123
142
  size: "sm",
124
143
  icon: "lucide:chevron-left",
125
144
  disabled: e.disabled || e.currentPage === 1,
126
- onClick: t[1] || (t[1] = (n) => i(e.currentPage - 1))
127
- }, null, 8, ["disabled"])) : (s(), r(P, { key: 2 }, [
128
- b(o, {
145
+ onClick: n[1] || (n[1] = (a) => o(e.currentPage - 1))
146
+ }, null, 8, ["disabled"])) : (i(), r(b, { key: 2 }, [
147
+ x(d, {
129
148
  variant: "ghost",
130
149
  size: "sm",
131
150
  class: "hidden sm:flex",
132
151
  disabled: e.disabled || e.currentPage === 1,
133
- onClick: t[2] || (t[2] = (n) => i(e.currentPage - 1))
152
+ onClick: n[2] || (n[2] = (a) => o(e.currentPage - 1))
134
153
  }, {
135
- default: w(() => [...t[12] || (t[12] = [
136
- h(" Previous ", -1)
137
- ])]),
154
+ default: I(() => [
155
+ y(l(L.value), 1)
156
+ ]),
138
157
  _: 1
139
158
  }, 8, ["disabled"]),
140
- b(o, {
159
+ x(d, {
141
160
  variant: "ghost",
142
161
  size: "sm",
143
162
  icon: "lucide:chevron-left",
144
163
  class: "flex sm:hidden",
145
164
  disabled: e.disabled || e.currentPage === 1,
146
- onClick: t[3] || (t[3] = (n) => i(e.currentPage - 1))
165
+ onClick: n[3] || (n[3] = (a) => o(e.currentPage - 1))
147
166
  }, null, 8, ["disabled"])
148
167
  ], 64)),
149
- (s(!0), r(P, null, $(D.value, (n, g) => (s(), r(P, { key: g }, [
150
- n === "DOTS" ? (s(), r("div", J, "...")) : (s(), v(o, {
168
+ (i(!0), r(b, null, j(N.value, (a, m) => (i(), r(b, { key: m }, [
169
+ a === "DOTS" ? (i(), r("div", _, "...")) : (i(), w(d, {
151
170
  key: 1,
152
171
  size: "sm",
153
- variant: n === e.currentPage ? "outline" : "ghost",
154
- class: S({
155
- "bg-white text-primary border-primary ring-1 ring-primary pointer-events-none z-10": n === e.currentPage,
156
- "text-gray-600 hover:bg-gray-100": n !== e.currentPage
172
+ variant: a === e.currentPage ? "outline" : "ghost",
173
+ class: z({
174
+ "bg-white text-primary border-primary ring-1 ring-primary pointer-events-none z-10": a === e.currentPage,
175
+ "text-gray-600 hover:bg-gray-100": a !== e.currentPage
157
176
  }),
158
177
  disabled: e.disabled,
159
- onClick: (c) => i(n)
178
+ onClick: (P) => o(a)
160
179
  }, {
161
- default: w(() => [
162
- h(x(n), 1)
180
+ default: I(() => [
181
+ y(l(a), 1)
163
182
  ]),
164
183
  _: 2
165
184
  }, 1032, ["variant", "class", "disabled", "onClick"]))
166
185
  ], 64))), 128)),
167
- e.navType === "icon" ? (s(), v(o, {
186
+ e.navType === "icon" ? (i(), w(d, {
168
187
  key: 3,
169
188
  variant: "ghost",
170
189
  size: "sm",
171
190
  icon: "lucide:chevron-right",
172
191
  disabled: e.disabled || e.currentPage === e.totalPages,
173
- onClick: t[4] || (t[4] = (n) => i(e.currentPage + 1))
174
- }, null, 8, ["disabled"])) : (s(), r(P, { key: 4 }, [
175
- b(o, {
192
+ onClick: n[4] || (n[4] = (a) => o(e.currentPage + 1))
193
+ }, null, 8, ["disabled"])) : (i(), r(b, { key: 4 }, [
194
+ x(d, {
176
195
  variant: "ghost",
177
196
  size: "sm",
178
197
  class: "hidden sm:flex",
179
198
  disabled: e.disabled || e.currentPage === e.totalPages,
180
- onClick: t[5] || (t[5] = (n) => i(e.currentPage + 1))
199
+ onClick: n[5] || (n[5] = (a) => o(e.currentPage + 1))
181
200
  }, {
182
- default: w(() => [...t[13] || (t[13] = [
183
- h(" Next ", -1)
184
- ])]),
201
+ default: I(() => [
202
+ y(l(M.value), 1)
203
+ ]),
185
204
  _: 1
186
205
  }, 8, ["disabled"]),
187
- b(o, {
206
+ x(d, {
188
207
  variant: "ghost",
189
208
  size: "sm",
190
209
  icon: "lucide:chevron-right",
191
210
  class: "flex sm:hidden",
192
211
  disabled: e.disabled || e.currentPage === e.totalPages,
193
- onClick: t[6] || (t[6] = (n) => i(e.currentPage + 1))
212
+ onClick: n[6] || (n[6] = (a) => o(e.currentPage + 1))
194
213
  }, null, 8, ["disabled"])
195
214
  ], 64)),
196
- e.showEdges ? (s(), v(o, {
215
+ e.showEdges ? (i(), w(d, {
197
216
  key: 5,
198
217
  variant: "ghost",
199
218
  size: "sm",
200
219
  icon: "lucide:chevrons-right",
201
220
  disabled: e.disabled || e.currentPage === e.totalPages,
202
- onClick: t[7] || (t[7] = (n) => i(e.totalPages))
203
- }, null, 8, ["disabled"])) : m("", !0)
221
+ onClick: n[7] || (n[7] = (a) => o(e.totalPages))
222
+ }, null, 8, ["disabled"])) : f("", !0)
204
223
  ])
205
224
  ], 2));
206
225
  }
207
226
  });
208
227
  export {
209
- W as default
228
+ se as default
210
229
  };
@@ -1,17 +1,18 @@
1
- import { defineComponent as P, computed as l, openBlock as r, createElementBlock as a, normalizeClass as d, createVNode as x, withCtx as g, createTextVNode as h, toDisplayString as n, createCommentVNode as m, createElementVNode as o, Fragment as $, renderList as z, createBlock as p } from "vue";
2
- import b from "../Icon.vue.js";
3
- import N from "../Button.vue.js";
4
- import F from "../Badge.vue.js";
5
- const T = {
1
+ import { defineComponent as F, computed as o, openBlock as i, createElementBlock as a, normalizeClass as m, createVNode as v, withCtx as h, createTextVNode as b, toDisplayString as l, createCommentVNode as u, createElementVNode as s, Fragment as D, renderList as E, createBlock as y } from "vue";
2
+ import _ from "../Icon.vue.js";
3
+ import S from "../Button.vue.js";
4
+ import j from "../Badge.vue.js";
5
+ import { $t as n } from "../../utils/i18n.js";
6
+ const L = {
6
7
  key: 0,
7
8
  class: "absolute -top-3 left-1/2 -translate-x-1/2 z-20"
8
- }, E = { class: "mb-3 text-center" }, I = { class: "text-xl font-bold text-foreground tracking-tight" }, S = {
9
+ }, M = { class: "mb-3 text-center" }, R = { class: "text-xl font-bold text-foreground tracking-tight" }, q = {
9
10
  key: 0,
10
11
  class: "text-sm text-muted-foreground mt-2 min-h-[40px] leading-relaxed"
11
- }, j = { class: "mb-8 text-center flex items-center justify-center" }, D = { class: "text-4xl font-extrabold text-foreground tracking-tight" }, L = {
12
+ }, A = { class: "mb-8 text-center flex items-center justify-center" }, G = { class: "text-4xl font-extrabold text-foreground tracking-tight" }, H = {
12
13
  key: 0,
13
14
  class: "text-muted-foreground text-sm font-medium ml-1 self-end mb-1.5 opacity-80"
14
- }, M = { class: "flex-1 space-y-2.5 mb-8" }, R = { class: "mt-0 shrink-0 transition-transform group-hover/feature:scale-110" }, q = { class: "mt-auto pt-4 border-t border-border/70" }, K = /* @__PURE__ */ P({
15
+ }, J = { class: "flex-1 space-y-2.5 mb-8" }, K = { class: "mt-0 shrink-0 transition-transform group-hover/feature:scale-110" }, O = { class: "mt-auto pt-4 border-t border-border/70" }, Z = /* @__PURE__ */ F({
15
16
  __name: "PricingPlanItem",
16
17
  props: {
17
18
  item: {},
@@ -20,68 +21,80 @@ const T = {
20
21
  selectable: { type: Boolean, default: !0 }
21
22
  },
22
23
  emits: ["select"],
23
- setup(e, { emit: y }) {
24
- const s = e, v = y, k = () => {
25
- s.selectable && v("select", s.item);
26
- }, u = l(() => s.item.popular || s.item.recommended), _ = l(() => {
24
+ setup(c, { emit: P }) {
25
+ const e = c, k = P, I = () => {
26
+ e.selectable && k("select", e.item);
27
+ }, T = o(() => e.item.titleI18n ? n(e.item.titleI18n) : e.item.title), p = o(() => e.item.descriptionI18n ? n(e.item.descriptionI18n) : e.item.description), f = o(() => e.item.periodI18n ? n(e.item.periodI18n) : e.item.period), w = o(() => {
28
+ if (e.item.buttonTextI18n) return n(e.item.buttonTextI18n);
29
+ if (e.item.buttonText) return e.item.buttonText;
30
+ const t = n("vlite.pricingPlan.selected") !== "vlite.pricingPlan.selected" ? n("vlite.pricingPlan.selected") : "Selected", r = n("vlite.pricingPlan.choosePlan") !== "vlite.pricingPlan.choosePlan" ? n("vlite.pricingPlan.choosePlan") : "Choose Plan";
31
+ return e.selected ? t : r;
32
+ }), x = o(() => e.item.popular || e.item.recommended), C = o(() => {
27
33
  const t = "relative flex flex-col p-8 rounded-2xl transition-all duration-300 cursor-pointer group isolation-auto";
28
- let i = "bg-background text-card-foreground";
29
- return s.selected ? i += " border-2 border-primary shadow scale-[1.02] z-10" : i += " border hover:border-gray-400 hover:shadow-lg hover:-translate-y-1", `${t} ${i}`;
30
- }), w = l(() => s.selected ? "default" : "secondary"), C = l(() => s.selected || u.value ? "primary" : "outline"), V = (t) => typeof t == "string" ? t : t.text, f = (t) => typeof t == "string" ? !0 : t.included !== !1;
31
- return (t, i) => (r(), a("div", {
32
- class: d(_.value),
33
- onClick: k
34
+ let r = "bg-background text-card-foreground";
35
+ return e.selected ? r += " border-2 border-primary shadow scale-[1.02] z-10" : r += " border hover:border-gray-400 hover:shadow-lg hover:-translate-y-1", `${t} ${r}`;
36
+ }), B = o(() => e.selected ? "default" : "secondary"), V = o(() => e.selected || x.value ? "primary" : "outline"), $ = (t) => typeof t == "string" ? t : t.textI18n ? n(t.textI18n) : t.text, g = (t) => typeof t == "string" ? !0 : t.included !== !1, z = o(() => {
37
+ if (e.item.recommended) {
38
+ const r = n("vlite.pricingPlan.recommended");
39
+ return r !== "vlite.pricingPlan.recommended" ? r : "Recommended";
40
+ }
41
+ const t = n("vlite.pricingPlan.mostPopular");
42
+ return t !== "vlite.pricingPlan.mostPopular" ? t : "Most Popular";
43
+ });
44
+ return (t, r) => (i(), a("div", {
45
+ class: m(C.value),
46
+ onClick: I
34
47
  }, [
35
- u.value ? (r(), a("div", T, [
36
- x(F, {
37
- variant: w.value,
48
+ x.value ? (i(), a("div", L, [
49
+ v(j, {
50
+ variant: B.value,
38
51
  class: "shadow-sm px-4 py-1 text-xs uppercase tracking-wider font-bold"
39
52
  }, {
40
- default: g(() => [
41
- h(n(e.item.recommended ? "Recommended" : "Most Popular"), 1)
53
+ default: h(() => [
54
+ b(l(z.value), 1)
42
55
  ]),
43
56
  _: 1
44
57
  }, 8, ["variant"])
45
- ])) : m("", !0),
46
- o("div", E, [
47
- o("h3", I, n(e.item.title), 1),
48
- e.item.description ? (r(), a("p", S, n(e.item.description), 1)) : m("", !0)
58
+ ])) : u("", !0),
59
+ s("div", M, [
60
+ s("h3", R, l(T.value), 1),
61
+ p.value ? (i(), a("p", q, l(p.value), 1)) : u("", !0)
49
62
  ]),
50
- o("div", j, [
51
- o("span", D, n(e.item.price), 1),
52
- e.item.period ? (r(), a("span", L, n(e.item.period), 1)) : m("", !0)
63
+ s("div", A, [
64
+ s("span", G, l(c.item.price), 1),
65
+ f.value ? (i(), a("span", H, l(f.value), 1)) : u("", !0)
53
66
  ]),
54
- o("ul", M, [
55
- (r(!0), a($, null, z(e.item.features, (c, B) => (r(), a("li", {
56
- key: B,
67
+ s("ul", J, [
68
+ (i(!0), a(D, null, E(c.item.features, (d, N) => (i(), a("li", {
69
+ key: N,
57
70
  class: "flex items-start gap-3 text-sm group/feature"
58
71
  }, [
59
- o("div", R, [
60
- f(c) ? (r(), p(b, {
72
+ s("div", K, [
73
+ g(d) ? (i(), y(_, {
61
74
  key: 0,
62
75
  icon: "lucide:check",
63
76
  class: "w-4 h-4 text-primary font-bold"
64
- })) : (r(), p(b, {
77
+ })) : (i(), y(_, {
65
78
  key: 1,
66
79
  icon: "lucide:minus",
67
80
  class: "w-4 h-4 text-muted-foreground/30"
68
81
  }))
69
82
  ]),
70
- o("span", {
71
- class: d(
72
- f(c) ? "text-foreground/90 font-medium" : "text-muted-foreground/60 decoration-slate-300/50"
83
+ s("span", {
84
+ class: m(
85
+ g(d) ? "text-foreground/90 font-medium" : "text-muted-foreground/60 decoration-slate-300/50"
73
86
  )
74
- }, n(V(c)), 3)
87
+ }, l($(d)), 3)
75
88
  ]))), 128))
76
89
  ]),
77
- o("div", q, [
78
- x(N, {
79
- variant: C.value,
80
- class: d(["w-full font-semibold shadow-sm rounded-lg", { "ring-2 ring-primary ring-offset-2": e.selected }]),
90
+ s("div", O, [
91
+ v(S, {
92
+ variant: V.value,
93
+ class: m(["w-full font-semibold shadow-sm rounded-lg", { "ring-2 ring-primary ring-offset-2": c.selected }]),
81
94
  size: "lg"
82
95
  }, {
83
- default: g(() => [
84
- h(n(e.item.buttonText || (e.selected ? "Selected" : "Choose Plan")), 1)
96
+ default: h(() => [
97
+ b(l(w.value), 1)
85
98
  ]),
86
99
  _: 1
87
100
  }, 8, ["variant", "class"])
@@ -90,5 +103,5 @@ const T = {
90
103
  }
91
104
  });
92
105
  export {
93
- K as default
106
+ Z as default
94
107
  };
@@ -1,17 +1,22 @@
1
1
  export interface PricingPlanFeature {
2
2
  text: string;
3
+ textI18n?: string;
3
4
  included: boolean;
4
5
  }
5
6
  export interface PricingPlanItemSchema {
6
7
  id: string | number;
7
8
  title: string;
9
+ titleI18n?: string;
8
10
  price: string | number;
9
11
  period?: string;
12
+ periodI18n?: string;
10
13
  description?: string;
14
+ descriptionI18n?: string;
11
15
  features?: (string | PricingPlanFeature)[];
12
16
  popular?: boolean;
13
17
  recommended?: boolean;
14
18
  buttonText?: string;
19
+ buttonTextI18n?: string;
15
20
  variant?: 'outline' | 'solid';
16
21
  [key: string]: any;
17
22
  }
@@ -21,14 +21,10 @@ declare const __VLS_component: import('vue').DefineComponent<ScreenProps, {}, {}
21
21
  onDelete?: (items: any[]) => any;
22
22
  onAdd?: () => any;
23
23
  }>, {
24
- title: string;
25
- description: string;
26
24
  name: string;
27
25
  data: any[];
28
26
  loading: boolean;
29
27
  pagination: boolean;
30
- emptyTitle: string;
31
- emptyDescription: string;
32
28
  emptyIcon: string;
33
29
  paginationProps: import('./types').ScreenPaginationProps;
34
30
  customHeader: boolean;