@nypl/design-system-react-components 3.1.1 → 3.1.2
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/design-system-react-components.cjs +46 -46
- package/dist/design-system-react-components.js +3885 -3872
- package/dist/src/components/Heading/Heading.d.ts +2 -2
- package/dist/src/components/Hero/Hero.d.ts +3 -1
- package/dist/src/components/HorizontalRule/HorizontalRule.d.ts +2 -0
- package/dist/src/components/SkeletonLoader/SkeletonLoader.d.ts +2 -0
- package/dist/src/components/Template/Template.d.ts +4 -0
- package/dist/src/components/Text/Text.d.ts +2 -0
- package/dist/src/theme/components/button.d.ts +1 -1
- package/dist/src/theme/components/heading.d.ts +1 -1
- package/dist/src/theme/components/skeletonLoader.d.ts +2 -2
- package/dist/src/theme/components/template.d.ts +3 -3
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
1
|
+
import { ChakraComponent, HeadingProps as ChakraHeadingProps } from "@chakra-ui/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
export declare const headingSizesArray: readonly ["display1", "heading1", "heading2", "heading3", "heading4", "heading5", "heading6", "primary", "secondary", "tertiary", "callout"];
|
|
4
4
|
export declare const headingLevelsArray: readonly ["h1", "h2", "h3", "h4", "h5", "h6", "one", "two", "three", "four", "five", "six"];
|
|
5
5
|
export type HeadingSizes = typeof headingSizesArray[number];
|
|
6
6
|
export type HeadingLevels = typeof headingLevelsArray[number];
|
|
7
|
-
export interface HeadingProps {
|
|
7
|
+
export interface HeadingProps extends ChakraHeadingProps {
|
|
8
8
|
/** Optional className that appears in addition to `heading` */
|
|
9
9
|
className?: string;
|
|
10
10
|
/** Optional ID that other components can cross reference for accessibility
|
|
@@ -4,7 +4,7 @@ import { ComponentImageProps } from "../Image/Image";
|
|
|
4
4
|
export declare const heroTypesArray: readonly ["primary", "secondary", "secondaryBooksAndMore", "secondaryLocations", "secondaryResearch", "secondaryWhatsOn", "tertiary", "campaign", "fiftyFifty"];
|
|
5
5
|
export type HeroTypes = typeof heroTypesArray[number];
|
|
6
6
|
export declare const heroSecondaryTypes: string[];
|
|
7
|
-
export interface HeroImageProps extends Pick<ComponentImageProps, "alt" | "fallbackSrc" | "src" | "onError"> {
|
|
7
|
+
export interface HeroImageProps extends Pick<ComponentImageProps, "alt" | "fallbackSrc" | "id" | "src" | "onError"> {
|
|
8
8
|
}
|
|
9
9
|
export interface HeroProps {
|
|
10
10
|
/**
|
|
@@ -29,6 +29,8 @@ export interface HeroProps {
|
|
|
29
29
|
heading?: JSX.Element;
|
|
30
30
|
/** Used to control how the `Hero` component will be rendered. */
|
|
31
31
|
heroType?: HeroTypes;
|
|
32
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
33
|
+
id?: string;
|
|
32
34
|
/** Object used to create and render the `Image` component. Note that only
|
|
33
35
|
* `alt`, `component`, and `src` are the available attributes to pass. If
|
|
34
36
|
* `imageProps.alt` is left blank, a warning will be logged to the console and
|
|
@@ -7,6 +7,8 @@ export interface HorizontalRuleProps {
|
|
|
7
7
|
align?: "left" | "right";
|
|
8
8
|
/** ClassName you can add in addition to `horizontal-rule` */
|
|
9
9
|
className?: string;
|
|
10
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
11
|
+
id?: string;
|
|
10
12
|
}
|
|
11
13
|
export declare const HorizontalRule: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<HorizontalRuleProps> & React.RefAttributes<HTMLDivElement & HTMLHRElement>>, React.PropsWithChildren<HorizontalRuleProps>>;
|
|
12
14
|
export default HorizontalRule;
|
|
@@ -12,6 +12,8 @@ export interface SkeletonLoaderProps {
|
|
|
12
12
|
/** Optional numeric value to control the number of lines for heading
|
|
13
13
|
* placeholder; default value is `1`. */
|
|
14
14
|
headingSize?: number;
|
|
15
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
16
|
+
id?: string;
|
|
15
17
|
/** Optional value to control the aspect ratio of the image placeholder;
|
|
16
18
|
* default value is `"square"`. */
|
|
17
19
|
imageAspectRatio?: SkeletonLoaderImageRatios;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ChakraComponent } from "@chakra-ui/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
export interface TemplateProps {
|
|
4
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
5
|
+
id?: string;
|
|
4
6
|
}
|
|
5
7
|
export interface TemplateHeaderProps {
|
|
6
8
|
/** Flag to render an HTML header element. True by default. */
|
|
@@ -41,6 +43,8 @@ export interface TemplateAppContainerProps extends TemplateFooterProps, Template
|
|
|
41
43
|
footer?: React.ReactElement;
|
|
42
44
|
/** DOM that will be rendered in the `TemplateHeader` component section. */
|
|
43
45
|
header?: React.ReactElement;
|
|
46
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
47
|
+
id?: string;
|
|
44
48
|
/** Render the `SkipNavigation` component or not. False by default. */
|
|
45
49
|
renderSkipNavigation?: boolean;
|
|
46
50
|
}
|
|
@@ -5,6 +5,8 @@ export type TextSizes = typeof textSizesArray[number];
|
|
|
5
5
|
export interface TextProps {
|
|
6
6
|
/** Additional class name to render in the `Text` component. */
|
|
7
7
|
className?: string;
|
|
8
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
9
|
+
id?: string;
|
|
8
10
|
/** Optional prop used to show bolded text */
|
|
9
11
|
isBold?: boolean;
|
|
10
12
|
/** Optional prop used to show itlicized text */
|
|
@@ -196,7 +196,7 @@ declare const Button: {
|
|
|
196
196
|
};
|
|
197
197
|
defaultProps?: {
|
|
198
198
|
size?: string | number;
|
|
199
|
-
variant?: "
|
|
199
|
+
variant?: "link" | "text" | "primary" | "secondary" | "callout" | "pill" | "iconOnly" | "noBrand";
|
|
200
200
|
colorScheme?: string;
|
|
201
201
|
};
|
|
202
202
|
parts: ("base" | "screenreaderOnly")[];
|
|
@@ -513,7 +513,7 @@ declare const Heading: {
|
|
|
513
513
|
};
|
|
514
514
|
defaultProps?: {
|
|
515
515
|
size?: string | number;
|
|
516
|
-
variant?: "
|
|
516
|
+
variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "display1" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "primary" | "secondary" | "tertiary" | "callout" | "one" | "two" | "three" | "four" | "five" | "six";
|
|
517
517
|
colorScheme?: string;
|
|
518
518
|
};
|
|
519
519
|
parts: ("base" | "headingWrapper")[];
|
|
@@ -65,7 +65,7 @@ declare const SkeletonLoader: {
|
|
|
65
65
|
};
|
|
66
66
|
sizes?: {
|
|
67
67
|
[key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{
|
|
68
|
-
keys: ("base" | "button" | "section" | "
|
|
68
|
+
keys: ("base" | "button" | "section" | "image" | "content" | "container" | "heading" | "loader")[];
|
|
69
69
|
}>;
|
|
70
70
|
};
|
|
71
71
|
variants?: {
|
|
@@ -113,6 +113,6 @@ declare const SkeletonLoader: {
|
|
|
113
113
|
variant?: "row";
|
|
114
114
|
colorScheme?: string;
|
|
115
115
|
};
|
|
116
|
-
parts: ("base" | "button" | "section" | "
|
|
116
|
+
parts: ("base" | "button" | "section" | "image" | "content" | "container" | "heading" | "loader")[];
|
|
117
117
|
};
|
|
118
118
|
export default SkeletonLoader;
|
|
@@ -63,7 +63,7 @@ declare const _default: {
|
|
|
63
63
|
};
|
|
64
64
|
defaultProps?: {
|
|
65
65
|
size?: string | number;
|
|
66
|
-
variant?: "
|
|
66
|
+
variant?: "right" | "left";
|
|
67
67
|
colorScheme?: string;
|
|
68
68
|
};
|
|
69
69
|
};
|
|
@@ -119,7 +119,7 @@ declare const _default: {
|
|
|
119
119
|
};
|
|
120
120
|
defaultProps?: {
|
|
121
121
|
size?: string | number;
|
|
122
|
-
variant?: "
|
|
122
|
+
variant?: "right" | "left";
|
|
123
123
|
colorScheme?: string;
|
|
124
124
|
};
|
|
125
125
|
};
|
|
@@ -141,7 +141,7 @@ declare const _default: {
|
|
|
141
141
|
};
|
|
142
142
|
defaultProps?: {
|
|
143
143
|
size?: string | number;
|
|
144
|
-
variant?: "
|
|
144
|
+
variant?: "right" | "left";
|
|
145
145
|
colorScheme?: string;
|
|
146
146
|
};
|
|
147
147
|
};
|