@nypl/design-system-react-components 4.0.0-alpha-rc2 → 4.0.0-alpha-rc4

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 (114) hide show
  1. package/dist/design-system-react-components.cjs +53 -53
  2. package/dist/design-system-react-components.js +12891 -12799
  3. package/dist/src/components/Accordion/Accordion.d.ts +1 -3
  4. package/dist/src/components/AlphabetFilter/AlphabetFilter.d.ts +0 -2
  5. package/dist/src/components/AudioPlayer/AudioPlayer.d.ts +2 -9
  6. package/dist/src/components/Banner/Banner.d.ts +0 -2
  7. package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +2 -4
  8. package/dist/src/components/Button/Button.d.ts +3 -5
  9. package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +0 -2
  10. package/dist/src/components/ButtonGroup/ButtonGroupContext.d.ts +3 -0
  11. package/dist/src/components/Card/Card.d.ts +2 -4
  12. package/dist/src/components/Checkbox/Checkbox.d.ts +0 -2
  13. package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +0 -2
  14. package/dist/src/components/CheckboxGroup/CheckboxGroupContext.d.ts +10 -0
  15. package/dist/src/components/ComponentWrapper/ComponentWrapper.d.ts +0 -2
  16. package/dist/src/components/DatePicker/DatePicker.d.ts +3 -5
  17. package/dist/src/components/FeaturedContent/FeaturedContent.d.ts +0 -2
  18. package/dist/src/components/FeedbackBox/FeedbackBox.d.ts +0 -2
  19. package/dist/src/components/Fieldset/Fieldset.d.ts +0 -2
  20. package/dist/src/components/FilterBarInline/FilterBarInline.d.ts +0 -2
  21. package/dist/src/components/FilterBarPopup/FilterBarPopup.d.ts +0 -2
  22. package/dist/src/components/Form/Form.d.ts +2 -4
  23. package/dist/src/components/Grid/SimpleGrid.d.ts +0 -2
  24. package/dist/src/components/Heading/Heading.d.ts +0 -5
  25. package/dist/src/components/HelperErrorText/HelperErrorText.d.ts +0 -2
  26. package/dist/src/components/Hero/Hero.d.ts +3 -5
  27. package/dist/src/components/HorizontalRule/HorizontalRule.d.ts +0 -2
  28. package/dist/src/components/Icons/Icon.d.ts +1 -3
  29. package/dist/src/components/Icons/IconSvgs.d.ts +3 -0
  30. package/dist/src/components/Icons/iconVariables.d.ts +1 -1
  31. package/dist/src/components/Image/Image.d.ts +0 -4
  32. package/dist/src/components/Label/Label.d.ts +0 -2
  33. package/dist/src/components/Link/Link.d.ts +0 -2
  34. package/dist/src/components/List/List.d.ts +0 -11
  35. package/dist/src/components/Logo/Logo.d.ts +1 -3
  36. package/dist/src/components/Menu/Menu.d.ts +0 -2
  37. package/dist/src/components/Modal/Modal.d.ts +1 -5
  38. package/dist/src/components/MultiSelect/MultiSelect.d.ts +0 -2
  39. package/dist/src/components/MultiSelect/MultiSelectItemsCountButton.d.ts +2 -5
  40. package/dist/src/components/MultiSelectGroup/MultiSelectGroup.d.ts +0 -2
  41. package/dist/src/components/NewsletterSignup/NewsletterSignup.d.ts +0 -2
  42. package/dist/src/components/Notification/Notification.d.ts +2 -4
  43. package/dist/src/components/Pagination/Pagination.d.ts +0 -2
  44. package/dist/src/components/ProgressIndicator/ProgressIndicator.d.ts +0 -2
  45. package/dist/src/components/Radio/Radio.d.ts +1 -4
  46. package/dist/src/components/RadioGroup/RadioGroup.d.ts +0 -2
  47. package/dist/src/components/RadioGroup/RadioGroupContext.d.ts +10 -0
  48. package/dist/src/components/SearchBar/SearchBar.d.ts +0 -2
  49. package/dist/src/components/Select/Select.d.ts +0 -2
  50. package/dist/src/components/SkeletonLoader/SkeletonLoader.d.ts +0 -2
  51. package/dist/src/components/SkipNavigation/SkipNavigation.d.ts +0 -2
  52. package/dist/src/components/Slider/Slider.d.ts +0 -2
  53. package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +0 -2
  54. package/dist/src/components/StatusBadge/StatusBadge.d.ts +0 -2
  55. package/dist/src/components/StructuredContent/StructuredContent.d.ts +0 -2
  56. package/dist/src/components/StyledList/StyledList.d.ts +0 -2
  57. package/dist/src/components/SubNav/SubNav.d.ts +0 -5
  58. package/dist/src/components/Tabs/Tabs.d.ts +0 -2
  59. package/dist/src/components/TagSet/TagSet.d.ts +0 -2
  60. package/dist/src/components/TagSet/TagSetExplore.d.ts +3 -2
  61. package/dist/src/components/TagSet/TagSetFilter.d.ts +3 -4
  62. package/dist/src/components/Template/Template.d.ts +31 -41
  63. package/dist/src/components/Text/Text.d.ts +0 -4
  64. package/dist/src/components/TextInput/TextInput.d.ts +0 -2
  65. package/dist/src/components/Toggle/Toggle.d.ts +0 -2
  66. package/dist/src/components/Tooltip/Tooltip.d.ts +0 -2
  67. package/dist/src/components/VideoPlayer/VideoPlayer.d.ts +0 -2
  68. package/dist/src/hooks/useSafeId.d.ts +6 -0
  69. package/dist/src/index.d.ts +1 -1
  70. package/dist/src/theme/components/button.d.ts +9 -0
  71. package/dist/src/theme/components/datePicker.d.ts +4 -0
  72. package/dist/src/theme/components/fieldset.d.ts +1 -1
  73. package/dist/src/theme/components/global.d.ts +1 -5
  74. package/dist/src/theme/components/heading.d.ts +1 -69
  75. package/dist/src/theme/components/helperErrorText.d.ts +5 -14
  76. package/dist/src/theme/components/horizontalRule.d.ts +0 -2
  77. package/dist/src/theme/components/label.d.ts +0 -1
  78. package/dist/src/theme/components/list.d.ts +1 -11
  79. package/dist/src/theme/components/radioGroup.d.ts +1 -1
  80. package/dist/src/theme/components/structuredContent.d.ts +0 -63
  81. package/dist/src/theme/components/styledList.d.ts +0 -1
  82. package/dist/src/theme/components/template.d.ts +86 -26
  83. package/dist/src/theme/components/text.d.ts +1 -3
  84. package/dist/src/theme/foundations/global.d.ts +0 -12
  85. package/dist/src/theme/foundations/spacing.d.ts +16 -0
  86. package/dist/src/utils/utils.d.ts +4 -2
  87. package/dist/styles.css +1 -1
  88. package/dist/template/templateFluidColumns1.png +0 -0
  89. package/dist/template/templateFluidColumns2.png +0 -0
  90. package/dist/template/templateFluidColumns3.png +0 -0
  91. package/dist/template/templateFluidColumns4.png +0 -0
  92. package/dist/template/templateFullPageLayout.png +0 -0
  93. package/dist/template/templateRegionsFooter.png +0 -0
  94. package/dist/template/templateRegionsHeader.png +0 -0
  95. package/dist/template/templateRegionsMain.png +0 -0
  96. package/dist/template/templateSectionBreakout.png +0 -0
  97. package/dist/template/templateSectionContent.png +0 -0
  98. package/dist/template/templateSectionFull.png +0 -0
  99. package/dist/template/templateSectionSidebar.png +0 -0
  100. package/dist/template/templateVariantFull.png +0 -0
  101. package/dist/template/templateVariantNarrow.png +0 -0
  102. package/dist/template/templateVariantSidebarLeft.png +0 -0
  103. package/dist/template/templateVariantSidebarRight.png +0 -0
  104. package/package.json +9 -13
  105. package/dist/src/theme/components/filterBar.d.ts +0 -46
  106. package/dist/template/templateBottom.png +0 -0
  107. package/dist/template/templateBreakout.png +0 -0
  108. package/dist/template/templateMain.png +0 -0
  109. package/dist/template/templateMainNarrow.png +0 -0
  110. package/dist/template/templateMainWide.png +0 -0
  111. package/dist/template/templateSidebarLeft.png +0 -0
  112. package/dist/template/templateSidebarNone.png +0 -0
  113. package/dist/template/templateSidebarRight.png +0 -0
  114. package/dist/template/templateTop.png +0 -0
@@ -1,5 +1,5 @@
1
+ /// <reference types="react" />
1
2
  import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
- import React from "react";
3
3
  export declare const accordionVariantsArray: readonly ["default", "warning", "error"];
4
4
  export type AccordionVariants = typeof accordionVariantsArray[number];
5
5
  export interface AccordionDataProps {
@@ -13,8 +13,6 @@ export interface AccordionDataProps {
13
13
  export interface AccordionProps extends Omit<BoxProps, "onChange"> {
14
14
  /** Array of data to display, and an optional variant */
15
15
  accordionData: AccordionDataProps[];
16
- /** ID that other components can cross reference for accessibility purposes */
17
- id?: string;
18
16
  /** Whether the accordion is open by default only on its initial rendering */
19
17
  isDefaultOpen?: boolean;
20
18
  /** Whether the contents of the Accordion should always be rendered.
@@ -13,8 +13,6 @@ export interface AlphabetFilterProps extends Omit<BoxProps, "onClick"> {
13
13
  * a DS Heading component that can be passed in.
14
14
  */
15
15
  headingText?: string | JSX.Element;
16
- /** ID that other components can cross reference for accessibility purposes. */
17
- id?: string;
18
16
  /** Adds the `disabled` prop to the AlphabetFilter when true. */
19
17
  isDisabled?: boolean;
20
18
  /** The callback function called when a letter button or the Show All button is clicked. */
@@ -8,23 +8,16 @@ export interface AudioPlayerProps extends BoxProps {
8
8
  audioType: AudioType;
9
9
  /** Optional string to set the text for the audio player description. */
10
10
  descriptionText?: string;
11
- /** Optional string to set a code snippet provided by Libsyn, SoundCloud or Spotify; the
12
- * `AudioPlayer` component will accept the `embedCode` prop or the `filePath` prop.
11
+ /** Optional string to set a code snippet provided by Libsyn, SoundCloud or
12
+ * Spotify; the `AudioPlayer` component will accept the `embedCode` prop.
13
13
  */
14
14
  embedCode?: string;
15
- /** Optional string to set the audio file, the path can be relative or absolute
16
- * referring to a locally hosted file, or a fully qualified URL pointing to a locally hosted file
17
- * or to another domain altogether.
18
- * TODO: This prop won't be used until a future version.
19
- */
20
15
  /** Optional string value used to set the text for a `Heading` component, or
21
16
  * a DS Heading component that can be passed in.
22
17
  */
23
18
  headingText?: string | JSX.Element;
24
19
  /** Optional string to set the text for a `HelperErrorText` component. */
25
20
  helperText?: string;
26
- /** ID that other components can cross reference for accessibility purposes. */
27
- id?: string;
28
21
  /** Optional title to added to the `<iframe>` element for improved accessibility. If omitted, a
29
22
  * generic title will be added.
30
23
  */
@@ -19,8 +19,6 @@ export interface BannerProps extends Omit<BoxProps, "content"> {
19
19
  highlightColor?: BannerHighlightColors;
20
20
  /** Optional custom `Icon` that will override the default `Icon`. */
21
21
  icon?: JSX.Element;
22
- /** ID that other components can cross reference for accessibility purposes. */
23
- id?: string;
24
22
  /** Optional prop to control whether a `Banner` can be dismissed
25
23
  * (closed) by a user. */
26
24
  isDismissible?: boolean;
@@ -10,12 +10,10 @@ export interface BreadcrumbsDataProps {
10
10
  export interface BreadcrumbProps extends BoxProps {
11
11
  /** Breadcrumb links as an array */
12
12
  breadcrumbsData: BreadcrumbsDataProps[];
13
- /** Used to control how the `Breadcrumbs` component will be rendered. */
14
- variant?: BreadcrumbsVariants;
15
- /** ID that other components can cross reference for accessibility purposes */
16
- id?: string;
17
13
  /** Custom Link component for apps with internal routing, defaults to BreadcrumbLink if not passed */
18
14
  customLinkComponent?: React.ElementType;
15
+ /** Used to control how the `Breadcrumbs` component will be rendered. */
16
+ variant?: BreadcrumbsVariants;
19
17
  }
20
18
  /**
21
19
  * The `Breadcrumbs` component is a navigation element that provides a
@@ -3,15 +3,11 @@ import { sizesArray } from "../../theme/sharedTypes";
3
3
  import React, { ButtonHTMLAttributes } from "react";
4
4
  export declare const buttonElementTypeArray: readonly ["submit", "button", "reset"];
5
5
  export declare const buttonSizesArray: readonly ["small", "medium", "large"];
6
- export declare const buttonVariantsArray: readonly ["primary", "secondary", "text", "callout", "pill", "noBrand"];
6
+ export declare const buttonVariantsArray: readonly ["primary", "secondary", "text", "callout", "pill", "iconOnly", "noBrand"];
7
7
  export type ButtonElementType = typeof buttonElementTypeArray[number];
8
8
  export type ButtonVariants = typeof buttonVariantsArray[number];
9
9
  export type ButtonSizes = typeof sizesArray[number];
10
10
  export interface ButtonProps extends Pick<BoxProps, keyof ChakraProps>, Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color"> {
11
- /** The button variation to render based on the `ButtonVariants` type. */
12
- variant?: ButtonVariants;
13
- /** ID that other components can cross reference for accessibility purposes. */
14
- id: string;
15
11
  /** Adds 'disabled' property to the button. */
16
12
  isDisabled?: boolean;
17
13
  /** Trigger the Button's action through the `mouseDown` event handler instead
@@ -21,6 +17,8 @@ export interface ButtonProps extends Pick<BoxProps, keyof ChakraProps>, Omit<But
21
17
  screenreaderOnlyText?: string;
22
18
  /** The size of the `Button`. */
23
19
  size?: ButtonSizes;
20
+ /** The button variation to render based on the `ButtonVariants` type. */
21
+ variant?: ButtonVariants;
24
22
  }
25
23
  /**
26
24
  * Renders a simple `button` element with custom variant styles.
@@ -6,8 +6,6 @@ export type ButtonGroupWidths = typeof buttonGroupWidthsArray[number];
6
6
  export interface ButtonGroupProps extends BoxProps {
7
7
  /** Sets the width to "default" (for "fit-content") or "full". */
8
8
  buttonWidth?: ButtonGroupWidths;
9
- /** ID that other components can cross reference for accessibility purposes. */
10
- id?: string;
11
9
  /** Set's the disabled state to all the internal `Button` components. */
12
10
  isDisabled?: boolean;
13
11
  /** Renders the layout of `Button` components in a row or column. */
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ export declare const ButtonGroupContext: import("react").Context<boolean>;
3
+ export declare const useButtonGroup: () => boolean;
@@ -1,7 +1,7 @@
1
- import React from "react";
2
1
  import { BoxProps, ChakraComponent } from "@chakra-ui/react";
3
- import { LayoutTypes } from "../../helpers/types";
2
+ import React from "react";
4
3
  import { ComponentImageProps } from "../Image/Image";
4
+ import { LayoutTypes } from "../../helpers/types";
5
5
  interface CardBaseProps {
6
6
  /** Optional value to control the alignment of the text and elements. */
7
7
  isCentered?: boolean;
@@ -10,8 +10,6 @@ interface CardBaseProps {
10
10
  layout?: LayoutTypes;
11
11
  }
12
12
  interface CardWrapperProps extends BoxProps {
13
- /** ID that other components can cross reference for accessibility purposes. */
14
- id?: string;
15
13
  /** Main link to use when the full `Card` component should be clickable. */
16
14
  mainActionLink?: string;
17
15
  /** Additional object for styling the `Card`'s `div` wrapper. */
@@ -13,8 +13,6 @@ interface CheckboxIconProps {
13
13
  export interface CheckboxProps extends Pick<BoxProps, keyof ChakraProps>, CheckboxIconProps, Omit<InputHTMLAttributes<HTMLInputElement>, "color" | "height" | "width"> {
14
14
  /** Optional string to populate the HelperErrorText for standard state */
15
15
  helperText?: HelperErrorTextType;
16
- /** ID that other components can cross reference for accessibility purposes */
17
- id: string;
18
16
  /** Optional string to populate the HelperErrorText for the error state
19
17
  * when `isInvalid` is true. */
20
18
  invalidText?: HelperErrorTextType;
@@ -7,8 +7,6 @@ export interface CheckboxGroupProps extends Omit<BoxProps, "onChange"> {
7
7
  defaultValue?: string[];
8
8
  /** Optional string to populate the HelperErrorText for standard state */
9
9
  helperText?: HelperErrorTextType;
10
- /** ID that other components can cross reference for accessibility purposes */
11
- id: string;
12
10
  /** Optional string to populate the HelperErrorText for error state */
13
11
  invalidText?: HelperErrorTextType;
14
12
  /** Adds the 'disabled' prop to the input when true. */
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ interface CheckboxGroupContextValue {
3
+ isDisabled: boolean;
4
+ isInvalid: boolean;
5
+ isRequired: boolean;
6
+ name: string;
7
+ }
8
+ export declare const CheckboxGroupContext: import("react").Context<CheckboxGroupContextValue>;
9
+ export declare const useCheckboxGroup: () => CheckboxGroupContextValue;
10
+ export {};
@@ -14,8 +14,6 @@ export interface ComponentWrapperProps extends BoxProps {
14
14
  helperTextStyles?: {
15
15
  [key: string]: any;
16
16
  };
17
- /** ID that other components can cross reference for accessibility purposes */
18
- id?: string;
19
17
  /** Optional string to populate the `HelperErrorText` for the error state
20
18
  * when `isInvalid` is true. */
21
19
  invalidText?: HelperErrorTextType;
@@ -11,13 +11,11 @@ export interface FullDateType {
11
11
  /** Date object that gets returned for the onChange function. */
12
12
  startDate: Date | null;
13
13
  }
14
- interface DateRangeRowProps {
15
- /** ID that other components can cross reference for accessibility purposes. */
16
- id: string;
14
+ interface DateRangeRowProps extends BoxProps {
17
15
  /** Whether to render a single date input or two for a range of two dates. */
18
16
  isDateRange?: boolean;
19
17
  }
20
- interface DatePickerWrapperProps extends Omit<BoxProps, "id" | "onChange">, DateRangeRowProps {
18
+ interface DatePickerWrapperProps extends Omit<BoxProps, "onChange">, DateRangeRowProps {
21
19
  /** Adds the 'required' property to the input element(s). */
22
20
  isRequired?: boolean;
23
21
  /** Passed to the `TextInput` component to render a label associated with an input field. */
@@ -40,7 +38,7 @@ export interface CustomTextInputProps extends Partial<InputProps> {
40
38
  /** Data value used by the ReactDatePicker plugin and the custom TextInput component. */
41
39
  value?: string;
42
40
  }
43
- export interface DatePickerProps extends DatePickerWrapperProps {
41
+ export interface DatePickerProps extends Omit<DatePickerWrapperProps, "onChange"> {
44
42
  /** The date format to display. Defaults to "yyyy-MM-dd".
45
43
  * Must be in ISO-8601 format. */
46
44
  dateFormat?: string;
@@ -12,8 +12,6 @@ export interface FeaturedContentImageProps extends Omit<ImageProps, "position">
12
12
  position?: FeaturedContentPositionType;
13
13
  }
14
14
  export interface FeaturedContentProps extends BoxProps {
15
- /** ID that other components can cross reference for accessibility purposes. */
16
- id?: string;
17
15
  /** The text content rendered in the component. DS components and native HTML can be passed in this prop. */
18
16
  textContent: string | JSX.Element;
19
17
  /** Whether component will fill the full width of the browser window, instead of just its parent element.
@@ -12,8 +12,6 @@ export interface FeedbackBoxProps extends Omit<BoxProps, "onSubmit"> {
12
12
  /** A data object containing key/value pairs that will be added to the form
13
13
  * field submitted data. */
14
14
  hiddenFields?: any;
15
- /** ID that other components can cross reference for accessibility purposes */
16
- id?: string;
17
15
  /** Toggles the invalid state for the comment field. */
18
16
  isInvalidComment?: boolean;
19
17
  /** Toggles the invalid state for the email field. */
@@ -1,8 +1,6 @@
1
1
  import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  export interface FieldsetProps extends BoxProps {
4
- /** ID that other components can cross reference for accessibility purposes */
5
- id: string;
6
4
  /** Flag to show or hide the text in the `legend` element. False by default. */
7
5
  isLegendHidden?: boolean;
8
6
  /** Flag to render "required" in the `legend`. True by default. */
@@ -4,8 +4,6 @@ import { LayoutTypes } from "../../helpers/types";
4
4
  import { MultiSelectWidths, SelectedItems as MultiSelectItems } from "../MultiSelect/MultiSelect";
5
5
  export type FilterBarItemsType = (boolean | number | number[] | string | string[] | MultiSelectItems)[];
6
6
  export interface FilterBarInlineProps extends BoxProps {
7
- /** ID that other components can cross reference for accessibility purposes. */
8
- id?: string;
9
7
  /** Optional string value used to set the text for a `Heading` component, or
10
8
  * a DS Heading component that can be passed in.
11
9
  */
@@ -8,8 +8,6 @@ export interface FilterBarPopupProps extends BoxProps {
8
8
  * a DS Heading component that can be passed in.
9
9
  */
10
10
  heading?: string | JSX.Element;
11
- /** ID that other components can cross reference for accessibility purposes. */
12
- id?: string;
13
11
  /** Only used for internal purposes. */
14
12
  isOpen?: boolean;
15
13
  /** Function for the global `Clear Filters` button. If passed the `Clear Filters` button will render. */
@@ -1,17 +1,15 @@
1
1
  import { BoxProps, ChakraComponent, ChakraProps } from "@chakra-ui/react";
2
2
  import React, { FormHTMLAttributes } from "react";
3
3
  import { GridGaps } from "../Grid/SimpleGrid";
4
- interface FormBaseProps extends Pick<BoxProps, "className" | keyof ChakraProps> {
4
+ interface FormBaseProps extends Pick<BoxProps, "id" | "className" | keyof ChakraProps> {
5
5
  /** Optional spacing size; if omitted, the default `large` (2rem / 32px)
6
6
  * spacing will be used; ```IMPORTANT: for general form layout, this prop
7
7
  * should not be used``` */
8
8
  gap?: GridGaps;
9
- /** ID that other components can cross reference (internal use) */
10
- id: string;
11
9
  }
12
10
  export interface FormChildProps extends Partial<FormBaseProps> {
13
11
  }
14
- export interface FormProps extends FormBaseProps, Omit<FormHTMLAttributes<HTMLFormElement>, "color" | "id"> {
12
+ export interface FormProps extends FormBaseProps, Omit<FormHTMLAttributes<HTMLFormElement>, "color"> {
15
13
  }
16
14
  /** FormRow child-component */
17
15
  export declare const FormRow: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<FormChildProps> & React.RefAttributes<HTMLDivElement>>, FormChildProps>;
@@ -10,8 +10,6 @@ export interface SimpleGridProps extends BoxProps {
10
10
  * will be used; `IMPORTANT: for standard grid layouts, this prop should
11
11
  * not be used.` */
12
12
  gap?: GridGaps;
13
- /** ID that other components can cross reference for accessibility purposes */
14
- id?: string;
15
13
  }
16
14
  export declare const SimpleGrid: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<SimpleGridProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<SimpleGridProps>>;
17
15
  export default SimpleGrid;
@@ -5,9 +5,6 @@ export declare const headingLevelsArray: readonly ["h1", "h2", "h3", "h4", "h5",
5
5
  export type HeadingSizes = typeof headingSizesArray[number];
6
6
  export type HeadingLevels = typeof headingLevelsArray[number];
7
7
  export interface HeadingProps extends BoxProps {
8
- /** Optional ID that other components can cross reference for accessibility
9
- * purposes */
10
- id?: string;
11
8
  /** Optional prop used to show capitalized text */
12
9
  isCapitalized?: boolean;
13
10
  /** Optional prop used to show upper case text */
@@ -17,8 +14,6 @@ export interface HeadingProps extends BoxProps {
17
14
  /** Optional number 1-6 used to create the `<h*>` tag; if prop is not passed,
18
15
  * `Heading` will default to `<h2>` */
19
16
  level?: HeadingLevels;
20
- /** Optional prop used to remove default spacing */
21
- noSpace?: boolean;
22
17
  /** String to populate the overline element */
23
18
  overline?: string;
24
19
  /** Optional size used to override the default styles of the native HTML `<h>`
@@ -2,8 +2,6 @@
2
2
  import { BoxProps, ChakraComponent } from "@chakra-ui/react";
3
3
  export type HelperErrorTextType = string | JSX.Element;
4
4
  export interface HelperErrorTextProps extends BoxProps {
5
- /** Unique ID for accessibility purposes. */
6
- id?: string;
7
5
  /** Toggles between helper and invalid styling. */
8
6
  isInvalid?: boolean;
9
7
  /** Offers the ability to render or not render the content passed in
@@ -5,7 +5,7 @@ export declare const heroVariantsArray: readonly ["primary", "tertiary", "campai
5
5
  export type HeroVariants = typeof heroVariantsArray[number];
6
6
  export interface HeroImageProps extends Omit<BoxProps, "onError">, Pick<ComponentImageProps, "alt" | "fallbackSrc" | "id" | "src" | "onError" | "component"> {
7
7
  }
8
- export interface HeroProps {
8
+ export interface HeroProps extends BoxProps {
9
9
  /**
10
10
  * Optional background color for the backdrop only in the `campaign` variant.
11
11
  * When both `backdropBackgroundColor` and `backgroundImageSrc` are passed,
@@ -26,10 +26,6 @@ export interface HeroProps {
26
26
  foregroundColor?: string;
27
27
  /** Optional heading element. */
28
28
  heading?: JSX.Element;
29
- /** Used to control how the `Hero` component will be rendered. */
30
- variant?: HeroVariants;
31
- /** ID that other components can cross reference for accessibility purposes. */
32
- id?: string;
33
29
  /** Object used to create and render the `Image` component. You can pass `component`
34
30
  * (with its own internal props, which will override) or `src`, `alt`, `id`,
35
31
  * `fallBackSrc`, and `onError`. If `imageProps.alt` is left blank, a warning
@@ -46,6 +42,8 @@ export interface HeroProps {
46
42
  /** Optional string used for the subheader that displays
47
43
  * underneath the heading element. */
48
44
  subHeaderText?: string | JSX.Element;
45
+ /** Used to control how the `Hero` component will be rendered. */
46
+ variant?: HeroVariants;
49
47
  }
50
48
  export declare const Hero: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<HeroProps> & React.RefAttributes<HTMLDivElement>>, HeroProps>;
51
49
  export default Hero;
@@ -5,8 +5,6 @@ export interface HorizontalRuleProps extends BoxProps {
5
5
  * other when the width is less than 100%. If omitted, the horizontal rule
6
6
  * will have a default center alignment. */
7
7
  align?: "left" | "right";
8
- /** ID that other components can cross reference for accessibility purposes. */
9
- id?: string;
10
8
  }
11
9
  export declare const HorizontalRule: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<HorizontalRuleProps> & React.RefAttributes<HTMLDivElement & HTMLHRElement>>, React.PropsWithChildren<HorizontalRuleProps>>;
12
10
  export default HorizontalRule;
@@ -7,7 +7,7 @@ export type IconNames = typeof iconNamesArray[number];
7
7
  export type IconRotations = typeof iconRotationsArray[number];
8
8
  export type IconSizes = typeof iconSizesArray[number];
9
9
  export type IconVariants = typeof iconVariantsArray[number];
10
- export interface IconProps extends Pick<BoxProps, "className" | keyof ChakraProps> {
10
+ export interface IconProps extends Pick<BoxProps, "className" | "id" | keyof ChakraProps> {
11
11
  /** Aligns the icon. */
12
12
  align?: IconAlign;
13
13
  /** Overrides default icon color (black). */
@@ -17,8 +17,6 @@ export interface IconProps extends Pick<BoxProps, "className" | keyof ChakraProp
17
17
  decorative?: boolean;
18
18
  /** Rotates the icon clockwise in increments of 90deg */
19
19
  iconRotation?: IconRotations;
20
- /** ID that other components can cross reference for accessibility purposes */
21
- id?: string;
22
20
  /** The name of the icon you want to use. */
23
21
  name?: IconNames;
24
22
  /** Sets the icon size. */
@@ -10,8 +10,10 @@ declare const _default: {
10
10
  actionHome: any;
11
11
  actionIdentity: any;
12
12
  actionIdentityFilled: any;
13
+ actionInfo: any;
13
14
  actionLaunch: any;
14
15
  actionLightbulb: any;
16
+ actionList: any;
15
17
  actionLockClosed: any;
16
18
  actionPayment: any;
17
19
  actionPower: any;
@@ -57,6 +59,7 @@ declare const _default: {
57
59
  minus: any;
58
60
  moonCrescent: any;
59
61
  navigationMoreVert: any;
62
+ navigationApps: any;
60
63
  navigationSubdirectoryArrowLeft: any;
61
64
  navigationSubdirectoryArrowRight: any;
62
65
  plus: any;
@@ -1,6 +1,6 @@
1
1
  export declare const iconAlignArray: readonly ["left", "right", "none"];
2
2
  export declare const iconColorsArray: readonly ["currentColor", "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", "contentFilterList", "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", "navigationSubdirectoryArrowLeft", "navigationSubdirectoryArrowRight", "plus", "search", "socialFacebook", "socialInstagram", "socialPinterest", "socialSoundCloud", "socialSpotify", "socialTikTok", "socialTumblr", "socialTwitter", "socialVimeo", "socialX", "socialYoutube", "speakerNotes", "sunFull", "utilityAccountFilled", "utilityAccountUnfilled", "utilityCheck", "utilityHamburger", "utilitySearch"];
3
+ export declare const iconNamesArray: readonly ["accessibilityFull", "accessibilityPartial", "actionCheckCircle", "actionCheckCircleFilled", "actionDelete", "actionExit", "actionHelpDefault", "actionHelpOutline", "actionHome", "actionIdentity", "actionIdentityFilled", "actionInfo", "actionLaunch", "actionLightbulb", "actionList", "actionLockClosed", "actionPayment", "actionPower", "actionRegistration", "actionSearch", "actionSettings", "alertNotificationImportant", "alertWarningFilled", "alertWarningOutline", "arrow", "building", "check", "clock", "close", "communicationCall", "communicationChatBubble", "communicationEmail", "contentFilterList", "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", "navigationApps", "navigationMoreVert", "navigationSubdirectoryArrowLeft", "navigationSubdirectoryArrowRight", "plus", "search", "socialFacebook", "socialInstagram", "socialPinterest", "socialSoundCloud", "socialSpotify", "socialTikTok", "socialTumblr", "socialTwitter", "socialVimeo", "socialX", "socialYoutube", "speakerNotes", "sunFull", "utilityAccountFilled", "utilityAccountUnfilled", "utilityCheck", "utilityHamburger", "utilitySearch"];
4
4
  export declare const iconRotationsArray: readonly ["rotate0", "rotate90", "rotate180", "rotate270"];
5
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 iconVariantsArray: readonly ["default", "breadcrumbs"];
@@ -22,8 +22,6 @@ export interface ComponentImageProps extends Partial<HTMLImageElement> {
22
22
  credit?: string;
23
23
  /** Fallback image path or URL. */
24
24
  fallbackSrc?: string;
25
- /** ID that other components can cross reference for accessibility purposes. */
26
- id?: string;
27
25
  /** Flag to set the internal `Image` component to `isLazy` mode. */
28
26
  isLazy?: boolean;
29
27
  /** Additional action to perform in the `img`'s `onerror` attribute function. */
@@ -40,8 +38,6 @@ interface ImageWrapperProps {
40
38
  additionalWrapperStyles?: {
41
39
  [key: string]: any;
42
40
  };
43
- /** ID that other components can cross reference for accessibility purposes. */
44
- id?: string;
45
41
  /** Optional value to control the aspect ratio of the card image; default
46
42
  * value is `"original"` */
47
43
  ratio?: ImageRatios;
@@ -1,8 +1,6 @@
1
1
  import { BoxProps, ChakraComponent, ChakraProps } from "@chakra-ui/react";
2
2
  import React, { LabelHTMLAttributes } from "react";
3
3
  export interface LabelProps extends Pick<BoxProps, keyof ChakraProps>, Omit<LabelHTMLAttributes<HTMLLabelElement>, "color"> {
4
- /** ID that other components can cross reference for accessibility purposes */
5
- id?: string;
6
4
  /** Controls whether the label should be inline with the input it goes with.
7
5
  * This prop should only be used internally. */
8
6
  isInlined?: boolean;
@@ -5,8 +5,6 @@ export type LinkVariants = typeof linkVariantsArray[number];
5
5
  export interface LinkProps extends Pick<BoxProps, "as" | keyof ChakraProps>, Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "color"> {
6
6
  /** Used to include or remove visited state styles. Default is true. */
7
7
  hasVisitedState?: boolean;
8
- /** ID used for accessibility purposes. */
9
- id?: string;
10
8
  /** Used to explicitly set the underline style for a text link. If true, link
11
9
  * text will always be underlined; if false, link text will only show
12
10
  * underline in hover state. */
@@ -7,8 +7,6 @@ export interface DescriptionProps {
7
7
  description: string | JSX.Element;
8
8
  }
9
9
  export interface ListProps extends Omit<BoxProps, "title"> {
10
- /** ID that other components can cross reference for accessibility purposes */
11
- id?: string;
12
10
  /** Display the list in a row. */
13
11
  inline?: boolean;
14
12
  /** Data to render if children are not passed. For `listTypes` ordered `"ol"`
@@ -35,13 +33,4 @@ export interface ListProps extends Omit<BoxProps, "title"> {
35
33
  * only display for the `Description` list type.
36
34
  */
37
35
  export declare const List: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<ListProps> & React.RefAttributes<HTMLDivElement & HTMLUListElement & HTMLOListElement>>, React.PropsWithChildren<ListProps>>;
38
- /**
39
- * Checks for `li` elements and consoles a warning if the
40
- * children are different HTML elements.
41
- */
42
- export declare const checkListChildrenError: ({ children, variant, componentName, }: {
43
- children: React.ReactNode;
44
- variant?: ListVariants;
45
- componentName?: string;
46
- }) => void;
47
36
  export default List;
@@ -4,12 +4,10 @@ import { DimensionTypes } from "../../helpers/types";
4
4
  import { logoNamesArray, logoSizesArray } from "./logoVariables";
5
5
  export type LogoNames = typeof logoNamesArray[number];
6
6
  export type LogoSizes = typeof logoSizesArray[number];
7
- export interface LogoProps extends Pick<BoxProps, "className" | keyof ChakraProps> {
7
+ export interface LogoProps extends Pick<BoxProps, "id" | "className" | keyof ChakraProps> {
8
8
  /** Logos designated as decorative will be ignored by screenreaders. False
9
9
  * by default. */
10
10
  decorative?: boolean;
11
- /** ID that other components can cross reference for accessibility purposes */
12
- id?: string;
13
11
  /** The name of the logo you want to use. */
14
12
  name?: LogoNames;
15
13
  /** Sets the logo size. */
@@ -3,8 +3,6 @@ import { IconNames } from "../Icons/Icon";
3
3
  import React from "react";
4
4
  import { SectionTypes } from "../../helpers/types";
5
5
  export interface MenuProps extends BoxProps {
6
- /** Optional ID string that other components can cross reference for accessibility purposes. */
7
- id?: string;
8
6
  /** Optional string used to identify and highlight an item when the menu opens. The value should
9
7
  * match the id associated with one of the items. */
10
8
  selectedItem?: string;
@@ -5,8 +5,6 @@ export interface BaseProps extends Omit<BoxProps, "scrollBehavior"> {
5
5
  bodyContent?: string | JSX.Element;
6
6
  /** The text to display in the modal heading, can be a string or JSX Element. */
7
7
  headingText?: string | JSX.Element;
8
- /** ID that other components can cross reference for accessibility purposes. */
9
- id?: string;
10
8
  /** Boolean to determine if the modal is open or closed. */
11
9
  isOpen?: boolean;
12
10
  }
@@ -36,11 +34,9 @@ export interface DefaultModalProps {
36
34
  }
37
35
  export type ModalTypeProps = ConfirmationModalProps | DefaultModalProps;
38
36
  export type BaseModalProps = BaseProps & ModalTypeProps;
39
- export interface ModalProps {
37
+ export interface ModalProps extends BoxProps {
40
38
  /** The text to display on the button that opens the modal. */
41
39
  buttonText?: string;
42
- /** ID that other components can cross reference for accessibility purposes */
43
- id?: string;
44
40
  /** Props to update the internal `Modal` component. This contains the
45
41
  * `bodyContent`, `headingText`, `isOpen`, and the modal type props. */
46
42
  modalProps: BaseModalProps;
@@ -31,8 +31,6 @@ export interface MultiSelectProps extends BoxProps {
31
31
  onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
32
32
  /** The action to perform for a mixed state checkbox (parent checkbox). */
33
33
  onMixedStateChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
34
- /** An ID string that other components can cross reference for accessibility purposes. */
35
- id: string;
36
34
  /** Boolean value used to control how the MultiSelect component will render
37
35
  * within the page and interact with other DOM elements. The default value is false. */
38
36
  isBlockElement?: boolean;
@@ -1,9 +1,6 @@
1
1
  /// <reference types="react" />
2
- export interface MultiSelectItemsCountButtonProps {
3
- /** An ID string that other components can cross reference for accessibility purposes. */
4
- id: string;
5
- /** The id of the MultiSelect using this button. */
6
- multiSelectId: string;
2
+ import { BoxProps } from "@chakra-ui/react";
3
+ export interface MultiSelectItemsCountButtonProps extends BoxProps {
7
4
  /** The label text rendered within the MultiSelect using this button. */
8
5
  multiSelectLabelText: string;
9
6
  /** The open status of the MultiSelect menu. */
@@ -3,8 +3,6 @@ import React from "react";
3
3
  import { LayoutTypes } from "../../helpers/types";
4
4
  import { MultiSelectWidths } from "../MultiSelect/MultiSelect";
5
5
  export interface MultiSelectGroupProps extends BoxProps {
6
- /** The id of the MultiSelectGroup. */
7
- id: string;
8
6
  /** The label text rendered within the MultiSelectGroup. */
9
7
  labelText: string;
10
8
  /** Renders the layout of `MultiSelect` components in a row or column. */
@@ -14,8 +14,6 @@ export interface NewsletterSignupProps extends Omit<BoxProps, "title"> {
14
14
  /** Appears below the input field's example text to provide any additional instructions. Accepts a string or
15
15
  * an element. */
16
16
  formHelperText?: string | JSX.Element;
17
- /** ID that other components can cross-reference for accessibility purposes */
18
- id?: string;
19
17
  /** Toggles the invalid state for the email field. */
20
18
  isInvalidEmail?: boolean;
21
19
  /** Value to determine the section color highlight. */
@@ -2,13 +2,11 @@ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  export declare const notificationVariantsArray: readonly ["standard", "announcement", "warning"];
4
4
  export type NotificationVariants = typeof notificationVariantsArray[number];
5
- interface BaseProps {
5
+ interface BaseProps extends BoxProps {
6
6
  /** Optional prop to control text alignment in `NotificationContent` */
7
7
  alignText?: boolean;
8
8
  /** Optional custom `Icon` that will override the default `Icon`. */
9
9
  icon?: JSX.Element;
10
- /** ID that other components can cross reference for accessibility purposes. */
11
- id?: string;
12
10
  /** Optional prop to control horizontal alignment of the `Notification` content */
13
11
  isCentered?: boolean;
14
12
  /** Optional content to be rendered in a `NotificationHeading` component. A
@@ -22,9 +20,9 @@ interface BaseProps {
22
20
  /** Prop to display the `Notification` icon. Defaults to `true`. */
23
21
  showIcon?: boolean;
24
22
  }
23
+ type BasePropsWithoutAlignText = Omit<BaseProps, "alignText">;
25
24
  type NotificationHeadingProps = Omit<BasePropsWithoutAlignText, "showIcon">;
26
25
  type NotificationContentProps = Omit<BaseProps, "icon">;
27
- type BasePropsWithoutAlignText = Omit<BaseProps, "alignText">;
28
26
  export interface NotificationProps extends BasePropsWithoutAlignText, BoxProps {
29
27
  /** Optional prop to control whether a `Notification` can be dismissed
30
28
  * (closed) by a user. */
@@ -9,8 +9,6 @@ export interface PaginationProps extends BoxProps {
9
9
  * to use for a link's `href` attribute. This is used when the current
10
10
  * page should refresh when navigating. */
11
11
  getPageHref?: undefined | ((pageNumber: number) => string);
12
- /** ID that other components can cross reference for accessibility purposes. */
13
- id?: string;
14
12
  /** The initially selected page (default value is 1). */
15
13
  initialPage?: number;
16
14
  /** The callback function called when an item is selected and the current