@nypl/design-system-react-components 4.0.0-remove-matchMedia-test → 4.0.0
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/README.md +125 -201
- package/dist/design-system-react-components.cjs +58 -58
- package/dist/design-system-react-components.js +18457 -19086
- package/dist/readme/componentheader.png +0 -0
- package/dist/src/components/Accordion/Accordion.d.ts +7 -9
- package/dist/src/components/AlphabetFilter/AlphabetFilter.d.ts +2 -6
- package/dist/src/components/AudioPlayer/AudioPlayer.d.ts +4 -13
- package/dist/src/components/Banner/Banner.d.ts +9 -16
- package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +7 -11
- package/dist/src/components/Button/Button.d.ts +10 -17
- package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +2 -6
- package/dist/src/components/ButtonGroup/ButtonGroupContext.d.ts +3 -0
- package/dist/src/components/Card/Card.d.ts +3 -7
- package/dist/src/components/Checkbox/Checkbox.d.ts +3 -12
- package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +4 -8
- package/dist/src/components/CheckboxGroup/CheckboxGroupContext.d.ts +10 -0
- package/dist/src/components/ComponentWrapper/ComponentWrapper.d.ts +2 -7
- package/dist/src/components/DatePicker/DatePicker.d.ts +4 -8
- package/dist/src/components/FeaturedContent/FeaturedContent.d.ts +3 -7
- package/dist/src/components/FeedbackBox/FeedbackBox.d.ts +2 -6
- package/dist/src/components/Fieldset/Fieldset.d.ts +2 -6
- package/dist/src/components/FilterBarInline/FilterBarInline.d.ts +2 -6
- package/dist/src/components/FilterBarPopup/FilterBarPopup.d.ts +2 -6
- package/dist/src/components/Form/Form.d.ts +10 -15
- package/dist/src/components/Grid/SimpleGrid.d.ts +2 -6
- package/dist/src/components/Heading/Heading.d.ts +2 -9
- package/dist/src/components/HelperErrorText/HelperErrorText.d.ts +2 -7
- package/dist/src/components/Hero/Hero.d.ts +11 -13
- package/dist/src/components/HorizontalRule/HorizontalRule.d.ts +2 -6
- package/dist/src/components/Icons/Icon.d.ts +5 -9
- package/dist/src/components/Icons/IconSvgs.d.ts +3 -0
- package/dist/src/components/Icons/iconVariables.d.ts +3 -3
- package/dist/src/components/Image/Image.d.ts +2 -14
- package/dist/src/components/Label/Label.d.ts +3 -9
- package/dist/src/components/Link/Link.d.ts +8 -18
- package/dist/src/components/List/List.d.ts +5 -14
- package/dist/src/components/Logo/Logo.d.ts +2 -6
- package/dist/src/components/Menu/Menu.d.ts +2 -6
- package/dist/src/components/Modal/Modal.d.ts +8 -11
- package/dist/src/components/MultiSelect/MultiSelect.d.ts +9 -10
- package/dist/src/components/MultiSelect/MultiSelectItemsCountButton.d.ts +2 -5
- package/dist/src/components/MultiSelectGroup/MultiSelectGroup.d.ts +2 -6
- package/dist/src/components/NewsletterSignup/NewsletterSignup.d.ts +6 -11
- package/dist/src/components/Notification/Notification.d.ts +9 -13
- package/dist/src/components/Pagination/Pagination.d.ts +2 -6
- package/dist/src/components/ProgressIndicator/ProgressIndicator.d.ts +3 -5
- package/dist/src/components/Radio/Radio.d.ts +4 -13
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +6 -9
- package/dist/src/components/RadioGroup/RadioGroupContext.d.ts +10 -0
- package/dist/src/components/SearchBar/SearchBar.d.ts +5 -15
- package/dist/src/components/Select/Select.d.ts +6 -18
- package/dist/src/components/SkeletonLoader/SkeletonLoader.d.ts +2 -6
- package/dist/src/components/SkipNavigation/SkipNavigation.d.ts +2 -6
- package/dist/src/components/Slider/Slider.d.ts +3 -7
- package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +4 -8
- package/dist/src/components/StatusBadge/StatusBadge.d.ts +5 -9
- package/dist/src/components/StructuredContent/StructuredContent.d.ts +2 -6
- package/dist/src/components/StyledList/StyledList.d.ts +2 -8
- package/dist/src/components/SubNav/SubNav.d.ts +4 -13
- package/dist/src/components/Table/Table.d.ts +2 -10
- package/dist/src/components/Tabs/Tabs.d.ts +2 -4
- package/dist/src/components/TagSet/TagSet.d.ts +2 -9
- package/dist/src/components/TagSet/TagSetExplore.d.ts +3 -2
- package/dist/src/components/TagSet/TagSetFilter.d.ts +3 -4
- package/dist/src/components/Template/Template.d.ts +31 -41
- package/dist/src/components/Text/Text.d.ts +3 -11
- package/dist/src/components/TextInput/TextInput.d.ts +9 -34
- package/dist/src/components/Toggle/Toggle.d.ts +3 -10
- package/dist/src/components/Tooltip/Tooltip.d.ts +2 -8
- package/dist/src/components/VideoPlayer/VideoPlayer.d.ts +2 -6
- package/dist/src/hooks/useMultiSelect.d.ts +5 -1
- package/dist/src/hooks/useSafeId.d.ts +6 -0
- package/dist/src/index.d.ts +14 -16
- package/dist/src/theme/components/breadcrumb.d.ts +2 -2
- package/dist/src/theme/components/button.d.ts +12 -0
- package/dist/src/theme/components/datePicker.d.ts +4 -0
- package/dist/src/theme/components/feedbackBox.d.ts +15 -3
- package/dist/src/theme/components/fieldset.d.ts +1 -1
- package/dist/src/theme/components/global.d.ts +1 -5
- package/dist/src/theme/components/heading.d.ts +6 -72
- package/dist/src/theme/components/helperErrorText.d.ts +5 -14
- package/dist/src/theme/components/hero.d.ts +14 -15
- package/dist/src/theme/components/horizontalRule.d.ts +0 -2
- package/dist/src/theme/components/icon.d.ts +2 -5
- package/dist/src/theme/components/label.d.ts +0 -1
- package/dist/src/theme/components/list.d.ts +1 -11
- package/dist/src/theme/components/newsletterSignup.d.ts +4 -4
- package/dist/src/theme/components/notification.d.ts +3 -3
- 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/radioGroup.d.ts +1 -1
- package/dist/src/theme/components/searchBar.d.ts +3 -3
- package/dist/src/theme/components/select.d.ts +7 -3
- package/dist/src/theme/components/slider.d.ts +5 -1
- package/dist/src/theme/components/socialmedialinks.d.ts +2 -2
- package/dist/src/theme/components/structuredContent.d.ts +2 -69
- package/dist/src/theme/components/styledList.d.ts +0 -1
- package/dist/src/theme/components/subnav.d.ts +1 -1
- package/dist/src/theme/components/{customTable.d.ts → table.d.ts} +7 -13
- package/dist/src/theme/components/template.d.ts +86 -31
- package/dist/src/theme/components/text.d.ts +1 -3
- package/dist/src/theme/foundations/colors.d.ts +1 -1
- package/dist/src/theme/foundations/global.d.ts +0 -12
- package/dist/src/theme/foundations/spacing.d.ts +16 -0
- package/dist/src/theme/sharedStyles.d.ts +4 -0
- package/dist/src/theme/sharedTypes.d.ts +4 -0
- package/dist/src/utils/utils.d.ts +9 -3
- package/dist/styles.css +1 -1
- 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/templateRegionsFooter.png +0 -0
- package/dist/template/templateRegionsHeader.png +0 -0
- package/dist/template/templateRegionsMain.png +0 -0
- package/dist/template/templateSectionBreakout.png +0 -0
- package/dist/template/templateSectionContent.png +0 -0
- package/dist/template/templateSectionFull.png +0 -0
- package/dist/template/templateSectionSidebar.png +0 -0
- package/dist/template/templateVariantFull.png +0 -0
- package/dist/template/templateVariantNarrow.png +0 -0
- package/dist/template/templateVariantSidebarLeft.png +0 -0
- package/dist/template/templateVariantSidebarRight.png +0 -0
- package/dist/useNextjsImage/aspectRatio.png +0 -0
- package/dist/useNextjsImage/containedImageExamples.png +0 -0
- package/dist/useNextjsImage/croppedImageExamples.png +0 -0
- package/dist/useNextjsImage/customWidth.png +0 -0
- package/dist/useNextjsImage/fallbackImageDark.png +0 -0
- package/dist/useNextjsImage/fallbackImageLight.png +0 -0
- package/dist/useNextjsImage/focalPointExamples01.png +0 -0
- package/dist/useNextjsImage/focalPointExamples02.png +0 -0
- package/package.json +14 -18
- package/dist/src/hooks/useCarouselStyles.d.ts +0 -17
- package/dist/src/hooks/useWindowSize.d.ts +0 -10
- package/dist/src/theme/components/filterBar.d.ts +0 -46
- package/dist/template/templateBottom.png +0 -0
- package/dist/template/templateBreakout.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
|
@@ -1,11 +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 { ComponentImageProps } from "../Image/Image";
|
|
4
|
-
export declare const
|
|
5
|
-
export type
|
|
6
|
-
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"> {
|
|
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,
|
|
@@ -13,23 +13,19 @@ export interface HeroProps {
|
|
|
13
13
|
*/
|
|
14
14
|
backdropBackgroundColor?: string;
|
|
15
15
|
/** Optional hex color value used to override the default background
|
|
16
|
-
* color for a given `Hero`
|
|
17
|
-
* Note: not all `Hero`
|
|
16
|
+
* color for a given `Hero` variant.
|
|
17
|
+
* Note: not all `Hero` variants utilize this prop. */
|
|
18
18
|
backgroundColor?: string;
|
|
19
19
|
/** Optional path to an image that will be used as a background image for the
|
|
20
20
|
* `Hero` component.
|
|
21
|
-
* Note: not all `Hero`
|
|
21
|
+
* Note: not all `Hero` variants utilize this prop. */
|
|
22
22
|
backgroundImageSrc?: string;
|
|
23
23
|
/** Optional hex color value used to override the default text color for a
|
|
24
24
|
* given `Hero` variation.
|
|
25
|
-
* Note: not all `Hero`
|
|
25
|
+
* Note: not all `Hero` variants utilize this prop. */
|
|
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
|
-
heroType?: HeroTypes;
|
|
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;
|
|
@@ -1,14 +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
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
11
|
-
id?: string;
|
|
12
8
|
}
|
|
13
9
|
export declare const HorizontalRule: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<HorizontalRuleProps> & React.RefAttributes<HTMLDivElement & HTMLHRElement>>, React.PropsWithChildren<HorizontalRuleProps>>;
|
|
14
10
|
export default HorizontalRule;
|
|
@@ -1,17 +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
|
-
import { iconAlignArray, iconColorsArray, iconNamesArray, iconRotationsArray, iconSizesArray,
|
|
3
|
+
import { iconAlignArray, iconColorsArray, iconNamesArray, iconRotationsArray, iconSizesArray, iconVariantsArray } 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
8
|
export type IconSizes = typeof iconSizesArray[number];
|
|
9
|
-
export type
|
|
10
|
-
export interface IconProps {
|
|
9
|
+
export type IconVariants = typeof iconVariantsArray[number];
|
|
10
|
+
export interface IconProps extends Pick<BoxProps, "className" | "id" | keyof ChakraProps> {
|
|
11
11
|
/** Aligns the icon. */
|
|
12
12
|
align?: IconAlign;
|
|
13
|
-
/** Optional className that will be added to the parent element */
|
|
14
|
-
className?: string;
|
|
15
13
|
/** Overrides default icon color (black). */
|
|
16
14
|
color?: IconColors;
|
|
17
15
|
/** Icons designated as decorative will be ignored by screenreaders. True
|
|
@@ -19,8 +17,6 @@ export interface IconProps {
|
|
|
19
17
|
decorative?: boolean;
|
|
20
18
|
/** Rotates the icon clockwise in increments of 90deg */
|
|
21
19
|
iconRotation?: IconRotations;
|
|
22
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
23
|
-
id?: string;
|
|
24
20
|
/** The name of the icon you want to use. */
|
|
25
21
|
name?: IconNames;
|
|
26
22
|
/** Sets the icon size. */
|
|
@@ -30,7 +26,7 @@ export interface IconProps {
|
|
|
30
26
|
* visible but is needed for screenreaders to describe the graphic. */
|
|
31
27
|
title?: string;
|
|
32
28
|
/** FOR INTERNAL DS USE ONLY: the icon variant to display. */
|
|
33
|
-
|
|
29
|
+
variant?: IconVariants;
|
|
34
30
|
}
|
|
35
31
|
/**
|
|
36
32
|
* Renders SVG-based icons.
|
|
@@ -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
|
-
export declare const iconColorsArray: readonly ["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"];
|
|
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", "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
|
-
export declare const
|
|
6
|
+
export declare const iconVariantsArray: readonly ["default", "breadcrumbs"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
1
|
+
import { BoxProps, ChakraComponent, ChakraProps } from "@chakra-ui/react";
|
|
2
2
|
import React, { ImgHTMLAttributes } from "react";
|
|
3
3
|
import { DimensionTypes } from "../../helpers/types";
|
|
4
4
|
export declare const imageRatiosArray: readonly ["fourByThree", "fourByOne", "twoByThree", "oneByTwo", "original", "sixteenByNine", "square", "threeByFour", "threeByTwo", "twoByOne"];
|
|
@@ -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,10 +38,6 @@ interface ImageWrapperProps {
|
|
|
40
38
|
additionalWrapperStyles?: {
|
|
41
39
|
[key: string]: any;
|
|
42
40
|
};
|
|
43
|
-
/** ClassName you can add in addition to 'image' */
|
|
44
|
-
className?: string;
|
|
45
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
46
|
-
id?: string;
|
|
47
41
|
/** Optional value to control the aspect ratio of the card image; default
|
|
48
42
|
* value is `"original"` */
|
|
49
43
|
ratio?: ImageRatios;
|
|
@@ -52,7 +46,7 @@ interface ImageWrapperProps {
|
|
|
52
46
|
/** Sets the image size based on the width or height. Width by default. */
|
|
53
47
|
sizeBasedOn?: DimensionTypes;
|
|
54
48
|
}
|
|
55
|
-
export interface ImageProps extends ImageWrapperProps, ImgHTMLAttributes<HTMLImageElement> {
|
|
49
|
+
export interface ImageProps extends Pick<BoxProps, keyof ChakraProps>, ImageWrapperProps, Omit<ImgHTMLAttributes<HTMLImageElement>, "color" | "height" | "width"> {
|
|
56
50
|
/** Optionally pass in additional Chakra-based styles only for the figure. */
|
|
57
51
|
additionalFigureStyles?: {
|
|
58
52
|
[key: string]: any;
|
|
@@ -61,8 +55,6 @@ export interface ImageProps extends ImageWrapperProps, ImgHTMLAttributes<HTMLIma
|
|
|
61
55
|
additionalImageStyles?: {
|
|
62
56
|
[key: string]: any;
|
|
63
57
|
};
|
|
64
|
-
/** Alternate text description of the image */
|
|
65
|
-
alt?: string;
|
|
66
58
|
/** Optional value to control the aspect ratio of the card image; default
|
|
67
59
|
* value is `"original"` */
|
|
68
60
|
aspectRatio?: ImageRatios;
|
|
@@ -78,10 +70,6 @@ export interface ImageProps extends ImageWrapperProps, ImgHTMLAttributes<HTMLIma
|
|
|
78
70
|
imageType?: ImageTypes;
|
|
79
71
|
/** Flag to set the internal `Image` component to `isLazy` mode. */
|
|
80
72
|
isLazy?: boolean;
|
|
81
|
-
/** Additional action to perform in the `img`'s `onerror` attribute function. */
|
|
82
|
-
onError?: (event: React.SyntheticEvent<HTMLImageElement>) => void;
|
|
83
|
-
/** The src attribute is required, and contains the path to the image you want to embed. */
|
|
84
|
-
src?: string;
|
|
85
73
|
}
|
|
86
74
|
export declare const Image: ChakraComponent<React.ForwardRefExoticComponent<ImageProps & React.RefAttributes<HTMLDivElement>>, ImageProps>;
|
|
87
75
|
export default Image;
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface LabelProps {
|
|
4
|
-
/** Additional CSS class name to render in the `label` element. */
|
|
5
|
-
className?: string;
|
|
6
|
-
/** The id of the html element that this `Label` is describing. */
|
|
7
|
-
htmlFor: string;
|
|
8
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
9
|
-
id?: string;
|
|
1
|
+
import { BoxProps, ChakraComponent, ChakraProps } from "@chakra-ui/react";
|
|
2
|
+
import React, { LabelHTMLAttributes } from "react";
|
|
3
|
+
export interface LabelProps extends Pick<BoxProps, keyof ChakraProps>, Omit<LabelHTMLAttributes<HTMLLabelElement>, "color"> {
|
|
10
4
|
/** Controls whether the label should be inline with the input it goes with.
|
|
11
5
|
* This prop should only be used internally. */
|
|
12
6
|
isInlined?: boolean;
|
|
@@ -1,33 +1,23 @@
|
|
|
1
|
-
import { ChakraComponent,
|
|
2
|
-
import React from "react";
|
|
3
|
-
export declare const
|
|
4
|
-
export type
|
|
5
|
-
export interface LinkProps extends
|
|
6
|
-
/** Additional class name to render in the `Link` component. */
|
|
7
|
-
className?: string;
|
|
1
|
+
import { BoxProps, ChakraComponent, ChakraProps } from "@chakra-ui/react";
|
|
2
|
+
import React, { AnchorHTMLAttributes } from "react";
|
|
3
|
+
export declare const linkVariantsArray: readonly ["action", "backwards", "buttonPrimary", "buttonSecondary", "buttonPill", "buttonCallout", "buttonNoBrand", "buttonDisabled", "default", "external", "forwards", "standalone"];
|
|
4
|
+
export type LinkVariants = typeof linkVariantsArray[number];
|
|
5
|
+
export interface LinkProps extends Pick<BoxProps, "as" | keyof ChakraProps>, Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "color"> {
|
|
8
6
|
/** Used to include or remove visited state styles. Default is true. */
|
|
9
7
|
hasVisitedState?: boolean;
|
|
10
|
-
/** The `href` attribute for the anchor element. */
|
|
11
|
-
href?: string;
|
|
12
|
-
/** ID used for accessibility purposes. */
|
|
13
|
-
id?: string;
|
|
14
8
|
/** Used to explicitly set the underline style for a text link. If true, link
|
|
15
9
|
* text will always be underlined; if false, link text will only show
|
|
16
10
|
* underline in hover state. */
|
|
17
11
|
isUnderlined?: boolean;
|
|
18
|
-
onClick?: (event: React.MouseEvent<HTMLDivElement | HTMLAnchorElement, MouseEvent>) => void;
|
|
19
|
-
rel?: string;
|
|
20
12
|
/** Visibly hidden text that will only be read by screenreaders. */
|
|
21
13
|
screenreaderOnlyText?: string;
|
|
22
|
-
/** Prop that sets the HTML attribute to target where the link should go. */
|
|
23
|
-
target?: "_blank" | "_parent" | "_self" | "_top";
|
|
24
14
|
/** Controls the link's styles based on the value: action, backwards, default,
|
|
25
15
|
* external, forwards, standalone, and all "button" types. */
|
|
26
|
-
|
|
16
|
+
variant?: LinkVariants;
|
|
27
17
|
}
|
|
28
18
|
/**
|
|
29
|
-
* A component that
|
|
30
|
-
*
|
|
19
|
+
* A component that renders an anchor element with added styling
|
|
20
|
+
* and conventions.
|
|
31
21
|
*/
|
|
32
22
|
export declare const Link: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<LinkProps> & React.RefAttributes<HTMLDivElement & HTMLAnchorElement>>, React.PropsWithChildren<LinkProps>>;
|
|
33
23
|
export default Link;
|
|
@@ -1,16 +1,12 @@
|
|
|
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 listVariantsArray: readonly ["ol", "ul", "dl"];
|
|
4
|
+
export type ListVariants = typeof listVariantsArray[number];
|
|
5
5
|
export interface DescriptionProps {
|
|
6
6
|
term: string;
|
|
7
7
|
description: string | JSX.Element;
|
|
8
8
|
}
|
|
9
|
-
export interface ListProps {
|
|
10
|
-
/** ClassName you can add in addition to 'list' */
|
|
11
|
-
className?: string;
|
|
12
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
13
|
-
id?: string;
|
|
9
|
+
export interface ListProps extends Omit<BoxProps, "title"> {
|
|
14
10
|
/** Display the list in a row. */
|
|
15
11
|
inline?: boolean;
|
|
16
12
|
/** Data to render if children are not passed. For `listTypes` ordered `"ol"`
|
|
@@ -29,7 +25,7 @@ export interface ListProps {
|
|
|
29
25
|
* to Description Lists and will render above the list. */
|
|
30
26
|
title?: string | JSX.Element;
|
|
31
27
|
/** The type of list: "ol", "ul", or "dl". "ul" by default. */
|
|
32
|
-
|
|
28
|
+
variant: ListVariants;
|
|
33
29
|
}
|
|
34
30
|
/**
|
|
35
31
|
* A component that renders list item `li` elements or description item `dt`
|
|
@@ -37,9 +33,4 @@ export interface ListProps {
|
|
|
37
33
|
* only display for the `Description` list type.
|
|
38
34
|
*/
|
|
39
35
|
export declare const List: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<ListProps> & React.RefAttributes<HTMLDivElement & HTMLUListElement & HTMLOListElement>>, React.PropsWithChildren<ListProps>>;
|
|
40
|
-
/**
|
|
41
|
-
* Checks for `li` elements and consoles a warning if the
|
|
42
|
-
* children are different HTML elements.
|
|
43
|
-
*/
|
|
44
|
-
export declare const checkListChildrenError: (children: React.ReactNode, listType?: string, componentName?: string) => void;
|
|
45
36
|
export default List;
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
1
|
+
import { BoxProps, ChakraComponent, ChakraProps } from "@chakra-ui/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
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 {
|
|
8
|
-
/** Optional className that will be added to the parent element */
|
|
9
|
-
className?: string;
|
|
7
|
+
export interface LogoProps extends Pick<BoxProps, "id" | "className" | keyof ChakraProps> {
|
|
10
8
|
/** Logos designated as decorative will be ignored by screenreaders. False
|
|
11
9
|
* by default. */
|
|
12
10
|
decorative?: boolean;
|
|
13
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
14
|
-
id?: string;
|
|
15
11
|
/** The name of the logo you want to use. */
|
|
16
12
|
name?: LogoNames;
|
|
17
13
|
/** Sets the logo size. */
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
1
|
+
import { BoxProps, ChakraComponent } from "@chakra-ui/react";
|
|
2
2
|
import { IconNames } from "../Icons/Icon";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import { SectionTypes } from "../../helpers/types";
|
|
5
|
-
export interface MenuProps {
|
|
6
|
-
/** Optional CSS class name that will be added to the component's parent element. */
|
|
7
|
-
className?: string;
|
|
8
|
-
/** Optional ID string that other components can cross reference for accessibility purposes. */
|
|
9
|
-
id?: string;
|
|
5
|
+
export interface MenuProps extends BoxProps {
|
|
10
6
|
/** Optional string used to identify and highlight an item when the menu opens. The value should
|
|
11
7
|
* match the id associated with one of the items. */
|
|
12
8
|
selectedItem?: string;
|
|
@@ -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 BaseProps {
|
|
3
|
+
export interface BaseProps extends Omit<BoxProps, "scrollBehavior"> {
|
|
4
4
|
/** The content to display in the modal body. */
|
|
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
|
}
|
|
@@ -16,7 +14,7 @@ export interface ConfirmationModalProps {
|
|
|
16
14
|
onCancel: () => void;
|
|
17
15
|
onConfirm: () => void;
|
|
18
16
|
/** The `Modal` variant to render. */
|
|
19
|
-
|
|
17
|
+
variant: "confirmation";
|
|
20
18
|
/** The label for the close button. This prop is used for the
|
|
21
19
|
* "cancel" button in the confirmation variant. */
|
|
22
20
|
closeButtonLabel?: string;
|
|
@@ -27,7 +25,7 @@ export interface DefaultModalProps {
|
|
|
27
25
|
closeButtonLabel?: string;
|
|
28
26
|
onClose?: () => void;
|
|
29
27
|
/** The `Modal` variant to render. */
|
|
30
|
-
|
|
28
|
+
variant: "default";
|
|
31
29
|
/** The label for the confirm button. This prop is not used
|
|
32
30
|
* in the default variant. */
|
|
33
31
|
confirmButtonLabel?: never;
|
|
@@ -36,21 +34,20 @@ 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;
|
|
47
43
|
}
|
|
48
|
-
export declare function
|
|
44
|
+
export declare function isDefaultVariant(variant: BaseModalProps["variant"]): variant is "default";
|
|
49
45
|
export declare const BaseModal: ChakraComponent<React.FunctionComponent<BaseModalProps>, BaseModalProps>;
|
|
50
46
|
/**
|
|
51
47
|
* The `ModalTrigger` component renders a button that you click to open the
|
|
52
48
|
* internal `Modal` component. Note that props to update the internal `Modal`
|
|
53
|
-
* component are passed through to the `modalProps` prop.
|
|
49
|
+
* component are passed through to the `modalProps` prop. In addition to the
|
|
50
|
+
* props below, you may pass `modalProps` any Chakra `Box` props.
|
|
54
51
|
*/
|
|
55
52
|
export declare const ModalTrigger: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<ModalProps> & React.RefAttributes<HTMLButtonElement>>, React.PropsWithChildren<ModalProps>>;
|
|
56
53
|
/**
|
|
@@ -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 interface MultiSelectItem {
|
|
4
4
|
id: string;
|
|
@@ -16,7 +16,7 @@ export interface SelectedItems {
|
|
|
16
16
|
items: string[];
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
export interface MultiSelectProps {
|
|
19
|
+
export interface MultiSelectProps extends BoxProps {
|
|
20
20
|
/** The button text rendered within the MultiSelect. */
|
|
21
21
|
buttonText: string;
|
|
22
22
|
/** Determines whether the component will toggle to the closed state
|
|
@@ -25,14 +25,6 @@ export interface MultiSelectProps {
|
|
|
25
25
|
/** The number of items that will be visible in the list when the component
|
|
26
26
|
* first loads. */
|
|
27
27
|
defaultItemsVisible?: number;
|
|
28
|
-
/** The action to perform for the clear/reset button of individual MultiSelects. */
|
|
29
|
-
onClear?: () => void;
|
|
30
|
-
/** The action to perform on the checkbox's onChange function. */
|
|
31
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
32
|
-
/** The action to perform for a mixed state checkbox (parent checkbox). */
|
|
33
|
-
onMixedStateChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
34
|
-
/** An ID string that other components can cross reference for accessibility purposes. */
|
|
35
|
-
id: string;
|
|
36
28
|
/** Boolean value used to control how the MultiSelect component will render
|
|
37
29
|
* within the page and interact with other DOM elements. The default value is false. */
|
|
38
30
|
isBlockElement?: boolean;
|
|
@@ -46,6 +38,13 @@ export interface MultiSelectProps {
|
|
|
46
38
|
/** listOverflow is a property indicating how the list should handle overflow,
|
|
47
39
|
* with options limited to either "scroll" or "expand." */
|
|
48
40
|
listOverflow?: MultiSelectListOverflowTypes;
|
|
41
|
+
/** The action to perform for the clear/reset button of individual MultiSelects. */
|
|
42
|
+
onClear?: () => void;
|
|
43
|
+
/** The action to perform on the checkbox's onChange function. Note, if using
|
|
44
|
+
* this prop, it must be of the type listed below. */
|
|
45
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
46
|
+
/** The action to perform for a mixed state checkbox (parent checkbox). */
|
|
47
|
+
onMixedStateChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
49
48
|
/** The selected items state (items that were checked by user). */
|
|
50
49
|
selectedItems: SelectedItems;
|
|
51
50
|
/** Value used to set the width for the MultiSelect component. */
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
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. */
|
|
@@ -1,12 +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 { LayoutTypes } from "../../helpers/types";
|
|
4
4
|
import { MultiSelectWidths } from "../MultiSelect/MultiSelect";
|
|
5
|
-
export interface MultiSelectGroupProps {
|
|
6
|
-
/** Additional className to use. */
|
|
7
|
-
className?: string;
|
|
8
|
-
/** The id of the MultiSelectGroup. */
|
|
9
|
-
id: string;
|
|
5
|
+
export interface MultiSelectGroupProps extends BoxProps {
|
|
10
6
|
/** The label text rendered within the MultiSelectGroup. */
|
|
11
7
|
labelText: string;
|
|
12
8
|
/** Renders the layout of `MultiSelect` components in a row or column. */
|
|
@@ -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 NewsletterSignupProps {
|
|
4
|
-
/** Additional class name to add. */
|
|
5
|
-
className?: string;
|
|
3
|
+
export interface NewsletterSignupProps extends Omit<BoxProps, "title"> {
|
|
6
4
|
/** Text displayed next to the confirmation icon after a successful email submission */
|
|
7
5
|
confirmationHeading: string;
|
|
8
6
|
/** Detail text for the confirmation view */
|
|
@@ -16,12 +14,9 @@ export interface NewsletterSignupProps {
|
|
|
16
14
|
/** Appears below the input field's example text to provide any additional instructions. Accepts a string or
|
|
17
15
|
* an element. */
|
|
18
16
|
formHelperText?: string | JSX.Element;
|
|
19
|
-
/** ID that other components can cross-reference for accessibility purposes */
|
|
20
|
-
id?: string;
|
|
21
17
|
/** Toggles the invalid state for the email field. */
|
|
22
18
|
isInvalidEmail?: boolean;
|
|
23
|
-
/** Value to determine the section color highlight.
|
|
24
|
-
*/
|
|
19
|
+
/** Value to determine the section color highlight. */
|
|
25
20
|
highlightColor?: HighlightColorTypes;
|
|
26
21
|
/** A handler function that will be called when the form is submitted. */
|
|
27
22
|
onSubmit: (event: React.FormEvent<any>) => void;
|
|
@@ -42,11 +37,11 @@ export interface NewsletterSignupProps {
|
|
|
42
37
|
/** Used to specify what is displayed in the component form/feedback area. */
|
|
43
38
|
view?: NewsletterSignupViewType;
|
|
44
39
|
}
|
|
45
|
-
export declare const
|
|
46
|
-
export type HighlightColorTypes = typeof
|
|
40
|
+
export declare const newsletterHighlightColorsArray: string[];
|
|
41
|
+
export type HighlightColorTypes = typeof newsletterHighlightColorsArray[number];
|
|
47
42
|
export type NewsletterSignupViewType = "form" | "submitting" | "confirmation" | "error";
|
|
48
43
|
/**
|
|
49
|
-
* The NewsletterSignup component provides a way for patrons to register for an
|
|
44
|
+
* The `NewsletterSignup` component provides a way for patrons to register for an
|
|
50
45
|
* email-based newsletter distribution list.
|
|
51
46
|
*/
|
|
52
47
|
export declare const NewsletterSignup: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<NewsletterSignupProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<NewsletterSignupProps>>;
|
|
@@ -1,14 +1,12 @@
|
|
|
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
|
|
5
|
-
interface BaseProps {
|
|
3
|
+
export declare const notificationVariantsArray: readonly ["standard", "announcement", "warning"];
|
|
4
|
+
export type NotificationVariants = typeof notificationVariantsArray[number];
|
|
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
|
|
@@ -18,16 +16,14 @@ interface BaseProps {
|
|
|
18
16
|
notificationHeading?: string | JSX.Element;
|
|
19
17
|
/** Optional prop to control the coloring of the `Notification` text and the
|
|
20
18
|
* visibility of an applicable icon. */
|
|
21
|
-
|
|
19
|
+
variant?: NotificationVariants;
|
|
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
|
-
|
|
28
|
-
export interface NotificationProps extends BasePropsWithoutAlignText {
|
|
29
|
-
/** Additional `className` to add. */
|
|
30
|
-
className?: string;
|
|
26
|
+
export interface NotificationProps extends BasePropsWithoutAlignText, BoxProps {
|
|
31
27
|
/** Optional prop to control whether a `Notification` can be dismissed
|
|
32
28
|
* (closed) by a user. */
|
|
33
29
|
dismissible?: boolean;
|
|
@@ -45,8 +41,8 @@ export declare const NotificationHeading: ChakraComponent<React.ForwardRefExotic
|
|
|
45
41
|
*/
|
|
46
42
|
export declare const NotificationContent: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<NotificationContentProps> & React.RefAttributes<HTMLDivElement>>, NotificationContentProps>;
|
|
47
43
|
/**
|
|
48
|
-
*
|
|
49
|
-
* standard, announcement, and warning.
|
|
44
|
+
* `Notification` is a component used to present users with three different levels
|
|
45
|
+
* of notifications: standard, announcement, and warning.
|
|
50
46
|
*/
|
|
51
47
|
export declare const Notification: ChakraComponent<React.ForwardRefExoticComponent<NotificationProps & React.RefAttributes<HTMLDivElement>>, NotificationProps>;
|
|
52
48
|
export default Notification;
|
|
@@ -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 PaginationProps {
|
|
4
|
-
/** Additional className. */
|
|
5
|
-
className?: string;
|
|
3
|
+
export interface PaginationProps extends BoxProps {
|
|
6
4
|
/** The currentPage can be used to programatically force the selected page to change
|
|
7
5
|
* without the user explicitly requesting it – for example, if the user should be
|
|
8
6
|
* brought back to the first page of a set of results after a new search. */
|
|
@@ -11,8 +9,6 @@ export interface PaginationProps {
|
|
|
11
9
|
* to use for a link's `href` attribute. This is used when the current
|
|
12
10
|
* page should refresh when navigating. */
|
|
13
11
|
getPageHref?: undefined | ((pageNumber: number) => string);
|
|
14
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
15
|
-
id?: string;
|
|
16
12
|
/** The initially selected page (default value is 1). */
|
|
17
13
|
initialPage?: number;
|
|
18
14
|
/** The callback function called when an item is selected and the current
|
|
@@ -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 progressIndicatorSizesArray: readonly ["default", "small"];
|
|
4
4
|
export declare const progressIndicatorTypesArray: readonly ["circular", "linear"];
|
|
@@ -6,9 +6,7 @@ export declare const progressIndicatorLabelPlacementsArray: readonly ["bottom",
|
|
|
6
6
|
export type ProgressIndicatorSizes = typeof progressIndicatorSizesArray[number];
|
|
7
7
|
export type ProgressIndicatorTypes = typeof progressIndicatorTypesArray[number];
|
|
8
8
|
export type ProgressIndicatorLabelPlacements = typeof progressIndicatorLabelPlacementsArray[number];
|
|
9
|
-
interface BaseProgressIndicatorProps {
|
|
10
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
11
|
-
id: string;
|
|
9
|
+
interface BaseProgressIndicatorProps extends BoxProps {
|
|
12
10
|
/** Whether the `ProgressIndicator` should be linear or circular. */
|
|
13
11
|
indicatorType?: ProgressIndicatorTypes;
|
|
14
12
|
/** Whether the progress animation should display because the `value` prop is
|
|
@@ -35,7 +33,7 @@ interface CircularProgressIndicatorProps extends BaseProgressIndicatorProps {
|
|
|
35
33
|
}
|
|
36
34
|
export type ProgressIndicatorProps = LinearProgressIndicatorProps | CircularProgressIndicatorProps;
|
|
37
35
|
/**
|
|
38
|
-
*
|
|
36
|
+
* `ProgressIndicator` displays a progress status for any task that takes a long
|
|
39
37
|
* time to complete or consists of multiple steps. Examples include downloading,
|
|
40
38
|
* uploading, or processing.
|
|
41
39
|
*/
|