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

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 (75) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/components/Accordion/Accordion.d.ts +7 -2
  3. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +2 -2
  4. package/dist/components/Button/Button.d.ts +4 -2
  5. package/dist/components/ButtonGroup/ButtonGroup.d.ts +4 -2
  6. package/dist/components/Card/Card.d.ts +7 -3
  7. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  8. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +2 -2
  9. package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +4 -2
  10. package/dist/components/Fieldset/Fieldset.d.ts +3 -1
  11. package/dist/components/Form/Form.d.ts +4 -2
  12. package/dist/components/Grid/SimpleGrid.d.ts +4 -2
  13. package/dist/components/Heading/Heading.d.ts +4 -2
  14. package/dist/components/HelperErrorText/HelperErrorText.d.ts +2 -2
  15. package/dist/components/Hero/Hero.d.ts +4 -2
  16. package/dist/components/HorizontalRule/HorizontalRule.d.ts +2 -2
  17. package/dist/components/Icons/Icon.d.ts +5 -3
  18. package/dist/components/Icons/IconSvgs.d.ts +8 -0
  19. package/dist/components/Image/Image.d.ts +8 -4
  20. package/dist/components/Label/Label.d.ts +4 -2
  21. package/dist/components/Link/Link.d.ts +2 -2
  22. package/dist/components/List/List.d.ts +4 -2
  23. package/dist/components/Logo/Logo.d.ts +4 -2
  24. package/dist/components/Modal/Modal.d.ts +4 -2
  25. package/dist/components/Notification/Notification.d.ts +1 -1
  26. package/dist/components/Pagination/Pagination.d.ts +2 -2
  27. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +2 -2
  28. package/dist/components/Radio/Radio.d.ts +1 -1
  29. package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
  30. package/dist/components/SearchBar/SearchBar.d.ts +8 -3
  31. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +4 -2
  32. package/dist/components/SkipNavigation/SkipNavigation.d.ts +4 -2
  33. package/dist/components/Slider/Slider.d.ts +4 -2
  34. package/dist/components/StatusBadge/StatusBadge.d.ts +4 -2
  35. package/dist/components/StructuredContent/StructuredContent.d.ts +4 -2
  36. package/dist/components/StyleGuide/ColorCard.d.ts +22 -18
  37. package/dist/components/Table/Table.d.ts +4 -2
  38. package/dist/components/Tabs/Tabs.d.ts +4 -2
  39. package/dist/components/Template/Template.d.ts +21 -7
  40. package/dist/components/Text/Text.d.ts +4 -2
  41. package/dist/components/TextInput/TextInput.d.ts +1 -1
  42. package/dist/components/Toggle/Toggle.d.ts +1 -1
  43. package/dist/components/VideoPlayer/VideoPlayer.d.ts +4 -2
  44. package/dist/design-system-react-components.cjs.development.js +2370 -1880
  45. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  46. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  47. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  48. package/dist/design-system-react-components.esm.js +2371 -1881
  49. package/dist/design-system-react-components.esm.js.map +1 -1
  50. package/dist/hooks/useCarouselStyles.d.ts +1 -1
  51. package/dist/hooks/useNYPLTheme.d.ts +1 -0
  52. package/dist/styles.css +1 -1
  53. package/dist/theme/components/breadcrumb.d.ts +3 -3
  54. package/dist/theme/components/card.d.ts +4 -4
  55. package/dist/theme/components/checkbox.d.ts +2 -2
  56. package/dist/theme/components/customTable.d.ts +43 -43
  57. package/dist/theme/components/global.d.ts +2 -2
  58. package/dist/theme/components/globalMixins.d.ts +1 -4
  59. package/dist/theme/components/heading.d.ts +30 -30
  60. package/dist/theme/components/hero.d.ts +163 -119
  61. package/dist/theme/components/horizontalRule.d.ts +2 -2
  62. package/dist/theme/components/icon.d.ts +4762 -4762
  63. package/dist/theme/components/image.d.ts +42 -42
  64. package/dist/theme/components/list.d.ts +13 -13
  65. package/dist/theme/components/notification.d.ts +4 -4
  66. package/dist/theme/components/radio.d.ts +2 -2
  67. package/dist/theme/components/select.d.ts +2 -2
  68. package/dist/theme/components/skeletonLoader.d.ts +1 -1
  69. package/dist/theme/components/skipNavigation.d.ts +2 -2
  70. package/dist/theme/components/slider.d.ts +6 -6
  71. package/dist/theme/components/structuredContent.d.ts +33 -33
  72. package/dist/theme/components/tabs.d.ts +9 -9
  73. package/dist/theme/components/template.d.ts +33 -58
  74. package/dist/theme/components/toggle.d.ts +2 -2
  75. package/package.json +13 -14
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { ComponentImageProps } from "../Image/Image";
3
3
  export declare type StructuredContentImagePosition = "left" | "right" | "center";
4
4
  interface StructuredContentImageProps extends ComponentImageProps {
@@ -24,5 +24,7 @@ export interface StructuredContentProps {
24
24
  * The `StructuredContent` component that displays a heading, callout content,
25
25
  * an image, and body content. All are optional except for body content.
26
26
  */
27
- export declare const StructuredContent: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<StructuredContentProps>) => JSX.Element, {}>;
27
+ export declare const StructuredContent: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<StructuredContentProps & {
28
+ children?: React.ReactNode;
29
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
28
30
  export default StructuredContent;
@@ -1,29 +1,33 @@
1
1
  import * as React from "react";
2
- export interface ColorCardProps {
3
- /** The backgroundColor of the color card. */
4
- backgroundColor: string;
5
- /** The name of a color's javascript theme object. */
6
- colorName: string;
7
- /** The name of the color that the current color is based on. */
8
- colorSource: string;
2
+ export interface DataTableProps {
3
+ /** Contrast and WCAG compliance data related to the color gray.xxxx-dark when
4
+ * used with the current color. */
5
+ dataBgPageColor: string[];
6
+ /** Contrast and WCAG compliance data related to the color gray.xxx-dark when
7
+ * used with the current color. */
8
+ dataBgDefaultColor: string[];
9
9
  /** Contrast and WCAG compliance data related to the color black when used
10
10
  * with the current color. */
11
- dataBlack: string[];
11
+ dataBlackColor: string[];
12
+ /** Contrast and WCAG compliance data related to the default color for
13
+ * heading elements when used with the current color. */
14
+ dataHeadingColor?: string[];
15
+ /** Contrast and WCAG compliance data related to the default color for basic
16
+ * text elements when used with the current color. */
17
+ dataBodyColor?: string[];
12
18
  /** Contrast and WCAG compliance data related to the color white when used
13
19
  * with the current color. */
14
- dataWhite: string[];
20
+ dataWhiteColor: string[];
15
21
  /** The color to use for text in the color card. */
16
22
  textColor: string;
17
23
  }
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;
24
+ export interface ColorCardProps extends DataTableProps {
25
+ /** The backgroundColor of the color card. */
26
+ backgroundColor: string;
27
+ /** The name of a color's javascript theme object. */
28
+ colorName: string;
29
+ /** The name of the color that the current color is based on. */
30
+ colorSource: string;
27
31
  }
28
32
  export declare const DataTable: (props: React.PropsWithChildren<DataTableProps>) => JSX.Element;
29
33
  export declare const ColorCard: (props: React.PropsWithChildren<ColorCardProps>) => JSX.Element;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export interface TableProps {
3
3
  /** Additional class name for the `Table` component. */
4
4
  className?: string;
@@ -26,5 +26,7 @@ export interface TableProps {
26
26
  * Basic `Table` component used to organize and display tabular data in
27
27
  * rows and columns.
28
28
  */
29
- export declare const Table: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<TableProps>) => JSX.Element, {}>;
29
+ export declare const Table: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TableProps & {
30
+ children?: React.ReactNode;
31
+ } & React.RefAttributes<HTMLTableElement>>, {}>;
30
32
  export default Table;
@@ -1,5 +1,5 @@
1
1
  import { Tab, TabList, TabPanels, TabPanel } from "@chakra-ui/react";
2
- import * as React from "react";
2
+ import React from "react";
3
3
  export interface TabsDataProps {
4
4
  label: string;
5
5
  content: string | React.ReactNode;
@@ -21,6 +21,8 @@ export interface TabsProps {
21
21
  * Renders Chakra's `Tab` component with specific variants, props,
22
22
  * and controlled styling.
23
23
  */
24
- export declare const Tabs: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<TabsProps>) => JSX.Element, {}>;
24
+ export declare const Tabs: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TabsProps & {
25
+ children?: React.ReactNode;
26
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
25
27
  export { TabList, Tab, TabPanels, TabPanel };
26
28
  export default Tabs;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export interface TemplateProps {
3
3
  }
4
4
  export interface TemplateHeaderProps {
@@ -28,6 +28,8 @@ export interface TemplateAppContainerProps extends TemplateFooterProps, Template
28
28
  /** ID used for the `main` HTML element. Defaults to "mainContent". Useful
29
29
  * anchor for the application skip navigation. */
30
30
  contentId?: string;
31
+ /** DOM that will be rendered in the `TemplateContentBottom` component section. */
32
+ contentBottom?: React.ReactElement;
31
33
  /** DOM that will be rendered in the `TemplateContentPrimary` component section. */
32
34
  contentPrimary?: React.ReactElement;
33
35
  /** DOM that will be rendered in the `TemplateContentSidebar` component section. */
@@ -45,7 +47,9 @@ export interface TemplateAppContainerProps extends TemplateFooterProps, Template
45
47
  * The main top-level parent component that wraps all template-related
46
48
  * components.
47
49
  */
48
- declare const Template: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<TemplateProps>) => JSX.Element, {}>;
50
+ declare const Template: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TemplateProps & {
51
+ children?: React.ReactNode;
52
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
49
53
  /**
50
54
  * This optional component renders its children from edge-to-edge and should
51
55
  * be used for alerts or notifications that are typically site-wide. This must
@@ -64,9 +68,10 @@ declare const TemplateAboveHeader: (props: React.PropsWithChildren<TemplateProps
64
68
  */
65
69
  declare const TemplateHeader: ({ children, renderHeaderElement, }: React.PropsWithChildren<TemplateHeaderProps>) => JSX.Element;
66
70
  /**
67
- * This optional component should be used inside the `TemplateHeader` component.
68
- * This is meant to render its children from edge to edge and is most useful
69
- * for the `Breadcrumbs` and `Hero` components, and other banner-like components.
71
+ * This component should be used inside the `Template` component to contain both
72
+ * the `TemplateAboveHeader` and `TemplateHeader` components. This is meant to
73
+ * render its children from edge to edge and is most useful for the headers,
74
+ * `Breadcrumbs`, and `Hero` components or other banner-like components.
70
75
  */
71
76
  declare const TemplateBreakout: (props: React.PropsWithChildren<TemplateProps>) => JSX.Element;
72
77
  /**
@@ -86,6 +91,13 @@ declare const TemplateContent: (props: React.PropsWithChildren<TemplateContentPr
86
91
  * above the primary component and the sidebar component (if any).
87
92
  */
88
93
  declare const TemplateContentTop: (props: React.PropsWithChildren<TemplateProps>) => JSX.Element;
94
+ /**
95
+ * This optional component must be used inside the `TemplateContent` component
96
+ * and after the `TemplateContentPrimary` or `TemplateContentSidebar` component.
97
+ * This renders content in the main width of the container and should always
98
+ * render below the primary component and the sidebar component (if any).
99
+ */
100
+ declare const TemplateContentBottom: (props: React.PropsWithChildren<TemplateProps>) => JSX.Element;
89
101
  /**
90
102
  * This component is used to render content in a column when there must be a
91
103
  * sidebar component on either its left or right side. It must go inside the
@@ -121,6 +133,8 @@ declare const TemplateFooter: ({ children, renderFooterElement, }: React.PropsWi
121
133
  * be rendered. For example, if you want to render content in the
122
134
  * `TemplateContentPrimary` section, then pass it as a prop to `contentPrimary`.
123
135
  */
124
- export declare const TemplateAppContainer: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<TemplateAppContainerProps>) => JSX.Element, {}>;
125
- export { Template, TemplateAboveHeader, TemplateHeader, TemplateBreakout, TemplateContent, TemplateContentTop, TemplateContentPrimary, TemplateContentSidebar, TemplateFooter, };
136
+ export declare const TemplateAppContainer: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TemplateAppContainerProps & {
137
+ children?: React.ReactNode;
138
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
139
+ export { Template, TemplateAboveHeader, TemplateBreakout, TemplateContent, TemplateContentBottom, TemplateContentPrimary, TemplateContentSidebar, TemplateContentTop, TemplateFooter, TemplateHeader, };
126
140
  export default TemplateAppContainer;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  export declare type TextSizes = "default" | "caption" | "tag" | "mini";
3
3
  export interface TextProps {
4
4
  /** Additional class name to render in the `Text` component. */
@@ -18,5 +18,7 @@ export interface TextProps {
18
18
  /** Optional prop to control the text styling */
19
19
  size?: TextSizes;
20
20
  }
21
- export declare const Text: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<TextProps>) => JSX.Element, {}>;
21
+ export declare const Text: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TextProps & {
22
+ children?: React.ReactNode;
23
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
22
24
  export default Text;
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
3
  export declare type TextInputTypes = "email" | "hidden" | "number" | "password" | "text" | "textarea" | "tel" | "url";
4
4
  export declare const TextInputFormats: {
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
3
  export declare type ToggleSizes = "default" | "small";
4
4
  export interface ToggleProps {
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import React from "react";
2
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
3
  export declare type VideoPlayerTypes = "vimeo" | "youtube";
4
4
  export declare type VideoPlayerAspectRatios = "fourByThree" | "sixteenByNine" | "square";
@@ -34,5 +34,7 @@ export interface VideoPlayerProps {
34
34
  /** Required. Used to specify which video service is being used. */
35
35
  videoType?: VideoPlayerTypes;
36
36
  }
37
- export declare const VideoPlayer: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<VideoPlayerProps>) => JSX.Element, {}>;
37
+ export declare const VideoPlayer: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<VideoPlayerProps & {
38
+ children?: React.ReactNode;
39
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
38
40
  export default VideoPlayer;