@nypl/design-system-react-components 3.4.0-rc5 → 3.4.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.
@@ -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" | "id" | "src" | "onError"> {
7
+ export interface HeroImageProps extends Pick<ComponentImageProps, "alt" | "fallbackSrc" | "id" | "src" | "onError" | "component"> {
8
8
  }
9
9
  export interface HeroProps {
10
10
  /**
@@ -31,13 +31,11 @@ export interface HeroProps {
31
31
  heroType?: HeroTypes;
32
32
  /** ID that other components can cross reference for accessibility purposes. */
33
33
  id?: string;
34
- /** Object used to create and render the `Image` component. Note that only
35
- * `alt`, `component`, and `src` are the available attributes to pass. If
36
- * `imageProps.alt` is left blank, a warning will be logged to the console and
34
+ /** Object used to create and render the `Image` component. You can pass `component`
35
+ * (with its own internal props, which will override) or `src`, `alt`, `id`, `fallBackSrc`, and `onError`.
36
+ * If `imageProps.alt` is left blank, a warning will be logged to the console and
37
37
  * will cause accessibility issues. For `imageProps.src`, it will only work for
38
- * the "secondary", "fiftyFifty" and "campaign" `Hero` types; Note: `imageProps.src`
39
- * can only be used in conjunction with `backgroundImageSrc` for the "campaign"
40
- * `Hero` type. Note: not all `Hero` variations utilize this prop. */
38
+ * the "secondary", "fiftyFifty" and "campaign" `Hero` types. */
41
39
  imageProps?: HeroImageProps;
42
40
  /** Optional boolean used to toggle the default text color from light to dark.
43
41
  * Set isDarkText to `true` if the backgroundColor is set to a light color. */
@@ -29,6 +29,7 @@ declare const _default: {
29
29
  communicationCall: any;
30
30
  communicationChatBubble: any;
31
31
  communicationEmail: any;
32
+ decorativeBookBroken: any;
32
33
  decorativeEnvelope: any;
33
34
  decorativeLibraryCard: any;
34
35
  decorativeShoppingBag: any;
@@ -1,6 +1,6 @@
1
1
  export declare const iconAlignArray: readonly ["left", "right", "none"];
2
2
  export declare const iconColorsArray: readonly ["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", "actionLaunch", "actionLightbulb", "actionLockClosed", "actionPayment", "actionPower", "actionRegistration", "actionSearch", "actionSettings", "alertNotificationImportant", "alertWarningFilled", "alertWarningOutline", "arrow", "building", "check", "clock", "close", "communicationCall", "communicationChatBubble", "communicationEmail", "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", "navigationMoreVert", "plus", "search", "socialFacebook", "socialInstagram", "socialPinterest", "socialSoundCloud", "socialSpotify", "socialTikTok", "socialTumblr", "socialTwitter", "socialVimeo", "socialYoutube", "speakerNotes", "sunFull", "utilityAccountFilled", "utilityAccountUnfilled", "utilityHamburger", "utilitySearch"];
3
+ export declare const iconNamesArray: readonly ["accessibilityFull", "accessibilityPartial", "actionCheckCircle", "actionCheckCircleFilled", "actionDelete", "actionExit", "actionHelpDefault", "actionHelpOutline", "actionHome", "actionIdentity", "actionIdentityFilled", "actionLaunch", "actionLightbulb", "actionLockClosed", "actionPayment", "actionPower", "actionRegistration", "actionSearch", "actionSettings", "alertNotificationImportant", "alertWarningFilled", "alertWarningOutline", "arrow", "building", "check", "clock", "close", "communicationCall", "communicationChatBubble", "communicationEmail", "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", "navigationMoreVert", "plus", "search", "socialFacebook", "socialInstagram", "socialPinterest", "socialSoundCloud", "socialSpotify", "socialTikTok", "socialTumblr", "socialTwitter", "socialVimeo", "socialYoutube", "speakerNotes", "sunFull", "utilityAccountFilled", "utilityAccountUnfilled", "utilityHamburger", "utilitySearch"];
4
4
  export declare const iconRotationsArray: readonly ["rotate0", "rotate90", "rotate180", "rotate270"];
5
- export declare const iconSizesArray: readonly ["default", "xsmall", "small", "medium", "large", "xlarge", "xxlarge", "xxxlarge"];
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 iconTypesArray: readonly ["default", "breadcrumbs"];
@@ -2,9 +2,11 @@ import { ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  export declare const progressIndicatorSizesArray: readonly ["default", "small"];
4
4
  export declare const progressIndicatorTypesArray: readonly ["circular", "linear"];
5
+ export declare const progressIndicatorLabelPlacementsArray: readonly ["bottom", "right", "top", "left"];
5
6
  export type ProgressIndicatorSizes = typeof progressIndicatorSizesArray[number];
6
7
  export type ProgressIndicatorTypes = typeof progressIndicatorTypesArray[number];
7
- export interface ProgressIndicatorProps {
8
+ export type ProgressIndicatorLabelPlacements = typeof progressIndicatorLabelPlacementsArray[number];
9
+ interface BaseProgressIndicatorProps {
8
10
  /** The darkMode prop is deprecated and should no longer be used. */
9
11
  darkMode?: boolean;
10
12
  /** ID that other components can cross reference for accessibility purposes. */
@@ -24,6 +26,16 @@ export interface ProgressIndicatorProps {
24
26
  /** A number between 0 to 100 that defines the progress' value. */
25
27
  value?: number;
26
28
  }
29
+ interface LinearProgressIndicatorProps extends BaseProgressIndicatorProps {
30
+ indicatorType?: "linear";
31
+ labelPlacement?: never;
32
+ }
33
+ interface CircularProgressIndicatorProps extends BaseProgressIndicatorProps {
34
+ indicatorType?: "circular";
35
+ /** The placement of the label relative to a circular indicator. */
36
+ labelPlacement?: ProgressIndicatorLabelPlacements;
37
+ }
38
+ export type ProgressIndicatorProps = LinearProgressIndicatorProps | CircularProgressIndicatorProps;
27
39
  /**
28
40
  * A component that displays a progress status for any task that takes a long
29
41
  * time to complete or consists of multiple steps. Examples include downloading,
@@ -40,7 +40,7 @@ export type { HeadingLevels, HeadingProps, HeadingSizes, } from "./components/He
40
40
  export { default as HelperErrorText } from "./components/HelperErrorText/HelperErrorText";
41
41
  export type { HelperErrorTextProps } from "./components/HelperErrorText/HelperErrorText";
42
42
  export { default as Hero } from "./components/Hero/Hero";
43
- export type { HeroImageProps, HeroProps, HeroTypes, } from "./components/Hero/Hero";
43
+ export type { HeroProps, HeroTypes } from "./components/Hero/Hero";
44
44
  export { default as HorizontalRule } from "./components/HorizontalRule/HorizontalRule";
45
45
  export type { HorizontalRuleProps } from "./components/HorizontalRule/HorizontalRule";
46
46
  export { default as Icon } from "./components/Icons/Icon";
@@ -1,11 +1,12 @@
1
- import { ProgressIndicatorSizes } from "../../components/ProgressIndicator/ProgressIndicator";
1
+ import { ProgressIndicatorLabelPlacements, ProgressIndicatorSizes } from "../../components/ProgressIndicator/ProgressIndicator";
2
2
  import { StyleFunctionProps } from "@chakra-ui/system";
3
3
  interface ProgressIndicatorBaseStyle extends StyleFunctionProps {
4
4
  darkMode: boolean;
5
5
  size: ProgressIndicatorSizes;
6
+ labelPlacement: ProgressIndicatorLabelPlacements;
6
7
  }
7
8
  declare const ProgressIndicator: {
8
- baseStyle?: ({ darkMode, size }: ProgressIndicatorBaseStyle) => {
9
+ baseStyle?: ({ darkMode, size, labelPlacement }: ProgressIndicatorBaseStyle) => {
9
10
  color: string;
10
11
  fontSize: string;
11
12
  _dark: {
@@ -35,9 +36,16 @@ declare const ProgressIndicator: {
35
36
  circularContainer: {
36
37
  alignItems: string;
37
38
  display: string;
38
- flexDirection: string;
39
+ flexDirection: any;
39
40
  width: string;
40
41
  };
42
+ circularLabel: {
43
+ marginBottom: string | number;
44
+ marginLeft: string | number;
45
+ marginRight: string | number;
46
+ marginTop: string | number;
47
+ fontSize: string;
48
+ };
41
49
  linear: {
42
50
  "> div": {
43
51
  bg: string;
@@ -63,10 +63,6 @@ declare const SearchBar: {
63
63
  md: "255px";
64
64
  };
65
65
  textOverflow: string;
66
- marginRight: {
67
- base: any;
68
- md: "-1px";
69
- };
70
66
  _hover: {
71
67
  zIndex: string;
72
68
  "+ .chakra-select__icon-wrapper": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nypl/design-system-react-components",
3
- "version": "3.4.0-rc5",
3
+ "version": "3.4.1",
4
4
  "description": "NYPL Reservoir Design System React Components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -102,7 +102,6 @@
102
102
  "@typescript-eslint/eslint-plugin": "5.57.0",
103
103
  "@typescript-eslint/parser": "5.57.0",
104
104
  "@vitejs/plugin-react": "4.2.1",
105
- "css-loader": "5.2.7",
106
105
  "eslint": "7.31.0",
107
106
  "eslint-config-prettier": "8.8.0",
108
107
  "eslint-plugin-jsx-a11y": "6.7.1",
@@ -120,18 +119,15 @@
120
119
  "prop-types": "15.8.1",
121
120
  "react": "18.2.0",
122
121
  "react-autosuggest": "10.0.2",
123
- "react-docgen-typescript-loader": "3.7.2",
124
122
  "react-dom": "18.2.0",
125
123
  "react-test-renderer": "18.2.0",
126
124
  "remark-gfm": "4.0.0",
127
125
  "sass": "1.60.0",
128
- "sass-loader": "10.0.0",
129
126
  "storybook": "8.1.11",
130
- "style-loader": "2.0.0",
131
127
  "ts-jest": "29.1.5",
132
128
  "tslib": "2.3.0",
133
129
  "typescript": "4.9.5",
134
- "vite": "5.2.8",
130
+ "vite": "5.2.14",
135
131
  "vite-plugin-dts": "2.1.0",
136
132
  "vite-plugin-svgr": "4.2.0"
137
133
  }