@harpercollins/harpercollins-design-system 1.11.0 → 1.11.3
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 +188 -185
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/src/components/data-display/ChipIcon/ChipIcon.d.ts +19 -0
- package/dist/cjs/types/src/components/data-display/ChipIcon/ChipIcon.stories.d.ts +13 -0
- package/dist/cjs/types/src/components/data-display/ChipIcon/index.d.ts +2 -0
- package/dist/cjs/types/src/components/data-display/Icon/Icon.d.ts +5 -4
- package/dist/cjs/types/src/components/data-display/List/ListDivider.d.ts +2 -0
- package/dist/cjs/types/src/components/global/AppBar/AppBar.d.ts +7 -16
- package/dist/cjs/types/src/components/global/AppBar/AppBar.stories.d.ts +1 -0
- package/dist/cjs/types/src/components/global/AppBar/testdata.d.ts +5 -0
- package/dist/cjs/types/src/components/global/Logo/types.d.ts +4 -0
- package/dist/cjs/types/src/components/index.d.ts +3 -1
- package/dist/cjs/types/src/components/navigation/Menu/MenuItem.d.ts +1 -1
- package/dist/esm/index.js +189 -186
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/data-display/ChipIcon/ChipIcon.d.ts +19 -0
- package/dist/esm/types/src/components/data-display/ChipIcon/ChipIcon.stories.d.ts +13 -0
- package/dist/esm/types/src/components/data-display/ChipIcon/index.d.ts +2 -0
- package/dist/esm/types/src/components/data-display/Icon/Icon.d.ts +5 -4
- package/dist/esm/types/src/components/data-display/List/ListDivider.d.ts +2 -0
- package/dist/esm/types/src/components/global/AppBar/AppBar.d.ts +7 -16
- package/dist/esm/types/src/components/global/AppBar/AppBar.stories.d.ts +1 -0
- package/dist/esm/types/src/components/global/AppBar/testdata.d.ts +5 -0
- package/dist/esm/types/src/components/global/Logo/types.d.ts +4 -0
- package/dist/esm/types/src/components/index.d.ts +3 -1
- package/dist/esm/types/src/components/navigation/Menu/MenuItem.d.ts +1 -1
- package/dist/index.d.ts +390 -0
- package/package.json +6 -6
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { IconDefinition } from "@fortawesome/free-solid-svg-icons";
|
|
2
|
+
import { ChipProps, ColorPaletteProp } from "@mui/joy";
|
|
3
|
+
import { IconSizes } from "../Icon/Icon";
|
|
4
|
+
export interface IChipIconProps {
|
|
5
|
+
icon: {
|
|
6
|
+
status: string;
|
|
7
|
+
label: string;
|
|
8
|
+
tooltip?: string;
|
|
9
|
+
colour?: ColorPaletteProp;
|
|
10
|
+
icon?: IconDefinition;
|
|
11
|
+
size?: IconSizes;
|
|
12
|
+
spin?: boolean;
|
|
13
|
+
};
|
|
14
|
+
chip?: {
|
|
15
|
+
size: ChipProps["size"];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
declare function ChipIcon({ icon, chip, }: IChipIconProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default ChipIcon;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import ChipIcon from "./ChipIcon";
|
|
3
|
+
declare const meta: Meta<typeof ChipIcon>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ChipIcon>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Primary: Story;
|
|
8
|
+
export declare const WithTooltip: Story;
|
|
9
|
+
export declare const WithSpin: Story;
|
|
10
|
+
export declare const Large: Story;
|
|
11
|
+
export declare const Complete: Story;
|
|
12
|
+
export declare const Warning: Story;
|
|
13
|
+
export declare const Failed: Story;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { IconProp } from "@fortawesome/fontawesome-svg-core";
|
|
2
|
-
|
|
3
|
-
export type
|
|
2
|
+
import { ColorPaletteProp } from "@mui/joy";
|
|
3
|
+
export type IconSizes = "xs" | "sm" | "md" | "lg" | "xl";
|
|
4
|
+
export type IconColours = "default" | ColorPaletteProp;
|
|
4
5
|
export interface IconProps {
|
|
5
|
-
icon: IconProp;
|
|
6
|
+
icon: IconProp | undefined;
|
|
6
7
|
size?: IconSizes;
|
|
7
8
|
colour?: IconColours;
|
|
8
9
|
spin?: boolean;
|
|
9
10
|
className?: string;
|
|
10
11
|
}
|
|
11
|
-
declare function Icon({ icon, size, colour, spin, className, }: IconProps): React.ReactElement;
|
|
12
|
+
declare function Icon({ icon, size, colour, spin, className, }: IconProps): React.ReactElement | null;
|
|
12
13
|
export default Icon;
|
|
@@ -14,24 +14,15 @@ interface AppBarProps {
|
|
|
14
14
|
}[];
|
|
15
15
|
workspacesMenu?: JSX.Element;
|
|
16
16
|
helpButton?: {
|
|
17
|
-
as
|
|
17
|
+
as?: React.ElementType;
|
|
18
18
|
href: string;
|
|
19
19
|
text: string;
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
items: {
|
|
27
|
-
label: string;
|
|
28
|
-
url: string;
|
|
29
|
-
}[];
|
|
30
|
-
}[];
|
|
31
|
-
}[];
|
|
32
|
-
mobileMenuPrimary: JSX.Element;
|
|
33
|
-
mobileMenuSecondary: JSX.Element;
|
|
34
|
-
adminMenu?: JSX.Element;
|
|
21
|
+
mobileMenuPrimary?: JSX.Element;
|
|
22
|
+
mobileMenuSecondary?: JSX.Element;
|
|
23
|
+
user?: {
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
35
26
|
}
|
|
36
|
-
declare function AppBar({ apps, currentApp, leftSide, rightSide, myAccountMenu, workspaces, workspacesMenu, currentWorkspace, helpButton,
|
|
27
|
+
declare function AppBar({ apps, currentApp, leftSide, rightSide, myAccountMenu, workspaces, workspacesMenu, currentWorkspace, helpButton, mobileMenuPrimary, mobileMenuSecondary, user, }: AppBarProps): import("react/jsx-runtime").JSX.Element;
|
|
37
28
|
export default AppBar;
|
|
@@ -9,4 +9,9 @@ export declare function MyAccountMenu(): import("react/jsx-runtime").JSX.Element
|
|
|
9
9
|
export declare function Apps(): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export declare function CurrentApp(): import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export declare function MainMenuMobile(): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const helpButton: {
|
|
13
|
+
href: string;
|
|
14
|
+
text: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function AdminMenu(): import("react/jsx-runtime").JSX.Element;
|
|
12
17
|
export declare function MockAppBar(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,6 +13,7 @@ import CardCover from "./surfaces/Card/CardCover";
|
|
|
13
13
|
import CardOverflow from "./surfaces/Card/CardOverflow";
|
|
14
14
|
import Checkbox from "./inputs/Checkbox";
|
|
15
15
|
import Chip from "./data-display/Chip";
|
|
16
|
+
import ChipIcon from "./data-display/ChipIcon";
|
|
16
17
|
import Container from "./layout/Container";
|
|
17
18
|
import Divider from "./data-display/Divider";
|
|
18
19
|
import Drawer from "./overlay/Drawer";
|
|
@@ -32,6 +33,7 @@ import ListItemDecorator from "./data-display/List/ListItemDecorator";
|
|
|
32
33
|
import ListSubheader from "./data-display/List/ListSubheader";
|
|
33
34
|
import ListItemContent from "./data-display/List/ListItemContent";
|
|
34
35
|
import LoadingSpinner from "./feedback/LoadingSpinner";
|
|
36
|
+
import ListDivider from "./data-display/List/ListDivider";
|
|
35
37
|
import Logo from "./global/Logo/Logo";
|
|
36
38
|
import LogoMini from "./global/Logo/LogoMini";
|
|
37
39
|
import Menu from "./navigation/Menu";
|
|
@@ -53,4 +55,4 @@ import TextField from "./inputs/TextField";
|
|
|
53
55
|
import ToastMessages from "./feedback/ToastMessages";
|
|
54
56
|
import Tooltip from "./data-display/Tooltip";
|
|
55
57
|
import Typography from "./data-display/Typography";
|
|
56
|
-
export { Accordion, AppBar, Autocomplete, AutocompleteSelectMultiple, Badge, Box, Breadcrumb, Button, Card, CardActions, CardContent, CardCover, CardOverflow, Checkbox, Chip, Container, Divider, Drawer, Dropdown, FormControl, FullPageErrorFallback, Grid, Heading, Icon, IconButton, Input, Layout, List, ListItem, ListItemButton, ListItemContent, ListItemDecorator, ListSubheader, LoadingSpinner, Logo, LogoMini, Menu, MenuButton, MenuHeading, MenuItem, ProgressBar, ProgressCircle, RadioButton, RadioGroup, ReadMore, RelativeTime, StatusIcon, Table, Tabs, Textarea, TextBlock, TextField, ToastMessages, Tooltip, Typography, };
|
|
58
|
+
export { Accordion, AppBar, Autocomplete, AutocompleteSelectMultiple, Badge, Box, Breadcrumb, Button, Card, CardActions, CardContent, CardCover, CardOverflow, Checkbox, Chip, ChipIcon, Container, Divider, Drawer, Dropdown, FormControl, FullPageErrorFallback, Grid, Heading, Icon, IconButton, Input, Layout, List, ListItem, ListItemButton, ListItemContent, ListItemDecorator, ListDivider, ListSubheader, LoadingSpinner, Logo, LogoMini, Menu, MenuButton, MenuHeading, MenuItem, ProgressBar, ProgressCircle, RadioButton, RadioGroup, ReadMore, RelativeTime, StatusIcon, Table, Tabs, Textarea, TextBlock, TextField, ToastMessages, Tooltip, Typography, };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const StyledMenuItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<Omit<import("@mui/joy").ListItemButtonProps, "slots" | "slotProps"> & import("@mui/joy").MenuItemSlotsAndSlotProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
2
|
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
-
}, "children" | "style" | "ref" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "
|
|
3
|
+
}, "children" | "style" | "ref" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "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" | "onResize" | "onResizeCapture" | "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" | "disabled" | "action" | "selected" | "orientation" | "sx" | "variant" | "component" | "focusVisibleClassName" | keyof import("@mui/joy").MenuItemSlotsAndSlotProps>, never>> & string & Omit<import("@mui/joy").ExtendMenuItem<import("@mui/joy").MenuItemTypeMap<{}, "div">>, keyof import("react").Component<any, {}, any>>;
|
|
4
4
|
export default StyledMenuItem;
|