@harpercollins/harpercollins-design-system 1.19.2 → 1.20.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/index.cjs +822 -919
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/src/components/data-display/Table/StickyHorizontalScrollbar.d.ts +18 -0
- package/dist/cjs/types/src/components/data-display/Table/Table.d.ts +14 -11
- package/dist/cjs/types/src/components/data-display/Table/Table.stories.d.ts +2 -2
- package/dist/cjs/types/src/components/feedback/CircularProgress/CircularProgress.d.ts +3 -0
- package/dist/cjs/types/src/components/feedback/CircularProgress/CircularProgress.stories.d.ts +6 -0
- package/dist/cjs/types/src/components/index.d.ts +50 -49
- package/dist/cjs/types/src/components/navigation/Menu/MenuItem.d.ts +1 -1
- package/dist/esm/index.js +827 -924
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/data-display/Table/StickyHorizontalScrollbar.d.ts +18 -0
- package/dist/esm/types/src/components/data-display/Table/Table.d.ts +14 -11
- package/dist/esm/types/src/components/data-display/Table/Table.stories.d.ts +2 -2
- package/dist/esm/types/src/components/feedback/CircularProgress/CircularProgress.d.ts +3 -0
- package/dist/esm/types/src/components/feedback/CircularProgress/CircularProgress.stories.d.ts +6 -0
- package/dist/esm/types/src/components/index.d.ts +50 -49
- package/dist/esm/types/src/components/navigation/Menu/MenuItem.d.ts +1 -1
- package/dist/index.d.ts +223 -218
- package/package.json +6 -5
package/dist/index.d.ts
CHANGED
|
@@ -1,32 +1,179 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as _mui_joy from '@mui/joy';
|
|
3
|
-
import {
|
|
3
|
+
import { AvatarProps, BadgeProps, ChipProps, ColorPaletteProp, DividerProps, ListProps, TooltipProps as TooltipProps$1, TypographyProps, AlertProps, CircularProgressProps, AutocompleteProps as AutocompleteProps$1, CheckboxProps, InputProps, FormControlProps, FormLabelProps, RadioProps, SliderProps, SwitchProps, TextareaProps, ContainerProps, GridProps, DropdownProps, MenuProps, ListItem, DrawerProps, AccordionProps as AccordionProps$1, AccordionDetailsProps, AccordionGroupProps, AccordionSummaryProps, CardProps } from '@mui/joy';
|
|
4
4
|
export { Box, CardActions, CardContent, CardCover, CardOverflow, IconButton, ListDivider, ListItem, ListItemButton, ListItemContent, ListItemDecorator, ListSubheader, MenuButton, 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
|
|
14
|
+
declare function Avatar(props: AvatarProps): react_jsx_runtime.JSX.Element;
|
|
15
15
|
|
|
16
|
-
declare function
|
|
16
|
+
declare function Badge(props: BadgeProps): react_jsx_runtime.JSX.Element;
|
|
17
17
|
|
|
18
|
-
declare function
|
|
18
|
+
declare function Chip(props: ChipProps): react_jsx_runtime.JSX.Element;
|
|
19
19
|
|
|
20
|
-
|
|
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
|
|
23
|
-
|
|
24
|
-
|
|
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
|
|
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
|
+
}
|
|
115
|
+
declare function Table({ id, loading, maxHeight, wrapText, rowRender, reactTableOptions, commandColumn, commandColumnSize, gridCheckboxes, selectedField, onSelectionChange, onHeaderSelectionChange, headerSelectionValue, allSelected, }: TableProps): react_jsx_runtime.JSX.Element;
|
|
116
|
+
|
|
117
|
+
interface TabConfig {
|
|
118
|
+
label: string;
|
|
119
|
+
id: string;
|
|
120
|
+
content: JSX.Element;
|
|
121
|
+
}
|
|
122
|
+
interface TabsProps {
|
|
123
|
+
tabsConfig: TabConfig[];
|
|
124
|
+
defaultId?: string;
|
|
125
|
+
}
|
|
126
|
+
declare function Tabs({ tabsConfig, defaultId }: TabsProps): react_jsx_runtime.JSX.Element;
|
|
127
|
+
|
|
128
|
+
interface TextBlockProps {
|
|
129
|
+
label?: string;
|
|
130
|
+
content?: string | JSX.Element;
|
|
131
|
+
size?: "small" | "medium" | "large";
|
|
132
|
+
inline?: boolean;
|
|
133
|
+
}
|
|
134
|
+
declare function TextBlock({ label, content, size, inline }: TextBlockProps): react_jsx_runtime.JSX.Element;
|
|
135
|
+
|
|
136
|
+
interface TooltipProps extends TooltipProps$1 {
|
|
137
|
+
maxWidth?: string;
|
|
138
|
+
}
|
|
139
|
+
declare function Tooltip({ children, maxWidth, ...props }: React.PropsWithChildren<TooltipProps>): react_jsx_runtime.JSX.Element;
|
|
140
|
+
|
|
141
|
+
declare function Typography(props: TypographyProps): react_jsx_runtime.JSX.Element;
|
|
27
142
|
|
|
28
143
|
declare function Alert(props: AlertProps): react_jsx_runtime.JSX.Element;
|
|
29
144
|
|
|
145
|
+
declare function CircularProgress(props: CircularProgressProps): react_jsx_runtime.JSX.Element;
|
|
146
|
+
|
|
147
|
+
interface SpinnerIconProps {
|
|
148
|
+
size?: number;
|
|
149
|
+
strokeWidth?: number;
|
|
150
|
+
color?: string;
|
|
151
|
+
}
|
|
152
|
+
declare function LoadingSpinner(props: SpinnerIconProps): ReactElement;
|
|
153
|
+
|
|
154
|
+
interface ProgressBarProps {
|
|
155
|
+
ariaLabel: string;
|
|
156
|
+
percentage: number;
|
|
157
|
+
}
|
|
158
|
+
declare function ProgressBar({ ariaLabel, percentage, }: ProgressBarProps): ReactElement;
|
|
159
|
+
|
|
160
|
+
type MessageLevel = "info" | "success" | "warning" | "error";
|
|
161
|
+
interface TextMessage {
|
|
162
|
+
level: MessageLevel;
|
|
163
|
+
text: string;
|
|
164
|
+
noFade?: boolean;
|
|
165
|
+
}
|
|
166
|
+
interface HTMLMessage {
|
|
167
|
+
level: MessageLevel;
|
|
168
|
+
html: string;
|
|
169
|
+
noFade?: boolean;
|
|
170
|
+
}
|
|
171
|
+
type Message = TextMessage | HTMLMessage;
|
|
172
|
+
interface ToastMessagesProps {
|
|
173
|
+
messages: Message[];
|
|
174
|
+
}
|
|
175
|
+
declare function ToastMessages({ messages }: ToastMessagesProps): ReactElement;
|
|
176
|
+
|
|
30
177
|
interface AppBarProps {
|
|
31
178
|
leftSide?: JSX.Element;
|
|
32
179
|
rightSide?: JSX.Element;
|
|
@@ -57,6 +204,35 @@ interface AppBarProps {
|
|
|
57
204
|
}
|
|
58
205
|
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
206
|
|
|
207
|
+
declare function FullPageErrorFallback(): react_jsx_runtime.JSX.Element;
|
|
208
|
+
|
|
209
|
+
type Theme = "light_internal" | "light_external";
|
|
210
|
+
interface ThemeProviderProps {
|
|
211
|
+
theme?: Theme;
|
|
212
|
+
}
|
|
213
|
+
declare function ThemeProvider({ children, theme, }: React.PropsWithChildren<ThemeProviderProps>): react_jsx_runtime.JSX.Element;
|
|
214
|
+
|
|
215
|
+
interface LayoutProps {
|
|
216
|
+
header?: JSX.Element;
|
|
217
|
+
theme?: Theme;
|
|
218
|
+
showSidebar?: boolean;
|
|
219
|
+
sidebarContent?: React$1.ReactNode;
|
|
220
|
+
sidebarWidth?: number;
|
|
221
|
+
collapsedSidebarWidth?: number;
|
|
222
|
+
sidebarHeaderContent?: React$1.ReactNode;
|
|
223
|
+
footerReleaseName?: string;
|
|
224
|
+
}
|
|
225
|
+
declare function Layout({ children, header, theme, showSidebar, sidebarContent, sidebarWidth, collapsedSidebarWidth, sidebarHeaderContent, footerReleaseName, }: React$1.PropsWithChildren<LayoutProps>): react_jsx_runtime.JSX.Element;
|
|
226
|
+
|
|
227
|
+
interface LogoProps {
|
|
228
|
+
width?: number;
|
|
229
|
+
fillColour?: string;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
declare function LogoSVG({ width, fillColour }: LogoProps): JSX.Element;
|
|
233
|
+
|
|
234
|
+
declare function LogoSVGMini({ width, fillColour }: LogoProps): JSX.Element;
|
|
235
|
+
|
|
60
236
|
interface BaseOption {
|
|
61
237
|
label: string;
|
|
62
238
|
value: number | string;
|
|
@@ -81,17 +257,6 @@ interface AutocompleteSelectMultipleProps<T extends BaseOption> extends Autocomp
|
|
|
81
257
|
}
|
|
82
258
|
declare function AutocompleteSelectMultiple<T extends BaseOption>({ defaultValue, id, name, inline, onChange, SelectedOption, helpText, ...props }: AutocompleteSelectMultipleProps<T>): ReactElement;
|
|
83
259
|
|
|
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
260
|
interface LinkButtonInternalProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
96
261
|
kind?: "primary" | "secondary" | "danger" | "basic" | "debug";
|
|
97
262
|
size?: "normal" | "small";
|
|
@@ -120,41 +285,8 @@ interface ButtonProps extends CommonButtonProps {
|
|
|
120
285
|
}
|
|
121
286
|
declare function Button({ children, ...props }: React__default.PropsWithChildren<LinkButtonProps | SubmitButtonProps | ButtonProps>): React__default.ReactElement;
|
|
122
287
|
|
|
123
|
-
declare function Card(props: CardProps): react_jsx_runtime.JSX.Element;
|
|
124
|
-
|
|
125
288
|
declare function Checkbox(props: CheckboxProps): react_jsx_runtime.JSX.Element;
|
|
126
289
|
|
|
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
290
|
type DateInputProps = ReactDatePickerProps;
|
|
159
291
|
declare const DateInput: React__default.ForwardRefExoticComponent<DateInputProps & React__default.RefAttributes<ReactDatePicker<undefined, undefined>>>;
|
|
160
292
|
|
|
@@ -166,73 +298,32 @@ declare function DateTimeInput({ id, name, defaultValue, onChangeValue, showNowB
|
|
|
166
298
|
id?: string;
|
|
167
299
|
}): ReactElement;
|
|
168
300
|
|
|
169
|
-
declare function
|
|
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;
|
|
301
|
+
declare function Input(props: InputProps): react_jsx_runtime.JSX.Element;
|
|
184
302
|
|
|
185
303
|
declare function FormControl(props: FormControlProps): react_jsx_runtime.JSX.Element;
|
|
186
304
|
|
|
187
305
|
declare function FormLabel(props: FormLabelProps): react_jsx_runtime.JSX.Element;
|
|
188
306
|
|
|
189
|
-
declare function
|
|
190
|
-
|
|
191
|
-
declare function Grid(props: GridProps): react_jsx_runtime.JSX.Element;
|
|
192
|
-
|
|
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;
|
|
307
|
+
declare function Radio(props: RadioProps): react_jsx_runtime.JSX.Element;
|
|
198
308
|
|
|
199
|
-
declare function
|
|
309
|
+
declare function Slider(props: SliderProps): react_jsx_runtime.JSX.Element;
|
|
200
310
|
|
|
201
|
-
|
|
202
|
-
interface ThemeProviderProps {
|
|
203
|
-
theme?: Theme;
|
|
204
|
-
}
|
|
205
|
-
declare function ThemeProvider({ children, theme, }: React.PropsWithChildren<ThemeProviderProps>): react_jsx_runtime.JSX.Element;
|
|
311
|
+
declare function Switch(props: SwitchProps): react_jsx_runtime.JSX.Element;
|
|
206
312
|
|
|
207
|
-
|
|
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;
|
|
313
|
+
declare function Textarea(props: TextareaProps): react_jsx_runtime.JSX.Element;
|
|
218
314
|
|
|
219
|
-
declare function
|
|
315
|
+
declare function Container(props: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
220
316
|
|
|
221
|
-
|
|
222
|
-
size?: number;
|
|
223
|
-
strokeWidth?: number;
|
|
224
|
-
color?: string;
|
|
225
|
-
}
|
|
226
|
-
declare function LoadingSpinner(props: SpinnerIconProps): ReactElement;
|
|
317
|
+
declare function Grid(props: GridProps): react_jsx_runtime.JSX.Element;
|
|
227
318
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
319
|
+
declare function Breadcrumb({ children, }: PropsWithChildren<{
|
|
320
|
+
children: React.ReactNode;
|
|
321
|
+
}>): react_jsx_runtime.JSX.Element;
|
|
322
|
+
declare namespace Breadcrumb {
|
|
323
|
+
var Item: styled_components_dist_types.IStyledComponentBase<"web", styled_components.FastOmit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>> & string;
|
|
231
324
|
}
|
|
232
325
|
|
|
233
|
-
declare function
|
|
234
|
-
|
|
235
|
-
declare function LogoSVGMini({ width, fillColour }: LogoProps): JSX.Element;
|
|
326
|
+
declare function Dropdown(props: DropdownProps): react_jsx_runtime.JSX.Element;
|
|
236
327
|
|
|
237
328
|
declare function Menu(props: MenuProps): react_jsx_runtime.JSX.Element;
|
|
238
329
|
|
|
@@ -240,121 +331,35 @@ declare const MenuHeading: typeof ListItem;
|
|
|
240
331
|
|
|
241
332
|
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
333
|
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
|
-
}, "
|
|
244
|
-
|
|
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;
|
|
334
|
+
}, "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>>;
|
|
273
335
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
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;
|
|
291
|
-
}
|
|
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;
|
|
298
|
-
|
|
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;
|
|
336
|
+
interface ModalWindowProps extends Omit<DrawerProps, "open" | "anchor"> {
|
|
337
|
+
side: "left" | "right";
|
|
338
|
+
size?: "sm" | "md" | "lg";
|
|
339
|
+
open: boolean;
|
|
340
|
+
onClose: () => void;
|
|
341
|
+
onCloseCompleted?: () => void;
|
|
342
|
+
closeRequested?: boolean;
|
|
343
|
+
closeBlocked?: boolean;
|
|
344
|
+
showCloseButton?: boolean;
|
|
311
345
|
}
|
|
312
|
-
declare
|
|
346
|
+
declare const Modal: React__default.ForwardRefExoticComponent<Omit<React__default.PropsWithChildren<ModalWindowProps>, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
|
|
313
347
|
|
|
314
|
-
|
|
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;
|
|
348
|
+
declare function Accordion$1(props: AccordionProps$1): react_jsx_runtime.JSX.Element;
|
|
324
349
|
|
|
325
|
-
declare function
|
|
350
|
+
declare function AccordionDetails(props: AccordionDetailsProps): react_jsx_runtime.JSX.Element;
|
|
326
351
|
|
|
327
|
-
|
|
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;
|
|
352
|
+
declare function AccordionGroup(props: AccordionGroupProps): react_jsx_runtime.JSX.Element;
|
|
334
353
|
|
|
335
|
-
|
|
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[];
|
|
349
|
-
}
|
|
350
|
-
declare function ToastMessages({ messages }: ToastMessagesProps): ReactElement;
|
|
354
|
+
declare function AccordionSummary(props: AccordionSummaryProps): react_jsx_runtime.JSX.Element;
|
|
351
355
|
|
|
352
|
-
interface
|
|
353
|
-
|
|
356
|
+
interface AccordionProps {
|
|
357
|
+
title: string | React.ReactNode;
|
|
358
|
+
open?: boolean;
|
|
354
359
|
}
|
|
355
|
-
declare function
|
|
360
|
+
declare function Accordion({ title, children, open, }: React.PropsWithChildren<AccordionProps>): react_jsx_runtime.JSX.Element;
|
|
356
361
|
|
|
357
|
-
declare function
|
|
362
|
+
declare function Card(props: CardProps): react_jsx_runtime.JSX.Element;
|
|
358
363
|
|
|
359
364
|
interface NavigationProgressState {
|
|
360
365
|
showProgress: boolean;
|
|
@@ -440,4 +445,4 @@ declare const formatText: (text: string | null | undefined) => string;
|
|
|
440
445
|
* */
|
|
441
446
|
declare const formatCurrency: (value: number | string | null | undefined, locale?: string | undefined, options?: Intl.NumberFormatOptions) => string;
|
|
442
447
|
|
|
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 };
|
|
448
|
+
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, 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.
|
|
3
|
+
"version": "1.20.0",
|
|
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",
|