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,15 +1,17 @@
1
- import { defineComponent as I, ref as k, watch as N, computed as r, openBlock as i, createElementBlock as v, normalizeClass as s, createBlock as R, createCommentVNode as f, toDisplayString as C, createElementVNode as b, normalizeStyle as x, withDirectives as F, vModelText as H } from "vue";
1
+ import { defineComponent as N, ref as x, watch as R, computed as r, openBlock as i, createElementBlock as v, normalizeClass as s, createBlock as F, createCommentVNode as f, toDisplayString as C, createElementVNode as p, normalizeStyle as y, withDirectives as H, vModelText as L } from "vue";
2
2
  import U from "./Icon.vue.js";
3
- const W = {
3
+ import { $t as W } from "../utils/i18n.js";
4
+ const j = {
4
5
  key: 1,
5
6
  class: "text-sm font-medium whitespace-nowrap cursor-pointer"
6
- }, j = ["min", "max", "step", "disabled"], G = /* @__PURE__ */ I({
7
+ }, q = ["min", "max", "step", "disabled"], K = /* @__PURE__ */ N({
7
8
  __name: "Slider",
8
9
  props: {
9
10
  min: { default: 0 },
10
11
  max: { default: 100 },
11
12
  step: { default: 1 },
12
13
  label: {},
14
+ labelI18n: {},
13
15
  icon: {},
14
16
  disabled: { type: Boolean },
15
17
  showValue: { type: Boolean, default: !0 },
@@ -19,15 +21,15 @@ const W = {
19
21
  size: { default: "md" }
20
22
  },
21
23
  emits: ["update:modelValue", "change", "iconClick"],
22
- setup(l, { emit: $ }) {
23
- const t = l, d = $, o = k(!1), g = k(!1), u = k(t.modelValue);
24
- N(
24
+ setup(a, { emit: z }) {
25
+ const t = a, d = z, u = x(!1), g = x(!1), o = x(t.modelValue);
26
+ R(
25
27
  () => t.modelValue,
26
- (n) => {
27
- u.value = n;
28
+ (l) => {
29
+ o.value = l;
28
30
  }
29
31
  );
30
- const h = r(() => t.centerOrigin !== void 0 ? t.centerOrigin : t.min < 0 && t.max > 0), y = r(() => t.max - t.min), p = r(() => (u.value - t.min) / y.value * 100), w = r(() => (0 - t.min) / y.value * 100), V = r(() => {
32
+ const b = r(() => t.centerOrigin !== void 0 ? t.centerOrigin : t.min < 0 && t.max > 0), V = r(() => t.max - t.min), h = r(() => (o.value - t.min) / V.value * 100), w = r(() => (0 - t.min) / V.value * 100), $ = r(() => {
31
33
  switch (t.size) {
32
34
  case "xs":
33
35
  return 10;
@@ -38,34 +40,34 @@ const W = {
38
40
  default:
39
41
  return 14;
40
42
  }
41
- }), c = (n) => {
42
- const e = V.value / 2, a = V.value;
43
- return `calc(${n}% + (${e}px - ${a * (n / 100)}px))`;
44
- }, z = r(() => {
45
- if (h.value) {
46
- const n = Math.min(p.value, w.value), e = Math.max(p.value, w.value), a = c(n), E = c(e);
43
+ }), c = (l) => {
44
+ const e = $.value / 2, n = $.value;
45
+ return `calc(${l}% + (${e}px - ${n * (l / 100)}px))`;
46
+ }, M = r(() => {
47
+ if (b.value) {
48
+ const l = Math.min(h.value, w.value), e = Math.max(h.value, w.value), n = c(l), E = c(e);
47
49
  return {
48
- left: a,
49
- width: `calc(${E} - ${a})`
50
+ left: n,
51
+ width: `calc(${E} - ${n})`
50
52
  };
51
53
  } else
52
54
  return {
53
55
  left: "0%",
54
- width: c(p.value)
56
+ width: c(h.value)
55
57
  };
56
- }), M = r(() => h.value ? u.value < 0 ? "rounded-r-none" : u.value > 0 ? "rounded-l-none" : "" : ""), B = r(() => ({
57
- left: c(p.value)
58
- })), S = () => {
59
- d("update:modelValue", u.value);
60
- }, D = () => {
61
- d("change", u.value), o.value = !1;
58
+ }), B = r(() => b.value ? o.value < 0 ? "rounded-r-none" : o.value > 0 ? "rounded-l-none" : "" : ""), S = r(() => ({
59
+ left: c(h.value)
60
+ })), D = () => {
61
+ d("update:modelValue", o.value);
62
+ }, I = () => {
63
+ d("change", o.value), u.value = !1;
62
64
  }, P = r(() => Math.abs(t.modelValue) > 1e-3), O = () => {
63
65
  if (t.disabled) return;
64
- const n = h.value ? 0 : t.min;
65
- u.value = n, d("update:modelValue", n), d("change", n);
66
+ const l = b.value ? 0 : t.min;
67
+ o.value = l, d("update:modelValue", l), d("change", l);
66
68
  }, T = r(() => {
67
- const n = t.step.toString().split(".")[1]?.length || 0;
68
- return u.value.toFixed(n);
69
+ const l = t.step.toString().split(".")[1]?.length || 0;
70
+ return o.value.toFixed(l);
69
71
  }), m = r(() => ({
70
72
  xs: {
71
73
  track: "h-0.5",
@@ -91,82 +93,82 @@ const W = {
91
93
  wrapper: "h-7",
92
94
  tick: "h-4"
93
95
  }
94
- })[t.size]);
95
- return (n, e) => (i(), v("div", {
96
- class: s(["slider-wrapper flex items-center gap-3 w-full select-none touch-none", { "opacity-50 pointer-events-none": l.disabled }]),
97
- onMouseenter: e[6] || (e[6] = (a) => g.value = !0),
98
- onMouseleave: e[7] || (e[7] = (a) => g.value = !1)
96
+ })[t.size]), k = r(() => t.labelI18n ? W(t.labelI18n) : t.label);
97
+ return (l, e) => (i(), v("div", {
98
+ class: s(["slider-wrapper flex items-center gap-3 w-full select-none touch-none", { "opacity-50 pointer-events-none": a.disabled }]),
99
+ onMouseenter: e[6] || (e[6] = (n) => g.value = !0),
100
+ onMouseleave: e[7] || (e[7] = (n) => g.value = !1)
99
101
  }, [
100
- l.label || l.icon ? (i(), v("div", {
102
+ k.value || a.icon ? (i(), v("div", {
101
103
  key: 0,
102
- class: s(["flex items-center gap-2 min-w-fit cursor-pointer transition-colors", [{ "text-primary": o.value || g.value }, l.labelClass || "text-muted-foreground"]]),
103
- onClick: e[0] || (e[0] = (a) => d("iconClick")),
104
+ class: s(["flex items-center gap-2 min-w-fit cursor-pointer transition-colors", [{ "text-primary": u.value || g.value }, a.labelClass || "text-muted-foreground"]]),
105
+ onClick: e[0] || (e[0] = (n) => d("iconClick")),
104
106
  title: "Double-click to reset"
105
107
  }, [
106
- l.icon ? (i(), R(U, {
108
+ a.icon ? (i(), F(U, {
107
109
  key: 0,
108
- icon: l.icon,
110
+ icon: a.icon,
109
111
  class: "h-4 w-4"
110
112
  }, null, 8, ["icon"])) : f("", !0),
111
- l.label ? (i(), v("label", W, C(l.label), 1)) : f("", !0)
113
+ k.value ? (i(), v("label", j, C(k.value), 1)) : f("", !0)
112
114
  ], 2)) : f("", !0),
113
- b("div", {
115
+ p("div", {
114
116
  class: s(["relative flex-1 flex items-center group", m.value.wrapper])
115
117
  }, [
116
- b("div", {
118
+ p("div", {
117
119
  class: s(["absolute w-full bg-secondary rounded-full overflow-hidden", m.value.track])
118
120
  }, null, 2),
119
- h.value ? (i(), v("div", {
121
+ b.value ? (i(), v("div", {
120
122
  key: 0,
121
123
  class: s(["absolute top-1/2 w-0.5 bg-muted-foreground/30 rounded transform -translate-y-1/2 z-0", m.value.tick]),
122
- style: x({ left: c(w.value) })
124
+ style: y({ left: c(w.value) })
123
125
  }, null, 6)) : f("", !0),
124
- b("div", {
126
+ p("div", {
125
127
  class: s(["absolute bg-primary rounded-full will-change-transform", [
126
128
  {
127
- "bg-muted-foreground": l.disabled,
128
- "transition-all duration-75 ease-out": !o.value,
129
- "duration-0": o.value
129
+ "bg-muted-foreground": a.disabled,
130
+ "transition-all duration-75 ease-out": !u.value,
131
+ "duration-0": u.value
130
132
  },
131
133
  m.value.track,
132
- M.value
134
+ B.value
133
135
  ]]),
134
- style: x(z.value)
136
+ style: y(M.value)
135
137
  }, null, 6),
136
- b("div", {
138
+ p("div", {
137
139
  class: s(["absolute top-1/2 bg-background -ml-px border border-border shadow-sm rounded-full transform -translate-y-1/2 -translate-x-1/2 pointer-events-none transition-transform duration-100 ease-out z-10", [
138
140
  {
139
- "border-primary shadow-md scale-110": o.value,
141
+ "border-primary shadow-md scale-110": u.value,
140
142
  "border-primary": P.value
141
143
  },
142
144
  m.value.thumb
143
145
  ]]),
144
- style: x(B.value)
146
+ style: y(S.value)
145
147
  }, null, 6),
146
- F(b("input", {
148
+ H(p("input", {
147
149
  type: "range",
148
- "onUpdate:modelValue": e[1] || (e[1] = (a) => u.value = a),
149
- min: l.min,
150
- max: l.max,
151
- step: l.step,
152
- disabled: l.disabled,
153
- onInput: S,
154
- onChange: D,
155
- onMousedown: e[2] || (e[2] = (a) => o.value = !0),
156
- onTouchstart: e[3] || (e[3] = (a) => o.value = !0),
157
- onMouseup: e[4] || (e[4] = (a) => o.value = !1),
158
- onTouchend: e[5] || (e[5] = (a) => o.value = !1),
150
+ "onUpdate:modelValue": e[1] || (e[1] = (n) => o.value = n),
151
+ min: a.min,
152
+ max: a.max,
153
+ step: a.step,
154
+ disabled: a.disabled,
155
+ onInput: D,
156
+ onChange: I,
157
+ onMousedown: e[2] || (e[2] = (n) => u.value = !0),
158
+ onTouchstart: e[3] || (e[3] = (n) => u.value = !0),
159
+ onMouseup: e[4] || (e[4] = (n) => u.value = !1),
160
+ onTouchend: e[5] || (e[5] = (n) => u.value = !1),
159
161
  class: "slider-input absolute inset-0 w-full h-full opacity-0 cursor-pointer z-20 m-0 p-0"
160
- }, null, 40, j), [
162
+ }, null, 40, q), [
161
163
  [
162
- H,
163
- u.value,
164
+ L,
165
+ o.value,
164
166
  void 0,
165
167
  { number: !0 }
166
168
  ]
167
169
  ])
168
170
  ], 2),
169
- l.showValue ? (i(), v("span", {
171
+ a.showValue ? (i(), v("span", {
170
172
  key: 1,
171
173
  onDblclick: O,
172
174
  class: "font-mono tabular-nums text-muted-foreground text-right min-w-6 text-sm"
@@ -175,5 +177,5 @@ const W = {
175
177
  }
176
178
  });
177
179
  export {
178
- G as default
180
+ K as default
179
181
  };
@@ -2,6 +2,7 @@ interface Props {
2
2
  modelValue?: boolean;
3
3
  disabled?: boolean;
4
4
  label?: string;
5
+ labelI18n?: string;
5
6
  class?: string;
6
7
  }
7
8
  declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
@@ -1,40 +1,45 @@
1
- import { defineComponent as d, openBlock as o, createElementBlock as n, createElementVNode as i, normalizeClass as a, toDisplayString as c, createCommentVNode as u } from "vue";
2
- const b = { class: "flex items-center gap-2" }, m = ["aria-checked", "aria-label", "disabled"], k = /* @__PURE__ */ d({
1
+ import { defineComponent as u, computed as c, openBlock as n, createElementBlock as i, createElementVNode as r, normalizeClass as t, toDisplayString as m, createCommentVNode as b } from "vue";
2
+ import { $t as f } from "../utils/i18n.js";
3
+ const p = { class: "flex items-center gap-2" }, g = ["aria-checked", "aria-label", "disabled"], v = /* @__PURE__ */ u({
3
4
  __name: "Switch",
4
5
  props: {
5
6
  modelValue: { type: Boolean, default: !1 },
6
7
  disabled: { type: Boolean, default: !1 },
7
8
  label: {},
9
+ labelI18n: {},
8
10
  class: { default: "" }
9
11
  },
10
12
  emits: ["update:modelValue"],
11
13
  setup(e, { emit: s }) {
12
- const l = e, r = s, t = () => {
13
- l.disabled || r("update:modelValue", !l.modelValue);
14
- };
15
- return (f, g) => (o(), n("div", b, [
16
- i("button", {
14
+ const l = e, d = s, o = () => {
15
+ l.disabled || d("update:modelValue", !l.modelValue);
16
+ }, a = c(() => l.labelI18n ? f(l.labelI18n) : l.label);
17
+ return (h, k) => (n(), i("div", p, [
18
+ r("button", {
17
19
  type: "button",
18
20
  role: "switch",
19
21
  "aria-checked": e.modelValue,
20
- "aria-label": e.label || "Toggle",
22
+ "aria-label": a.value || "Toggle",
21
23
  disabled: e.disabled,
22
- class: a(["relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", [e.modelValue ? "bg-primary" : "bg-input", l.class]]),
23
- onClick: t
24
+ class: t(["relative inline-flex h-6 w-11 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out focus:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50", [e.modelValue ? "bg-primary" : "bg-input", l.class]]),
25
+ onClick: o
24
26
  }, [
25
- i("span", {
27
+ r("span", {
26
28
  "aria-hidden": "true",
27
- class: a(["pointer-events-none inline-block h-5 w-5 transform rounded-full bg-background shadow-lg ring-0 transition duration-200 ease-in-out", e.modelValue ? "translate-x-5" : "translate-x-0"])
29
+ class: t([
30
+ "pointer-events-none inline-block h-5 w-5 transform rounded-full bg-background shadow-lg ring-0 transition duration-200 ease-in-out",
31
+ e.modelValue ? "translate-x-5 rtl:translate-x-0" : "translate-x-0 rtl:-translate-x-5"
32
+ ])
28
33
  }, null, 2)
29
- ], 10, m),
30
- e.label ? (o(), n("label", {
34
+ ], 10, g),
35
+ a.value ? (n(), i("label", {
31
36
  key: 0,
32
- class: a([e.disabled ? "opacity-50" : "", "text-sm font-medium text-foreground cursor-pointer"]),
33
- onClick: t
34
- }, c(e.label), 3)) : u("", !0)
37
+ class: t([e.disabled ? "opacity-50" : "", "text-sm font-medium text-foreground cursor-pointer"]),
38
+ onClick: o
39
+ }, m(a.value), 3)) : b("", !0)
35
40
  ]));
36
41
  }
37
42
  });
38
43
  export {
39
- k as default
44
+ v as default
40
45
  };
@@ -1,7 +1,8 @@
1
- import { defineComponent as M, ref as g, watch as c, onMounted as j, computed as p, openBlock as i, createElementBlock as u, normalizeClass as l, normalizeStyle as A, createCommentVNode as y, Fragment as E, renderList as I, createBlock as N, createElementVNode as T, toDisplayString as _, nextTick as D } from "vue";
1
+ import { defineComponent as M, ref as g, watch as c, onMounted as j, computed as p, openBlock as i, createElementBlock as u, normalizeClass as l, normalizeStyle as A, createCommentVNode as y, Fragment as E, renderList as N, createBlock as O, createElementVNode as T, toDisplayString as _, nextTick as D } from "vue";
2
2
  import { useResizeObserver as F } from "@vueuse/core";
3
- import O from "../Icon.vue.js";
4
- const q = ["aria-selected", "disabled", "onClick"], K = /* @__PURE__ */ M({
3
+ import q from "../Icon.vue.js";
4
+ import { $t as G } from "../../utils/i18n.js";
5
+ const H = ["aria-selected", "disabled", "onClick"], U = /* @__PURE__ */ M({
5
6
  __name: "Tabes",
6
7
  props: {
7
8
  options: {},
@@ -15,7 +16,7 @@ const q = ["aria-selected", "disabled", "onClick"], K = /* @__PURE__ */ M({
15
16
  setup(s, { emit: x }) {
16
17
  const r = s, v = x, d = g(null), f = g(/* @__PURE__ */ new Map()), h = (e, n) => {
17
18
  e ? f.value.set(n, e) : f.value.delete(n);
18
- }, m = g({
19
+ }, b = g({
19
20
  width: "0px",
20
21
  height: "0px",
21
22
  transform: "translate(0px, 0px)",
@@ -24,14 +25,14 @@ const q = ["aria-selected", "disabled", "onClick"], K = /* @__PURE__ */ M({
24
25
  await D();
25
26
  const e = d.value, n = f.value.get(r.modelValue);
26
27
  if (!e || !n) {
27
- m.value.opacity = 0;
28
+ b.value.opacity = 0;
28
29
  return;
29
30
  }
30
- const a = e.getBoundingClientRect(), t = n.getBoundingClientRect(), b = t.left - a.left, $ = t.top - a.top, B = t.width, L = t.height;
31
- m.value = {
32
- width: `${B}px`,
33
- height: `${L}px`,
34
- transform: `translate(${b}px, ${$}px)`,
31
+ const a = e.getBoundingClientRect(), t = n.getBoundingClientRect(), m = t.left - a.left, B = t.top - a.top, L = t.width, I = t.height;
32
+ b.value = {
33
+ width: `${L}px`,
34
+ height: `${I}px`,
35
+ transform: `translate(${m}px, ${B}px)`,
35
36
  opacity: 1
36
37
  };
37
38
  };
@@ -81,8 +82,8 @@ const q = ["aria-selected", "disabled", "onClick"], K = /* @__PURE__ */ M({
81
82
  }
82
83
  else
83
84
  t = a ? "text-muted-foreground" : "text-muted-foreground hover:text-foreground/80";
84
- const b = e.disabled ? "opacity-50 cursor-not-allowed" : "";
85
- return [z.value, t, b].join(" ");
85
+ const m = e.disabled ? "opacity-50 cursor-not-allowed" : "";
86
+ return [z.value, t, m].join(" ");
86
87
  }, R = p(() => {
87
88
  const e = "absolute left-0 top-0 transition-all duration-300 ease-[cubic-bezier(0.25,0.1,0.25,1)] z-0 pointer-events-none";
88
89
  return r.variant === "line" ? `${e} !h-[2px] !top-auto bottom-0` : `${e} rounded-md shadow-sm`;
@@ -94,7 +95,7 @@ const q = ["aria-selected", "disabled", "onClick"], K = /* @__PURE__ */ M({
94
95
  success: "bg-success",
95
96
  outline: "bg-accent/50 ring-1 ring-border",
96
97
  line: "bg-primary"
97
- })[r.variant];
98
+ })[r.variant], $ = (e) => e.labelI18n ? G(e.labelI18n) : e.label;
98
99
  return (e, n) => (i(), u("div", {
99
100
  ref_key: "containerRef",
100
101
  ref: d,
@@ -104,9 +105,9 @@ const q = ["aria-selected", "disabled", "onClick"], K = /* @__PURE__ */ M({
104
105
  s.modelValue !== void 0 ? (i(), u("div", {
105
106
  key: 0,
106
107
  class: l([R.value, S()]),
107
- style: A(m.value)
108
+ style: A(b.value)
108
109
  }, null, 6)) : y("", !0),
109
- (i(!0), u(E, null, I(s.options, (a) => (i(), u("button", {
110
+ (i(!0), u(E, null, N(s.options, (a) => (i(), u("button", {
110
111
  key: a.value,
111
112
  ref_for: !0,
112
113
  ref: (t) => h(t, a.value),
@@ -117,18 +118,18 @@ const q = ["aria-selected", "disabled", "onClick"], K = /* @__PURE__ */ M({
117
118
  onClick: (t) => k(a),
118
119
  type: "button"
119
120
  }, [
120
- a.icon ? (i(), N(O, {
121
+ a.icon ? (i(), O(q, {
121
122
  key: 0,
122
123
  icon: a.icon,
123
124
  class: l(s.size === "sm" ? "w-3.5 h-3.5" : "w-4 h-4")
124
125
  }, null, 8, ["icon", "class"])) : y("", !0),
125
126
  T("span", {
126
127
  class: l(["whitespace-nowrap z-20 relative", s.textClass])
127
- }, _(a.label), 3)
128
- ], 10, q))), 128))
128
+ }, _($(a)), 3)
129
+ ], 10, H))), 128))
129
130
  ], 2));
130
131
  }
131
132
  });
132
133
  export {
133
- K as default
134
+ U as default
134
135
  };
@@ -1,5 +1,6 @@
1
1
  export interface TabesOption {
2
2
  label: string;
3
+ labelI18n?: string;
3
4
  value: string | number;
4
5
  icon?: string;
5
6
  disabled?: boolean;
@@ -1,6 +1,7 @@
1
1
  interface Props {
2
2
  modelValue?: string;
3
3
  placeholder?: string;
4
+ placeholderI18n?: string;
4
5
  disabled?: boolean;
5
6
  rows?: number;
6
7
  class?: string;
@@ -1,34 +1,36 @@
1
- import { defineComponent as n, computed as c, openBlock as i, createElementBlock as m, normalizeClass as p } from "vue";
2
- const f = ["value", "rows", "disabled", "placeholder"], x = /* @__PURE__ */ n({
1
+ import { defineComponent as i, computed as r, openBlock as p, createElementBlock as m, normalizeClass as f } from "vue";
2
+ import { $t as b } from "../utils/i18n.js";
3
+ const x = ["value", "rows", "disabled", "placeholder"], g = /* @__PURE__ */ i({
3
4
  __name: "Textarea",
4
5
  props: {
5
6
  modelValue: { default: "" },
6
7
  placeholder: {},
8
+ placeholderI18n: {},
7
9
  disabled: { type: Boolean, default: !1 },
8
10
  rows: { default: 3 },
9
11
  class: { default: "" }
10
12
  },
11
13
  emits: ["update:modelValue", "focus", "blur"],
12
- setup(l, { emit: d }) {
13
- const r = l, o = d, s = c(() => [
14
+ setup(l, { emit: s }) {
15
+ const o = l, t = s, n = r(() => [
14
16
  "flex min-h-[80px] w-full rounded-md border border-input px-3 py-2 text-sm placeholder:text-muted-foreground/50 focus-visible:outline-none focus-visible:border-primary disabled:cursor-not-allowed disabled:opacity-50 bg-background text-foreground",
15
- r.class
16
- ].join(" ")), u = (a) => {
17
- const e = a.target;
18
- o("update:modelValue", e.value);
19
- };
20
- return (a, e) => (i(), m("textarea", {
17
+ o.class
18
+ ].join(" ")), u = (d) => {
19
+ const e = d.target;
20
+ t("update:modelValue", e.value);
21
+ }, c = r(() => o.placeholderI18n ? b(o.placeholderI18n) : o.placeholder);
22
+ return (d, e) => (p(), m("textarea", {
21
23
  value: l.modelValue,
22
24
  rows: l.rows,
23
25
  disabled: l.disabled,
24
- placeholder: l.placeholder,
25
- class: p(s.value),
26
+ placeholder: c.value,
27
+ class: f(n.value),
26
28
  onInput: u,
27
- onFocus: e[0] || (e[0] = (t) => o("focus", t)),
28
- onBlur: e[1] || (e[1] = (t) => o("blur", t))
29
- }, null, 42, f));
29
+ onFocus: e[0] || (e[0] = (a) => t("focus", a)),
30
+ onBlur: e[1] || (e[1] = (a) => t("blur", a))
31
+ }, null, 42, x));
30
32
  }
31
33
  });
32
34
  export {
33
- x as default
35
+ g as default
34
36
  };
@@ -1,7 +1,8 @@
1
- import { defineComponent as a, renderSlot as l, unref as e, createVNode as r, normalizeClass as s } from "vue";
2
- import { useTheme as m } from "../composables/useTheme.js";
3
- import c from "./Button.vue.js";
4
- const g = /* @__PURE__ */ a({
1
+ import { defineComponent as m, computed as d, renderSlot as u, unref as o, createVNode as h, normalizeClass as g } from "vue";
2
+ import { useTheme as f } from "../composables/useTheme.js";
3
+ import T from "./Button.vue.js";
4
+ import { $t as c } from "../utils/i18n.js";
5
+ const w = /* @__PURE__ */ m({
5
6
  __name: "ThemeToggle",
6
7
  props: {
7
8
  class: {},
@@ -10,23 +11,32 @@ const g = /* @__PURE__ */ a({
10
11
  variant: {}
11
12
  },
12
13
  setup(t) {
13
- const { theme: o, toggleTheme: n } = m();
14
- return (i, d) => l(i.$slots, "default", {
15
- toggleTheme: e(n),
16
- theme: e(o)
14
+ const { theme: i, toggleTheme: r } = f(), a = d(() => {
15
+ const n = i.value === "light", s = "vlite.themeToggle.switchToDark", l = "vlite.themeToggle.switchToLight";
16
+ if (n) {
17
+ const e = c(s);
18
+ return e !== s ? e : "Switch to dark mode";
19
+ } else {
20
+ const e = c(l);
21
+ return e !== l ? e : "Switch to light mode";
22
+ }
23
+ });
24
+ return (n, s) => u(n.$slots, "default", {
25
+ toggleTheme: o(r),
26
+ theme: o(i)
17
27
  }, () => [
18
- r(c, {
19
- icon: e(o) === "light" ? "lucide:sun" : "lucide:moon",
28
+ h(T, {
29
+ icon: o(i) === "light" ? "lucide:sun" : "lucide:moon",
20
30
  variant: t.variant || "secondary",
21
31
  rounded: t.rounded || "md",
22
32
  size: t.size,
23
- class: s(t.class),
24
- title: e(o) === "light" ? "Switch to dark mode" : "Switch to light mode",
25
- onClick: e(n)
33
+ class: g(t.class),
34
+ title: a.value,
35
+ onClick: o(r)
26
36
  }, null, 8, ["icon", "variant", "rounded", "size", "class", "title", "onClick"])
27
37
  ]);
28
38
  }
29
39
  });
30
40
  export {
31
- g as default
41
+ w as default
32
42
  };