@nypl/design-system-react-components 1.0.4 → 1.0.5

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/CHANGELOG.md CHANGED
@@ -8,6 +8,22 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
8
8
 
9
9
  ## Prerelease
10
10
 
11
+ ## 1.0.5 (July 7, 2022)
12
+
13
+ ### Adds
14
+
15
+ - Exports `ColorCard`.
16
+
17
+ ### Updates
18
+
19
+ - Updates the `Icon` component to include variants for `actionCheckCircleFilled`, `actionRegistration`, `decorativeEnvelope`, `decorativeLibraryCard` and `decorativeShoppingBag`.
20
+ - Updates the docs for the `Colors` Style Guide to include additional data related to contrast and WCAG compliance.
21
+ - Updates the `Checkbox` and `Radio` components to use `ui.gray.dark` for the default border color.
22
+
23
+ ### Fixes
24
+
25
+ - Fixes `useNYPLBreakpoints` hook so it internally controls its own state. This eliminates server/client rendering issues on its initial load.
26
+
11
27
  ## 1.0.4 (June 23, 2022)
12
28
 
13
29
  ### Adds
@@ -1,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  export declare type IconAlign = "left" | "right" | "none";
3
3
  export declare type IconColors = "ui.black" | "ui.white" | "brand.primary" | "brand.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";
4
- export declare type IconNames = "accessibilityFull" | "accessibilityPartial" | "actionCheckCircle" | "actionExit" | "actionHelpDefault" | "actionHelpOutline" | "actionLaunch" | "actionPower" | "actionSettings" | "alertNotificationImportant" | "arrow" | "building" | "check" | "clock" | "close" | "download" | "errorFilled" | "errorOutline" | "fileTypeAudio" | "fileTypeDoc" | "fileTypeGenericDoc" | "fileTypeImage" | "fileTypePdf" | "fileTypeSpreadsheet" | "fileTypeVideo" | "headset" | "locator" | "minus" | "plus" | "search" | "socialFacebook" | "socialInstagram" | "socialTumblr" | "socialTwitter" | "socialYoutube" | "speakerNotes" | "utilityAccountFilled" | "utilityAccountUnfilled" | "utilityHamburger" | "utilitySearch";
4
+ export declare type IconNames = "accessibilityFull" | "accessibilityPartial" | "actionCheckCircle" | "actionCheckCircleFilled" | "actionExit" | "actionHelpDefault" | "actionHelpOutline" | "actionLaunch" | "actionPower" | "actionRegistration" | "actionSettings" | "alertNotificationImportant" | "arrow" | "building" | "check" | "clock" | "close" | "decorativeEnvelope" | "decorativeLibraryCard" | "decorativeShoppingBag" | "download" | "errorFilled" | "errorOutline" | "fileTypeAudio" | "fileTypeDoc" | "fileTypeGenericDoc" | "fileTypeImage" | "fileTypePdf" | "fileTypeSpreadsheet" | "fileTypeVideo" | "headset" | "locator" | "minus" | "plus" | "search" | "socialFacebook" | "socialInstagram" | "socialTumblr" | "socialTwitter" | "socialYoutube" | "speakerNotes" | "utilityAccountFilled" | "utilityAccountUnfilled" | "utilityHamburger" | "utilitySearch";
5
5
  export declare type IconRotationTypes = "rotate0" | "rotate90" | "rotate180" | "rotate270";
6
6
  export declare type IconSizes = "default" | "small" | "medium" | "large" | "xlarge" | "xxlarge" | "xxxlarge";
7
7
  export declare type IconTypes = "default" | "breadcrumbs";
@@ -2,11 +2,13 @@ declare const _default: {
2
2
  accessibilityFull: string;
3
3
  accessibilityPartial: string;
4
4
  actionCheckCircle: string;
5
+ actionCheckCircleFilled: string;
5
6
  actionExit: string;
6
7
  actionHelpDefault: string;
7
8
  actionHelpOutline: string;
8
9
  actionLaunch: string;
9
10
  actionPower: string;
11
+ actionRegistration: string;
10
12
  actionSettings: string;
11
13
  alertNotificationImportant: string;
12
14
  arrow: string;
@@ -14,6 +16,9 @@ declare const _default: {
14
16
  check: string;
15
17
  clock: string;
16
18
  close: string;
19
+ decorativeEnvelope: string;
20
+ decorativeLibraryCard: string;
21
+ decorativeShoppingBag: string;
17
22
  download: string;
18
23
  errorFilled: string;
19
24
  errorOutline: string;
@@ -1,12 +1,30 @@
1
1
  import * as React from "react";
2
2
  export interface ColorCardProps {
3
- /** backgroundColor of the color card */
3
+ /** The backgroundColor of the color card. */
4
4
  backgroundColor: string;
5
- /** name of the CSS var */
5
+ /** The name of a color's javascript theme object. */
6
6
  colorName: string;
7
+ /** The name of the color that the current color is based on. */
8
+ colorSource: string;
9
+ /** Contrast and WCAG compliance data related to the color black when used
10
+ * with the current color. */
11
+ dataBlack: string[];
12
+ /** Contrast and WCAG compliance data related to the color white when used
13
+ * with the current color. */
14
+ dataWhite: string[];
15
+ /** The color to use for text in the color card. */
16
+ textColor: string;
7
17
  }
8
- /**
9
- * ColorCard
10
- * Component only used for Storybook.
11
- */
12
- export default function ColorCard(props: React.PropsWithChildren<ColorCardProps>): JSX.Element;
18
+ export interface DataTableProps {
19
+ /** Contrast and WCAG compliance data related to the color black when used
20
+ * with the current color. */
21
+ dataBlack: string[];
22
+ /** Contrast and WCAG compliance data related to the color white when used
23
+ * with the current color. */
24
+ dataWhite: string[];
25
+ /** color to use for text in color card */
26
+ textColor: string;
27
+ }
28
+ export declare const DataTable: (props: React.PropsWithChildren<DataTableProps>) => JSX.Element;
29
+ export declare const ColorCard: (props: React.PropsWithChildren<ColorCardProps>) => JSX.Element;
30
+ export default ColorCard;