@harpercollins/harpercollins-design-system 1.35.2 → 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/index.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 +141 -120
- 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/index.js +192 -190
- 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 +35 -1
- package/package.json +1 -1
|
@@ -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
|
}
|
|
@@ -598,6 +601,26 @@ export { tabClasses }
|
|
|
598
601
|
|
|
599
602
|
export declare function Table<TData = unknown>({ id, loading, maxHeight, wrapText, rowRender, reactTableOptions, gridCheckboxes, allSelected, onSelectionChange, showStickyScrollbar, enableStickyHeader, stickyHeaderOffset, infiniteScroll, toolbar, footer, isError, errorMessage, syncUrl, urlParamPrefix, }: TableProps<TData>): JSX_2.Element;
|
|
600
603
|
|
|
604
|
+
/**
|
|
605
|
+
* Standard HTML table layout for use with `DataGrid`. Handles column sizing,
|
|
606
|
+
* sticky header, sticky horizontal scrollbar, and virtual row rendering.
|
|
607
|
+
* Attach `ctx.wrapperRef` to your scroll container if building a custom layout.
|
|
608
|
+
*/
|
|
609
|
+
export declare function TableLayout<TData = unknown>({ ctx, maxHeight, wrapText, rowRender, showStickyScrollbar, enableStickyHeader, stickyHeaderOffset, footer, }: TableLayoutProps<TData>): JSX_2.Element;
|
|
610
|
+
|
|
611
|
+
export declare interface TableLayoutProps<TData = unknown> {
|
|
612
|
+
ctx: DataGridLayoutContext<TData>;
|
|
613
|
+
maxHeight?: boolean;
|
|
614
|
+
wrapText?: boolean;
|
|
615
|
+
rowRender?: (row: Row<TData>, props: {
|
|
616
|
+
key: string;
|
|
617
|
+
}) => JSX.Element;
|
|
618
|
+
showStickyScrollbar?: boolean;
|
|
619
|
+
enableStickyHeader?: boolean;
|
|
620
|
+
stickyHeaderOffset?: number;
|
|
621
|
+
footer?: boolean;
|
|
622
|
+
}
|
|
623
|
+
|
|
601
624
|
export declare interface TableProps<TData = unknown> extends Omit<DataGridProps<TData>, "renderLayout"> {
|
|
602
625
|
maxHeight?: boolean;
|
|
603
626
|
wrapText?: boolean;
|
|
@@ -623,6 +646,9 @@ export declare interface TableToolbarOptions {
|
|
|
623
646
|
disabled?: boolean;
|
|
624
647
|
onError?: (error: unknown) => void;
|
|
625
648
|
};
|
|
649
|
+
manageColumns?: {
|
|
650
|
+
enabled: boolean;
|
|
651
|
+
};
|
|
626
652
|
}
|
|
627
653
|
|
|
628
654
|
export { TabList }
|
|
@@ -884,5 +910,13 @@ declare module "@tanstack/react-table" {
|
|
|
884
910
|
filterSearchable?: boolean;
|
|
885
911
|
pinned?: "left" | "right";
|
|
886
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;
|
|
887
921
|
}
|
|
888
922
|
}
|