@nypl/design-system-react-components 3.6.3 → 4.0.0-alpha-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 (159) hide show
  1. package/dist/design-system-react-components.cjs +61 -64
  2. package/dist/design-system-react-components.js +22206 -24019
  3. package/dist/filteringStyleGuide/activeFiltersList.png +0 -0
  4. package/dist/filteringStyleGuide/exampleColumn.png +0 -0
  5. package/dist/filteringStyleGuide/examplePopup.png +0 -0
  6. package/dist/filteringStyleGuide/exampleRow.png +0 -0
  7. package/dist/filteringStyleGuide/filterBar.png +0 -0
  8. package/dist/filteringStyleGuide/focusClearingFilters.gif +0 -0
  9. package/dist/filteringStyleGuide/focusKeywordSearch.gif +0 -0
  10. package/dist/filteringStyleGuide/focusLiveFiltering.gif +0 -0
  11. package/dist/filteringStyleGuide/focusPagination.gif +0 -0
  12. package/dist/filteringStyleGuide/focusSorting.gif +0 -0
  13. package/dist/filteringStyleGuide/fullPageExample.png +0 -0
  14. package/dist/filteringStyleGuide/keywordSearchField.png +0 -0
  15. package/dist/filteringStyleGuide/paginationMenu.png +0 -0
  16. package/dist/filteringStyleGuide/resultsList.png +0 -0
  17. package/dist/filteringStyleGuide/sortingMenu.png +0 -0
  18. package/dist/filteringStyleGuide/totalResultsHeading.png +0 -0
  19. package/dist/responsiveGrid/breakpointRangeDesktop.png +0 -0
  20. package/dist/responsiveGrid/breakpointRangeMobileLarge.png +0 -0
  21. package/dist/responsiveGrid/breakpointRangeMobileSmall.png +0 -0
  22. package/dist/responsiveGrid/breakpointRangeTabletLarge.png +0 -0
  23. package/dist/responsiveGrid/breakpointRangeTabletSmall.png +0 -0
  24. package/dist/responsiveGrid/cardGridDesktop4Cols.png +0 -0
  25. package/dist/responsiveGrid/cardGridLargeMobile1Col.png +0 -0
  26. package/dist/responsiveGrid/cardGridLargeMobile2Cols.png +0 -0
  27. package/dist/responsiveGrid/cardGridSmallMobile1Col.png +0 -0
  28. package/dist/responsiveGrid/cardGridSmallTablet1Col.png +0 -0
  29. package/dist/responsiveGrid/cardGridSmallTablet3Cols.png +0 -0
  30. package/dist/responsiveGrid/cardGridSmallTablet3ColsSidebar.png +0 -0
  31. package/dist/responsiveGrid/gridColumns.png +0 -0
  32. package/dist/responsiveGrid/gridGutters.png +0 -0
  33. package/dist/responsiveGrid/gridMargins.png +0 -0
  34. package/dist/responsiveGrid/gridPerceivedColumns1.png +0 -0
  35. package/dist/responsiveGrid/gridPerceivedColumns2.png +0 -0
  36. package/dist/responsiveGrid/gridPerceivedColumns3.png +0 -0
  37. package/dist/responsiveGrid/gridPerceivedColumns4.png +0 -0
  38. package/dist/src/components/Accordion/Accordion.d.ts +2 -5
  39. package/dist/src/components/AlphabetFilter/AlphabetFilter.d.ts +2 -4
  40. package/dist/src/components/AudioPlayer/AudioPlayer.d.ts +2 -4
  41. package/dist/src/components/Banner/Banner.d.ts +6 -12
  42. package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +3 -5
  43. package/dist/src/components/Button/Button.d.ts +6 -12
  44. package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +2 -4
  45. package/dist/src/components/Card/Card.d.ts +2 -4
  46. package/dist/src/components/Checkbox/Checkbox.d.ts +3 -10
  47. package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +2 -4
  48. package/dist/src/components/ComponentWrapper/ComponentWrapper.d.ts +2 -5
  49. package/dist/src/components/DatePicker/DatePicker.d.ts +2 -4
  50. package/dist/src/components/FeaturedContent/FeaturedContent.d.ts +3 -5
  51. package/dist/src/components/FeedbackBox/FeedbackBox.d.ts +2 -4
  52. package/dist/src/components/Fieldset/Fieldset.d.ts +2 -4
  53. package/dist/src/components/FilterBarInline/FilterBarInline.d.ts +2 -4
  54. package/dist/src/components/FilterBarPopup/FilterBarPopup.d.ts +2 -4
  55. package/dist/src/components/Form/Form.d.ts +4 -12
  56. package/dist/src/components/Grid/SimpleGrid.d.ts +2 -4
  57. package/dist/src/components/Heading/Heading.d.ts +4 -6
  58. package/dist/src/components/HelperErrorText/HelperErrorText.d.ts +2 -16
  59. package/dist/src/components/Hero/Hero.d.ts +7 -11
  60. package/dist/src/components/HorizontalRule/HorizontalRule.d.ts +2 -4
  61. package/dist/src/components/Icons/Icon.d.ts +2 -5
  62. package/dist/src/components/Icons/IconSvgs.d.ts +0 -3
  63. package/dist/src/components/Icons/iconVariables.d.ts +2 -2
  64. package/dist/src/components/Image/Image.d.ts +2 -10
  65. package/dist/src/components/Label/Label.d.ts +3 -7
  66. package/dist/src/components/Link/Link.d.ts +8 -16
  67. package/dist/src/components/List/List.d.ts +7 -5
  68. package/dist/src/components/Logo/Logo.d.ts +2 -4
  69. package/dist/src/components/Menu/Menu.d.ts +2 -4
  70. package/dist/src/components/Modal/Modal.d.ts +4 -3
  71. package/dist/src/components/MultiSelect/MultiSelect.d.ts +2 -2
  72. package/dist/src/components/MultiSelectGroup/MultiSelectGroup.d.ts +2 -4
  73. package/dist/src/components/NewsletterSignup/NewsletterSignup.d.ts +5 -8
  74. package/dist/src/components/Notification/Notification.d.ts +2 -8
  75. package/dist/src/components/Pagination/Pagination.d.ts +2 -4
  76. package/dist/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -4
  77. package/dist/src/components/Radio/Radio.d.ts +3 -9
  78. package/dist/src/components/RadioGroup/RadioGroup.d.ts +2 -4
  79. package/dist/src/components/SearchBar/SearchBar.d.ts +3 -11
  80. package/dist/src/components/Select/Select.d.ts +2 -12
  81. package/dist/src/components/SkeletonLoader/SkeletonLoader.d.ts +2 -4
  82. package/dist/src/components/SkipNavigation/SkipNavigation.d.ts +2 -4
  83. package/dist/src/components/Slider/Slider.d.ts +3 -5
  84. package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +4 -6
  85. package/dist/src/components/StatusBadge/StatusBadge.d.ts +4 -11
  86. package/dist/src/components/StructuredContent/StructuredContent.d.ts +2 -4
  87. package/dist/src/components/StyledList/StyledList.d.ts +3 -7
  88. package/dist/src/components/SubNav/SubNav.d.ts +4 -8
  89. package/dist/src/components/Table/Table.d.ts +3 -5
  90. package/dist/src/components/Tabs/Tabs.d.ts +2 -2
  91. package/dist/src/components/TagSet/TagSet.d.ts +2 -4
  92. package/dist/src/components/Template/Template.d.ts +38 -117
  93. package/dist/src/components/Text/Text.d.ts +2 -6
  94. package/dist/src/components/TextInput/TextInput.d.ts +8 -31
  95. package/dist/src/components/Toggle/Toggle.d.ts +3 -8
  96. package/dist/src/components/Tooltip/Tooltip.d.ts +2 -6
  97. package/dist/src/components/VideoPlayer/VideoPlayer.d.ts +2 -4
  98. package/dist/src/hooks/useMultiSelect.d.ts +5 -1
  99. package/dist/src/hooks/useNYPLBreakpoints.d.ts +6 -1
  100. package/dist/src/hooks/useResponsiveSpacing.d.ts +23 -0
  101. package/dist/src/index.d.ts +6 -7
  102. package/dist/src/theme/components/breadcrumb.d.ts +1 -1
  103. package/dist/src/theme/components/button.d.ts +1 -4
  104. package/dist/src/theme/components/heading.d.ts +1 -125
  105. package/dist/src/theme/components/hero.d.ts +11 -11
  106. package/dist/src/theme/components/link.d.ts +1 -40
  107. package/dist/src/theme/components/newsletterSignup.d.ts +3 -3
  108. package/dist/src/theme/components/notification.d.ts +1 -4
  109. package/dist/src/theme/components/progressIndicator.d.ts +1 -2
  110. package/dist/src/theme/components/slider.d.ts +8 -4
  111. package/dist/src/theme/components/statusBadge.d.ts +1 -14
  112. package/dist/src/theme/components/structuredContent.d.ts +2 -5
  113. package/dist/src/theme/components/{customTable.d.ts → table.d.ts} +6 -6
  114. package/dist/src/theme/components/template.d.ts +49 -125
  115. package/dist/src/theme/components/text.d.ts +1 -9
  116. package/dist/src/theme/foundations/breakpoints.d.ts +21 -8
  117. package/dist/src/theme/sharedTypes.d.ts +4 -0
  118. package/dist/src/utils/utils.d.ts +8 -1
  119. package/dist/styles.css +1 -1
  120. package/dist/template/templateBottom.png +0 -0
  121. package/dist/template/templateBreakout.png +0 -0
  122. package/dist/template/templateFluidColumns1.png +0 -0
  123. package/dist/template/templateFluidColumns2.png +0 -0
  124. package/dist/template/templateFluidColumns3.png +0 -0
  125. package/dist/template/templateFluidColumns4.png +0 -0
  126. package/dist/template/templateFullPageLayout.png +0 -0
  127. package/dist/template/templateMain.png +0 -0
  128. package/dist/template/templateMainNarrow.png +0 -0
  129. package/dist/template/templateMainWide.png +0 -0
  130. package/dist/template/templateSidebarLeft.png +0 -0
  131. package/dist/template/templateSidebarNone.png +0 -0
  132. package/dist/template/templateSidebarRight.png +0 -0
  133. package/dist/template/templateTop.png +0 -0
  134. package/package.json +1 -1
  135. package/dist/src/components/Header/Header.d.ts +0 -13
  136. package/dist/src/components/Header/components/HeaderLogin.d.ts +0 -12
  137. package/dist/src/components/Header/components/HeaderLoginButton.d.ts +0 -10
  138. package/dist/src/components/Header/components/HeaderLowerNav.d.ts +0 -6
  139. package/dist/src/components/Header/components/HeaderMobileIconNav.d.ts +0 -6
  140. package/dist/src/components/Header/components/HeaderMobileNav.d.ts +0 -6
  141. package/dist/src/components/Header/components/HeaderMobileNavButton.d.ts +0 -6
  142. package/dist/src/components/Header/components/HeaderSearchButton.d.ts +0 -9
  143. package/dist/src/components/Header/components/HeaderSearchForm.d.ts +0 -10
  144. package/dist/src/components/Header/components/HeaderSitewideAlerts.d.ts +0 -7
  145. package/dist/src/components/Header/components/HeaderUpperNav.d.ts +0 -7
  146. package/dist/src/components/Header/context/headerContext.d.ts +0 -13
  147. package/dist/src/components/Header/utils/encoreCatalogLogOutTimer.d.ts +0 -4
  148. package/dist/src/components/Header/utils/headerUtils.d.ts +0 -70
  149. package/dist/src/theme/components/header.d.ts +0 -100
  150. package/dist/src/theme/components/headerLogin.d.ts +0 -333
  151. package/dist/src/theme/components/headerLoginButton.d.ts +0 -72
  152. package/dist/src/theme/components/headerLowerNav.d.ts +0 -78
  153. package/dist/src/theme/components/headerMobileIconNav.d.ts +0 -28
  154. package/dist/src/theme/components/headerMobileNav.d.ts +0 -92
  155. package/dist/src/theme/components/headerMobileNavButton.d.ts +0 -36
  156. package/dist/src/theme/components/headerSearchButton.d.ts +0 -85
  157. package/dist/src/theme/components/headerSearchForm.d.ts +0 -185
  158. package/dist/src/theme/components/headerSitewideAlerts.d.ts +0 -43
  159. package/dist/src/theme/components/headerUpperNav.d.ts +0 -60
@@ -1,4 +1,4 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  export type AccordionTypes = "default" | "warning" | "error";
4
4
  export interface AccordionDataProps {
@@ -9,12 +9,9 @@ export interface AccordionDataProps {
9
9
  label: string | JSX.Element;
10
10
  panel: string | React.ReactNode;
11
11
  }
12
- export interface AccordionProps {
12
+ export interface AccordionProps extends Omit<BoxProps, "onChange"> {
13
13
  /** Array of data to display, and an optional accordionType */
14
14
  accordionData: AccordionDataProps[];
15
- /** Global aria-label value that is applied to all accordions if individual
16
- * ariaLabel props are not included with accordionData entries. */
17
- ariaLabel?: string;
18
15
  /** ID that other components can cross reference for accessibility purposes */
19
16
  id?: string;
20
17
  /** Whether the accordion is open by default only on its initial rendering */
@@ -1,11 +1,9 @@
1
1
  import React from "react";
2
- import { ChakraComponent } from "@chakra-ui/react";
3
- export interface AlphabetFilterProps {
2
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
3
+ export interface AlphabetFilterProps extends Omit<BoxProps, "onClick"> {
4
4
  /** Array of letters to specify which `Button` components should be set in an `enabled`
5
5
  * state. By default, all buttons are `enabled`. */
6
6
  activeLetters?: string[];
7
- /** A class name for the AlphabetFilter parent div. */
8
- className?: string;
9
7
  /** The currentLetter can be used to programatically set the selected letter without the
10
8
  * user explicitly requesting it. */
11
9
  currentLetter?: string;
@@ -1,13 +1,11 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  declare const thirdPartyServices: readonly ["libsyn", "soundcloud", "spotify"];
4
4
  export type ThirdPartyAudioType = typeof thirdPartyServices[number];
5
5
  export type AudioType = ThirdPartyAudioType | "file";
6
- export interface AudioPlayerProps {
6
+ export interface AudioPlayerProps extends BoxProps {
7
7
  /** Required string used to specify the type of audio playback. */
8
8
  audioType: AudioType;
9
- /** Optional className you can add in addition to `audio-player`. */
10
- className?: string;
11
9
  /** Optional string to set the text for the audio player description. */
12
10
  descriptionText?: string;
13
11
  /** Optional string to set a code snippet provided by Libsyn, SoundCloud or Spotify; the
@@ -1,19 +1,13 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
- export declare const bannerTypesArray: readonly ["informative", "negative", "neutral", "positive", "recommendation", "warning"];
4
- export type BannerTypes = typeof bannerTypesArray[number];
5
- export declare const bannerBgColorsArray: readonly ["brand.primary-05", "section.blogs.primary-05", "section.books-and-more.primary-05", "section.connect.primary-05", "section.education.primary-05", "section.locations.primary-05", "section.research.primary-05", "section.research-library.lpa-05", "section.research-library.schomburg-05", "section.research-library.schwarzman-05", "section.whats-on.primary-05", "dark.brand.primary-05", "dark.section.blogs.primary-05", "dark.section.books-and-more.primary-05", "dark.section.connect.primary-05", "dark.section.education.primary-05", "dark.section.locations.primary-05", "dark.section.research.secondary-05", "dark.section.research-library.lpa-05", "dark.section.research-library.schomburg-05", "dark.section.research-library.schwarzman-05", "dark.section.whats-on.primary-05"];
6
- export type BannerBgColors = typeof bannerBgColorsArray[number];
7
- export declare const bannerHighlightColorsArray: readonly ["brand.primary", "section.blogs.primary", "section.books-and-more.primary", "section.connect.primary", "section.education.primary", "section.locations.primary", "section.research.primary", "section.research-library-lpa.primary", "section.research-library-schomburg.primary", "section.research-library-schwarzman.primary", "section.whats-on.primary", "dark.brand.primary", "dark.section.blogs.primary", "dark.section.books-and-more.primary", "dark.section.connect.primary", "dark.section.education.primary", "dark.section.locations.primary", "dark.section.research.secondary", "dark.section.research-library-lpa.primary", "dark.section.research-library-schomburg.primary", "dark.section.research-library-schwarzman.primary", "dark.section.whats-on.primary"];
8
- export type BannerHighlightColors = typeof bannerHighlightColorsArray[number];
9
- export interface BannerProps {
10
- /** Label used to describe the `Banner`'s aside HTML element. */
11
- ariaLabel?: string;
3
+ import { messageVariantsArray, bgColorsArray, highlightColorsArray } from "../../theme/sharedTypes";
4
+ export type BannerTypes = typeof messageVariantsArray[number];
5
+ export type BannerBgColors = typeof bgColorsArray[number];
6
+ export type BannerHighlightColors = typeof highlightColorsArray[number];
7
+ export interface BannerProps extends Omit<BoxProps, "content"> {
12
8
  /** Used to set the color of the background for the full component.
13
9
  * Refer to how color values are defined and typed in the DS Icon component. */
14
10
  backgroundColor?: BannerBgColors;
15
- /** Additional `className` to add. */
16
- className?: string;
17
11
  /** Used to populate the body content of the component. */
18
12
  content: string | JSX.Element;
19
13
  /** Used to populate the heading element within the component. A string
@@ -1,4 +1,4 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  export declare const breadcrumbTypeArray: readonly ["blogs", "booksAndMore", "brand", "connect", "digitalCollections", "education", "locations", "research", "whatsOn"];
4
4
  export type BreadcrumbsTypes = typeof breadcrumbTypeArray[number];
@@ -7,17 +7,15 @@ export interface BreadcrumbsDataProps {
7
7
  text: string | React.ReactNode;
8
8
  linkProps?: any;
9
9
  }
10
- export interface BreadcrumbProps {
10
+ export interface BreadcrumbProps extends BoxProps {
11
11
  /** Breadcrumb links as an array */
12
12
  breadcrumbsData: BreadcrumbsDataProps[];
13
13
  /** Used to control how the `Hero` component will be rendered. */
14
14
  breadcrumbsType?: BreadcrumbsTypes;
15
- /** className you can add in addition to 'input' */
16
- className?: string;
17
15
  /** ID that other components can cross reference for accessibility purposes */
18
16
  id?: string;
19
17
  /** Custom Link component for apps with internal routing, defaults to BreadcrumbLink if not passed */
20
- customLinkComponent?: any;
18
+ customLinkComponent?: React.ElementType;
21
19
  }
22
20
  /**
23
21
  * The `Breadcrumbs` component is a navigation element that provides a
@@ -1,16 +1,14 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
2
- import React from "react";
1
+ import { BoxProps, ChakraComponent, ChakraProps } from "@chakra-ui/react";
2
+ import { sizesArray } from "../../theme/sharedTypes";
3
+ import React, { ButtonHTMLAttributes } from "react";
3
4
  export declare const buttonElementTypeArray: readonly ["submit", "button", "reset"];
4
- export declare const buttonSizesArray: readonly ["small", "medium", "large"];
5
- export declare const buttonTypesArray: readonly ["primary", "secondary", "text", "callout", "pill", "noBrand", "link"];
5
+ export declare const buttonTypesArray: readonly ["primary", "secondary", "text", "callout", "pill", "noBrand"];
6
6
  export type ButtonElementType = typeof buttonElementTypeArray[number];
7
- export type ButtonSizes = typeof buttonSizesArray[number];
7
+ export type ButtonSizes = typeof sizesArray[number];
8
8
  export type ButtonTypes = typeof buttonTypesArray[number];
9
- export interface ButtonProps {
9
+ export interface ButtonProps extends Pick<BoxProps, keyof ChakraProps>, Omit<ButtonHTMLAttributes<HTMLButtonElement>, "color"> {
10
10
  /** The button variation to render based on the `ButtonTypes` type. */
11
11
  buttonType?: ButtonTypes;
12
- /** Additional className to use. */
13
- className?: string;
14
12
  /** ID that other components can cross reference for accessibility purposes. */
15
13
  id: string;
16
14
  /** Adds 'disabled' property to the button. */
@@ -18,14 +16,10 @@ export interface ButtonProps {
18
16
  /** Trigger the Button's action through the `mouseDown` event handler instead
19
17
  * of `onClick`. `false` by default. */
20
18
  mouseDown?: boolean;
21
- /** The action to perform on the `<button>`'s onClick function. */
22
- onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
23
19
  /** Visibly hidden text that will only be read by screenreaders. */
24
20
  screenreaderOnlyText?: string;
25
21
  /** The size of the `Button`. */
26
22
  size?: ButtonSizes;
27
- /** The HTML button type attribute. */
28
- type?: ButtonElementType;
29
23
  }
30
24
  /**
31
25
  * Renders a simple `button` element with custom variant styles.
@@ -1,13 +1,11 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  import { LayoutTypes } from "../../helpers/types";
4
4
  export declare const buttonGroupWidthsArray: readonly ["default", "full"];
5
5
  export type ButtonGroupWidths = typeof buttonGroupWidthsArray[number];
6
- export interface ButtonGroupProps {
6
+ export interface ButtonGroupProps extends BoxProps {
7
7
  /** Sets the width to "default" (for "fit-content") or "full". */
8
8
  buttonWidth?: ButtonGroupWidths;
9
- /** Additional className to use. */
10
- className?: string;
11
9
  /** ID that other components can cross reference for accessibility purposes. */
12
10
  id?: string;
13
11
  /** Set's the disabled state to all the internal `Button` components. */
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { ChakraComponent } from "@chakra-ui/react";
2
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
3
3
  import { LayoutTypes } from "../../helpers/types";
4
4
  import { ComponentImageProps } from "../Image/Image";
5
5
  interface CardBaseProps {
@@ -9,9 +9,7 @@ interface CardBaseProps {
9
9
  * Default is `"column"`. */
10
10
  layout?: LayoutTypes;
11
11
  }
12
- interface CardWrapperProps {
13
- /** Optional CSS class name to add. */
14
- className?: string;
12
+ interface CardWrapperProps extends BoxProps {
15
13
  /** ID that other components can cross reference for accessibility purposes. */
16
14
  id?: string;
17
15
  /** Main link to use when the full `Card` component should be clickable. */
@@ -1,5 +1,5 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
2
- import React from "react";
1
+ import { BoxProps, ChakraComponent, ChakraProps } from "@chakra-ui/react";
2
+ import React, { InputHTMLAttributes } from "react";
3
3
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
4
4
  interface CheckboxIconProps {
5
5
  /** When using the Checkbox as a "controlled" form element, you can specify
@@ -10,9 +10,7 @@ interface CheckboxIconProps {
10
10
  /** Adds the indeterminate state to the `Checkbox`. */
11
11
  isIndeterminate?: boolean;
12
12
  }
13
- export interface CheckboxProps extends CheckboxIconProps {
14
- /** className you can add in addition to 'input' */
15
- className?: string;
13
+ export interface CheckboxProps extends Pick<BoxProps, keyof ChakraProps>, CheckboxIconProps, Omit<InputHTMLAttributes<HTMLInputElement>, "color" | "height" | "width"> {
16
14
  /** Optional string to populate the HelperErrorText for standard state */
17
15
  helperText?: HelperErrorTextType;
18
16
  /** ID that other components can cross reference for accessibility purposes */
@@ -31,11 +29,6 @@ export interface CheckboxProps extends CheckboxIconProps {
31
29
  /** The checkbox's label. This will serve as the text content for a `<label>`
32
30
  * element if `showlabel` is true, or an "aria-label" if `showLabel` is false. */
33
31
  labelText: string | JSX.Element;
34
- /** The name prop indicates into which group of checkboxes this checkbox
35
- * belongs. If none is specified, 'default' will be used */
36
- name?: string;
37
- /** The action to perform on the `<input>`'s onChange function */
38
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
39
32
  /** Offers the ability to hide the helper/invalid text. */
40
33
  showHelperInvalidText?: boolean;
41
34
  /** Offers the ability to show the checkbox's label onscreen or hide it.
@@ -1,10 +1,8 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
4
4
  import { LayoutTypes } from "../../helpers/types";
5
- export interface CheckboxGroupProps {
6
- /** Any child node passed to the component. */
7
- children: React.ReactNode;
5
+ export interface CheckboxGroupProps extends Omit<BoxProps, "onChange"> {
8
6
  /** Populates the initial value of the input */
9
7
  defaultValue?: string[];
10
8
  /** Optional string to populate the HelperErrorText for standard state */
@@ -1,10 +1,7 @@
1
+ import { BoxProps } from "@chakra-ui/react";
1
2
  import React from "react";
2
3
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
- export interface ComponentWrapperProps {
4
- /** The UI elements that will be wrapped by this component */
5
- children: React.ReactNode;
6
- /** A class name for the `div` parent element. */
7
- className?: string;
4
+ export interface ComponentWrapperProps extends BoxProps {
8
5
  /** Optional string to set the text for the component's description */
9
6
  descriptionText?: string | JSX.Element;
10
7
  /** Optional string value used to set the text for a `Heading` component, or
@@ -1,4 +1,4 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
4
4
  import { InputProps, TextInputRefType } from "../TextInput/TextInput";
@@ -17,9 +17,7 @@ interface DateRangeRowProps {
17
17
  /** Whether to render a single date input or two for a range of two dates. */
18
18
  isDateRange?: boolean;
19
19
  }
20
- interface DatePickerWrapperProps extends DateRangeRowProps {
21
- /** Additional className. */
22
- className?: string;
20
+ interface DatePickerWrapperProps extends Omit<BoxProps, "id" | "onChange">, DateRangeRowProps {
23
21
  /** Adds the 'required' property to the input element(s). */
24
22
  isRequired?: boolean;
25
23
  /** Passed to the `TextInput` component to render a label associated with an input field. */
@@ -1,19 +1,17 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  import { ImageProps } from "../Image/Image";
4
4
  export declare const featuredContentWidthArray: string[];
5
5
  export type FeaturedContentWidthType = typeof featuredContentWidthArray[number];
6
6
  export declare const featuredContentPositionArray: readonly ["start", "end"];
7
7
  export type FeaturedContentPositionType = typeof featuredContentPositionArray[number];
8
- export interface FeaturedContentImageProps extends ImageProps {
8
+ export interface FeaturedContentImageProps extends Omit<ImageProps, "position"> {
9
9
  /** String value that specifies the width of the image rendered within the component. */
10
10
  width?: FeaturedContentWidthType;
11
11
  /** String value that specifies the position of the image rendered within the component. */
12
12
  position?: FeaturedContentPositionType;
13
13
  }
14
- export interface FeaturedContentProps {
15
- /** Optional CSS class name to add. */
16
- className?: string;
14
+ export interface FeaturedContentProps extends BoxProps {
17
15
  /** ID that other components can cross reference for accessibility purposes. */
18
16
  id?: string;
19
17
  /** The text content rendered in the component. DS components and native HTML can be passed in this prop. */
@@ -1,10 +1,8 @@
1
1
  /// <reference types="react" />
2
- import { ChakraComponent } from "@chakra-ui/react";
2
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
3
3
  export declare const feedbackBoxViewTypeArray: readonly ["form", "confirmation", "error"];
4
4
  export type FeedbackBoxViewType = typeof feedbackBoxViewTypeArray[number];
5
- export interface FeedbackBoxProps {
6
- /** Additional class name to add. */
7
- className?: string;
5
+ export interface FeedbackBoxProps extends Omit<BoxProps, "onSubmit"> {
8
6
  /** Used to add additional information to the default confirmation message in
9
7
  * the confirmation view. */
10
8
  confirmationText?: string | JSX.Element;
@@ -1,8 +1,6 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
- export interface FieldsetProps {
4
- /** Additional class name to add. */
5
- className?: string;
3
+ export interface FieldsetProps extends BoxProps {
6
4
  /** ID that other components can cross reference for accessibility purposes */
7
5
  id: string;
8
6
  /** Flag to show or hide the text in the `legend` element. False by default. */
@@ -1,11 +1,9 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  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
- export interface FilterBarInlineProps {
7
- /** The className of the FilterBarInline. */
8
- className?: string;
6
+ export interface FilterBarInlineProps extends BoxProps {
9
7
  /** ID that other components can cross reference for accessibility purposes. */
10
8
  id?: string;
11
9
  /** Optional string value used to set the text for a `Heading` component, or
@@ -1,11 +1,9 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  import { LayoutTypes } from "../../helpers/types";
4
4
  import { MultiSelectWidths } from "../MultiSelect/MultiSelect";
5
5
  import { FilterBarItemsType } from "../FilterBarInline/FilterBarInline";
6
- export interface FilterBarPopupProps {
7
- /** The className of the FilterBarInline. */
8
- className?: string;
6
+ export interface FilterBarPopupProps extends BoxProps {
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
  */
@@ -1,9 +1,7 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
2
- import React from "react";
1
+ import { BoxProps, ChakraComponent, ChakraProps } from "@chakra-ui/react";
2
+ import React, { FormHTMLAttributes } from "react";
3
3
  import { GridGaps } from "../Grid/SimpleGrid";
4
- interface FormBaseProps {
5
- /** className to be applied to FormRow, FormField, and Form */
6
- className?: string;
4
+ interface FormBaseProps extends Pick<BoxProps, "className" | keyof ChakraProps> {
7
5
  /** Optional spacing size; if omitted, the default `large` (2rem / 32px)
8
6
  * spacing will be used; ```IMPORTANT: for general form layout, this prop
9
7
  * should not be used``` */
@@ -13,13 +11,7 @@ interface FormBaseProps {
13
11
  }
14
12
  export interface FormChildProps extends Partial<FormBaseProps> {
15
13
  }
16
- export interface FormProps extends FormBaseProps {
17
- /** Optional form `action` attribute */
18
- action?: string;
19
- /** Optional form `method` attribute */
20
- method?: "get" | "post";
21
- /** Function to call for the `onSubmit` form event. */
22
- onSubmit?: (e: React.FormEvent<any>) => void;
14
+ export interface FormProps extends FormBaseProps, Omit<FormHTMLAttributes<HTMLFormElement>, "color" | "id"> {
23
15
  }
24
16
  /** FormRow child-component */
25
17
  export declare const FormRow: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<FormChildProps> & React.RefAttributes<HTMLDivElement>>, FormChildProps>;
@@ -1,10 +1,8 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  export declare const gridGapsArray: readonly ["grid.xxs", "grid.xs", "grid.s", "grid.m", "grid.l", "grid.xl", "grid.xxl"];
4
4
  export type GridGaps = typeof gridGapsArray[number];
5
- export interface SimpleGridProps {
6
- /** Additional class name. */
7
- className?: string;
5
+ export interface SimpleGridProps extends BoxProps {
8
6
  /** Optional numeric value to override the default column count; the default
9
7
  * column count is 3. */
10
8
  columns?: number;
@@ -1,12 +1,10 @@
1
- import { ChakraComponent, HeadingProps as ChakraHeadingProps } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
- export declare const headingSizesArray: readonly ["display1", "heading1", "heading2", "heading3", "heading4", "heading5", "heading6", "heading7", "heading8", "primary", "secondary", "tertiary", "callout"];
4
- export declare const headingLevelsArray: readonly ["h1", "h2", "h3", "h4", "h5", "h6", "one", "two", "three", "four", "five", "six"];
3
+ export declare const headingSizesArray: readonly ["display1", "heading1", "heading2", "heading3", "heading4", "heading5", "heading6", "heading7", "heading8"];
4
+ export declare const headingLevelsArray: readonly ["h1", "h2", "h3", "h4", "h5", "h6"];
5
5
  export type HeadingSizes = typeof headingSizesArray[number];
6
6
  export type HeadingLevels = typeof headingLevelsArray[number];
7
- export interface HeadingProps extends ChakraHeadingProps {
8
- /** Optional className that appears in addition to `heading` */
9
- className?: string;
7
+ export interface HeadingProps extends BoxProps {
10
8
  /** Optional ID that other components can cross reference for accessibility
11
9
  * purposes */
12
10
  id?: string;
@@ -1,21 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { ChakraComponent } from "@chakra-ui/react";
3
- export type AriaLiveValues = "assertive" | "off" | "polite" | undefined;
2
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
4
3
  export type HelperErrorTextType = string | JSX.Element;
5
- export interface HelperErrorTextProps {
6
- /** Aria attribute. When true, assistive technologies will read the entire
7
- * DOM element. When false, only changes (additionals or removals) will be
8
- * read. True by default. */
9
- ariaAtomic?: boolean;
10
- /** Aria attribute used to handle live updates for the helper and error text.
11
- * This indicates the priority of the text and when it should be presented to
12
- * users using screen readers; "off" indicates that the content should not be
13
- * presented, "polite" that it will be announced at the next available time
14
- * slot, and "assertive" that it should be announced immediately. This is set
15
- * to "polite" by default. */
16
- ariaLive?: AriaLiveValues;
17
- /** Additional className to add. */
18
- className?: string;
4
+ export interface HelperErrorTextProps extends BoxProps {
19
5
  /** Unique ID for accessibility purposes. */
20
6
  id?: string;
21
7
  /** Toggles between helper and invalid styling. */
@@ -1,10 +1,9 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  import { ComponentImageProps } from "../Image/Image";
4
- export declare const heroTypesArray: readonly ["primary", "secondary", "secondaryBooksAndMore", "secondaryLocations", "secondaryResearch", "secondaryWhatsOn", "tertiary", "campaign", "fiftyFifty"];
4
+ export declare const heroTypesArray: readonly ["primary", "tertiary", "campaign"];
5
5
  export type HeroTypes = typeof heroTypesArray[number];
6
- export declare const heroSecondaryTypes: string[];
7
- export interface HeroImageProps extends Pick<ComponentImageProps, "alt" | "fallbackSrc" | "id" | "src" | "onError" | "component"> {
6
+ export interface HeroImageProps extends Omit<BoxProps, "onError">, Pick<ComponentImageProps, "alt" | "fallbackSrc" | "id" | "src" | "onError" | "component"> {
8
7
  }
9
8
  export interface HeroProps {
10
9
  /**
@@ -32,10 +31,10 @@ export interface HeroProps {
32
31
  /** ID that other components can cross reference for accessibility purposes. */
33
32
  id?: string;
34
33
  /** Object used to create and render the `Image` component. You can pass `component`
35
- * (with its own internal props, which will override) or `src`, `alt`, `id`, `fallBackSrc`, and `onError`.
36
- * If `imageProps.alt` is left blank, a warning will be logged to the console and
37
- * will cause accessibility issues. For `imageProps.src`, it will only work for
38
- * the "secondary", "fiftyFifty" and "campaign" `Hero` types. */
34
+ * (with its own internal props, which will override) or `src`, `alt`, `id`,
35
+ * `fallBackSrc`, and `onError`. If `imageProps.alt` is left blank, a warning
36
+ * will be logged to the console and will cause accessibility issues. For
37
+ * `imageProps.src`, it will only work for the "campaign" `Hero` type. */
39
38
  imageProps?: HeroImageProps;
40
39
  /** Optional boolean used to toggle the default text color from light to dark.
41
40
  * Set isDarkText to `true` if the backgroundColor is set to a light color. */
@@ -44,9 +43,6 @@ export interface HeroProps {
44
43
  * the "campaign" variant. If true, the background image will be converted to
45
44
  * black & white and darkened to 60% black. */
46
45
  isDarkBackgroundImage?: boolean;
47
- /** Optional details area that contains location data.
48
- * Note: not all `Hero` variations utilize this prop. */
49
- locationDetails?: JSX.Element;
50
46
  /** Optional string used for the subheader that displays
51
47
  * underneath the heading element. */
52
48
  subHeaderText?: string | JSX.Element;
@@ -1,12 +1,10 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
- export interface HorizontalRuleProps {
3
+ export interface HorizontalRuleProps extends BoxProps {
4
4
  /** Optional alignment value to align the horizontal rule to one side or the
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
- /** ClassName you can add in addition to `horizontal-rule` */
9
- className?: string;
10
8
  /** ID that other components can cross reference for accessibility purposes. */
11
9
  id?: string;
12
10
  }
@@ -1,18 +1,15 @@
1
- import { ChakraComponent } from "@chakra-ui/react";
1
+ import { BoxProps, ChakraProps, ChakraComponent } from "@chakra-ui/react";
2
2
  import React from "react";
3
3
  import { iconAlignArray, iconColorsArray, iconNamesArray, iconRotationsArray, iconSizesArray, iconTypesArray } from "./iconVariables";
4
4
  export type IconAlign = typeof iconAlignArray[number];
5
5
  export type IconColors = typeof iconColorsArray[number];
6
6
  export type IconNames = typeof iconNamesArray[number];
7
7
  export type IconRotations = typeof iconRotationsArray[number];
8
- export type IconRotationTypes = typeof iconRotationsArray[number];
9
8
  export type IconSizes = typeof iconSizesArray[number];
10
9
  export type IconTypes = typeof iconTypesArray[number];
11
- export interface IconProps {
10
+ export interface IconProps extends Pick<BoxProps, "className" | keyof ChakraProps> {
12
11
  /** Aligns the icon. */
13
12
  align?: IconAlign;
14
- /** Optional className that will be added to the parent element */
15
- className?: string;
16
13
  /** Overrides default icon color (black). */
17
14
  color?: IconColors;
18
15
  /** Icons designated as decorative will be ignored by screenreaders. True
@@ -10,10 +10,8 @@ declare const _default: {
10
10
  actionHome: any;
11
11
  actionIdentity: any;
12
12
  actionIdentityFilled: any;
13
- actionInfo: any;
14
13
  actionLaunch: any;
15
14
  actionLightbulb: any;
16
- actionList: any;
17
15
  actionLockClosed: any;
18
16
  actionPayment: any;
19
17
  actionPower: any;
@@ -59,7 +57,6 @@ declare const _default: {
59
57
  minus: any;
60
58
  moonCrescent: any;
61
59
  navigationMoreVert: any;
62
- navigationApps: any;
63
60
  navigationSubdirectoryArrowLeft: any;
64
61
  navigationSubdirectoryArrowRight: any;
65
62
  plus: any;