@harpercollins/harpercollins-design-system 1.8.44 → 1.8.47
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 +296 -141
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/src/components/index.d.ts +3 -1
- package/dist/cjs/types/src/components/inputs/Autocomplete/Autocomplete.d.ts +9 -0
- package/dist/cjs/types/src/components/inputs/Autocomplete/Autocomplete.stories.d.ts +6 -0
- package/dist/cjs/types/src/components/inputs/Autocomplete/AutocompleteSelectMultiple/AutocompleteSelectMultiple.d.ts +4 -0
- package/dist/cjs/types/src/components/inputs/Autocomplete/AutocompleteSelectMultiple/AutocompleteSelectMultiple.stories.d.ts +7 -0
- package/dist/cjs/types/src/components/inputs/Autocomplete/AutocompleteSelectMultiple/index.d.ts +2 -0
- package/dist/cjs/types/src/components/inputs/Autocomplete/index.d.ts +2 -0
- package/dist/cjs/types/src/components/inputs/Autocomplete/types.d.ts +15 -0
- package/dist/cjs/types/src/components/inputs/TextField/TextField.d.ts +6 -0
- package/dist/cjs/types/src/components/inputs/TextField/index.d.ts +2 -0
- package/dist/esm/index.js +300 -145
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/index.d.ts +3 -1
- package/dist/esm/types/src/components/inputs/Autocomplete/Autocomplete.d.ts +9 -0
- package/dist/esm/types/src/components/inputs/Autocomplete/Autocomplete.stories.d.ts +6 -0
- package/dist/esm/types/src/components/inputs/Autocomplete/AutocompleteSelectMultiple/AutocompleteSelectMultiple.d.ts +4 -0
- package/dist/esm/types/src/components/inputs/Autocomplete/AutocompleteSelectMultiple/AutocompleteSelectMultiple.stories.d.ts +7 -0
- package/dist/esm/types/src/components/inputs/Autocomplete/AutocompleteSelectMultiple/index.d.ts +2 -0
- package/dist/esm/types/src/components/inputs/Autocomplete/index.d.ts +2 -0
- package/dist/esm/types/src/components/inputs/Autocomplete/types.d.ts +15 -0
- package/dist/esm/types/src/components/inputs/TextField/TextField.d.ts +6 -0
- package/dist/esm/types/src/components/inputs/TextField/index.d.ts +2 -0
- package/dist/index.d.ts +26 -2
- package/package.json +4 -3
- package/dist/cjs/types/src/components/inputs/Select/Select.d.ts +0 -4
- package/dist/cjs/types/src/components/inputs/Select/index.d.ts +0 -2
- package/dist/cjs/types/src/components/inputs/SelectMultiple/SelectMultiple.d.ts +0 -7
- package/dist/cjs/types/src/components/inputs/SelectMultiple/SelectMultiple.stories.d.ts +0 -6
- package/dist/cjs/types/src/components/inputs/SelectMultiple/index.d.ts +0 -2
- package/dist/cjs/types/src/components/inputs/TextInput/TextInput.d.ts +0 -3
- package/dist/cjs/types/src/components/inputs/TextInput/TextInput.stories.d.ts +0 -5
- package/dist/esm/types/src/components/inputs/Select/Select.d.ts +0 -4
- package/dist/esm/types/src/components/inputs/Select/index.d.ts +0 -2
- package/dist/esm/types/src/components/inputs/SelectMultiple/SelectMultiple.d.ts +0 -7
- package/dist/esm/types/src/components/inputs/SelectMultiple/SelectMultiple.stories.d.ts +0 -6
- package/dist/esm/types/src/components/inputs/SelectMultiple/index.d.ts +0 -2
- package/dist/esm/types/src/components/inputs/TextInput/TextInput.d.ts +0 -3
- package/dist/esm/types/src/components/inputs/TextInput/TextInput.stories.d.ts +0 -5
|
@@ -22,4 +22,6 @@ import Logo from "./global/Logo";
|
|
|
22
22
|
import Button from "./inputs/Button";
|
|
23
23
|
import Breadcrumb from "./navigation/Breadcrumb";
|
|
24
24
|
import Modal from "./overlay/Modal";
|
|
25
|
-
|
|
25
|
+
import Autocomplete from "./inputs/Autocomplete";
|
|
26
|
+
import AutocompleteSelectMultiple from "./inputs/Autocomplete/AutocompleteSelectMultiple";
|
|
27
|
+
export { Autocomplete, AutocompleteSelectMultiple, Accordion, AppBar, Badge, Breadcrumb, Button, Divider, DropDownMenu, Heading, Icon, Layout, LoadingSpinner, Logo, Modal, ProgressBar, ProgressCircle, ReadMore, RelativeTime, StatusIcon, Table, Tabs, TextField, theme, ToastMessages, Tooltip, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { AutocompleteProps as MuiAutocompleteProps } from "@mui/material/Autocomplete";
|
|
3
|
+
import { Option } from "./types";
|
|
4
|
+
export interface AutocompleteProps extends MuiAutocompleteProps<Option, true, false, false> {
|
|
5
|
+
changeNotification: () => void;
|
|
6
|
+
label: string;
|
|
7
|
+
}
|
|
8
|
+
declare function Autocomplete({ changeNotification, defaultValue, id, label, onChange: originalOnChange, options, ...props }: AutocompleteProps): ReactElement;
|
|
9
|
+
export default Autocomplete;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import CustomAutocomplete from "./Autocomplete";
|
|
3
|
+
declare const meta: Meta<typeof CustomAutocomplete>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof CustomAutocomplete>;
|
|
6
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { AutocompleteSelectMultipleProps } from "../types";
|
|
3
|
+
declare function AutocompleteSelectMultiple({ changeNotification, defaultValue, id, inline, label, onChange: originalOnChange, options, ...props }: AutocompleteSelectMultipleProps): ReactElement;
|
|
4
|
+
export default AutocompleteSelectMultiple;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import AutocompleteSelectMultiple from "./AutocompleteSelectMultiple";
|
|
3
|
+
declare const meta: Meta<typeof AutocompleteSelectMultiple>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AutocompleteSelectMultiple>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Inline: Story;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SyntheticEvent } from "react";
|
|
2
|
+
export interface Option {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
id?: number | string;
|
|
6
|
+
}
|
|
7
|
+
export interface AutocompleteSelectMultipleProps {
|
|
8
|
+
defaultValue: Option[] | undefined;
|
|
9
|
+
inline?: boolean;
|
|
10
|
+
changeNotification?: () => void;
|
|
11
|
+
label: string;
|
|
12
|
+
id: string;
|
|
13
|
+
options: Option[];
|
|
14
|
+
onChange: (event: SyntheticEvent<Element, Event>, value: Option[], reason: string) => void;
|
|
15
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextField as MuiTextField } from "@mui/material";
|
|
3
|
+
declare const StyledTextField: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<{
|
|
4
|
+
variant?: import("@mui/material").TextFieldVariants | undefined;
|
|
5
|
+
} & Omit<import("@mui/material").FilledTextFieldProps | import("@mui/material").OutlinedTextFieldProps | import("@mui/material").StandardTextFieldProps, "variant">, never>> & string & Omit<typeof MuiTextField, keyof import("react").Component<any, {}, any>>;
|
|
6
|
+
export default StyledTextField;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
3
|
import * as React$1 from 'react';
|
|
4
|
-
import React__default, { ReactElement, PropsWithChildren } from 'react';
|
|
4
|
+
import React__default, { ReactElement, PropsWithChildren, SyntheticEvent } from 'react';
|
|
5
5
|
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
6
6
|
import * as styled_components from 'styled-components';
|
|
7
7
|
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
|
8
8
|
import { ColumnDef } from '@tanstack/react-table';
|
|
9
|
+
import { AutocompleteProps as AutocompleteProps$1 } from '@mui/material/Autocomplete';
|
|
9
10
|
|
|
10
11
|
declare const theme: {
|
|
11
12
|
colours: {
|
|
@@ -219,6 +220,29 @@ declare const Modal: React__default.ForwardRefExoticComponent<ModalWindowProps &
|
|
|
219
220
|
children?: React__default.ReactNode;
|
|
220
221
|
} & React__default.RefAttributes<HTMLDivElement>>;
|
|
221
222
|
|
|
223
|
+
interface Option {
|
|
224
|
+
label: string;
|
|
225
|
+
value: string;
|
|
226
|
+
id?: number | string;
|
|
227
|
+
}
|
|
228
|
+
interface AutocompleteSelectMultipleProps {
|
|
229
|
+
defaultValue: Option[] | undefined;
|
|
230
|
+
inline?: boolean;
|
|
231
|
+
changeNotification?: () => void;
|
|
232
|
+
label: string;
|
|
233
|
+
id: string;
|
|
234
|
+
options: Option[];
|
|
235
|
+
onChange: (event: SyntheticEvent<Element, Event>, value: Option[], reason: string) => void;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
interface AutocompleteProps extends AutocompleteProps$1<Option, true, false, false> {
|
|
239
|
+
changeNotification: () => void;
|
|
240
|
+
label: string;
|
|
241
|
+
}
|
|
242
|
+
declare function Autocomplete({ changeNotification, defaultValue, id, label, onChange: originalOnChange, options, ...props }: AutocompleteProps): ReactElement;
|
|
243
|
+
|
|
244
|
+
declare function AutocompleteSelectMultiple({ changeNotification, defaultValue, id, inline, label, onChange: originalOnChange, options, ...props }: AutocompleteSelectMultipleProps): ReactElement;
|
|
245
|
+
|
|
222
246
|
declare function useToggle(initialState: boolean | (() => boolean)): {
|
|
223
247
|
value: boolean;
|
|
224
248
|
toggle: () => void;
|
|
@@ -226,4 +250,4 @@ declare function useToggle(initialState: boolean | (() => boolean)): {
|
|
|
226
250
|
setFalse: () => void;
|
|
227
251
|
};
|
|
228
252
|
|
|
229
|
-
export { Accordion, AppBar, Badge, Breadcrumb, Button, Divider, DropDownMenu, Heading, Icon, Layout, LoadingSpinner, Logo, Modal, ProgressBar, ProgressCircle, ReadMore, RelativeTime, StatusIcon, Table, Tabs, TextField, ToastMessages, Tooltip, theme, useToggle };
|
|
253
|
+
export { Accordion, AppBar, Autocomplete, AutocompleteSelectMultiple, Badge, Breadcrumb, Button, Divider, DropDownMenu, Heading, Icon, Layout, LoadingSpinner, Logo, Modal, ProgressBar, ProgressCircle, ReadMore, RelativeTime, StatusIcon, Table, Tabs, TextField, ToastMessages, Tooltip, theme, useToggle };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@harpercollins/harpercollins-design-system",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.47",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git@ssh.dev.azure.com:v3/HarperCollinsUK/HCDesignSystem/HCDesignSystem"
|
|
@@ -35,12 +35,15 @@
|
|
|
35
35
|
"bundle-visualizer": "npx vite-bundle-visualizer"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
+
"@emotion/react": "^11.11.4",
|
|
39
|
+
"@emotion/styled": "^11.11.5",
|
|
38
40
|
"@faker-js/faker": "^8.4.1",
|
|
39
41
|
"@fortawesome/fontawesome-svg-core": "^6.5.2",
|
|
40
42
|
"@fortawesome/free-brands-svg-icons": "^6.5.2",
|
|
41
43
|
"@fortawesome/free-regular-svg-icons": "^6.5.2",
|
|
42
44
|
"@fortawesome/free-solid-svg-icons": "^6.5.2",
|
|
43
45
|
"@fortawesome/react-fontawesome": "^0.2.2",
|
|
46
|
+
"@mui/material": "^5.15.20",
|
|
44
47
|
"@popperjs/core": "^2.11.8",
|
|
45
48
|
"@storybook/react": "^8.1.4",
|
|
46
49
|
"@storybook/test": "^8.1.4",
|
|
@@ -52,7 +55,6 @@
|
|
|
52
55
|
"react-datepicker": "^6.9.0",
|
|
53
56
|
"react-dom": "^18.2.0",
|
|
54
57
|
"react-popper": "^2.3.0",
|
|
55
|
-
"react-select": "^5.8.0",
|
|
56
58
|
"rimraf": "^5.0.5",
|
|
57
59
|
"rollup": "^4.13.2",
|
|
58
60
|
"rollup-plugin-dts": "^6.1.0",
|
|
@@ -74,7 +76,6 @@
|
|
|
74
76
|
"@storybook/addon-essentials": "^8.1.4",
|
|
75
77
|
"@storybook/addon-interactions": "^8.1.4",
|
|
76
78
|
"@storybook/addon-links": "^8.1.4",
|
|
77
|
-
"@storybook/addon-mdx-gfm": "^8.1.4",
|
|
78
79
|
"@storybook/addon-onboarding": "^8.1.4",
|
|
79
80
|
"@storybook/addon-storysource": "^8.1.4",
|
|
80
81
|
"@storybook/addon-themes": "^8.1.4",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import { Props as ReactSelectProps } from "react-select";
|
|
3
|
-
interface SelectMultipleProps extends ReactSelectProps {
|
|
4
|
-
inline?: boolean;
|
|
5
|
-
}
|
|
6
|
-
declare function SelectMultiple({ onChange: originalOnChange, inline, ...props }: SelectMultipleProps): ReactElement;
|
|
7
|
-
export default SelectMultiple;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Meta } from "@storybook/react";
|
|
2
|
-
import SelectMultiple from "./SelectMultiple";
|
|
3
|
-
declare const meta: Meta<typeof SelectMultiple>;
|
|
4
|
-
export default meta;
|
|
5
|
-
export declare function Basic(): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare function Inline(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import { Props as ReactSelectProps } from "react-select";
|
|
3
|
-
interface SelectMultipleProps extends ReactSelectProps {
|
|
4
|
-
inline?: boolean;
|
|
5
|
-
}
|
|
6
|
-
declare function SelectMultiple({ onChange: originalOnChange, inline, ...props }: SelectMultipleProps): ReactElement;
|
|
7
|
-
export default SelectMultiple;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { Meta } from "@storybook/react";
|
|
2
|
-
import SelectMultiple from "./SelectMultiple";
|
|
3
|
-
declare const meta: Meta<typeof SelectMultiple>;
|
|
4
|
-
export default meta;
|
|
5
|
-
export declare function Basic(): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export declare function Inline(): import("react/jsx-runtime").JSX.Element;
|