@yuno-payments/dashboard-design-system 0.0.199 → 0.0.201
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.
|
@@ -126,10 +126,11 @@ const I = y(
|
|
|
126
126
|
{
|
|
127
127
|
value: _,
|
|
128
128
|
onValueChange: O,
|
|
129
|
+
className: "gap-2",
|
|
129
130
|
...L,
|
|
130
131
|
children: [
|
|
131
132
|
/* @__PURE__ */ e.jsx(c, { label: "Custom", value: o.CUSTOM }),
|
|
132
|
-
s && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 pl-7", children: [
|
|
133
|
+
s && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-4 pl-7 mb-2", children: [
|
|
133
134
|
S === "single" ? /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-3", children: /* @__PURE__ */ e.jsx(
|
|
134
135
|
f,
|
|
135
136
|
{
|
|
@@ -188,6 +188,10 @@ interface FilterConfig {
|
|
|
188
188
|
* Whether to enable "None" action
|
|
189
189
|
*/
|
|
190
190
|
enableNone?: boolean;
|
|
191
|
+
/**
|
|
192
|
+
* Optional description text to display below the search input and above the title
|
|
193
|
+
*/
|
|
194
|
+
description?: ReactNode;
|
|
191
195
|
/**
|
|
192
196
|
* Whether this filter can be cleared from applied filters
|
|
193
197
|
* @default true
|
|
@@ -88,7 +88,7 @@ const Y = v(
|
|
|
88
88
|
className: j,
|
|
89
89
|
disabled: V = !1
|
|
90
90
|
}, f) => {
|
|
91
|
-
const [
|
|
91
|
+
const [p, x] = E(!1), [w, N] = E(
|
|
92
92
|
r.length > 0 && r[0]?.id || ""
|
|
93
93
|
), y = H(null), z = _(
|
|
94
94
|
(t) => {
|
|
@@ -97,23 +97,23 @@ const Y = v(
|
|
|
97
97
|
[f]
|
|
98
98
|
);
|
|
99
99
|
K(() => {
|
|
100
|
-
if (!
|
|
100
|
+
if (!p) return;
|
|
101
101
|
const t = (s) => {
|
|
102
102
|
const c = s.target;
|
|
103
103
|
y.current?.contains(c) || c.closest?.(
|
|
104
104
|
"[data-radix-popper-content-wrapper], [data-radix-portal]"
|
|
105
105
|
) || c.closest?.(
|
|
106
106
|
".rdp, .rdp-root, [data-calendar]"
|
|
107
|
-
) ||
|
|
107
|
+
) || x(!1);
|
|
108
108
|
}, a = (s) => {
|
|
109
|
-
s.key === "Escape" &&
|
|
109
|
+
s.key === "Escape" && x(!1);
|
|
110
110
|
}, i = setTimeout(() => {
|
|
111
111
|
document.addEventListener("mousedown", t), document.addEventListener("keydown", a);
|
|
112
112
|
}, 0);
|
|
113
113
|
return () => {
|
|
114
114
|
clearTimeout(i), document.removeEventListener("mousedown", t), document.removeEventListener("keydown", a);
|
|
115
115
|
};
|
|
116
|
-
}, [
|
|
116
|
+
}, [p]);
|
|
117
117
|
const O = l.length > 0, R = l.slice(0, o), T = l.length - o, D = (t) => {
|
|
118
118
|
if (r.find((s) => s.id === t)) return t;
|
|
119
119
|
const i = t.split("-");
|
|
@@ -127,7 +127,7 @@ const Y = v(
|
|
|
127
127
|
return r.find((s) => s.id === a)?.clearable !== !1;
|
|
128
128
|
}, L = (t) => {
|
|
129
129
|
const a = D(t);
|
|
130
|
-
N(a),
|
|
130
|
+
N(a), x(!0);
|
|
131
131
|
}, P = l.some(
|
|
132
132
|
(t) => F(t.id)
|
|
133
133
|
), U = r.map((t) => ({
|
|
@@ -151,7 +151,8 @@ const Y = v(
|
|
|
151
151
|
showActions: e.showActions,
|
|
152
152
|
enableSelectAll: e.enableSelectAll,
|
|
153
153
|
enableInverse: e.enableInverse,
|
|
154
|
-
enableNone: e.enableNone
|
|
154
|
+
enableNone: e.enableNone,
|
|
155
|
+
description: e.description
|
|
155
156
|
}
|
|
156
157
|
);
|
|
157
158
|
case "radio":
|
|
@@ -169,7 +170,8 @@ const Y = v(
|
|
|
169
170
|
showActions: e.showActions,
|
|
170
171
|
enableSelectAll: e.enableSelectAll,
|
|
171
172
|
enableInverse: e.enableInverse,
|
|
172
|
-
enableNone: e.enableNone
|
|
173
|
+
enableNone: e.enableNone,
|
|
174
|
+
description: e.description
|
|
173
175
|
}
|
|
174
176
|
);
|
|
175
177
|
case "date": {
|
|
@@ -223,7 +225,7 @@ const Y = v(
|
|
|
223
225
|
variant: "outline",
|
|
224
226
|
size: "sm",
|
|
225
227
|
className: "gap-2",
|
|
226
|
-
onClick: () =>
|
|
228
|
+
onClick: () => x(!p),
|
|
227
229
|
disabled: V,
|
|
228
230
|
children: [
|
|
229
231
|
/* @__PURE__ */ n.jsx(C, { name: "FunnelSimple", className: "size-4" }),
|
|
@@ -282,7 +284,7 @@ const Y = v(
|
|
|
282
284
|
/* @__PURE__ */ n.jsx("span", { className: "text-sm font-normal text-muted-foreground", children: "No filters applied" })
|
|
283
285
|
] })
|
|
284
286
|
] }),
|
|
285
|
-
|
|
287
|
+
p && /* @__PURE__ */ n.jsxs(
|
|
286
288
|
"div",
|
|
287
289
|
{
|
|
288
290
|
className: d(
|