@harpercollins/harpercollins-design-system 1.5.0 → 1.7.0
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.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/components/global/AppBar/testdata.d.ts +3 -0
- package/dist/cjs/types/src/components/global/Layout/Layout.d.ts +7 -0
- package/dist/cjs/types/src/components/global/Layout/Layout.stories.d.ts +6 -0
- package/dist/cjs/types/src/components/index.d.ts +2 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/types/src/components/global/AppBar/testdata.d.ts +3 -0
- package/dist/esm/types/src/components/global/Layout/Layout.d.ts +7 -0
- package/dist/esm/types/src/components/global/Layout/Layout.stories.d.ts +6 -0
- package/dist/esm/types/src/components/index.d.ts +2 -1
- package/dist/index.d.ts +19 -12
- package/package.json +1 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface LayoutProps {
|
|
3
|
+
header?: JSX.Element;
|
|
4
|
+
footer?: JSX.Element;
|
|
5
|
+
}
|
|
6
|
+
declare function Layout({ children, header, footer, }: React.PropsWithChildren<LayoutProps>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Layout;
|
|
@@ -15,7 +15,8 @@ import LoadingSpinner from "./feedback/LoadingSpinner";
|
|
|
15
15
|
import ProgressBar from "./feedback/ProgressBar";
|
|
16
16
|
import ToastMessage from "./feedback/ToastMessage";
|
|
17
17
|
import AppBar from "./global/AppBar";
|
|
18
|
+
import DropDownMenu from "./global/AppBar/DropDownMenu";
|
|
18
19
|
import Logo from "./global/Logo";
|
|
19
20
|
import Button from "./inputs/Button";
|
|
20
21
|
import Breadcrumb from "./navigation/Breadcrumb";
|
|
21
|
-
export { Accordion, AppBar, Badge, Breadcrumb, Button, Divider, Heading, Icon, LoadingSpinner, Logo, ProgressBar, ProgressCircle, ReadMore, RelativeTime, StatusIcon, Table, Tabs, TextField, ToastMessage, Tooltip, };
|
|
22
|
+
export { Accordion, AppBar, Badge, Breadcrumb, Button, Divider, DropDownMenu, Heading, Icon, LoadingSpinner, Logo, ProgressBar, ProgressCircle, ReadMore, RelativeTime, StatusIcon, Table, Tabs, TextField, ToastMessage, Tooltip, };
|
package/dist/esm/index.js
CHANGED
|
@@ -934,5 +934,5 @@ function Bi(e,t){return e?function(e){return"function"==typeof e&&(()=>{const t=
|
|
|
934
934
|
font-weight: 600;
|
|
935
935
|
}
|
|
936
936
|
}
|
|
937
|
-
`;function El({children:t}){return e(Ml,{children:e(Pl,{children:t})})}El.Item=Vl;export{An as Accordion,kl as AppBar,Nn as Badge,El as Breadcrumb,oo as Button,$n as Divider,ln as Heading,Vn as Icon,qn as LoadingSpinner,hl as Logo,dl as ProgressBar,Tn as ProgressCircle,ao as ReadMore,co as RelativeTime,Yr as StatusIcon,Yi as Table,nl as Tabs,al as TextField,pl as ToastMessage,$r as Tooltip};
|
|
937
|
+
`;function El({children:t}){return e(Ml,{children:e(Pl,{children:t})})}El.Item=Vl;export{An as Accordion,kl as AppBar,Nn as Badge,El as Breadcrumb,oo as Button,$n as Divider,bl as DropDownMenu,ln as Heading,Vn as Icon,qn as LoadingSpinner,hl as Logo,dl as ProgressBar,Tn as ProgressCircle,ao as ReadMore,co as RelativeTime,Yr as StatusIcon,Yi as Table,nl as Tabs,al as TextField,pl as ToastMessage,$r as Tooltip};
|
|
938
938
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface LayoutProps {
|
|
3
|
+
header?: JSX.Element;
|
|
4
|
+
footer?: JSX.Element;
|
|
5
|
+
}
|
|
6
|
+
declare function Layout({ children, header, footer, }: React.PropsWithChildren<LayoutProps>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default Layout;
|
|
@@ -15,7 +15,8 @@ import LoadingSpinner from "./feedback/LoadingSpinner";
|
|
|
15
15
|
import ProgressBar from "./feedback/ProgressBar";
|
|
16
16
|
import ToastMessage from "./feedback/ToastMessage";
|
|
17
17
|
import AppBar from "./global/AppBar";
|
|
18
|
+
import DropDownMenu from "./global/AppBar/DropDownMenu";
|
|
18
19
|
import Logo from "./global/Logo";
|
|
19
20
|
import Button from "./inputs/Button";
|
|
20
21
|
import Breadcrumb from "./navigation/Breadcrumb";
|
|
21
|
-
export { Accordion, AppBar, Badge, Breadcrumb, Button, Divider, Heading, Icon, LoadingSpinner, Logo, ProgressBar, ProgressCircle, ReadMore, RelativeTime, StatusIcon, Table, Tabs, TextField, ToastMessage, Tooltip, };
|
|
22
|
+
export { Accordion, AppBar, Badge, Breadcrumb, Button, Divider, DropDownMenu, Heading, Icon, LoadingSpinner, Logo, ProgressBar, ProgressCircle, ReadMore, RelativeTime, StatusIcon, Table, Tabs, TextField, ToastMessage, Tooltip, };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
3
|
+
import * as React$1 from 'react';
|
|
4
|
+
import React__default, { ReactElement, PropsWithChildren } from 'react';
|
|
5
5
|
import * as styled_components from 'styled-components';
|
|
6
6
|
import * as styled_components_dist_types from 'styled-components/dist/types';
|
|
7
7
|
import { ColumnDef } from '@tanstack/react-table';
|
|
@@ -12,13 +12,13 @@ interface AccordionProps {
|
|
|
12
12
|
}
|
|
13
13
|
declare function Accordion({ title, children, open, }: React.PropsWithChildren<AccordionProps>): react_jsx_runtime.JSX.Element;
|
|
14
14
|
|
|
15
|
-
interface BadgeInternalProps extends
|
|
15
|
+
interface BadgeInternalProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
16
16
|
size?: "small" | "medium" | "xsmall" | "xxsmall";
|
|
17
17
|
kind?: "default" | "danger" | "warning" | "grey";
|
|
18
18
|
}
|
|
19
|
-
declare function Badge({ children, ...props }:
|
|
19
|
+
declare function Badge({ children, ...props }: React__default.PropsWithChildren<BadgeInternalProps>): React__default.ReactElement;
|
|
20
20
|
|
|
21
|
-
declare const Divider: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<
|
|
21
|
+
declare const Divider: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, never>>;
|
|
22
22
|
|
|
23
23
|
interface HeadingProps {
|
|
24
24
|
children: React.ReactNode;
|
|
@@ -171,9 +171,16 @@ interface AppBarProps {
|
|
|
171
171
|
}
|
|
172
172
|
declare function AppBar({ apps, currentApp, leftSide, rightSide }: AppBarProps): react_jsx_runtime.JSX.Element;
|
|
173
173
|
|
|
174
|
+
interface DropDownMenuProps {
|
|
175
|
+
children: React__default.ReactNode;
|
|
176
|
+
toggle: React__default.ReactNode;
|
|
177
|
+
rightAlign?: boolean;
|
|
178
|
+
}
|
|
179
|
+
declare function DropDownMenu({ children, toggle, rightAlign, }: DropDownMenuProps): react_jsx_runtime.JSX.Element;
|
|
180
|
+
|
|
174
181
|
declare function Logo(): react_jsx_runtime.JSX.Element;
|
|
175
182
|
|
|
176
|
-
interface LinkButtonInternalProps extends
|
|
183
|
+
interface LinkButtonInternalProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
177
184
|
kind?: "primary" | "secondary" | "danger" | "basic" | "debug";
|
|
178
185
|
size?: "normal" | "small";
|
|
179
186
|
}
|
|
@@ -181,13 +188,13 @@ interface CommonButtonProps {
|
|
|
181
188
|
kind?: "primary" | "secondary" | "danger" | "basic" | "debug";
|
|
182
189
|
size?: "normal" | "small";
|
|
183
190
|
disabled?: boolean;
|
|
184
|
-
style?:
|
|
191
|
+
style?: React__default.CSSProperties;
|
|
185
192
|
isSubmitting?: boolean;
|
|
186
193
|
}
|
|
187
194
|
interface LinkButtonProps extends CommonButtonProps, LinkButtonInternalProps {
|
|
188
195
|
type: "link";
|
|
189
196
|
href: string;
|
|
190
|
-
as?:
|
|
197
|
+
as?: React__default.ElementType;
|
|
191
198
|
}
|
|
192
199
|
interface SubmitButtonProps extends CommonButtonProps {
|
|
193
200
|
type: "submit";
|
|
@@ -197,15 +204,15 @@ interface SubmitButtonProps extends CommonButtonProps {
|
|
|
197
204
|
}
|
|
198
205
|
interface ButtonProps extends CommonButtonProps {
|
|
199
206
|
type: "button";
|
|
200
|
-
onClick: (e:
|
|
207
|
+
onClick: (e: React__default.MouseEvent<HTMLButtonElement>) => void;
|
|
201
208
|
}
|
|
202
|
-
declare function Button({ children, ...props }:
|
|
209
|
+
declare function Button({ children, ...props }: React__default.PropsWithChildren<LinkButtonProps | SubmitButtonProps | ButtonProps>): React__default.ReactElement;
|
|
203
210
|
|
|
204
211
|
declare function Breadcrumb({ children, }: PropsWithChildren<{
|
|
205
212
|
children: React.ReactNode;
|
|
206
213
|
}>): react_jsx_runtime.JSX.Element;
|
|
207
214
|
declare namespace Breadcrumb {
|
|
208
|
-
var Item: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<
|
|
215
|
+
var Item: styled_components.IStyledComponent<"web", styled_components_dist_types.FastOmit<React$1.DetailedHTMLProps<React$1.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, never>>;
|
|
209
216
|
}
|
|
210
217
|
|
|
211
|
-
export { Accordion, AppBar, Badge, Breadcrumb, Button, Divider, Heading, Icon, LoadingSpinner, Logo, ProgressBar, ProgressCircle, ReadMore, RelativeTime, StatusIcon, Table, Tabs, TextField, ToastMessage, Tooltip };
|
|
218
|
+
export { Accordion, AppBar, Badge, Breadcrumb, Button, Divider, DropDownMenu, Heading, Icon, LoadingSpinner, Logo, ProgressBar, ProgressCircle, ReadMore, RelativeTime, StatusIcon, Table, Tabs, TextField, ToastMessage, Tooltip };
|