@yuno-payments/dashboard-design-system 2.2.0 → 2.2.1-beta.2

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 (54) hide show
  1. package/dist/components/atoms/checkbox/checkbox.js +16 -16
  2. package/dist/components/atoms/filter/filter-date-range.d.ts +31 -1
  3. package/dist/components/atoms/filter/filter-date-range.js +140 -144
  4. package/dist/components/atoms/filter/filter-multi-input.d.ts +11 -0
  5. package/dist/components/atoms/filter/filter-multi-input.js +42 -36
  6. package/dist/components/atoms/filter/filter-translations.d.ts +75 -0
  7. package/dist/components/atoms/filter/filter-translations.js +450 -0
  8. package/dist/components/atoms/filter/filter.d.ts +30 -0
  9. package/dist/components/atoms/filter/filter.js +191 -171
  10. package/dist/components/atoms/filter/index.d.ts +2 -2
  11. package/dist/components/atoms/filter-dropdown/filter-dropdown.d.ts +17 -2
  12. package/dist/components/atoms/filter-dropdown/filter-dropdown.js +160 -151
  13. package/dist/components/atoms/icon/directional-icons.d.ts +12 -0
  14. package/dist/components/atoms/icon/directional-icons.js +38 -0
  15. package/dist/components/atoms/icon/icon.d.ts +6 -0
  16. package/dist/components/atoms/icon/icon.js +27 -21
  17. package/dist/components/atoms/icon/index.d.ts +1 -0
  18. package/dist/components/atoms/index.d.ts +1 -1
  19. package/dist/components/atoms/radio-group/radio-group-option.js +2 -2
  20. package/dist/components/atoms/select/select.js +2 -2
  21. package/dist/components/molecules/dialog-header/dialog-header.d.ts +1 -1
  22. package/dist/components/molecules/pagination/index.d.ts +1 -0
  23. package/dist/components/molecules/pagination/page-numbers.d.ts +3 -1
  24. package/dist/components/molecules/pagination/page-numbers.js +10 -9
  25. package/dist/components/molecules/pagination/pagination-translations.d.ts +33 -0
  26. package/dist/components/molecules/pagination/pagination-translations.js +82 -0
  27. package/dist/components/molecules/pagination/pagination.d.ts +9 -0
  28. package/dist/components/molecules/pagination/pagination.js +46 -38
  29. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.d.ts +3 -1
  30. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.js +28 -27
  31. package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js +44 -41
  32. package/dist/components/organisms/data-table/components/data-table-header.js +11 -12
  33. package/dist/components/organisms/data-table/components/dialogs/data-table-manage-columns-dialog.d.ts +3 -1
  34. package/dist/components/organisms/data-table/components/dialogs/data-table-manage-columns-dialog.js +45 -44
  35. package/dist/components/organisms/data-table/data-table.d.ts +27 -2
  36. package/dist/components/organisms/data-table/data-table.js +146 -134
  37. package/dist/components/organisms/data-table/data-table.types.d.ts +68 -0
  38. package/dist/components/organisms/data-table/data-table.types.js +252 -0
  39. package/dist/components/organisms/data-table/index.d.ts +2 -1
  40. package/dist/components/organisms/data-table/utils/data-table-utils.js +11 -8
  41. package/dist/dashboard-design-system.css +1 -1
  42. package/dist/index.css +1 -1
  43. package/dist/index.d.ts +2 -1
  44. package/dist/index.esm.min.js +9394 -8512
  45. package/dist/index.js +208 -202
  46. package/dist/index.umd.min.js +25 -25
  47. package/dist/lib/utils.d.ts +13 -0
  48. package/dist/lib/utils.js +34 -10
  49. package/dist/vendor/shadcn/pagination.d.ts +19 -3
  50. package/dist/vendor/shadcn/pagination.js +41 -37
  51. package/dist/vendor/shadcn/select.js +33 -33
  52. package/dist/vendor/shadcn/switch.js +1 -1
  53. package/package.json +4 -2
  54. package/registry/components-registry.json +38 -12
@@ -1,22 +1,24 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
- import { forwardRef as g, useState as M, useMemo as $ } from "react";
3
- import { Button as p } from "../../../vendor/shadcn/button.js";
4
- import { Badge as V } from "../../../vendor/shadcn/badge.js";
5
- import { Separator as C } from "../../../vendor/shadcn/separator.js";
6
- import { Checkbox as E } from "../../../vendor/shadcn/checkbox.js";
7
- import { RadioGroupItem as L, RadioGroup as Q } from "../../../vendor/shadcn/radio-group.js";
8
- import { Icon as w } from "../icon/icon.js";
9
- import { cn as j } from "../../../lib/utils.js";
10
- import { Tooltip as y } from "../tooltip/tooltip.js";
11
- import { Field as F } from "../field/field.js";
12
- const S = g(
13
- ({ label: s, onRemove: l, className: n, ...t }, c) => /* @__PURE__ */ e.jsxs(
14
- V,
2
+ import { forwardRef as p, useMemo as k, useState as Q } from "react";
3
+ import { Button as w } from "../../../vendor/shadcn/button.js";
4
+ import { Badge as I } from "../../../vendor/shadcn/badge.js";
5
+ import { Separator as S } from "../../../vendor/shadcn/separator.js";
6
+ import { Checkbox as D } from "../../../vendor/shadcn/checkbox.js";
7
+ import { RadioGroupItem as U, RadioGroup as X } from "../../../vendor/shadcn/radio-group.js";
8
+ import { Icon as R } from "../icon/icon.js";
9
+ import { cn as v } from "../../../lib/utils.js";
10
+ import { getFilterTranslations as T, formatMoreFilters as q } from "./filter-translations.js";
11
+ import { DEFAULT_FILTER_TRANSLATIONS as de, FILTER_TRANSLATIONS as xe } from "./filter-translations.js";
12
+ import { Tooltip as V } from "../tooltip/tooltip.js";
13
+ import { Field as z } from "../field/field.js";
14
+ const A = p(
15
+ ({ label: s, onRemove: l, className: n, ...a }, r) => /* @__PURE__ */ e.jsxs(
16
+ I,
15
17
  {
16
- ref: c,
18
+ ref: r,
17
19
  variant: "secondary",
18
- className: j("h-8 gap-2 px-3 py-2 shadow-xs", n),
19
- ...t,
20
+ className: v("h-8 gap-2 px-3 py-2 shadow-xs", n),
21
+ ...a,
20
22
  children: [
21
23
  /* @__PURE__ */ e.jsx("span", { className: "text-xs font-medium leading-none", children: s }),
22
24
  l && /* @__PURE__ */ e.jsx(
@@ -25,203 +27,209 @@ const S = g(
25
27
  onClick: l,
26
28
  className: "inline-flex items-center justify-center",
27
29
  "aria-label": `Remove ${s} filter`,
28
- children: /* @__PURE__ */ e.jsx(w, { name: "X", className: "size-4" })
30
+ children: /* @__PURE__ */ e.jsx(R, { name: "X", className: "size-4" })
29
31
  }
30
32
  )
31
33
  ]
32
34
  }
33
35
  )
34
36
  );
35
- S.displayName = "FilterTag";
36
- const X = g(
37
+ A.displayName = "FilterTag";
38
+ const H = p(
37
39
  ({
38
40
  appliedFilters: s = [],
39
41
  onRemoveFilter: l,
40
42
  onClearAll: n,
41
- maxVisibleTags: t = 4,
42
- className: c,
43
- ...m
44
- }, u) => {
45
- const d = s.length > 0, b = s.slice(0, t), v = s.length - t;
43
+ maxVisibleTags: a = 4,
44
+ className: r,
45
+ lang: m,
46
+ translations: c,
47
+ ...d
48
+ }, y) => {
49
+ const f = k(() => {
50
+ const o = T(m);
51
+ return c ? { ...o, ...c } : o;
52
+ }, [m, c]), x = s.length > 0, F = s.slice(0, a), b = s.length - a;
46
53
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-4", children: [
47
54
  /* @__PURE__ */ e.jsxs(
48
- p,
55
+ w,
49
56
  {
50
- ref: u,
57
+ ref: y,
51
58
  variant: "outline",
52
59
  size: "sm",
53
- className: j("h-8 gap-2 px-3 py-2", c),
54
- ...m,
60
+ className: v("h-8 gap-2 px-3 py-2", r),
61
+ ...d,
55
62
  children: [
56
- /* @__PURE__ */ e.jsx(w, { name: "FunnelSimple", className: "size-4" }),
57
- /* @__PURE__ */ e.jsx("span", { className: "text-xs font-medium leading-none", children: "Add filter" })
63
+ /* @__PURE__ */ e.jsx(R, { name: "FunnelSimple", className: "size-4" }),
64
+ /* @__PURE__ */ e.jsx("span", { className: "text-xs font-medium leading-none", children: f.addFilter })
58
65
  ]
59
66
  }
60
67
  ),
61
- d && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
62
- /* @__PURE__ */ e.jsx(C, { orientation: "vertical", className: "h-5" }),
68
+ x && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
69
+ /* @__PURE__ */ e.jsx(S, { orientation: "vertical", className: "h-5" }),
63
70
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
64
- b.map((N) => /* @__PURE__ */ e.jsx(
65
- S,
71
+ F.map((o) => /* @__PURE__ */ e.jsx(
72
+ A,
66
73
  {
67
- label: N.label,
68
- onRemove: () => l?.(N.id)
74
+ label: o.label,
75
+ onRemove: () => l?.(o.id)
69
76
  },
70
- N.id
77
+ o.id
71
78
  )),
72
- v > 0 && /* @__PURE__ */ e.jsx(V, { variant: "default", className: "h-8 px-3 py-2 shadow-xs", children: /* @__PURE__ */ e.jsxs("span", { className: "text-xs font-medium leading-none", children: [
73
- "+",
74
- v,
75
- " more"
76
- ] }) }),
79
+ b > 0 && /* @__PURE__ */ e.jsx(I, { variant: "default", className: "h-8 px-3 py-2 shadow-xs", children: /* @__PURE__ */ e.jsx("span", { className: "text-xs font-medium leading-none", children: q(f, b) }) }),
77
80
  n && /* @__PURE__ */ e.jsx(
78
- p,
81
+ w,
79
82
  {
80
83
  variant: "ghost",
81
84
  size: "sm",
82
85
  onClick: n,
83
86
  className: "h-8 px-3 py-2",
84
- children: /* @__PURE__ */ e.jsx("span", { className: "text-xs font-medium leading-none text-primary", children: "Clear filters" })
87
+ children: /* @__PURE__ */ e.jsx("span", { className: "text-xs font-medium leading-none text-primary", children: f.clearFilters })
85
88
  }
86
89
  )
87
90
  ] })
88
91
  ] }),
89
- !d && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
90
- /* @__PURE__ */ e.jsx(C, { orientation: "vertical", className: "h-5" }),
91
- /* @__PURE__ */ e.jsx("span", { className: "text-sm font-normal text-muted-foreground", children: "No filters applied" })
92
+ !x && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
93
+ /* @__PURE__ */ e.jsx(S, { orientation: "vertical", className: "h-5" }),
94
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm font-normal text-muted-foreground", children: f.noFiltersApplied })
92
95
  ] })
93
96
  ] });
94
97
  }
95
98
  );
96
- X.displayName = "FilterButton";
97
- const q = g(
99
+ H.displayName = "FilterButton";
100
+ const J = p(
98
101
  (s, l) => {
99
102
  const {
100
103
  title: n,
101
- items: t,
102
- className: c,
104
+ items: a,
105
+ className: r,
103
106
  searchable: m = !1,
104
- searchPlaceholder: u = "Search",
107
+ searchPlaceholder: c,
105
108
  showActions: d = !1,
106
- enableSelectAll: b = !0,
107
- enableInverse: v = !0,
108
- enableNone: N = !0,
109
- description: k
110
- } = s, x = s.type || "checkbox", R = x === "radio", T = x === "checkbox" || !s.type, [h, P] = M(""), f = $(() => h ? t.filter(
111
- (a) => a.label.toLowerCase().includes(h.toLowerCase())
112
- ) : t, [t, h]), B = () => {
113
- if (x === "checkbox" && "selectedValues" in s) {
114
- const a = f.map((r) => r.value), i = h ? [.../* @__PURE__ */ new Set([...s.selectedValues, ...a])] : a;
109
+ enableSelectAll: y = !0,
110
+ enableInverse: f = !0,
111
+ enableNone: x = !0,
112
+ description: F,
113
+ lang: b,
114
+ translations: o
115
+ } = s, C = k(() => {
116
+ const t = T(b);
117
+ return o ? { ...t, ...o } : t;
118
+ }, [b, o]), g = s.type || "checkbox", E = g === "radio", P = g === "checkbox" || !s.type, [j, B] = Q(""), N = k(() => j ? a.filter(
119
+ (t) => t.label.toLowerCase().includes(j.toLowerCase())
120
+ ) : a, [a, j]), G = () => {
121
+ if (g === "checkbox" && "selectedValues" in s) {
122
+ const t = N.map((u) => u.value), i = j ? [.../* @__PURE__ */ new Set([...s.selectedValues, ...t])] : t;
115
123
  s.onChange(i);
116
124
  }
117
- }, G = () => {
118
- if (x === "checkbox" && "selectedValues" in s)
119
- if (h) {
120
- const a = new Set(f.map((o) => o.value)), i = s.selectedValues.filter(
121
- (o) => !a.has(o)
122
- ), r = f.filter((o) => !s.selectedValues.includes(o.value)).map((o) => o.value);
123
- s.onChange([...i, ...r]);
125
+ }, M = () => {
126
+ if (g === "checkbox" && "selectedValues" in s)
127
+ if (j) {
128
+ const t = new Set(N.map((h) => h.value)), i = s.selectedValues.filter(
129
+ (h) => !t.has(h)
130
+ ), u = N.filter((h) => !s.selectedValues.includes(h.value)).map((h) => h.value);
131
+ s.onChange([...i, ...u]);
124
132
  } else {
125
- const a = t.filter((i) => !s.selectedValues.includes(i.value)).map((i) => i.value);
126
- s.onChange(a);
133
+ const t = a.filter((i) => !s.selectedValues.includes(i.value)).map((i) => i.value);
134
+ s.onChange(t);
127
135
  }
128
- }, O = () => {
129
- if (x === "checkbox" && "selectedValues" in s)
130
- if (h) {
131
- const a = new Set(f.map((r) => r.value)), i = s.selectedValues.filter(
132
- (r) => !a.has(r)
136
+ }, _ = () => {
137
+ if (g === "checkbox" && "selectedValues" in s)
138
+ if (j) {
139
+ const t = new Set(N.map((u) => u.value)), i = s.selectedValues.filter(
140
+ (u) => !t.has(u)
133
141
  );
134
142
  s.onChange(i);
135
143
  } else
136
144
  s.onChange([]);
137
- else x === "radio" && "selectedValue" in s && s.onChange("");
138
- }, A = (a, i) => {
139
- if (x === "checkbox" && "selectedValues" in s) {
140
- const r = i ? [...s.selectedValues, a] : s.selectedValues.filter((o) => o !== a);
141
- s.onChange(r);
145
+ else g === "radio" && "selectedValue" in s && s.onChange("");
146
+ }, $ = (t, i) => {
147
+ if (g === "checkbox" && "selectedValues" in s) {
148
+ const u = i ? [...s.selectedValues, t] : s.selectedValues.filter((h) => h !== t);
149
+ s.onChange(u);
142
150
  }
143
151
  };
144
- return /* @__PURE__ */ e.jsxs("div", { ref: l, className: j("flex flex-col h-full", c), children: [
152
+ return /* @__PURE__ */ e.jsxs("div", { ref: l, className: v("flex flex-col h-full", r), children: [
145
153
  m && /* @__PURE__ */ e.jsx(
146
- F,
154
+ z,
147
155
  {
148
- placeholder: u,
149
- value: h,
150
- onChange: (a) => P(a.target.value),
156
+ placeholder: c ?? C.search,
157
+ value: j,
158
+ onChange: (t) => B(t.target.value),
151
159
  startIcon: "MagnifyingGlass",
152
160
  className: "mb-4"
153
161
  }
154
162
  ),
155
- k && /* @__PURE__ */ e.jsx("p", { className: "text-xs font-normal text-muted-foreground mb-4", children: k }),
163
+ F && /* @__PURE__ */ e.jsx("p", { className: "text-xs font-normal text-muted-foreground mb-4", children: F }),
156
164
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between mb-1", children: [
157
165
  /* @__PURE__ */ e.jsx("span", { className: "text-sm font-normal text-foreground", children: n }),
158
- d && x === "checkbox" && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-4", children: [
159
- b && /* @__PURE__ */ e.jsx(
160
- p,
166
+ d && g === "checkbox" && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-4", children: [
167
+ y && /* @__PURE__ */ e.jsx(
168
+ w,
161
169
  {
162
170
  variant: "link",
163
171
  size: "sm",
164
- onClick: B,
172
+ onClick: G,
165
173
  className: "h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",
166
- children: "Select all"
174
+ children: C.selectAll
167
175
  }
168
176
  ),
169
- v && /* @__PURE__ */ e.jsx(
170
- p,
177
+ f && /* @__PURE__ */ e.jsx(
178
+ w,
171
179
  {
172
180
  variant: "link",
173
181
  size: "sm",
174
- onClick: G,
182
+ onClick: M,
175
183
  className: "h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",
176
- children: "Inverse"
184
+ children: C.inverse
177
185
  }
178
186
  ),
179
- N && /* @__PURE__ */ e.jsx(
180
- p,
187
+ x && /* @__PURE__ */ e.jsx(
188
+ w,
181
189
  {
182
190
  variant: "link",
183
191
  size: "sm",
184
- onClick: O,
192
+ onClick: _,
185
193
  className: "h-auto p-0 text-xs font-medium text-primary hover:text-primary/80",
186
- children: "None"
194
+ children: C.none
187
195
  }
188
196
  )
189
197
  ] })
190
198
  ] }),
191
- /* @__PURE__ */ e.jsx(C, { className: "w-full mb-6" }),
192
- R && "selectedValue" in s ? /* @__PURE__ */ e.jsx(
193
- Q,
199
+ /* @__PURE__ */ e.jsx(S, { className: "w-full mb-6" }),
200
+ E && "selectedValue" in s ? /* @__PURE__ */ e.jsx(
201
+ X,
194
202
  {
195
203
  value: s.selectedValue,
196
204
  onValueChange: s.onChange,
197
205
  className: "grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto",
198
- children: f.map((a) => /* @__PURE__ */ e.jsx(
199
- I,
206
+ children: N.map((t) => /* @__PURE__ */ e.jsx(
207
+ O,
200
208
  {
201
- label: a.label,
202
- value: a.value,
203
- description: a.description
209
+ label: t.label,
210
+ value: t.value,
211
+ description: t.description
204
212
  },
205
- a.value
213
+ t.value
206
214
  ))
207
215
  }
208
- ) : T && "selectedValues" in s ? /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto", children: f.map((a) => /* @__PURE__ */ e.jsx(
209
- z,
216
+ ) : P && "selectedValues" in s ? /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto", children: N.map((t) => /* @__PURE__ */ e.jsx(
217
+ L,
210
218
  {
211
- label: a.label,
212
- description: a.description,
213
- icon: a.icon,
214
- checked: s.selectedValues.includes(a.value),
215
- onCheckedChange: (i) => A(a.value, i)
219
+ label: t.label,
220
+ description: t.description,
221
+ icon: t.icon,
222
+ checked: s.selectedValues.includes(t.value),
223
+ onCheckedChange: (i) => $(t.value, i)
216
224
  },
217
- a.value
225
+ t.value
218
226
  )) }) : null
219
227
  ] });
220
228
  }
221
229
  );
222
- q.displayName = "FilterSection";
223
- const z = g(({ label: s, checked: l, onCheckedChange: n, description: t, className: c, icon: m }, u) => /* @__PURE__ */ e.jsxs("label", { className: j("flex items-start gap-2 cursor-pointer", c), children: [
224
- /* @__PURE__ */ e.jsx(E, { ref: u, checked: l, onCheckedChange: n }),
230
+ J.displayName = "FilterSection";
231
+ const L = p(({ label: s, checked: l, onCheckedChange: n, description: a, className: r, icon: m }, c) => /* @__PURE__ */ e.jsxs("label", { className: v("flex items-start gap-2 cursor-pointer rtl:flex-row-reverse", r), children: [
232
+ /* @__PURE__ */ e.jsx(D, { ref: c, checked: l, onCheckedChange: n }),
225
233
  m && /* @__PURE__ */ e.jsx(
226
234
  "img",
227
235
  {
@@ -234,74 +242,86 @@ const z = g(({ label: s, checked: l, onCheckedChange: n, description: t, classNa
234
242
  }
235
243
  ),
236
244
  /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-0.5 min-w-0 flex-1", children: [
237
- /* @__PURE__ */ e.jsx(y, { content: s, triggerProps: { className: "w-fit" }, children: /* @__PURE__ */ e.jsx("p", { className: "text-sm font-medium leading-4 truncate max-w-[165px]", children: s }) }),
238
- t && /* @__PURE__ */ e.jsx(y, { content: t, triggerProps: { className: "w-fit mt-2" }, children: /* @__PURE__ */ e.jsx("p", { className: "text-sm font-normal leading-5 text-muted-foreground truncate max-w-[165px]", children: t }) })
245
+ /* @__PURE__ */ e.jsx(V, { content: s, triggerProps: { className: "w-fit" }, children: /* @__PURE__ */ e.jsx("p", { className: "text-sm font-medium leading-4 truncate max-w-[165px]", children: s }) }),
246
+ a && /* @__PURE__ */ e.jsx(V, { content: a, triggerProps: { className: "w-fit mt-2" }, children: /* @__PURE__ */ e.jsx("p", { className: "text-sm font-normal leading-5 text-muted-foreground truncate max-w-[165px]", children: a }) })
239
247
  ] })
240
248
  ] }));
241
- z.displayName = "FilterCheckboxOption";
242
- const I = g(
243
- ({ label: s, value: l, description: n, className: t }, c) => /* @__PURE__ */ e.jsxs("div", { className: j("flex items-start gap-3", t), children: [
244
- /* @__PURE__ */ e.jsx(L, { ref: c, value: l, id: `radio-${l}` }),
249
+ L.displayName = "FilterCheckboxOption";
250
+ const O = p(
251
+ ({ label: s, value: l, description: n, className: a }, r) => /* @__PURE__ */ e.jsxs("div", { className: v("flex items-start gap-3 rtl:flex-row-reverse", a), children: [
252
+ /* @__PURE__ */ e.jsx(U, { ref: r, value: l, id: `radio-${l}` }),
245
253
  /* @__PURE__ */ e.jsxs(
246
254
  "label",
247
255
  {
248
256
  htmlFor: `radio-${l}`,
249
257
  className: "flex flex-col gap-0.5 cursor-pointer flex-1 truncate",
250
258
  children: [
251
- /* @__PURE__ */ e.jsx(y, { content: s, triggerProps: { className: "w-fit" }, children: /* @__PURE__ */ e.jsx("p", { className: "text-sm font-medium leading-4 truncate max-w-[165px]", children: s }) }),
252
- n && /* @__PURE__ */ e.jsx(y, { content: n, triggerProps: { className: "w-fit mt-2" }, children: /* @__PURE__ */ e.jsx("p", { className: "w-fittext-sm font-normal leading-4 text-muted-foreground truncate max-w-[165px]", children: n }) })
259
+ /* @__PURE__ */ e.jsx(V, { content: s, triggerProps: { className: "w-fit" }, children: /* @__PURE__ */ e.jsx("p", { className: "text-sm font-medium leading-4 truncate max-w-[165px]", children: s }) }),
260
+ n && /* @__PURE__ */ e.jsx(V, { content: n, triggerProps: { className: "w-fit mt-2" }, children: /* @__PURE__ */ e.jsx("p", { className: "w-fittext-sm font-normal leading-4 text-muted-foreground truncate max-w-[165px]", children: n }) })
253
261
  ]
254
262
  }
255
263
  )
256
264
  ] })
257
265
  );
258
- I.displayName = "FilterRadioOption";
259
- const D = g(
266
+ O.displayName = "FilterRadioOption";
267
+ const K = p(
260
268
  ({
261
269
  children: s,
262
270
  showSearch: l = !1,
263
- searchPlaceholder: n = "Search",
264
- searchValue: t,
265
- onSearchChange: c,
266
- className: m
267
- }, u) => /* @__PURE__ */ e.jsxs(
268
- "div",
269
- {
270
- ref: u,
271
- className: j(
272
- "flex flex-col gap-6 bg-input rounded-md p-6 min-w-[448px]",
273
- m
274
- ),
275
- children: [
276
- l && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
277
- /* @__PURE__ */ e.jsx(
278
- w,
279
- {
280
- name: "MagnifyingGlass",
281
- className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"
282
- }
283
- ),
284
- /* @__PURE__ */ e.jsx(
285
- F,
286
- {
287
- placeholder: n,
288
- value: t,
289
- onChange: (d) => c?.(d.target.value),
290
- className: "pl-9"
291
- }
292
- )
293
- ] }) }),
294
- /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-6", children: s })
295
- ]
296
- }
297
- )
271
+ searchPlaceholder: n,
272
+ searchValue: a,
273
+ onSearchChange: r,
274
+ className: m,
275
+ lang: c,
276
+ translations: d
277
+ }, y) => {
278
+ const f = k(() => {
279
+ const x = T(c);
280
+ return d ? { ...x, ...d } : x;
281
+ }, [c, d]);
282
+ return /* @__PURE__ */ e.jsxs(
283
+ "div",
284
+ {
285
+ ref: y,
286
+ className: v(
287
+ "flex flex-col gap-6 bg-input rounded-md p-6 min-w-[448px]",
288
+ m
289
+ ),
290
+ children: [
291
+ l && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
292
+ /* @__PURE__ */ e.jsx(
293
+ R,
294
+ {
295
+ name: "MagnifyingGlass",
296
+ className: "absolute start-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"
297
+ }
298
+ ),
299
+ /* @__PURE__ */ e.jsx(
300
+ z,
301
+ {
302
+ placeholder: n ?? f.search,
303
+ value: a,
304
+ onChange: (x) => r?.(x.target.value),
305
+ className: "ps-9"
306
+ }
307
+ )
308
+ ] }) }),
309
+ /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-6", children: s })
310
+ ]
311
+ }
312
+ );
313
+ }
298
314
  );
299
- D.displayName = "FilterContent";
315
+ K.displayName = "FilterContent";
300
316
  export {
301
- X as FilterButton,
302
- z as FilterCheckboxOption,
303
- D as FilterContent,
304
- I as FilterRadioOption,
305
- q as FilterSection,
306
- S as FilterTag
317
+ de as DEFAULT_FILTER_TRANSLATIONS,
318
+ xe as FILTER_TRANSLATIONS,
319
+ H as FilterButton,
320
+ L as FilterCheckboxOption,
321
+ K as FilterContent,
322
+ O as FilterRadioOption,
323
+ J as FilterSection,
324
+ A as FilterTag,
325
+ q as formatMoreFilters,
326
+ T as getFilterTranslations
307
327
  };
@@ -1,3 +1,3 @@
1
- export { FilterButton, FilterTag, FilterSection, FilterCheckboxOption, FilterRadioOption, FilterContent, type FilterButtonProps, type FilterTagProps, type FilterSectionProps, type FilterCheckboxOptionProps, type FilterRadioOptionProps, type FilterContentProps, } from './filter';
2
- export { FilterDateRange, FilterDateRangeOption, FilterDateRangeValue, type FilterDateRangeProps, type FilterDateRangeOptionProps, } from './filter-date-range';
1
+ export { FilterButton, FilterTag, FilterSection, FilterCheckboxOption, FilterRadioOption, FilterContent, type FilterButtonProps, type FilterTagProps, type FilterSectionProps, type FilterCheckboxOptionProps, type FilterRadioOptionProps, type FilterContentProps, type FilterLanguage, type FilterTranslations, FILTER_TRANSLATIONS, DEFAULT_FILTER_TRANSLATIONS, getFilterTranslations, } from './filter';
2
+ export { FilterDateRange, FilterDateRangeOption, FilterDateRangeValue, type FilterDateRangeProps, type FilterDateRangeOptionProps, type FilterDateRangeLabels, } from './filter-date-range';
3
3
  export { FilterMultiInput, type FilterMultiInputProps, } from './filter-multi-input';
@@ -1,6 +1,7 @@
1
1
  import { ReactNode, ComponentProps } from 'react';
2
2
  import { IconName } from '../icon';
3
- import { FilterSectionItem } from '../filter/filter';
3
+ import { FilterSectionItem, FilterLanguage, FilterTranslations } from '../filter/filter';
4
+ import { FilterDateRangeLabels } from '../filter/filter-date-range';
4
5
  /**
5
6
  * Props for the FilterMenuItem component
6
7
  */
@@ -170,6 +171,11 @@ interface FilterConfig {
170
171
  * Callback fired when end time changes
171
172
  */
172
173
  onEndTimeChange?: (time: string) => void;
174
+ /**
175
+ * Labels for date range filter options - enables i18n/translation support.
176
+ * If not provided, defaults to English strings.
177
+ */
178
+ dateLabels?: FilterDateRangeLabels;
173
179
  /**
174
180
  * Whether the filter items are searchable
175
181
  */
@@ -274,7 +280,7 @@ interface FilterDropdownProps {
274
280
  onOpenChange?: (isOpen: boolean) => void;
275
281
  /**
276
282
  * Text to display in the trigger button
277
- * @default "Add filter"
283
+ * @deprecated Use `lang` or `translations` prop instead
278
284
  */
279
285
  buttonText?: string;
280
286
  /**
@@ -297,6 +303,15 @@ interface FilterDropdownProps {
297
303
  * @default false
298
304
  */
299
305
  applyOnClose?: boolean;
306
+ /**
307
+ * Language code for translations
308
+ * @default "en"
309
+ */
310
+ lang?: FilterLanguage;
311
+ /**
312
+ * Custom translations (overrides lang-based translations)
313
+ */
314
+ translations?: FilterTranslations;
300
315
  }
301
316
  declare const FilterDropdown: import('react').ForwardRefExoticComponent<FilterDropdownProps & import('react').RefAttributes<HTMLDivElement>>;
302
317
  export { FilterDropdown, FilterMenu, FilterMenuItem, type FilterDropdownProps, type FilterConfig, type FilterMenuProps, type FilterMenuItemProps, type FilterDeferredContext, };