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,10 +1,11 @@
1
- import { defineComponent as y, computed as d, openBlock as l, createElementBlock as m, createElementVNode as v, normalizeClass as i, createVNode as g, Transition as w, withCtx as f, createBlock as o, createCommentVNode as c, createTextVNode as C, toDisplayString as V } from "vue";
2
- import h from "./Icon.vue.js";
3
- import z from "./Label.vue.js";
4
- const B = { class: "flex items-center space-x-2" }, N = ["aria-checked", "data-state", "disabled", "id"], j = {
1
+ import { defineComponent as v, computed as s, openBlock as l, createElementBlock as f, createElementVNode as g, normalizeClass as d, createVNode as w, Transition as C, withCtx as h, createBlock as o, createCommentVNode as r, createTextVNode as V, toDisplayString as z } from "vue";
2
+ import p from "./Icon.vue.js";
3
+ import B from "./Label.vue.js";
4
+ import { $t as N } from "../utils/i18n.js";
5
+ const _ = { class: "flex items-center space-x-2" }, j = ["aria-checked", "data-state", "disabled", "id"], I = {
5
6
  key: 0,
6
7
  class: "flex items-center justify-center text-current w-full h-full"
7
- }, D = /* @__PURE__ */ y({
8
+ }, L = /* @__PURE__ */ v({
8
9
  __name: "CheckBox",
9
10
  props: {
10
11
  modelValue: { type: Boolean, default: !1 },
@@ -12,30 +13,31 @@ const B = { class: "flex items-center space-x-2" }, N = ["aria-checked", "data-s
12
13
  disabled: { type: Boolean, default: !1 },
13
14
  indeterminate: { type: Boolean, default: !1 },
14
15
  label: {},
16
+ labelI18n: {},
15
17
  id: {},
16
18
  class: { default: "" },
17
19
  size: { default: "md" },
18
20
  rounded: {}
19
21
  },
20
22
  emits: ["update:modelValue", "update:checked"],
21
- setup(t, { emit: k }) {
22
- const e = t, r = k, u = () => {
23
+ setup(t, { emit: b }) {
24
+ const e = t, c = b, u = s(() => e.labelI18n ? N(e.labelI18n) : e.label), m = () => {
23
25
  if (e.disabled) return;
24
- const n = !(e.modelValue || e.checked);
25
- r("update:modelValue", n), r("update:checked", n);
26
- }, b = {
26
+ const i = !(e.modelValue || e.checked);
27
+ c("update:modelValue", i), c("update:checked", i);
28
+ }, k = {
27
29
  xs: "h-3.5 w-3.5",
28
30
  sm: "h-4 w-4",
29
31
  md: "h-4.5 w-4.5",
30
32
  lg: "h-5 w-5",
31
33
  xl: "h-5.5 w-5.5"
32
- }, s = {
34
+ }, n = {
33
35
  xs: "h-2.5 w-2.5",
34
36
  sm: "h-3 w-3",
35
37
  md: "h-3.5 w-3.5",
36
38
  lg: "h-4 w-4",
37
39
  xl: "h-5 w-5"
38
- }, p = {
40
+ }, x = {
39
41
  none: "rounded-none",
40
42
  xs: "rounded-[3px]",
41
43
  sm: "rounded-[4px]",
@@ -44,36 +46,34 @@ const B = { class: "flex items-center space-x-2" }, N = ["aria-checked", "data-s
44
46
  xl: "rounded-lg",
45
47
  "2xl": "rounded-xl",
46
48
  full: "rounded-full"
47
- }, x = d(() => [
49
+ }, y = s(() => [
48
50
  "peer shrink-0 border border-primary transition-all duration-200 ease-in-out",
49
51
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2",
50
- // Kept ring for accessibility visibility on small elements
51
52
  "disabled:cursor-not-allowed disabled:opacity-50",
52
53
  "data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
53
54
  "data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground",
54
55
  "cursor-pointer bg-transparent",
55
- // Default background
56
- b[e.size],
57
- p[e.rounded || e.size],
56
+ k[e.size],
57
+ x[e.rounded || e.size],
58
58
  e.class
59
- ].join(" ")), a = d(() => e.indeterminate ? "indeterminate" : e.modelValue || e.checked ? "checked" : "unchecked");
60
- return d(() => [
59
+ ].join(" ")), a = s(() => e.indeterminate ? "indeterminate" : e.modelValue || e.checked ? "checked" : "unchecked");
60
+ return s(() => [
61
61
  "transition-transform duration-200",
62
62
  a.value === "checked" || a.value === "indeterminate" ? "scale-100" : "scale-0",
63
- s[e.size]
64
- ].join(" ")), (n, E) => (l(), m("div", B, [
65
- v("button", {
63
+ n[e.size]
64
+ ].join(" ")), (i, $) => (l(), f("div", _, [
65
+ g("button", {
66
66
  type: "button",
67
67
  role: "checkbox",
68
68
  "aria-checked": t.indeterminate ? "mixed" : t.modelValue,
69
69
  "data-state": a.value,
70
70
  disabled: t.disabled,
71
- class: i(x.value),
71
+ class: d(y.value),
72
72
  id: t.id,
73
- onClick: u
73
+ onClick: m
74
74
  }, [
75
- a.value === "checked" || a.value === "indeterminate" ? (l(), m("div", j, [
76
- g(w, {
75
+ a.value === "checked" || a.value === "indeterminate" ? (l(), f("div", I, [
76
+ w(C, {
77
77
  "enter-active-class": "transition duration-200 ease-out",
78
78
  "enter-from-class": "scale-50 opacity-0",
79
79
  "enter-to-class": "scale-100 opacity-100",
@@ -81,35 +81,35 @@ const B = { class: "flex items-center space-x-2" }, N = ["aria-checked", "data-s
81
81
  "leave-from-class": "scale-100 opacity-100",
82
82
  "leave-to-class": "scale-50 opacity-0"
83
83
  }, {
84
- default: f(() => [
85
- a.value === "checked" ? (l(), o(h, {
84
+ default: h(() => [
85
+ a.value === "checked" ? (l(), o(p, {
86
86
  key: 0,
87
87
  icon: "lucide:check",
88
- class: i(s[t.size])
89
- }, null, 8, ["class"])) : a.value === "indeterminate" ? (l(), o(h, {
88
+ class: d(n[t.size])
89
+ }, null, 8, ["class"])) : a.value === "indeterminate" ? (l(), o(p, {
90
90
  key: 1,
91
91
  icon: "lucide:minus",
92
- class: i(s[t.size])
93
- }, null, 8, ["class"])) : c("", !0)
92
+ class: d(n[t.size])
93
+ }, null, 8, ["class"])) : r("", !0)
94
94
  ]),
95
95
  _: 1
96
96
  })
97
- ])) : c("", !0)
98
- ], 10, N),
99
- t.label ? (l(), o(z, {
97
+ ])) : r("", !0)
98
+ ], 10, j),
99
+ u.value ? (l(), o(B, {
100
100
  key: 0,
101
101
  for: t.id,
102
102
  class: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer",
103
- onClick: u
103
+ onClick: m
104
104
  }, {
105
- default: f(() => [
106
- C(V(t.label), 1)
105
+ default: h(() => [
106
+ V(z(u.value), 1)
107
107
  ]),
108
108
  _: 1
109
- }, 8, ["for"])) : c("", !0)
109
+ }, 8, ["for"])) : r("", !0)
110
110
  ]));
111
111
  }
112
112
  });
113
113
  export {
114
- D as default
114
+ L as default
115
115
  };
@@ -1,13 +1,15 @@
1
- import { defineComponent as $, computed as s, openBlock as l, createElementBlock as c, normalizeClass as o, renderSlot as u, createBlock as d, createCommentVNode as i, createTextVNode as C, toDisplayString as z, withCtx as B, createVNode as D } from "vue";
2
- import f from "../Icon.vue.js";
1
+ import { defineComponent as C, computed as s, openBlock as o, createElementBlock as u, normalizeClass as i, renderSlot as d, createBlock as f, createCommentVNode as c, createTextVNode as z, toDisplayString as B, withCtx as D, createVNode as I } from "vue";
2
+ import b from "../Icon.vue.js";
3
3
  import S from "../Button.vue.js";
4
- const N = ["role", "tabindex"], V = {
4
+ import { $t as N } from "../../utils/i18n.js";
5
+ const V = ["role", "tabindex"], j = {
5
6
  key: 0,
6
7
  class: "truncate"
7
- }, j = "inline-flex items-center justify-center font-medium rounded-full transition-all duration-200 border box-border whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary", H = /* @__PURE__ */ $({
8
+ }, E = "inline-flex items-center justify-center font-medium rounded-full transition-all duration-200 border box-border whitespace-nowrap focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-primary", q = /* @__PURE__ */ C({
8
9
  __name: "Chip",
9
10
  props: {
10
11
  text: { default: "" },
12
+ textI18n: {},
11
13
  icon: {},
12
14
  variant: { default: "subtle" },
13
15
  size: { default: "medium" },
@@ -17,15 +19,15 @@ const N = ["role", "tabindex"], V = {
17
19
  class: { default: "" }
18
20
  },
19
21
  emits: ["click", "delete"],
20
- setup(a, { emit: b }) {
21
- const t = a, n = b, r = s(() => t.clickable && !t.disabled), g = (e) => {
22
- t.disabled || t.clickable && n("click", e);
23
- }, v = (e) => {
24
- t.disabled || (e.stopPropagation(), n("delete", e));
25
- }, m = (e) => {
26
- t.disabled || !t.clickable && !t.deletable || ((e.key === "Enter" || e.key === " ") && (e.preventDefault(), t.clickable && n("click", e)), (e.key === "Backspace" || e.key === "Delete") && t.deletable && (e.preventDefault(), n("delete", e)));
27
- }, h = s(() => {
28
- switch (t.size) {
22
+ setup(r, { emit: v }) {
23
+ const e = r, n = v, l = s(() => e.textI18n ? N(e.textI18n) : e.text), a = s(() => e.clickable && !e.disabled), g = (t) => {
24
+ e.disabled || e.clickable && n("click", t);
25
+ }, m = (t) => {
26
+ e.disabled || (t.stopPropagation(), n("delete", t));
27
+ }, h = (t) => {
28
+ e.disabled || !e.clickable && !e.deletable || ((t.key === "Enter" || t.key === " ") && (t.preventDefault(), e.clickable && n("click", t)), (t.key === "Backspace" || t.key === "Delete") && e.deletable && (t.preventDefault(), n("delete", t)));
29
+ }, p = s(() => {
30
+ switch (e.size) {
29
31
  case "small":
30
32
  return "h-5 text-[10px] px-1.5 gap-1";
31
33
  case "large":
@@ -34,24 +36,22 @@ const N = ["role", "tabindex"], V = {
34
36
  return "h-6 text-xs px-2.5 gap-1.5";
35
37
  }
36
38
  }), x = s(() => {
37
- if (t.disabled)
39
+ if (e.disabled)
38
40
  return "bg-muted text-muted-foreground border-transparent opacity-50 cursor-not-allowed";
39
- const e = r.value ? "cursor-pointer hover:shadow-sm active:scale-[0.98]" : "cursor-default";
41
+ const t = a.value ? "cursor-pointer hover:shadow-sm active:scale-[0.98]" : "cursor-default";
40
42
  return `${{
41
- solid: `bg-primary text-primary-fg border-transparent ${r.value ? "hover:bg-primary/90" : ""}`,
42
- outline: `bg-transparent border-input text-foreground ${r.value ? "hover:bg-accent hover:text-accent-foreground" : ""}`,
43
- ghost: `bg-transparent border-transparent text-muted-foreground ${r.value ? "hover:bg-accent hover:text-accent-foreground" : ""}`,
44
- subtle: `bg-accent/50 text-foreground border-transparent ${r.value ? "hover:bg-accent" : ""}`,
45
- // Default neutral
46
- // Semantic Variants
47
- secondary: `bg-secondary text-secondary-foreground border-transparent ${r.value ? "hover:bg-secondary/80" : ""}`,
48
- success: `bg-success text-success-fg border-transparent ${r.value ? "hover:bg-success/80" : ""}`,
49
- warning: `bg-warning text-warning-fg border-transparent ${r.value ? "hover:bg-warning/80" : ""}`,
50
- danger: `bg-destructive text-destructive-foreground border-transparent ${r.value ? "hover:bg-destructive/90" : ""}`,
51
- info: `bg-info text-info-fg border-transparent ${r.value ? "hover:bg-info/80" : ""}`
52
- }[t.variant]} ${e}`;
53
- }), p = s(() => [j, h.value, x.value, t.class].join(" ")), k = s(() => {
54
- switch (t.size) {
43
+ solid: `bg-primary text-primary-fg border-transparent ${a.value ? "hover:bg-primary/90" : ""}`,
44
+ outline: `bg-transparent border-input text-foreground ${a.value ? "hover:bg-accent hover:text-accent-foreground" : ""}`,
45
+ ghost: `bg-transparent border-transparent text-muted-foreground ${a.value ? "hover:bg-accent hover:text-accent-foreground" : ""}`,
46
+ subtle: `bg-accent/50 text-foreground border-transparent ${a.value ? "hover:bg-accent" : ""}`,
47
+ secondary: `bg-secondary text-secondary-foreground border-transparent ${a.value ? "hover:bg-secondary/80" : ""}`,
48
+ success: `bg-success text-success-fg border-transparent ${a.value ? "hover:bg-success/80" : ""}`,
49
+ warning: `bg-warning text-warning-fg border-transparent ${a.value ? "hover:bg-warning/80" : ""}`,
50
+ danger: `bg-destructive text-destructive-foreground border-transparent ${a.value ? "hover:bg-destructive/90" : ""}`,
51
+ info: `bg-info text-info-fg border-transparent ${a.value ? "hover:bg-info/80" : ""}`
52
+ }[e.variant]} ${t}`;
53
+ }), k = s(() => [E, p.value, x.value, e.class].join(" ")), y = s(() => {
54
+ switch (e.size) {
55
55
  case "small":
56
56
  return "h-3 w-3";
57
57
  case "large":
@@ -59,8 +59,8 @@ const N = ["role", "tabindex"], V = {
59
59
  default:
60
60
  return "h-3.5 w-3.5";
61
61
  }
62
- }), y = s(() => {
63
- switch (t.size) {
62
+ }), w = s(() => {
63
+ switch (e.size) {
64
64
  case "small":
65
65
  return "h-2.5 w-2.5";
66
66
  case "large":
@@ -69,45 +69,45 @@ const N = ["role", "tabindex"], V = {
69
69
  return "h-3 w-3";
70
70
  }
71
71
  });
72
- return (e, w) => (l(), c("div", {
73
- class: o(p.value),
74
- role: a.clickable ? "button" : "status",
75
- tabindex: r.value || a.deletable ? 0 : void 0,
72
+ return (t, $) => (o(), u("div", {
73
+ class: i(k.value),
74
+ role: r.clickable ? "button" : "status",
75
+ tabindex: a.value || r.deletable ? 0 : void 0,
76
76
  onClick: g,
77
- onKeydown: m
77
+ onKeydown: h
78
78
  }, [
79
- u(e.$slots, "icon", {}, () => [
80
- a.icon ? (l(), d(f, {
79
+ d(t.$slots, "icon", {}, () => [
80
+ r.icon ? (o(), f(b, {
81
81
  key: 0,
82
- icon: a.icon,
83
- class: o([k.value, "shrink-0", a.text ? "-ml-0.5" : ""])
84
- }, null, 8, ["icon", "class"])) : i("", !0)
82
+ icon: r.icon,
83
+ class: i([y.value, "shrink-0", l.value ? "-ml-0.5" : ""])
84
+ }, null, 8, ["icon", "class"])) : c("", !0)
85
85
  ]),
86
- a.text || e.$slots.default ? (l(), c("span", V, [
87
- u(e.$slots, "default", {}, () => [
88
- C(z(a.text), 1)
86
+ l.value || t.$slots.default ? (o(), u("span", j, [
87
+ d(t.$slots, "default", {}, () => [
88
+ z(B(l.value), 1)
89
89
  ])
90
- ])) : i("", !0),
91
- a.deletable ? (l(), d(S, {
90
+ ])) : c("", !0),
91
+ r.deletable ? (o(), f(S, {
92
92
  key: 1,
93
93
  variant: "ghost",
94
94
  size: "xs",
95
95
  rounded: "full",
96
- disabled: a.disabled,
97
- class: o(["ml-auto p-0.5! h-auto! w-auto! hover:bg-[#8282823c]", [a.text ? a.size === "small" ? "-mr-0.5" : "-mr-1" : ""]]),
98
- onClick: v
96
+ disabled: r.disabled,
97
+ class: i(["ml-auto p-0.5! h-auto! w-auto! hover:bg-[#8282823c]", [l.value ? r.size === "small" ? "-mr-0.5" : "-mr-1" : ""]]),
98
+ onClick: m
99
99
  }, {
100
- default: B(() => [
101
- D(f, {
100
+ default: D(() => [
101
+ I(b, {
102
102
  icon: "lucide:x",
103
- class: o(y.value)
103
+ class: i(w.value)
104
104
  }, null, 8, ["class"])
105
105
  ]),
106
106
  _: 1
107
- }, 8, ["disabled", "class"])) : i("", !0)
108
- ], 42, N));
107
+ }, 8, ["disabled", "class"])) : c("", !0)
108
+ ], 42, V));
109
109
  }
110
110
  });
111
111
  export {
112
- H as default
112
+ q as default
113
113
  };
@@ -2,6 +2,7 @@ export type ChipVariant = 'solid' | 'outline' | 'subtle' | 'ghost' | 'secondary'
2
2
  export type ChipSize = 'small' | 'medium' | 'large';
3
3
  export interface ChipProps {
4
4
  text?: string;
5
+ textI18n?: string;
5
6
  icon?: string;
6
7
  variant?: ChipVariant;
7
8
  size?: ChipSize;
@@ -1,17 +1,22 @@
1
1
  export interface ChoiceBoxOption {
2
2
  id: string | number;
3
3
  title: string;
4
+ titleI18n?: string;
4
5
  description?: string;
6
+ descriptionI18n?: string;
5
7
  icon?: string;
6
8
  disabled?: boolean;
7
9
  badge?: string;
10
+ badgeI18n?: string;
8
11
  }
9
12
  interface Props {
10
13
  modelValue?: string | number | (string | number)[] | null;
11
14
  options: ChoiceBoxOption[];
12
15
  multiple?: boolean;
13
16
  title?: string;
17
+ titleI18n?: string;
14
18
  description?: string;
19
+ descriptionI18n?: string;
15
20
  disabled?: boolean;
16
21
  grid?: number;
17
22
  gap?: number;
@@ -1,48 +1,51 @@
1
- import { defineComponent as w, computed as x, openBlock as t, createElementBlock as i, toDisplayString as o, createCommentVNode as a, createElementVNode as c, normalizeClass as u, Fragment as V, renderList as _, withKeys as C, withModifiers as B, createVNode as A, createBlock as y } from "vue";
2
- import m from "../Icon.vue.js";
3
- const K = { class: "w-full" }, N = {
1
+ import { defineComponent as O, computed as m, openBlock as r, createElementBlock as i, toDisplayString as c, createCommentVNode as n, createElementVNode as a, normalizeClass as o, Fragment as A, renderList as $, withKeys as D, withModifiers as K, createVNode as N, createBlock as v } from "vue";
2
+ import y from "../Icon.vue.js";
3
+ import { $t as u } from "../../utils/i18n.js";
4
+ const E = { class: "w-full" }, S = {
4
5
  key: 0,
5
6
  class: "mb-4"
6
- }, $ = {
7
+ }, T = {
7
8
  key: 0,
8
9
  class: "text-base font-semibold text-foreground"
9
- }, E = {
10
+ }, j = {
10
11
  key: 1,
11
12
  class: "text-sm text-muted-foreground mt-1"
12
- }, O = ["onClick", "onKeydown"], S = { class: "flex flex-1 gap-3" }, j = {
13
+ }, q = ["onClick", "onKeydown"], z = { class: "flex flex-1 gap-3" }, F = {
13
14
  key: 0,
14
15
  class: "shrink-0 pt-0.5"
15
- }, q = { class: "flex flex-col" }, z = { class: "flex items-center gap-2" }, D = {
16
+ }, L = { class: "flex flex-col" }, M = { class: "flex items-center gap-2" }, G = {
16
17
  key: 0,
17
18
  class: "mt-1 -text-fs-3 text-muted leading-relaxed"
18
- }, F = {
19
+ }, H = {
19
20
  key: 0,
20
21
  class: "absolute top-4 right-4 text-primary"
21
- }, G = /* @__PURE__ */ w({
22
+ }, R = /* @__PURE__ */ O({
22
23
  __name: "ChoiceBox",
23
24
  props: {
24
25
  modelValue: { default: void 0 },
25
26
  options: {},
26
27
  multiple: { type: Boolean, default: !1 },
27
28
  title: {},
29
+ titleI18n: {},
28
30
  description: {},
31
+ descriptionI18n: {},
29
32
  disabled: { type: Boolean, default: !1 },
30
33
  grid: { default: 1 },
31
34
  gap: { default: 4 }
32
35
  },
33
36
  emits: ["update:modelValue", "change"],
34
- setup(s, { emit: h }) {
35
- const r = s, g = h, n = (l) => Array.isArray(r.modelValue) ? r.modelValue.includes(l) : r.modelValue === l, f = (l) => {
36
- if (r.disabled || r.options.find((d) => d.id === l)?.disabled) return;
37
+ setup(g, { emit: _ }) {
38
+ const s = g, x = _, f = m(() => s.titleI18n ? u(s.titleI18n) : s.title), p = m(() => s.descriptionI18n ? u(s.descriptionI18n) : s.description), k = (t) => t.titleI18n ? u(t.titleI18n) : t.title, I = (t) => t.descriptionI18n ? u(t.descriptionI18n) : t.description, w = (t) => t.badgeI18n ? u(t.badgeI18n) : t.badge, d = (t) => Array.isArray(s.modelValue) ? s.modelValue.includes(t) : s.modelValue === t, b = (t) => {
39
+ if (s.disabled || s.options.find((l) => l.id === t)?.disabled) return;
37
40
  let e;
38
- if (r.multiple) {
39
- const d = Array.isArray(r.modelValue) ? [...r.modelValue] : [], p = d.indexOf(l);
40
- p === -1 ? d.push(l) : d.splice(p, 1), e = d;
41
+ if (s.multiple) {
42
+ const l = Array.isArray(s.modelValue) ? [...s.modelValue] : [], h = l.indexOf(t);
43
+ h === -1 ? l.push(t) : l.splice(h, 1), e = l;
41
44
  } else
42
- e = l;
43
- g("update:modelValue", e), g("change", e);
44
- }, b = x(() => {
45
- switch (r.grid) {
45
+ e = t;
46
+ x("update:modelValue", e), x("change", e);
47
+ }, V = m(() => {
48
+ switch (s.grid) {
46
49
  case 1:
47
50
  return "grid-cols-1";
48
51
  case 2:
@@ -54,8 +57,8 @@ const K = { class: "w-full" }, N = {
54
57
  default:
55
58
  return "grid-cols-1";
56
59
  }
57
- }), v = x(() => {
58
- switch (r.gap) {
60
+ }), C = m(() => {
61
+ switch (s.gap) {
59
62
  case 2:
60
63
  return "gap-2";
61
64
  case 3:
@@ -70,72 +73,72 @@ const K = { class: "w-full" }, N = {
70
73
  return "gap-4";
71
74
  }
72
75
  });
73
- return (l, k) => (t(), i("div", K, [
74
- s.title || s.description ? (t(), i("div", N, [
75
- s.title ? (t(), i("h3", $, o(s.title), 1)) : a("", !0),
76
- s.description ? (t(), i("p", E, o(s.description), 1)) : a("", !0)
77
- ])) : a("", !0),
78
- c("div", {
79
- class: u(["grid", [b.value, v.value]])
76
+ return (t, B) => (r(), i("div", E, [
77
+ f.value || p.value ? (r(), i("div", S, [
78
+ f.value ? (r(), i("h3", T, c(f.value), 1)) : n("", !0),
79
+ p.value ? (r(), i("p", j, c(p.value), 1)) : n("", !0)
80
+ ])) : n("", !0),
81
+ a("div", {
82
+ class: o(["grid", [V.value, C.value]])
80
83
  }, [
81
- (t(!0), i(V, null, _(s.options, (e) => (t(), i("div", {
84
+ (r(!0), i(A, null, $(g.options, (e) => (r(), i("div", {
82
85
  key: e.id,
83
- class: u(["relative flex cursor-pointer rounded-xl border border-border p-4 transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", [
84
- n(e.id) ? "border-primary bg-accent" : "bg-card hover:border-primary/50 hover:bg-accent",
85
- s.disabled || e.disabled ? "opacity-50 cursor-not-allowed grayscale" : ""
86
+ class: o(["relative flex cursor-pointer rounded-xl border border-border p-4 transition-all duration-200 outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", [
87
+ d(e.id) ? "border-primary bg-accent" : "bg-card hover:border-primary/50 hover:bg-accent",
88
+ g.disabled || e.disabled ? "opacity-50 cursor-not-allowed grayscale" : ""
86
89
  ]]),
87
- onClick: (d) => f(e.id),
90
+ onClick: (l) => b(e.id),
88
91
  tabindex: "0",
89
- onKeydown: C(B((d) => f(e.id), ["prevent"]), ["enter", "space"])
92
+ onKeydown: D(K((l) => b(e.id), ["prevent"]), ["enter", "space"])
90
93
  }, [
91
- c("div", S, [
92
- e.icon ? (t(), i("div", j, [
93
- c("div", {
94
- class: u([
94
+ a("div", z, [
95
+ e.icon ? (r(), i("div", F, [
96
+ a("div", {
97
+ class: o([
95
98
  "flex h-10 w-10 items-center justify-center rounded-full transition-colors",
96
- n(e.id) ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
99
+ d(e.id) ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
97
100
  ])
98
101
  }, [
99
- A(m, {
102
+ N(y, {
100
103
  icon: e.icon,
101
104
  class: "h-5 w-5"
102
105
  }, null, 8, ["icon"])
103
106
  ], 2)
104
- ])) : a("", !0),
105
- c("div", q, [
106
- c("div", z, [
107
- c("span", {
108
- class: u(["font-semibold text-foreground text-fs-1", {
109
- "text-primary": n(e.id)
107
+ ])) : n("", !0),
108
+ a("div", L, [
109
+ a("div", M, [
110
+ a("span", {
111
+ class: o(["font-semibold text-foreground text-fs-1", {
112
+ "text-primary": d(e.id)
110
113
  }])
111
- }, o(e.title), 3),
112
- e.badge ? (t(), i("span", {
114
+ }, c(k(e)), 3),
115
+ e.badge || e.badgeI18n ? (r(), i("span", {
113
116
  key: 0,
114
- class: u([
117
+ class: o([
115
118
  "inline-flex items-center rounded-full px-2 py-0.5 text-xs font-medium",
116
- n(e.id) ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"
119
+ d(e.id) ? "bg-primary text-primary-foreground" : "bg-muted text-muted-foreground"
117
120
  ])
118
- }, o(e.badge), 3)) : a("", !0)
121
+ }, c(w(e)), 3)) : n("", !0)
119
122
  ]),
120
- e.description ? (t(), i("span", D, o(e.description), 1)) : a("", !0)
123
+ e.description || e.descriptionI18n ? (r(), i("span", G, c(I(e)), 1)) : n("", !0)
121
124
  ])
122
125
  ]),
123
- n(e.id) ? (t(), i("div", F, [
124
- s.multiple ? (t(), y(m, {
126
+ d(e.id) ? (r(), i("div", H, [
127
+ g.multiple ? (r(), v(y, {
125
128
  key: 0,
126
129
  icon: "lucide:check-square",
127
130
  class: "h-5 w-5"
128
- })) : (t(), y(m, {
131
+ })) : (r(), v(y, {
129
132
  key: 1,
130
133
  icon: "lucide:check-circle-2",
131
134
  class: "h-5 w-5"
132
135
  }))
133
- ])) : a("", !0)
134
- ], 42, O))), 128))
136
+ ])) : n("", !0)
137
+ ], 42, q))), 128))
135
138
  ], 2)
136
139
  ]));
137
140
  }
138
141
  });
139
142
  export {
140
- G as default
143
+ R as default
141
144
  };
@@ -2,6 +2,7 @@ import { defineComponent as z, ref as p, watch as i, openBlock as a, createBlock
2
2
  import B from "../Dropdown/Dropdown.vue.js";
3
3
  import "@iconify/vue";
4
4
  import O from "../Input.vue.js";
5
+ import "../../core/config.js";
5
6
  import y from "../Button.vue.js";
6
7
  import E from "./ColorIro.vue.js";
7
8
  /* empty css */
@@ -12,7 +13,7 @@ const I = {
12
13
  }, N = {
13
14
  key: 0,
14
15
  class: "flex items-center gap-1.5 w-full"
15
- }, D = { class: "w-32" }, q = /* @__PURE__ */ z({
16
+ }, D = { class: "w-32" }, J = /* @__PURE__ */ z({
16
17
  __name: "ColorPicker",
17
18
  props: {
18
19
  modelValue: { default: "#000000" },
@@ -107,5 +108,5 @@ const I = {
107
108
  }
108
109
  });
109
110
  export {
110
- q as default
111
+ J as default
111
112
  };
@@ -1,10 +1,14 @@
1
1
  interface Props {
2
2
  show?: boolean;
3
3
  title: string;
4
+ titleI18n?: string;
4
5
  description: string;
6
+ descriptionI18n?: string;
5
7
  loading?: boolean;
6
8
  confirmText?: string;
9
+ confirmTextI18n?: string;
7
10
  cancelText?: string;
11
+ cancelTextI18n?: string;
8
12
  variant?: 'danger' | 'primary' | 'warning' | 'success' | 'info';
9
13
  }
10
14
  declare function __VLS_template(): {
@@ -27,8 +31,6 @@ declare const __VLS_component: import('vue').DefineComponent<Props, {}, {}, {},
27
31
  variant: "danger" | "primary" | "warning" | "success" | "info";
28
32
  loading: boolean;
29
33
  show: boolean;
30
- confirmText: string;
31
- cancelText: string;
32
34
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
33
35
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
34
36
  export default _default;