@nypl/design-system-react-components 4.0.1 → 4.0.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.
@@ -12,16 +12,21 @@ export interface HeroProps extends BoxProps {
12
12
  * the `backgroundImageSrc` will take precedence.
13
13
  */
14
14
  backdropBackgroundColor?: string;
15
- /** Optional hex color value used to override the default background
16
- * color for a given `Hero` variant.
15
+ /** Optional color value used to override the default background color for a
16
+ * given `Hero` variant.
17
+ *
17
18
  * Note: not all `Hero` variants utilize this prop. */
18
19
  backgroundColor?: string;
19
20
  /** Optional path to an image that will be used as a background image for the
20
21
  * `Hero` component.
22
+ *
21
23
  * Note: not all `Hero` variants utilize this prop. */
22
24
  backgroundImageSrc?: string;
23
- /** Optional hex color value used to override the default text color for a
24
- * given `Hero` variation.
25
+ /** **This prop has been deprecated in favor of the `textColor` prop.**
26
+ *
27
+ * Optional color value used to override the default text color for a given
28
+ * `Hero` variant.
29
+ *
25
30
  * Note: not all `Hero` variants utilize this prop. */
26
31
  foregroundColor?: string;
27
32
  /** Optional heading element. */
@@ -33,15 +38,25 @@ export interface HeroProps extends BoxProps {
33
38
  * `imageProps.src`, it will only work for the "campaign" `Hero` type. */
34
39
  imageProps?: HeroImageProps;
35
40
  /** Optional boolean used to toggle the default text color from light to dark.
36
- * Set isDarkText to `true` if the backgroundColor is set to a light color. */
41
+ * Set `isDarkText` to `true` if the `textBackgroundColor` is set to a light
42
+ * color. */
37
43
  isDarkText?: boolean;
38
44
  /** Optional boolean used to toggle the treatment of the background image in
39
45
  * the "campaign" variant. If true, the background image will be converted to
40
46
  * black & white and darkened to 60% black. */
41
47
  isDarkBackgroundImage?: boolean;
42
- /** Optional string used for the subheader that displays
43
- * underneath the heading element. */
48
+ /** Optional string used for the subheader that displays underneath the
49
+ * heading element. */
44
50
  subHeaderText?: string | JSX.Element;
51
+ /** Optional color value used to override the default background color for a
52
+ * text content area in a given `Hero` variant. */
53
+ textBackgroundColor?: string;
54
+ /** Optional color value used to override the default text color for a given
55
+ * `Hero` variant. This prop should be used in lieu of the deprecated
56
+ * `foregroundColor` prop.
57
+ *
58
+ * Note: not all `Hero` variants utilize this prop. */
59
+ textColor?: string;
45
60
  /** Used to control how the `Hero` component will be rendered. */
46
61
  variant?: HeroVariants;
47
62
  }
@@ -31,6 +31,7 @@ declare const _default: {
31
31
  communicationCall: any;
32
32
  communicationChatBubble: any;
33
33
  communicationEmail: any;
34
+ contentCopy: any;
34
35
  contentFilterList: any;
35
36
  decorativeBookBroken: any;
36
37
  decorativeEnvelope: any;
@@ -1,6 +1,6 @@
1
1
  export declare const iconAlignArray: readonly ["left", "right", "none"];
2
2
  export declare const iconColorsArray: readonly ["currentColor", "transparent", "ui.black", "ui.white", "ui.disabled.primary", "ui.disabled.secondary", "ui.error.primary", "ui.error.secondary", "ui.focus", "ui.link.primary", "ui.link.primary-05", "ui.link.primary-10", "ui.link.secondary", "ui.link.tertiary", "ui.status.primary", "ui.status.secondary", "ui.success.primary", "ui.success.secondary", "ui.test", "ui.warning.primary", "ui.warning.secondary", "ui.bg.default", "ui.bg.hover", "ui.bg.active", "ui.border.default", "ui.border.hover", "ui.typography.heading", "ui.typography.body", "ui.typography.inverse.heading", "ui.typography.inverse.body", "ui.gray.xxxx-dark", "ui.gray.xxx-dark", "ui.gray.xx-dark", "ui.gray.x-dark", "ui.gray.dark", "ui.gray.semi-dark", "ui.gray.medium", "ui.gray.semi-medium", "ui.gray.light-cool", "ui.gray.x-light-cool", "ui.gray.xx-light-cool", "ui.gray.light-warm", "ui.gray.x-light-warm", "brand.primary", "brand.secondary", "section.blogs.primary", "section.blogs.secondary", "section.books-and-more.primary", "section.books-and-more.secondary", "section.connect.primary", "section.connect.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.schwarzman", "section.whats-on.primary", "section.whats-on.secondary", "dark.brand.primary", "dark.brand.secondary", "dark.section.blogs.primary", "dark.section.blogs.secondary", "dark.section.books-and-more.primary", "dark.section.books-and-more.secondary", "dark.section.connect.primary", "dark.section.connect.secondary", "dark.section.education.primary", "dark.section.education.secondary", "dark.section.locations.primary", "dark.section.locations.secondary", "dark.section.research.primary", "dark.section.research.secondary", "dark.section.research-library.primary", "dark.section.research-library.secondary", "dark.section.whats-on.primary", "dark.section.whats-on.secondary", "dark.ui.disabled.primary", "dark.ui.disabled.secondary", "dark.ui.error.primary", "dark.ui.error.secondary", "dark.ui.focus", "dark.ui.link.primary", "dark.ui.link.primary-05", "dark.ui.link.primary-10", "dark.ui.link.secondary", "dark.ui.link.tertiary", "dark.ui.status.primary", "dark.ui.status.secondary", "dark.ui.success.primary", "dark.ui.success.secondary", "dark.ui.test", "dark.ui.warning.secondary", "dark.ui.warning.primary", "dark.ui.bg.page", "dark.ui.bg.default", "dark.ui.bg.hover", "dark.ui.bg.active", "dark.ui.border.default", "dark.ui.border.hover", "dark.ui.typography.heading", "dark.ui.typography.body", "dark.ui.typography.inverse.heading", "dark.ui.typography.inverse.body"];
3
- export declare const iconNamesArray: readonly ["accessibilityFull", "accessibilityPartial", "actionCheckCircle", "actionCheckCircleFilled", "actionDelete", "actionExit", "actionHelpDefault", "actionHelpOutline", "actionHome", "actionIdentity", "actionIdentityFilled", "actionInfo", "actionLaunch", "actionLightbulb", "actionList", "actionLockClosed", "actionPayment", "actionPower", "actionRegistration", "actionSearch", "actionSettings", "alertNotificationImportant", "alertWarningFilled", "alertWarningOutline", "arrow", "building", "check", "clock", "close", "communicationCall", "communicationChatBubble", "communicationEmail", "contentFilterList", "decorativeBookBroken", "decorativeEnvelope", "decorativeLibraryCard", "decorativeShoppingBag", "download", "editorMode", "errorFilled", "errorOutline", "fileTypeAudio", "fileTypeDoc", "fileTypeGenericDoc", "fileTypeImage", "fileTypePdf", "fileTypeSpreadsheet", "fileTypeVideo", "headset", "legacyAccountFilled", "legacyAccountUnfilled", "legacySocialFacebook", "legacySocialInstagram", "legacySocialTwitter", "legacySocialYoutube", "locator", "mapsPlace", "minus", "moonCrescent", "navigationApps", "navigationMoreVert", "navigationSubdirectoryArrowLeft", "navigationSubdirectoryArrowRight", "plus", "search", "socialFacebook", "socialInstagram", "socialPinterest", "socialSoundCloud", "socialSpotify", "socialTikTok", "socialTumblr", "socialTwitter", "socialVimeo", "socialX", "socialYoutube", "speakerNotes", "sunFull", "utilityAccountFilled", "utilityAccountUnfilled", "utilityCheck", "utilityHamburger", "utilitySearch"];
3
+ export declare const iconNamesArray: readonly ["accessibilityFull", "accessibilityPartial", "actionCheckCircle", "actionCheckCircleFilled", "actionDelete", "actionExit", "actionHelpDefault", "actionHelpOutline", "actionHome", "actionIdentity", "actionIdentityFilled", "actionInfo", "actionLaunch", "actionLightbulb", "actionList", "actionLockClosed", "actionPayment", "actionPower", "actionRegistration", "actionSearch", "actionSettings", "alertNotificationImportant", "alertWarningFilled", "alertWarningOutline", "arrow", "building", "check", "clock", "close", "communicationCall", "communicationChatBubble", "communicationEmail", "contentCopy", "contentFilterList", "decorativeBookBroken", "decorativeEnvelope", "decorativeLibraryCard", "decorativeShoppingBag", "download", "editorMode", "errorFilled", "errorOutline", "fileTypeAudio", "fileTypeDoc", "fileTypeGenericDoc", "fileTypeImage", "fileTypePdf", "fileTypeSpreadsheet", "fileTypeVideo", "headset", "legacyAccountFilled", "legacyAccountUnfilled", "legacySocialFacebook", "legacySocialInstagram", "legacySocialTwitter", "legacySocialYoutube", "locator", "mapsPlace", "minus", "moonCrescent", "navigationApps", "navigationMoreVert", "navigationSubdirectoryArrowLeft", "navigationSubdirectoryArrowRight", "plus", "search", "socialFacebook", "socialInstagram", "socialPinterest", "socialSoundCloud", "socialSpotify", "socialTikTok", "socialTumblr", "socialTwitter", "socialVimeo", "socialX", "socialYoutube", "speakerNotes", "sunFull", "utilityAccountFilled", "utilityAccountUnfilled", "utilityCheck", "utilityHamburger", "utilitySearch"];
4
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", "xxxxlarge", "xxxxxlarge", "2xlarge", "3xlarge", "4xlarge", "5xlarge"];
6
6
  export declare const iconVariantsArray: readonly ["default", "breadcrumbs"];
@@ -1,5 +1,5 @@
1
- export declare const getTextColor: (type: any, mode: any, foregroundColor: any, isDarkText: any) => any;
2
- export declare const getLinkColor: (state: any, foregroundColor: any, isDarkText: any) => any;
1
+ export declare const getTextColor: (props: any) => any;
2
+ export declare const getLinkColor: (props: any) => any;
3
3
  declare const Hero: {
4
4
  baseStyle?: {};
5
5
  sizes?: {
@@ -8,7 +8,7 @@ declare const Hero: {
8
8
  }>;
9
9
  };
10
10
  variants?: {
11
- primary: ({ foregroundColor, isDarkText }: import("@chakra-ui/styled-system").StyleFunctionProps) => {
11
+ primary: ({ foregroundColor, isDarkText, textColor }: import("@chakra-ui/styled-system").StyleFunctionProps) => {
12
12
  base: {
13
13
  alignItems: string;
14
14
  backgroundSize: string;
@@ -493,7 +493,7 @@ declare const Hero: {
493
493
  };
494
494
  };
495
495
  };
496
- tertiary: ({ foregroundColor, isDarkText }: import("@chakra-ui/styled-system").StyleFunctionProps) => {
496
+ tertiary: ({ foregroundColor, isDarkText, textColor }: import("@chakra-ui/styled-system").StyleFunctionProps) => {
497
497
  base: {
498
498
  p: {
499
499
  marginBottom: "0";
@@ -568,7 +568,7 @@ declare const Hero: {
568
568
  };
569
569
  };
570
570
  };
571
- campaign: ({ foregroundColor, isDarkText }: import("@chakra-ui/styled-system").StyleFunctionProps) => {
571
+ campaign: ({ foregroundColor, isDarkText, textColor }: import("@chakra-ui/styled-system").StyleFunctionProps) => {
572
572
  base: {
573
573
  alignItems: string;
574
574
  display: string;
@@ -1,5 +1,5 @@
1
1
  declare const TextInput: {
2
- baseStyle?: ({ showLabel }: import("@chakra-ui/styled-system").StyleFunctionProps) => {
2
+ baseStyle?: ({ showLabel, isClearable }: import("@chakra-ui/styled-system").StyleFunctionProps) => {
3
3
  position: string;
4
4
  clearButton: {
5
5
  borderRadius: string;
@@ -47,7 +47,8 @@ declare const TextInput: {
47
47
  md: string;
48
48
  };
49
49
  py: string;
50
- px: string;
50
+ pr: string;
51
+ pl: string;
51
52
  _hover: {
52
53
  borderColor: string;
53
54
  };
@@ -188,7 +189,7 @@ declare const TextInput: {
188
189
  marginBottom: string;
189
190
  };
190
191
  textarea: {
191
- lineheight: string;
192
+ lineHeight: string;
192
193
  minHeight: string;
193
194
  bgColor: string;
194
195
  border: string;
@@ -196,7 +197,8 @@ declare const TextInput: {
196
197
  borderRadius: string;
197
198
  fontSize: string;
198
199
  py: string;
199
- px: string;
200
+ pr: string;
201
+ pl: string;
200
202
  _hover: {
201
203
  borderColor: string;
202
204
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nypl/design-system-react-components",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "description": "NYPL Reservoir Design System React Components",
5
5
  "repository": {
6
6
  "type": "git",