@nypl/design-system-react-components 2.0.0 → 2.1.0-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.
- package/README.md +466 -17
- package/dist/design-system-react-components.cjs +528 -0
- package/dist/design-system-react-components.js +37957 -0
- package/dist/src/components/Accordion/Accordion.d.ts +29 -0
- package/dist/src/components/AlphabetFilter/AlphabetFilter.d.ts +23 -0
- package/dist/src/components/AudioPlayer/AudioPlayer.d.ts +43 -0
- package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +24 -0
- package/dist/src/components/Button/Button.d.ts +35 -0
- package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +25 -0
- package/dist/src/components/Card/Card.d.ts +55 -0
- package/dist/src/components/Checkbox/Checkbox.d.ts +47 -0
- package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +51 -0
- package/dist/src/components/ComponentWrapper/ComponentWrapper.d.ts +31 -0
- package/dist/src/components/DatePicker/DatePicker.d.ts +82 -0
- package/dist/src/components/FeaturedContent/FeaturedContent.d.ts +29 -0
- package/dist/src/components/FeedbackBox/FeedbackBox.d.ts +64 -0
- package/dist/src/components/FeedbackBox/useFeedbackBoxReducer.d.ts +19 -0
- package/dist/src/components/Fieldset/Fieldset.d.ts +24 -0
- package/dist/src/components/Form/Form.d.ts +31 -0
- package/dist/src/components/Grid/SimpleGrid.d.ts +20 -0
- package/dist/src/components/Heading/Heading.d.ts +42 -0
- package/dist/src/components/HelperErrorText/HelperErrorText.d.ts +34 -0
- package/dist/src/components/Hero/Hero.d.ts +49 -0
- package/dist/src/components/HorizontalRule/HorizontalRule.d.ts +11 -0
- package/dist/src/components/Icons/Icon.d.ts +41 -0
- package/dist/src/components/Icons/IconSvgs.d.ts +196 -0
- package/dist/src/components/Icons/iconVariables.d.ts +6 -0
- package/dist/src/components/Image/Image.d.ts +68 -0
- package/dist/src/components/Label/Label.d.ts +25 -0
- package/dist/src/components/Link/Link.d.ts +32 -0
- package/dist/src/components/List/List.d.ts +43 -0
- package/dist/src/components/Logo/Logo.d.ts +29 -0
- package/dist/src/components/Logo/LogoSvgs.d.ts +166 -0
- package/dist/src/components/Logo/logoVariables.d.ts +2 -0
- package/dist/src/components/Modal/Modal.d.ts +35 -0
- package/dist/src/components/NewsletterSignup/NewsletterSignup.d.ts +46 -0
- package/dist/src/components/Notification/Notification.d.ts +52 -0
- package/dist/src/components/Pagination/Pagination.d.ts +27 -0
- package/dist/src/components/ProgressIndicator/ProgressIndicator.d.ts +32 -0
- package/dist/src/components/Radio/Radio.d.ts +43 -0
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +51 -0
- package/dist/src/components/SearchBar/SearchBar.d.ts +58 -0
- package/dist/src/components/Select/Select.d.ts +59 -0
- package/dist/src/components/SkeletonLoader/SkeletonLoader.d.ts +42 -0
- package/dist/src/components/SkipNavigation/SkipNavigation.d.ts +19 -0
- package/dist/src/components/Slider/Slider.d.ts +65 -0
- package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +42 -0
- package/dist/src/components/SocialMediaLinks/SocialMediaLinksUtils.d.ts +7 -0
- package/dist/src/components/StatusBadge/StatusBadge.d.ts +19 -0
- package/dist/src/components/StructuredContent/StructuredContent.d.ts +30 -0
- package/dist/src/components/StyleGuide/ColorCard.d.ts +348 -0
- package/dist/src/components/StyledList/StyledList.d.ts +26 -0
- package/dist/src/components/Table/Table.d.ts +32 -0
- package/dist/src/components/Tabs/Tabs.d.ts +28 -0
- package/dist/src/components/TagSet/TagSet.d.ts +24 -0
- package/dist/src/components/TagSet/TagSetExplore.d.ts +28 -0
- package/dist/src/components/TagSet/TagSetFilter.d.ts +25 -0
- package/dist/src/components/TagSet/TooltipWrapper.d.ts +9 -0
- package/dist/src/components/Template/Template.d.ts +140 -0
- package/dist/src/components/Text/Text.d.ts +27 -0
- package/dist/src/components/TextInput/TextInput.d.ts +92 -0
- package/dist/src/components/Toggle/Toggle.d.ts +43 -0
- package/dist/src/components/Tooltip/Tooltip.d.ts +17 -0
- package/dist/src/components/VideoPlayer/VideoPlayer.d.ts +42 -0
- package/dist/src/helpers/getSectionColors.d.ts +8 -0
- package/dist/src/helpers/types.d.ts +50 -0
- package/dist/src/hooks/useCarouselStyles.d.ts +17 -0
- package/dist/src/hooks/useCloseDropDown.d.ts +7 -0
- package/dist/src/hooks/useNYPLBreakpoints.d.ts +13 -0
- package/dist/src/hooks/useNYPLTheme.d.ts +75 -0
- package/dist/src/hooks/useStateWithDependencies.d.ts +8 -0
- package/dist/src/hooks/useWindowSize.d.ts +10 -0
- package/dist/src/index.d.ts +87 -0
- package/dist/src/theme/components/accordion.d.ts +34 -0
- package/dist/src/theme/components/alphabetFilter.d.ts +40 -0
- package/dist/src/theme/components/audioPlayer.d.ts +16 -0
- package/dist/src/theme/components/breadcrumb.d.ts +158 -0
- package/dist/src/theme/components/button.d.ts +152 -0
- package/dist/src/theme/components/buttonGroup.d.ts +11 -0
- package/dist/src/theme/components/card.d.ts +485 -0
- package/dist/src/theme/components/checkbox.d.ts +178 -0
- package/dist/src/theme/components/checkboxGroup.d.ts +14 -0
- package/dist/src/theme/components/componentWrapper.d.ts +12 -0
- package/dist/src/theme/components/customTable.d.ts +739 -0
- package/dist/src/theme/components/datePicker.d.ts +17 -0
- package/dist/src/theme/components/featuredContent.d.ts +70 -0
- package/dist/src/theme/components/feedbackBox.d.ts +100 -0
- package/dist/src/theme/components/fieldset.d.ts +24 -0
- package/dist/src/theme/components/filterBar.d.ts +46 -0
- package/dist/src/theme/components/global.d.ts +141 -0
- package/dist/src/theme/components/globalMixins.d.ts +40 -0
- package/dist/src/theme/components/heading.d.ts +372 -0
- package/dist/src/theme/components/helperErrorText.d.ts +18 -0
- package/dist/src/theme/components/hero.d.ts +639 -0
- package/dist/src/theme/components/horizontalRule.d.ts +18 -0
- package/dist/src/theme/components/icon.d.ts +62251 -0
- package/dist/src/theme/components/image.d.ts +754 -0
- package/dist/src/theme/components/label.d.ts +22 -0
- package/dist/src/theme/components/link.d.ts +152 -0
- package/dist/src/theme/components/list.d.ts +230 -0
- package/dist/src/theme/components/logo.d.ts +477 -0
- package/dist/src/theme/components/modal.d.ts +27 -0
- package/dist/src/theme/components/multiSelect.d.ts +29 -0
- package/dist/src/theme/components/multiSelectMenuButton.d.ts +99 -0
- package/dist/src/theme/components/newsletterSignup.d.ts +93 -0
- package/dist/src/theme/components/notification.d.ts +137 -0
- package/dist/src/theme/components/pagination.d.ts +19 -0
- package/dist/src/theme/components/progressIndicator.d.ts +69 -0
- package/dist/src/theme/components/radio.d.ts +202 -0
- package/dist/src/theme/components/radioGroup.d.ts +14 -0
- package/dist/src/theme/components/searchBar.d.ts +34 -0
- package/dist/src/theme/components/select.d.ts +126 -0
- package/dist/src/theme/components/skeletonLoader.d.ts +105 -0
- package/dist/src/theme/components/skipNavigation.d.ts +28 -0
- package/dist/src/theme/components/slider.d.ts +78 -0
- package/dist/src/theme/components/socialmedialinks.d.ts +192 -0
- package/dist/src/theme/components/statusBadge.d.ts +37 -0
- package/dist/src/theme/components/structuredContent.d.ts +454 -0
- package/dist/src/theme/components/styledList.d.ts +51 -0
- package/dist/src/theme/components/tabs.d.ts +172 -0
- package/dist/src/theme/components/tagSet.d.ts +154 -0
- package/dist/src/theme/components/template.d.ts +98 -0
- package/dist/src/theme/components/text.d.ts +59 -0
- package/dist/src/theme/components/textInput.d.ts +360 -0
- package/dist/src/theme/components/toggle.d.ts +129 -0
- package/dist/src/theme/components/tooltip.d.ts +21 -0
- package/dist/src/theme/components/videoPlayer.d.ts +47 -0
- package/dist/src/theme/foundations/breakpoints.d.ts +23 -0
- package/dist/src/theme/foundations/colors.d.ts +3 -0
- package/dist/src/theme/foundations/global.d.ts +68 -0
- package/dist/src/theme/foundations/radii.d.ts +11 -0
- package/dist/src/theme/foundations/shadows.d.ts +4 -0
- package/dist/src/theme/foundations/spacing.d.ts +96 -0
- package/dist/src/theme/foundations/typography.d.ts +8 -0
- package/dist/src/theme/index.d.ts +20 -0
- package/dist/src/theme/internalChakraProvider.d.ts +67 -0
- package/dist/src/theme/provider.d.ts +4 -0
- package/dist/src/theme/types.d.ts +1 -0
- package/dist/src/utils/colorUtils.d.ts +5 -0
- package/dist/src/utils/interfaces.d.ts +5 -0
- package/dist/src/utils/utils.d.ts +42 -0
- package/dist/styles.css +1 -0
- package/package.json +132 -24
- package/CHANGELOG.md +0 -139
- package/dist/design-system-react-components.min.js +0 -23
- package/dist/design-system-react-components.min.js.map +0 -1
- package/lib/components/00-base/Container/Container.d.ts +0 -6
- package/lib/components/00-base/Container/Container.js +0 -19
- package/lib/components/00-base/Container/Modal.d.ts +0 -12
- package/lib/components/00-base/Container/Modal.js +0 -29
- package/lib/components/00-base/Container/Modal.stories.d.ts +0 -7
- package/lib/components/00-base/Container/Modal.stories.js +0 -20
- package/lib/components/00-base/Placeholder.d.ts +0 -10
- package/lib/components/00-base/Placeholder.js +0 -23
- package/lib/components/00-base/SectionName.d.ts +0 -4
- package/lib/components/00-base/SectionName.js +0 -16
- package/lib/components/01-atoms/Button/Button.d.ts +0 -52
- package/lib/components/01-atoms/Button/Button.js +0 -76
- package/lib/components/01-atoms/Button/Button.stories.d.ts +0 -14
- package/lib/components/01-atoms/Button/Button.stories.js +0 -33
- package/lib/components/01-atoms/Button/ButtonTypes.d.ts +0 -10
- package/lib/components/01-atoms/Button/ButtonTypes.js +0 -14
- package/lib/components/01-atoms/Forms/Checkbox.d.ts +0 -21
- package/lib/components/01-atoms/Forms/Checkbox.js +0 -27
- package/lib/components/01-atoms/Forms/Checkbox.stories.d.ts +0 -7
- package/lib/components/01-atoms/Forms/Checkbox.stories.js +0 -23
- package/lib/components/01-atoms/Forms/DateRangeForm.d.ts +0 -31
- package/lib/components/01-atoms/Forms/DateRangeForm.js +0 -27
- package/lib/components/01-atoms/Forms/DateRangeForm.stories.d.ts +0 -9
- package/lib/components/01-atoms/Forms/DateRangeForm.stories.js +0 -23
- package/lib/components/01-atoms/Forms/FormDropdown.d.ts +0 -22
- package/lib/components/01-atoms/Forms/FormDropdown.js +0 -64
- package/lib/components/01-atoms/Forms/FormDropdown.stories.d.ts +0 -8
- package/lib/components/01-atoms/Forms/FormDropdown.stories.js +0 -22
- package/lib/components/01-atoms/Forms/HelperErrorText.d.ts +0 -26
- package/lib/components/01-atoms/Forms/HelperErrorText.js +0 -29
- package/lib/components/01-atoms/Forms/HelperErrorText.stories.d.ts +0 -9
- package/lib/components/01-atoms/Forms/HelperErrorText.stories.js +0 -23
- package/lib/components/01-atoms/Forms/Input.d.ts +0 -47
- package/lib/components/01-atoms/Forms/Input.js +0 -39
- package/lib/components/01-atoms/Forms/Input.stories.d.ts +0 -10
- package/lib/components/01-atoms/Forms/Input.stories.js +0 -22
- package/lib/components/01-atoms/Forms/Label.d.ts +0 -19
- package/lib/components/01-atoms/Forms/Label.js +0 -22
- package/lib/components/01-atoms/Forms/Label.stories.d.ts +0 -7
- package/lib/components/01-atoms/Forms/Label.stories.js +0 -20
- package/lib/components/01-atoms/Forms/TextField.d.ts +0 -26
- package/lib/components/01-atoms/Forms/TextField.js +0 -36
- package/lib/components/01-atoms/Forms/TextField.stories.d.ts +0 -7
- package/lib/components/01-atoms/Forms/TextField.stories.js +0 -20
- package/lib/components/01-atoms/Images/Icons/Icon.d.ts +0 -14
- package/lib/components/01-atoms/Images/Icons/Icon.js +0 -38
- package/lib/components/01-atoms/Images/Image/Image.d.ts +0 -8
- package/lib/components/01-atoms/Images/Image/Image.js +0 -32
- package/lib/components/01-atoms/Images/Image/Image.stories.d.ts +0 -8
- package/lib/components/01-atoms/Images/Image/Image.stories.js +0 -24
- package/lib/components/01-atoms/Links/BasicLink.d.ts +0 -15
- package/lib/components/01-atoms/Links/BasicLink.js +0 -50
- package/lib/components/01-atoms/Links/BasicLink.stories.d.ts +0 -8
- package/lib/components/01-atoms/Links/BasicLink.stories.js +0 -21
- package/lib/components/01-atoms/Links/IconLink.d.ts +0 -13
- package/lib/components/01-atoms/Links/IconLink.js +0 -44
- package/lib/components/01-atoms/Links/IconLink.stories.d.ts +0 -10
- package/lib/components/01-atoms/Links/IconLink.stories.js +0 -24
- package/lib/components/01-atoms/Links/Link.d.ts +0 -13
- package/lib/components/01-atoms/Links/Link.js +0 -51
- package/lib/components/01-atoms/Links/UnderlineLink.d.ts +0 -11
- package/lib/components/01-atoms/Links/UnderlineLink.js +0 -29
- package/lib/components/01-atoms/Links/UnderlineLink.stories.d.ts +0 -8
- package/lib/components/01-atoms/Links/UnderlineLink.stories.js +0 -21
- package/lib/components/01-atoms/Text/Headings/Heading.d.ts +0 -16
- package/lib/components/01-atoms/Text/Headings/Heading.js +0 -40
- package/lib/components/01-atoms/Text/Headings/Heading.stories.d.ts +0 -12
- package/lib/components/01-atoms/Text/Headings/Heading.stories.js +0 -35
- package/lib/components/01-atoms/Text/Headings/RNSectionTitle.d.ts +0 -2
- package/lib/components/01-atoms/Text/Headings/RNSectionTitle.js +0 -18
- package/lib/components/01-atoms/Text/Headings/RNSectionTitle.stories.d.ts +0 -7
- package/lib/components/01-atoms/Text/Headings/RNSectionTitle.stories.js +0 -24
- package/lib/components/01-atoms/Text/Text/BodyText.d.ts +0 -12
- package/lib/components/01-atoms/Text/Text/BodyText.js +0 -73
- package/lib/components/01-atoms/Text/Text/BodyText.stories.d.ts +0 -14
- package/lib/components/01-atoms/Text/Text/BodyText.stories.js +0 -54
- package/lib/components/02-molecules/Cards/EditionCard.d.ts +0 -31
- package/lib/components/02-molecules/Cards/EditionCard.js +0 -51
- package/lib/components/02-molecules/Cards/EditionCard.stories.d.ts +0 -13
- package/lib/components/02-molecules/Cards/EditionCard.stories.js +0 -26
- package/lib/components/02-molecules/Cards/SearchResultItem.d.ts +0 -17
- package/lib/components/02-molecules/Cards/SearchResultItem.js +0 -40
- package/lib/components/02-molecules/Cards/SearchResultItem.stories.d.ts +0 -8
- package/lib/components/02-molecules/Cards/SearchResultItem.stories.js +0 -31
- package/lib/components/02-molecules/Dropdown/Dropdown.d.ts +0 -21
- package/lib/components/02-molecules/Dropdown/Dropdown.js +0 -55
- package/lib/components/02-molecules/Dropdown/Dropdown.stories.d.ts +0 -14
- package/lib/components/02-molecules/Dropdown/Dropdown.stories.js +0 -33
- package/lib/components/02-molecules/Headings/SectionTitle.d.ts +0 -17
- package/lib/components/02-molecules/Headings/SectionTitle.js +0 -42
- package/lib/components/02-molecules/Headings/SectionTitle.stories.d.ts +0 -8
- package/lib/components/02-molecules/Headings/SectionTitle.stories.js +0 -20
- package/lib/components/02-molecules/Menus/Breadcrumbs/Breadcrumbs.d.ts +0 -14
- package/lib/components/02-molecules/Menus/Breadcrumbs/Breadcrumbs.js +0 -51
- package/lib/components/02-molecules/Menus/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -8
- package/lib/components/02-molecules/Menus/Breadcrumbs/Breadcrumbs.stories.js +0 -30
- package/lib/components/02-molecules/Menus/Pagination/Pagination.d.ts +0 -11
- package/lib/components/02-molecules/Menus/Pagination/Pagination.js +0 -57
- package/lib/components/02-molecules/Menus/Pagination/Pagination.stories.d.ts +0 -7
- package/lib/components/02-molecules/Menus/Pagination/Pagination.stories.js +0 -20
- package/lib/components/02-molecules/SearchBar/SearchBar.d.ts +0 -26
- package/lib/components/02-molecules/SearchBar/SearchBar.js +0 -69
- package/lib/components/02-molecules/SearchBar/SearchBar.stories.d.ts +0 -11
- package/lib/components/02-molecules/SearchBar/SearchBar.stories.js +0 -24
- package/lib/components/03-organisms/Accordion/Accordion.d.ts +0 -19
- package/lib/components/03-organisms/Accordion/Accordion.js +0 -41
- package/lib/components/03-organisms/Accordion/Accordion.stories.d.ts +0 -7
- package/lib/components/03-organisms/Accordion/Accordion.stories.js +0 -30
- package/lib/components/03-organisms/Headers/HeaderImgRight.d.ts +0 -12
- package/lib/components/03-organisms/Headers/HeaderImgRight.js +0 -32
- package/lib/components/03-organisms/Headers/HeaderImgRight.stories.d.ts +0 -7
- package/lib/components/03-organisms/Headers/HeaderImgRight.stories.js +0 -19
- package/lib/components/03-organisms/Headers/RNHeaderWithSearch.d.ts +0 -19
- package/lib/components/03-organisms/Headers/RNHeaderWithSearch.js +0 -27
- package/lib/components/03-organisms/Headers/RNHeaderWithSearch.stories.d.ts +0 -7
- package/lib/components/03-organisms/Headers/RNHeaderWithSearch.stories.js +0 -26
- package/lib/components/03-organisms/Hero/Hero.d.ts +0 -31
- package/lib/components/03-organisms/Hero/Hero.js +0 -62
- package/lib/components/03-organisms/Hero/Hero.stories.d.ts +0 -11
- package/lib/components/03-organisms/Hero/Hero.stories.js +0 -35
- package/lib/components/03-organisms/Hero/HeroTypes.d.ts +0 -6
- package/lib/components/03-organisms/Hero/HeroTypes.js +0 -9
- package/lib/components/03-organisms/List/UnorderedList.d.ts +0 -18
- package/lib/components/03-organisms/List/UnorderedList.js +0 -28
- package/lib/components/03-organisms/List/UnorderedList.stories.d.ts +0 -11
- package/lib/components/03-organisms/List/UnorderedList.stories.js +0 -73
- package/lib/components/03-organisms/SearchPromo/SearchPromo.d.ts +0 -22
- package/lib/components/03-organisms/SearchPromo/SearchPromo.js +0 -30
- package/lib/components/03-organisms/SearchPromo/SearchPromo.stories.d.ts +0 -8
- package/lib/components/03-organisms/SearchPromo/SearchPromo.stories.js +0 -28
- package/lib/helpers/hoc/WithOneChild.d.ts +0 -8
- package/lib/helpers/hoc/WithOneChild.js +0 -63
- package/lib/index.d.ts +0 -24
- package/lib/index.js +0 -51
- package/lib/utils/bem.d.ts +0 -1
- package/lib/utils/bem.js +0 -35
- package/tsd.d.ts +0 -4
- package/webpack.prod.js +0 -38
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
+
export interface SliderProps {
|
|
4
|
+
/** Additional class name for the Slider component. */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** The initial value for the single `Slider` or an array of two number
|
|
7
|
+
* values for the `isRangeSlider` case. */
|
|
8
|
+
defaultValue?: number | number[];
|
|
9
|
+
/** Optional string to populate the HelperErrorText for standard state */
|
|
10
|
+
helperText?: HelperErrorTextType;
|
|
11
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
12
|
+
id: string;
|
|
13
|
+
/** Optional string to populate the `HelperErrorText` for the error state
|
|
14
|
+
* when `isInvalid` is true. */
|
|
15
|
+
invalidText?: HelperErrorTextType;
|
|
16
|
+
/** Adds the 'disabled' state to the slider and text input(s) when true. */
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
/** Adds the 'invalid' state to the slider and text input(s) when true. */
|
|
19
|
+
isInvalid?: boolean;
|
|
20
|
+
/** Offers the ability to render a slider with one value or
|
|
21
|
+
* a range slider with two values. */
|
|
22
|
+
isRangeSlider?: boolean;
|
|
23
|
+
/** Adds the 'required' attribute to the input(s) when true. */
|
|
24
|
+
isRequired?: boolean;
|
|
25
|
+
/** The `Slider`'s label. In the default single slider, this will be linked to
|
|
26
|
+
* the only `TextInput` component. In the range slider, this will be linked to
|
|
27
|
+
* the first `TextInput` component. If `showLabel` is false, then this value
|
|
28
|
+
* will be set in the `Slider`'s `aria-label` attribute. */
|
|
29
|
+
labelText: string;
|
|
30
|
+
/** Maximum value allowed. */
|
|
31
|
+
max?: number;
|
|
32
|
+
/** Minimum value allowed. */
|
|
33
|
+
min?: number;
|
|
34
|
+
/** The name prop indicates into which form this component belongs to. */
|
|
35
|
+
name?: string;
|
|
36
|
+
/** Callback function that gets the value(s) selected. */
|
|
37
|
+
onChange?: (val: number | number[]) => void;
|
|
38
|
+
/** Callback function when the user is done selecting a new value. */
|
|
39
|
+
onChangeEnd?: (val: number | number[]) => void;
|
|
40
|
+
/** Offers the ability to hide the `TextInput` boxes. */
|
|
41
|
+
showBoxes?: boolean;
|
|
42
|
+
/** Offers the ability to hide the helper/invalid text. */
|
|
43
|
+
showHelperInvalidText?: boolean;
|
|
44
|
+
/** Offers the ability to show the label onscreen or hide it. Refer
|
|
45
|
+
* to the `labelText` property for more information. */
|
|
46
|
+
showLabel?: boolean;
|
|
47
|
+
/** Whether or not to display the "(Required)" text in the label text.
|
|
48
|
+
* True by default. */
|
|
49
|
+
showRequiredLabel?: boolean;
|
|
50
|
+
/** Offers the ability to hide the static min/max values. */
|
|
51
|
+
showValues?: boolean;
|
|
52
|
+
/** The amount to increase or decrease when using the slider thumb(s). */
|
|
53
|
+
step?: number;
|
|
54
|
+
/** The value(s) to programmatically update the Slider or RangeSlider. */
|
|
55
|
+
value?: number | number[];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* The `Slider` component renders a singular value slider or a range slider
|
|
59
|
+
* with a min and max value. The value(s) can be updated through the slider
|
|
60
|
+
* thumb(s) or through the text input(s) elements.
|
|
61
|
+
*/
|
|
62
|
+
export declare const Slider: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SliderProps & {
|
|
63
|
+
children?: React.ReactNode;
|
|
64
|
+
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
65
|
+
export default Slider;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LayoutTypes } from "../../helpers/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export declare const borderTypeArray: readonly ["none", "circular", "straight"];
|
|
4
|
+
export type BorderType = typeof borderTypeArray[number];
|
|
5
|
+
export declare const colorTypeArray: readonly ["link", "textDefault", "textInverse"];
|
|
6
|
+
export type ColorType = typeof colorTypeArray[number];
|
|
7
|
+
export declare const sizeTypeArray: readonly ["small", "medium", "large"];
|
|
8
|
+
export type SizeType = typeof sizeTypeArray[number];
|
|
9
|
+
export declare const socialMediaLinkTypeArray: string[];
|
|
10
|
+
export type SocialMediaLinkType = typeof socialMediaLinkTypeArray[number];
|
|
11
|
+
export interface SocialMediaLinkDataProps {
|
|
12
|
+
/** Optional override for default platform name */
|
|
13
|
+
labelText?: string;
|
|
14
|
+
/** Required. Must be one of socialMediaLinkTypeArray */
|
|
15
|
+
type: SocialMediaLinkType;
|
|
16
|
+
/** Optional override for default social media url */
|
|
17
|
+
url?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SocialMediaLinksProps {
|
|
20
|
+
/** Optional border: straight, circular or none. */
|
|
21
|
+
borders?: BorderType;
|
|
22
|
+
/** Optional className you can add in addition to "social-media-links." */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** Any of three optional values that will change the color of the svg and label text (if any). */
|
|
25
|
+
color?: ColorType;
|
|
26
|
+
/** ID that other components can cross-reference for accessibility purposes. */
|
|
27
|
+
id?: string;
|
|
28
|
+
/** Optional desktop layout. Smaller viewports are always in a column. */
|
|
29
|
+
layout?: LayoutTypes;
|
|
30
|
+
/** Optional array of social media platform types, urls, and label texts. */
|
|
31
|
+
linksData?: SocialMediaLinkDataProps[];
|
|
32
|
+
/** Optional true/false to display names of platforms along with icons.
|
|
33
|
+
* NOTE: Labels will NOT be shown with a circular border */
|
|
34
|
+
showLabels?: boolean;
|
|
35
|
+
/** Optional size: small, medium, or large. */
|
|
36
|
+
size?: SizeType;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The SocialMediaLinks component renders a list of links for accessing social media sites.
|
|
40
|
+
*/
|
|
41
|
+
export declare const SocialMediaLinks: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SocialMediaLinksProps & React.RefAttributes<HTMLDivElement & HTMLUListElement & HTMLOListElement>>, {}>;
|
|
42
|
+
export default SocialMediaLinks;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const statusBadgeTypeArray: readonly ["low", "medium", "high"];
|
|
3
|
+
export type StatusBadgeTypes = typeof statusBadgeTypeArray[number];
|
|
4
|
+
export interface StatusBadgeProps {
|
|
5
|
+
/** Additional class for the component */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
8
|
+
id?: string;
|
|
9
|
+
/** Level of the status badge. Defaults to `"low"`. */
|
|
10
|
+
level?: StatusBadgeTypes;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The `StatusBadge` component is used to display a visual badge for three
|
|
14
|
+
* different status levels.
|
|
15
|
+
*/
|
|
16
|
+
export declare const StatusBadge: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<StatusBadgeProps & {
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
19
|
+
export default StatusBadge;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ComponentImageProps } from "../Image/Image";
|
|
3
|
+
export type StructuredContentImagePosition = "left" | "right" | "center";
|
|
4
|
+
interface StructuredContentImageProps extends ComponentImageProps {
|
|
5
|
+
/** Optional value to control the positioning of the internal `Image` component.
|
|
6
|
+
* Defaults to `"left"`. */
|
|
7
|
+
position?: StructuredContentImagePosition;
|
|
8
|
+
}
|
|
9
|
+
export interface StructuredContentProps {
|
|
10
|
+
/** Optional value to set the text for the callout heading text. */
|
|
11
|
+
calloutText?: string;
|
|
12
|
+
/** Additional class name for the `StructuredContent` component. */
|
|
13
|
+
className?: string;
|
|
14
|
+
/** Optional value to set the text for the main heading text. */
|
|
15
|
+
headingText?: string;
|
|
16
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
17
|
+
id?: string;
|
|
18
|
+
/** Object used to create and render the `Image` component. */
|
|
19
|
+
imageProps?: StructuredContentImageProps;
|
|
20
|
+
/** Required value to set the text for the body content. */
|
|
21
|
+
bodyContent: string | JSX.Element;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The `StructuredContent` component that displays a heading, callout content,
|
|
25
|
+
* an image, and body content. All are optional except for body content.
|
|
26
|
+
*/
|
|
27
|
+
export declare const StructuredContent: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<StructuredContentProps & {
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
30
|
+
export default StructuredContent;
|
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
import { PropsWithChildren } from "react";
|
|
2
|
+
export declare const colorContrastData: {
|
|
3
|
+
brand: {
|
|
4
|
+
primary: {
|
|
5
|
+
dataBlackColor: string[];
|
|
6
|
+
dataWhiteColor: string[];
|
|
7
|
+
textColor: string;
|
|
8
|
+
};
|
|
9
|
+
secondary: {
|
|
10
|
+
dataBlackColor: string[];
|
|
11
|
+
dataWhiteColor: string[];
|
|
12
|
+
textColor: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
ui: {
|
|
16
|
+
black: {
|
|
17
|
+
dataBlackColor: string[];
|
|
18
|
+
dataWhiteColor: string[];
|
|
19
|
+
textColor: string;
|
|
20
|
+
};
|
|
21
|
+
gray: {
|
|
22
|
+
xxxxDark: {
|
|
23
|
+
dataBlackColor: any[];
|
|
24
|
+
dataWhiteColor: any[];
|
|
25
|
+
textColor: string;
|
|
26
|
+
};
|
|
27
|
+
xxxDark: {
|
|
28
|
+
dataBlackColor: any[];
|
|
29
|
+
dataWhiteColor: any[];
|
|
30
|
+
textColor: string;
|
|
31
|
+
};
|
|
32
|
+
xxDark: {
|
|
33
|
+
dataBlackColor: any[];
|
|
34
|
+
dataWhiteColor: any[];
|
|
35
|
+
textColor: string;
|
|
36
|
+
};
|
|
37
|
+
xDark: {
|
|
38
|
+
dataBlackColor: any[];
|
|
39
|
+
dataWhiteColor: any[];
|
|
40
|
+
textColor: string;
|
|
41
|
+
};
|
|
42
|
+
dark: {
|
|
43
|
+
dataBlackColor: any[];
|
|
44
|
+
dataWhiteColor: any[];
|
|
45
|
+
textColor: string;
|
|
46
|
+
};
|
|
47
|
+
semiDark: {
|
|
48
|
+
dataBlackColor: any[];
|
|
49
|
+
dataWhiteColor: any[];
|
|
50
|
+
textColor: string;
|
|
51
|
+
};
|
|
52
|
+
medium: {
|
|
53
|
+
dataBlackColor: any[];
|
|
54
|
+
dataWhiteColor: any[];
|
|
55
|
+
textColor: string;
|
|
56
|
+
};
|
|
57
|
+
semiMedium: {
|
|
58
|
+
dataBlackColor: any[];
|
|
59
|
+
dataWhiteColor: any[];
|
|
60
|
+
textColor: string;
|
|
61
|
+
};
|
|
62
|
+
lightCool: {
|
|
63
|
+
dataBlackColor: string[];
|
|
64
|
+
dataWhiteColor: string[];
|
|
65
|
+
textColor: string;
|
|
66
|
+
};
|
|
67
|
+
xLightCool: {
|
|
68
|
+
dataBlackColor: string[];
|
|
69
|
+
dataWhiteColor: string[];
|
|
70
|
+
textColor: string;
|
|
71
|
+
};
|
|
72
|
+
xxLightCool: {
|
|
73
|
+
dataBlackColor: string[];
|
|
74
|
+
dataWhiteColor: string[];
|
|
75
|
+
textColor: string;
|
|
76
|
+
};
|
|
77
|
+
lightWarm: {
|
|
78
|
+
dataBlackColor: string[];
|
|
79
|
+
dataWhiteColor: string[];
|
|
80
|
+
textColor: string;
|
|
81
|
+
};
|
|
82
|
+
xLightWarm: {
|
|
83
|
+
dataBlackColor: string[];
|
|
84
|
+
dataWhiteColor: string[];
|
|
85
|
+
textColor: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
white: {
|
|
89
|
+
dataBlackColor: string[];
|
|
90
|
+
dataWhiteColor: string[];
|
|
91
|
+
textColor: string;
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
dark: {
|
|
95
|
+
ui: {
|
|
96
|
+
gray: {
|
|
97
|
+
xxDark: {
|
|
98
|
+
dataHeadingColor: string[];
|
|
99
|
+
dataBodyColor: string[];
|
|
100
|
+
};
|
|
101
|
+
xDark: {
|
|
102
|
+
dataHeadingColor: string[];
|
|
103
|
+
dataBodyColor: string[];
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
};
|
|
109
|
+
export declare const cssVars: {
|
|
110
|
+
brand: {
|
|
111
|
+
name: string;
|
|
112
|
+
dataBlackColor: string[];
|
|
113
|
+
dataWhiteColor: string[];
|
|
114
|
+
textColor: string;
|
|
115
|
+
}[];
|
|
116
|
+
blogs: {
|
|
117
|
+
colorSource: string;
|
|
118
|
+
name: string;
|
|
119
|
+
dataBlackColor: any[];
|
|
120
|
+
dataWhiteColor: any[];
|
|
121
|
+
textColor: string;
|
|
122
|
+
}[];
|
|
123
|
+
booksAndMore: {
|
|
124
|
+
colorSource: string;
|
|
125
|
+
name: string;
|
|
126
|
+
dataBlackColor: string[];
|
|
127
|
+
dataWhiteColor: string[];
|
|
128
|
+
textColor: string;
|
|
129
|
+
}[];
|
|
130
|
+
connect: {
|
|
131
|
+
name: string;
|
|
132
|
+
dataBlackColor: any[];
|
|
133
|
+
dataWhiteColor: any[];
|
|
134
|
+
textColor: string;
|
|
135
|
+
}[];
|
|
136
|
+
education: {
|
|
137
|
+
name: string;
|
|
138
|
+
dataBlackColor: string[];
|
|
139
|
+
dataWhiteColor: string[];
|
|
140
|
+
textColor: string;
|
|
141
|
+
}[];
|
|
142
|
+
locations: {
|
|
143
|
+
colorSource: string;
|
|
144
|
+
name: string;
|
|
145
|
+
dataBlackColor: string[];
|
|
146
|
+
dataWhiteColor: string[];
|
|
147
|
+
textColor: string;
|
|
148
|
+
}[];
|
|
149
|
+
research: {
|
|
150
|
+
name: string;
|
|
151
|
+
dataBlackColor: string[];
|
|
152
|
+
dataWhiteColor: string[];
|
|
153
|
+
textColor: string;
|
|
154
|
+
}[];
|
|
155
|
+
researchLibraries: ({
|
|
156
|
+
name: string;
|
|
157
|
+
dataBlackColor: string[];
|
|
158
|
+
dataWhiteColor: string[];
|
|
159
|
+
textColor: string;
|
|
160
|
+
colorSource?: undefined;
|
|
161
|
+
} | {
|
|
162
|
+
colorSource: string;
|
|
163
|
+
name: string;
|
|
164
|
+
dataBlackColor: string[];
|
|
165
|
+
dataWhiteColor: string[];
|
|
166
|
+
textColor: string;
|
|
167
|
+
})[];
|
|
168
|
+
whatsOn: ({
|
|
169
|
+
name: string;
|
|
170
|
+
dataBlackColor: string[];
|
|
171
|
+
dataWhiteColor: string[];
|
|
172
|
+
textColor: string;
|
|
173
|
+
colorSource?: undefined;
|
|
174
|
+
} | {
|
|
175
|
+
colorSource: string;
|
|
176
|
+
name: string;
|
|
177
|
+
dataBlackColor: string[];
|
|
178
|
+
dataWhiteColor: string[];
|
|
179
|
+
textColor: string;
|
|
180
|
+
})[];
|
|
181
|
+
ui: ({
|
|
182
|
+
colorSource: string;
|
|
183
|
+
name: string;
|
|
184
|
+
dataBlackColor: any[];
|
|
185
|
+
dataWhiteColor: any[];
|
|
186
|
+
textColor: string;
|
|
187
|
+
dataBgPageColor?: undefined;
|
|
188
|
+
dataBgDefaultColor?: undefined;
|
|
189
|
+
dataBrandPrimaryColor?: undefined;
|
|
190
|
+
dataBrandSecondaryColor?: undefined;
|
|
191
|
+
} | {
|
|
192
|
+
colorSource: string;
|
|
193
|
+
name: string;
|
|
194
|
+
dataBlackColor: any[];
|
|
195
|
+
dataWhiteColor: any[];
|
|
196
|
+
dataBgPageColor: string[];
|
|
197
|
+
dataBgDefaultColor: string[];
|
|
198
|
+
textColor: string;
|
|
199
|
+
dataBrandPrimaryColor?: undefined;
|
|
200
|
+
dataBrandSecondaryColor?: undefined;
|
|
201
|
+
} | {
|
|
202
|
+
name: string;
|
|
203
|
+
dataBlackColor: any[];
|
|
204
|
+
dataWhiteColor: any[];
|
|
205
|
+
dataBgPageColor: any[];
|
|
206
|
+
dataBgDefaultColor: any[];
|
|
207
|
+
textColor: string;
|
|
208
|
+
colorSource?: undefined;
|
|
209
|
+
dataBrandPrimaryColor?: undefined;
|
|
210
|
+
dataBrandSecondaryColor?: undefined;
|
|
211
|
+
} | {
|
|
212
|
+
colorSource: string;
|
|
213
|
+
name: string;
|
|
214
|
+
dataBlackColor: string[];
|
|
215
|
+
dataWhiteColor: string[];
|
|
216
|
+
dataBrandPrimaryColor: any[];
|
|
217
|
+
dataBrandSecondaryColor: any[];
|
|
218
|
+
dataBgPageColor: string[];
|
|
219
|
+
dataBgDefaultColor: any[];
|
|
220
|
+
textColor: string;
|
|
221
|
+
})[];
|
|
222
|
+
grayscaleRoot: {
|
|
223
|
+
name: string;
|
|
224
|
+
dataBlackColor: string[];
|
|
225
|
+
dataWhiteColor: string[];
|
|
226
|
+
textColor: string;
|
|
227
|
+
}[];
|
|
228
|
+
grayscaleCool: {
|
|
229
|
+
name: string;
|
|
230
|
+
dataBlackColor: any[];
|
|
231
|
+
dataWhiteColor: any[];
|
|
232
|
+
textColor: string;
|
|
233
|
+
}[];
|
|
234
|
+
grayscaleWarm: {
|
|
235
|
+
name: string;
|
|
236
|
+
dataBlackColor: string[];
|
|
237
|
+
dataWhiteColor: string[];
|
|
238
|
+
textColor: string;
|
|
239
|
+
}[];
|
|
240
|
+
dark: ({
|
|
241
|
+
colorSource: string;
|
|
242
|
+
name: string;
|
|
243
|
+
dataBlackColor: any[];
|
|
244
|
+
dataWhiteColor: any[];
|
|
245
|
+
dataHeadingColor: string[];
|
|
246
|
+
dataBodyColor: string[];
|
|
247
|
+
textColor: string;
|
|
248
|
+
dataDarkBgPageColor?: undefined;
|
|
249
|
+
dataDarkBgDefaultColor?: undefined;
|
|
250
|
+
dataBrandPrimaryColor?: undefined;
|
|
251
|
+
dataBrandSecondaryColor?: undefined;
|
|
252
|
+
} | {
|
|
253
|
+
colorSource: string;
|
|
254
|
+
name: string;
|
|
255
|
+
dataBlackColor: any[];
|
|
256
|
+
dataWhiteColor: any[];
|
|
257
|
+
dataDarkBgPageColor: any[];
|
|
258
|
+
dataDarkBgDefaultColor: any[];
|
|
259
|
+
textColor: string;
|
|
260
|
+
dataHeadingColor?: undefined;
|
|
261
|
+
dataBodyColor?: undefined;
|
|
262
|
+
dataBrandPrimaryColor?: undefined;
|
|
263
|
+
dataBrandSecondaryColor?: undefined;
|
|
264
|
+
} | {
|
|
265
|
+
name: string;
|
|
266
|
+
dataBlackColor: any[];
|
|
267
|
+
dataWhiteColor: any[];
|
|
268
|
+
dataDarkBgPageColor: any[];
|
|
269
|
+
dataDarkBgDefaultColor: any[];
|
|
270
|
+
textColor: string;
|
|
271
|
+
colorSource?: undefined;
|
|
272
|
+
dataHeadingColor?: undefined;
|
|
273
|
+
dataBodyColor?: undefined;
|
|
274
|
+
dataBrandPrimaryColor?: undefined;
|
|
275
|
+
dataBrandSecondaryColor?: undefined;
|
|
276
|
+
} | {
|
|
277
|
+
name: string;
|
|
278
|
+
dataDarkBgPageColor: string[];
|
|
279
|
+
dataDarkBgDefaultColor: string[];
|
|
280
|
+
dataBlackColor: string[];
|
|
281
|
+
dataWhiteColor: string[];
|
|
282
|
+
dataHeadingColor: string[];
|
|
283
|
+
dataBodyColor: string[];
|
|
284
|
+
textColor: string;
|
|
285
|
+
colorSource?: undefined;
|
|
286
|
+
dataBrandPrimaryColor?: undefined;
|
|
287
|
+
dataBrandSecondaryColor?: undefined;
|
|
288
|
+
} | {
|
|
289
|
+
colorSource: string;
|
|
290
|
+
name: string;
|
|
291
|
+
dataBlackColor: any[];
|
|
292
|
+
dataWhiteColor: any[];
|
|
293
|
+
dataBrandPrimaryColor: any[];
|
|
294
|
+
dataBrandSecondaryColor: any[];
|
|
295
|
+
dataDarkBgPageColor: any[];
|
|
296
|
+
dataDarkBgDefaultColor: any[];
|
|
297
|
+
textColor: string;
|
|
298
|
+
dataHeadingColor?: undefined;
|
|
299
|
+
dataBodyColor?: undefined;
|
|
300
|
+
})[];
|
|
301
|
+
};
|
|
302
|
+
export declare const makeColorCard: (data: any) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
303
|
+
export declare const getColorCards: (category: any) => any[];
|
|
304
|
+
export interface DataTableProps {
|
|
305
|
+
/** Contrast and WCAG compliance data related to the color ui.bg.page when
|
|
306
|
+
* used with the current color. */
|
|
307
|
+
dataBgPageColor: string[];
|
|
308
|
+
/** Contrast and WCAG compliance data related to the color ui.bg.default when
|
|
309
|
+
* used with the current color. */
|
|
310
|
+
dataBgDefaultColor: string[];
|
|
311
|
+
/** Contrast and WCAG compliance data related to the color dark.ui.bg.page when
|
|
312
|
+
* used with the current color. */
|
|
313
|
+
dataDarkBgPageColor: string[];
|
|
314
|
+
/** Contrast and WCAG compliance data related to the color dark.ui.bg.default when
|
|
315
|
+
* used with the current color. */
|
|
316
|
+
dataDarkBgDefaultColor: string[];
|
|
317
|
+
/** Contrast and WCAG compliance data related to the color black when used
|
|
318
|
+
* with the current color. */
|
|
319
|
+
dataBlackColor: string[];
|
|
320
|
+
/** Contrast and WCAG compliance data related to the NYPL Brand primary color
|
|
321
|
+
* when used with the current color. */
|
|
322
|
+
dataBrandPrimaryColor: string[];
|
|
323
|
+
/** Contrast and WCAG compliance data related to the default color for basic
|
|
324
|
+
* text elements when used with the current color. */
|
|
325
|
+
dataDarkBodyColor?: string[];
|
|
326
|
+
/** Contrast and WCAG compliance data related to the NYPL Brand secondary color
|
|
327
|
+
* when used with the current color. */
|
|
328
|
+
dataBrandSecondaryColor: string[];
|
|
329
|
+
/** Contrast and WCAG compliance data related to the default color for
|
|
330
|
+
* heading elements when used with the current color. */
|
|
331
|
+
dataDarkHeadingColor?: string[];
|
|
332
|
+
/** Contrast and WCAG compliance data related to the color white when used
|
|
333
|
+
* with the current color. */
|
|
334
|
+
dataWhiteColor: string[];
|
|
335
|
+
/** The color to use for text in the color card. */
|
|
336
|
+
textColor: string;
|
|
337
|
+
}
|
|
338
|
+
export interface ColorCardProps extends DataTableProps {
|
|
339
|
+
/** The backgroundColor of the color card. */
|
|
340
|
+
backgroundColor: string;
|
|
341
|
+
/** The name of a color's javascript theme object. */
|
|
342
|
+
colorName: string;
|
|
343
|
+
/** The name of the color that the current color is based on. */
|
|
344
|
+
colorSource: string;
|
|
345
|
+
}
|
|
346
|
+
export declare const DataTable: (props: PropsWithChildren<DataTableProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
347
|
+
export declare const ColorCard: (props: PropsWithChildren<ColorCardProps>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
348
|
+
export default ColorCard;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const textSizesArray: readonly ["default", "body1", "body2", "caption", "tag", "mini"];
|
|
3
|
+
export type TextSizes = typeof textSizesArray[number];
|
|
4
|
+
export interface StyledListProps {
|
|
5
|
+
/** Any child node passed to the component. */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/** A class name for the StyledList parent div. */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
10
|
+
id?: string;
|
|
11
|
+
/** Data to render if `li` children elements are not passed. It must be an
|
|
12
|
+
* array of strings or JSX elements. */
|
|
13
|
+
listItems?: (string | JSX.Element)[];
|
|
14
|
+
/** The style used to render the StyledList component. For its initial release,
|
|
15
|
+
* there is only one variant style which is the default, "capped". */
|
|
16
|
+
style?: "capped";
|
|
17
|
+
/** The font size of the `li` elements. */
|
|
18
|
+
textSize?: TextSizes;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The `StyledList` component renders an HTML list with styles that do not
|
|
22
|
+
* adhere to traditional numbered and bulleted list styles. Unlike
|
|
23
|
+
* the `List` component, `StyledList` only renders an unordered list.
|
|
24
|
+
*/
|
|
25
|
+
export declare const StyledList: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<StyledListProps & React.RefAttributes<HTMLDivElement & HTMLUListElement>>, {}>;
|
|
26
|
+
export default StyledList;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface TableProps {
|
|
3
|
+
/** Additional class name for the `Table` component. */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** Array of string values used to populate the `Table` column headers.
|
|
6
|
+
* For improved accessibility, column headers are required. */
|
|
7
|
+
columnHeaders: string[];
|
|
8
|
+
/** Hex value to set the background color of the column headers. */
|
|
9
|
+
columnHeadersBackgroundColor?: string;
|
|
10
|
+
/** Hex value to set the text color of the column headers. */
|
|
11
|
+
columnHeadersTextColor?: string;
|
|
12
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
13
|
+
id?: string;
|
|
14
|
+
/** If true, a border will be displayed between each row in the `Table`
|
|
15
|
+
* component. The default value is false. */
|
|
16
|
+
showRowDividers?: boolean;
|
|
17
|
+
/** Two-dimensional array used to populate the table rows. */
|
|
18
|
+
tableData: (string | JSX.Element)[][];
|
|
19
|
+
/** Displays `Table` title element. */
|
|
20
|
+
titleText?: string;
|
|
21
|
+
/** If true, the first cell of each row in the `Table` component will be
|
|
22
|
+
* visually styled as a header. The default value is false */
|
|
23
|
+
useRowHeaders?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Basic `Table` component used to organize and display tabular data in
|
|
27
|
+
* rows and columns.
|
|
28
|
+
*/
|
|
29
|
+
export declare const Table: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TableProps & {
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
} & React.RefAttributes<HTMLTableElement>>, {}>;
|
|
32
|
+
export default Table;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Tab, TabList, TabPanels, TabPanel } from "@chakra-ui/react";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export interface TabsDataProps {
|
|
4
|
+
label: string;
|
|
5
|
+
content: string | React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface TabsProps {
|
|
8
|
+
/** The index of the tab to display for controlled situations. */
|
|
9
|
+
defaultIndex?: number;
|
|
10
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
11
|
+
id?: string;
|
|
12
|
+
/** The callback function invoked on every tab change event. */
|
|
13
|
+
onChange?: (index: number) => any;
|
|
14
|
+
/** Array of data to display */
|
|
15
|
+
tabsData?: TabsDataProps[];
|
|
16
|
+
/** Render a hash in the url for each tab. Only available when data is
|
|
17
|
+
* passed through the `data` props. */
|
|
18
|
+
useHash?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Renders Chakra's `Tab` component with specific variants, props,
|
|
22
|
+
* and controlled styling.
|
|
23
|
+
*/
|
|
24
|
+
export declare const Tabs: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TabsProps & {
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
27
|
+
export { TabList, Tab, TabPanels, TabPanel };
|
|
28
|
+
export default Tabs;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { TagSetExploreProps } from "./TagSetExplore";
|
|
3
|
+
import { TagSetFilterProps } from "./TagSetFilter";
|
|
4
|
+
export interface BaseTagSetProps {
|
|
5
|
+
/** Additional class for the component. */
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export type TagSetTypeProps = TagSetFilterProps | TagSetExploreProps;
|
|
9
|
+
export type TagSetProps = BaseTagSetProps & TagSetTypeProps;
|
|
10
|
+
export declare function isFilterType(type: TagSetProps["type"]): type is "filter";
|
|
11
|
+
/**
|
|
12
|
+
* The `TagSet` component renders a group of individual tags which have two
|
|
13
|
+
* variants: "explore" and "filter". The "explore" tags are meant to be used for
|
|
14
|
+
* exploratory linkable elements, whereas the "filter" tags are used to display
|
|
15
|
+
* the filter values that were selected through another UI. Only "filter" tags
|
|
16
|
+
* can be dismissible.
|
|
17
|
+
*
|
|
18
|
+
* The width of a single tag will never be greater than 200px. If necessary, a
|
|
19
|
+
* tag’s label text will be truncated to keep a tag’s width at or below 200px.
|
|
20
|
+
* The full label text will be automatically revealed when the tag is hovered
|
|
21
|
+
* with a DS `Tooltip` component.
|
|
22
|
+
*/
|
|
23
|
+
export declare const TagSet: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TagSetProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
24
|
+
export default TagSet;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IconNames } from "../Icons/Icon";
|
|
3
|
+
export interface TagSetExploreDataProps {
|
|
4
|
+
/** The name of the SVG `Icon` to render before the tag label. */
|
|
5
|
+
iconName?: IconNames;
|
|
6
|
+
/** The content to display; should be a link-type component. */
|
|
7
|
+
label: JSX.Element;
|
|
8
|
+
}
|
|
9
|
+
export interface TagSetExploreProps {
|
|
10
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
11
|
+
id?: string;
|
|
12
|
+
/** Whether the tags should be removable. This prop is not used in the "explore" variant. */
|
|
13
|
+
isDismissible?: never;
|
|
14
|
+
/** The function to perform when a tag is clicked when `isDismissible` is
|
|
15
|
+
* true. This prop is not used in the "explore" variant.*/
|
|
16
|
+
onClick?: never;
|
|
17
|
+
/** The array of data to display as tags. */
|
|
18
|
+
tagSetData: TagSetExploreDataProps[];
|
|
19
|
+
/** The `TagSet` variant to render; "filter" by default. */
|
|
20
|
+
type: "explore";
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The "explore" `TagSet` variant will always display the tags passed as data.
|
|
24
|
+
* The `label` property in the `tagSetData` prop should be set to a link-type
|
|
25
|
+
* JSX component for linking to specific content.
|
|
26
|
+
*/
|
|
27
|
+
export declare const TagSetExplore: import("@chakra-ui/react").ChakraComponent<(props: TagSetExploreProps) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
|
|
28
|
+
export default TagSetExplore;
|