@nypl/design-system-react-components 2.0.0 → 2.0.1
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 +37569 -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/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/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 +89 -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/types.d.ts +2 -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 +5 -0
- package/dist/src/hooks/useWindowSize.d.ts +10 -0
- package/dist/src/index.d.ts +83 -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/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/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 +41 -0
- package/dist/styles.css +1 -0
- package/package.json +129 -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,166 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
appleAppStoreBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
4
|
+
title?: string;
|
|
5
|
+
}>;
|
|
6
|
+
appleAppStoreWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
7
|
+
title?: string;
|
|
8
|
+
}>;
|
|
9
|
+
bplBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
10
|
+
title?: string;
|
|
11
|
+
}>;
|
|
12
|
+
bplWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
13
|
+
title?: string;
|
|
14
|
+
}>;
|
|
15
|
+
cleverBadgeColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
16
|
+
title?: string;
|
|
17
|
+
}>;
|
|
18
|
+
cleverColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
19
|
+
title?: string;
|
|
20
|
+
}>;
|
|
21
|
+
cleverWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
22
|
+
title?: string;
|
|
23
|
+
}>;
|
|
24
|
+
digitalCollectionsBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
25
|
+
title?: string;
|
|
26
|
+
}>;
|
|
27
|
+
digitalCollectionsWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
28
|
+
title?: string;
|
|
29
|
+
}>;
|
|
30
|
+
firstbookColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
31
|
+
title?: string;
|
|
32
|
+
}>;
|
|
33
|
+
firstbookColorNegative: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
34
|
+
title?: string;
|
|
35
|
+
}>;
|
|
36
|
+
googlePlayBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
37
|
+
title?: string;
|
|
38
|
+
}>;
|
|
39
|
+
lpaBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
40
|
+
title?: string;
|
|
41
|
+
}>;
|
|
42
|
+
lpaColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
43
|
+
title?: string;
|
|
44
|
+
}>;
|
|
45
|
+
lpaWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
46
|
+
title?: string;
|
|
47
|
+
}>;
|
|
48
|
+
mlnBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
49
|
+
title?: string;
|
|
50
|
+
}>;
|
|
51
|
+
mlnColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
52
|
+
title?: string;
|
|
53
|
+
}>;
|
|
54
|
+
mlnWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
55
|
+
title?: string;
|
|
56
|
+
}>;
|
|
57
|
+
nycdoeBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
58
|
+
title?: string;
|
|
59
|
+
}>;
|
|
60
|
+
nycdoeColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
61
|
+
title?: string;
|
|
62
|
+
}>;
|
|
63
|
+
nycdoeWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
64
|
+
title?: string;
|
|
65
|
+
}>;
|
|
66
|
+
nycpsBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
67
|
+
title?: string;
|
|
68
|
+
}>;
|
|
69
|
+
nycpsColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
70
|
+
title?: string;
|
|
71
|
+
}>;
|
|
72
|
+
nycpsWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
73
|
+
title?: string;
|
|
74
|
+
}>;
|
|
75
|
+
nyplFullBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
76
|
+
title?: string;
|
|
77
|
+
}>;
|
|
78
|
+
nyplFullWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
79
|
+
title?: string;
|
|
80
|
+
}>;
|
|
81
|
+
nyplLionBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
82
|
+
title?: string;
|
|
83
|
+
}>;
|
|
84
|
+
nyplLionWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
85
|
+
title?: string;
|
|
86
|
+
}>;
|
|
87
|
+
nyplTextBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
88
|
+
title?: string;
|
|
89
|
+
}>;
|
|
90
|
+
nyplTextWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
91
|
+
title?: string;
|
|
92
|
+
}>;
|
|
93
|
+
openebooksColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
94
|
+
title?: string;
|
|
95
|
+
}>;
|
|
96
|
+
openebooksNegative: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
97
|
+
title?: string;
|
|
98
|
+
}>;
|
|
99
|
+
openebooksWithTextColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
100
|
+
title?: string;
|
|
101
|
+
}>;
|
|
102
|
+
openebooksWithTextNegative: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
103
|
+
title?: string;
|
|
104
|
+
}>;
|
|
105
|
+
qplAltBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
106
|
+
title?: string;
|
|
107
|
+
}>;
|
|
108
|
+
qplAltWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
109
|
+
title?: string;
|
|
110
|
+
}>;
|
|
111
|
+
qplBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
112
|
+
title?: string;
|
|
113
|
+
}>;
|
|
114
|
+
qplColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
115
|
+
title?: string;
|
|
116
|
+
}>;
|
|
117
|
+
qplWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
118
|
+
title?: string;
|
|
119
|
+
}>;
|
|
120
|
+
reservoirIconColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
121
|
+
title?: string;
|
|
122
|
+
}>;
|
|
123
|
+
reservoirVerticalColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
124
|
+
title?: string;
|
|
125
|
+
}>;
|
|
126
|
+
schomburgBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
127
|
+
title?: string;
|
|
128
|
+
}>;
|
|
129
|
+
schomburgCircleBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
130
|
+
title?: string;
|
|
131
|
+
}>;
|
|
132
|
+
schomburgCircleColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
133
|
+
title?: string;
|
|
134
|
+
}>;
|
|
135
|
+
schomburgCircleWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
136
|
+
title?: string;
|
|
137
|
+
}>;
|
|
138
|
+
schomburgColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
139
|
+
title?: string;
|
|
140
|
+
}>;
|
|
141
|
+
schomburgWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
142
|
+
title?: string;
|
|
143
|
+
}>;
|
|
144
|
+
simplyeBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
145
|
+
title?: string;
|
|
146
|
+
}>;
|
|
147
|
+
simplyeWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
148
|
+
title?: string;
|
|
149
|
+
}>;
|
|
150
|
+
simplyeColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
151
|
+
title?: string;
|
|
152
|
+
}>;
|
|
153
|
+
snflBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
154
|
+
title?: string;
|
|
155
|
+
}>;
|
|
156
|
+
snflWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
157
|
+
title?: string;
|
|
158
|
+
}>;
|
|
159
|
+
treasuresColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
160
|
+
title?: string;
|
|
161
|
+
}>;
|
|
162
|
+
treasuresColorNegative: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
163
|
+
title?: string;
|
|
164
|
+
}>;
|
|
165
|
+
};
|
|
166
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const logoNamesArray: readonly ["appleAppStoreBlack", "appleAppStoreWhite", "bplBlack", "bplWhite", "cleverBadgeColor", "cleverColor", "cleverWhite", "digitalCollectionsBlack", "digitalCollectionsWhite", "firstbookColor", "firstbookColorNegative", "googlePlayBlack", "lpaBlack", "lpaColor", "lpaWhite", "mlnBlack", "mlnColor", "mlnWhite", "nycdoeBlack", "nycdoeColor", "nycdoeWhite", "nycpsBlack", "nycpsColor", "nycpsWhite", "nyplFullBlack", "nyplFullWhite", "nyplLionBlack", "nyplLionWhite", "nyplTextBlack", "nyplTextWhite", "openebooksColor", "openebooksNegative", "openebooksWithTextColor", "openebooksWithTextNegative", "qplAltBlack", "qplAltWhite", "qplBlack", "qplColor", "qplWhite", "reservoirIconColor", "reservoirVerticalColor", "schomburgBlack", "schomburgCircleBlack", "schomburgCircleColor", "schomburgCircleWhite", "schomburgColor", "schomburgWhite", "simplyeBlack", "simplyeWhite", "simplyeColor", "snflBlack", "snflWhite", "treasuresColor", "treasuresColorNegative"];
|
|
2
|
+
export declare const logoSizesArray: readonly ["default", "xxsmall", "xsmall", "small", "medium", "large"];
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface BaseModalProps {
|
|
3
|
+
bodyContent?: string | JSX.Element;
|
|
4
|
+
closeButtonLabel?: string;
|
|
5
|
+
headingText?: string | JSX.Element;
|
|
6
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
7
|
+
id?: string;
|
|
8
|
+
isOpen?: boolean;
|
|
9
|
+
onClose?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export interface ModalProps {
|
|
12
|
+
buttonText?: string;
|
|
13
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
14
|
+
id?: string;
|
|
15
|
+
modalProps: BaseModalProps;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The `ModalTrigger` component renders a button that you click to open the
|
|
19
|
+
* internal `Modal` component. Note that props to update the internal `Modal`
|
|
20
|
+
* component are passed through to the `modalProps` prop.
|
|
21
|
+
*/
|
|
22
|
+
export declare const ModalTrigger: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ModalProps & {
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
} & React.RefAttributes<HTMLButtonElement>>, {}>;
|
|
25
|
+
/**
|
|
26
|
+
* This hook function can be used to render the `Modal` component with a custom
|
|
27
|
+
* open button(s) and optional custom close button(s). You must render your own
|
|
28
|
+
* button and pass the appropriate `onOpen` and ` handler for the modal to open.
|
|
29
|
+
*/
|
|
30
|
+
export declare function useModal(): {
|
|
31
|
+
onClose: () => void;
|
|
32
|
+
onOpen: () => void;
|
|
33
|
+
Modal: import("@chakra-ui/react").ChakraComponent<({ bodyContent, closeButtonLabel, headingText, id, ...rest }: React.PropsWithChildren<BaseModalProps>) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
|
|
34
|
+
};
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const notificationTypesArray: readonly ["standard", "announcement", "warning"];
|
|
3
|
+
export type NotificationTypes = typeof notificationTypesArray[number];
|
|
4
|
+
interface BaseProps {
|
|
5
|
+
/** Optional prop to control text alignment in `NotificationContent` */
|
|
6
|
+
alignText?: boolean;
|
|
7
|
+
/** Optional custom `Icon` that will override the default `Icon`. */
|
|
8
|
+
icon?: JSX.Element;
|
|
9
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
10
|
+
id?: string;
|
|
11
|
+
/** Optional prop to control horizontal alignment of the `Notification` content */
|
|
12
|
+
isCentered?: boolean;
|
|
13
|
+
/** Content to be rendered in a `NotificationHeading` component. */
|
|
14
|
+
notificationHeading?: string;
|
|
15
|
+
/** Optional prop to control the coloring of the `Notification` text and the
|
|
16
|
+
* visibility of an applicable icon. */
|
|
17
|
+
notificationType?: NotificationTypes;
|
|
18
|
+
/** Prop to display the `Notification` icon. Defaults to `true`. */
|
|
19
|
+
showIcon?: boolean;
|
|
20
|
+
}
|
|
21
|
+
type NotificationHeadingProps = Omit<BasePropsWithoutAlignText, "notificationHeading" | "showIcon">;
|
|
22
|
+
type NotificationContentProps = Omit<BaseProps, "icon">;
|
|
23
|
+
type BasePropsWithoutAlignText = Omit<BaseProps, "alignText">;
|
|
24
|
+
export interface NotificationProps extends BasePropsWithoutAlignText {
|
|
25
|
+
/** Label used to describe the `Notification`'s aside HTML element. */
|
|
26
|
+
ariaLabel?: string;
|
|
27
|
+
/** Additional `className` to add. */
|
|
28
|
+
className?: string;
|
|
29
|
+
/** Optional prop to control whether a `Notification` can be dismissed
|
|
30
|
+
* (closed) by a user. */
|
|
31
|
+
dismissible?: boolean;
|
|
32
|
+
/** Optional custom `Icon` that will override the default `Icon`. */
|
|
33
|
+
icon?: JSX.Element;
|
|
34
|
+
/** Optional prop to control the margin around the `Notification` component. */
|
|
35
|
+
noMargin?: boolean;
|
|
36
|
+
/** Content to be rendered in a `NotificationContent` component. */
|
|
37
|
+
notificationContent: string | JSX.Element;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* NotificationHeading child-component.
|
|
41
|
+
*/
|
|
42
|
+
export declare const NotificationHeading: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<NotificationHeadingProps>) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
|
|
43
|
+
/**
|
|
44
|
+
* NotificationContent child-component.
|
|
45
|
+
*/
|
|
46
|
+
export declare const NotificationContent: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<NotificationContentProps>) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
|
|
47
|
+
/**
|
|
48
|
+
* Component used to present users with three different levels of notifications:
|
|
49
|
+
* standard, announcement, and warning.
|
|
50
|
+
*/
|
|
51
|
+
export declare const Notification: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<NotificationProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
52
|
+
export default Notification;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface PaginationProps {
|
|
3
|
+
/** Additional className. */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** The currentPage can be used to programatically force the selected page to change
|
|
6
|
+
* without the user explicitly requesting it – for example, if the user should be
|
|
7
|
+
* brought back to the first page of a set of results after a new search. */
|
|
8
|
+
currentPage?: number;
|
|
9
|
+
/** The callback function that takes a page number and returns a string
|
|
10
|
+
* to use for a link's `href` attribute. This is used when the current
|
|
11
|
+
* page should refresh when navigating. */
|
|
12
|
+
getPageHref?: undefined | ((pageNumber: number) => string);
|
|
13
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
14
|
+
id?: string;
|
|
15
|
+
/** The initially selected page (default value is 1). */
|
|
16
|
+
initialPage?: number;
|
|
17
|
+
/** The callback function called when an item is selected and the current
|
|
18
|
+
* page should not refresh. */
|
|
19
|
+
onPageChange?: (selected: number) => void;
|
|
20
|
+
/** The total number of pages. */
|
|
21
|
+
pageCount: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* A component that provides a navigational list of page items.
|
|
25
|
+
*/
|
|
26
|
+
export declare const Pagination: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<PaginationProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
27
|
+
export default Pagination;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const progressIndicatorSizesArray: readonly ["default", "small"];
|
|
3
|
+
export declare const progressIndicatorTypesArray: readonly ["circular", "linear"];
|
|
4
|
+
export type ProgressIndicatorSizes = typeof progressIndicatorSizesArray[number];
|
|
5
|
+
export type ProgressIndicatorTypes = typeof progressIndicatorTypesArray[number];
|
|
6
|
+
export interface ProgressIndicatorProps {
|
|
7
|
+
/** The darkMode prop is deprecated and should no longer be used. */
|
|
8
|
+
darkMode?: boolean;
|
|
9
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
10
|
+
id: string;
|
|
11
|
+
/** Whether the `ProgressIndicator` should be linear or circular. */
|
|
12
|
+
indicatorType?: ProgressIndicatorTypes;
|
|
13
|
+
/** Whether the progress animation should display because the `value` prop is
|
|
14
|
+
* not known. When this is set to `true`, the `value` prop will be ignored. */
|
|
15
|
+
isIndeterminate?: boolean;
|
|
16
|
+
/** The text to display in an HTML `label` element. */
|
|
17
|
+
labelText: string;
|
|
18
|
+
/** Visually show or hide the label text. When set to `false`, then the label
|
|
19
|
+
* text will be added to the parent component as its `aria-label` attribute. */
|
|
20
|
+
showLabel?: boolean;
|
|
21
|
+
/** The size of the linear or circular progress. */
|
|
22
|
+
size?: ProgressIndicatorSizes;
|
|
23
|
+
/** A number between 0 to 100 that defines the progress' value. */
|
|
24
|
+
value?: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A component that displays a progress status for any task that takes a long
|
|
28
|
+
* time to complete or consists of multiple steps. Examples include downloading,
|
|
29
|
+
* uploading, or processing.
|
|
30
|
+
*/
|
|
31
|
+
export declare const ProgressIndicator: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ProgressIndicatorProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
32
|
+
export default ProgressIndicator;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
+
export interface RadioProps {
|
|
4
|
+
/** Additional class name. */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Optional string to populate the HelperErrorText for the standard state. */
|
|
7
|
+
helperText?: HelperErrorTextType;
|
|
8
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
9
|
+
id: string;
|
|
10
|
+
/** Optional string to populate the HelperErrorText for the error state
|
|
11
|
+
* when `isInvalid` is true.
|
|
12
|
+
*/
|
|
13
|
+
invalidText?: HelperErrorTextType;
|
|
14
|
+
/** When using the Radio as a "controlled" form element, you can specify the
|
|
15
|
+
* `Radio`'s checked state using this prop. You must also pass an onChange prop.
|
|
16
|
+
* Learn more about controlled and uncontrolled form fields: https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */
|
|
17
|
+
isChecked?: boolean;
|
|
18
|
+
/** Adds the 'disabled' and `aria-disabled` attributes to the input when true.
|
|
19
|
+
* This also makes the text italic and color scheme gray. */
|
|
20
|
+
isDisabled?: boolean;
|
|
21
|
+
/** Adds the 'aria-invalid' attribute to the input when true. This also makes
|
|
22
|
+
* the color theme "NYPL error" red for the button and text. */
|
|
23
|
+
isInvalid?: boolean;
|
|
24
|
+
/** Adds the 'required' attribute to the input when true. */
|
|
25
|
+
isRequired?: boolean;
|
|
26
|
+
/** The radio button's label. This will serve as the text content for the
|
|
27
|
+
* `<label>` element if `showlabel` is true, or an "aria-label" if `showLabel`
|
|
28
|
+
* is false. */
|
|
29
|
+
labelText: string | JSX.Element;
|
|
30
|
+
/** Used to reference the input element in forms. */
|
|
31
|
+
name?: string;
|
|
32
|
+
/** Should be passed along with `isChecked` for controlled components. */
|
|
33
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
34
|
+
/** Offers the ability to hide the helper/invalid text. */
|
|
35
|
+
showHelperInvalidText?: boolean;
|
|
36
|
+
/** Offers the ability to show the radio's label onscreen or hide it. Refer
|
|
37
|
+
* to the `labelText` property for more information. */
|
|
38
|
+
showLabel?: boolean;
|
|
39
|
+
/** Populates the value of the input. */
|
|
40
|
+
value?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare const Radio: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>, {}>;
|
|
43
|
+
export default Radio;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
+
import { LayoutTypes } from "../../helpers/types";
|
|
4
|
+
export interface RadioGroupProps {
|
|
5
|
+
/** Additional class name. */
|
|
6
|
+
className?: string;
|
|
7
|
+
/** Populates the initial value of the input */
|
|
8
|
+
defaultValue?: string;
|
|
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 error state */
|
|
14
|
+
invalidText?: HelperErrorTextType;
|
|
15
|
+
/** Adds the 'disabled' prop to the input when true. */
|
|
16
|
+
isDisabled?: boolean;
|
|
17
|
+
/** Set's the `Radio`s' wrapper to be full width. */
|
|
18
|
+
isFullWidth?: boolean;
|
|
19
|
+
/** Adds the 'aria-invalid' attribute to the input and
|
|
20
|
+
* sets the error state when true. */
|
|
21
|
+
isInvalid?: boolean;
|
|
22
|
+
/** Adds the 'required' attribute to the input when true. */
|
|
23
|
+
isRequired?: boolean;
|
|
24
|
+
/** The radio group label displayed in a `legend` element if `showlabel` is
|
|
25
|
+
* true, or an "aria-label" if `showLabel` is false. */
|
|
26
|
+
labelText: string;
|
|
27
|
+
/** Renders the Radio buttons in a row or column (default). */
|
|
28
|
+
layout?: LayoutTypes;
|
|
29
|
+
/** The `name` prop indicates the form group for all the Radio children. */
|
|
30
|
+
name: string;
|
|
31
|
+
/** The action to perform on the `<input>`'s onChange function */
|
|
32
|
+
onChange?: (value: string) => void;
|
|
33
|
+
/** Offers the ability to hide the helper/invalid text. */
|
|
34
|
+
showHelperInvalidText?: boolean;
|
|
35
|
+
/** Offers the ability to show the group's legend onscreen or hide it. Refer
|
|
36
|
+
* to the `labelText` property for more information. */
|
|
37
|
+
showLabel?: boolean;
|
|
38
|
+
/** Whether or not to display the "(Required)" text in the label text.
|
|
39
|
+
* True by default. */
|
|
40
|
+
showRequiredLabel?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* RadioGroup is a wrapper for DS `Radio` components that renders as a fieldset
|
|
44
|
+
* HTML element along with optional helper text. The `name` prop is essential
|
|
45
|
+
* for this form group element and is not needed for individual DS `Radio`
|
|
46
|
+
* components when `RadioGroup` is used.
|
|
47
|
+
*/
|
|
48
|
+
export declare const RadioGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<RadioGroupProps & {
|
|
49
|
+
children?: React.ReactNode;
|
|
50
|
+
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
51
|
+
export default RadioGroup;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
+
import { SelectProps as InitialSelectProps } from "../Select/Select";
|
|
4
|
+
import { InputProps as InitialInputProps } from "../TextInput/TextInput";
|
|
5
|
+
interface SelectOptionsProps {
|
|
6
|
+
text: string;
|
|
7
|
+
value: string;
|
|
8
|
+
}
|
|
9
|
+
export type SelectProps = Partial<Pick<InitialSelectProps, "id" | "labelText" | "name" | "onChange" | "value">> & {
|
|
10
|
+
optionsData: SelectOptionsProps[];
|
|
11
|
+
};
|
|
12
|
+
export type TextInputProps = Pick<InitialInputProps, "labelText" | "name"> & Partial<Pick<InitialInputProps, "defaultValue" | "id" | "isClearable" | "isClearableCallback" | "max" | "maxLength" | "min" | "onChange" | "pattern" | "placeholder" | "value">>;
|
|
13
|
+
export interface SearchBarProps {
|
|
14
|
+
/** Adds 'action' property to the `form` element. */
|
|
15
|
+
action?: string;
|
|
16
|
+
/** The onClick callback function for the `Button` component. */
|
|
17
|
+
buttonOnClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
18
|
+
/** A class name for the `form` element. */
|
|
19
|
+
className?: string;
|
|
20
|
+
/** Optional string for the SearchBar's description above the component. */
|
|
21
|
+
descriptionText?: string;
|
|
22
|
+
/** Optional string for the SearchBar's heading text above the component. */
|
|
23
|
+
headingText?: string;
|
|
24
|
+
/** The text to display below the form in a `HelperErrorText` component. */
|
|
25
|
+
helperText?: HelperErrorTextType;
|
|
26
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
27
|
+
id: string;
|
|
28
|
+
/** Optional string to populate the `HelperErrorText` for the error state
|
|
29
|
+
* when `isInvalid` is true. */
|
|
30
|
+
invalidText?: HelperErrorTextType;
|
|
31
|
+
/** Sets children form components in the disabled state. */
|
|
32
|
+
isDisabled?: boolean;
|
|
33
|
+
/** Sets children form components in the error state. */
|
|
34
|
+
isInvalid?: boolean;
|
|
35
|
+
/** Sets children form components in the required state. */
|
|
36
|
+
isRequired?: boolean;
|
|
37
|
+
/** Populates the `aria-label` attribute on the form element. */
|
|
38
|
+
labelText: string;
|
|
39
|
+
/** Adds 'method' property to the `form` element. */
|
|
40
|
+
method?: string;
|
|
41
|
+
/** Sets the `Button` variant type to `noBrand` when true;
|
|
42
|
+
* false by default which sets the type to `primary`. */
|
|
43
|
+
noBrandButtonType?: boolean;
|
|
44
|
+
/** Handler function when the form is submitted. */
|
|
45
|
+
onSubmit: (event: React.FormEvent) => void;
|
|
46
|
+
/** Required props to render a `Select` element. */
|
|
47
|
+
selectProps?: SelectProps | undefined;
|
|
48
|
+
/** Custom input element to render instead of a `TextInput` element. */
|
|
49
|
+
textInputElement?: JSX.Element;
|
|
50
|
+
/** Required props to render a `TextInput` element. */
|
|
51
|
+
textInputProps?: TextInputProps | undefined;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Renders a wrapper `form` element to be used with `Select` (optional),
|
|
55
|
+
* `Input`, and `Button` components together.
|
|
56
|
+
*/
|
|
57
|
+
export declare const SearchBar: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SearchBarProps & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
58
|
+
export default SearchBar;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
+
export declare const selectTypesArray: string[];
|
|
4
|
+
export declare const labelPositionsArray: string[];
|
|
5
|
+
export type SelectTypes = typeof selectTypesArray[number];
|
|
6
|
+
export type LabelPositions = typeof labelPositionsArray[number];
|
|
7
|
+
export interface SelectProps {
|
|
8
|
+
/** A class name for the `div` parent element. */
|
|
9
|
+
className?: string;
|
|
10
|
+
/** Optional string to populate the `HelperErrorText` for the standard state. */
|
|
11
|
+
helperText?: HelperErrorTextType;
|
|
12
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
13
|
+
id: string;
|
|
14
|
+
/** Optional string to populate the `HelperErrorText` for the error state
|
|
15
|
+
* when `isInvalid` is true. */
|
|
16
|
+
invalidText?: HelperErrorTextType;
|
|
17
|
+
/** Adds the `disabled` and `aria-disabled` attributes to the select when true */
|
|
18
|
+
isDisabled?: boolean;
|
|
19
|
+
/** Adds the `aria-invalid` attribute to the select when true. This also makes
|
|
20
|
+
* the color theme "NYPL error" red for the select and text. */
|
|
21
|
+
isInvalid?: boolean;
|
|
22
|
+
/** Adds the `required` and `aria-required` attributes to the input when true. */
|
|
23
|
+
isRequired?: boolean;
|
|
24
|
+
/** Optional value to render the label inline, rather than the default (on top)
|
|
25
|
+
* of the select element. */
|
|
26
|
+
labelPosition?: LabelPositions;
|
|
27
|
+
/** Provides text for a `Label` component if `showLabel` is set to `true`;
|
|
28
|
+
* populates an `aria-label` attribute on the select input if `showLabel` is
|
|
29
|
+
* set to `false`. */
|
|
30
|
+
labelText: string;
|
|
31
|
+
/** Used to reference the select element in forms. */
|
|
32
|
+
name: string;
|
|
33
|
+
/** The callback function to get the selected value.
|
|
34
|
+
* Should be passed along with `value` for controlled components. */
|
|
35
|
+
onChange?: (event: React.FormEvent) => void;
|
|
36
|
+
/** Placeholder text in the select element. */
|
|
37
|
+
placeholder?: string;
|
|
38
|
+
/** The variant to display. */
|
|
39
|
+
selectType?: SelectTypes;
|
|
40
|
+
/** Offers the ability to hide the helper/invalid text. */
|
|
41
|
+
showHelperInvalidText?: boolean;
|
|
42
|
+
/** Offers the ability to show the select's label onscreen or hide it. Refer
|
|
43
|
+
* to the `labelText` property for more information. */
|
|
44
|
+
showLabel?: boolean;
|
|
45
|
+
/** Whether or not to display the "(Required)" text in the label text.
|
|
46
|
+
* True by default. */
|
|
47
|
+
showRequiredLabel?: boolean;
|
|
48
|
+
/** The value of the selected option.
|
|
49
|
+
* Should be passed along with `onChange` for controlled components. */
|
|
50
|
+
value?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Component that renders Chakra's `Select` component along with an accessible
|
|
54
|
+
* `Label` and optional `HelperErrorText` component.
|
|
55
|
+
*/
|
|
56
|
+
export declare const Select: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SelectProps & {
|
|
57
|
+
children?: React.ReactNode;
|
|
58
|
+
} & React.RefAttributes<HTMLSelectElement>>, {}>;
|
|
59
|
+
export default Select;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { LayoutTypes } from "../../helpers/types";
|
|
3
|
+
export declare const skeletonLoaderImageRatiosArray: readonly ["landscape", "portrait", "square"];
|
|
4
|
+
export type SkeletonLoaderImageRatios = typeof skeletonLoaderImageRatiosArray[number];
|
|
5
|
+
export interface SkeletonLoaderProps {
|
|
6
|
+
/** Additional class name for the Skeleton component. */
|
|
7
|
+
className?: string;
|
|
8
|
+
/** Optional numeric value to control the number of lines for content
|
|
9
|
+
* placeholder; default value is `3`. */
|
|
10
|
+
contentSize?: number;
|
|
11
|
+
/** Optional numeric value to control the number of lines for heading
|
|
12
|
+
* placeholder; default value is `1`. */
|
|
13
|
+
headingSize?: number;
|
|
14
|
+
/** Optional value to control the aspect ratio of the image placeholder;
|
|
15
|
+
* default value is `"square"`. */
|
|
16
|
+
imageAspectRatio?: SkeletonLoaderImageRatios;
|
|
17
|
+
/** Optional boolean value to control visibility of border around skeleton loader. */
|
|
18
|
+
isBordered?: boolean;
|
|
19
|
+
/** Optional value to control the position of the image placeholder;
|
|
20
|
+
* default value is `"column"`. */
|
|
21
|
+
layout?: LayoutTypes;
|
|
22
|
+
/** Optional boolean value to control visibility of button placeholder. */
|
|
23
|
+
showButton?: boolean;
|
|
24
|
+
/** Optional boolean value to control visibility of content placeholder. */
|
|
25
|
+
showContent?: boolean;
|
|
26
|
+
/** Optional boolean value to control visibility of heading placeholder. */
|
|
27
|
+
showHeading?: boolean;
|
|
28
|
+
/** Optional boolean value to control visibility of image placeholder. */
|
|
29
|
+
showImage?: boolean;
|
|
30
|
+
/** Optional width value. This value should be entered with the same
|
|
31
|
+
* formatting as a CSS width attribute (ex. `50%`, `640px`, `20rem`).
|
|
32
|
+
* If omitted, the skeleton loader will have a default width of 100%. */
|
|
33
|
+
width?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* The `SkeletonLoader` component renders a placeholder to be used while
|
|
37
|
+
* dynamic content is loading.
|
|
38
|
+
*/
|
|
39
|
+
export declare const SkeletonLoader: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SkeletonLoaderProps & {
|
|
40
|
+
children?: React.ReactNode;
|
|
41
|
+
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
42
|
+
export default SkeletonLoader;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface SkipNavigationProps {
|
|
3
|
+
/** Additional CSS class name to render in the `nav` element. */
|
|
4
|
+
className?: string;
|
|
5
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
6
|
+
id?: string;
|
|
7
|
+
/** The anchor target for the main skip link. The default is "#mainContent". */
|
|
8
|
+
target?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* SkipNavigation is a component that is used to provide a navigational list of
|
|
12
|
+
* links. The first link is used to skip to the main content of the page using
|
|
13
|
+
* the `#mainContent` id, and the second link points to accessibility information
|
|
14
|
+
* on NYPL.org. These links are visually hidden but can be read by screenreaders.
|
|
15
|
+
*/
|
|
16
|
+
export declare const SkipNavigation: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SkipNavigationProps & {
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
19
|
+
export default SkipNavigation;
|