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