@harpercollins/harpercollins-design-system 1.8.43 → 1.8.45

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 +299 -143
  2. package/dist/cjs/index.cjs.map +1 -1
  3. package/dist/cjs/types/src/components/index.d.ts +3 -1
  4. package/dist/cjs/types/src/components/inputs/Autocomplete/Autocomplete.d.ts +9 -0
  5. package/dist/cjs/types/src/components/inputs/Autocomplete/Autocomplete.stories.d.ts +6 -0
  6. package/dist/cjs/types/src/components/inputs/Autocomplete/AutocompleteSelectMultiple/AutocompleteSelectMultiple.d.ts +11 -0
  7. package/dist/cjs/types/src/components/inputs/Autocomplete/AutocompleteSelectMultiple/AutocompleteSelectMultiple.stories.d.ts +7 -0
  8. package/dist/cjs/types/src/components/inputs/Autocomplete/AutocompleteSelectMultiple/index.d.ts +2 -0
  9. package/dist/cjs/types/src/components/inputs/Autocomplete/index.d.ts +2 -0
  10. package/dist/cjs/types/src/components/inputs/Autocomplete/types.d.ts +5 -0
  11. package/dist/cjs/types/src/components/inputs/TextField/TextField.d.ts +6 -0
  12. package/dist/cjs/types/src/components/inputs/TextField/index.d.ts +2 -0
  13. package/dist/esm/index.js +301 -145
  14. package/dist/esm/index.js.map +1 -1
  15. package/dist/esm/types/src/components/index.d.ts +3 -1
  16. package/dist/esm/types/src/components/inputs/Autocomplete/Autocomplete.d.ts +9 -0
  17. package/dist/esm/types/src/components/inputs/Autocomplete/Autocomplete.stories.d.ts +6 -0
  18. package/dist/esm/types/src/components/inputs/Autocomplete/AutocompleteSelectMultiple/AutocompleteSelectMultiple.d.ts +11 -0
  19. package/dist/esm/types/src/components/inputs/Autocomplete/AutocompleteSelectMultiple/AutocompleteSelectMultiple.stories.d.ts +7 -0
  20. package/dist/esm/types/src/components/inputs/Autocomplete/AutocompleteSelectMultiple/index.d.ts +2 -0
  21. package/dist/esm/types/src/components/inputs/Autocomplete/index.d.ts +2 -0
  22. package/dist/esm/types/src/components/inputs/Autocomplete/types.d.ts +5 -0
  23. package/dist/esm/types/src/components/inputs/TextField/TextField.d.ts +6 -0
  24. package/dist/esm/types/src/components/inputs/TextField/index.d.ts +2 -0
  25. package/dist/index.d.ts +23 -1
  26. package/package.json +8 -4
  27. package/dist/cjs/types/src/components/inputs/Select/Select.d.ts +0 -4
  28. package/dist/cjs/types/src/components/inputs/Select/index.d.ts +0 -2
  29. package/dist/cjs/types/src/components/inputs/SelectMultiple/SelectMultiple.d.ts +0 -7
  30. package/dist/cjs/types/src/components/inputs/SelectMultiple/SelectMultiple.stories.d.ts +0 -6
  31. package/dist/cjs/types/src/components/inputs/SelectMultiple/index.d.ts +0 -2
  32. package/dist/cjs/types/src/components/inputs/TextInput/TextInput.d.ts +0 -3
  33. package/dist/cjs/types/src/components/inputs/TextInput/TextInput.stories.d.ts +0 -5
  34. package/dist/esm/types/src/components/inputs/Select/Select.d.ts +0 -4
  35. package/dist/esm/types/src/components/inputs/Select/index.d.ts +0 -2
  36. package/dist/esm/types/src/components/inputs/SelectMultiple/SelectMultiple.d.ts +0 -7
  37. package/dist/esm/types/src/components/inputs/SelectMultiple/SelectMultiple.stories.d.ts +0 -6
  38. package/dist/esm/types/src/components/inputs/SelectMultiple/index.d.ts +0 -2
  39. package/dist/esm/types/src/components/inputs/TextInput/TextInput.d.ts +0 -3
  40. 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
- export { Accordion, AppBar, Badge, Breadcrumb, Button, Divider, DropDownMenu, Heading, Icon, Layout, LoadingSpinner, Logo, Modal, ProgressBar, ProgressCircle, ReadMore, RelativeTime, StatusIcon, Table, Tabs, TextField, theme, ToastMessages, Tooltip, };
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 Autocomplete from "./Autocomplete";
3
+ declare const meta: Meta<typeof Autocomplete>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof Autocomplete>;
6
+ export declare const Default: Story;
@@ -0,0 +1,11 @@
1
+ import { ReactElement } from "react";
2
+ import { AutocompleteProps } from "@mui/material";
3
+ import { Option } from "../types";
4
+ export interface AutocompleteSelectMultipleProps extends AutocompleteProps<Option, true, false, false> {
5
+ defaultValue: Option[] | undefined;
6
+ inline?: boolean;
7
+ changeNotification?: () => void;
8
+ label: string;
9
+ }
10
+ declare function AutocompleteSelectMultiple({ changeNotification, defaultValue, id, inline, label, onChange: originalOnChange, options, ...props }: AutocompleteSelectMultipleProps): ReactElement;
11
+ 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,2 @@
1
+ import AutocompleteSelectMultiple from "./AutocompleteSelectMultiple";
2
+ export default AutocompleteSelectMultiple;
@@ -0,0 +1,2 @@
1
+ import Autocomplete from "./Autocomplete";
2
+ export default Autocomplete;
@@ -0,0 +1,5 @@
1
+ export interface Option {
2
+ label: string;
3
+ value: string;
4
+ id?: number | string;
5
+ }
@@ -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;
@@ -0,0 +1,2 @@
1
+ import TextField from "./TextField";
2
+ export default TextField;
package/dist/index.d.ts CHANGED
@@ -6,6 +6,8 @@ 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';
10
+ import { AutocompleteProps as AutocompleteProps$2 } from '@mui/material';
9
11
 
10
12
  declare const theme: {
11
13
  colours: {
@@ -219,6 +221,26 @@ declare const Modal: React__default.ForwardRefExoticComponent<ModalWindowProps &
219
221
  children?: React__default.ReactNode;
220
222
  } & React__default.RefAttributes<HTMLDivElement>>;
221
223
 
224
+ interface Option {
225
+ label: string;
226
+ value: string;
227
+ id?: number | string;
228
+ }
229
+
230
+ interface AutocompleteProps extends AutocompleteProps$1<Option, true, false, false> {
231
+ changeNotification: () => void;
232
+ label: string;
233
+ }
234
+ declare function Autocomplete({ changeNotification, defaultValue, id, label, onChange: originalOnChange, options, ...props }: AutocompleteProps): ReactElement;
235
+
236
+ interface AutocompleteSelectMultipleProps extends AutocompleteProps$2<Option, true, false, false> {
237
+ defaultValue: Option[] | undefined;
238
+ inline?: boolean;
239
+ changeNotification?: () => void;
240
+ label: string;
241
+ }
242
+ declare function AutocompleteSelectMultiple({ changeNotification, defaultValue, id, inline, label, onChange: originalOnChange, options, ...props }: AutocompleteSelectMultipleProps): ReactElement;
243
+
222
244
  declare function useToggle(initialState: boolean | (() => boolean)): {
223
245
  value: boolean;
224
246
  toggle: () => void;
@@ -226,4 +248,4 @@ declare function useToggle(initialState: boolean | (() => boolean)): {
226
248
  setFalse: () => void;
227
249
  };
228
250
 
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 };
251
+ 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.43",
3
+ "version": "1.8.45",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@ssh.dev.azure.com:v3/HarperCollinsUK/HCDesignSystem/HCDesignSystem"
@@ -35,12 +35,17 @@
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",
47
+ "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest",
48
+ "@mui/styled-engine-sc": "^6.0.0-alpha.18",
44
49
  "@popperjs/core": "^2.11.8",
45
50
  "@storybook/react": "^8.1.4",
46
51
  "@storybook/test": "^8.1.4",
@@ -52,7 +57,6 @@
52
57
  "react-datepicker": "^6.9.0",
53
58
  "react-dom": "^18.2.0",
54
59
  "react-popper": "^2.3.0",
55
- "react-select": "^5.8.0",
56
60
  "rimraf": "^5.0.5",
57
61
  "rollup": "^4.13.2",
58
62
  "rollup-plugin-dts": "^6.1.0",
@@ -74,7 +78,6 @@
74
78
  "@storybook/addon-essentials": "^8.1.4",
75
79
  "@storybook/addon-interactions": "^8.1.4",
76
80
  "@storybook/addon-links": "^8.1.4",
77
- "@storybook/addon-mdx-gfm": "^8.1.4",
78
81
  "@storybook/addon-onboarding": "^8.1.4",
79
82
  "@storybook/addon-storysource": "^8.1.4",
80
83
  "@storybook/addon-themes": "^8.1.4",
@@ -142,6 +145,7 @@
142
145
  "resolutions": {
143
146
  "jackspeak": "2.1.1",
144
147
  "@types/mime": "3.0.4",
145
- "styled-components": "^6.1.11"
148
+ "styled-components": "^6.1.11",
149
+ "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest"
146
150
  }
147
151
  }
@@ -1,4 +0,0 @@
1
- import { ReactElement } from "react";
2
- import { Props as ReactSelectProps } from "react-select";
3
- declare function Select({ onChange: originalOnChange, ...props }: ReactSelectProps): ReactElement;
4
- export default Select;
@@ -1,2 +0,0 @@
1
- import Select from "./Select";
2
- export default Select;
@@ -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,2 +0,0 @@
1
- import SelectMultiple from "./SelectMultiple";
2
- export default SelectMultiple;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const TextInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
3
- export default TextInput;
@@ -1,5 +0,0 @@
1
- import { Meta } from "@storybook/react";
2
- import TextInput from "./TextInput";
3
- declare const meta: Meta<typeof TextInput>;
4
- export default meta;
5
- export declare function Default(): import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- import { ReactElement } from "react";
2
- import { Props as ReactSelectProps } from "react-select";
3
- declare function Select({ onChange: originalOnChange, ...props }: ReactSelectProps): ReactElement;
4
- export default Select;
@@ -1,2 +0,0 @@
1
- import Select from "./Select";
2
- export default Select;
@@ -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,2 +0,0 @@
1
- import SelectMultiple from "./SelectMultiple";
2
- export default SelectMultiple;
@@ -1,3 +0,0 @@
1
- import React from "react";
2
- declare const TextInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
3
- export default TextInput;
@@ -1,5 +0,0 @@
1
- import { Meta } from "@storybook/react";
2
- import TextInput from "./TextInput";
3
- declare const meta: Meta<typeof TextInput>;
4
- export default meta;
5
- export declare function Default(): import("react/jsx-runtime").JSX.Element;