@harpercollins/harpercollins-design-system 1.28.2 → 1.29.1
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 +69 -45
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/types/src/components/global/Layout/Layout.d.ts +2 -1
- package/dist/cjs/types/src/components/index.d.ts +17 -2
- package/dist/cjs/types/src/components/inputs/Button/Button.stories.d.ts +1 -0
- package/dist/cjs/types/src/components/navigation/PrimaryNavigation/PrimaryNavigation.d.ts +20 -0
- package/dist/cjs/types/src/components/navigation/PrimaryNavigation/PrimaryNavigation.stories.d.ts +13 -0
- package/dist/cjs/types/src/components/navigation/PrimaryNavigation/index.d.ts +3 -0
- package/dist/esm/index.js +69 -45
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/components/global/Layout/Layout.d.ts +2 -1
- package/dist/esm/types/src/components/index.d.ts +17 -2
- package/dist/esm/types/src/components/inputs/Button/Button.stories.d.ts +1 -0
- package/dist/esm/types/src/components/navigation/PrimaryNavigation/PrimaryNavigation.d.ts +20 -0
- package/dist/esm/types/src/components/navigation/PrimaryNavigation/PrimaryNavigation.stories.d.ts +13 -0
- package/dist/esm/types/src/components/navigation/PrimaryNavigation/index.d.ts +3 -0
- package/dist/index.d.ts +37 -13
- package/package.json +1 -1
|
@@ -10,6 +10,7 @@ interface LayoutProps {
|
|
|
10
10
|
collapsedSidebarWidth?: number;
|
|
11
11
|
sidebarHeaderContent?: React.ReactNode;
|
|
12
12
|
footerReleaseName?: string;
|
|
13
|
+
footerCopyright?: string;
|
|
13
14
|
}
|
|
14
|
-
declare function Layout({ children, header, theme, showSidebar, sidebarContent, sidebarWidth, collapsedSidebarWidth, sidebarHeaderContent, footerReleaseName, }: React.PropsWithChildren<LayoutProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function Layout({ children, header, theme, showSidebar, sidebarContent, sidebarWidth, collapsedSidebarWidth, sidebarHeaderContent, footerReleaseName, footerCopyright, }: React.PropsWithChildren<LayoutProps>): import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export default Layout;
|
|
@@ -57,12 +57,13 @@ import Box from "./layout/Box";
|
|
|
57
57
|
import Container from "./layout/Container";
|
|
58
58
|
import Grid from "./layout/Grid";
|
|
59
59
|
import Breadcrumb from "./navigation/Breadcrumb";
|
|
60
|
+
import Drawer from "./navigation/Drawer";
|
|
60
61
|
import Dropdown from "./navigation/Dropdown";
|
|
61
62
|
import Menu from "./navigation/Menu";
|
|
62
63
|
import MenuButton from "./navigation/Menu/MenuButton";
|
|
63
64
|
import MenuHeading from "./navigation/Menu/MenuHeading";
|
|
64
65
|
import MenuItem from "./navigation/Menu/MenuItem";
|
|
65
|
-
import
|
|
66
|
+
import PrimaryNavigation from "./navigation/PrimaryNavigation";
|
|
66
67
|
import Accordion from "./surfaces/Accordion";
|
|
67
68
|
import AccordionDetails from "./surfaces/Accordion/AccordionDetails";
|
|
68
69
|
import AccordionGroup from "./surfaces/Accordion/AccordionGroup";
|
|
@@ -74,4 +75,18 @@ import CardContent from "./surfaces/Card/CardContent";
|
|
|
74
75
|
import CardCover from "./surfaces/Card/CardCover";
|
|
75
76
|
import CardOverflow from "./surfaces/Card/CardOverflow";
|
|
76
77
|
import Sheet from "./surfaces/Sheet/Sheet";
|
|
77
|
-
export { Accordion, AccordionDetails, AccordionGroup, AccordionLegacy, AccordionSummary, Alert, AppBar, Autocomplete, AutocompleteOption, AutocompleteSelectMultiple, Avatar, Badge, Box, Breadcrumb, Button, Card, CardActions, CardContent, CardCover, CardOverflow, Checkbox, Chip, ChipIcon, CircularProgress, Container, DatePicker, DateTimeInput, DialogActions, DialogContent, DialogTitle, Divider, Drawer, Dropdown, FormControl, FormLabel, FullPageErrorFallback, Grid, Heading, Icon, IconButton, Input, Layout, List, ListDivider, ListItem, ListItemButton, ListItemContent, ListItemDecorator, ListSubheader, LoadingSpinner, Logo, LogoMini, Menu, MenuButton, MenuHeading, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, Option, ProgressBar, ProgressCircle, RadioButton, RadioGroup, ReadMore, RelativeTime, Select, Sheet, Skeleton, Slider, StatusIcon, Switch, Tab, tabClasses, Table, TabList, tabListClasses, TabPanel, tabPanelClasses, Tabs, Textarea, TextBlock, TextField, ThemeProvider, ToastMessages, Tooltip, Typography, };
|
|
78
|
+
export { Accordion, AccordionDetails, AccordionGroup, AccordionLegacy, AccordionSummary, Alert, AppBar, Autocomplete, AutocompleteOption, AutocompleteSelectMultiple, Avatar, Badge, Box, Breadcrumb, Button, Card, CardActions, CardContent, CardCover, CardOverflow, Checkbox, Chip, ChipIcon, CircularProgress, Container, DatePicker, DateTimeInput, DialogActions, DialogContent, DialogTitle, Divider, Drawer, Dropdown, FormControl, FormLabel, FullPageErrorFallback, Grid, Heading, Icon, IconButton, Input, Layout, List, ListDivider, ListItem, ListItemButton, ListItemContent, ListItemDecorator, ListSubheader, LoadingSpinner, Logo, LogoMini, Menu, MenuButton, MenuHeading, MenuItem, Modal, ModalClose, ModalDialog, ModalOverflow, Option, PrimaryNavigation, ProgressBar, ProgressCircle, RadioButton, RadioGroup, ReadMore, RelativeTime, Select, Sheet, Skeleton, Slider, StatusIcon, Switch, Tab, tabClasses, Table, TabList, tabListClasses, TabPanel, tabPanelClasses, Tabs, Textarea, TextBlock, TextField, ThemeProvider, ToastMessages, Tooltip, Typography, };
|
|
79
|
+
export type { NavItem, PrimaryNavigationProps, } from "./navigation/PrimaryNavigation";
|
|
80
|
+
export type { ModalWindowProps } from "./navigation/Drawer/Drawer";
|
|
81
|
+
export type { IconColours, IconProps, IconSizes, } from "./data-display/Icon/Icon";
|
|
82
|
+
export type { IChipIconProps } from "./data-display/ChipIcon/ChipIcon";
|
|
83
|
+
export type { TrafficLightRanges, TrafficLights, } from "./data-display/ProgressCircle/ProgressCircle";
|
|
84
|
+
export type { InfiniteScrollOptions, SortDirection, TableProps, } from "./data-display/Table/Table.types";
|
|
85
|
+
export type { TableToolbarOptions } from "./data-display/Table/TableToolbar";
|
|
86
|
+
export type { TooltipProps } from "./data-display/Tooltip/Tooltip";
|
|
87
|
+
export type { HTMLMessage, TextMessage, } from "./feedback/ToastMessages/ToastMessages";
|
|
88
|
+
export type { Theme } from "./global/ThemeProvider/ThemeProvider";
|
|
89
|
+
export type { LogoProps } from "./global/Logo/types";
|
|
90
|
+
export type { BaseOption } from "./inputs/Autocomplete/types";
|
|
91
|
+
export type { AutocompleteProps } from "./inputs/Autocomplete/Autocomplete";
|
|
92
|
+
export type { AutocompleteSelectMultipleProps } from "./inputs/Autocomplete/AutocompleteSelectMultiple/AutocompleteSelectMultiple";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IconDefinition } from "@fortawesome/free-solid-svg-icons";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface NavItem {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: IconDefinition;
|
|
7
|
+
href?: string;
|
|
8
|
+
isActive?: boolean;
|
|
9
|
+
show?: boolean;
|
|
10
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
11
|
+
children?: NavItem[];
|
|
12
|
+
}
|
|
13
|
+
export interface PrimaryNavigationProps {
|
|
14
|
+
items: NavItem[];
|
|
15
|
+
sidebarOpen?: boolean;
|
|
16
|
+
onSidebarToggle?: () => void;
|
|
17
|
+
linkComponent?: React.ElementType;
|
|
18
|
+
}
|
|
19
|
+
declare function PrimaryNavigation({ items, sidebarOpen, onSidebarToggle, linkComponent: LinkComponent, }: PrimaryNavigationProps): React.JSX.Element;
|
|
20
|
+
export default PrimaryNavigation;
|
package/dist/cjs/types/src/components/navigation/PrimaryNavigation/PrimaryNavigation.stories.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Meta, StoryObj } from "@storybook/react-vite";
|
|
2
|
+
import PrimaryNavigation from "./PrimaryNavigation";
|
|
3
|
+
declare const meta: Meta<typeof PrimaryNavigation>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof PrimaryNavigation>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Collapsed: Story;
|
|
8
|
+
export declare const CollapsedWithActiveItem: Story;
|
|
9
|
+
export declare const CollapsedWithActiveChild: Story;
|
|
10
|
+
export declare const WithActiveItem: Story;
|
|
11
|
+
export declare const WithActiveChild: Story;
|
|
12
|
+
export declare const WithActiveGrandchild: Story;
|
|
13
|
+
export declare function ToggleSidebar(): import("react/jsx-runtime").JSX.Element;
|