@harpercollins/harpercollins-design-system 1.19.2 → 1.20.1

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.
Files changed (40) hide show
  1. package/dist/cjs/index.cjs +905 -943
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/types/src/components/data-display/Table/StickyHorizontalScrollbar.d.ts +18 -0
  4. package/dist/cjs/types/src/components/data-display/Table/Table.d.ts +15 -11
  5. package/dist/cjs/types/src/components/data-display/Table/Table.stories.d.ts +2 -2
  6. package/dist/cjs/types/src/components/feedback/CircularProgress/CircularProgress.d.ts +3 -0
  7. package/dist/cjs/types/src/components/feedback/CircularProgress/CircularProgress.stories.d.ts +6 -0
  8. package/dist/cjs/types/src/components/feedback/Skeleton/Skeleton.d.ts +3 -0
  9. package/dist/cjs/types/src/components/feedback/Skeleton/Skeleton.stories.d.ts +6 -0
  10. package/dist/cjs/types/src/components/feedback/Skeleton/index.d.ts +2 -0
  11. package/dist/cjs/types/src/components/index.d.ts +54 -49
  12. package/dist/cjs/types/src/components/inputs/Select/Option.d.ts +2 -0
  13. package/dist/cjs/types/src/components/inputs/Select/Select.d.ts +3 -0
  14. package/dist/cjs/types/src/components/inputs/Select/Select.stories.d.ts +6 -0
  15. package/dist/cjs/types/src/components/inputs/Select/index.d.ts +2 -0
  16. package/dist/cjs/types/src/components/navigation/Menu/MenuItem.d.ts +1 -1
  17. package/dist/cjs/types/src/components/surfaces/Sheet/Sheet.d.ts +3 -0
  18. package/dist/cjs/types/src/components/surfaces/Sheet/Sheet.stories.d.ts +6 -0
  19. package/dist/cjs/types/src/components/surfaces/Sheet/index.d.ts +2 -0
  20. package/dist/esm/index.js +874 -912
  21. package/dist/esm/index.js.map +1 -1
  22. package/dist/esm/types/src/components/data-display/Table/StickyHorizontalScrollbar.d.ts +18 -0
  23. package/dist/esm/types/src/components/data-display/Table/Table.d.ts +15 -11
  24. package/dist/esm/types/src/components/data-display/Table/Table.stories.d.ts +2 -2
  25. package/dist/esm/types/src/components/feedback/CircularProgress/CircularProgress.d.ts +3 -0
  26. package/dist/esm/types/src/components/feedback/CircularProgress/CircularProgress.stories.d.ts +6 -0
  27. package/dist/esm/types/src/components/feedback/Skeleton/Skeleton.d.ts +3 -0
  28. package/dist/esm/types/src/components/feedback/Skeleton/Skeleton.stories.d.ts +6 -0
  29. package/dist/esm/types/src/components/feedback/Skeleton/index.d.ts +2 -0
  30. package/dist/esm/types/src/components/index.d.ts +54 -49
  31. package/dist/esm/types/src/components/inputs/Select/Option.d.ts +2 -0
  32. package/dist/esm/types/src/components/inputs/Select/Select.d.ts +3 -0
  33. package/dist/esm/types/src/components/inputs/Select/Select.stories.d.ts +6 -0
  34. package/dist/esm/types/src/components/inputs/Select/index.d.ts +2 -0
  35. package/dist/esm/types/src/components/navigation/Menu/MenuItem.d.ts +1 -1
  36. package/dist/esm/types/src/components/surfaces/Sheet/Sheet.d.ts +3 -0
  37. package/dist/esm/types/src/components/surfaces/Sheet/Sheet.stories.d.ts +6 -0
  38. package/dist/esm/types/src/components/surfaces/Sheet/index.d.ts +2 -0
  39. package/dist/index.d.ts +229 -217
  40. package/package.json +6 -5
package/dist/index.d.ts CHANGED
@@ -1,32 +1,182 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as _mui_joy from '@mui/joy';
3
- import { AccordionProps as AccordionProps$1, AccordionDetailsProps, AccordionSummaryProps, AccordionGroupProps, AlertProps, AutocompleteProps as AutocompleteProps$1, AvatarProps, BadgeProps, CardProps, CheckboxProps, ChipProps, ColorPaletteProp, ContainerProps, DividerProps, DrawerProps, DropdownProps, FormControlProps, FormLabelProps, GridProps, InputProps, ListProps, MenuProps, ListItem, RadioProps, SliderProps, SwitchProps, TextareaProps, TooltipProps as TooltipProps$1, TypographyProps } from '@mui/joy';
4
- export { Box, CardActions, CardContent, CardCover, CardOverflow, IconButton, ListDivider, ListItem, ListItemButton, ListItemContent, ListItemDecorator, ListSubheader, MenuButton, RadioGroup, TextField } from '@mui/joy';
3
+ import { AvatarProps, BadgeProps, ChipProps, ColorPaletteProp, DividerProps, ListProps, TooltipProps as TooltipProps$1, TypographyProps, AlertProps, CircularProgressProps, SkeletonProps, AutocompleteProps as AutocompleteProps$1, CheckboxProps, InputProps, FormControlProps, FormLabelProps, RadioProps, SelectProps, SliderProps, SwitchProps, TextareaProps, ContainerProps, GridProps, DropdownProps, MenuProps, ListItem, DrawerProps, AccordionProps as AccordionProps$1, AccordionDetailsProps, AccordionGroupProps, AccordionSummaryProps, CardProps, SheetProps } from '@mui/joy';
4
+ export { Box, CardActions, CardContent, CardCover, CardOverflow, IconButton, ListDivider, ListItem, ListItemButton, ListItemContent, ListItemDecorator, ListSubheader, MenuButton, Option, RadioGroup, TextField } from '@mui/joy';
5
+ import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
6
+ import { IconProp } from '@fortawesome/fontawesome-svg-core';
5
7
  import * as React$1 from 'react';
6
8
  import React__default, { ReactElement, PropsWithChildren } from 'react';
9
+ import { Row, TableOptions } from '@tanstack/react-table';
10
+ import ReactDatePicker, { ReactDatePickerProps } from 'react-datepicker';
7
11
  import * as styled_components_dist_types from 'styled-components/dist/types';
8
12
  import * as styled_components from 'styled-components';
9
- import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
10
- import { IconProp } from '@fortawesome/fontawesome-svg-core';
11
- import ReactDatePicker, { ReactDatePickerProps } from 'react-datepicker';
12
- import { ColumnDef } from '@tanstack/react-table';
13
13
 
14
- declare function Accordion$1(props: AccordionProps$1): react_jsx_runtime.JSX.Element;
14
+ declare function Avatar(props: AvatarProps): react_jsx_runtime.JSX.Element;
15
15
 
16
- declare function AccordionDetails(props: AccordionDetailsProps): react_jsx_runtime.JSX.Element;
16
+ declare function Badge(props: BadgeProps): react_jsx_runtime.JSX.Element;
17
17
 
18
- declare function AccordionSummary(props: AccordionSummaryProps): react_jsx_runtime.JSX.Element;
18
+ declare function Chip(props: ChipProps): react_jsx_runtime.JSX.Element;
19
19
 
20
- declare function AccordionGroup(props: AccordionGroupProps): react_jsx_runtime.JSX.Element;
20
+ type IconSizes = "xs" | "sm" | "md" | "lg" | "xl";
21
+ type IconColours = "default" | ColorPaletteProp;
22
+ interface IconProps {
23
+ icon: IconProp | undefined;
24
+ size?: IconSizes;
25
+ colour?: IconColours;
26
+ spin?: boolean;
27
+ className?: string;
28
+ }
29
+ declare function Icon({ icon, size, colour, spin, className, }: IconProps): React.ReactElement | null;
21
30
 
22
- interface AccordionProps {
23
- title: string | React.ReactNode;
24
- open?: boolean;
31
+ interface IChipIconProps {
32
+ icon: {
33
+ status: string;
34
+ label: string;
35
+ tooltip?: string;
36
+ colour?: ColorPaletteProp;
37
+ icon?: IconDefinition;
38
+ size?: IconSizes;
39
+ spin?: boolean;
40
+ };
41
+ chip?: {
42
+ size: ChipProps["size"];
43
+ };
25
44
  }
26
- declare function Accordion({ title, children, open, }: React.PropsWithChildren<AccordionProps>): react_jsx_runtime.JSX.Element;
45
+ declare function ChipIcon({ icon, chip, }: IChipIconProps): react_jsx_runtime.JSX.Element;
46
+
47
+ declare function Divider(props: DividerProps): react_jsx_runtime.JSX.Element;
48
+
49
+ interface HeadingProps {
50
+ children: React.ReactNode;
51
+ as: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
52
+ }
53
+ declare function Heading({ children, as }: HeadingProps): react_jsx_runtime.JSX.Element | null;
54
+
55
+ declare function List(props: ListProps): react_jsx_runtime.JSX.Element;
56
+
57
+ interface TrafficLightRange {
58
+ min: number;
59
+ max: number;
60
+ text?: string;
61
+ }
62
+ interface TrafficLights {
63
+ red: TrafficLightRange;
64
+ orange: TrafficLightRange;
65
+ green: TrafficLightRange;
66
+ }
67
+ interface TrafficLightsExtended extends TrafficLights {
68
+ greenHigh: TrafficLightRange;
69
+ redLow: TrafficLightRange;
70
+ }
71
+ type TrafficLightRanges = TrafficLights | TrafficLightsExtended;
72
+ interface ProgressCircleProps {
73
+ size?: "tiny" | "small" | "medium" | "large";
74
+ value: number | null | undefined;
75
+ kind?: "default" | "danger" | "success" | "traffic-light";
76
+ trafficLightRanges?: TrafficLightRanges;
77
+ }
78
+ declare function ProgressCircle({ size, value, kind, trafficLightRanges, }: ProgressCircleProps): react_jsx_runtime.JSX.Element;
79
+
80
+ interface ReadMoreProps {
81
+ maxLines?: number;
82
+ children: React.ReactNode;
83
+ }
84
+ declare function ReadMore({ children, maxLines }: ReadMoreProps): react_jsx_runtime.JSX.Element;
85
+
86
+ interface RelativeTimeProps {
87
+ time: Date;
88
+ }
89
+ declare function RelativeTime({ time, }: RelativeTimeProps): ReactElement;
90
+
91
+ interface Image {
92
+ status: string;
93
+ }
94
+ declare function StatusIcon({ status, size, }: {
95
+ status: Image["status"];
96
+ size?: IconSizes;
97
+ }): react_jsx_runtime.JSX.Element;
98
+
99
+ interface TableProps {
100
+ id: string;
101
+ loading?: boolean;
102
+ maxHeight?: boolean;
103
+ wrapText?: boolean;
104
+ rowRender?: (row: Row<any>, props: any) => JSX.Element;
105
+ reactTableOptions: Partial<TableOptions<unknown>> & Pick<TableOptions<unknown>, "data" | "columns">;
106
+ commandColumn?: (props: any) => JSX.Element | null;
107
+ commandColumnSize?: number;
108
+ gridCheckboxes?: boolean;
109
+ selectedField?: string;
110
+ onSelectionChange?: (dataItem: any) => void;
111
+ onHeaderSelectionChange?: (checked: boolean) => void;
112
+ headerSelectionValue?: boolean;
113
+ allSelected?: boolean;
114
+ showStickyScrollbar?: boolean;
115
+ }
116
+ declare function Table({ id, loading, maxHeight, wrapText, rowRender, reactTableOptions, commandColumn, commandColumnSize, gridCheckboxes, selectedField, onSelectionChange, onHeaderSelectionChange, headerSelectionValue, allSelected, showStickyScrollbar, }: TableProps): react_jsx_runtime.JSX.Element;
117
+
118
+ interface TabConfig {
119
+ label: string;
120
+ id: string;
121
+ content: JSX.Element;
122
+ }
123
+ interface TabsProps {
124
+ tabsConfig: TabConfig[];
125
+ defaultId?: string;
126
+ }
127
+ declare function Tabs({ tabsConfig, defaultId }: TabsProps): react_jsx_runtime.JSX.Element;
128
+
129
+ interface TextBlockProps {
130
+ label?: string;
131
+ content?: string | JSX.Element;
132
+ size?: "small" | "medium" | "large";
133
+ inline?: boolean;
134
+ }
135
+ declare function TextBlock({ label, content, size, inline }: TextBlockProps): react_jsx_runtime.JSX.Element;
136
+
137
+ interface TooltipProps extends TooltipProps$1 {
138
+ maxWidth?: string;
139
+ }
140
+ declare function Tooltip({ children, maxWidth, ...props }: React.PropsWithChildren<TooltipProps>): react_jsx_runtime.JSX.Element;
141
+
142
+ declare function Typography(props: TypographyProps): react_jsx_runtime.JSX.Element;
27
143
 
28
144
  declare function Alert(props: AlertProps): react_jsx_runtime.JSX.Element;
29
145
 
146
+ declare function CircularProgress(props: CircularProgressProps): react_jsx_runtime.JSX.Element;
147
+
148
+ interface SpinnerIconProps {
149
+ size?: number;
150
+ strokeWidth?: number;
151
+ color?: string;
152
+ }
153
+ declare function LoadingSpinner(props: SpinnerIconProps): ReactElement;
154
+
155
+ interface ProgressBarProps {
156
+ ariaLabel: string;
157
+ percentage: number;
158
+ }
159
+ declare function ProgressBar({ ariaLabel, percentage, }: ProgressBarProps): ReactElement;
160
+
161
+ declare function Skeleton(props: SkeletonProps): react_jsx_runtime.JSX.Element;
162
+
163
+ type MessageLevel = "info" | "success" | "warning" | "error";
164
+ interface TextMessage {
165
+ level: MessageLevel;
166
+ text: string;
167
+ noFade?: boolean;
168
+ }
169
+ interface HTMLMessage {
170
+ level: MessageLevel;
171
+ html: string;
172
+ noFade?: boolean;
173
+ }
174
+ type Message = TextMessage | HTMLMessage;
175
+ interface ToastMessagesProps {
176
+ messages: Message[];
177
+ }
178
+ declare function ToastMessages({ messages }: ToastMessagesProps): ReactElement;
179
+
30
180
  interface AppBarProps {
31
181
  leftSide?: JSX.Element;
32
182
  rightSide?: JSX.Element;
@@ -57,6 +207,35 @@ interface AppBarProps {
57
207
  }
58
208
  declare function AppBar({ currentApp, isNavigating, navigatingProgressDelay, leftSide, rightSide, myAccountMenu, workspaces, workspacesMenu, currentWorkspace, helpButton, mobileMenuPrimaryContent, mobileMenuSecondaryContent, user, logoUrl, logo, logoMini, }: AppBarProps): react_jsx_runtime.JSX.Element;
59
209
 
210
+ declare function FullPageErrorFallback(): react_jsx_runtime.JSX.Element;
211
+
212
+ type Theme = "light_internal" | "light_external";
213
+ interface ThemeProviderProps {
214
+ theme?: Theme;
215
+ }
216
+ declare function ThemeProvider({ children, theme, }: React.PropsWithChildren<ThemeProviderProps>): react_jsx_runtime.JSX.Element;
217
+
218
+ interface LayoutProps {
219
+ header?: JSX.Element;
220
+ theme?: Theme;
221
+ showSidebar?: boolean;
222
+ sidebarContent?: React$1.ReactNode;
223
+ sidebarWidth?: number;
224
+ collapsedSidebarWidth?: number;
225
+ sidebarHeaderContent?: React$1.ReactNode;
226
+ footerReleaseName?: string;
227
+ }
228
+ declare function Layout({ children, header, theme, showSidebar, sidebarContent, sidebarWidth, collapsedSidebarWidth, sidebarHeaderContent, footerReleaseName, }: React$1.PropsWithChildren<LayoutProps>): react_jsx_runtime.JSX.Element;
229
+
230
+ interface LogoProps {
231
+ width?: number;
232
+ fillColour?: string;
233
+ }
234
+
235
+ declare function LogoSVG({ width, fillColour }: LogoProps): JSX.Element;
236
+
237
+ declare function LogoSVGMini({ width, fillColour }: LogoProps): JSX.Element;
238
+
60
239
  interface BaseOption {
61
240
  label: string;
62
241
  value: number | string;
@@ -81,17 +260,6 @@ interface AutocompleteSelectMultipleProps<T extends BaseOption> extends Autocomp
81
260
  }
82
261
  declare function AutocompleteSelectMultiple<T extends BaseOption>({ defaultValue, id, name, inline, onChange, SelectedOption, helpText, ...props }: AutocompleteSelectMultipleProps<T>): ReactElement;
83
262
 
84
- declare function Avatar(props: AvatarProps): react_jsx_runtime.JSX.Element;
85
-
86
- declare function Badge(props: BadgeProps): react_jsx_runtime.JSX.Element;
87
-
88
- declare function Breadcrumb({ children, }: PropsWithChildren<{
89
- children: React.ReactNode;
90
- }>): react_jsx_runtime.JSX.Element;
91
- declare namespace Breadcrumb {
92
- var Item: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
93
- }
94
-
95
263
  interface LinkButtonInternalProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElement> {
96
264
  kind?: "primary" | "secondary" | "danger" | "basic" | "debug";
97
265
  size?: "normal" | "small";
@@ -120,41 +288,8 @@ interface ButtonProps extends CommonButtonProps {
120
288
  }
121
289
  declare function Button({ children, ...props }: React__default.PropsWithChildren<LinkButtonProps | SubmitButtonProps | ButtonProps>): React__default.ReactElement;
122
290
 
123
- declare function Card(props: CardProps): react_jsx_runtime.JSX.Element;
124
-
125
291
  declare function Checkbox(props: CheckboxProps): react_jsx_runtime.JSX.Element;
126
292
 
127
- declare function Chip(props: ChipProps): react_jsx_runtime.JSX.Element;
128
-
129
- type IconSizes = "xs" | "sm" | "md" | "lg" | "xl";
130
- type IconColours = "default" | ColorPaletteProp;
131
- interface IconProps {
132
- icon: IconProp | undefined;
133
- size?: IconSizes;
134
- colour?: IconColours;
135
- spin?: boolean;
136
- className?: string;
137
- }
138
- declare function Icon({ icon, size, colour, spin, className, }: IconProps): React.ReactElement | null;
139
-
140
- interface IChipIconProps {
141
- icon: {
142
- status: string;
143
- label: string;
144
- tooltip?: string;
145
- colour?: ColorPaletteProp;
146
- icon?: IconDefinition;
147
- size?: IconSizes;
148
- spin?: boolean;
149
- };
150
- chip?: {
151
- size: ChipProps["size"];
152
- };
153
- }
154
- declare function ChipIcon({ icon, chip, }: IChipIconProps): react_jsx_runtime.JSX.Element;
155
-
156
- declare function Container(props: ContainerProps): react_jsx_runtime.JSX.Element;
157
-
158
293
  type DateInputProps = ReactDatePickerProps;
159
294
  declare const DateInput: React__default.ForwardRefExoticComponent<DateInputProps & React__default.RefAttributes<ReactDatePicker<undefined, undefined>>>;
160
295
 
@@ -166,73 +301,34 @@ declare function DateTimeInput({ id, name, defaultValue, onChangeValue, showNowB
166
301
  id?: string;
167
302
  }): ReactElement;
168
303
 
169
- declare function Divider(props: DividerProps): react_jsx_runtime.JSX.Element;
170
-
171
- interface ModalWindowProps extends Omit<DrawerProps, "open" | "anchor"> {
172
- side: "left" | "right";
173
- size?: "sm" | "md" | "lg";
174
- open: boolean;
175
- onClose: () => void;
176
- onCloseCompleted?: () => void;
177
- closeRequested?: boolean;
178
- closeBlocked?: boolean;
179
- showCloseButton?: boolean;
180
- }
181
- declare const Modal: React__default.ForwardRefExoticComponent<Omit<React__default.PropsWithChildren<ModalWindowProps>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
182
-
183
- declare function Dropdown(props: DropdownProps): react_jsx_runtime.JSX.Element;
304
+ declare function Input(props: InputProps): react_jsx_runtime.JSX.Element;
184
305
 
185
306
  declare function FormControl(props: FormControlProps): react_jsx_runtime.JSX.Element;
186
307
 
187
308
  declare function FormLabel(props: FormLabelProps): react_jsx_runtime.JSX.Element;
188
309
 
189
- declare function FullPageErrorFallback(): react_jsx_runtime.JSX.Element;
190
-
191
- declare function Grid(props: GridProps): react_jsx_runtime.JSX.Element;
310
+ declare function Radio(props: RadioProps): react_jsx_runtime.JSX.Element;
192
311
 
193
- interface HeadingProps {
194
- children: React.ReactNode;
195
- as: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
196
- }
197
- declare function Heading({ children, as }: HeadingProps): react_jsx_runtime.JSX.Element | null;
312
+ declare function Select<TValue extends object>(props: SelectProps<TValue, false>): react_jsx_runtime.JSX.Element;
198
313
 
199
- declare function Input(props: InputProps): react_jsx_runtime.JSX.Element;
314
+ declare function Slider(props: SliderProps): react_jsx_runtime.JSX.Element;
200
315
 
201
- type Theme = "light_internal" | "light_external";
202
- interface ThemeProviderProps {
203
- theme?: Theme;
204
- }
205
- declare function ThemeProvider({ children, theme, }: React.PropsWithChildren<ThemeProviderProps>): react_jsx_runtime.JSX.Element;
316
+ declare function Switch(props: SwitchProps): react_jsx_runtime.JSX.Element;
206
317
 
207
- interface LayoutProps {
208
- header?: JSX.Element;
209
- theme?: Theme;
210
- showSidebar?: boolean;
211
- sidebarContent?: React$1.ReactNode;
212
- sidebarWidth?: number;
213
- collapsedSidebarWidth?: number;
214
- sidebarHeaderContent?: React$1.ReactNode;
215
- footerReleaseName?: string;
216
- }
217
- declare function Layout({ children, header, theme, showSidebar, sidebarContent, sidebarWidth, collapsedSidebarWidth, sidebarHeaderContent, footerReleaseName, }: React$1.PropsWithChildren<LayoutProps>): react_jsx_runtime.JSX.Element;
318
+ declare function Textarea(props: TextareaProps): react_jsx_runtime.JSX.Element;
218
319
 
219
- declare function List(props: ListProps): react_jsx_runtime.JSX.Element;
320
+ declare function Container(props: ContainerProps): react_jsx_runtime.JSX.Element;
220
321
 
221
- interface SpinnerIconProps {
222
- size?: number;
223
- strokeWidth?: number;
224
- color?: string;
225
- }
226
- declare function LoadingSpinner(props: SpinnerIconProps): ReactElement;
322
+ declare function Grid(props: GridProps): react_jsx_runtime.JSX.Element;
227
323
 
228
- interface LogoProps {
229
- width?: number;
230
- fillColour?: string;
324
+ declare function Breadcrumb({ children, }: PropsWithChildren<{
325
+ children: React.ReactNode;
326
+ }>): react_jsx_runtime.JSX.Element;
327
+ declare namespace Breadcrumb {
328
+ var Item: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
231
329
  }
232
330
 
233
- declare function LogoSVG({ width, fillColour }: LogoProps): JSX.Element;
234
-
235
- declare function LogoSVGMini({ width, fillColour }: LogoProps): JSX.Element;
331
+ declare function Dropdown(props: DropdownProps): react_jsx_runtime.JSX.Element;
236
332
 
237
333
  declare function Menu(props: MenuProps): react_jsx_runtime.JSX.Element;
238
334
 
@@ -240,121 +336,37 @@ declare const MenuHeading: typeof ListItem;
240
336
 
241
337
  declare const StyledMenuItem: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<Omit<_mui_joy.ListItemButtonProps, "slots" | "slotProps"> & _mui_joy.MenuItemSlotsAndSlotProps & Omit<Omit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
242
338
  ref?: ((instance: HTMLDivElement | null) => void | React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React$1.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React$1.RefObject<HTMLDivElement> | null | undefined;
243
- }, "style" | "color" | "content" | "translate" | "ref" | "slot" | "title" | "children" | "disabled" | "onChange" | "variant" | "sx" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "action" | "selected" | "orientation" | "focusVisibleClassName" | keyof _mui_joy.MenuItemSlotsAndSlotProps>, never>> & string & Omit<_mui_joy.ExtendMenuItem<_mui_joy.MenuItemTypeMap<{}, "div">>, keyof React$1.Component<any, {}, any>>;
339
+ }, "color" | "content" | "translate" | "children" | "sx" | "variant" | "slot" | "style" | "title" | "ref" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "component" | "orientation" | "disabled" | "action" | "selected" | "focusVisibleClassName" | keyof _mui_joy.MenuItemSlotsAndSlotProps>, never>> & string & Omit<_mui_joy.ExtendMenuItem<_mui_joy.MenuItemTypeMap<{}, "div">>, keyof React$1.Component<any, {}, any>>;
244
340
 
245
- interface ProgressBarProps {
246
- ariaLabel: string;
247
- percentage: number;
248
- }
249
- declare function ProgressBar({ ariaLabel, percentage, }: ProgressBarProps): ReactElement;
250
-
251
- interface TrafficLightRange {
252
- min: number;
253
- max: number;
254
- text?: string;
255
- }
256
- interface TrafficLights {
257
- red: TrafficLightRange;
258
- orange: TrafficLightRange;
259
- green: TrafficLightRange;
260
- }
261
- interface TrafficLightsExtended extends TrafficLights {
262
- greenHigh: TrafficLightRange;
263
- redLow: TrafficLightRange;
264
- }
265
- type TrafficLightRanges = TrafficLights | TrafficLightsExtended;
266
- interface ProgressCircleProps {
267
- size?: "tiny" | "small" | "medium" | "large";
268
- value: number | null | undefined;
269
- kind?: "default" | "danger" | "success" | "traffic-light";
270
- trafficLightRanges?: TrafficLightRanges;
271
- }
272
- declare function ProgressCircle({ size, value, kind, trafficLightRanges, }: ProgressCircleProps): react_jsx_runtime.JSX.Element;
273
-
274
- declare function Radio(props: RadioProps): react_jsx_runtime.JSX.Element;
275
-
276
- interface ReadMoreProps {
277
- maxLines?: number;
278
- children: React.ReactNode;
279
- }
280
- declare function ReadMore({ children, maxLines }: ReadMoreProps): react_jsx_runtime.JSX.Element;
281
-
282
- interface RelativeTimeProps {
283
- time: Date;
284
- }
285
- declare function RelativeTime({ time, }: RelativeTimeProps): ReactElement;
286
-
287
- declare function Slider(props: SliderProps): react_jsx_runtime.JSX.Element;
288
-
289
- interface Image {
290
- status: string;
341
+ interface ModalWindowProps extends Omit<DrawerProps, "open" | "anchor"> {
342
+ side: "left" | "right";
343
+ size?: "sm" | "md" | "lg";
344
+ open: boolean;
345
+ onClose: () => void;
346
+ onCloseCompleted?: () => void;
347
+ closeRequested?: boolean;
348
+ closeBlocked?: boolean;
349
+ showCloseButton?: boolean;
291
350
  }
292
- declare function StatusIcon({ status, size, }: {
293
- status: Image["status"];
294
- size?: IconSizes;
295
- }): react_jsx_runtime.JSX.Element;
296
-
297
- declare function Switch(props: SwitchProps): react_jsx_runtime.JSX.Element;
351
+ declare const Modal: React__default.ForwardRefExoticComponent<Omit<React__default.PropsWithChildren<ModalWindowProps>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
298
352
 
299
- interface TableProps {
300
- id: string;
301
- data: unknown[];
302
- columns: ColumnDef<unknown, unknown>[];
303
- pageCount?: number;
304
- totalCount?: number;
305
- next?: string;
306
- previous?: string;
307
- page?: number;
308
- pageable?: boolean;
309
- pageSize?: number;
310
- maxHeight?: boolean;
311
- }
312
- declare function Table({ id, data: tableData, columns, pageCount, totalCount, next, previous, page, pageable, pageSize, maxHeight, }: TableProps): react_jsx_runtime.JSX.Element;
353
+ declare function Accordion$1(props: AccordionProps$1): react_jsx_runtime.JSX.Element;
313
354
 
314
- interface TabConfig {
315
- label: string;
316
- id: string;
317
- content: JSX.Element;
318
- }
319
- interface TabsProps {
320
- tabsConfig: TabConfig[];
321
- defaultId?: string;
322
- }
323
- declare function Tabs({ tabsConfig, defaultId }: TabsProps): react_jsx_runtime.JSX.Element;
355
+ declare function AccordionDetails(props: AccordionDetailsProps): react_jsx_runtime.JSX.Element;
324
356
 
325
- declare function Textarea(props: TextareaProps): react_jsx_runtime.JSX.Element;
357
+ declare function AccordionGroup(props: AccordionGroupProps): react_jsx_runtime.JSX.Element;
326
358
 
327
- interface TextBlockProps {
328
- label?: string;
329
- content?: string | JSX.Element;
330
- size?: "small" | "medium" | "large";
331
- inline?: boolean;
332
- }
333
- declare function TextBlock({ label, content, size, inline }: TextBlockProps): react_jsx_runtime.JSX.Element;
359
+ declare function AccordionSummary(props: AccordionSummaryProps): react_jsx_runtime.JSX.Element;
334
360
 
335
- type MessageLevel = "info" | "success" | "warning" | "error";
336
- interface TextMessage {
337
- level: MessageLevel;
338
- text: string;
339
- noFade?: boolean;
340
- }
341
- interface HTMLMessage {
342
- level: MessageLevel;
343
- html: string;
344
- noFade?: boolean;
345
- }
346
- type Message = TextMessage | HTMLMessage;
347
- interface ToastMessagesProps {
348
- messages: Message[];
361
+ interface AccordionProps {
362
+ title: string | React.ReactNode;
363
+ open?: boolean;
349
364
  }
350
- declare function ToastMessages({ messages }: ToastMessagesProps): ReactElement;
365
+ declare function Accordion({ title, children, open, }: React.PropsWithChildren<AccordionProps>): react_jsx_runtime.JSX.Element;
351
366
 
352
- interface TooltipProps extends TooltipProps$1 {
353
- maxWidth?: string;
354
- }
355
- declare function Tooltip({ children, maxWidth, ...props }: React.PropsWithChildren<TooltipProps>): react_jsx_runtime.JSX.Element;
367
+ declare function Card(props: CardProps): react_jsx_runtime.JSX.Element;
356
368
 
357
- declare function Typography(props: TypographyProps): react_jsx_runtime.JSX.Element;
369
+ declare function Sheet(props: SheetProps): react_jsx_runtime.JSX.Element;
358
370
 
359
371
  interface NavigationProgressState {
360
372
  showProgress: boolean;
@@ -440,4 +452,4 @@ declare const formatText: (text: string | null | undefined) => string;
440
452
  * */
441
453
  declare const formatCurrency: (value: number | string | null | undefined, locale?: string | undefined, options?: Intl.NumberFormatOptions) => string;
442
454
 
443
- export { Accordion$1 as Accordion, AccordionDetails, AccordionGroup, Accordion as AccordionLegacy, AccordionSummary, Alert, AppBar, AutoComplete as Autocomplete, AutocompleteSelectMultiple, Avatar, Badge, Breadcrumb, Button, Card, Checkbox, Chip, ChipIcon, Container, DateInput as DatePicker, DateTimeInput, Divider, Modal as Drawer, Dropdown, FormControl, FormLabel, FullPageErrorFallback, Grid, Heading, Icon, Input, Layout, List, LoadingSpinner, LogoSVG as Logo, LogoSVGMini as LogoMini, Menu, MenuHeading, StyledMenuItem as MenuItem, NavigationProgressProvider, ProgressBar, ProgressCircle, Radio as RadioButton, ReadMore, RelativeTime, Slider, StatusIcon, Switch, Table, Tabs, TextBlock, Textarea, ThemeProvider, ToastMessages, Tooltip, Typography, formatCurrency, formatDate, formatNumber, formatText, useFetch, useLocalStorage, useNavigationProgress, useSentryFeedbackOpen, useToggle };
455
+ export { Accordion$1 as Accordion, AccordionDetails, AccordionGroup, Accordion as AccordionLegacy, AccordionSummary, Alert, AppBar, AutoComplete as Autocomplete, AutocompleteSelectMultiple, Avatar, Badge, Breadcrumb, Button, Card, Checkbox, Chip, ChipIcon, CircularProgress, Container, DateInput as DatePicker, DateTimeInput, Divider, Modal as Drawer, Dropdown, FormControl, FormLabel, FullPageErrorFallback, Grid, Heading, Icon, Input, Layout, List, LoadingSpinner, LogoSVG as Logo, LogoSVGMini as LogoMini, Menu, MenuHeading, StyledMenuItem as MenuItem, NavigationProgressProvider, ProgressBar, ProgressCircle, Radio as RadioButton, ReadMore, RelativeTime, Select, Sheet, Skeleton, Slider, StatusIcon, Switch, Table, Tabs, TextBlock, Textarea, ThemeProvider, ToastMessages, Tooltip, Typography, formatCurrency, formatDate, formatNumber, formatText, useFetch, useLocalStorage, useNavigationProgress, useSentryFeedbackOpen, useToggle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harpercollins/harpercollins-design-system",
3
- "version": "1.19.2",
3
+ "version": "1.20.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@ssh.dev.azure.com:v3/HarperCollinsUK/HCDesignSystem/HCDesignSystem"
@@ -49,6 +49,7 @@
49
49
  "@storybook/react-vite": "^9.1.7",
50
50
  "@svgr/rollup": "^8.1.0",
51
51
  "@tanstack/react-table": "^8.15.0",
52
+ "@tanstack/react-virtual": "^3.13.12",
52
53
  "@types/react-datepicker": "^6.2.0",
53
54
  "date-fns": "^3.6.0",
54
55
  "focus-trap-react": "^10.2.3",
@@ -87,6 +88,8 @@
87
88
  "@typescript-eslint/eslint-plugin": "^7.4.0",
88
89
  "@typescript-eslint/parser": "^7.4.0",
89
90
  "@vitejs/plugin-react": "^4.2.1",
91
+ "@vitest/browser": "3.2.4",
92
+ "@vitest/coverage-v8": "^3.2.4",
90
93
  "@whitespace/storybook-addon-html": "^6.0.2",
91
94
  "chromatic": "^11.4.0",
92
95
  "eslint": "^8.57.0",
@@ -100,15 +103,13 @@
100
103
  "eslint-plugin-react-refresh": "^0.4.6",
101
104
  "eslint-plugin-storybook": "^9.1.7",
102
105
  "happy-dom": "^14.3.8",
106
+ "playwright": "^1.55.0",
103
107
  "prettier": "^3.2.5",
104
108
  "react-syntax-highlighter": "^15.5.0",
105
109
  "storybook": "^9.1.7",
106
110
  "tslib": "^2.6.2",
107
111
  "typescript": "^5.4.3",
108
- "vite": "^7.1.7",
109
- "@vitest/browser": "3.2.4",
110
- "playwright": "^1.55.0",
111
- "@vitest/coverage-v8": "^3.2.4"
112
+ "vite": "^7.1.7"
112
113
  },
113
114
  "peerDependencies": {
114
115
  "react": "^18.2.0",