@harpercollins/harpercollins-design-system 1.31.0 → 1.33.0
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.
- package/dist/cjs/components/data-display/Table/Table.cjs +1 -1
- package/dist/cjs/components/data-display/Table/filters/FilterComponents.cjs +4 -4
- package/dist/cjs/components/feedback/LinearProgress/LinearProgress.cjs +1 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/LinearProgress/LinearProgress.cjs +29 -0
- package/dist/cjs/node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/LinearProgress/linearProgressClasses.cjs +1 -0
- package/dist/esm/components/data-display/Table/Table.js +18 -18
- package/dist/esm/components/data-display/Table/filters/FilterComponents.js +143 -140
- package/dist/esm/components/feedback/LinearProgress/LinearProgress.js +8 -0
- package/dist/esm/index.js +176 -174
- package/dist/esm/node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/LinearProgress/LinearProgress.js +262 -0
- package/dist/esm/node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/LinearProgress/linearProgressClasses.js +8 -0
- package/dist/index.d.ts +3 -0
- package/package.json +1 -1
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
import { jsx as t, jsxs as m } from "react/jsx-runtime";
|
|
2
|
-
import { faFilter as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import { faFilter as I } from "../../../../node_modules/.pnpm/@fortawesome_free-solid-svg-icons@6.7.2/node_modules/@fortawesome/free-solid-svg-icons/index.js";
|
|
3
|
+
import r from "react";
|
|
4
|
+
import C from "styled-components";
|
|
5
5
|
import z from "../../../inputs/RadioButton/RadioButton.js";
|
|
6
6
|
import D from "../../../navigation/Dropdown/Dropdown.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import A from "../../../navigation/Menu/Menu.js";
|
|
8
|
+
import R from "../../Icon/Icon.js";
|
|
9
9
|
import g from "../../../../node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/Box/Box.js";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
10
|
+
import b from "../../../../node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/List/List.js";
|
|
11
|
+
import F from "../../../../node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/ListItem/ListItem.js";
|
|
12
|
+
import E from "../../../../node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/Checkbox/Checkbox.js";
|
|
13
13
|
import x from "../../../../node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/Input/Input.js";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
function
|
|
19
|
-
const { header:
|
|
20
|
-
return String(typeof
|
|
14
|
+
import S from "../../../../node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/Button/Button.js";
|
|
15
|
+
import k from "../../../../node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/Badge/Badge.js";
|
|
16
|
+
import M from "../../../../node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/MenuButton/MenuButton.js";
|
|
17
|
+
import L from "../../../../node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/IconButton/IconButton.js";
|
|
18
|
+
function V(e) {
|
|
19
|
+
const { header: i } = e.columnDef;
|
|
20
|
+
return String(typeof i == "function" ? i({ column: e }) : i);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const B = C(g)`
|
|
23
23
|
padding: 12px;
|
|
24
24
|
min-width: 250px;
|
|
25
25
|
display: flex;
|
|
26
26
|
flex-direction: column;
|
|
27
27
|
gap: 12px;
|
|
28
|
-
`,
|
|
28
|
+
`, H = C(g)`
|
|
29
29
|
display: flex;
|
|
30
30
|
justify-content: space-between;
|
|
31
31
|
align-items: center;
|
|
32
32
|
font-weight: 600;
|
|
33
33
|
font-size: 14px;
|
|
34
34
|
margin-bottom: 4px;
|
|
35
|
-
`,
|
|
35
|
+
`, T = C(g)`
|
|
36
36
|
display: flex;
|
|
37
37
|
gap: 8px;
|
|
38
38
|
justify-content: flex-end;
|
|
@@ -42,19 +42,19 @@ const L = F(g)`
|
|
|
42
42
|
`;
|
|
43
43
|
function v({
|
|
44
44
|
column: e,
|
|
45
|
-
onApply:
|
|
45
|
+
onApply: i,
|
|
46
46
|
onClear: n,
|
|
47
47
|
children: l
|
|
48
48
|
}) {
|
|
49
|
-
return /* @__PURE__ */ m(
|
|
50
|
-
/* @__PURE__ */ m(
|
|
49
|
+
return /* @__PURE__ */ m(B, { children: [
|
|
50
|
+
/* @__PURE__ */ m(H, { children: [
|
|
51
51
|
"Filter by ",
|
|
52
|
-
|
|
52
|
+
V(e)
|
|
53
53
|
] }),
|
|
54
54
|
l,
|
|
55
|
-
/* @__PURE__ */ m(
|
|
55
|
+
/* @__PURE__ */ m(T, { children: [
|
|
56
56
|
/* @__PURE__ */ t(
|
|
57
|
-
|
|
57
|
+
S,
|
|
58
58
|
{
|
|
59
59
|
"aria-label": "Clear filter",
|
|
60
60
|
size: "sm",
|
|
@@ -64,75 +64,75 @@ function v({
|
|
|
64
64
|
}
|
|
65
65
|
),
|
|
66
66
|
/* @__PURE__ */ t(
|
|
67
|
-
|
|
67
|
+
S,
|
|
68
68
|
{
|
|
69
69
|
"aria-label": "Apply filter",
|
|
70
70
|
size: "sm",
|
|
71
71
|
variant: "solid",
|
|
72
72
|
color: "primary",
|
|
73
|
-
onClick:
|
|
73
|
+
onClick: i,
|
|
74
74
|
children: "Apply"
|
|
75
75
|
}
|
|
76
76
|
)
|
|
77
77
|
] })
|
|
78
78
|
] });
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function K({
|
|
81
81
|
column: e,
|
|
82
|
-
onClose:
|
|
82
|
+
onClose: i
|
|
83
83
|
}) {
|
|
84
|
-
const [n, l] =
|
|
84
|
+
const [n, l] = r.useState(
|
|
85
85
|
e.getFilterValue() ?? ""
|
|
86
|
-
),
|
|
87
|
-
e.setFilterValue(n || void 0),
|
|
86
|
+
), p = () => {
|
|
87
|
+
e.setFilterValue(n || void 0), i?.();
|
|
88
88
|
};
|
|
89
|
-
return /* @__PURE__ */ t(v, { column: e, onApply:
|
|
89
|
+
return /* @__PURE__ */ t(v, { column: e, onApply: p, onClear: () => {
|
|
90
90
|
l(""), e.setFilterValue(void 0);
|
|
91
91
|
}, children: /* @__PURE__ */ t(
|
|
92
92
|
x,
|
|
93
93
|
{
|
|
94
94
|
placeholder: "Search...",
|
|
95
95
|
value: n,
|
|
96
|
-
onChange: (
|
|
97
|
-
onKeyDown: (
|
|
98
|
-
|
|
96
|
+
onChange: (a) => l(a.target.value),
|
|
97
|
+
onKeyDown: (a) => {
|
|
98
|
+
a.key === "Enter" && p();
|
|
99
99
|
},
|
|
100
100
|
size: "sm",
|
|
101
101
|
autoFocus: !0
|
|
102
102
|
}
|
|
103
103
|
) });
|
|
104
104
|
}
|
|
105
|
-
function
|
|
105
|
+
function O({
|
|
106
106
|
column: e,
|
|
107
|
-
onClose:
|
|
107
|
+
onClose: i
|
|
108
108
|
}) {
|
|
109
|
-
const n = e.getFilterValue(), [l,
|
|
109
|
+
const n = e.getFilterValue(), [l, p] = r.useState(
|
|
110
110
|
n?.min?.toString() ?? ""
|
|
111
|
-
), [
|
|
111
|
+
), [d, a] = r.useState(
|
|
112
112
|
n?.max?.toString() ?? ""
|
|
113
|
-
),
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
), f = r.useRef(null);
|
|
114
|
+
r.useEffect(() => {
|
|
115
|
+
f.current?.focus({
|
|
116
116
|
preventScroll: !0
|
|
117
117
|
});
|
|
118
118
|
}, []);
|
|
119
119
|
const c = () => {
|
|
120
|
-
const
|
|
121
|
-
|
|
120
|
+
const s = l ? parseFloat(l) : void 0, u = d ? parseFloat(d) : void 0;
|
|
121
|
+
s !== void 0 || u !== void 0 ? e.setFilterValue({ min: s, max: u }) : e.setFilterValue(void 0), i?.();
|
|
122
122
|
};
|
|
123
123
|
return /* @__PURE__ */ t(v, { column: e, onApply: c, onClear: () => {
|
|
124
|
-
|
|
124
|
+
p(""), a(""), e.setFilterValue(void 0);
|
|
125
125
|
}, children: /* @__PURE__ */ m(g, { sx: { display: "flex", gap: 1, alignItems: "center" }, children: [
|
|
126
126
|
/* @__PURE__ */ t(
|
|
127
127
|
x,
|
|
128
128
|
{
|
|
129
|
-
slotProps: { input: { ref:
|
|
129
|
+
slotProps: { input: { ref: f } },
|
|
130
130
|
placeholder: "Min",
|
|
131
131
|
type: "number",
|
|
132
132
|
value: l,
|
|
133
|
-
onChange: (
|
|
134
|
-
onKeyDown: (
|
|
135
|
-
|
|
133
|
+
onChange: (s) => p(s.target.value),
|
|
134
|
+
onKeyDown: (s) => {
|
|
135
|
+
s.key === "Enter" && c();
|
|
136
136
|
},
|
|
137
137
|
size: "sm",
|
|
138
138
|
sx: { flex: 1 }
|
|
@@ -144,10 +144,10 @@ function K({
|
|
|
144
144
|
{
|
|
145
145
|
placeholder: "Max",
|
|
146
146
|
type: "number",
|
|
147
|
-
value:
|
|
148
|
-
onChange: (
|
|
149
|
-
onKeyDown: (
|
|
150
|
-
|
|
147
|
+
value: d,
|
|
148
|
+
onChange: (s) => a(s.target.value),
|
|
149
|
+
onKeyDown: (s) => {
|
|
150
|
+
s.key === "Enter" && c();
|
|
151
151
|
},
|
|
152
152
|
size: "sm",
|
|
153
153
|
sx: { flex: 1 }
|
|
@@ -155,30 +155,30 @@ function K({
|
|
|
155
155
|
)
|
|
156
156
|
] }) });
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function P({
|
|
159
159
|
column: e,
|
|
160
|
-
onClose:
|
|
160
|
+
onClose: i
|
|
161
161
|
}) {
|
|
162
|
-
const n = e.getFilterValue(), [l,
|
|
162
|
+
const n = e.getFilterValue(), [l, p] = r.useState(
|
|
163
163
|
n?.start ? n.start.toISOString().split("T")[0] : ""
|
|
164
|
-
), [
|
|
164
|
+
), [d, a] = r.useState(
|
|
165
165
|
n?.end ? n.end.toISOString().split("T")[0] : ""
|
|
166
|
-
),
|
|
167
|
-
|
|
166
|
+
), f = r.useRef(null), c = r.useRef(null);
|
|
167
|
+
r.useEffect(() => {
|
|
168
168
|
c.current?.focus({
|
|
169
169
|
preventScroll: !0
|
|
170
170
|
});
|
|
171
171
|
}, []);
|
|
172
|
-
const
|
|
173
|
-
const u = l ? new Date(l) : void 0,
|
|
174
|
-
u !== void 0 ||
|
|
172
|
+
const o = () => {
|
|
173
|
+
const u = l ? new Date(l) : void 0, y = d ? new Date(d) : void 0;
|
|
174
|
+
u !== void 0 || y !== void 0 ? e.setFilterValue({ start: u, end: y }) : e.setFilterValue(void 0), i?.();
|
|
175
175
|
};
|
|
176
|
-
return /* @__PURE__ */ t(v, { column: e, onApply:
|
|
177
|
-
|
|
176
|
+
return /* @__PURE__ */ t(v, { column: e, onApply: o, onClear: () => {
|
|
177
|
+
p(""), a(""), e.setFilterValue(void 0);
|
|
178
178
|
}, children: /* @__PURE__ */ m(
|
|
179
179
|
g,
|
|
180
180
|
{
|
|
181
|
-
ref:
|
|
181
|
+
ref: f,
|
|
182
182
|
tabIndex: 0,
|
|
183
183
|
sx: {
|
|
184
184
|
display: "flex",
|
|
@@ -196,9 +196,9 @@ function O({
|
|
|
196
196
|
type: "date",
|
|
197
197
|
value: l,
|
|
198
198
|
ref: c,
|
|
199
|
-
onChange: (u) =>
|
|
199
|
+
onChange: (u) => p(u.target.value),
|
|
200
200
|
onKeyDown: (u) => {
|
|
201
|
-
u.key === "Enter" &&
|
|
201
|
+
u.key === "Enter" && o();
|
|
202
202
|
},
|
|
203
203
|
size: "sm",
|
|
204
204
|
slotProps: {
|
|
@@ -213,10 +213,10 @@ function O({
|
|
|
213
213
|
x,
|
|
214
214
|
{
|
|
215
215
|
type: "date",
|
|
216
|
-
value:
|
|
217
|
-
onChange: (u) =>
|
|
216
|
+
value: d,
|
|
217
|
+
onChange: (u) => a(u.target.value),
|
|
218
218
|
onKeyDown: (u) => {
|
|
219
|
-
u.key === "Enter" &&
|
|
219
|
+
u.key === "Enter" && o();
|
|
220
220
|
},
|
|
221
221
|
size: "sm",
|
|
222
222
|
slotProps: {
|
|
@@ -230,102 +230,105 @@ function O({
|
|
|
230
230
|
}
|
|
231
231
|
) });
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function j({
|
|
234
234
|
column: e,
|
|
235
|
-
options:
|
|
235
|
+
options: i,
|
|
236
236
|
searchable: n = !1,
|
|
237
237
|
onClose: l
|
|
238
238
|
}) {
|
|
239
|
-
const [
|
|
239
|
+
const [p, d] = r.useState(
|
|
240
240
|
e.getFilterValue() ?? ""
|
|
241
|
-
), [
|
|
242
|
-
|
|
243
|
-
n
|
|
241
|
+
), [a, f] = r.useState(""), c = r.useRef(null), o = r.useRef(null);
|
|
242
|
+
r.useEffect(() => {
|
|
243
|
+
n ? c.current?.focus({ preventScroll: !0 }) : o.current?.focus({ preventScroll: !0 });
|
|
244
244
|
}, [n]);
|
|
245
|
-
const
|
|
246
|
-
() =>
|
|
247
|
-
(
|
|
248
|
-
) :
|
|
249
|
-
[
|
|
245
|
+
const s = r.useMemo(
|
|
246
|
+
() => a ? i.filter(
|
|
247
|
+
(h) => h.label.toLowerCase().includes(a.toLowerCase())
|
|
248
|
+
) : i,
|
|
249
|
+
[i, a]
|
|
250
250
|
);
|
|
251
251
|
return /* @__PURE__ */ m(v, { column: e, onApply: () => {
|
|
252
|
-
e.setFilterValue(
|
|
252
|
+
e.setFilterValue(p || void 0), l?.();
|
|
253
253
|
}, onClear: () => {
|
|
254
|
-
|
|
254
|
+
d(""), f(""), e.setFilterValue(void 0);
|
|
255
255
|
}, children: [
|
|
256
256
|
n && /* @__PURE__ */ t(
|
|
257
257
|
x,
|
|
258
258
|
{
|
|
259
259
|
slotProps: { input: { ref: c } },
|
|
260
260
|
placeholder: "Search...",
|
|
261
|
-
value:
|
|
262
|
-
onChange: (
|
|
261
|
+
value: a,
|
|
262
|
+
onChange: (h) => f(h.target.value),
|
|
263
263
|
size: "sm"
|
|
264
264
|
}
|
|
265
265
|
),
|
|
266
266
|
/* @__PURE__ */ m(
|
|
267
|
-
|
|
267
|
+
b,
|
|
268
268
|
{
|
|
269
|
+
ref: o,
|
|
269
270
|
component: "ul",
|
|
270
271
|
size: "sm",
|
|
271
272
|
role: "group",
|
|
273
|
+
tabIndex: 0,
|
|
272
274
|
sx: {
|
|
273
275
|
maxHeight: n ? "200px" : "240px",
|
|
274
276
|
overflowY: "auto",
|
|
275
|
-
outline: "none"
|
|
277
|
+
outline: "none",
|
|
278
|
+
"&:focus": { outline: "none" }
|
|
276
279
|
},
|
|
277
280
|
children: [
|
|
278
|
-
|
|
279
|
-
|
|
281
|
+
s.map((h) => /* @__PURE__ */ t(
|
|
282
|
+
F,
|
|
280
283
|
{
|
|
281
284
|
component: "li",
|
|
282
285
|
sx: { paddingLeft: 0, paddingTop: 0 },
|
|
283
286
|
children: /* @__PURE__ */ t(
|
|
284
287
|
z,
|
|
285
288
|
{
|
|
286
|
-
value:
|
|
287
|
-
label:
|
|
289
|
+
value: h.value,
|
|
290
|
+
label: h.label,
|
|
288
291
|
size: "sm",
|
|
289
|
-
checked:
|
|
290
|
-
onChange: (
|
|
292
|
+
checked: p === h.value,
|
|
293
|
+
onChange: (w) => d(w.target.value),
|
|
291
294
|
sx: {
|
|
292
295
|
width: "100%"
|
|
293
296
|
}
|
|
294
297
|
}
|
|
295
298
|
)
|
|
296
299
|
},
|
|
297
|
-
|
|
300
|
+
h.value
|
|
298
301
|
)),
|
|
299
|
-
|
|
302
|
+
s.length === 0 && /* @__PURE__ */ t(F, { component: "li", sx: { color: "text.tertiary" }, children: "No options match" })
|
|
300
303
|
]
|
|
301
304
|
}
|
|
302
305
|
)
|
|
303
306
|
] });
|
|
304
307
|
}
|
|
305
|
-
function
|
|
308
|
+
function N({
|
|
306
309
|
column: e,
|
|
307
|
-
options:
|
|
310
|
+
options: i,
|
|
308
311
|
onClose: n
|
|
309
312
|
}) {
|
|
310
|
-
const [l,
|
|
313
|
+
const [l, p] = r.useState(
|
|
311
314
|
e.getFilterValue() ?? []
|
|
312
|
-
),
|
|
313
|
-
|
|
314
|
-
|
|
315
|
+
), d = r.useRef(null);
|
|
316
|
+
r.useEffect(() => {
|
|
317
|
+
d.current?.focus();
|
|
315
318
|
}, []);
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
(
|
|
319
|
+
const a = (o) => {
|
|
320
|
+
p(
|
|
321
|
+
(s) => s.includes(o) ? s.filter((u) => u !== o) : [...s, o]
|
|
319
322
|
);
|
|
320
323
|
};
|
|
321
324
|
return /* @__PURE__ */ t(v, { column: e, onApply: () => {
|
|
322
325
|
e.setFilterValue(l.length > 0 ? l : void 0), n?.();
|
|
323
326
|
}, onClear: () => {
|
|
324
|
-
|
|
327
|
+
p([]), e.setFilterValue(void 0);
|
|
325
328
|
}, children: /* @__PURE__ */ t(
|
|
326
|
-
|
|
329
|
+
b,
|
|
327
330
|
{
|
|
328
|
-
ref:
|
|
331
|
+
ref: d,
|
|
329
332
|
component: "ul",
|
|
330
333
|
size: "sm",
|
|
331
334
|
tabIndex: 0,
|
|
@@ -338,49 +341,49 @@ function j({
|
|
|
338
341
|
outline: "none"
|
|
339
342
|
}
|
|
340
343
|
},
|
|
341
|
-
children:
|
|
342
|
-
|
|
344
|
+
children: i.map((o) => /* @__PURE__ */ t(
|
|
345
|
+
F,
|
|
343
346
|
{
|
|
344
347
|
component: "li",
|
|
345
348
|
sx: { paddingLeft: 0, paddingTop: 0 },
|
|
346
349
|
children: /* @__PURE__ */ t(
|
|
347
|
-
|
|
350
|
+
E,
|
|
348
351
|
{
|
|
349
|
-
label:
|
|
350
|
-
checked: l.includes(
|
|
351
|
-
onChange: () => o
|
|
352
|
+
label: o.label,
|
|
353
|
+
checked: l.includes(o.value),
|
|
354
|
+
onChange: () => a(o.value),
|
|
352
355
|
size: "sm",
|
|
353
356
|
sx: {
|
|
354
357
|
width: "100%"
|
|
355
358
|
}
|
|
356
359
|
},
|
|
357
|
-
|
|
360
|
+
o.value
|
|
358
361
|
)
|
|
359
362
|
},
|
|
360
|
-
|
|
363
|
+
o.value
|
|
361
364
|
))
|
|
362
365
|
}
|
|
363
366
|
) });
|
|
364
367
|
}
|
|
365
|
-
const
|
|
366
|
-
text:
|
|
367
|
-
number:
|
|
368
|
-
date:
|
|
369
|
-
select:
|
|
370
|
-
multiselect:
|
|
368
|
+
const W = {
|
|
369
|
+
text: K,
|
|
370
|
+
number: O,
|
|
371
|
+
date: P,
|
|
372
|
+
select: j,
|
|
373
|
+
multiselect: N
|
|
371
374
|
};
|
|
372
375
|
function ae({
|
|
373
376
|
column: e,
|
|
374
|
-
filterType:
|
|
377
|
+
filterType: i = "text",
|
|
375
378
|
filterOptions: n = [],
|
|
376
379
|
filterSearchable: l
|
|
377
380
|
}) {
|
|
378
|
-
const [
|
|
379
|
-
|
|
380
|
-
},
|
|
381
|
-
return /* @__PURE__ */ m(D, { open:
|
|
381
|
+
const [p, d] = r.useState(!1), a = () => {
|
|
382
|
+
d(!1);
|
|
383
|
+
}, f = W[i];
|
|
384
|
+
return /* @__PURE__ */ m(D, { open: p, onOpenChange: (c, o) => d(o), children: [
|
|
382
385
|
/* @__PURE__ */ t(
|
|
383
|
-
|
|
386
|
+
k,
|
|
384
387
|
{
|
|
385
388
|
badgeContent: "",
|
|
386
389
|
invisible: !e.getIsFiltered(),
|
|
@@ -396,12 +399,12 @@ function ae({
|
|
|
396
399
|
}
|
|
397
400
|
},
|
|
398
401
|
children: /* @__PURE__ */ t(
|
|
399
|
-
|
|
402
|
+
M,
|
|
400
403
|
{
|
|
401
|
-
"aria-label": `${e.getIsFiltered() ? "Filtered" : "Filter"} by ${
|
|
404
|
+
"aria-label": `${e.getIsFiltered() ? "Filtered" : "Filter"} by ${V(
|
|
402
405
|
e
|
|
403
406
|
)}`,
|
|
404
|
-
slots: { root:
|
|
407
|
+
slots: { root: L },
|
|
405
408
|
slotProps: {
|
|
406
409
|
root: {
|
|
407
410
|
size: "sm",
|
|
@@ -422,16 +425,16 @@ function ae({
|
|
|
422
425
|
}
|
|
423
426
|
}
|
|
424
427
|
},
|
|
425
|
-
children: /* @__PURE__ */ t(
|
|
428
|
+
children: /* @__PURE__ */ t(R, { icon: I, size: "xs" })
|
|
426
429
|
}
|
|
427
430
|
)
|
|
428
431
|
}
|
|
429
432
|
),
|
|
430
|
-
/* @__PURE__ */ t(
|
|
431
|
-
|
|
433
|
+
/* @__PURE__ */ t(A, { placement: "bottom-start", children: /* @__PURE__ */ t(
|
|
434
|
+
f,
|
|
432
435
|
{
|
|
433
436
|
column: e,
|
|
434
|
-
onClose:
|
|
437
|
+
onClose: a,
|
|
435
438
|
options: n,
|
|
436
439
|
searchable: l
|
|
437
440
|
}
|
|
@@ -440,10 +443,10 @@ function ae({
|
|
|
440
443
|
}
|
|
441
444
|
export {
|
|
442
445
|
ae as ColumnFilter,
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
446
|
+
P as DateFilter,
|
|
447
|
+
N as MultiSelectFilter,
|
|
448
|
+
O as NumericFilter,
|
|
449
|
+
j as SelectFilter,
|
|
450
|
+
K as TextFilter,
|
|
451
|
+
W as filterComponentMap
|
|
449
452
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import e from "../../../node_modules/.pnpm/@mui_joy@5.0.0-beta.52_@emotion_react@11.14.0_@types_react@18.3.28_react@18.3.1__@emoti_58201694b486b0db36cbf79098c4edaa/node_modules/@mui/joy/LinearProgress/LinearProgress.js";
|
|
3
|
+
function i(r) {
|
|
4
|
+
return /* @__PURE__ */ o(e, { ...r });
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
i as default
|
|
8
|
+
};
|