@nypl/design-system-react-components 3.6.3 → 4.0.0-alpha-rc2
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.
- package/dist/design-system-react-components.cjs +61 -64
- package/dist/design-system-react-components.js +36164 -37998
- package/dist/filteringStyleGuide/activeFiltersList.png +0 -0
- package/dist/filteringStyleGuide/exampleColumn.png +0 -0
- package/dist/filteringStyleGuide/examplePopup.png +0 -0
- package/dist/filteringStyleGuide/exampleRow.png +0 -0
- package/dist/filteringStyleGuide/filterBar.png +0 -0
- package/dist/filteringStyleGuide/focusClearingFilters.gif +0 -0
- package/dist/filteringStyleGuide/focusKeywordSearch.gif +0 -0
- package/dist/filteringStyleGuide/focusLiveFiltering.gif +0 -0
- package/dist/filteringStyleGuide/focusPagination.gif +0 -0
- package/dist/filteringStyleGuide/focusSorting.gif +0 -0
- package/dist/filteringStyleGuide/fullPageExample.png +0 -0
- package/dist/filteringStyleGuide/keywordSearchField.png +0 -0
- package/dist/filteringStyleGuide/paginationMenu.png +0 -0
- package/dist/filteringStyleGuide/resultsList.png +0 -0
- package/dist/filteringStyleGuide/sortingMenu.png +0 -0
- package/dist/filteringStyleGuide/totalResultsHeading.png +0 -0
- package/dist/responsiveGrid/breakpointRangeDesktop.png +0 -0
- package/dist/responsiveGrid/breakpointRangeMobileLarge.png +0 -0
- package/dist/responsiveGrid/breakpointRangeMobileSmall.png +0 -0
- package/dist/responsiveGrid/breakpointRangeTabletLarge.png +0 -0
- package/dist/responsiveGrid/breakpointRangeTabletSmall.png +0 -0
- package/dist/responsiveGrid/cardGridDesktop4Cols.png +0 -0
- package/dist/responsiveGrid/cardGridLargeMobile1Col.png +0 -0
- package/dist/responsiveGrid/cardGridLargeMobile2Cols.png +0 -0
- package/dist/responsiveGrid/cardGridSmallMobile1Col.png +0 -0
- package/dist/responsiveGrid/cardGridSmallTablet1Col.png +0 -0
- package/dist/responsiveGrid/cardGridSmallTablet3Cols.png +0 -0
- package/dist/responsiveGrid/cardGridSmallTablet3ColsSidebar.png +0 -0
- package/dist/responsiveGrid/gridColumns.png +0 -0
- package/dist/responsiveGrid/gridGutters.png +0 -0
- package/dist/responsiveGrid/gridMargins.png +0 -0
- package/dist/responsiveGrid/gridPerceivedColumns1.png +0 -0
- package/dist/responsiveGrid/gridPerceivedColumns2.png +0 -0
- package/dist/responsiveGrid/gridPerceivedColumns3.png +0 -0
- package/dist/responsiveGrid/gridPerceivedColumns4.png +0 -0
- package/dist/src/components/Accordion/Accordion.d.ts +6 -8
- package/dist/src/components/AlphabetFilter/AlphabetFilter.d.ts +2 -4
- package/dist/src/components/AudioPlayer/AudioPlayer.d.ts +2 -4
- package/dist/src/components/Banner/Banner.d.ts +7 -13
- package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +7 -9
- package/dist/src/components/Button/Button.d.ts +9 -14
- package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +2 -4
- package/dist/src/components/Card/Card.d.ts +2 -4
- package/dist/src/components/Checkbox/Checkbox.d.ts +3 -10
- package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +2 -4
- package/dist/src/components/ComponentWrapper/ComponentWrapper.d.ts +2 -5
- package/dist/src/components/DatePicker/DatePicker.d.ts +2 -4
- package/dist/src/components/FeaturedContent/FeaturedContent.d.ts +3 -5
- package/dist/src/components/FeedbackBox/FeedbackBox.d.ts +2 -4
- package/dist/src/components/Fieldset/Fieldset.d.ts +2 -4
- package/dist/src/components/FilterBarInline/FilterBarInline.d.ts +2 -4
- package/dist/src/components/FilterBarPopup/FilterBarPopup.d.ts +2 -4
- package/dist/src/components/Form/Form.d.ts +4 -12
- package/dist/src/components/Grid/SimpleGrid.d.ts +2 -4
- package/dist/src/components/Heading/Heading.d.ts +4 -6
- package/dist/src/components/HelperErrorText/HelperErrorText.d.ts +2 -16
- package/dist/src/components/Hero/Hero.d.ts +13 -17
- package/dist/src/components/HorizontalRule/HorizontalRule.d.ts +2 -4
- package/dist/src/components/Icons/Icon.d.ts +5 -8
- package/dist/src/components/Icons/IconSvgs.d.ts +0 -3
- package/dist/src/components/Icons/iconVariables.d.ts +3 -3
- package/dist/src/components/Image/Image.d.ts +2 -10
- package/dist/src/components/Label/Label.d.ts +3 -7
- package/dist/src/components/Link/Link.d.ts +10 -18
- package/dist/src/components/List/List.d.ts +10 -8
- package/dist/src/components/Logo/Logo.d.ts +2 -4
- package/dist/src/components/Menu/Menu.d.ts +2 -4
- package/dist/src/components/Modal/Modal.d.ts +7 -6
- package/dist/src/components/MultiSelect/MultiSelect.d.ts +2 -2
- package/dist/src/components/MultiSelectGroup/MultiSelectGroup.d.ts +2 -4
- package/dist/src/components/NewsletterSignup/NewsletterSignup.d.ts +5 -8
- package/dist/src/components/Notification/Notification.d.ts +5 -11
- package/dist/src/components/Pagination/Pagination.d.ts +2 -4
- package/dist/src/components/ProgressIndicator/ProgressIndicator.d.ts +2 -4
- package/dist/src/components/Radio/Radio.d.ts +3 -9
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +2 -4
- package/dist/src/components/SearchBar/SearchBar.d.ts +3 -11
- package/dist/src/components/Select/Select.d.ts +6 -16
- package/dist/src/components/SkeletonLoader/SkeletonLoader.d.ts +2 -4
- package/dist/src/components/SkipNavigation/SkipNavigation.d.ts +2 -4
- package/dist/src/components/Slider/Slider.d.ts +3 -5
- package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +4 -6
- package/dist/src/components/StatusBadge/StatusBadge.d.ts +5 -12
- package/dist/src/components/StructuredContent/StructuredContent.d.ts +2 -4
- package/dist/src/components/StyledList/StyledList.d.ts +3 -7
- package/dist/src/components/SubNav/SubNav.d.ts +4 -8
- package/dist/src/components/Table/Table.d.ts +2 -10
- package/dist/src/components/Tabs/Tabs.d.ts +2 -2
- package/dist/src/components/TagSet/TagSet.d.ts +3 -5
- package/dist/src/components/TagSet/TagSetExplore.d.ts +1 -1
- package/dist/src/components/TagSet/TagSetFilter.d.ts +1 -1
- package/dist/src/components/Template/Template.d.ts +38 -117
- package/dist/src/components/Text/Text.d.ts +2 -6
- package/dist/src/components/TextInput/TextInput.d.ts +9 -32
- package/dist/src/components/Toggle/Toggle.d.ts +3 -8
- package/dist/src/components/Tooltip/Tooltip.d.ts +2 -6
- package/dist/src/components/VideoPlayer/VideoPlayer.d.ts +2 -4
- package/dist/src/hooks/useMultiSelect.d.ts +5 -1
- package/dist/src/hooks/useNYPLBreakpoints.d.ts +6 -1
- package/dist/src/hooks/useResponsiveSpacing.d.ts +23 -0
- package/dist/src/index.d.ts +16 -17
- package/dist/src/theme/components/breadcrumb.d.ts +1 -1
- package/dist/src/theme/components/button.d.ts +1 -4
- package/dist/src/theme/components/heading.d.ts +1 -125
- package/dist/src/theme/components/hero.d.ts +11 -11
- package/dist/src/theme/components/link.d.ts +1 -40
- package/dist/src/theme/components/newsletterSignup.d.ts +3 -3
- package/dist/src/theme/components/notification.d.ts +3 -6
- package/dist/src/theme/components/notificationContent.d.ts +3 -3
- package/dist/src/theme/components/notificationHeading.d.ts +3 -3
- package/dist/src/theme/components/progressIndicator.d.ts +1 -2
- package/dist/src/theme/components/slider.d.ts +8 -4
- package/dist/src/theme/components/statusBadge.d.ts +1 -14
- package/dist/src/theme/components/structuredContent.d.ts +1 -5
- package/dist/src/theme/components/{customTable.d.ts → table.d.ts} +7 -13
- package/dist/src/theme/components/template.d.ts +49 -125
- package/dist/src/theme/components/text.d.ts +1 -9
- package/dist/src/theme/foundations/breakpoints.d.ts +21 -8
- package/dist/src/theme/sharedTypes.d.ts +4 -0
- package/dist/src/utils/utils.d.ts +8 -1
- package/dist/styles.css +1 -1
- package/dist/template/templateBottom.png +0 -0
- package/dist/template/templateBreakout.png +0 -0
- package/dist/template/templateFluidColumns1.png +0 -0
- package/dist/template/templateFluidColumns2.png +0 -0
- package/dist/template/templateFluidColumns3.png +0 -0
- package/dist/template/templateFluidColumns4.png +0 -0
- package/dist/template/templateFullPageLayout.png +0 -0
- package/dist/template/templateMain.png +0 -0
- package/dist/template/templateMainNarrow.png +0 -0
- package/dist/template/templateMainWide.png +0 -0
- package/dist/template/templateSidebarLeft.png +0 -0
- package/dist/template/templateSidebarNone.png +0 -0
- package/dist/template/templateSidebarRight.png +0 -0
- package/dist/template/templateTop.png +0 -0
- package/package.json +1 -1
- package/dist/src/components/Header/Header.d.ts +0 -13
- package/dist/src/components/Header/components/HeaderLogin.d.ts +0 -12
- package/dist/src/components/Header/components/HeaderLoginButton.d.ts +0 -10
- package/dist/src/components/Header/components/HeaderLowerNav.d.ts +0 -6
- package/dist/src/components/Header/components/HeaderMobileIconNav.d.ts +0 -6
- package/dist/src/components/Header/components/HeaderMobileNav.d.ts +0 -6
- package/dist/src/components/Header/components/HeaderMobileNavButton.d.ts +0 -6
- package/dist/src/components/Header/components/HeaderSearchButton.d.ts +0 -9
- package/dist/src/components/Header/components/HeaderSearchForm.d.ts +0 -10
- package/dist/src/components/Header/components/HeaderSitewideAlerts.d.ts +0 -7
- package/dist/src/components/Header/components/HeaderUpperNav.d.ts +0 -7
- package/dist/src/components/Header/context/headerContext.d.ts +0 -13
- package/dist/src/components/Header/utils/encoreCatalogLogOutTimer.d.ts +0 -4
- package/dist/src/components/Header/utils/headerUtils.d.ts +0 -70
- package/dist/src/theme/components/header.d.ts +0 -100
- package/dist/src/theme/components/headerLogin.d.ts +0 -333
- package/dist/src/theme/components/headerLoginButton.d.ts +0 -72
- package/dist/src/theme/components/headerLowerNav.d.ts +0 -78
- package/dist/src/theme/components/headerMobileIconNav.d.ts +0 -28
- package/dist/src/theme/components/headerMobileNav.d.ts +0 -92
- package/dist/src/theme/components/headerMobileNavButton.d.ts +0 -36
- package/dist/src/theme/components/headerSearchButton.d.ts +0 -85
- package/dist/src/theme/components/headerSearchForm.d.ts +0 -185
- package/dist/src/theme/components/headerSitewideAlerts.d.ts +0 -43
- package/dist/src/theme/components/headerUpperNav.d.ts +0 -60
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
1
|
+
import { BoxProps, ChakraComponent } from "@chakra-ui/react";
|
|
2
2
|
import React from "react";
|
|
3
|
-
export
|
|
3
|
+
export declare const accordionVariantsArray: readonly ["default", "warning", "error"];
|
|
4
|
+
export type AccordionVariants = typeof accordionVariantsArray[number];
|
|
4
5
|
export interface AccordionDataProps {
|
|
5
|
-
|
|
6
|
+
variant?: AccordionVariants;
|
|
6
7
|
ariaLabel?: string;
|
|
7
8
|
/** Ref to the DOM element of the AccordionButton. */
|
|
8
9
|
buttonInteractionRef?: any;
|
|
9
10
|
label: string | JSX.Element;
|
|
10
11
|
panel: string | React.ReactNode;
|
|
11
12
|
}
|
|
12
|
-
export interface AccordionProps {
|
|
13
|
-
/** Array of data to display, and an optional
|
|
13
|
+
export interface AccordionProps extends Omit<BoxProps, "onChange"> {
|
|
14
|
+
/** Array of data to display, and an optional variant */
|
|
14
15
|
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
16
|
/** ID that other components can cross reference for accessibility purposes */
|
|
19
17
|
id?: string;
|
|
20
18
|
/** 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
|
-
|
|
4
|
-
export type
|
|
5
|
-
export
|
|
6
|
-
export type
|
|
7
|
-
export
|
|
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 BannerVariants = 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
|
|
@@ -31,7 +25,7 @@ export interface BannerProps {
|
|
|
31
25
|
* (closed) by a user. */
|
|
32
26
|
isDismissible?: boolean;
|
|
33
27
|
/** Used to control the component's semantic coloring and iconography. */
|
|
34
|
-
|
|
28
|
+
variant?: BannerVariants;
|
|
35
29
|
}
|
|
36
30
|
/**
|
|
37
31
|
* The `Banner` component is a non-modal semantic dialog used to communicate a
|
|
@@ -1,23 +1,21 @@
|
|
|
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
|
|
4
|
-
export type
|
|
3
|
+
export declare const breadcrumbVariantsArray: readonly ["blogs", "booksAndMore", "brand", "connect", "digitalCollections", "education", "locations", "research", "whatsOn"];
|
|
4
|
+
export type BreadcrumbsVariants = typeof breadcrumbVariantsArray[number];
|
|
5
5
|
export interface BreadcrumbsDataProps {
|
|
6
6
|
url: string;
|
|
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
|
-
/** Used to control how the `
|
|
14
|
-
|
|
15
|
-
/** className you can add in addition to 'input' */
|
|
16
|
-
className?: string;
|
|
13
|
+
/** Used to control how the `Breadcrumbs` component will be rendered. */
|
|
14
|
+
variant?: BreadcrumbsVariants;
|
|
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?:
|
|
18
|
+
customLinkComponent?: React.ElementType;
|
|
21
19
|
}
|
|
22
20
|
/**
|
|
23
21
|
* The `Breadcrumbs` component is a navigation element that provides a
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
2
|
-
import
|
|
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
5
|
export declare const buttonSizesArray: readonly ["small", "medium", "large"];
|
|
5
|
-
export declare const
|
|
6
|
+
export declare const buttonVariantsArray: readonly ["primary", "secondary", "text", "callout", "pill", "noBrand"];
|
|
6
7
|
export type ButtonElementType = typeof buttonElementTypeArray[number];
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export interface ButtonProps {
|
|
10
|
-
/** The button variation to render based on the `
|
|
11
|
-
|
|
12
|
-
/** Additional className to use. */
|
|
13
|
-
className?: string;
|
|
8
|
+
export type ButtonVariants = typeof buttonVariantsArray[number];
|
|
9
|
+
export type ButtonSizes = typeof sizesArray[number];
|
|
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;
|
|
14
13
|
/** ID that other components can cross reference for accessibility purposes. */
|
|
15
14
|
id: string;
|
|
16
15
|
/** Adds 'disabled' property to the button. */
|
|
@@ -18,14 +17,10 @@ export interface ButtonProps {
|
|
|
18
17
|
/** Trigger the Button's action through the `mouseDown` event handler instead
|
|
19
18
|
* of `onClick`. `false` by default. */
|
|
20
19
|
mouseDown?: boolean;
|
|
21
|
-
/** The action to perform on the `<button>`'s onClick function. */
|
|
22
|
-
onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
23
20
|
/** Visibly hidden text that will only be read by screenreaders. */
|
|
24
21
|
screenreaderOnlyText?: string;
|
|
25
22
|
/** The size of the `Button`. */
|
|
26
23
|
size?: ButtonSizes;
|
|
27
|
-
/** The HTML button type attribute. */
|
|
28
|
-
type?: ButtonElementType;
|
|
29
24
|
}
|
|
30
25
|
/**
|
|
31
26
|
* 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 {
|
|
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"
|
|
4
|
-
export declare const headingLevelsArray: readonly ["h1", "h2", "h3", "h4", "h5", "h6"
|
|
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
|
|
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
|
|
5
|
-
export type
|
|
6
|
-
export
|
|
7
|
-
export interface HeroImageProps extends Pick<ComponentImageProps, "alt" | "fallbackSrc" | "id" | "src" | "onError" | "component"> {
|
|
4
|
+
export declare const heroVariantsArray: readonly ["primary", "tertiary", "campaign"];
|
|
5
|
+
export type HeroVariants = typeof heroVariantsArray[number];
|
|
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
|
/**
|
|
@@ -14,28 +13,28 @@ export interface HeroProps {
|
|
|
14
13
|
*/
|
|
15
14
|
backdropBackgroundColor?: string;
|
|
16
15
|
/** Optional hex color value used to override the default background
|
|
17
|
-
* color for a given `Hero`
|
|
18
|
-
* Note: not all `Hero`
|
|
16
|
+
* color for a given `Hero` variant.
|
|
17
|
+
* Note: not all `Hero` variants utilize this prop. */
|
|
19
18
|
backgroundColor?: string;
|
|
20
19
|
/** Optional path to an image that will be used as a background image for the
|
|
21
20
|
* `Hero` component.
|
|
22
|
-
* Note: not all `Hero`
|
|
21
|
+
* Note: not all `Hero` variants utilize this prop. */
|
|
23
22
|
backgroundImageSrc?: string;
|
|
24
23
|
/** Optional hex color value used to override the default text color for a
|
|
25
24
|
* given `Hero` variation.
|
|
26
|
-
* Note: not all `Hero`
|
|
25
|
+
* Note: not all `Hero` variants utilize this prop. */
|
|
27
26
|
foregroundColor?: string;
|
|
28
27
|
/** Optional heading element. */
|
|
29
28
|
heading?: JSX.Element;
|
|
30
29
|
/** Used to control how the `Hero` component will be rendered. */
|
|
31
|
-
|
|
30
|
+
variant?: HeroVariants;
|
|
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`,
|
|
36
|
-
* If `imageProps.alt` is left blank, a warning
|
|
37
|
-
* will
|
|
38
|
-
*
|
|
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;
|