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,147 +1,152 @@
1
- import { ref as v, computed as K, watch as L } from "vue";
2
- import { initializeFormValues as B, deepClone as m, cleanSubmitValues as Q, getNestedValue as M, evaluateConditional as w, setNestedValue as x, collectFileFields as W, filterNullCustomFields as X } from "../utils/form.utils.js";
1
+ import { ref as p, computed as J, watch as K } from "vue";
2
+ import { initializeFormValues as B, deepClone as m, cleanSubmitValues as Q, getNestedValue as M, evaluateConditional as x, setNestedValue as h, collectFileFields as W, filterNullCustomFields as X } from "../utils/form.utils.js";
3
3
  import { useFileUpload as Y } from "./useFileUpload.js";
4
- function te(b) {
5
- const { schema: o, values: U, isUpdate: F = !1, folderId: g, onSubmit: j } = b, { handleUploadFile: E } = Y(), t = v(B(o, U)), u = v({}), h = v(!1), d = v(!1), V = v(m(t.value)), y = K(() => o ? Array.isArray(o[0]) ? o.flat() : o : []);
6
- L(
4
+ import { $t as Z } from "../../../utils/i18n.js";
5
+ function re(V) {
6
+ const { schema: u, values: U, isUpdate: F = !1, folderId: j, onSubmit: E } = V, { handleUploadFile: C } = Y(), i = p(B(u, U)), c = p({}), S = p(!1), d = p(!1), A = p(m(i.value)), y = J(() => u ? Array.isArray(u[0]) ? u.flat() : u : []);
7
+ K(
7
8
  () => U,
8
9
  (e) => {
9
- e && (t.value = B(o, e), V.value = m(t.value), d.value = !1);
10
+ e && (i.value = B(u, e), A.value = m(i.value), d.value = !1);
10
11
  },
11
12
  { deep: !0 }
12
13
  );
13
- const S = () => ({
14
- values: t.value,
14
+ const z = () => ({
15
+ values: i.value,
15
16
  isUpdate: F
16
- }), C = (e) => M(t.value, e), T = (e) => u.value[e] || "", N = (e, l) => {
17
- l ? u.value[e] = l : delete u.value[e];
18
- }, A = () => {
19
- u.value = {};
20
- }, O = (e) => e.when ? w(e.when, S()) : !0, D = (e) => w(e.disabled, S()), I = (e) => w(e.readonly, S()), P = (e) => {
21
- const l = C(e.name);
17
+ }), N = (e) => M(i.value, e), T = (e) => c.value[e] || "", O = (e, l) => {
18
+ l ? c.value[e] = l : delete c.value[e];
19
+ }, w = () => {
20
+ c.value = {};
21
+ }, $ = (e) => e.when ? x(e.when, z()) : !0, D = (e) => x(e.disabled, z()), L = (e) => x(e.readonly, z()), P = (e) => {
22
+ const l = N(e.name);
22
23
  let a = "";
23
- if (e.required && (l == null || l === "" || Array.isArray(l) && l.length === 0) && (a = `${e.label || e.name} is required`), !a && e.maxFileSize) {
24
- const i = e.maxFileSize * 1024 * 1024;
24
+ const o = e.labelI18n ? Z(e.labelI18n) : typeof e.label == "string" ? e.label : e.name;
25
+ if (e.required && (l == null || l === "" || Array.isArray(l) && l.length === 0) && (a = `${o} is required`), !a && e.maxFileSize) {
26
+ const r = e.maxFileSize * 1024 * 1024;
25
27
  if (l != null && l !== "") {
26
- const n = Array.isArray(l) ? l : [l];
27
- for (const s of n) {
28
- const c = s instanceof File ? s.size : s?.fileSize || s?.file?.size || s?.size;
29
- if (c !== void 0 && c > i) {
30
- a = `${e.label || e.name} size must be less than ${e.maxFileSize}MB`;
28
+ const t = Array.isArray(l) ? l : [l];
29
+ for (const n of t) {
30
+ const s = n instanceof File ? n.size : n?.fileSize || n?.file?.size || n?.size;
31
+ if (s !== void 0 && s > r) {
32
+ a = `${o} size must be less than ${e.maxFileSize}MB`;
31
33
  break;
32
34
  }
33
35
  }
34
36
  }
35
37
  }
36
38
  if (!a && (e.type === "file" || e.type === "fileUploader") && (e.props?.multiple || e.maxFiles)) {
37
- const i = e.maxFiles || e.props?.maxFiles;
38
- i && Array.isArray(l) && l.length > i && (a = `Maximum ${i} files allowed`);
39
+ const r = e.maxFiles || e.props?.maxFiles;
40
+ r && Array.isArray(l) && l.length > r && (a = `Maximum ${r} files allowed`);
39
41
  }
40
42
  return !a && e.validation && (a = e.validation({
41
43
  value: l,
42
- values: t.value,
44
+ values: i.value,
43
45
  isUpdate: F
44
- })), a ? u.value[e.name] = a : delete u.value[e.name], a;
45
- }, $ = () => {
46
- A();
46
+ })), a ? c.value[e.name] = a : delete c.value[e.name], a;
47
+ }, I = () => {
48
+ w();
47
49
  let e = !0;
48
50
  for (const l of y.value) {
49
- if (!O(l) || D(l)) continue;
51
+ if (!$(l) || D(l)) continue;
50
52
  P(l) && (e = !1);
51
53
  }
52
54
  return e;
53
55
  }, R = (e, l, a) => {
54
- t.value = x(t.value, e, l), d.value = !0, delete u.value[e];
55
- const i = y.value.find((n) => n.name === e);
56
- if (i?.updateValues) {
57
- const n = i.updateValues({
58
- values: t.value,
56
+ i.value = h(i.value, e, l), d.value = !0, delete c.value[e];
57
+ const o = y.value.find((r) => r.name === e);
58
+ if (o?.updateValues) {
59
+ const r = o.updateValues({
60
+ values: i.value,
59
61
  data: a,
60
62
  isUpdate: F,
61
- updateError: N
63
+ updateError: O
62
64
  });
63
- n && typeof n == "object" && (t.value = { ...t.value, ...n });
65
+ r && typeof r == "object" && (i.value = { ...i.value, ...r });
64
66
  }
65
67
  }, G = async () => {
66
- const e = m(t.value), l = W(o, e), a = (s, c) => {
67
- let r = null;
68
- return s instanceof File ? r = s : s && typeof s == "object" && s.file instanceof File && (r = s.file), {
69
- fileName: s?.fileName || r?.name || c.split("/").pop() || "unknown",
70
- fileUrl: c,
71
- fileType: s?.fileType || r?.type || "application/octet-stream",
72
- fileSize: s?.fileSize || r?.size || 0
68
+ const e = m(i.value), l = W(u, e), a = (t, n) => {
69
+ let s = null;
70
+ t instanceof File ? s = t : t && typeof t == "object" && t.file instanceof File && (s = t.file);
71
+ const b = {
72
+ ...typeof t == "object" ? t : {},
73
+ fileName: t?.fileName || s?.name || n.split("/").pop() || "unknown",
74
+ fileUrl: n,
75
+ fileType: t?.fileType || s?.type || "application/octet-stream",
76
+ fileSize: t?.fileSize || s?.size || 0
73
77
  };
74
- }, i = l.map(async (s) => {
75
- const { name: c, value: r, field: J } = s, k = J.returnFileObject === !0;
76
- if (Array.isArray(r)) {
77
- const q = r.map(async (f) => {
78
+ return delete b.file, b;
79
+ }, o = l.map(async (t) => {
80
+ const { name: n, value: s, field: b } = t, k = b.returnFileObject === !0;
81
+ if (Array.isArray(s)) {
82
+ const q = s.map(async (f) => {
78
83
  if (f instanceof File || f && typeof f == "object" && f.file instanceof File) {
79
- const z = await E(f, g);
80
- return z ? k ? a(f, z) : z : null;
84
+ const g = await C(f, j);
85
+ return g ? k ? a(f, g) : g : null;
81
86
  }
82
87
  return f;
83
- }), p = await Promise.all(q);
84
- return { name: c, value: p };
88
+ }), v = await Promise.all(q);
89
+ return { name: n, value: v };
85
90
  } else {
86
- if (r instanceof File || r && typeof r == "object" && r.file instanceof File) {
87
- const p = await E(r, g);
88
- if (p)
89
- return { name: c, value: k ? a(r, p) : p };
91
+ if (s instanceof File || s && typeof s == "object" && s.file instanceof File) {
92
+ const v = await C(s, j);
93
+ if (v)
94
+ return { name: n, value: k ? a(s, v) : v };
90
95
  }
91
96
  return null;
92
97
  }
93
98
  });
94
- return (await Promise.all(i)).forEach((s) => {
95
- s && Object.assign(e, x(e, s.name, s.value));
99
+ return (await Promise.all(o)).forEach((t) => {
100
+ t && (Object.assign(e, h(e, t.name, t.value)), i.value = h(i.value, t.name, t.value));
96
101
  }), e;
97
102
  }, H = (e) => {
98
103
  const l = { ...e };
99
104
  for (const a of y.value)
100
105
  if (a.type === "customFields" && a.props?.schema) {
101
- const i = M(l, a.name);
102
- if (Array.isArray(i)) {
103
- const n = X(i, a.props.schema);
104
- Object.assign(l, x(l, a.name, n));
106
+ const o = M(l, a.name);
107
+ if (Array.isArray(o)) {
108
+ const r = X(o, a.props.schema);
109
+ Object.assign(l, h(l, a.name, r));
105
110
  }
106
111
  }
107
112
  return l;
108
113
  };
109
114
  return {
110
- formValues: t,
111
- errors: u,
112
- isSubmitting: h,
115
+ formValues: i,
116
+ errors: c,
117
+ isSubmitting: S,
113
118
  isDirty: d,
114
119
  handleFieldChange: R,
115
120
  validateField: P,
116
- validateAll: $,
117
- isFieldVisible: O,
121
+ validateAll: I,
122
+ isFieldVisible: $,
118
123
  isFieldDisabled: D,
119
- isFieldReadonly: I,
120
- getFieldValue: C,
124
+ isFieldReadonly: L,
125
+ getFieldValue: N,
121
126
  getFieldError: T,
122
- setFieldError: N,
123
- clearErrors: A,
127
+ setFieldError: O,
128
+ clearErrors: w,
124
129
  resetForm: () => {
125
- t.value = m(V.value), A(), d.value = !1;
130
+ i.value = m(A.value), w(), d.value = !1;
126
131
  },
127
132
  handleSubmit: async () => {
128
- if ($()) {
129
- h.value = !0;
133
+ if (I()) {
134
+ S.value = !0;
130
135
  try {
131
136
  let l = await G();
132
137
  l = H(l), l = Q(
133
138
  l,
134
- o,
135
- b.emitFields,
136
- b.emitFields
137
- ), j && await j({
139
+ u,
140
+ V.emitFields,
141
+ V.emitFields
142
+ ), E && await E({
138
143
  values: l,
139
144
  isUpdate: F
140
- }), d.value = !1, V.value = m(l);
145
+ }), d.value = !1, A.value = m(l);
141
146
  } catch (l) {
142
147
  throw console.error("[useForm] Submit error:", l), l;
143
148
  } finally {
144
- h.value = !1;
149
+ S.value = !1;
145
150
  }
146
151
  }
147
152
  },
@@ -149,5 +154,5 @@ function te(b) {
149
154
  };
150
155
  }
151
156
  export {
152
- te as useForm
157
+ re as useForm
153
158
  };
@@ -85,8 +85,12 @@ export interface IForm {
85
85
  transform?: (value: any, formValues: Record<string, any>) => any;
86
86
  /** Field label - can be string or Vue component */
87
87
  label?: string | Component;
88
+ /** I18n translation key for the label */
89
+ labelI18n?: string;
88
90
  /** Placeholder text */
89
91
  placeholder?: string;
92
+ /** I18n translation key for the placeholder */
93
+ placeholderI18n?: string;
90
94
  /** Field type - determines which component renders */
91
95
  type?: IFormFieldType;
92
96
  /** Initial/default value - can be static or function */
@@ -1,5 +1,6 @@
1
1
  export interface GoogleLoginProps {
2
2
  buttonText?: string;
3
+ buttonTextI18n?: string;
3
4
  btnClass?: string;
4
5
  variant?: any;
5
6
  size?: any;
@@ -30,7 +31,6 @@ declare const __VLS_component: import('vue').DefineComponent<GoogleLoginProps, {
30
31
  size: any;
31
32
  variant: any;
32
33
  rounded: any;
33
- buttonText: string;
34
34
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
35
35
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
36
36
  export default _default;
@@ -1,10 +1,12 @@
1
- import { defineComponent as d, ref as u, openBlock as c, createElementBlock as f, renderSlot as m, createVNode as g, normalizeClass as v, unref as b, withCtx as C, createElementVNode as h, toDisplayString as k } from "vue";
1
+ import { defineComponent as c, ref as f, computed as g, openBlock as m, createElementBlock as b, renderSlot as v, createVNode as x, normalizeClass as T, unref as p, withCtx as C, createElementVNode as h, toDisplayString as k } from "vue";
2
2
  import { useTokenClient as w } from "vue3-google-signin";
3
- import z from "./Button.vue.js";
4
- const x = { class: "google-login-wrapper inline-block w-full" }, y = { class: "font-medium" }, T = /* @__PURE__ */ d({
3
+ import y from "./Button.vue.js";
4
+ import { $t as i } from "../utils/i18n.js";
5
+ const z = { class: "google-login-wrapper inline-block w-full" }, L = { class: "font-medium" }, G = /* @__PURE__ */ c({
5
6
  __name: "GoogleLogin",
6
7
  props: {
7
- buttonText: { default: "Sign in with Google" },
8
+ buttonText: {},
9
+ buttonTextI18n: {},
8
10
  btnClass: {},
9
11
  variant: { default: "outline" },
10
12
  size: { default: "md" },
@@ -12,42 +14,47 @@ const x = { class: "google-login-wrapper inline-block w-full" }, y = { class: "f
12
14
  disabled: { type: Boolean, default: !1 }
13
15
  },
14
16
  emits: ["success", "error"],
15
- setup(e, { emit: n }) {
16
- const s = e, a = n, l = u(!1), { login: i, isReady: r } = w({
17
- onSuccess: (o) => {
18
- l.value = !1, a("success", o);
17
+ setup(o, { emit: s }) {
18
+ const n = o, l = s, t = f(!1), { login: r, isReady: u } = w({
19
+ onSuccess: (e) => {
20
+ t.value = !1, l("success", e);
19
21
  },
20
- onError: (o) => {
21
- l.value = !1, a("error", o);
22
+ onError: (e) => {
23
+ t.value = !1, l("error", e);
22
24
  }
23
- }), t = () => {
24
- if (!(s.disabled || l.value)) {
25
- l.value = !0;
25
+ }), a = () => {
26
+ if (!(n.disabled || t.value)) {
27
+ t.value = !0;
26
28
  try {
27
- i();
28
- } catch (o) {
29
- l.value = !1, a("error", o);
29
+ r();
30
+ } catch (e) {
31
+ t.value = !1, l("error", e);
30
32
  }
31
33
  }
32
- };
33
- return (o, S) => (c(), f("div", x, [
34
- m(o.$slots, "default", {
35
- login: t,
36
- loading: l.value,
37
- disabled: e.disabled
34
+ }, d = g(() => {
35
+ if (n.buttonTextI18n) return i(n.buttonTextI18n);
36
+ if (n.buttonText) return n.buttonText;
37
+ const e = i("vlite.googleLogin.buttonText");
38
+ return e !== "vlite.googleLogin.buttonText" ? e : "Sign in with Google";
39
+ });
40
+ return (e, B) => (m(), b("div", z, [
41
+ v(e.$slots, "default", {
42
+ login: a,
43
+ loading: t.value,
44
+ disabled: o.disabled
38
45
  }, () => [
39
- g(z, {
40
- variant: e.variant,
41
- size: e.size,
42
- rounded: e.rounded,
43
- disabled: !b(r) || e.disabled || l.value,
44
- loading: l.value,
45
- class: v([e.btnClass, "w-full"]),
46
+ x(y, {
47
+ variant: o.variant,
48
+ size: o.size,
49
+ rounded: o.rounded,
50
+ disabled: !p(u) || o.disabled || t.value,
51
+ loading: t.value,
52
+ class: T([o.btnClass, "w-full"]),
46
53
  icon: "flat-color-icons:google",
47
- onClick: t
54
+ onClick: a
48
55
  }, {
49
56
  default: C(() => [
50
- h("span", y, k(e.buttonText), 1)
57
+ h("span", L, k(d.value), 1)
51
58
  ]),
52
59
  _: 1
53
60
  }, 8, ["variant", "size", "rounded", "disabled", "loading", "class"])
@@ -56,5 +63,5 @@ const x = { class: "google-login-wrapper inline-block w-full" }, y = { class: "f
56
63
  }
57
64
  });
58
65
  export {
59
- T as default
66
+ G as default
60
67
  };
@@ -1,6 +1,7 @@
1
1
  import { defineComponent as te, ref as p, computed as c, onMounted as ae, nextTick as U, onUnmounted as le, watch as oe, openBlock as d, createElementBlock as m, normalizeClass as z, createElementVNode as b, normalizeStyle as k, Fragment as E, renderList as W, createBlock as ne, withCtx as se, toDisplayString as j, createCommentVNode as I } from "vue";
2
2
  import ie from "../Tooltip.vue.js";
3
3
  import { debounce as re } from "../../utils/functions.js";
4
+ import "../../core/config.js";
4
5
  const ue = ["onClick", "onMouseenter"], ce = {
5
6
  key: 0,
6
7
  class: "heatmap-cell-label"
@@ -10,7 +11,7 @@ const ue = ["onClick", "onMouseenter"], ce = {
10
11
  }, ve = {
11
12
  key: 0,
12
13
  class: "heatmap-legend"
13
- }, me = { class: "heatmap-legend-colors" }, ge = ["title"], ye = /* @__PURE__ */ te({
14
+ }, me = { class: "heatmap-legend-colors" }, ge = ["title"], xe = /* @__PURE__ */ te({
14
15
  __name: "Heatmap",
15
16
  props: {
16
17
  data: {},
@@ -322,5 +323,5 @@ const ue = ["onClick", "onMouseenter"], ce = {
322
323
  }
323
324
  });
324
325
  export {
325
- ye as default
326
+ xe as default
326
327
  };
@@ -4,6 +4,8 @@ interface Props {
4
4
  btnProps?: ButtonProps;
5
5
  value?: string;
6
6
  position?: TooltTipPlacement;
7
+ placeholder?: string;
8
+ placeholderI18n?: string;
7
9
  }
8
10
  declare function __VLS_template(): {
9
11
  attrs: Partial<{}>;
@@ -1,23 +1,31 @@
1
- import { defineComponent as p, ref as f, openBlock as b, createBlock as g, unref as n, withCtx as a, renderSlot as l, createVNode as s, mergeProps as v } from "vue";
2
- import w from "./Dropdown/Dropdown.vue.js";
1
+ import { defineComponent as g, ref as v, computed as w, openBlock as k, createBlock as y, unref as a, withCtx as n, renderSlot as c, createVNode as s, mergeProps as P } from "vue";
2
+ import $ from "./Dropdown/Dropdown.vue.js";
3
3
  import "@iconify/vue";
4
- import y from "./Button.vue.js";
5
- import k from "iconify-icon-picker";
4
+ import { $t as d } from "../utils/i18n.js";
5
+ import C from "./Button.vue.js";
6
+ import I from "iconify-icon-picker";
6
7
  import "iconify-icon-picker/style.css";
7
- const O = /* @__PURE__ */ p({
8
+ const z = /* @__PURE__ */ g({
8
9
  __name: "IconPicker",
9
10
  props: {
10
11
  btnProps: {},
11
12
  value: { default: "tabler:icons-filled" },
12
- position: { default: "bottom" }
13
+ position: { default: "bottom" },
14
+ placeholder: {},
15
+ placeholderI18n: {}
13
16
  },
14
17
  emits: ["onSelect", "onTrigger", "onClose"],
15
- setup(r, { emit: c }) {
16
- const t = c, m = f(!1), i = () => {
18
+ setup(o, { emit: u }) {
19
+ const t = o, i = u, m = v(!1), l = () => {
17
20
  m.value = !1;
18
- }, d = (o, e) => {
19
- t("onSelect", o, e), i();
20
- }, u = [
21
+ }, h = (e, r) => {
22
+ i("onSelect", e, r), l();
23
+ }, p = w(() => {
24
+ if (t.placeholderI18n) return d(t.placeholderI18n);
25
+ if (t.placeholder) return t.placeholder;
26
+ const e = d("vlite.iconPicker.search");
27
+ return e !== "vlite.iconPicker.search" ? e : "Search 1000+ icons...";
28
+ }), f = [
21
29
  "ri:alert-line",
22
30
  "heroicons:arrow-right",
23
31
  "lucide:arrow-left",
@@ -87,38 +95,38 @@ const O = /* @__PURE__ */ p({
87
95
  "tabler:ruler-2",
88
96
  "material-symbols:download-rounded"
89
97
  ];
90
- return (o, e) => (b(), g(n(w), {
98
+ return (e, r) => (k(), y(a($), {
91
99
  className: "max-h-[392px]! min-w-[250px]",
92
- onOnClose: e[1] || (e[1] = (h) => t("onClose")),
93
- position: r.position
100
+ onOnClose: r[1] || (r[1] = (b) => i("onClose")),
101
+ position: o.position
94
102
  }, {
95
- trigger: a(() => [
96
- l(o.$slots, "default", {}, () => [
97
- s(y, v({
98
- icon: r.value,
103
+ trigger: n(() => [
104
+ c(e.$slots, "default", {}, () => [
105
+ s(C, P({
106
+ icon: o.value,
99
107
  rounded: "md",
100
108
  variant: "outline",
101
- ...r.btnProps || {}
109
+ ...o.btnProps || {}
102
110
  }, {
103
- onClick: e[0] || (e[0] = (h) => t("onTrigger"))
111
+ onClick: r[0] || (r[0] = (b) => i("onTrigger"))
104
112
  }), null, 16)
105
113
  ])
106
114
  ]),
107
- menu: a(() => [
108
- l(o.$slots, "menu-top", { close: i }),
109
- s(n(k), {
115
+ menu: n(() => [
116
+ c(e.$slots, "menu-top", { close: l }),
117
+ s(a(I), {
110
118
  id: "icon-picker",
111
- placeholder: "Search 1000+ icons...",
119
+ placeholder: p.value,
112
120
  "items-per-page": 35,
113
- value: r.value,
114
- onOnSelect: d,
115
- defaultIcons: u
116
- }, null, 8, ["value"])
121
+ value: o.value,
122
+ onOnSelect: h,
123
+ defaultIcons: f
124
+ }, null, 8, ["placeholder", "value"])
117
125
  ]),
118
126
  _: 3
119
127
  }, 8, ["position"]));
120
128
  }
121
129
  });
122
130
  export {
123
- O as default
131
+ z as default
124
132
  };
@@ -32,8 +32,8 @@ declare const __VLS_component: import('vue').DefineComponent<InputProps, {}, {},
32
32
  size: InputSize;
33
33
  variant: InputVariant;
34
34
  modelValue: string | number;
35
- loading: boolean;
36
35
  rounded: InputRounded;
36
+ loading: boolean;
37
37
  rows: number;
38
38
  showClearButton: boolean;
39
39
  autofocus: boolean;