@harpercollins/harpercollins-design-system 1.8.45 → 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.
@@ -1,6 +1,6 @@
1
1
  import { Meta, StoryObj } from "@storybook/react";
2
- import Autocomplete from "./Autocomplete";
3
- declare const meta: Meta<typeof Autocomplete>;
2
+ import CustomAutocomplete from "./Autocomplete";
3
+ declare const meta: Meta<typeof CustomAutocomplete>;
4
4
  export default meta;
5
- type Story = StoryObj<typeof Autocomplete>;
5
+ type Story = StoryObj<typeof CustomAutocomplete>;
6
6
  export declare const Default: Story;
@@ -1,11 +1,4 @@
1
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
- }
2
+ import { AutocompleteSelectMultipleProps } from "../types";
10
3
  declare function AutocompleteSelectMultiple({ changeNotification, defaultValue, id, inline, label, onChange: originalOnChange, options, ...props }: AutocompleteSelectMultipleProps): ReactElement;
11
4
  export default AutocompleteSelectMultiple;
@@ -1,5 +1,15 @@
1
+ import { SyntheticEvent } from "react";
1
2
  export interface Option {
2
3
  label: string;
3
4
  value: string;
4
5
  id?: number | string;
5
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
+ }
package/dist/index.d.ts CHANGED
@@ -1,13 +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
9
  import { AutocompleteProps as AutocompleteProps$1 } from '@mui/material/Autocomplete';
10
- import { AutocompleteProps as AutocompleteProps$2 } from '@mui/material';
11
10
 
12
11
  declare const theme: {
13
12
  colours: {
@@ -226,6 +225,15 @@ interface Option {
226
225
  value: string;
227
226
  id?: number | string;
228
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
+ }
229
237
 
230
238
  interface AutocompleteProps extends AutocompleteProps$1<Option, true, false, false> {
231
239
  changeNotification: () => void;
@@ -233,12 +241,6 @@ interface AutocompleteProps extends AutocompleteProps$1<Option, true, false, fal
233
241
  }
234
242
  declare function Autocomplete({ changeNotification, defaultValue, id, label, onChange: originalOnChange, options, ...props }: AutocompleteProps): ReactElement;
235
243
 
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
244
  declare function AutocompleteSelectMultiple({ changeNotification, defaultValue, id, inline, label, onChange: originalOnChange, options, ...props }: AutocompleteSelectMultipleProps): ReactElement;
243
245
 
244
246
  declare function useToggle(initialState: boolean | (() => boolean)): {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harpercollins/harpercollins-design-system",
3
- "version": "1.8.45",
3
+ "version": "1.8.47",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@ssh.dev.azure.com:v3/HarperCollinsUK/HCDesignSystem/HCDesignSystem"
@@ -44,8 +44,6 @@
44
44
  "@fortawesome/free-solid-svg-icons": "^6.5.2",
45
45
  "@fortawesome/react-fontawesome": "^0.2.2",
46
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",
49
47
  "@popperjs/core": "^2.11.8",
50
48
  "@storybook/react": "^8.1.4",
51
49
  "@storybook/test": "^8.1.4",
@@ -145,7 +143,6 @@
145
143
  "resolutions": {
146
144
  "jackspeak": "2.1.1",
147
145
  "@types/mime": "3.0.4",
148
- "styled-components": "^6.1.11",
149
- "@mui/styled-engine": "npm:@mui/styled-engine-sc@latest"
146
+ "styled-components": "^6.1.11"
150
147
  }
151
148
  }