@nypl/design-system-react-components 1.7.0 → 1.7.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 +47 -47
- package/dist/design-system-react-components.js +7125 -7059
- package/dist/src/components/Hero/Hero.d.ts +6 -0
- package/dist/src/components/Icons/Icon.d.ts +4 -3
- package/dist/src/components/Icons/IconSvgs.d.ts +21 -0
- package/dist/src/components/Icons/iconVariables.d.ts +2 -2
- package/dist/src/components/Text/Text.d.ts +2 -0
- package/dist/src/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,12 @@ export declare const heroSecondaryTypes: string[];
|
|
|
6
6
|
export interface HeroImageProps extends Pick<ComponentImageProps, "alt" | "src"> {
|
|
7
7
|
}
|
|
8
8
|
export interface HeroProps {
|
|
9
|
+
/**
|
|
10
|
+
* Optional background color for the backdrop only in the `campaign` variant.
|
|
11
|
+
* When both `backdropBackgroundColor` and `backgroundImageSrc` are passed,
|
|
12
|
+
* the `backgroundImageSrc` will take precedence.
|
|
13
|
+
*/
|
|
14
|
+
backdropBackgroundColor?: string;
|
|
9
15
|
/** Optional hex color value used to override the default background
|
|
10
16
|
* color for a given `Hero` variation.
|
|
11
17
|
* Note: not all `Hero` variations utilize this prop. */
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { iconAlignArray, iconColorsArray, iconNamesArray,
|
|
2
|
+
import { iconAlignArray, iconColorsArray, iconNamesArray, iconRotationsArray, iconSizesArray, iconTypesArray } from "./iconVariables";
|
|
3
3
|
export type IconAlign = typeof iconAlignArray[number];
|
|
4
4
|
export type IconColors = typeof iconColorsArray[number];
|
|
5
5
|
export type IconNames = typeof iconNamesArray[number];
|
|
6
|
-
export type
|
|
6
|
+
export type IconRotations = typeof iconRotationsArray[number];
|
|
7
|
+
export type IconRotationTypes = typeof iconRotationsArray[number];
|
|
7
8
|
export type IconSizes = typeof iconSizesArray[number];
|
|
8
9
|
export type IconTypes = typeof iconTypesArray[number];
|
|
9
10
|
export interface IconProps {
|
|
@@ -17,7 +18,7 @@ export interface IconProps {
|
|
|
17
18
|
* by default. */
|
|
18
19
|
decorative?: boolean;
|
|
19
20
|
/** Rotates the icon clockwise in increments of 90deg */
|
|
20
|
-
iconRotation?:
|
|
21
|
+
iconRotation?: IconRotations;
|
|
21
22
|
/** ID that other components can cross reference for accessibility purposes */
|
|
22
23
|
id?: string;
|
|
23
24
|
/** The name of the icon you want to use. */
|
|
@@ -21,6 +21,12 @@ declare const _default: {
|
|
|
21
21
|
actionHelpOutline: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
22
22
|
title?: string;
|
|
23
23
|
}>;
|
|
24
|
+
actionIdentity: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
25
|
+
title?: string;
|
|
26
|
+
}>;
|
|
27
|
+
actionIdentityFilled: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
28
|
+
title?: string;
|
|
29
|
+
}>;
|
|
24
30
|
actionLaunch: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
25
31
|
title?: string;
|
|
26
32
|
}>;
|
|
@@ -30,6 +36,9 @@ declare const _default: {
|
|
|
30
36
|
actionRegistration: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
31
37
|
title?: string;
|
|
32
38
|
}>;
|
|
39
|
+
actionSearch: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
40
|
+
title?: string;
|
|
41
|
+
}>;
|
|
33
42
|
actionSettings: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
34
43
|
title?: string;
|
|
35
44
|
}>;
|
|
@@ -120,6 +129,9 @@ declare const _default: {
|
|
|
120
129
|
locator: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
121
130
|
title?: string;
|
|
122
131
|
}>;
|
|
132
|
+
mapsPlace: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
133
|
+
title?: string;
|
|
134
|
+
}>;
|
|
123
135
|
minus: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
124
136
|
title?: string;
|
|
125
137
|
}>;
|
|
@@ -141,12 +153,21 @@ declare const _default: {
|
|
|
141
153
|
socialSoundCloud: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
142
154
|
title?: string;
|
|
143
155
|
}>;
|
|
156
|
+
socialSpotify: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
157
|
+
title?: string;
|
|
158
|
+
}>;
|
|
159
|
+
socialTikTok: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
160
|
+
title?: string;
|
|
161
|
+
}>;
|
|
144
162
|
socialTumblr: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
145
163
|
title?: string;
|
|
146
164
|
}>;
|
|
147
165
|
socialTwitter: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
148
166
|
title?: string;
|
|
149
167
|
}>;
|
|
168
|
+
socialVimeo: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
169
|
+
title?: string;
|
|
170
|
+
}>;
|
|
150
171
|
socialYoutube: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
151
172
|
title?: string;
|
|
152
173
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const iconAlignArray: readonly ["left", "right", "none"];
|
|
2
2
|
export declare const iconColorsArray: readonly ["ui.black", "ui.white", "brand.primary", "brand.secondary", "ui.error.primary", "ui.error.secondary", "ui.status.primary", "ui.status.secondary", "ui.success.primary", "ui.success.secondary", "ui.warning.primary", "ui.warning.secondary", "section.blogs.primary", "section.blogs.secondary", "section.books-and-more.primary", "section.books-and-more.secondary", "section.education.primary", "section.education.secondary", "section.locations.primary", "section.locations.secondary", "section.research.primary", "section.research.secondary", "section.research-library.lpa", "section.research-library.schomburg", "section.research-library.schwartzman", "section.whats-on.primary", "section.whats-on.secondary", "dark.ui.error.primary", "dark.ui.error.secondary", "dark.ui.status.primary", "dark.ui.status.secondary", "dark.ui.success.primary", "dark.ui.success.secondary", "dark.ui.warning.primary", "dark.ui.warning.secondary"];
|
|
3
|
-
export declare const iconNamesArray: readonly ["accessibilityFull", "accessibilityPartial", "actionCheckCircle", "actionCheckCircleFilled", "actionExit", "actionHelpDefault", "actionHelpOutline", "actionLaunch", "actionPower", "actionRegistration", "actionSettings", "alertNotificationImportant", "alertWarningFilled", "alertWarningOutline", "arrow", "building", "check", "clock", "close", "decorativeEnvelope", "decorativeLibraryCard", "decorativeShoppingBag", "download", "errorFilled", "errorOutline", "fileTypeAudio", "fileTypeDoc", "fileTypeGenericDoc", "fileTypeImage", "fileTypePdf", "fileTypeSpreadsheet", "fileTypeVideo", "headset", "legacyAccountFilled", "legacyAccountUnfilled", "legacySocialFacebook", "legacySocialInstagram", "legacySocialTwitter", "legacySocialYoutube", "locator", "minus", "plus", "search", "socialFacebook", "socialInstagram", "socialTumblr", "socialTwitter", "socialYoutube", "speakerNotes", "utilityAccountFilled", "utilityAccountUnfilled", "utilityHamburger", "utilitySearch"];
|
|
4
|
-
export declare const
|
|
3
|
+
export declare const iconNamesArray: readonly ["accessibilityFull", "accessibilityPartial", "actionCheckCircle", "actionCheckCircleFilled", "actionExit", "actionHelpDefault", "actionHelpOutline", "actionIdentity", "actionIdentityFilled", "actionLaunch", "actionPower", "actionRegistration", "actionSearch", "actionSettings", "alertNotificationImportant", "alertWarningFilled", "alertWarningOutline", "arrow", "building", "check", "clock", "close", "decorativeEnvelope", "decorativeLibraryCard", "decorativeShoppingBag", "download", "errorFilled", "errorOutline", "fileTypeAudio", "fileTypeDoc", "fileTypeGenericDoc", "fileTypeImage", "fileTypePdf", "fileTypeSpreadsheet", "fileTypeVideo", "headset", "legacyAccountFilled", "legacyAccountUnfilled", "legacySocialFacebook", "legacySocialInstagram", "legacySocialTwitter", "legacySocialYoutube", "locator", "mapsPlace", "minus", "plus", "search", "socialFacebook", "socialInstagram", "socialPinterest", "socialSoundCloud", "socialSpotify", "socialTikTok", "socialTumblr", "socialTwitter", "socialVimeo", "socialYoutube", "speakerNotes", "utilityAccountFilled", "utilityAccountUnfilled", "utilityHamburger", "utilitySearch"];
|
|
4
|
+
export declare const iconRotationsArray: readonly ["rotate0", "rotate90", "rotate180", "rotate270"];
|
|
5
5
|
export declare const iconSizesArray: readonly ["default", "xsmall", "small", "medium", "large", "xlarge", "xxlarge", "xxxlarge"];
|
|
6
6
|
export declare const iconTypesArray: readonly ["default", "breadcrumbs"];
|
|
@@ -16,6 +16,8 @@ export interface TextProps {
|
|
|
16
16
|
isLowercase?: boolean;
|
|
17
17
|
/** Optional prop used to remove default spacing */
|
|
18
18
|
noSpace?: boolean;
|
|
19
|
+
/** Optional prop used to explicitly set the ARIA role */
|
|
20
|
+
role?: string;
|
|
19
21
|
/** Optional prop to control the text styling */
|
|
20
22
|
size?: TextSizes;
|
|
21
23
|
}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export { default as Hero } from "./components/Hero/Hero";
|
|
|
28
28
|
export type { HeroTypes } from "./components/Hero/Hero";
|
|
29
29
|
export { default as HorizontalRule } from "./components/HorizontalRule/HorizontalRule";
|
|
30
30
|
export { default as Icon } from "./components/Icons/Icon";
|
|
31
|
-
export type { IconAlign, IconColors, IconNames, IconRotationTypes, IconSizes, IconTypes, } from "./components/Icons/Icon";
|
|
31
|
+
export type { IconAlign, IconColors, IconNames, IconRotationTypes, IconRotations, IconSizes, IconTypes, } from "./components/Icons/Icon";
|
|
32
32
|
export { default as Image } from "./components/Image/Image";
|
|
33
33
|
export type { ImageRatios, ImageSizes, ImageTypes, } from "./components/Image/Image";
|
|
34
34
|
export { default as Label } from "./components/Label/Label";
|