@harpercollins/harpercollins-design-system 1.8.47 → 1.8.48
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 +195 -307
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/src/components/data-display/TextBlock/TextBlock.d.ts +9 -0
- package/dist/cjs/types/src/components/data-display/{TextField/TextField.stories.d.ts → TextBlock/TextBlock.stories.d.ts} +3 -3
- package/dist/cjs/types/src/components/data-display/TextBlock/index.d.ts +2 -0
- package/dist/cjs/types/src/components/index.d.ts +4 -3
- package/dist/cjs/types/src/components/inputs/Autocomplete/Autocomplete.d.ts +5 -4
- package/dist/cjs/types/src/components/inputs/Input/Input.d.ts +15 -0
- package/dist/cjs/types/src/components/inputs/Input/Input.stories.d.ts +6 -0
- package/dist/cjs/types/src/components/inputs/Input/index.d.ts +2 -0
- package/dist/cjs/types/src/components/overlay/{Modal/Modal.d.ts → Drawer/Drawer.d.ts} +5 -2
- package/dist/cjs/types/src/components/overlay/{Modal/Modal.stories.d.ts → Drawer/Drawer.stories.d.ts} +3 -4
- package/dist/cjs/types/src/components/overlay/Drawer/index.d.ts +2 -0
- package/dist/esm/index.js +227 -339
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/data-display/TextBlock/TextBlock.d.ts +9 -0
- package/dist/esm/types/src/components/data-display/{TextField/TextField.stories.d.ts → TextBlock/TextBlock.stories.d.ts} +3 -3
- package/dist/esm/types/src/components/data-display/TextBlock/index.d.ts +2 -0
- package/dist/esm/types/src/components/index.d.ts +4 -3
- package/dist/esm/types/src/components/inputs/Autocomplete/Autocomplete.d.ts +5 -4
- package/dist/esm/types/src/components/inputs/Input/Input.d.ts +15 -0
- package/dist/esm/types/src/components/inputs/Input/Input.stories.d.ts +6 -0
- package/dist/esm/types/src/components/inputs/Input/index.d.ts +2 -0
- package/dist/esm/types/src/components/overlay/{Modal/Modal.d.ts → Drawer/Drawer.d.ts} +5 -2
- package/dist/esm/types/src/components/overlay/{Modal/Modal.stories.d.ts → Drawer/Drawer.stories.d.ts} +3 -4
- package/dist/esm/types/src/components/overlay/Drawer/index.d.ts +2 -0
- package/dist/index.d.ts +38 -17
- package/package.json +2 -2
- package/dist/cjs/types/src/components/data-display/TextField/TextField.d.ts +0 -9
- package/dist/cjs/types/src/components/data-display/TextField/index.d.ts +0 -2
- package/dist/cjs/types/src/components/inputs/TextField/TextField.d.ts +0 -6
- package/dist/cjs/types/src/components/inputs/TextField/index.d.ts +0 -2
- package/dist/cjs/types/src/components/overlay/Modal/index.d.ts +0 -2
- package/dist/esm/types/src/components/data-display/TextField/TextField.d.ts +0 -9
- package/dist/esm/types/src/components/data-display/TextField/index.d.ts +0 -2
- package/dist/esm/types/src/components/inputs/TextField/TextField.d.ts +0 -6
- package/dist/esm/types/src/components/inputs/TextField/index.d.ts +0 -2
- package/dist/esm/types/src/components/overlay/Modal/index.d.ts +0 -2
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface TextBlockProps {
|
|
3
|
+
label?: string;
|
|
4
|
+
content?: string | JSX.Element;
|
|
5
|
+
size?: "small" | "medium" | "large";
|
|
6
|
+
inline?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare function TextBlock({ label, content, size, inline }: TextBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export default TextBlock;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import TextBlock from "./TextBlock";
|
|
3
|
+
declare const meta: Meta<typeof TextBlock>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof TextBlock>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const Small: Story;
|
|
8
8
|
export declare const Medium: Story;
|
|
@@ -10,7 +10,7 @@ import RelativeTime from "./data-display/RelativeTime";
|
|
|
10
10
|
import StatusIcon from "./data-display/StatusIcon";
|
|
11
11
|
import Table from "./data-display/Table";
|
|
12
12
|
import Tabs from "./data-display/Tabs";
|
|
13
|
-
import
|
|
13
|
+
import TextBlock from "./data-display/TextBlock";
|
|
14
14
|
import Tooltip from "./data-display/Tooltip";
|
|
15
15
|
import LoadingSpinner from "./feedback/LoadingSpinner";
|
|
16
16
|
import ProgressBar from "./feedback/ProgressBar";
|
|
@@ -21,7 +21,8 @@ import Layout from "./global/Layout";
|
|
|
21
21
|
import Logo from "./global/Logo";
|
|
22
22
|
import Button from "./inputs/Button";
|
|
23
23
|
import Breadcrumb from "./navigation/Breadcrumb";
|
|
24
|
-
import Modal from "./overlay/Modal";
|
|
25
24
|
import Autocomplete from "./inputs/Autocomplete";
|
|
26
25
|
import AutocompleteSelectMultiple from "./inputs/Autocomplete/AutocompleteSelectMultiple";
|
|
27
|
-
|
|
26
|
+
import Input from "./inputs/Input";
|
|
27
|
+
import Drawer from "./overlay/Drawer";
|
|
28
|
+
export { Autocomplete, AutocompleteSelectMultiple, Accordion, AppBar, Badge, Breadcrumb, Button, Divider, Drawer, DropDownMenu, Heading, Icon, Input, Layout, LoadingSpinner, Logo, ProgressBar, ProgressCircle, ReadMore, RelativeTime, StatusIcon, Table, Tabs, TextBlock, theme, ToastMessages, Tooltip, };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ReactElement } from "react";
|
|
2
|
-
import { AutocompleteProps as MuiAutocompleteProps } from "@mui/
|
|
2
|
+
import { AutocompleteProps as MuiAutocompleteProps } from "@mui/joy/Autocomplete";
|
|
3
3
|
import { Option } from "./types";
|
|
4
4
|
export interface AutocompleteProps extends MuiAutocompleteProps<Option, true, false, false> {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
id: string;
|
|
6
|
+
options: Option[];
|
|
7
|
+
renderInput?: MuiAutocompleteProps<Option, true, false, false>;
|
|
7
8
|
}
|
|
8
|
-
declare function Autocomplete({
|
|
9
|
+
declare function Autocomplete({ defaultValue, id, options, onChange, ...props }: AutocompleteProps): ReactElement;
|
|
9
10
|
export default Autocomplete;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const Input: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Pick<import("react").InputHTMLAttributes<HTMLInputElement>, "name" | "type" | "defaultValue" | "autoFocus" | "id" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "onClick" | "disabled" | "value" | "autoComplete" | "placeholder" | "readOnly" | "required"> & {
|
|
3
|
+
className?: string | undefined;
|
|
4
|
+
color?: import("@mui/types").OverridableStringUnion<import("@mui/joy").ColorPaletteProp, import("@mui/joy").InputPropsColorOverrides> | undefined;
|
|
5
|
+
endDecorator?: import("react").ReactNode;
|
|
6
|
+
error?: boolean | undefined;
|
|
7
|
+
fullWidth?: boolean | undefined;
|
|
8
|
+
startDecorator?: import("react").ReactNode;
|
|
9
|
+
size?: import("@mui/types").OverridableStringUnion<"sm" | "md" | "lg", import("@mui/joy").InputPropsSizeOverrides> | undefined;
|
|
10
|
+
sx?: import("@mui/joy/styles/types").SxProps | undefined;
|
|
11
|
+
variant?: import("@mui/types").OverridableStringUnion<import("@mui/joy").VariantProp, import("@mui/joy").InputPropsVariantOverrides> | undefined;
|
|
12
|
+
} & import("@mui/joy").InputSlotsAndSlotProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
13
|
+
ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
14
|
+
}, "name" | "type" | "defaultValue" | "autoFocus" | "className" | "id" | "color" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "onKeyUp" | "onClick" | "disabled" | "value" | "autoComplete" | "placeholder" | "readOnly" | "required" | "size" | "error" | "endDecorator" | "startDecorator" | "sx" | "variant" | "fullWidth" | keyof import("@mui/joy").InputSlotsAndSlotProps>, never>> & string & Omit<import("@mui/types").OverridableComponent<import("@mui/joy").InputTypeMap<{}, "div">>, keyof import("react").Component<any, {}, any>>;
|
|
15
|
+
export default Input;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export interface ModalWindowProps {
|
|
3
|
-
side: "left" | "right"
|
|
3
|
+
side: "left" | "right";
|
|
4
|
+
size?: "sm" | "md" | "lg";
|
|
4
5
|
open: boolean;
|
|
5
6
|
onClose: () => void;
|
|
6
|
-
|
|
7
|
+
onCloseCompleted?: () => void;
|
|
8
|
+
closeRequested?: boolean;
|
|
9
|
+
closeBlocked?: boolean;
|
|
7
10
|
}
|
|
8
11
|
declare const Modal: React.ForwardRefExoticComponent<ModalWindowProps & {
|
|
9
12
|
children?: React.ReactNode;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
-
import
|
|
3
|
-
type Story = StoryObj<typeof
|
|
4
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import Drawer from "./Drawer";
|
|
3
|
+
type Story = StoryObj<typeof Drawer>;
|
|
4
|
+
declare const meta: Meta<typeof Drawer>;
|
|
5
5
|
export default meta;
|
|
6
6
|
export declare const Left: Story;
|
|
7
7
|
export declare const Right: Story;
|
|
8
8
|
export declare const Warning: Story;
|
|
9
|
-
export declare const Center: Story;
|