@harpercollins/harpercollins-design-system 1.35.3 → 1.36.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/DataGrid/DataGrid.cjs +1 -1
- package/dist/cjs/components/data-display/DataGrid/ManageColumnsDropdown.cjs +1 -0
- package/dist/cjs/components/data-display/DataGrid/TableToolbar.cjs +3 -3
- package/dist/cjs/components/data-display/DataGrid/hooks/useDataGrid.cjs +1 -1
- package/dist/cjs/components/data-display/Table/TableBody.cjs +1 -1
- package/dist/cjs/components/data-display/Table/TableLayout.cjs +1 -1
- package/dist/cjs/components/global/Layout/Layout.cjs +3 -3
- package/dist/cjs/components/global/Sidebar/Sidebar.cjs +1 -1
- package/dist/cjs/node_modules/.pnpm/@fortawesome_free-solid-svg-icons@6.7.2/node_modules/@fortawesome/free-solid-svg-icons/index.cjs +1 -1
- package/dist/esm/components/data-display/DataGrid/DataGrid.js +25 -24
- package/dist/esm/components/data-display/DataGrid/ManageColumnsDropdown.js +121 -0
- package/dist/esm/components/data-display/DataGrid/TableToolbar.js +25 -12
- package/dist/esm/components/data-display/DataGrid/hooks/useDataGrid.js +140 -119
- package/dist/esm/components/data-display/Table/TableBody.js +53 -47
- package/dist/esm/components/data-display/Table/TableLayout.js +46 -45
- package/dist/esm/components/global/Layout/Layout.js +28 -26
- package/dist/esm/components/global/Sidebar/Sidebar.js +1 -3
- package/dist/esm/node_modules/.pnpm/@fortawesome_free-solid-svg-icons@6.7.2/node_modules/@fortawesome/free-solid-svg-icons/index.js +38 -27
- 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/Divider/dividerClasses.js +3 -3
- package/dist/index.d.ts +15 -1
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useLocalStorage as
|
|
1
|
+
import { jsx as o, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import i from "styled-components";
|
|
3
|
+
import { useLocalStorage as h } from "../../../hooks/useLocalStorage.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
const
|
|
5
|
+
import u from "../Footer/Footer.js";
|
|
6
|
+
import b from "../Sidebar/Sidebar.js";
|
|
7
|
+
import y from "../ThemeProvider/ThemeProvider.js";
|
|
8
|
+
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/Box/Box.js";
|
|
9
|
+
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/Sheet/Sheet.js";
|
|
10
|
+
const v = i.div`
|
|
11
11
|
display: flex;
|
|
12
12
|
flex-direction: column;
|
|
13
13
|
height: 100vh;
|
|
14
14
|
width: 100%;
|
|
15
|
-
`,
|
|
15
|
+
`, L = i.a`
|
|
16
16
|
position: absolute;
|
|
17
17
|
top: -100%;
|
|
18
18
|
left: 0;
|
|
@@ -28,7 +28,7 @@ const k = n.div`
|
|
|
28
28
|
top: 0;
|
|
29
29
|
}
|
|
30
30
|
`;
|
|
31
|
-
function
|
|
31
|
+
function I({
|
|
32
32
|
children: a,
|
|
33
33
|
header: l,
|
|
34
34
|
theme: m = "light_internal",
|
|
@@ -37,32 +37,34 @@ function F({
|
|
|
37
37
|
sidebarWidth: r = 240,
|
|
38
38
|
collapsedSidebarWidth: t = 60,
|
|
39
39
|
sidebarHeaderContent: c,
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
sidebarFooterContent: f,
|
|
41
|
+
footerReleaseName: s,
|
|
42
|
+
footerCopyright: x
|
|
42
43
|
}) {
|
|
43
|
-
const [e,
|
|
44
|
+
const [e, g] = h(
|
|
44
45
|
"sidebarOpen",
|
|
45
46
|
!0
|
|
46
47
|
);
|
|
47
|
-
return /* @__PURE__ */ o(
|
|
48
|
-
/* @__PURE__ */ o(
|
|
48
|
+
return /* @__PURE__ */ o(y, { theme: m, children: /* @__PURE__ */ n(v, { children: [
|
|
49
|
+
/* @__PURE__ */ o(L, { href: "#main", children: "Skip to content" }),
|
|
49
50
|
l,
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ n(S, { sx: { display: "flex", flex: 1 }, children: [
|
|
51
52
|
p ? /* @__PURE__ */ o(
|
|
52
|
-
|
|
53
|
+
b,
|
|
53
54
|
{
|
|
54
55
|
sidebarOpen: e,
|
|
55
56
|
onSidebarToggle: () => {
|
|
56
|
-
|
|
57
|
+
g(!e);
|
|
57
58
|
},
|
|
58
59
|
sidebarContent: d,
|
|
59
60
|
sidebarWidth: r,
|
|
60
61
|
collapsedSidebarWidth: t,
|
|
61
|
-
headerContent: c
|
|
62
|
+
headerContent: c,
|
|
63
|
+
footerContent: f
|
|
62
64
|
}
|
|
63
65
|
) : null,
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
|
|
66
|
+
/* @__PURE__ */ n(
|
|
67
|
+
k,
|
|
66
68
|
{
|
|
67
69
|
component: "main",
|
|
68
70
|
id: "main",
|
|
@@ -83,10 +85,10 @@ function F({
|
|
|
83
85
|
children: [
|
|
84
86
|
a,
|
|
85
87
|
/* @__PURE__ */ o(
|
|
86
|
-
|
|
88
|
+
u,
|
|
87
89
|
{
|
|
88
|
-
releaseName:
|
|
89
|
-
copyright:
|
|
90
|
+
releaseName: s,
|
|
91
|
+
copyright: x
|
|
90
92
|
}
|
|
91
93
|
)
|
|
92
94
|
]
|
|
@@ -96,5 +98,5 @@ function F({
|
|
|
96
98
|
] }) });
|
|
97
99
|
}
|
|
98
100
|
export {
|
|
99
|
-
|
|
101
|
+
I as default
|
|
100
102
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const o = {
|
|
2
2
|
prefix: "fas",
|
|
3
3
|
iconName: "circle-notch",
|
|
4
4
|
icon: [512, 512, [], "f1ce", "M222.7 32.1c5 16.9-4.6 34.8-21.5 39.8C121.8 95.6 64 169.1 64 256c0 106 86 192 192 192s192-86 192-192c0-86.9-57.8-160.4-137.1-184.1c-16.9-5-26.6-22.9-21.5-39.8s22.9-26.6 39.8-21.5C434.9 42.1 512 140 512 256c0 141.4-114.6 256-256 256S0 397.4 0 256C0 140 77.1 42.1 182.9 10.6c16.9-5 34.8 4.6 39.8 21.5z"]
|
|
@@ -10,43 +10,51 @@ const s = {
|
|
|
10
10
|
prefix: "fas",
|
|
11
11
|
iconName: "circle-exclamation",
|
|
12
12
|
icon: [512, 512, ["exclamation-circle"], "f06a", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"]
|
|
13
|
-
},
|
|
13
|
+
}, n = {
|
|
14
14
|
prefix: "fas",
|
|
15
15
|
iconName: "chevron-up",
|
|
16
16
|
icon: [512, 512, [], "f077", "M233.4 105.4c12.5-12.5 32.8-12.5 45.3 0l192 192c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L256 173.3 86.6 342.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l192-192z"]
|
|
17
|
+
}, f = {
|
|
18
|
+
prefix: "fas",
|
|
19
|
+
iconName: "rotate-left",
|
|
20
|
+
icon: [512, 512, ["rotate-back", "rotate-backward", "undo-alt"], "f2ea", "M48.5 224L40 224c-13.3 0-24-10.7-24-24L16 72c0-9.7 5.8-18.5 14.8-22.2s19.3-1.7 26.2 5.2L98.6 96.6c87.6-86.5 228.7-86.2 315.8 1c87.5 87.5 87.5 229.3 0 316.8s-229.3 87.5-316.8 0c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0c62.5 62.5 163.8 62.5 226.3 0s62.5-163.8 0-226.3c-62.2-62.2-162.7-62.5-225.3-1L185 183c6.9 6.9 8.9 17.2 5.2 26.2s-12.5 14.8-22.2 14.8L48.5 224z"]
|
|
17
21
|
}, a = {
|
|
22
|
+
prefix: "fas",
|
|
23
|
+
iconName: "table-columns",
|
|
24
|
+
icon: [512, 512, ["columns"], "f0db", "M0 96C0 60.7 28.7 32 64 32l384 0c35.3 0 64 28.7 64 64l0 320c0 35.3-28.7 64-64 64L64 480c-35.3 0-64-28.7-64-64L0 96zm64 64l0 256 160 0 0-256L64 160zm384 0l-160 0 0 256 160 0 0-256z"]
|
|
25
|
+
}, r = a, s = {
|
|
18
26
|
prefix: "fas",
|
|
19
27
|
iconName: "circle-check",
|
|
20
28
|
icon: [512, 512, [61533, "check-circle"], "f058", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"]
|
|
21
|
-
},
|
|
29
|
+
}, t = s, m = {
|
|
22
30
|
prefix: "fas",
|
|
23
31
|
iconName: "filter",
|
|
24
32
|
icon: [512, 512, [], "f0b0", "M3.9 54.9C10.5 40.9 24.5 32 40 32l432 0c15.5 0 29.5 8.9 36.1 22.9s4.6 30.5-5.2 42.5L320 320.9 320 448c0 12.1-6.8 23.2-17.7 28.6s-23.8 4.3-33.5-3l-64-48c-8.1-6-12.8-15.5-12.8-25.6l0-79.1L9 97.3C-.7 85.4-2.8 68.8 3.9 54.9z"]
|
|
25
|
-
},
|
|
33
|
+
}, L = {
|
|
26
34
|
prefix: "fas",
|
|
27
35
|
iconName: "file-excel",
|
|
28
36
|
icon: [384, 512, [], "f1c3", "M64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-288-128 0c-17.7 0-32-14.3-32-32L224 0 64 0zM256 0l0 128 128 0L256 0zM155.7 250.2L192 302.1l36.3-51.9c7.6-10.9 22.6-13.5 33.4-5.9s13.5 22.6 5.9 33.4L221.3 344l46.4 66.2c7.6 10.9 5 25.8-5.9 33.4s-25.8 5-33.4-5.9L192 385.8l-36.3 51.9c-7.6 10.9-22.6 13.5-33.4 5.9s-13.5-22.6-5.9-33.4L162.7 344l-46.4-66.2c-7.6-10.9-5-25.8 5.9-33.4s25.8-5 33.4 5.9z"]
|
|
29
|
-
},
|
|
37
|
+
}, z = {
|
|
30
38
|
prefix: "fas",
|
|
31
39
|
iconName: "arrow-right",
|
|
32
40
|
icon: [448, 512, [8594], "f061", "M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"]
|
|
33
|
-
},
|
|
41
|
+
}, x = {
|
|
34
42
|
prefix: "fas",
|
|
35
43
|
iconName: "circle",
|
|
36
44
|
icon: [512, 512, [128308, 128309, 128992, 128993, 128994, 128995, 128996, 9679, 9898, 9899, 11044, 61708, 61915], "f111", "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512z"]
|
|
37
|
-
},
|
|
45
|
+
}, p = {
|
|
38
46
|
prefix: "fas",
|
|
39
47
|
iconName: "arrow-left",
|
|
40
48
|
icon: [448, 512, [8592], "f060", "M9.4 233.4c-12.5 12.5-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L109.2 288 416 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-306.7 0L214.6 118.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-160 160z"]
|
|
41
|
-
},
|
|
49
|
+
}, M = {
|
|
42
50
|
prefix: "fas",
|
|
43
51
|
iconName: "ellipsis-vertical",
|
|
44
52
|
icon: [128, 512, ["ellipsis-v"], "f142", "M64 360a56 56 0 1 0 0 112 56 56 0 1 0 0-112zm0-160a56 56 0 1 0 0 112 56 56 0 1 0 0-112zM120 96A56 56 0 1 0 8 96a56 56 0 1 0 112 0z"]
|
|
45
|
-
},
|
|
53
|
+
}, C = {
|
|
46
54
|
prefix: "fas",
|
|
47
55
|
iconName: "arrow-down",
|
|
48
56
|
icon: [384, 512, [8595], "f063", "M169.4 470.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 370.8 224 64c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 306.7L54.6 265.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"]
|
|
49
|
-
},
|
|
57
|
+
}, N = {
|
|
50
58
|
prefix: "fas",
|
|
51
59
|
iconName: "arrow-up",
|
|
52
60
|
icon: [384, 512, [8593], "f062", "M214.6 41.4c-12.5-12.5-32.8-12.5-45.3 0l-160 160c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 141.2 160 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-306.7L329.4 246.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-160-160z"]
|
|
@@ -54,29 +62,32 @@ const s = {
|
|
|
54
62
|
prefix: "fas",
|
|
55
63
|
iconName: "xmark",
|
|
56
64
|
icon: [384, 512, [128473, 10005, 10006, 10060, 215, "close", "multiply", "remove", "times"], "f00d", "M342.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L192 210.7 86.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L146.7 256 41.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L192 301.3 297.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L237.3 256 342.6 150.6z"]
|
|
57
|
-
},
|
|
65
|
+
}, w = c, h = c, i = {
|
|
58
66
|
prefix: "fas",
|
|
59
67
|
iconName: "triangle-exclamation",
|
|
60
68
|
icon: [512, 512, [9888, "exclamation-triangle", "warning"], "f071", "M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"]
|
|
61
|
-
},
|
|
69
|
+
}, k = i;
|
|
62
70
|
export {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
71
|
+
C as faArrowDown,
|
|
72
|
+
p as faArrowLeft,
|
|
73
|
+
z as faArrowRight,
|
|
74
|
+
N as faArrowUp,
|
|
67
75
|
e as faBars,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
76
|
+
t as faCheckCircle,
|
|
77
|
+
n as faChevronUp,
|
|
78
|
+
x as faCircle,
|
|
79
|
+
s as faCircleCheck,
|
|
72
80
|
l as faCircleExclamation,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
81
|
+
o as faCircleNotch,
|
|
82
|
+
w as faClose,
|
|
83
|
+
r as faColumns,
|
|
84
|
+
M as faEllipsisVertical,
|
|
85
|
+
k as faExclamationTriangle,
|
|
86
|
+
L as faFileExcel,
|
|
87
|
+
m as faFilter,
|
|
88
|
+
f as faRotateLeft,
|
|
89
|
+
a as faTableColumns,
|
|
90
|
+
h as faTimes,
|
|
80
91
|
i as faTriangleExclamation,
|
|
81
92
|
c as faXmark
|
|
82
93
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { generateUtilityClass as t, generateUtilityClasses as e } from "../className/index.js";
|
|
2
2
|
function s(i) {
|
|
3
|
-
return
|
|
3
|
+
return t("MuiDivider", i);
|
|
4
4
|
}
|
|
5
|
-
const n =
|
|
5
|
+
const n = e("MuiDivider", ["root", "horizontal", "vertical", "insetContext", "insetNone"]);
|
|
6
6
|
export {
|
|
7
7
|
n as default,
|
|
8
8
|
s as getDividerUtilityClass
|
package/dist/index.d.ts
CHANGED
|
@@ -263,6 +263,8 @@ export declare interface DataGridLayoutContext<TData = unknown> {
|
|
|
263
263
|
toolbarRef: default_2.RefObject<HTMLDivElement>;
|
|
264
264
|
loading: boolean;
|
|
265
265
|
fetchMoreOnBottomReached: (container: HTMLDivElement | null) => void;
|
|
266
|
+
/** Resets column visibility to the defaults derived from column meta (hidden). Clears localStorage. */
|
|
267
|
+
resetColumnVisibility: () => void;
|
|
266
268
|
}
|
|
267
269
|
|
|
268
270
|
export declare interface DataGridProps<TData = unknown> extends DataGridCoreOptions<TData> {
|
|
@@ -409,7 +411,7 @@ export { InfiniteScrollOptions }
|
|
|
409
411
|
|
|
410
412
|
export declare function Input(props: InputProps): JSX_2.Element;
|
|
411
413
|
|
|
412
|
-
export declare function Layout({ children, header, theme, showSidebar, sidebarContent, sidebarWidth, collapsedSidebarWidth, sidebarHeaderContent, footerReleaseName, footerCopyright, }: React_2.PropsWithChildren<LayoutProps>): JSX_2.Element;
|
|
414
|
+
export declare function Layout({ children, header, theme, showSidebar, sidebarContent, sidebarWidth, collapsedSidebarWidth, sidebarHeaderContent, sidebarFooterContent, footerReleaseName, footerCopyright, }: React_2.PropsWithChildren<LayoutProps>): JSX_2.Element;
|
|
413
415
|
|
|
414
416
|
declare interface LayoutProps {
|
|
415
417
|
header?: JSX.Element;
|
|
@@ -419,6 +421,7 @@ declare interface LayoutProps {
|
|
|
419
421
|
sidebarWidth?: number;
|
|
420
422
|
collapsedSidebarWidth?: number;
|
|
421
423
|
sidebarHeaderContent?: React_2.ReactNode;
|
|
424
|
+
sidebarFooterContent?: React_2.ReactNode;
|
|
422
425
|
footerReleaseName?: string;
|
|
423
426
|
footerCopyright?: string;
|
|
424
427
|
}
|
|
@@ -643,6 +646,9 @@ export declare interface TableToolbarOptions {
|
|
|
643
646
|
disabled?: boolean;
|
|
644
647
|
onError?: (error: unknown) => void;
|
|
645
648
|
};
|
|
649
|
+
manageColumns?: {
|
|
650
|
+
enabled: boolean;
|
|
651
|
+
};
|
|
646
652
|
}
|
|
647
653
|
|
|
648
654
|
export { TabList }
|
|
@@ -904,5 +910,13 @@ declare module "@tanstack/react-table" {
|
|
|
904
910
|
filterSearchable?: boolean;
|
|
905
911
|
pinned?: "left" | "right";
|
|
906
912
|
noSortButton?: boolean;
|
|
913
|
+
/** Column is hidden on initial load. Stored in localStorage per table ID. */
|
|
914
|
+
hidden?: boolean;
|
|
915
|
+
/** Column cannot be hidden via the Manage Columns UI. Always shown as checked and disabled. */
|
|
916
|
+
alwaysVisible?: boolean;
|
|
917
|
+
/** Override the display name shown in the Manage Columns dropdown. Falls back to humanized column ID. */
|
|
918
|
+
columnLabel?: string;
|
|
919
|
+
/** Exclude this column from the Manage Columns dropdown entirely (e.g. action button columns). */
|
|
920
|
+
excludeFromManageColumns?: boolean;
|
|
907
921
|
}
|
|
908
922
|
}
|