@nypl/design-system-react-components 2.2.0-react-chakra-rc → 3.0.0-react-chakra-rc

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 (119) hide show
  1. package/dist/design-system-react-components.cjs +58 -58
  2. package/dist/design-system-react-components.js +17460 -16512
  3. package/dist/src/components/Accordion/Accordion.d.ts +2 -1
  4. package/dist/src/components/AlphabetFilter/AlphabetFilter.d.ts +6 -3
  5. package/dist/src/components/AudioPlayer/AudioPlayer.d.ts +6 -3
  6. package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +2 -1
  7. package/dist/src/components/Button/Button.d.ts +23 -1
  8. package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +15 -1
  9. package/dist/src/components/Card/Card.d.ts +2 -1
  10. package/dist/src/components/Checkbox/Checkbox.d.ts +2 -1
  11. package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +2 -1
  12. package/dist/src/components/ComponentWrapper/ComponentWrapper.d.ts +4 -2
  13. package/dist/src/components/DatePicker/DatePicker.d.ts +14 -6
  14. package/dist/src/components/FeaturedContent/FeaturedContent.d.ts +2 -1
  15. package/dist/src/components/FeedbackBox/FeedbackBox.d.ts +48 -2
  16. package/dist/src/components/Fieldset/Fieldset.d.ts +17 -1
  17. package/dist/src/components/Form/Form.d.ts +4 -3
  18. package/dist/src/components/Grid/SimpleGrid.d.ts +2 -1
  19. package/dist/src/components/Heading/Heading.d.ts +2 -1
  20. package/dist/src/components/HelperErrorText/HelperErrorText.d.ts +26 -1
  21. package/dist/src/components/Hero/Hero.d.ts +6 -1
  22. package/dist/src/components/HorizontalRule/HorizontalRule.d.ts +2 -1
  23. package/dist/src/components/Icons/Icon.d.ts +2 -1
  24. package/dist/src/components/Icons/IconSvgs.d.ts +24 -0
  25. package/dist/src/components/Icons/iconVariables.d.ts +2 -2
  26. package/dist/src/components/Image/Image.d.ts +9 -2
  27. package/dist/src/components/Label/Label.d.ts +19 -1
  28. package/dist/src/components/Link/Link.d.ts +2 -1
  29. package/dist/src/components/List/List.d.ts +6 -4
  30. package/dist/src/components/Logo/Logo.d.ts +5 -4
  31. package/dist/src/components/Logo/logoVariables.d.ts +0 -1
  32. package/dist/src/components/Menu/Menu.d.ts +58 -0
  33. package/dist/src/components/Modal/Modal.d.ts +13 -4
  34. package/dist/src/components/NewsletterSignup/NewsletterSignup.d.ts +42 -1
  35. package/dist/src/components/Notification/Notification.d.ts +11 -5
  36. package/dist/src/components/Pagination/Pagination.d.ts +2 -1
  37. package/dist/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -1
  38. package/dist/src/components/Radio/Radio.d.ts +2 -1
  39. package/dist/src/components/RadioGroup/RadioGroup.d.ts +2 -1
  40. package/dist/src/components/SearchBar/SearchBar.d.ts +4 -2
  41. package/dist/src/components/Select/Select.d.ts +2 -1
  42. package/dist/src/components/SkeletonLoader/SkeletonLoader.d.ts +2 -1
  43. package/dist/src/components/SkipNavigation/SkipNavigation.d.ts +10 -1
  44. package/dist/src/components/Slider/Slider.d.ts +2 -1
  45. package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +2 -1
  46. package/dist/src/components/StatusBadge/StatusBadge.d.ts +15 -6
  47. package/dist/src/components/StructuredContent/StructuredContent.d.ts +7 -4
  48. package/dist/src/components/StyleGuide/ColorCard.d.ts +2 -1
  49. package/dist/src/components/StyledList/StyledList.d.ts +2 -1
  50. package/dist/src/components/Table/Table.d.ts +2 -1
  51. package/dist/src/components/Tabs/Tabs.d.ts +2 -2
  52. package/dist/src/components/TagSet/TagSet.d.ts +2 -1
  53. package/dist/src/components/TagSet/TagSetExplore.d.ts +1 -1
  54. package/dist/src/components/TagSet/TagSetFilter.d.ts +1 -1
  55. package/dist/src/components/Template/Template.d.ts +3 -2
  56. package/dist/src/components/Text/Text.d.ts +2 -1
  57. package/dist/src/components/TextInput/TextInput.d.ts +2 -1
  58. package/dist/src/components/Toggle/Toggle.d.ts +2 -1
  59. package/dist/src/components/Tooltip/Tooltip.d.ts +2 -1
  60. package/dist/src/components/VideoPlayer/VideoPlayer.d.ts +6 -3
  61. package/dist/src/helpers/types.d.ts +2 -0
  62. package/dist/src/hooks/useDSHeading.d.ts +16 -0
  63. package/dist/src/hooks/useScrollTabIntoView.d.ts +9 -0
  64. package/dist/src/hooks/useStateWithDependencies.d.ts +4 -2
  65. package/dist/src/index.d.ts +3 -1
  66. package/dist/src/theme/components/accordion.d.ts +22 -2
  67. package/dist/src/theme/components/alphabetFilter.d.ts +24 -8
  68. package/dist/src/theme/components/audioPlayer.d.ts +18 -1
  69. package/dist/src/theme/components/breadcrumb.d.ts +24 -16
  70. package/dist/src/theme/components/button.d.ts +39 -0
  71. package/dist/src/theme/components/buttonGroup.d.ts +12 -3
  72. package/dist/src/theme/components/card.d.ts +104 -235
  73. package/dist/src/theme/components/checkbox.d.ts +44 -34
  74. package/dist/src/theme/components/checkboxGroup.d.ts +18 -4
  75. package/dist/src/theme/components/datePicker.d.ts +17 -6
  76. package/dist/src/theme/components/featuredContent.d.ts +75 -36
  77. package/dist/src/theme/components/feedbackBox.d.ts +28 -9
  78. package/dist/src/theme/components/fieldset.d.ts +14 -2
  79. package/dist/src/theme/components/global.d.ts +1 -0
  80. package/dist/src/theme/components/heading.d.ts +596 -249
  81. package/dist/src/theme/components/helperErrorText.d.ts +19 -3
  82. package/dist/src/theme/components/hero.d.ts +198 -176
  83. package/dist/src/theme/components/horizontalRule.d.ts +14 -2
  84. package/dist/src/theme/components/icon.d.ts +13 -4
  85. package/dist/src/theme/components/image.d.ts +326 -223
  86. package/dist/src/theme/components/label.d.ts +14 -2
  87. package/dist/src/theme/components/link.d.ts +40 -197
  88. package/dist/src/theme/components/list.d.ts +130 -101
  89. package/dist/src/theme/components/logo.d.ts +17 -5
  90. package/dist/src/theme/components/menu.d.ts +169 -0
  91. package/dist/src/theme/components/modal.d.ts +19 -4
  92. package/dist/src/theme/components/newsletterSignup.d.ts +37 -29
  93. package/dist/src/theme/components/notification.d.ts +51 -116
  94. package/dist/src/theme/components/notificationContent.d.ts +58 -0
  95. package/dist/src/theme/components/notificationHeading.d.ts +57 -0
  96. package/dist/src/theme/components/pagination.d.ts +17 -2
  97. package/dist/src/theme/components/progressIndicator.d.ts +21 -5
  98. package/dist/src/theme/components/radio.d.ts +25 -6
  99. package/dist/src/theme/components/radioGroup.d.ts +18 -4
  100. package/dist/src/theme/components/searchBar.d.ts +24 -6
  101. package/dist/src/theme/components/select.d.ts +21 -13
  102. package/dist/src/theme/components/skeletonLoader.d.ts +34 -12
  103. package/dist/src/theme/components/skipNavigation.d.ts +12 -1
  104. package/dist/src/theme/components/slider.d.ts +49 -33
  105. package/dist/src/theme/components/socialmedialinks.d.ts +22 -16
  106. package/dist/src/theme/components/statusBadge.d.ts +66 -10
  107. package/dist/src/theme/components/structuredContent.d.ts +233 -102
  108. package/dist/src/theme/components/styledList.d.ts +12 -6
  109. package/dist/src/theme/components/tabs.d.ts +27 -13
  110. package/dist/src/theme/components/tagSet.d.ts +83 -42
  111. package/dist/src/theme/components/template.d.ts +76 -25
  112. package/dist/src/theme/components/text.d.ts +27 -12
  113. package/dist/src/theme/components/textInput.d.ts +52 -44
  114. package/dist/src/theme/components/toggle.d.ts +33 -11
  115. package/dist/src/theme/components/tooltip.d.ts +13 -1
  116. package/dist/src/theme/components/videoPlayer.d.ts +32 -21
  117. package/dist/src/theme/foundations/global.d.ts +6 -0
  118. package/dist/styles.css +1 -1
  119. package/package.json +6 -9
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  export declare const linkTypesArray: readonly ["action", "backwards", "button", "buttonPrimary", "buttonSecondary", "buttonPill", "buttonCallout", "buttonNoBrand", "buttonDisabled", "default", "external", "forwards", "standalone"];
3
4
  export type LinkTypes = typeof linkTypesArray[number];
@@ -30,5 +31,5 @@ export interface LinkProps {
30
31
  * A component that uses an `href` prop or a child anchor element, to create
31
32
  * an anchor element with added styling and conventions.
32
33
  */
33
- export declare const Link: React.FC<any>;
34
+ export declare const Link: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<LinkProps> & React.RefAttributes<HTMLDivElement & HTMLAnchorElement>>, React.PropsWithChildren<LinkProps>>;
34
35
  export default Link;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  export declare const listTypesArray: readonly ["ol", "ul", "dl"];
3
4
  export type ListTypes = typeof listTypesArray[number];
@@ -21,9 +22,10 @@ export interface ListProps {
21
22
  listItems?: (string | JSX.Element | DescriptionProps)[];
22
23
  /** Remove list styling. */
23
24
  noStyling?: boolean;
24
- /** An optional title that will appear over the list. This prop only applies
25
- * to Description Lists. */
26
- title?: string;
25
+ /** Optional string value used to set the text for a `Heading` component, or
26
+ * a DS Heading component that can be passed in. This title only applies to
27
+ * to Description Lists and will render above the list. */
28
+ title?: string | JSX.Element;
27
29
  /** The type of list: "ol", "ul", or "dl". "ul" by default. */
28
30
  type: ListTypes;
29
31
  }
@@ -32,7 +34,7 @@ export interface ListProps {
32
34
  * and `dd` elements based on the `type` prop. Note that the `title` prop will
33
35
  * only display for the `Description` list type.
34
36
  */
35
- export declare const List: React.FC<any>;
37
+ export declare const List: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<ListProps> & React.RefAttributes<HTMLDivElement & HTMLUListElement & HTMLOListElement>>, React.PropsWithChildren<ListProps>>;
36
38
  /**
37
39
  * Checks for `li` elements and consoles a warning if the
38
40
  * children are different HTML elements.
@@ -1,8 +1,9 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
- import { logoNamesArray, logoSizeBasedOnArray, logoSizesArray } from "./logoVariables";
3
+ import { DimensionTypes } from "../../helpers/types";
4
+ import { logoNamesArray, logoSizesArray } from "./logoVariables";
3
5
  export type LogoNames = typeof logoNamesArray[number];
4
6
  export type LogoSizes = typeof logoSizesArray[number];
5
- export type LogoSizeBasedOn = typeof logoSizeBasedOnArray[number];
6
7
  export interface LogoProps {
7
8
  /** Optional className that will be added to the parent element */
8
9
  className?: string;
@@ -16,7 +17,7 @@ export interface LogoProps {
16
17
  /** Sets the logo size. */
17
18
  size?: LogoSizes;
18
19
  /** Sets the logo size based on the width or height. Width by default. */
19
- sizeBasedOn?: LogoSizeBasedOn;
20
+ sizeBasedOn?: DimensionTypes;
20
21
  /** For accessibility purposes, the text passed in the `title` prop gets
21
22
  * rendered in a `title` element in the SVG. This descriptive text is not
22
23
  * visible but is needed for screenreaders to describe the graphic. */
@@ -26,5 +27,5 @@ export interface LogoProps {
26
27
  * The `Logo` component renders SVG-based logos and color variants that are
27
28
  * commonly used by the New York Public Library.
28
29
  */
29
- export declare const Logo: React.FC<any>;
30
+ export declare const Logo: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<LogoProps> & React.RefAttributes<HTMLDivElement & SVGSVGElement>>, LogoProps>;
30
31
  export default Logo;
@@ -1,3 +1,2 @@
1
1
  export declare const logoNamesArray: readonly ["appleAppStoreBlack", "appleAppStoreWhite", "bplBlack", "bplWhite", "cleverBadgeColor", "cleverColor", "cleverWhite", "digitalCollectionsBlack", "digitalCollectionsWhite", "firstbookColor", "firstbookColorNegative", "googlePlayBlack", "lpaBlack", "lpaColor", "lpaWhite", "mlnBlack", "mlnColor", "mlnWhite", "nycdoeBlack", "nycdoeColor", "nycdoeWhite", "nycpsBlack", "nycpsColor", "nycpsWhite", "nyplFullBlack", "nyplFullWhite", "nyplLionBlack", "nyplLionWhite", "nyplTextBlack", "nyplTextWhite", "openebooksColor", "openebooksNegative", "openebooksWithTextColor", "openebooksWithTextNegative", "qplAltBlack", "qplAltWhite", "qplBlack", "qplColor", "qplWhite", "reservoirIconColor", "reservoirVerticalColor", "schomburgBlack", "schomburgCircleBlack", "schomburgCircleColor", "schomburgCircleWhite", "schomburgColor", "schomburgWhite", "simplyeBlack", "simplyeWhite", "simplyeColor", "snflBlack", "snflWhite", "treasuresColor", "treasuresColorNegative"];
2
2
  export declare const logoSizesArray: readonly ["default", "xxsmall", "xsmall", "small", "medium", "large"];
3
- export declare const logoSizeBasedOnArray: readonly ["height", "width"];
@@ -0,0 +1,58 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
2
+ import { IconNames } from "../Icons/Icon";
3
+ import React from "react";
4
+ import { SectionTypes } from "../../helpers/types";
5
+ export interface MenuProps {
6
+ /** Optional CSS class name that will be added to the component's parent element. */
7
+ className?: string;
8
+ /** Optional ID string that other components can cross reference for accessibility purposes. */
9
+ id?: string;
10
+ /** Optional string used to identify and highlight an item when the menu opens. The value should
11
+ * match the id associated with one of the items. */
12
+ selectedItem?: string;
13
+ /** Used to set the highlight color for the current item. The values correspond with the NYPL section colors */
14
+ highlightColor?: SectionTypes;
15
+ /** Required string used to set the label text for the button element. If showLabel is false,
16
+ * this value is instead used to set an aria-label attribute on the button. The labelText prop is
17
+ * required for accessibility compliance. */
18
+ labelText: string;
19
+ /** Optional string used to set the placement of the list element. */
20
+ listAlignment?: "left" | "right";
21
+ /** Required array of data objects used to populate the items rendered in the list.
22
+ * The order of the array elements will determine the order of the items in the list.*/
23
+ listItemsData: ListItemsData[];
24
+ /** Optional boolean value used to toggle the visibility of a border around the button element.*/
25
+ showBorder?: boolean;
26
+ /** Optional boolean value used to toggle the visibility of the label text for the button element.
27
+ * If false, this value will be used to set an aria-label attribute on the button element. */
28
+ showLabel?: boolean;
29
+ }
30
+ /**Type for the icons/images displayed inline with menu items. */
31
+ interface Media {
32
+ type: string;
33
+ name?: IconNames;
34
+ src?: string;
35
+ alt?: string;
36
+ }
37
+ /** The three types of menu items: */
38
+ export interface ActionItem {
39
+ type: "action";
40
+ label: string;
41
+ id: string;
42
+ media?: Media | null;
43
+ onClick: (id: string) => void;
44
+ }
45
+ export interface GroupItem {
46
+ type: "group";
47
+ id: string;
48
+ label: string;
49
+ children: ListItemsData[];
50
+ }
51
+ export interface DividerItem {
52
+ type: "divider";
53
+ id: string;
54
+ }
55
+ /** Menu items can be one of the three types: */
56
+ export type ListItemsData = ActionItem | GroupItem | DividerItem;
57
+ export declare const Menu: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<MenuProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<MenuProps>>;
58
+ export default Menu;
@@ -1,29 +1,38 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
- interface BaseModalProps {
3
+ export interface BaseModalProps {
4
+ /** The content to display in the modal body. */
3
5
  bodyContent?: string | JSX.Element;
6
+ /** The label for the close button. */
4
7
  closeButtonLabel?: string;
8
+ /** The text to display in the modal heading, can be a string or JSX Element. */
5
9
  headingText?: string | JSX.Element;
6
- /** ID that other components can cross reference for accessibility purposes */
10
+ /** ID that other components can cross reference for accessibility purposes. */
7
11
  id?: string;
12
+ /** Boolean to determine if the modal is open or closed. */
8
13
  isOpen?: boolean;
9
14
  onClose?: () => void;
10
15
  }
11
16
  export interface ModalProps {
17
+ /** The text to display on the button that opens the modal. */
12
18
  buttonText?: string;
13
19
  /** ID that other components can cross reference for accessibility purposes */
14
20
  id?: string;
21
+ /** Props to update the internal `Modal` component. This contains the
22
+ * `bodyContent`, `closeButtonLabel`, `headingText`, `isOpen`, and
23
+ * `onClose` props. */
15
24
  modalProps: BaseModalProps;
16
25
  }
26
+ export declare const BaseModal: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<BaseModalProps> & React.RefAttributes<HTMLButtonElement>>, React.PropsWithChildren<BaseModalProps>>;
17
27
  /**
18
28
  * The `ModalTrigger` component renders a button that you click to open the
19
29
  * internal `Modal` component. Note that props to update the internal `Modal`
20
30
  * component are passed through to the `modalProps` prop.
21
31
  */
22
- export declare const ModalTrigger: React.FC<any>;
32
+ export declare const ModalTrigger: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<ModalProps> & React.RefAttributes<HTMLButtonElement>>, React.PropsWithChildren<ModalProps>>;
23
33
  /**
24
34
  * This hook function can be used to render the `Modal` component with a custom
25
35
  * open button(s) and optional custom close button(s). You must render your own
26
36
  * button and pass the appropriate `onOpen` and ` handler for the modal to open.
27
37
  */
28
38
  export declare function useModal(): any;
29
- export {};
@@ -1,8 +1,49 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
3
+ import { SectionTypes } from "../../helpers/types";
4
+ interface NewsletterSignupProps {
5
+ /** Additional class name to add. */
6
+ className?: string;
7
+ /** Text displayed next to the confirmation icon after a successful email submission */
8
+ confirmationHeading: string;
9
+ /** Detail text for the confirmation view */
10
+ confirmationText: string;
11
+ /** Appears below the title to provide details about the newsletter. Accepts a string or an element. */
12
+ descriptionText?: string | JSX.Element;
13
+ /** Text displayed next to the error icon in case of an error in the email submission process*/
14
+ errorHeading?: string;
15
+ /** Appears below the title to provide details about next steps in case of an error. Accepts a string or an element. */
16
+ errorText?: string | JSX.Element;
17
+ /** Appears below the input field's example text to provide any additional instructions. Accepts a string or
18
+ * an element. */
19
+ formHelperText?: string | JSX.Element;
20
+ /** ID that other components can cross-reference for accessibility purposes */
21
+ id?: string;
22
+ /** Toggles the invalid state for the email field. */
23
+ isInvalidEmail?: boolean;
24
+ /** Value to determine the section color highlight. The default is set to "blogs" as it uses the
25
+ * "ui.border.deafult" color.
26
+ */
27
+ newsletterSignupType?: SectionTypes;
28
+ /** A handler function that will be called when the form is submitted. */
29
+ onSubmit: (event: React.FormEvent<any>) => void;
30
+ /** A handler function that will be called when the text input changes. */
31
+ onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
32
+ /** Link to the relevant privacy policy page. */
33
+ privacyPolicyLink?: string;
34
+ /** Optional string value used to set the text for a `Heading` component, or
35
+ * a DS Heading component that can be passed in.
36
+ */
37
+ title?: JSX.Element | string;
38
+ /** The value of the email text input field. */
39
+ valueEmail?: string;
40
+ /** Used to specify what is displayed in the component form/feedback area. */
41
+ view?: NewsletterSignupViewType;
42
+ }
2
43
  export type NewsletterSignupViewType = "form" | "submitting" | "confirmation" | "error";
3
44
  /**
4
45
  * The NewsletterSignup component provides a way for patrons to register for an
5
46
  * email-based newsletter distribution list.
6
47
  */
7
- export declare const NewsletterSignup: React.FC<any>;
48
+ export declare const NewsletterSignup: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<NewsletterSignupProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<NewsletterSignupProps>>;
8
49
  export default NewsletterSignup;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  export declare const notificationTypesArray: readonly ["standard", "announcement", "warning"];
3
4
  export type NotificationTypes = typeof notificationTypesArray[number];
@@ -10,14 +11,19 @@ interface BaseProps {
10
11
  id?: string;
11
12
  /** Optional prop to control horizontal alignment of the `Notification` content */
12
13
  isCentered?: boolean;
13
- /** Content to be rendered in a `NotificationHeading` component. */
14
- notificationHeading?: string;
14
+ /** Optional content to be rendered in a `NotificationHeading` component. A
15
+ * string value is used to set the text for a `Heading` component, or
16
+ * a DS Heading component that can be passed in.
17
+ */
18
+ notificationHeading?: string | JSX.Element;
15
19
  /** Optional prop to control the coloring of the `Notification` text and the
16
20
  * visibility of an applicable icon. */
17
21
  notificationType?: NotificationTypes;
18
22
  /** Prop to display the `Notification` icon. Defaults to `true`. */
19
23
  showIcon?: boolean;
20
24
  }
25
+ type NotificationHeadingProps = Omit<BasePropsWithoutAlignText, "showIcon">;
26
+ type NotificationContentProps = Omit<BaseProps, "icon">;
21
27
  type BasePropsWithoutAlignText = Omit<BaseProps, "alignText">;
22
28
  export interface NotificationProps extends BasePropsWithoutAlignText {
23
29
  /** Label used to describe the `Notification`'s aside HTML element. */
@@ -37,14 +43,14 @@ export interface NotificationProps extends BasePropsWithoutAlignText {
37
43
  /**
38
44
  * NotificationHeading child-component.
39
45
  */
40
- export declare const NotificationHeading: React.FC<any>;
46
+ export declare const NotificationHeading: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<NotificationHeadingProps> & React.RefAttributes<HTMLDivElement>>, NotificationHeadingProps>;
41
47
  /**
42
48
  * NotificationContent child-component.
43
49
  */
44
- export declare const NotificationContent: React.FC<any>;
50
+ export declare const NotificationContent: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<NotificationContentProps> & React.RefAttributes<HTMLDivElement>>, NotificationContentProps>;
45
51
  /**
46
52
  * Component used to present users with three different levels of notifications:
47
53
  * standard, announcement, and warning.
48
54
  */
49
- export declare const Notification: React.FC<any>;
55
+ export declare const Notification: ChakraComponent<React.ForwardRefExoticComponent<NotificationProps & React.RefAttributes<HTMLDivElement>>, NotificationProps>;
50
56
  export default Notification;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  export interface PaginationProps {
3
4
  /** Additional className. */
@@ -23,5 +24,5 @@ export interface PaginationProps {
23
24
  /**
24
25
  * A component that provides a navigational list of page items.
25
26
  */
26
- export declare const Pagination: React.FC<any>;
27
+ export declare const Pagination: ChakraComponent<React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLDivElement>>, PaginationProps>;
27
28
  export default Pagination;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  export declare const progressIndicatorSizesArray: readonly ["default", "small"];
3
4
  export declare const progressIndicatorTypesArray: readonly ["circular", "linear"];
@@ -28,5 +29,5 @@ export interface ProgressIndicatorProps {
28
29
  * time to complete or consists of multiple steps. Examples include downloading,
29
30
  * uploading, or processing.
30
31
  */
31
- export declare const ProgressIndicator: React.FC<any>;
32
+ export declare const ProgressIndicator: ChakraComponent<React.ForwardRefExoticComponent<ProgressIndicatorProps & React.RefAttributes<HTMLDivElement>>, ProgressIndicatorProps>;
32
33
  export default ProgressIndicator;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
4
  export interface RadioProps {
@@ -39,5 +40,5 @@ export interface RadioProps {
39
40
  /** Populates the value of the input. */
40
41
  value?: string;
41
42
  }
42
- export declare const Radio: React.FC<any>;
43
+ export declare const Radio: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<RadioProps> & React.RefAttributes<HTMLInputElement>>, React.PropsWithChildren<RadioProps>>;
43
44
  export default Radio;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
4
  import { LayoutTypes } from "../../helpers/types";
@@ -45,5 +46,5 @@ export interface RadioGroupProps {
45
46
  * for this form group element and is not needed for individual DS `Radio`
46
47
  * components when `RadioGroup` is used.
47
48
  */
48
- export declare const RadioGroup: React.FC<any>;
49
+ export declare const RadioGroup: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<RadioGroupProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<RadioGroupProps>>;
49
50
  export default RadioGroup;
@@ -19,8 +19,10 @@ export interface SearchBarProps {
19
19
  className?: string;
20
20
  /** Optional string for the SearchBar's description above the component. */
21
21
  descriptionText?: string;
22
- /** Optional string for the SearchBar's heading text above the component. */
23
- headingText?: string;
22
+ /** Optional string value used to set the text for a `Heading` component, or
23
+ * a DS Heading component that can be passed in.
24
+ */
25
+ headingText?: string | JSX.Element;
24
26
  /** The text to display below the form in a `HelperErrorText` component. */
25
27
  helperText?: HelperErrorTextType;
26
28
  /** ID that other components can cross reference for accessibility purposes */
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
4
  export declare const selectTypesArray: string[];
@@ -53,5 +54,5 @@ export interface SelectProps {
53
54
  * Component that renders Chakra's `Select` component along with an accessible
54
55
  * `Label` and optional `HelperErrorText` component.
55
56
  */
56
- export declare const Select: React.FC<any>;
57
+ export declare const Select: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<SelectProps> & React.RefAttributes<HTMLSelectElement>>, React.PropsWithChildren<SelectProps>>;
57
58
  export default Select;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  import { LayoutTypes } from "../../helpers/types";
3
4
  export declare const skeletonLoaderImageRatiosArray: readonly ["landscape", "portrait", "square"];
@@ -36,5 +37,5 @@ export interface SkeletonLoaderProps {
36
37
  * The `SkeletonLoader` component renders a placeholder to be used while
37
38
  * dynamic content is loading.
38
39
  */
39
- export declare const SkeletonLoader: React.FC<any>;
40
+ export declare const SkeletonLoader: ChakraComponent<React.ForwardRefExoticComponent<SkeletonLoaderProps & React.RefAttributes<HTMLDivElement>>, SkeletonLoaderProps>;
40
41
  export default SkeletonLoader;
@@ -1,9 +1,18 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
3
+ interface SkipNavigationProps {
4
+ /** Additional CSS class name to render in the `nav` element. */
5
+ className?: string;
6
+ /** ID that other components can cross reference for accessibility purposes */
7
+ id?: string;
8
+ /** The anchor target for the main skip link. The default is "#mainContent". */
9
+ target?: string;
10
+ }
2
11
  /**
3
12
  * SkipNavigation is a component that is used to provide a navigational list of
4
13
  * links. The first link is used to skip to the main content of the page using
5
14
  * the `#mainContent` id, and the second link points to accessibility information
6
15
  * on NYPL.org. These links are visually hidden but can be read by screenreaders.
7
16
  */
8
- export declare const SkipNavigation: React.FC<any>;
17
+ export declare const SkipNavigation: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<SkipNavigationProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<SkipNavigationProps>>;
9
18
  export default SkipNavigation;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
4
  export interface SliderProps {
@@ -59,5 +60,5 @@ export interface SliderProps {
59
60
  * with a min and max value. The value(s) can be updated through the slider
60
61
  * thumb(s) or through the text input(s) elements.
61
62
  */
62
- export declare const Slider: React.FC<any>;
63
+ export declare const Slider: ChakraComponent<React.ForwardRefExoticComponent<SliderProps & React.RefAttributes<HTMLDivElement>>, SliderProps>;
63
64
  export default Slider;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import { LayoutTypes } from "../../helpers/types";
2
3
  import React from "react";
3
4
  export declare const borderTypeArray: readonly ["none", "circular", "straight"];
@@ -38,5 +39,5 @@ export interface SocialMediaLinksProps {
38
39
  /**
39
40
  * The SocialMediaLinks component renders a list of links for accessing social media sites.
40
41
  */
41
- export declare const SocialMediaLinks: React.FC<any>;
42
+ export declare const SocialMediaLinks: ChakraComponent<React.ForwardRefExoticComponent<SocialMediaLinksProps & React.RefAttributes<HTMLDivElement & HTMLUListElement & HTMLOListElement>>, SocialMediaLinksProps>;
42
43
  export default SocialMediaLinks;
@@ -1,17 +1,26 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
- export declare const statusBadgeTypeArray: readonly ["low", "medium", "high"];
3
+ export declare const statusBadgeLevelArray: readonly ["low", "medium", "high"];
4
+ export type StatusBadgeLevels = typeof statusBadgeLevelArray[number];
5
+ export declare const statusBadgeTypeArray: readonly ["informative", "negative", "neutral", "positive", "recommendation", "warning", "low", "medium", "high"];
3
6
  export type StatusBadgeTypes = typeof statusBadgeTypeArray[number];
4
7
  export interface StatusBadgeProps {
5
8
  /** Additional class for the component */
6
9
  className?: string;
7
10
  /** ID that other components can cross reference for accessibility purposes */
8
11
  id?: string;
9
- /** Level of the status badge. Defaults to `"low"`. */
10
- level?: StatusBadgeTypes;
12
+ /** Level of the status badge. This prop has been deprecated in favor of the
13
+ * `type` prop. */
14
+ level?: StatusBadgeLevels;
15
+ /** Semantic type of the status badge. */
16
+ type?: StatusBadgeTypes;
11
17
  }
12
18
  /**
13
- * The `StatusBadge` component is used to display a visual badge for three
14
- * different status levels.
19
+ * The `StatusBadge` component is a label that indicates status or importance.
20
+ * It is used for bringing awareness to a specific element or feature and should
21
+ * provide quick recognition.
15
22
  */
16
- export declare const StatusBadge: React.FC<any>;
23
+ export declare const StatusBadge: ChakraComponent<React.ForwardRefExoticComponent<StatusBadgeProps & {
24
+ children?: React.ReactNode;
25
+ } & React.RefAttributes<HTMLDivElement>>, StatusBadgeProps>;
17
26
  export default StatusBadge;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  import { ComponentImageProps } from "../Image/Image";
3
4
  export type StructuredContentImagePosition = "left" | "right" | "center";
@@ -8,11 +9,13 @@ interface StructuredContentImageProps extends ComponentImageProps {
8
9
  }
9
10
  export interface StructuredContentProps {
10
11
  /** Optional value to set the text for the callout heading text. */
11
- calloutText?: string;
12
+ calloutText?: string | JSX.Element;
12
13
  /** Additional class name for the `StructuredContent` component. */
13
14
  className?: string;
14
- /** Optional value to set the text for the main heading text. */
15
- headingText?: string;
15
+ /** Optional string value used to set the text for a `Heading` component, or
16
+ * a DS Heading component that can be passed in.
17
+ */
18
+ headingText?: string | JSX.Element;
16
19
  /** ID that other components can cross reference for accessibility purposes. */
17
20
  id?: string;
18
21
  /** Object used to create and render the `Image` component. */
@@ -24,5 +27,5 @@ export interface StructuredContentProps {
24
27
  * The `StructuredContent` component that displays a heading, callout content,
25
28
  * an image, and body content. All are optional except for body content.
26
29
  */
27
- export declare const StructuredContent: React.FC<any>;
30
+ declare const StructuredContent: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<StructuredContentProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<StructuredContentProps>>;
28
31
  export default StructuredContent;
@@ -1,4 +1,5 @@
1
1
  import { PropsWithChildren } from "react";
2
+ import { IconColors } from "../Icons/Icon";
2
3
  export declare const colorContrastData: {
3
4
  brand: {
4
5
  primary: {
@@ -333,7 +334,7 @@ export interface DataTableProps {
333
334
  * with the current color. */
334
335
  dataWhiteColor: string[];
335
336
  /** The color to use for text in the color card. */
336
- textColor: string;
337
+ textColor: IconColors;
337
338
  }
338
339
  export interface ColorCardProps extends DataTableProps {
339
340
  /** The backgroundColor of the color card. */
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  export declare const textSizesArray: readonly ["default", "body1", "body2", "caption", "tag", "mini"];
3
4
  export type TextSizes = typeof textSizesArray[number];
@@ -22,5 +23,5 @@ export interface StyledListProps {
22
23
  * adhere to traditional numbered and bulleted list styles. Unlike
23
24
  * the `List` component, `StyledList` only renders an unordered list.
24
25
  */
25
- export declare const StyledList: React.FC<any>;
26
+ export declare const StyledList: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<StyledListProps> & React.RefAttributes<HTMLDivElement & HTMLUListElement>>, React.PropsWithChildren<StyledListProps>>;
26
27
  export default StyledList;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  export interface TableProps {
3
4
  /** Additional class name for the `Table` component. */
@@ -26,5 +27,5 @@ export interface TableProps {
26
27
  * Basic `Table` component used to organize and display tabular data in
27
28
  * rows and columns.
28
29
  */
29
- export declare const Table: React.FC<any>;
30
+ export declare const Table: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<TableProps> & React.RefAttributes<HTMLTableElement>>, React.PropsWithChildren<TableProps>>;
30
31
  export default Table;
@@ -1,4 +1,4 @@
1
- import { Tab, TabList, TabPanels, TabPanel } from "@chakra-ui/react";
1
+ import { Tab, TabList, TabPanels, TabPanel, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  export interface TabsDataProps {
4
4
  label: string;
@@ -21,6 +21,6 @@ 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: React.FC<any>;
24
+ export declare const Tabs: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<TabsProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<TabsProps>>;
25
25
  export { TabList, Tab, TabPanels, TabPanel };
26
26
  export default Tabs;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  import { TagSetExploreProps } from "./TagSetExplore";
3
4
  import { TagSetFilterProps } from "./TagSetFilter";
@@ -20,5 +21,5 @@ export declare function isFilterType(type: TagSetProps["type"]): type is "filter
20
21
  * The full label text will be automatically revealed when the tag is hovered
21
22
  * with a DS `Tooltip` component.
22
23
  */
23
- export declare const TagSet: React.FC<any>;
24
+ export declare const TagSet: ChakraComponent<React.ForwardRefExoticComponent<TagSetProps & React.RefAttributes<HTMLDivElement>>, TagSetProps>;
24
25
  export default TagSet;
@@ -24,5 +24,5 @@ export interface TagSetExploreProps {
24
24
  * The `label` property in the `tagSetData` prop should be set to a link-type
25
25
  * JSX component for linking to specific content.
26
26
  */
27
- export declare const TagSetExplore: React.FC<any>;
27
+ export declare const TagSetExplore: React.FC<TagSetExploreProps>;
28
28
  export default TagSetExplore;
@@ -22,5 +22,5 @@ export interface TagSetFilterProps {
22
22
  * The "filter" `TagSet` variant will display tags that can be removed when
23
23
  * `isDismissible` is true and they are clicked.
24
24
  */
25
- export declare const TagSetFilter: React.FC<any>;
25
+ export declare const TagSetFilter: React.FC<TagSetFilterProps>;
26
26
  export default TagSetFilter;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  export interface TemplateProps {
3
4
  }
@@ -47,7 +48,7 @@ export interface TemplateAppContainerProps extends TemplateFooterProps, Template
47
48
  * The main top-level parent component that wraps all template-related
48
49
  * components.
49
50
  */
50
- declare const Template: React.FC<any>;
51
+ declare const Template: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<TemplateProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<TemplateProps>>;
51
52
  /**
52
53
  * This optional component renders its children from edge-to-edge and should
53
54
  * be used for alerts or notifications that are typically site-wide. This must
@@ -131,6 +132,6 @@ declare const TemplateFooter: React.FC<any>;
131
132
  * be rendered. For example, if you want to render content in the
132
133
  * `TemplateContentPrimary` section, then pass it as a prop to `contentPrimary`.
133
134
  */
134
- export declare const TemplateAppContainer: React.FC<any>;
135
+ export declare const TemplateAppContainer: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<TemplateAppContainerProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<TemplateAppContainerProps>>;
135
136
  export { Template, TemplateAboveHeader, TemplateBreakout, TemplateContent, TemplateContentBottom, TemplateContentPrimary, TemplateContentSidebar, TemplateContentTop, TemplateFooter, TemplateHeader, };
136
137
  export default TemplateAppContainer;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  export declare const textSizesArray: readonly ["default", "body1", "body2", "caption", "tag", "mini", "overline1", "overline2", "subtitle1", "subtitle2"];
3
4
  export type TextSizes = typeof textSizesArray[number];
@@ -21,5 +22,5 @@ export interface TextProps {
21
22
  /** Optional prop to control the text styling */
22
23
  size?: TextSizes;
23
24
  }
24
- export declare const Text: React.FC<any>;
25
+ export declare const Text: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<TextProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<TextProps>>;
25
26
  export default Text;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
4
  export declare const autoCompleteValuesArray: readonly ["on", "off", "additional-name", "address-level1", "address-level2", "address-level3", "address-level4", "address-line1", "address-line2", "address-line3", "bday-day", "bday-month", "bday-year", "bday", "cc-additional-name", "cc-csc", "cc-exp-month", "cc-exp-year", "cc-exp", "cc-family-name", "cc-given-name", "cc-name", "cc-number", "cc-type", "country-name", "country", "current-password", "email", "family-name", "given-name", "honorific-prefix", "honorific-suffix", "impp", "language", "name", "new-password", "nickname", "organization-title", "organization", "photo", "postal-code", "sex", "street-address", "tel-area-code", "tel-country-code", "tel-extension", "tel-local-prefix", "tel-local-suffix", "tel-local", "tel-national", "tel", "transaction-amount", "transaction-currency", "url", "username"];
@@ -94,5 +95,5 @@ export type TextInputRefType = HTMLInputElement & HTMLTextAreaElement;
94
95
  * element. All types will render an accessible `Label` component and an
95
96
  * optional `HelperErrorText` component.
96
97
  */
97
- export declare const TextInput: React.FC<any>;
98
+ export declare const TextInput: ChakraComponent<React.ForwardRefExoticComponent<InputProps & React.RefAttributes<TextInputRefType>>, InputProps>;
98
99
  export default TextInput;
@@ -1,3 +1,4 @@
1
+ import { ChakraComponent } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
4
  export declare const toggleSizesArray: readonly ["default", "small"];
@@ -39,5 +40,5 @@ export declare const onChangeDefault: () => void;
39
40
  /**
40
41
  * Component that renders Chakra's `Switch` component along with NYPL defaults.
41
42
  */
42
- export declare const Toggle: React.FC<any>;
43
+ export declare const Toggle: ChakraComponent<React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLInputElement>>, ToggleProps>;
43
44
  export default Toggle;