@nypl/design-system-react-components 0.25.10 → 0.25.11

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.
Files changed (56) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/dist/components/List/List.d.ts +1 -1
  3. package/dist/components/Logo/LogoSvgs.d.ts +17 -1
  4. package/dist/components/Logo/LogoTypes.d.ts +17 -1
  5. package/dist/components/Notification/Notification.d.ts +2 -0
  6. package/dist/components/Select/Select.d.ts +4 -0
  7. package/dist/design-system-react-components.cjs.development.js +1215 -317
  8. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  9. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  10. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  11. package/dist/design-system-react-components.esm.js +1217 -319
  12. package/dist/design-system-react-components.esm.js.map +1 -1
  13. package/dist/theme/components/notification.d.ts +13 -4
  14. package/dist/theme/components/searchBar.d.ts +4 -0
  15. package/dist/theme/components/structuredContent.d.ts +9 -9
  16. package/dist/theme/components/textInput.d.ts +2 -0
  17. package/package.json +1 -1
  18. package/src/components/Card/__snapshots__/Card.test.tsx.snap +1 -1
  19. package/src/components/Checkbox/Checkbox.stories.mdx +1 -1
  20. package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +1 -1
  21. package/src/components/DatePicker/DatePicker.tsx +9 -6
  22. package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +28 -20
  23. package/src/components/HelperErrorText/HelperErrorText.stories.mdx +1 -1
  24. package/src/components/Icons/Icon.stories.mdx +1 -1
  25. package/src/components/Icons/Icon.test.tsx +1 -1
  26. package/src/components/Icons/Icon.tsx +1 -1
  27. package/src/components/List/List.stories.mdx +24 -5
  28. package/src/components/List/List.test.tsx +1 -1
  29. package/src/components/List/List.tsx +1 -1
  30. package/src/components/List/__snapshots__/List.test.tsx.snap +3 -1
  31. package/src/components/Logo/Logo.stories.mdx +7 -5
  32. package/src/components/Logo/LogoSvgs.tsx +33 -1
  33. package/src/components/Logo/LogoTypes.tsx +16 -0
  34. package/src/components/Notification/Notification.stories.mdx +68 -1
  35. package/src/components/Notification/Notification.test.tsx +49 -1
  36. package/src/components/Notification/Notification.tsx +16 -8
  37. package/src/components/Radio/Radio.stories.mdx +1 -1
  38. package/src/components/SearchBar/SearchBar.stories.mdx +1 -1
  39. package/src/components/SearchBar/SearchBar.tsx +2 -1
  40. package/src/components/Select/Select.stories.mdx +1 -1
  41. package/src/components/Select/Select.tsx +4 -1
  42. package/src/components/Slider/Slider.stories.mdx +1 -1
  43. package/src/components/StructuredContent/StructuredContent.stories.mdx +1 -1
  44. package/src/components/Tabs/Tabs.stories.mdx +1 -1
  45. package/src/components/Tabs/Tabs.tsx +3 -3
  46. package/src/components/TextInput/TextInput.stories.mdx +1 -1
  47. package/src/components/Toggle/Toggle.stories.mdx +1 -1
  48. package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +4 -4
  49. package/src/theme/components/global.ts +1 -1
  50. package/src/theme/components/list.ts +2 -2
  51. package/src/theme/components/notification.ts +18 -8
  52. package/src/theme/components/searchBar.ts +4 -0
  53. package/src/theme/components/structuredContent.ts +26 -6
  54. package/src/theme/components/textInput.ts +1 -0
  55. package/src/theme/components/toggle.ts +1 -1
  56. package/src/theme/foundations/typography.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -8,6 +8,25 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
8
8
 
9
9
  ## Prerelease
10
10
 
11
+ ## 0.25.11 (March 3, 2022)
12
+
13
+ ### Updates
14
+
15
+ - Updates the `Logo` component to include new variants for `BPL`, `Clever`, `LPA`, `MLN`, `QPL`, `Schomburg`, `SimplyE` and `Treasures`.
16
+ - Updates font size to "12px" and top margin to "4px" for `HelperErrorText` component.
17
+ - Updates font size to "14px" for `TextInput` component.
18
+ - Adds an `aria-label` attribute to the `Notification` component to use with its `aside` HTML landmark element. Added an "Accessibility" section in the `Notification` Storybook page to note that this component should not be used within a `header` or `footer` HTML landmark element.
19
+ - Updates the `Notification` component to handle link color inside the content area, better styling for centering and the dismissible variation, and updated background color for the "Announcement" and "Warning" types.
20
+ - Updates a log message in the `Icon` component to be more descriptive.
21
+ - Updates the mobile styles for the image in the `StructuredContent` component.
22
+ - Updates the prop type for the "Definition" `List` type so DOM elements can be passed in the definition.
23
+
24
+ ### Fixes
25
+
26
+ - Updates the bottom margin of the `Select` in the `SearchBar` so that the helper text has standard gap between the main form components and itself.
27
+ - Updates how `TabList` and `TabPanels` are returned in the `Tabs` component so no false log messages are consoled.
28
+ - Updates `List` component styling for inline.
29
+
11
30
  ## 0.25.10 (February 22, 2022)
12
31
 
13
32
  ### Adds
@@ -15,6 +34,7 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
15
34
  - Exports Chakra's `Flex` and `Spacer` components.
16
35
  - Adds `TemplateAboveHeader` component in the set of "template" components.
17
36
  - Adds the `aboveHeader` prop to the `TemplateAppContainer` component to render a `TemplateAboveHeader` component immediately before the `TemplateHeader` component.
37
+ - Adds the `additionalStyles` prop to the `Select` component.
18
38
 
19
39
  ### Breaking Changes
20
40
 
@@ -31,7 +51,7 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
31
51
  - Updates the `Fieldset` and `RadioGroup` so the `children` prop is declared through `React.PropsWithChildren` rather than in their respective prop interfaces.
32
52
  - Adds snapshot tests for the `Accordion` component, as well as `id` props to the components within the `Accordion` so snapshot tests pass.
33
53
  - Passes an `id` to the `Icon` in the `Select` component.
34
- - Adds snapshot tests for the `Select` componnet.
54
+ - Adds snapshot tests for the `Select` component.
35
55
 
36
56
  ### Fixes
37
57
 
@@ -2,7 +2,7 @@ import * as React from "react";
2
2
  import { ListTypes } from "./ListTypes";
3
3
  interface DefinitionProps {
4
4
  term: string;
5
- definition: string;
5
+ definition: string | JSX.Element;
6
6
  }
7
7
  export interface ListProps {
8
8
  /** Optionally pass in additional Chakra-based styles. */
@@ -1,18 +1,34 @@
1
1
  declare const _default: {
2
2
  logo_bpl_black: string;
3
+ logo_bpl_white: string;
4
+ logo_clever_color: string;
5
+ logo_clever_white: string;
6
+ logo_lpa_black: string;
3
7
  logo_lpa_color: string;
4
8
  logo_lpa_white: string;
9
+ logo_mln_black: string;
10
+ logo_mln_white: string;
5
11
  logo_nypl_full_black: string;
6
12
  logo_nypl_full_white: string;
7
- logo_nypl_lion_white: string;
8
13
  logo_nypl_lion_black: string;
14
+ logo_nypl_lion_white: string;
9
15
  logo_qpl_alt_black: string;
16
+ logo_qpl_alt_white: string;
17
+ logo_qpl_black: string;
10
18
  logo_qpl_color: string;
19
+ logo_qpl_white: string;
20
+ logo_schomburg_black: string;
21
+ logo_schomburg_circle_black: string;
11
22
  logo_schomburg_circle_color: string;
23
+ logo_schomburg_circle_white: string;
12
24
  logo_schomburg_color: string;
25
+ logo_schomburg_white: string;
13
26
  logo_simplye_black: string;
27
+ logo_simplye_white: string;
14
28
  logo_simplye_color: string;
15
29
  logo_snfl_black: string;
16
30
  logo_snfl_white: string;
31
+ logo_treasures_color: string;
32
+ logo_treasures_color_negative: string;
17
33
  };
18
34
  export default _default;
@@ -13,18 +13,34 @@ export declare enum LogoSizes {
13
13
  }
14
14
  export declare enum LogoNames {
15
15
  BrooklynPublicLibraryBlack = "logo_bpl_black",
16
+ BrooklynPublicLibraryWhite = "logo_bpl_white",
17
+ CleverColor = "logo_clever_color",
18
+ CleverWhite = "logo_clever_white",
16
19
  LPAColor = "logo_lpa_color",
20
+ LPABlack = "logo_lpa_black",
17
21
  LPAWhite = "logo_lpa_white",
22
+ MyLibraryNYCBlack = "logo_mln_black",
23
+ MyLibraryNYCWhite = "logo_mln_white",
18
24
  NYPLBlack = "logo_nypl_full_black",
19
25
  NYPLWhite = "logo_nypl_full_white",
20
26
  NYPLLionBlack = "logo_nypl_lion_black",
21
27
  NYPLLionWhite = "logo_nypl_lion_white",
22
28
  QueensPublicLibraryColor = "logo_qpl_color",
29
+ QueensPublicLibraryBlack = "logo_qpl_black",
30
+ QueensPublicLibraryWhite = "logo_qpl_white",
23
31
  QueensPublicLibraryAltBlack = "logo_qpl_alt_black",
32
+ QueensPublicLibraryAltWhite = "logo_qpl_alt_white",
24
33
  SchomburgColor = "logo_schomburg_color",
34
+ SchomburgBlack = "logo_schomburg_black",
35
+ SchomburgWhite = "logo_schomburg_white",
25
36
  SchomburgCircleColor = "logo_schomburg_circle_color",
37
+ SchomburgCircleBlack = "logo_schomburg_circle_black",
38
+ SchomburgCircleWhite = "logo_schomburg_circle_white",
26
39
  SimplyEColor = "logo_simplye_color",
27
40
  SimplyEBlack = "logo_simplye_black",
41
+ SimplyEWhite = "logo_simplye_white",
28
42
  SNFLBlack = "logo_snfl_black",
29
- SNFLWhite = "logo_snfl_white"
43
+ SNFLWhite = "logo_snfl_white",
44
+ TreasuresColor = "logo_treasures_color",
45
+ TreasuresColorNegative = "logo_treasures_color_negative"
30
46
  }
@@ -16,6 +16,8 @@ interface BaseProps {
16
16
  declare type BasePropsWithoutAlignText = Omit<BaseProps, "alignText">;
17
17
  declare type BasePropsWithoutCentered = Omit<BaseProps, "centered">;
18
18
  export interface NotificationProps extends BasePropsWithoutAlignText {
19
+ /** Label used to describe the `Notification`'s aside HTML element. */
20
+ ariaLabel?: string;
19
21
  /** Additional `className` to add. */
20
22
  className?: string;
21
23
  /** Optional prop to control whether a `Notification` can be dismissed
@@ -2,6 +2,10 @@ import React from "react";
2
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
3
  import { SelectTypes } from "./SelectTypes";
4
4
  export interface SelectProps {
5
+ /** Optionally pass in additional Chakra-based styles. */
6
+ additionalStyles?: {
7
+ [key: string]: any;
8
+ };
5
9
  /** A class name for the `div` parent element. */
6
10
  className?: string;
7
11
  /** Optional string to populate the `HelperErrorText` for the standard state. */