@yuno-payments/dashboard-design-system 0.0.167 → 0.0.170

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 (161) hide show
  1. package/dist/components/atoms/access-denied-alert/access-denied-alert.d.ts +0 -16
  2. package/dist/components/atoms/accordion/accordion.d.ts +0 -66
  3. package/dist/components/atoms/alert/alert.d.ts +1 -26
  4. package/dist/components/atoms/alert/alert.js +8 -9
  5. package/dist/components/atoms/avatar/avatar-group.d.ts +0 -28
  6. package/dist/components/atoms/avatar/avatar.d.ts +0 -25
  7. package/dist/components/atoms/avatar/avatar.js +9 -9
  8. package/dist/components/atoms/badge/badge.d.ts +2 -30
  9. package/dist/components/atoms/badge/badge.js +11 -27
  10. package/dist/components/atoms/button/button.d.ts +0 -44
  11. package/dist/components/atoms/card/card.d.ts +3 -137
  12. package/dist/components/atoms/card/card.js +28 -56
  13. package/dist/components/atoms/checkbox/checkbox.d.ts +2 -38
  14. package/dist/components/atoms/checkbox/checkbox.js +27 -61
  15. package/dist/components/atoms/combobox/combobox.d.ts +0 -18
  16. package/dist/components/atoms/combobox/combobox.js +41 -41
  17. package/dist/components/atoms/combobox/types.d.ts +1 -90
  18. package/dist/components/atoms/currency-field/currency-field.d.ts +0 -38
  19. package/dist/components/atoms/currency-field/currency-field.js +19 -22
  20. package/dist/components/atoms/date-picker/date-picker.d.ts +0 -15
  21. package/dist/components/atoms/date-range-picker/date-range-picker.d.ts +0 -15
  22. package/dist/components/atoms/dots-menu/dots-menu.d.ts +0 -16
  23. package/dist/components/atoms/dots-menu/dots-menu.js +8 -8
  24. package/dist/components/atoms/dots-menu/dots-menu.types.d.ts +0 -52
  25. package/dist/components/atoms/dropdown-menu/dropdown-menu.d.ts +0 -50
  26. package/dist/components/atoms/field/field.d.ts +0 -55
  27. package/dist/components/atoms/field/field.js +46 -53
  28. package/dist/components/atoms/filter/filter-date-range.d.ts +2 -12
  29. package/dist/components/atoms/filter/filter-date-range.js +168 -203
  30. package/dist/components/atoms/filter/filter.d.ts +0 -6
  31. package/dist/components/atoms/filter/filter.js +76 -91
  32. package/dist/components/atoms/filter/index.d.ts +1 -1
  33. package/dist/components/atoms/filter-dropdown/filter-dropdown.d.ts +2 -208
  34. package/dist/components/atoms/filter-dropdown/filter-dropdown.js +160 -214
  35. package/dist/components/atoms/icon/icon-list.d.ts +0 -5
  36. package/dist/components/atoms/icon/icon-list.js +384 -394
  37. package/dist/components/atoms/icon/icon.d.ts +0 -29
  38. package/dist/components/atoms/index.d.ts +2 -3
  39. package/dist/components/atoms/label/index.d.ts +1 -1
  40. package/dist/components/atoms/link/link.d.ts +0 -20
  41. package/dist/components/atoms/multi-select/multi-select.d.ts +1 -1
  42. package/dist/components/atoms/multi-select/multi-select.js +6 -6
  43. package/dist/components/atoms/multi-values-field/multi-values-field.d.ts +0 -16
  44. package/dist/components/atoms/multi-values-field/multi-values-field.js +87 -109
  45. package/dist/components/atoms/multi-values-field/multi-values-field.types.d.ts +0 -81
  46. package/dist/components/atoms/otp-field/otp-field.d.ts +0 -32
  47. package/dist/components/atoms/password-field/password-field.d.ts +0 -23
  48. package/dist/components/atoms/password-field/password-field.js +1 -1
  49. package/dist/components/atoms/progress/progress.d.ts +0 -15
  50. package/dist/components/atoms/protected-field/protected-field.d.ts +0 -10
  51. package/dist/components/atoms/protected-field/protected-field.types.d.ts +0 -14
  52. package/dist/components/atoms/radio-group/radio-group-option.js +11 -11
  53. package/dist/components/atoms/radio-group/radio-group.d.ts +1 -50
  54. package/dist/components/atoms/radio-group/radio-group.js +12 -13
  55. package/dist/components/atoms/search-field/search-field.d.ts +0 -14
  56. package/dist/components/atoms/search-field/search-field.js +17 -17
  57. package/dist/components/atoms/search-field/search-field.types.d.ts +0 -57
  58. package/dist/components/atoms/select/index.d.ts +0 -2
  59. package/dist/components/atoms/select/select.d.ts +1 -83
  60. package/dist/components/atoms/select/select.js +21 -21
  61. package/dist/components/atoms/separator/separator.d.ts +0 -17
  62. package/dist/components/atoms/skeleton/index.d.ts +0 -9
  63. package/dist/components/atoms/switch/switch.d.ts +2 -56
  64. package/dist/components/atoms/switch/switch.js +32 -64
  65. package/dist/components/atoms/tabs/index.d.ts +0 -16
  66. package/dist/components/atoms/textarea/textarea.d.ts +0 -32
  67. package/dist/components/atoms/textarea/textarea.js +1 -1
  68. package/dist/components/atoms/time-picker/time-picker.d.ts +2 -73
  69. package/dist/components/atoms/time-picker/time-picker.js +3 -218
  70. package/dist/components/atoms/toaster/index.d.ts +0 -15
  71. package/dist/components/atoms/toggle-group/toggle-group.d.ts +1 -26
  72. package/dist/components/atoms/toggle-group/toggle-group.js +14 -15
  73. package/dist/components/atoms/tooltip/tooltip.d.ts +2 -53
  74. package/dist/components/atoms/typography/typography.d.ts +0 -18
  75. package/dist/components/molecules/breadcrumb/breadcrumb.d.ts +0 -50
  76. package/dist/components/molecules/breadcrumb/breadcrumb.js +17 -17
  77. package/dist/components/molecules/dialog-content/dialog-content.d.ts +0 -16
  78. package/dist/components/molecules/dialog-footer/dialog-footer.d.ts +0 -20
  79. package/dist/components/molecules/dialog-header/dialog-header.d.ts +0 -31
  80. package/dist/components/molecules/empty/empty-icon.js +6 -6
  81. package/dist/components/molecules/empty/empty.d.ts +1 -16
  82. package/dist/components/molecules/empty/empty.js +34 -37
  83. package/dist/components/molecules/highlight-banner/highlight-banner.d.ts +0 -17
  84. package/dist/components/molecules/pagination/pagination.d.ts +0 -49
  85. package/dist/components/organisms/data-table/components/cells/data-table-list-cell.d.ts +0 -41
  86. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-content.js +1 -1
  87. package/dist/components/organisms/data-table/components/column-header/data-table-column-header-menu.js +18 -18
  88. package/dist/components/organisms/data-table/components/column-header/data-table-column-header.d.ts +0 -18
  89. package/dist/components/organisms/data-table/components/column-header/data-table-column-header.js +10 -10
  90. package/dist/components/organisms/data-table/components/data-table-body.d.ts +0 -18
  91. package/dist/components/organisms/data-table/components/data-table-header.d.ts +0 -12
  92. package/dist/components/organisms/data-table/components/data-table-header.js +7 -7
  93. package/dist/components/organisms/data-table/components/states/data-table-loading.d.ts +0 -24
  94. package/dist/components/organisms/data-table/components/states/data-table-loading.js +6 -6
  95. package/dist/components/organisms/data-table/data-table.d.ts +4 -133
  96. package/dist/components/organisms/data-table/data-table.js +100 -132
  97. package/dist/components/organisms/data-table/data-table.types.d.ts +26 -35
  98. package/dist/components/organisms/data-table/hooks/use-data-table-columns.js +41 -57
  99. package/dist/components/organisms/data-table/hooks/use-data-table-state.d.ts +2 -8
  100. package/dist/components/organisms/data-table/hooks/use-data-table-state.js +47 -82
  101. package/dist/components/organisms/data-table/utils/data-table-constants.d.ts +2 -8
  102. package/dist/components/organisms/data-table/utils/data-table-constants.js +10 -16
  103. package/dist/components/organisms/data-table/utils/data-table-styles.d.ts +0 -1652
  104. package/dist/components/organisms/data-table/utils/data-table-styles.js +14 -29
  105. package/dist/components/organisms/dialog/dialog.d.ts +1 -67
  106. package/dist/components/organisms/dialog/dialog.js +61 -78
  107. package/dist/components/organisms/index.d.ts +0 -2
  108. package/dist/components/organisms/sheet/sheet.d.ts +0 -69
  109. package/dist/components/organisms/sheet/sheet.js +33 -34
  110. package/dist/index.css +1 -1
  111. package/dist/index.d.ts +0 -2
  112. package/dist/index.js +162 -173
  113. package/dist/vendor/shadcn/avatar.js +19 -19
  114. package/dist/vendor/shadcn/badge.js +15 -15
  115. package/dist/vendor/shadcn/card.js +7 -7
  116. package/dist/vendor/shadcn/date-picker.d.ts +2 -2
  117. package/dist/vendor/shadcn/date-picker.js +1 -1
  118. package/dist/vendor/shadcn/date-range-picker.d.ts +2 -2
  119. package/dist/vendor/shadcn/date-range-picker.js +1 -1
  120. package/dist/vendor/shadcn/dialog.js +2 -2
  121. package/dist/vendor/shadcn/input-group.js +17 -17
  122. package/dist/vendor/shadcn/input.js +7 -7
  123. package/dist/vendor/shadcn/popover.js +1 -1
  124. package/dist/vendor/shadcn/select.js +2 -2
  125. package/dist/vendor/shadcn/sonner.d.ts +1 -26
  126. package/dist/vendor/shadcn/sonner.js +8 -12
  127. package/dist/vendor/shadcn/table.js +30 -30
  128. package/dist/vendor/shadcn/textarea.js +9 -9
  129. package/dist/vendor/shadcn/time-picker.d.ts +2 -1
  130. package/dist/vendor/shadcn/time-picker.js +23 -17
  131. package/dist/vendor/shadcn/toggle.js +13 -13
  132. package/dist/vendor/shadcn/tooltip.js +15 -25
  133. package/package.json +1 -1
  134. package/dist/components/atoms/icon/aida-logo.d.ts +0 -3
  135. package/dist/components/atoms/icon/aida-logo.js +0 -64
  136. package/dist/components/atoms/label/label.d.ts +0 -11
  137. package/dist/components/atoms/label/label.js +0 -28
  138. package/dist/components/atoms/loading/index.d.ts +0 -1
  139. package/dist/components/atoms/loading/loading.d.ts +0 -39
  140. package/dist/components/atoms/loading/loading.js +0 -37
  141. package/dist/components/atoms/select/search-select.d.ts +0 -22
  142. package/dist/components/atoms/select/search-select.js +0 -201
  143. package/dist/components/organisms/tutorial/index.d.ts +0 -2
  144. package/dist/components/organisms/tutorial/tutorial.d.ts +0 -16
  145. package/dist/components/organisms/tutorial/tutorial.js +0 -114
  146. package/dist/components/organisms/tutorial/tutorial.types.d.ts +0 -15
  147. package/dist/hooks/index.d.ts +0 -3
  148. package/dist/hooks/use-body-scroll-lock.d.ts +0 -13
  149. package/dist/hooks/use-escape-key.d.ts +0 -14
  150. package/dist/hooks/use-media-query.d.ts +0 -20
  151. package/dist/hooks/use-media-query.js +0 -21
  152. package/dist/lib/notification-alert.d.ts +0 -42
  153. package/dist/lib/notification-alert.js +0 -75
  154. package/dist/node_modules/@phosphor-icons/react/dist/csr/File.es.js +0 -8
  155. package/dist/node_modules/@phosphor-icons/react/dist/csr/Microphone.es.js +0 -8
  156. package/dist/node_modules/@phosphor-icons/react/dist/csr/Stop.es.js +0 -8
  157. package/dist/node_modules/@phosphor-icons/react/dist/csr/Table.es.js +0 -8
  158. package/dist/node_modules/@phosphor-icons/react/dist/defs/File.es.js +0 -30
  159. package/dist/node_modules/@phosphor-icons/react/dist/defs/Microphone.es.js +0 -36
  160. package/dist/node_modules/@phosphor-icons/react/dist/defs/Stop.es.js +0 -36
  161. package/dist/node_modules/@phosphor-icons/react/dist/defs/Table.es.js +0 -30
@@ -1,21 +1,21 @@
1
1
  import { j as e } from "../../../_virtual/jsx-runtime.js";
2
- import { forwardRef as f, useState as A, useMemo as M } from "react";
3
- import { Button as j } from "../../../vendor/shadcn/button.js";
2
+ import { forwardRef as m, useState as M, useMemo as $ } from "react";
3
+ import { Button as f } from "../../../vendor/shadcn/button.js";
4
4
  import { Badge as C } from "../../../vendor/shadcn/badge.js";
5
5
  import { Separator as p } from "../../../vendor/shadcn/separator.js";
6
- import { Checkbox as E } from "../../../vendor/shadcn/checkbox.js";
7
- import { RadioGroup as Q, RadioGroupItem as L } from "../../../vendor/shadcn/radio-group.js";
8
- import { Icon as y } from "../icon/icon.js";
9
- import { cn as g } from "../../../lib/utils.js";
6
+ import { Checkbox as L } from "../../../vendor/shadcn/checkbox.js";
7
+ import { RadioGroup as Q, RadioGroupItem as E } from "../../../vendor/shadcn/radio-group.js";
8
+ import { cn as x } from "../../../lib/utils.js";
9
+ import { Icon as v } from "../icon/icon.js";
10
10
  import { Field as k } from "../field/field.js";
11
- import { Tooltip as v } from "../tooltip/tooltip.js";
12
- const F = f(
11
+ import { Tooltip as b } from "../tooltip/tooltip.js";
12
+ const F = m(
13
13
  ({ label: s, onRemove: t, className: n, ...l }, i) => /* @__PURE__ */ e.jsxs(
14
14
  C,
15
15
  {
16
16
  ref: i,
17
17
  variant: "secondary",
18
- className: g("h-8 gap-2 px-3 py-2 shadow-xs", n),
18
+ className: x("h-8 gap-2 px-3 py-2 shadow-xs", n),
19
19
  ...l,
20
20
  children: [
21
21
  /* @__PURE__ */ e.jsx("span", { className: "text-xs font-medium leading-none", children: s }),
@@ -25,7 +25,7 @@ const F = f(
25
25
  onClick: t,
26
26
  className: "inline-flex items-center justify-center",
27
27
  "aria-label": `Remove ${s} filter`,
28
- children: /* @__PURE__ */ e.jsx(y, { name: "X", className: "size-4" })
28
+ children: /* @__PURE__ */ e.jsx(v, { name: "X", className: "size-4" })
29
29
  }
30
30
  )
31
31
  ]
@@ -33,27 +33,27 @@ const F = f(
33
33
  )
34
34
  );
35
35
  F.displayName = "FilterTag";
36
- const P = f(
36
+ const P = m(
37
37
  ({
38
38
  appliedFilters: s = [],
39
39
  onRemoveFilter: t,
40
40
  onClearAll: n,
41
41
  maxVisibleTags: l = 4,
42
42
  className: i,
43
- ...c
44
- }, r) => {
45
- const o = s.length > 0, x = s.slice(0, l), u = s.length - l;
43
+ ...r
44
+ }, h) => {
45
+ const o = s.length > 0, N = s.slice(0, l), g = s.length - l;
46
46
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-4", children: [
47
47
  /* @__PURE__ */ e.jsxs(
48
- j,
48
+ f,
49
49
  {
50
- ref: r,
50
+ ref: h,
51
51
  variant: "outline",
52
52
  size: "sm",
53
- className: g("h-8 gap-2 px-3 py-2", i),
54
- ...c,
53
+ className: x("h-8 gap-2 px-3 py-2", i),
54
+ ...r,
55
55
  children: [
56
- /* @__PURE__ */ e.jsx(y, { name: "FunnelSimple", className: "size-4" }),
56
+ /* @__PURE__ */ e.jsx(v, { name: "FunnelSimple", className: "size-4" }),
57
57
  /* @__PURE__ */ e.jsx("span", { className: "text-xs font-medium leading-none", children: "Add filter" })
58
58
  ]
59
59
  }
@@ -61,21 +61,21 @@ const P = f(
61
61
  o && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
62
62
  /* @__PURE__ */ e.jsx(p, { orientation: "vertical", className: "h-5" }),
63
63
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
64
- x.map((m) => /* @__PURE__ */ e.jsx(
64
+ N.map((u) => /* @__PURE__ */ e.jsx(
65
65
  F,
66
66
  {
67
- label: m.label,
68
- onRemove: () => t?.(m.id)
67
+ label: u.label,
68
+ onRemove: () => t?.(u.id)
69
69
  },
70
- m.id
70
+ u.id
71
71
  )),
72
- u > 0 && /* @__PURE__ */ e.jsx(C, { variant: "default", className: "h-8 px-3 py-2 shadow-xs", children: /* @__PURE__ */ e.jsxs("span", { className: "text-xs font-medium leading-none", children: [
72
+ g > 0 && /* @__PURE__ */ e.jsx(C, { 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
73
  "+",
74
- u,
74
+ g,
75
75
  " more"
76
76
  ] }) }),
77
77
  n && /* @__PURE__ */ e.jsx(
78
- j,
78
+ f,
79
79
  {
80
80
  variant: "ghost",
81
81
  size: "sm",
@@ -94,44 +94,44 @@ const P = f(
94
94
  }
95
95
  );
96
96
  P.displayName = "FilterButton";
97
- const X = f(
97
+ const X = m(
98
98
  (s, t) => {
99
99
  const {
100
100
  title: n,
101
101
  items: l,
102
102
  className: i,
103
- searchable: c = !1,
104
- searchPlaceholder: r = "Search...",
103
+ searchable: r = !1,
104
+ searchPlaceholder: h = "Search...",
105
105
  showActions: o = !1,
106
- enableSelectAll: x = !0,
107
- enableInverse: u = !0,
108
- enableNone: m = !0
109
- } = s, d = s.type || "checkbox", w = d === "radio", z = d === "checkbox" || !s.type, [N, I] = A(""), b = M(() => N ? l.filter(
110
- (a) => a.label.toLowerCase().includes(N.toLowerCase())
111
- ) : l, [l, N]), R = () => {
112
- if (d === "checkbox" && "selectedValues" in s) {
113
- const a = l.map((h) => h.value);
106
+ enableSelectAll: N = !0,
107
+ enableInverse: g = !0,
108
+ enableNone: u = !0
109
+ } = s, c = s.type || "checkbox", w = c === "radio", z = c === "checkbox" || !s.type, [j, I] = M(""), y = $(() => j ? l.filter(
110
+ (a) => a.label.toLowerCase().includes(j.toLowerCase())
111
+ ) : l, [l, j]), R = () => {
112
+ if (c === "checkbox" && "selectedValues" in s) {
113
+ const a = l.map((d) => d.value);
114
114
  s.onChange(a);
115
115
  }
116
116
  }, T = () => {
117
- if (d === "checkbox" && "selectedValues" in s) {
118
- const a = l.filter((h) => !s.selectedValues.includes(h.value)).map((h) => h.value);
117
+ if (c === "checkbox" && "selectedValues" in s) {
118
+ const a = l.filter((d) => !s.selectedValues.includes(d.value)).map((d) => d.value);
119
119
  s.onChange(a);
120
120
  }
121
121
  }, B = () => {
122
- d === "checkbox" && "selectedValues" in s ? s.onChange([]) : d === "radio" && "selectedValue" in s && s.onChange("");
122
+ c === "checkbox" && "selectedValues" in s ? s.onChange([]) : c === "radio" && "selectedValue" in s && s.onChange("");
123
123
  }, G = (a) => {
124
- if (d === "checkbox" && "selectedValues" in s) {
125
- const O = s.selectedValues.includes(a) ? s.selectedValues.filter(($) => $ !== a) : [...s.selectedValues, a];
124
+ if (c === "checkbox" && "selectedValues" in s) {
125
+ const O = s.selectedValues.includes(a) ? s.selectedValues.filter((A) => A !== a) : [...s.selectedValues, a];
126
126
  s.onChange(O);
127
127
  }
128
128
  };
129
- return /* @__PURE__ */ e.jsxs("div", { ref: t, className: g("flex flex-col h-full", i), children: [
130
- c && /* @__PURE__ */ e.jsx(
129
+ return /* @__PURE__ */ e.jsxs("div", { ref: t, className: x("flex flex-col h-full", i), children: [
130
+ r && /* @__PURE__ */ e.jsx(
131
131
  k,
132
132
  {
133
- placeholder: r,
134
- value: N,
133
+ placeholder: h,
134
+ value: j,
135
135
  onChange: (a) => I(a.target.value),
136
136
  startIcon: "MagnifyingGlass",
137
137
  className: "mb-4"
@@ -139,9 +139,9 @@ const X = f(
139
139
  ),
140
140
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between mb-1", children: [
141
141
  /* @__PURE__ */ e.jsx("span", { className: "text-sm font-normal text-foreground", children: n }),
142
- o && d === "checkbox" && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-2", children: [
143
- x && /* @__PURE__ */ e.jsx(
144
- j,
142
+ o && c === "checkbox" && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-end gap-2", children: [
143
+ N && /* @__PURE__ */ e.jsx(
144
+ f,
145
145
  {
146
146
  variant: "link",
147
147
  size: "sm",
@@ -150,8 +150,8 @@ const X = f(
150
150
  children: "Select all"
151
151
  }
152
152
  ),
153
- u && /* @__PURE__ */ e.jsx(
154
- j,
153
+ g && /* @__PURE__ */ e.jsx(
154
+ f,
155
155
  {
156
156
  variant: "link",
157
157
  size: "sm",
@@ -160,8 +160,8 @@ const X = f(
160
160
  children: "Inverse"
161
161
  }
162
162
  ),
163
- m && /* @__PURE__ */ e.jsx(
164
- j,
163
+ u && /* @__PURE__ */ e.jsx(
164
+ f,
165
165
  {
166
166
  variant: "link",
167
167
  size: "sm",
@@ -178,8 +178,8 @@ const X = f(
178
178
  {
179
179
  value: s.selectedValue,
180
180
  onValueChange: s.onChange,
181
- className: "grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto",
182
- children: b.map((a) => /* @__PURE__ */ e.jsx(
181
+ className: "grid grid-cols-2 gap-4 overflow-y-auto",
182
+ children: y.map((a) => /* @__PURE__ */ e.jsx(
183
183
  S,
184
184
  {
185
185
  label: a.label,
@@ -189,12 +189,11 @@ const X = f(
189
189
  a.value
190
190
  ))
191
191
  }
192
- ) : z && "selectedValues" in s ? /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-2 gap-x-4 gap-y-5 overflow-y-auto", children: b.map((a) => /* @__PURE__ */ e.jsx(
192
+ ) : z && "selectedValues" in s ? /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-2 gap-4 overflow-y-auto", children: y.map((a) => /* @__PURE__ */ e.jsx(
193
193
  V,
194
194
  {
195
195
  label: a.label,
196
196
  description: a.description,
197
- icon: a.icon,
198
197
  checked: s.selectedValues.includes(a.value),
199
198
  onCheckedChange: () => G(a.value)
200
199
  },
@@ -204,65 +203,51 @@ const X = f(
204
203
  }
205
204
  );
206
205
  X.displayName = "FilterSection";
207
- const V = f(({ label: s, checked: t, onCheckedChange: n, description: l, className: i, maxLabelLength: c = 14, icon: r }, o) => {
208
- const x = s.length > c, u = x ? `${s.slice(0, c)}...` : s;
209
- return /* @__PURE__ */ e.jsxs("label", { className: g("flex items-start gap-2 cursor-pointer", i), children: [
210
- /* @__PURE__ */ e.jsx(E, { ref: o, checked: t, onCheckedChange: n }),
211
- r && /* @__PURE__ */ e.jsx(
212
- "img",
213
- {
214
- src: r,
215
- alt: "",
216
- className: "size-4 object-contain shrink-0",
217
- onError: (m) => {
218
- m.currentTarget.style.display = "none";
219
- }
220
- }
221
- ),
222
- /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1.5 min-w-0 flex-1", children: [
223
- /* @__PURE__ */ e.jsx(v, { content: x ? s : "", children: /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium leading-4 truncate", children: u }) }),
224
- l && /* @__PURE__ */ e.jsx("span", { className: "text-sm font-normal leading-5 text-muted-foreground truncate", children: l })
225
- ] })
226
- ] });
227
- });
206
+ const V = m(({ label: s, checked: t, onCheckedChange: n, description: l, className: i }, r) => /* @__PURE__ */ e.jsxs("label", { className: x("flex items-start gap-2 cursor-pointer", i), children: [
207
+ /* @__PURE__ */ e.jsx(L, { ref: r, checked: t, onCheckedChange: n }),
208
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-1.5", children: [
209
+ /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium leading-none", children: s }),
210
+ l && /* @__PURE__ */ e.jsx("span", { className: "text-sm font-normal leading-5 text-muted-foreground", children: l })
211
+ ] })
212
+ ] }));
228
213
  V.displayName = "FilterCheckboxOption";
229
- const S = f(
230
- ({ label: s, value: t, description: n, className: l }, i) => /* @__PURE__ */ e.jsxs("div", { className: g("flex items-start gap-3", l), children: [
231
- /* @__PURE__ */ e.jsx(L, { ref: i, value: t, id: `radio-${t}` }),
214
+ const S = m(
215
+ ({ label: s, value: t, description: n, className: l }, i) => /* @__PURE__ */ e.jsxs("div", { className: x("flex items-start gap-3", l), children: [
216
+ /* @__PURE__ */ e.jsx(E, { ref: i, value: t, id: `radio-${t}` }),
232
217
  /* @__PURE__ */ e.jsxs(
233
218
  "label",
234
219
  {
235
220
  htmlFor: `radio-${t}`,
236
221
  className: "flex flex-col gap-1.5 cursor-pointer flex-1 truncate",
237
222
  children: [
238
- /* @__PURE__ */ e.jsx(v, { content: s, children: /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium leading-4 truncate", children: s }) }),
239
- n && /* @__PURE__ */ e.jsx(v, { content: n, children: /* @__PURE__ */ e.jsx("span", { className: "text-sm font-normal leading-4 text-muted-foreground truncate", children: n }) })
223
+ /* @__PURE__ */ e.jsx(b, { content: s, children: /* @__PURE__ */ e.jsx("span", { className: "text-sm font-medium leading-none truncate", children: s }) }),
224
+ n && /* @__PURE__ */ e.jsx(b, { content: n, children: /* @__PURE__ */ e.jsx("span", { className: "text-sm font-normal leading-5 text-muted-foreground truncate", children: n }) })
240
225
  ]
241
226
  }
242
227
  )
243
228
  ] })
244
229
  );
245
230
  S.displayName = "FilterRadioOption";
246
- const q = f(
231
+ const q = m(
247
232
  ({
248
233
  children: s,
249
234
  showSearch: t = !1,
250
235
  searchPlaceholder: n = "Search...",
251
236
  searchValue: l,
252
237
  onSearchChange: i,
253
- className: c
254
- }, r) => /* @__PURE__ */ e.jsxs(
238
+ className: r
239
+ }, h) => /* @__PURE__ */ e.jsxs(
255
240
  "div",
256
241
  {
257
- ref: r,
258
- className: g(
259
- "flex flex-col gap-6 bg-background rounded-md p-6 min-w-[448px]",
260
- c
242
+ ref: h,
243
+ className: x(
244
+ "flex flex-col gap-6 bg-white rounded-md p-6 min-w-[448px]",
245
+ r
261
246
  ),
262
247
  children: [
263
248
  t && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsxs("div", { className: "relative", children: [
264
249
  /* @__PURE__ */ e.jsx(
265
- y,
250
+ v,
266
251
  {
267
252
  name: "MagnifyingGlass",
268
253
  className: "absolute left-3 top-1/2 -translate-y-1/2 size-4 text-muted-foreground"
@@ -1,2 +1,2 @@
1
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';
2
+ export { FilterDateRange, FilterDateRangeOption, type FilterDateRangeProps, type FilterDateRangeOptionProps, } from './filter-date-range';
@@ -1,274 +1,68 @@
1
1
  import { ReactNode, ComponentProps } from 'react';
2
2
  import { IconName } from '../icon';
3
3
  import { FilterSectionItem } from '../filter/filter';
4
- /**
5
- * Props for the FilterMenuItem component
6
- */
7
4
  interface FilterMenuItemProps extends ComponentProps<"button"> {
8
- /**
9
- * Optional icon to display at the start of the menu item
10
- */
11
5
  icon?: IconName;
12
- /**
13
- * Label text to display in the menu item
14
- */
15
6
  label: string;
16
- /**
17
- * Whether the menu item is currently active/selected
18
- * @default false
19
- */
20
7
  isActive?: boolean;
21
- /**
22
- * Whether to show a chevron icon at the end of the menu item
23
- * @default false
24
- */
25
8
  showChevron?: boolean;
26
9
  }
27
- /**
28
- * A single menu item in the filter sidebar
29
- */
30
10
  declare const FilterMenuItem: import('react').ForwardRefExoticComponent<Omit<FilterMenuItemProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
31
- /**
32
- * Props for the FilterMenu component (Sidebar)
33
- */
34
11
  interface FilterMenuProps {
35
- /**
36
- * Array of menu items to display in the sidebar
37
- */
38
12
  items: Array<{
39
- /**
40
- * Unique identifier for the menu item
41
- */
42
13
  id: string;
43
- /**
44
- * Optional icon to display in the menu item
45
- */
46
14
  icon?: IconName;
47
- /**
48
- * Label text for the menu item
49
- */
50
15
  label: string;
51
- /**
52
- * Whether to show a chevron icon
53
- */
54
16
  showChevron?: boolean;
55
17
  }>;
56
- /**
57
- * ID of the currently active/selected menu item
58
- */
59
18
  activeItemId?: string;
60
- /**
61
- * Callback fired when a menu item is clicked
62
- */
63
19
  onItemClick?: (itemId: string) => void;
64
- /**
65
- * Optional CSS class name
66
- */
67
20
  className?: string;
68
21
  }
69
- /**
70
- * Sidebar menu displaying available filter options
71
- */
72
22
  declare const FilterMenu: import('react').ForwardRefExoticComponent<FilterMenuProps & import('react').RefAttributes<HTMLDivElement>>;
73
- /**
74
- * Configuration for a single filter in the FilterDropdown
75
- */
76
23
  interface FilterConfig {
77
- /**
78
- * Unique identifier for the filter
79
- */
80
24
  id: string;
81
- /**
82
- * Optional icon to display in the filter menu
83
- */
84
25
  icon?: IconName;
85
- /**
86
- * Label text for the filter
87
- */
88
26
  label: string;
89
- /**
90
- * Type of filter to render
91
- */
92
- type: "checkbox" | "radio" | "custom" | "date";
93
- /**
94
- * Items for checkbox/radio type filters
95
- */
27
+ type: 'checkbox' | 'radio' | 'custom' | 'date';
96
28
  items?: FilterSectionItem[];
97
- /**
98
- * Selected values for checkbox type filters
99
- */
100
29
  selectedValues?: string[];
101
- /**
102
- * Callback fired when checkbox selections change
103
- */
104
30
  onChange?: (values: string[]) => void;
105
- /**
106
- * Selected value for radio type filters
107
- */
108
31
  selectedValue?: string;
109
- /**
110
- * Callback fired when radio selection changes
111
- */
112
32
  onValueChange?: (value: string) => void;
113
- /**
114
- * Current date range selection value (e.g., "last-7-days", "custom")
115
- */
116
33
  dateValue?: string;
117
- /**
118
- * Start date for date type filters
119
- */
120
34
  dateInit?: Date;
121
- /**
122
- * End date for date type filters
123
- */
124
35
  dateEnd?: Date;
125
- /**
126
- * Start time in HH:mm:ss format
127
- */
128
36
  startTime?: string;
129
- /**
130
- * End time in HH:mm:ss format
131
- */
132
37
  endTime?: string;
133
- /**
134
- * Date picker mode: 'range' shows two date pickers, 'single' shows one
135
- * @default 'range'
136
- */
137
- dateMode?: "range" | "single";
138
- /**
139
- * Label for single day picker when dateMode is 'single'
140
- */
38
+ dateMode?: 'range' | 'single';
141
39
  singleDayLabel?: string;
142
- /**
143
- * Whether to show "All time" option in date filter
144
- * @default false
145
- */
146
40
  showAllTime?: boolean;
147
- /**
148
- * Callback fired when date range selection changes
149
- */
150
41
  onDateValueChange?: (value: string) => void;
151
- /**
152
- * Callback fired when start date changes
153
- */
154
42
  onDateInitChange?: (date: Date | undefined) => void;
155
- /**
156
- * Callback fired when end date changes
157
- */
158
43
  onDateEndChange?: (date: Date | undefined) => void;
159
- /**
160
- * Callback fired when start time changes
161
- */
162
44
  onStartTimeChange?: (time: string) => void;
163
- /**
164
- * Callback fired when end time changes
165
- */
166
45
  onEndTimeChange?: (time: string) => void;
167
- /**
168
- * Whether the filter items are searchable
169
- */
170
46
  searchable?: boolean;
171
- /**
172
- * Placeholder text for the search input
173
- */
174
47
  searchPlaceholder?: string;
175
- /**
176
- * Whether to show action buttons (Select All, Inverse, None)
177
- */
178
48
  showActions?: boolean;
179
- /**
180
- * Whether to enable "Select All" action
181
- */
182
49
  enableSelectAll?: boolean;
183
- /**
184
- * Whether to enable "Inverse" action
185
- */
186
50
  enableInverse?: boolean;
187
- /**
188
- * Whether to enable "None" action
189
- */
190
51
  enableNone?: boolean;
191
- /**
192
- * Whether this filter can be cleared from applied filters
193
- * @default true
194
- */
195
52
  clearable?: boolean;
196
- /**
197
- * Custom render function for 'custom' type filters
198
- */
199
53
  renderContent?: () => ReactNode;
200
54
  }
201
- /**
202
- * Props for the FilterDropdown component
203
- */
204
55
  interface FilterDropdownProps {
205
- /**
206
- * Array of filter configurations to display
207
- */
208
56
  filters: FilterConfig[];
209
- /**
210
- * Array of currently applied filters to display as badges
211
- */
212
57
  appliedFilters?: Array<{
213
- /**
214
- * ID of the applied filter (should match a FilterConfig id)
215
- */
216
58
  id: string;
217
- /**
218
- * Label to display in the badge
219
- */
220
59
  label: string;
221
60
  }>;
222
- /**
223
- * Callback fired when a filter badge is removed
224
- */
225
61
  onRemoveFilter?: (filterId: string) => void;
226
- /**
227
- * Callback fired when "Clear filters" button is clicked
228
- */
229
62
  onClearAllFilters?: () => void;
230
- /**
231
- * Text to display in the trigger button
232
- * @default "Add filter"
233
- */
234
63
  buttonText?: string;
235
- /**
236
- * Maximum number of filter badges to show before displaying "+X more"
237
- * @default 4
238
- */
239
64
  maxVisibleTags?: number;
240
- /**
241
- * Optional CSS class name for the root element
242
- */
243
65
  className?: string;
244
- /**
245
- * Whether the filter dropdown is disabled
246
- * @default false
247
- */
248
- disabled?: boolean;
249
66
  }
250
- /**
251
- * Advanced filter dropdown component with sidebar navigation and multiple filter types.
252
- * Supports checkbox, radio, date range, and custom filters with applied filter badges.
253
- *
254
- * @example
255
- * ```tsx
256
- * <FilterDropdown
257
- * filters={[
258
- * {
259
- * id: 'status',
260
- * label: 'Status',
261
- * type: 'checkbox',
262
- * items: [{ value: 'active', label: 'Active' }],
263
- * selectedValues: ['active'],
264
- * onChange: (values) => console.log(values)
265
- * }
266
- * ]}
267
- * appliedFilters={[{ id: 'status', label: 'Status: Active' }]}
268
- * onRemoveFilter={(id) => console.log('Remove', id)}
269
- * onClearAllFilters={() => console.log('Clear all')}
270
- * />
271
- * ```
272
- */
273
67
  declare const FilterDropdown: import('react').ForwardRefExoticComponent<FilterDropdownProps & import('react').RefAttributes<HTMLDivElement>>;
274
68
  export { FilterDropdown, FilterMenu, FilterMenuItem, type FilterDropdownProps, type FilterConfig, type FilterMenuProps, type FilterMenuItemProps, };