@nypl/design-system-react-components 0.25.13 → 0.27.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +85 -0
- package/README.md +10 -10
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Card/Card.d.ts +11 -9
- package/dist/components/Checkbox/Checkbox.d.ts +2 -2
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +5 -4
- package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +5 -6
- package/dist/components/Fieldset/Fieldset.d.ts +5 -6
- package/dist/components/Form/Form.d.ts +6 -6
- package/dist/components/Grid/GridTypes.d.ts +7 -7
- package/dist/components/Grid/SimpleGrid.d.ts +1 -1
- package/dist/components/Heading/Heading.d.ts +1 -1
- package/dist/components/HelperErrorText/HelperErrorText.d.ts +9 -8
- package/dist/components/Hero/Hero.d.ts +2 -1
- package/dist/components/HorizontalRule/HorizontalRule.d.ts +2 -10
- package/dist/components/Icons/Icon.d.ts +2 -1
- package/dist/components/Image/Image.d.ts +2 -2
- package/dist/components/Label/Label.d.ts +7 -4
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/List/List.d.ts +11 -11
- package/dist/components/List/ListTypes.d.ts +1 -1
- package/dist/components/Logo/Logo.d.ts +2 -1
- package/dist/components/Logo/LogoSvgs.d.ts +2 -0
- package/dist/components/Logo/LogoTypes.d.ts +2 -0
- package/dist/components/Modal/Modal.d.ts +28 -8
- package/dist/components/Notification/Notification.d.ts +4 -4
- package/dist/components/Pagination/Pagination.d.ts +2 -2
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +3 -3
- package/dist/components/Radio/Radio.d.ts +4 -6
- package/dist/components/RadioGroup/RadioGroup.d.ts +12 -6
- package/dist/components/SearchBar/SearchBar.d.ts +4 -4
- package/dist/components/Select/Select.d.ts +10 -6
- package/dist/components/Select/SelectTypes.d.ts +4 -0
- package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +4 -3
- package/dist/components/Slider/Slider.d.ts +6 -4
- package/dist/components/StatusBadge/StatusBadge.d.ts +5 -1
- package/dist/components/StructuredContent/StructuredContent.d.ts +2 -2
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +4 -3
- package/dist/components/Template/Template.d.ts +4 -3
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/TextInput/TextInput.d.ts +5 -5
- package/dist/components/Toggle/Toggle.d.ts +3 -4
- package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
- package/dist/design-system-react-components.cjs.development.js +1767 -1180
- package/dist/design-system-react-components.cjs.development.js.map +1 -1
- package/dist/design-system-react-components.cjs.production.min.js +1 -1
- package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
- package/dist/design-system-react-components.esm.js +1774 -1188
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/hooks/useCarouselStyles.d.ts +3 -2
- package/dist/hooks/useNYPLTheme.d.ts +12 -0
- package/dist/index.d.ts +5 -2
- package/dist/styles.css +1 -1
- package/dist/theme/components/button.d.ts +10 -2
- package/dist/theme/components/card.d.ts +42 -22
- package/dist/theme/components/checkbox.d.ts +5 -4
- package/dist/theme/components/checkboxGroup.d.ts +1 -1
- package/dist/theme/components/componentWrapper.d.ts +2 -2
- package/dist/theme/components/customTable.d.ts +84 -1
- package/dist/theme/components/fieldset.d.ts +4 -14
- package/dist/theme/components/global.d.ts +23 -17
- package/dist/theme/components/heading.d.ts +53 -0
- package/dist/theme/components/helperErrorText.d.ts +1 -0
- package/dist/theme/components/hero.d.ts +20 -14
- package/dist/theme/components/label.d.ts +9 -10
- package/dist/theme/components/list.d.ts +99 -9
- package/dist/theme/components/radio.d.ts +6 -4
- package/dist/theme/components/radioGroup.d.ts +1 -1
- package/dist/theme/components/select.d.ts +28 -5
- package/dist/theme/components/skeletonLoader.d.ts +2 -2
- package/dist/theme/components/slider.d.ts +6 -3
- package/dist/theme/components/structuredContent.d.ts +197 -0
- package/dist/theme/components/textInput.d.ts +18 -6
- package/dist/theme/components/toggle.d.ts +7 -4
- package/dist/theme/foundations/global.d.ts +2 -0
- package/dist/theme/foundations/radii.d.ts +1 -0
- package/dist/theme/foundations/spacing.d.ts +46 -43
- package/package.json +17 -19
- package/src/components/Accordion/Accordion.stories.mdx +9 -9
- package/src/components/Accordion/Accordion.test.tsx +21 -0
- package/src/components/Accordion/Accordion.tsx +13 -9
- package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +276 -27
- package/src/components/Autosuggest/Autosuggest.stories.mdx +4 -3
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +21 -5
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +52 -31
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +8 -7
- package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +211 -12
- package/src/components/Button/Button.stories.mdx +87 -23
- package/src/components/Button/Button.test.tsx +25 -0
- package/src/components/Button/Button.tsx +18 -7
- package/src/components/Button/__snapshots__/Button.test.tsx.snap +27 -7
- package/src/components/Card/Card.stories.mdx +287 -194
- package/src/components/Card/Card.test.tsx +102 -0
- package/src/components/Card/Card.tsx +73 -32
- package/src/components/Card/__snapshots__/Card.test.tsx.snap +196 -36
- package/src/components/Chakra/Grid.stories.mdx +4 -4
- package/src/components/Checkbox/Checkbox.stories.mdx +62 -10
- package/src/components/Checkbox/Checkbox.test.tsx +32 -9
- package/src/components/Checkbox/Checkbox.tsx +20 -15
- package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +134 -7
- package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +65 -17
- package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +137 -81
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +31 -21
- package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +332 -97
- package/src/components/ComponentWrapper/ComponentWrapper.test.tsx +12 -0
- package/src/components/ComponentWrapper/ComponentWrapper.tsx +39 -41
- package/src/components/ComponentWrapper/__snapshots__/ComponentWrapper.test.tsx.snap +47 -34
- package/src/components/DatePicker/DatePicker.stories.mdx +63 -27
- package/src/components/DatePicker/DatePicker.test.tsx +89 -13
- package/src/components/DatePicker/DatePicker.tsx +62 -56
- package/src/components/DatePicker/_DatePicker.scss +71 -13
- package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +250 -206
- package/src/components/Fieldset/Fieldset.stories.mdx +33 -3
- package/src/components/Fieldset/Fieldset.test.tsx +58 -28
- package/src/components/Fieldset/Fieldset.tsx +35 -30
- package/src/components/Fieldset/__snapshots__/Fieldset.test.tsx.snap +40 -19
- package/src/components/Form/Form.stories.mdx +72 -39
- package/src/components/Form/Form.test.tsx +58 -15
- package/src/components/Form/Form.tsx +89 -67
- package/src/components/Form/__snapshots__/Form.test.tsx.snap +83 -5
- package/src/components/Grid/GridTypes.tsx +7 -7
- package/src/components/Grid/SimpleGrid.stories.mdx +34 -6
- package/src/components/Grid/SimpleGrid.test.tsx +9 -0
- package/src/components/Grid/SimpleGrid.tsx +29 -20
- package/src/components/Grid/__snapshots__/SimpleGrid.test.tsx.snap +16 -1
- package/src/components/Heading/Heading.stories.mdx +36 -3
- package/src/components/Heading/Heading.test.tsx +10 -0
- package/src/components/Heading/Heading.tsx +56 -50
- package/src/components/Heading/__snapshots__/Heading.test.tsx.snap +26 -7
- package/src/components/HelperErrorText/HelperErrorText.stories.mdx +64 -42
- package/src/components/HelperErrorText/HelperErrorText.test.tsx +15 -0
- package/src/components/HelperErrorText/HelperErrorText.tsx +40 -35
- package/src/components/HelperErrorText/__snapshots__/HelperErrorText.test.tsx.snap +35 -4
- package/src/components/Hero/Hero.stories.mdx +125 -95
- package/src/components/Hero/Hero.test.tsx +33 -0
- package/src/components/Hero/Hero.tsx +135 -126
- package/src/components/Hero/__snapshots__/Hero.test.tsx.snap +89 -17
- package/src/components/HorizontalRule/HorizontalRule.stories.mdx +26 -4
- package/src/components/HorizontalRule/HorizontalRule.test.tsx +9 -19
- package/src/components/HorizontalRule/HorizontalRule.tsx +9 -26
- package/src/components/HorizontalRule/__snapshots__/HorizontalRule.test.tsx.snap +18 -5
- package/src/components/Icons/Icon.stories.mdx +31 -6
- package/src/components/Icons/Icon.test.tsx +38 -0
- package/src/components/Icons/Icon.tsx +93 -76
- package/src/components/Icons/__snapshots__/Icon.test.tsx.snap +129 -0
- package/src/components/Image/Image.stories.mdx +29 -5
- package/src/components/Image/Image.test.tsx +8 -0
- package/src/components/Image/Image.tsx +38 -26
- package/src/components/Image/__snapshots__/Image.test.tsx.snap +24 -8
- package/src/components/Label/Label.stories.mdx +42 -20
- package/src/components/Label/Label.test.tsx +42 -17
- package/src/components/Label/Label.tsx +22 -13
- package/src/components/Label/__snapshots__/Label.test.tsx.snap +19 -15
- package/src/components/Link/Link.stories.mdx +25 -15
- package/src/components/Link/Link.test.tsx +21 -22
- package/src/components/Link/Link.tsx +8 -8
- package/src/components/Link/__snapshots__/Link.test.tsx.snap +37 -11
- package/src/components/List/List.stories.mdx +75 -40
- package/src/components/List/List.test.tsx +67 -19
- package/src/components/List/List.tsx +38 -25
- package/src/components/List/ListTypes.tsx +1 -1
- package/src/components/List/__snapshots__/List.test.tsx.snap +110 -8
- package/src/components/Logo/Logo.stories.mdx +30 -6
- package/src/components/Logo/Logo.test.tsx +17 -0
- package/src/components/Logo/Logo.tsx +18 -6
- package/src/components/Logo/LogoSvgs.tsx +4 -0
- package/src/components/Logo/LogoTypes.tsx +2 -0
- package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +73 -2
- package/src/components/Modal/Modal.stories.mdx +256 -136
- package/src/components/Modal/Modal.test.tsx +151 -9
- package/src/components/Modal/Modal.tsx +140 -20
- package/src/components/Modal/__snapshots__/Modal.test.tsx.snap +25 -0
- package/src/components/Notification/Notification.stories.mdx +25 -1
- package/src/components/Notification/Notification.test.tsx +23 -0
- package/src/components/Notification/Notification.tsx +46 -44
- package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +158 -29
- package/src/components/Pagination/Pagination.stories.mdx +25 -6
- package/src/components/Pagination/Pagination.test.tsx +25 -0
- package/src/components/Pagination/Pagination.tsx +6 -6
- package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +244 -27
- package/src/components/Placeholder/Placeholder.tsx +3 -1
- package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +76 -10
- package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +81 -11
- package/src/components/ProgressIndicator/ProgressIndicator.tsx +17 -9
- package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +101 -14
- package/src/components/Radio/Radio.stories.mdx +64 -12
- package/src/components/Radio/Radio.test.tsx +28 -8
- package/src/components/Radio/Radio.tsx +66 -63
- package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +103 -6
- package/src/components/RadioGroup/RadioGroup.stories.mdx +224 -89
- package/src/components/RadioGroup/RadioGroup.test.tsx +122 -62
- package/src/components/RadioGroup/RadioGroup.tsx +106 -100
- package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1236 -1020
- package/src/components/SearchBar/SearchBar.stories.mdx +101 -36
- package/src/components/SearchBar/{SearchBar.Test.tsx → SearchBar.test.tsx} +46 -4
- package/src/components/SearchBar/SearchBar.tsx +17 -8
- package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1039 -0
- package/src/components/Select/Select.stories.mdx +128 -49
- package/src/components/Select/Select.test.tsx +63 -16
- package/src/components/Select/Select.tsx +131 -92
- package/src/components/Select/SelectTypes.tsx +5 -0
- package/src/components/Select/__snapshots__/Select.test.tsx.snap +765 -425
- package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +42 -10
- package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +8 -0
- package/src/components/SkeletonLoader/SkeletonLoader.tsx +76 -72
- package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +169 -10
- package/src/components/Slider/Slider.stories.mdx +91 -42
- package/src/components/Slider/Slider.test.tsx +65 -17
- package/src/components/Slider/Slider.tsx +26 -19
- package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +403 -226
- package/src/components/StatusBadge/StatusBadge.stories.mdx +19 -1
- package/src/components/StatusBadge/StatusBadge.test.tsx +16 -0
- package/src/components/StatusBadge/StatusBadge.tsx +25 -20
- package/src/components/StatusBadge/__snapshots__/StatusBadge.test.tsx.snap +22 -3
- package/src/components/StructuredContent/StructuredContent.stories.mdx +131 -12
- package/src/components/StructuredContent/StructuredContent.test.tsx +34 -0
- package/src/components/StructuredContent/StructuredContent.tsx +80 -75
- package/src/components/StructuredContent/__snapshots__/StructuredContent.test.tsx.snap +102 -17
- package/src/components/StyleGuide/Bidirectionality.stories.mdx +5 -5
- package/src/components/StyleGuide/Breakpoints.stories.mdx +6 -6
- package/src/components/StyleGuide/Buttons.stories.mdx +2 -12
- package/src/components/StyleGuide/ColorCard.tsx +1 -1
- package/src/components/StyleGuide/Colors.stories.mdx +1 -2
- package/src/components/StyleGuide/DesignTokens.stories.mdx +56 -26
- package/src/components/StyleGuide/Forms.stories.mdx +27 -12
- package/src/components/StyleGuide/Iconography.stories.mdx +2 -12
- package/src/components/StyleGuide/Spacing.stories.mdx +80 -41
- package/src/components/StyleGuide/Typography.stories.mdx +30 -21
- package/src/components/Table/Table.stories.mdx +38 -11
- package/src/components/Table/Table.test.tsx +15 -0
- package/src/components/Table/Table.tsx +7 -7
- package/src/components/Table/__snapshots__/Table.test.tsx.snap +408 -5
- package/src/components/Tabs/Tabs.stories.mdx +52 -3
- package/src/components/Tabs/Tabs.test.tsx +16 -0
- package/src/components/Tabs/Tabs.tsx +10 -6
- package/src/components/Tabs/__snapshots__/Tabs.test.tsx.snap +394 -5
- package/src/components/Template/Template.stories.mdx +47 -43
- package/src/components/Template/Template.test.tsx +33 -0
- package/src/components/Template/Template.tsx +65 -60
- package/src/components/Template/__snapshots__/Template.test.tsx.snap +191 -20
- package/src/components/Text/Text.stories.mdx +20 -1
- package/src/components/Text/Text.test.tsx +12 -0
- package/src/components/Text/Text.tsx +6 -4
- package/src/components/Text/__snapshots__/Text.test.tsx.snap +21 -4
- package/src/components/TextInput/TextInput.stories.mdx +65 -19
- package/src/components/TextInput/TextInput.test.tsx +42 -28
- package/src/components/TextInput/TextInput.tsx +121 -113
- package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +96 -73
- package/src/components/Toggle/Toggle.stories.mdx +80 -22
- package/src/components/Toggle/Toggle.test.tsx +27 -9
- package/src/components/Toggle/Toggle.tsx +22 -18
- package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +128 -5
- package/src/components/VideoPlayer/VideoPlayer.stories.mdx +52 -4
- package/src/components/VideoPlayer/VideoPlayer.test.tsx +23 -0
- package/src/components/VideoPlayer/VideoPlayer.tsx +133 -126
- package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +81 -39
- package/src/docs/Chakra.stories.mdx +50 -9
- package/src/docs/Welcome.stories.mdx +160 -41
- package/src/hooks/useCarouselStyles.stories.mdx +22 -2
- package/src/hooks/useCarouselStyles.ts +3 -2
- package/src/hooks/useNYPLTheme.stories.mdx +101 -0
- package/src/hooks/useNYPLTheme.ts +30 -6
- package/src/hooks/useWindowSize.stories.mdx +23 -0
- package/src/index.ts +5 -2
- package/src/styles/base/_place-holder.scss +1 -1
- package/src/styles.scss +0 -1
- package/src/theme/components/button.ts +15 -7
- package/src/theme/components/card.ts +30 -19
- package/src/theme/components/checkbox.ts +10 -8
- package/src/theme/components/checkboxGroup.ts +1 -1
- package/src/theme/components/componentWrapper.ts +2 -2
- package/src/theme/components/customTable.ts +39 -31
- package/src/theme/components/fieldset.ts +1 -2
- package/src/theme/components/global.ts +25 -20
- package/src/theme/components/heading.ts +1 -1
- package/src/theme/components/helperErrorText.ts +1 -0
- package/src/theme/components/hero.ts +13 -15
- package/src/theme/components/label.ts +4 -3
- package/src/theme/components/list.ts +73 -66
- package/src/theme/components/notification.ts +2 -2
- package/src/theme/components/radio.ts +9 -9
- package/src/theme/components/radioGroup.ts +1 -1
- package/src/theme/components/select.ts +31 -22
- package/src/theme/components/skeletonLoader.ts +3 -3
- package/src/theme/components/slider.ts +8 -7
- package/src/theme/components/statusBadge.ts +2 -2
- package/src/theme/components/structuredContent.ts +66 -1
- package/src/theme/components/tabs.ts +2 -2
- package/src/theme/components/template.ts +9 -9
- package/src/theme/components/textInput.ts +13 -12
- package/src/theme/components/toggle.ts +17 -10
- package/src/theme/components/videoPlayer.ts +1 -1
- package/src/theme/foundations/colors.ts +1 -1
- package/src/theme/foundations/radii.ts +1 -0
- package/src/theme/foundations/spacing.ts +70 -22
- package/src/theme/foundations/typography.ts +2 -2
- package/src/utils/componentCategories.ts +1 -2
- package/dist/components/SearchBar/SearchBar.Test.d.ts +0 -1
- package/dist/helpers/generateUUID.d.ts +0 -1
- package/src/components/Modal/_Modal.scss +0 -18
- package/src/helpers/generateUUID.tsx +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,91 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
|
|
|
8
8
|
|
|
9
9
|
## Prerelease
|
|
10
10
|
|
|
11
|
+
## 0.27.0 (April 27, 2022)
|
|
12
|
+
|
|
13
|
+
### Adds
|
|
14
|
+
|
|
15
|
+
- Adds two patterns for rendering the updated `Modal` component. This is still an ongoing work-in-progress as the `Modal` gets finalized but it is now using Chakra under-the-hood.
|
|
16
|
+
- Adds `@chakra-ui/storybook-addon` so stories automatically pick up the Chakra-based NYPL theme.
|
|
17
|
+
|
|
18
|
+
### Updates
|
|
19
|
+
|
|
20
|
+
- Updates React and React DOM to version 17.
|
|
21
|
+
- Updates Chakra packages `@chakra-ui/react` and `@chakra-ui/system`.
|
|
22
|
+
- Updates the `HelperErrorText` styling to correctly display when used with a `Select` element with a `labelPosition` of inline.
|
|
23
|
+
|
|
24
|
+
### Removals
|
|
25
|
+
|
|
26
|
+
- Removes the following packages: `@storybook/addon-queryparams` and `react-router-dom`.
|
|
27
|
+
|
|
28
|
+
## 0.26.1 (April 22, 2022)
|
|
29
|
+
|
|
30
|
+
### Updates
|
|
31
|
+
|
|
32
|
+
- Updates storybook URL from /reservoir/v0_26 to /reservoir/v0.
|
|
33
|
+
|
|
34
|
+
### Fixes
|
|
35
|
+
|
|
36
|
+
- Adds updated package-lock file to fix bad installations.
|
|
37
|
+
|
|
38
|
+
## 0.26.0 (April 22, 2022)
|
|
39
|
+
|
|
40
|
+
### Adds
|
|
41
|
+
|
|
42
|
+
- Exports the `useCarouselStyles` and `useWindowSize` hooks and adds documentation for all hooks in Storybook.
|
|
43
|
+
- Adds additional semantic design tokens from `fontWeights` and `fontSizes` to the `useNYPLTheme` hook.
|
|
44
|
+
- Adds a warning if a required `id` prop is not passed to one of the "Form Elements": `Button`, `Checkbox`, `CheckboxGroup`, `DatePicker`, `Fieldset`, `Form`, `Label`, `ProgressIndicator`, `Radio`, `RadioGroup`, `SearchBar`, `Select`, `Slider`, `TextInput`, `Toggle`.
|
|
45
|
+
- Adds the `isRequired` prop to the `Label` component.
|
|
46
|
+
- Adds the `labelPosition` prop to the `Select` component, so that the label can be styled inline with the select input.
|
|
47
|
+
- Adds Chakra's "Style Props" functionality to every Reservoir component. For composed components, such as the `SearchBar` component, these style props are passed to wrapper element. This update also updates the snapshot tests for every component.
|
|
48
|
+
- Adds the functionality to pass all valid HTML attributes to a Reservoir component, such as `data-*` props.
|
|
49
|
+
- Adds semantic design tokens for `spacing` theme object.
|
|
50
|
+
- Adds the `isAlignedRightActions` prop to the `Card` component to render `CardActions` components to the right of the main content area. This only works for the `Card`'s row layout.
|
|
51
|
+
- Adds styles to target native HTML basic elements inside the `StructuredContent` component.
|
|
52
|
+
- Adds `Reservoir` branding to Storybook.
|
|
53
|
+
|
|
54
|
+
### Changes
|
|
55
|
+
|
|
56
|
+
- Updates the hex color value for `ui.gray.light-cool`, `ui.disabled.primary` and `section.blogs.primary`.
|
|
57
|
+
- Updates the default background color used in the `Accordion` component.
|
|
58
|
+
- Updates the default background color used in the `Hero` component.
|
|
59
|
+
- Updates the background color used in the `SkeletonLoader` component.
|
|
60
|
+
- Updates the background color used in the `VideoPlayer` component.
|
|
61
|
+
- Updates the background colors used in the `Tabs` component.
|
|
62
|
+
- Updates the colors for "secondary" and "pill" variants of the `Button` component.
|
|
63
|
+
- Updates the color values used in the `disabled` state for the `Checkbox`, `Radio`, `Select`, `Slider`, `TextInput` and `Toggle` components.
|
|
64
|
+
- Updates the `Checkbox` component to use "3px" for the border radius.
|
|
65
|
+
- Makes the id prop required for all "Form Elements".
|
|
66
|
+
- Updates how the `Required` text in the `Label` and `Fieldset` components is displayed. Instead of floating to the right of the label and legend elements, it is now displayed inlined as `(Required)`.
|
|
67
|
+
- Renames the `optReqFlag` prop to `showRequiredLabel` in the `CheckboxGroup`, `Fieldset`, `RadioGroup`, and `Slider` components.
|
|
68
|
+
- Renames the `showOptReqLabel` prop to `showRequiredLabel` in the `DatePicker`, `Select`, and `TextInput` components.
|
|
69
|
+
- Uses the design token "text.caption" variable for the `Notification`'s font size.
|
|
70
|
+
- Updates the styling for the `HelperErrorText` to be consistent for all components that use it
|
|
71
|
+
- Refactors the `Checkbox`, `CheckboxGroup`, `ComponentWrapper`, `DatePicker`, `Fieldset`, `Label`, `Radio`, `RadioGroup`, `Select`, `Slider`, `TextInput`, and `Toggle` to better use the updated `HelperErrorText` styling.
|
|
72
|
+
- Renames the `Card`'s `center` prop to `isCentered` and `border` prop to `isBordered`.
|
|
73
|
+
- Renames the `SkeletonLoader` component's `border` prop to `isBordered`.
|
|
74
|
+
- Refactors the DS `RadioGroup` component so it internally implements Chakra's `RadioGroup` component rather than the `useRadioGroup` hook. The "uncontrolled" version of Chakra's `RadioGroup` is not working and will be investigated in the future. It is recommended to use the controlled component pattern.
|
|
75
|
+
- Updates the `Fieldset` component to render the "Optional"/"Required" text in the `legend` element as pseudo CSS in the `::after` rule.
|
|
76
|
+
- Passes the `isRequired` prop in the `RadioGroup` and `CheckboxGroup` to the `Fieldset` wrapper component.
|
|
77
|
+
- Updates the `focus` styles for the `Radio`, `Select` and `TextInput` components.
|
|
78
|
+
- Updates the references of the `<dl>` element from "Definition" to "Description", as that's the official name in HTML5. This affects the `List` element and its `ListTypes.Description` enum value.
|
|
79
|
+
- Updates styles for `React Datepicker`'s calendar popup in the `DatePicker` component.
|
|
80
|
+
- Updates storybook URL from /storybook-static/ to /reservoir/v0_26.
|
|
81
|
+
- Updates all references to "design system" in the Storybook documentation to include "Reservoir" in the name of the design system.
|
|
82
|
+
- Updates language on the `Welcome` page.
|
|
83
|
+
|
|
84
|
+
### Removals
|
|
85
|
+
|
|
86
|
+
- Removes the default `Optional` text displayed in the `Label` and `Fieldset` components.
|
|
87
|
+
- Removes the `optReqFlag` prop in the `Label` component.
|
|
88
|
+
- Removes the default autogenerated id for all components, as well as the `uuid` package.
|
|
89
|
+
- Removes the `HorizontalRule`'s `height` and `width` props from its prop interface in favor of Chakra's style props; the default values are still set for `height` and `width`.
|
|
90
|
+
|
|
91
|
+
### Fixes
|
|
92
|
+
|
|
93
|
+
- Fixes how the `Button` component gets rendered inside the `Form` and `FormField` component layout.
|
|
94
|
+
- Fixes how the `Select` component is controlled in the `SearchBar` component.
|
|
95
|
+
|
|
11
96
|
## 0.25.13 (April 1, 2022)
|
|
12
97
|
|
|
13
98
|
### Adds
|
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Reservoir Design System
|
|
2
2
|
|
|
3
3
|

|
|
4
4
|
|
|
5
5
|
[](https://badge.fury.io/js/%40nypl%2Fdesign-system-react-components)
|
|
6
6
|
|
|
7
|
-
The
|
|
7
|
+
The Reservoir Design System (DS) is NYPL’s open-source extensible React library for products and experiences with the accessibility as its foundation. It ships functional, stateless components with consistent NYPL styling. You can learn more about the project and its goals [on the project's wiki](https://github.com/NYPL/nypl-design-system/wiki).
|
|
8
8
|
|
|
9
9
|
_Note: This library is still in beta. Until we release the stable `1.0.0` version, we are loosely using semantic versioning._
|
|
10
10
|
|
|
@@ -185,7 +185,7 @@ function NewComponent(props) {
|
|
|
185
185
|
|
|
186
186
|
## Using Chakra UI Components
|
|
187
187
|
|
|
188
|
-
The Chakra UI component library has been integrated into the
|
|
188
|
+
The Chakra UI component library has been integrated into the Reservoir Design System. We are still progressing towards using Chakra components and patterns to build DS components, and therefore documentation and features are expected to change. While the implementation details of DS components will use Chakra, the DS package itself will export _some_ Chakra components.
|
|
189
189
|
|
|
190
190
|
The list of re-exported Chakra components can be found in the main [index.ts](/src/index.ts) file. They include:
|
|
191
191
|
|
|
@@ -216,15 +216,15 @@ You can check out a working Codepen with unpkg [here](https://codepen.io/edwingu
|
|
|
216
216
|
|
|
217
217
|
## Storybook
|
|
218
218
|
|
|
219
|
-
The
|
|
219
|
+
The Reservoir Design System leverages Storybook to document all the React components and style guidelines. The Storybook documentation can be found [here](https://nypl.github.io/nypl-design-system/storybook-static/?path=/story/introduction--page). For your convenience, the Reservoir Design System components have been organized into logical categories based on both form and function. Please refer to the COMPONENTS section in the Storybook sidebar.
|
|
220
220
|
|
|
221
221
|
### Documentation Instances
|
|
222
222
|
|
|
223
|
-
There are currently two main instances of the
|
|
223
|
+
There are currently two main instances of the Reservoir Design System Storybook documentation. There are also "preview" sites that are used to quickly and easily view pull request changes.
|
|
224
224
|
|
|
225
225
|
**Production**
|
|
226
226
|
|
|
227
|
-
The production Storybook documentation is deployed to [Github Pages](https://nypl.github.io/nypl-design-system/storybook-static/?path=/story/introduction--page). This is the main instance we use to share the latest stable release of the
|
|
227
|
+
The production Storybook documentation is deployed to [Github Pages](https://nypl.github.io/nypl-design-system/storybook-static/?path=/story/introduction--page). This is the main instance we use to share the latest stable release of the Reservoir Design System. This documentation site is deployed through [Github Actions](/.github/workflows/gh-pages.yml) only on merges to the `release` branch.
|
|
228
228
|
|
|
229
229
|
As of July, 2021, the Github Pages production site gets deployed every two weeks on the same schedule as npm releases.
|
|
230
230
|
|
|
@@ -271,11 +271,11 @@ You can then view `/storybook-static/index.html` in your browser. _Make sure not
|
|
|
271
271
|
|
|
272
272
|
## Typescript Usage
|
|
273
273
|
|
|
274
|
-
The
|
|
274
|
+
The Reservoir Design System is built with Typescript. Check out the Design System's [Typescript documentation](/TYPESCRIPT.md) for more information on why we chose to build React components in Typescript and the benefits and the gotchas we encountered.
|
|
275
275
|
|
|
276
276
|
## Unit Testing
|
|
277
277
|
|
|
278
|
-
The
|
|
278
|
+
The Reservoir Design System runs unit tests with Jest and React Testing Library.
|
|
279
279
|
|
|
280
280
|
To run all tests once:
|
|
281
281
|
|
|
@@ -359,7 +359,7 @@ After writing new tests, run `npm run test:generate-output` to create a new JSON
|
|
|
359
359
|
|
|
360
360
|
### Development and Storybook
|
|
361
361
|
|
|
362
|
-
The
|
|
362
|
+
The Reservoir Design System is built with accessibility in mind. By using Chakra UI as our foundational base, the custom DS components built with Chakra have accessibility concerns already implemented. On top of built-in accessible elements, DS components internally work to link labels with input elements, to add correct `aria-*` attributes, to visually hide text but still associate it with the correct element for titles and descriptions, to auto-generate a random `id` attribute if none was passed, and much more.
|
|
363
363
|
|
|
364
364
|
We make use of:
|
|
365
365
|
|
|
@@ -371,7 +371,7 @@ If applicable, DS components have section(s) on accessibility in their Storybook
|
|
|
371
371
|
|
|
372
372
|
### Product Requirements
|
|
373
373
|
|
|
374
|
-
The
|
|
374
|
+
The Reservoir Design System provides accessible stories, but real live data can necessitate additional accessibility requirements beyond what we're committed to in our generic, extensible components. To ensure your products' final result is accessible, please adhere to the accessibility requirements put together by NYPL's accessibility coordinator on [Metronome](http://themetronome.co/).
|
|
375
375
|
|
|
376
376
|
NYPL's Metronome instance is currently password protected. For access to Metronome, please contact NYPL's UX team or Design System team.
|
|
377
377
|
|
|
@@ -17,5 +17,5 @@ export interface AccordionProps {
|
|
|
17
17
|
* Accordion component that shows content on toggle. Can be used to display
|
|
18
18
|
* multiple accordion items together.
|
|
19
19
|
*/
|
|
20
|
-
declare
|
|
20
|
+
export declare const Accordion: import("@chakra-ui/react").ChakraComponent<(props: AccordionProps) => JSX.Element, {}>;
|
|
21
21
|
export default Accordion;
|
|
@@ -18,5 +18,5 @@ export interface BreadcrumbProps {
|
|
|
18
18
|
/** ID that other components can cross reference for accessibility purposes */
|
|
19
19
|
id?: string;
|
|
20
20
|
}
|
|
21
|
-
declare
|
|
21
|
+
export declare const Breadcrumbs: import("@chakra-ui/react").ChakraComponent<(props: BreadcrumbProps) => JSX.Element, {}>;
|
|
22
22
|
export default Breadcrumbs;
|
|
@@ -15,7 +15,7 @@ interface ButtonProps {
|
|
|
15
15
|
/** Additional className to use. */
|
|
16
16
|
className?: string;
|
|
17
17
|
/** ID that other components can cross reference for accessibility purposes. */
|
|
18
|
-
id
|
|
18
|
+
id: string;
|
|
19
19
|
/** Adds 'disabled' property to the button. */
|
|
20
20
|
isDisabled?: boolean;
|
|
21
21
|
/** Trigger the Button's action through the `mouseDown` event handler instead
|
|
@@ -29,5 +29,5 @@ interface ButtonProps {
|
|
|
29
29
|
/**
|
|
30
30
|
* Renders a simple `button` element with custom variant styles.
|
|
31
31
|
*/
|
|
32
|
-
declare
|
|
32
|
+
export declare const Button: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<ButtonProps>) => JSX.Element, {}>;
|
|
33
33
|
export default Button;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { LayoutTypes } from "../../helpers/enums";
|
|
3
|
-
import Heading from "../Heading/Heading";
|
|
4
3
|
import { ComponentImageProps } from "../Image/Image";
|
|
5
4
|
interface CardBaseProps {
|
|
6
5
|
/** Optional value to control the alignment of the text and elements. */
|
|
@@ -28,20 +27,23 @@ interface CardActionsProps extends CardBaseProps {
|
|
|
28
27
|
export interface CardProps extends CardBaseProps, CardLinkBoxProps {
|
|
29
28
|
/** Optional hex color value used to set the card background color. */
|
|
30
29
|
backgroundColor?: string;
|
|
31
|
-
/** Optional boolean value to control the visibility of a border around
|
|
32
|
-
* the card. */
|
|
33
|
-
border?: boolean;
|
|
34
30
|
/** Optional CSS class name to add. */
|
|
35
31
|
className?: string;
|
|
36
32
|
/** Optional hex color value used to override the default text color. */
|
|
37
33
|
foregroundColor?: string;
|
|
38
34
|
/** ID that other components can cross reference for accessibility purposes. */
|
|
39
35
|
id?: string;
|
|
36
|
+
/** Optional boolean value to control the visibility of a border around
|
|
37
|
+
* the card. */
|
|
38
|
+
isBordered?: boolean;
|
|
40
39
|
/** Object used to create and render the `Image` component. */
|
|
41
40
|
imageProps?: CardImageProps;
|
|
41
|
+
/** Set CardActions to the right content side. This only works in
|
|
42
|
+
* the row layout. */
|
|
43
|
+
isAlignedRightActions?: boolean;
|
|
42
44
|
}
|
|
43
|
-
export declare const CardHeading:
|
|
44
|
-
export declare
|
|
45
|
-
export declare
|
|
46
|
-
export
|
|
47
|
-
export
|
|
45
|
+
export declare const CardHeading: import("@chakra-ui/react").ChakraComponent<import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<import("../Heading/Heading").HeadingProps>) => JSX.Element, {}>, {}>;
|
|
46
|
+
export declare const CardContent: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<{}>) => JSX.Element, {}>;
|
|
47
|
+
export declare const CardActions: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<CardActionsProps>) => JSX.Element, {}>;
|
|
48
|
+
export declare const Card: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<CardProps>) => JSX.Element, {}>;
|
|
49
|
+
export default Card;
|
|
@@ -6,7 +6,7 @@ export interface CheckboxProps {
|
|
|
6
6
|
/** Optional string to populate the HelperErrorText for standard state */
|
|
7
7
|
helperText?: HelperErrorTextType;
|
|
8
8
|
/** ID that other components can cross reference for accessibility purposes */
|
|
9
|
-
id
|
|
9
|
+
id: string;
|
|
10
10
|
/** Optional string to populate the HelperErrorText for the error state
|
|
11
11
|
* when `isInvalid` is true. */
|
|
12
12
|
invalidText?: HelperErrorTextType;
|
|
@@ -42,5 +42,5 @@ export interface CheckboxProps {
|
|
|
42
42
|
value?: string;
|
|
43
43
|
}
|
|
44
44
|
export declare const onChangeDefault: () => void;
|
|
45
|
-
declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement
|
|
45
|
+
export declare const Checkbox: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>, {}>;
|
|
46
46
|
export default Checkbox;
|
|
@@ -9,7 +9,7 @@ export interface CheckboxGroupProps {
|
|
|
9
9
|
/** Optional string to populate the HelperErrorText for standard state */
|
|
10
10
|
helperText?: HelperErrorTextType;
|
|
11
11
|
/** ID that other components can cross reference for accessibility purposes */
|
|
12
|
-
id
|
|
12
|
+
id: string;
|
|
13
13
|
/** Optional string to populate the HelperErrorText for error state */
|
|
14
14
|
invalidText?: HelperErrorTextType;
|
|
15
15
|
/** Adds the 'disabled' prop to the input when true. */
|
|
@@ -30,13 +30,14 @@ export interface CheckboxGroupProps {
|
|
|
30
30
|
name: string;
|
|
31
31
|
/** The action to perform on the `<input>`'s onChange function */
|
|
32
32
|
onChange?: (value: string[]) => void;
|
|
33
|
-
/** Whether or not to display "Required"/"Optional" in the label text. */
|
|
34
|
-
optReqFlag?: boolean;
|
|
35
33
|
/** Offers the ability to hide the helper/invalid text. */
|
|
36
34
|
showHelperInvalidText?: boolean;
|
|
37
35
|
/** Offers the ability to show the group's legend onscreen or hide it. Refer
|
|
38
36
|
* to the `labelText` property for more information. */
|
|
39
37
|
showLabel?: boolean;
|
|
38
|
+
/** Whether or not to display the "(Required)" text in the label text.
|
|
39
|
+
* True by default. */
|
|
40
|
+
showRequiredLabel?: boolean;
|
|
40
41
|
}
|
|
41
42
|
/**
|
|
42
43
|
* Wrapper component to wrap `Checkbox` components. Can be displayed in a
|
|
@@ -44,5 +45,5 @@ export interface CheckboxGroupProps {
|
|
|
44
45
|
* wrapping and associated text elements, but the checkbox input elements
|
|
45
46
|
* _need_ to be child `Checkbox` components from the NYPL Design System.
|
|
46
47
|
*/
|
|
47
|
-
declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLInputElement
|
|
48
|
+
export declare const CheckboxGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLInputElement>>, {}>;
|
|
48
49
|
export default CheckboxGroup;
|
|
@@ -17,5 +17,5 @@ export interface ComponentWrapperProps {
|
|
|
17
17
|
/** Sets invalid text in the error state. */
|
|
18
18
|
isInvalid?: boolean;
|
|
19
19
|
}
|
|
20
|
-
declare
|
|
20
|
+
export declare const ComponentWrapper: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<ComponentWrapperProps>) => JSX.Element, {}>;
|
|
21
21
|
export default ComponentWrapper;
|
|
@@ -11,7 +11,7 @@ export interface FullDateType {
|
|
|
11
11
|
}
|
|
12
12
|
interface DateRangeRowProps {
|
|
13
13
|
/** ID that other components can cross reference for accessibility purposes. */
|
|
14
|
-
id
|
|
14
|
+
id: string;
|
|
15
15
|
/** Whether to render a single date input or two for a range of two dates. */
|
|
16
16
|
isDateRange?: boolean;
|
|
17
17
|
}
|
|
@@ -24,8 +24,9 @@ interface DatePickerWrapperProps extends DateRangeRowProps {
|
|
|
24
24
|
labelText: string;
|
|
25
25
|
/** Offers the ability to show the label onscreen or hide it. */
|
|
26
26
|
showLabel?: boolean;
|
|
27
|
-
/** Whether or not to display the "Required"
|
|
28
|
-
|
|
27
|
+
/** Whether or not to display the "(Required)" text in the label text.
|
|
28
|
+
* True by default. */
|
|
29
|
+
showRequiredLabel?: boolean;
|
|
29
30
|
}
|
|
30
31
|
export interface DatePickerProps extends DatePickerWrapperProps {
|
|
31
32
|
/** The date format to display. Defaults to "yyyy-MM-dd".
|
|
@@ -72,11 +73,9 @@ export interface DatePickerProps extends DatePickerWrapperProps {
|
|
|
72
73
|
refTo?: React.Ref<TextInputRefType>;
|
|
73
74
|
/** Offers the ability to hide the helper/invalid text. */
|
|
74
75
|
showHelperInvalidText?: boolean;
|
|
75
|
-
/** Whether or not to display the "Required"/"Optional" text in the label text. */
|
|
76
|
-
showOptReqLabel?: boolean;
|
|
77
76
|
}
|
|
78
77
|
/**
|
|
79
78
|
* Returns a single date input field or two date input fields for a date range.
|
|
80
79
|
*/
|
|
81
|
-
declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<TextInputRefType
|
|
80
|
+
export declare const DatePicker: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<TextInputRefType>>, {}>;
|
|
82
81
|
export default DatePicker;
|
|
@@ -3,21 +3,20 @@ interface FieldsetProps {
|
|
|
3
3
|
/** Additional class name to add. */
|
|
4
4
|
className?: string;
|
|
5
5
|
/** ID that other components can cross reference for accessibility purposes */
|
|
6
|
-
id
|
|
6
|
+
id: string;
|
|
7
7
|
/** Flag to show or hide the text in the `legend` element. False by default. */
|
|
8
8
|
isLegendHidden?: boolean;
|
|
9
|
-
/** Flag to render "Required"
|
|
10
|
-
* False/"Optional" by default. */
|
|
9
|
+
/** Flag to render "Required" in the `legend`. True by default. */
|
|
11
10
|
isRequired?: boolean;
|
|
12
11
|
/** Text to display in the `legend` element. */
|
|
13
12
|
legendText?: string;
|
|
14
|
-
/**
|
|
13
|
+
/** Whether or not to display the "(Required)" text in the `legend` text.
|
|
15
14
|
* True by default. */
|
|
16
|
-
|
|
15
|
+
showRequiredLabel?: boolean;
|
|
17
16
|
}
|
|
18
17
|
/**
|
|
19
18
|
* A wrapper component that renders a `fieldset` element along with a `legend`
|
|
20
19
|
* element as its first child. Commonly used to wrap form components.
|
|
21
20
|
*/
|
|
22
|
-
declare const Fieldset: ({ children, className, id, isLegendHidden, isRequired, legendText,
|
|
21
|
+
export declare const Fieldset: import("@chakra-ui/react").ChakraComponent<({ children, className, id, isLegendHidden, isRequired, legendText, showRequiredLabel, ...rest }: React.PropsWithChildren<FieldsetProps>) => JSX.Element, {}>;
|
|
23
22
|
export default Fieldset;
|
|
@@ -8,9 +8,9 @@ interface FormBaseProps {
|
|
|
8
8
|
* should not be used``` */
|
|
9
9
|
gap?: FormGaps;
|
|
10
10
|
/** ID that other components can cross reference (internal use) */
|
|
11
|
-
id
|
|
11
|
+
id: string;
|
|
12
12
|
}
|
|
13
|
-
export interface FormChildProps extends FormBaseProps {
|
|
13
|
+
export interface FormChildProps extends Partial<FormBaseProps> {
|
|
14
14
|
}
|
|
15
15
|
export interface FormProps extends FormBaseProps {
|
|
16
16
|
/** Optional form `action` attribute */
|
|
@@ -21,9 +21,9 @@ export interface FormProps extends FormBaseProps {
|
|
|
21
21
|
onSubmit?: (e: React.FormEvent<HTMLFormElement>) => void;
|
|
22
22
|
}
|
|
23
23
|
/** FormRow child-component */
|
|
24
|
-
export declare
|
|
24
|
+
export declare const FormRow: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<FormChildProps>) => JSX.Element, {}>;
|
|
25
25
|
/** FormField child-component */
|
|
26
|
-
export declare
|
|
26
|
+
export declare const FormField: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<FormChildProps>) => JSX.Element, {}>;
|
|
27
27
|
/** Main Form component */
|
|
28
|
-
export
|
|
29
|
-
export
|
|
28
|
+
export declare const Form: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<FormProps>) => JSX.Element, {}>;
|
|
29
|
+
export default Form;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export declare enum GridGaps {
|
|
2
|
-
ExtraExtraSmall = "xxs",
|
|
3
|
-
ExtraSmall = "xs",
|
|
4
|
-
Small = "s",
|
|
5
|
-
Medium = "m",
|
|
6
|
-
Large = "l",
|
|
7
|
-
ExtraLarge = "xl",
|
|
8
|
-
ExtraExtraLarge = "xxl"
|
|
2
|
+
ExtraExtraSmall = "grid.xxs",
|
|
3
|
+
ExtraSmall = "grid.xs",
|
|
4
|
+
Small = "grid.s",
|
|
5
|
+
Medium = "grid.m",
|
|
6
|
+
Large = "grid.l",
|
|
7
|
+
ExtraLarge = "grid.xl",
|
|
8
|
+
ExtraExtraLarge = "grid.xxl"
|
|
9
9
|
}
|
|
@@ -10,5 +10,5 @@ export interface SimpleGridProps {
|
|
|
10
10
|
/** ID that other components can cross reference for accessibility purposes */
|
|
11
11
|
id?: string;
|
|
12
12
|
}
|
|
13
|
-
declare
|
|
13
|
+
export declare const SimpleGrid: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<SimpleGridProps>) => JSX.Element, {}>;
|
|
14
14
|
export default SimpleGrid;
|
|
@@ -24,5 +24,5 @@ export interface HeadingProps {
|
|
|
24
24
|
/** Optional className for the URL when the `url` prop is passed */
|
|
25
25
|
urlClass?: string;
|
|
26
26
|
}
|
|
27
|
-
declare
|
|
27
|
+
export declare const Heading: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<HeadingProps>) => JSX.Element, {}>;
|
|
28
28
|
export default Heading;
|
|
@@ -10,11 +10,12 @@ interface HelperErrorTextProps {
|
|
|
10
10
|
* read the entire DOM element. When false, only changes (additionals or
|
|
11
11
|
* removals) will be read. True by default. */
|
|
12
12
|
ariaAtomic?: boolean;
|
|
13
|
-
/** Aria attribute
|
|
14
|
-
* indicates the priority of the text and when it should be presented to
|
|
15
|
-
* using screen readers; "off" indicates that the content should not be
|
|
16
|
-
* "polite" that it will be announced at the next available time
|
|
17
|
-
* "assertive" that it should be announced immediately.
|
|
13
|
+
/** Aria attribute used in the invalid state to read error text by default.
|
|
14
|
+
* This indicates the priority of the text and when it should be presented to
|
|
15
|
+
* users using screen readers; "off" indicates that the content should not be
|
|
16
|
+
* presented, "polite" that it will be announced at the next available time
|
|
17
|
+
* slot, and "assertive" that it should be announced immediately. This is set
|
|
18
|
+
* to "off" by default and to "polite" by when `isInvalid` is true. */
|
|
18
19
|
ariaLive?: AriaLiveValues;
|
|
19
20
|
/** Additional className to add. */
|
|
20
21
|
className?: string;
|
|
@@ -26,7 +27,7 @@ interface HelperErrorTextProps {
|
|
|
26
27
|
text: HelperErrorTextType;
|
|
27
28
|
}
|
|
28
29
|
/**
|
|
29
|
-
* Helper or
|
|
30
|
+
* Helper or error text for forms components.
|
|
30
31
|
*/
|
|
31
|
-
export
|
|
32
|
-
export
|
|
32
|
+
export declare const HelperErrorText: import("@chakra-ui/react").ChakraComponent<({ additionalStyles, ariaAtomic, ariaLive, className, id, isInvalid, text, ...rest }: HelperErrorTextProps) => JSX.Element, {}>;
|
|
33
|
+
export default HelperErrorText;
|
|
@@ -32,4 +32,5 @@ export interface HeroProps {
|
|
|
32
32
|
* underneath the heading element. */
|
|
33
33
|
subHeaderText?: string | JSX.Element;
|
|
34
34
|
}
|
|
35
|
-
export
|
|
35
|
+
export declare const Hero: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<HeroProps>) => JSX.Element, {}>;
|
|
36
|
+
export default Hero;
|
|
@@ -6,14 +6,6 @@ export interface HorizontalRuleProps {
|
|
|
6
6
|
align?: "left" | "right";
|
|
7
7
|
/** ClassName you can add in addition to `horizontal-rule` */
|
|
8
8
|
className?: string;
|
|
9
|
-
/** Optional height value. This value should be entered with the same
|
|
10
|
-
* formatting as a CSS height attribute except for percent values (ex. `2`,
|
|
11
|
-
* `5px`, `1.5rem`). If this prop is omitted or a percent value is used, the
|
|
12
|
-
* horizontal rule will have a default height of 2px. */
|
|
13
|
-
height?: string;
|
|
14
|
-
/** Optional width value. This value should be entered with the same
|
|
15
|
-
* formatting as a CSS width attribute (ex. `50%`, `640px`, `20rem`). If
|
|
16
|
-
* omitted, the horizontal rule will have a default width of "100%". */
|
|
17
|
-
width?: string;
|
|
18
9
|
}
|
|
19
|
-
export
|
|
10
|
+
export declare const HorizontalRule: import("@chakra-ui/react").ChakraComponent<(props: HorizontalRuleProps) => JSX.Element, {}>;
|
|
11
|
+
export default HorizontalRule;
|
|
@@ -32,4 +32,5 @@ export interface IconProps {
|
|
|
32
32
|
/**
|
|
33
33
|
* Renders SVG-based icons.
|
|
34
34
|
*/
|
|
35
|
-
export
|
|
35
|
+
export declare const Icon: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<IconProps>) => JSX.Element, {}>;
|
|
36
|
+
export default Icon;
|
|
@@ -54,5 +54,5 @@ export interface ImageProps extends ImageWrapperProps {
|
|
|
54
54
|
/** The src attribute is required, and contains the path to the image you want to embed. */
|
|
55
55
|
src: string;
|
|
56
56
|
}
|
|
57
|
-
export
|
|
58
|
-
export
|
|
57
|
+
export declare const Image: import("@chakra-ui/react").ChakraComponent<(props: ImageProps) => JSX.Element, {}>;
|
|
58
|
+
export default Image;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare type optReqFlagType = "Required" | "Optional" | "" | undefined;
|
|
3
2
|
interface LabelProps {
|
|
4
3
|
/** Additional CSS class name to render in the `label` element. */
|
|
5
4
|
className?: string;
|
|
@@ -7,11 +6,15 @@ interface LabelProps {
|
|
|
7
6
|
htmlFor: string;
|
|
8
7
|
/** ID that other components can cross reference for accessibility purposes */
|
|
9
8
|
id?: string;
|
|
10
|
-
/**
|
|
11
|
-
|
|
9
|
+
/** Controls whether the label should be inline with the input it goes with.
|
|
10
|
+
* This prop should only be used internally. */
|
|
11
|
+
isInlined?: boolean;
|
|
12
|
+
/** Controls whether the "(Required)" text should be displayed alongside the
|
|
13
|
+
* label's text. False by default. */
|
|
14
|
+
isRequired?: boolean;
|
|
12
15
|
}
|
|
13
16
|
/**
|
|
14
17
|
* A label for form inputs. It should never be used alone.
|
|
15
18
|
*/
|
|
16
|
-
declare
|
|
19
|
+
export declare const Label: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<LabelProps>) => JSX.Element, {}>;
|
|
17
20
|
export default Label;
|
|
@@ -24,5 +24,5 @@ export interface LinkProps {
|
|
|
24
24
|
* A component that uses an `href` prop or a child anchor element, to create
|
|
25
25
|
* an anchor element with added styling and conventions.
|
|
26
26
|
*/
|
|
27
|
-
declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement
|
|
27
|
+
export declare const Link: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>, {}>;
|
|
28
28
|
export default Link;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { ListTypes } from "./ListTypes";
|
|
3
|
-
interface
|
|
3
|
+
interface DescriptionProps {
|
|
4
4
|
term: string;
|
|
5
|
-
|
|
5
|
+
description: string | JSX.Element;
|
|
6
6
|
}
|
|
7
7
|
export interface ListProps {
|
|
8
8
|
/** Optionally pass in additional Chakra-based styles. */
|
|
@@ -17,23 +17,23 @@ export interface ListProps {
|
|
|
17
17
|
inline?: boolean;
|
|
18
18
|
/** Data to render if children are not passed. For `ListTypes.Ordered` and
|
|
19
19
|
* `ListTypes.Unordered` `List` types, the data structure is an array of
|
|
20
|
-
* strings to renders as `li` items. For `ListTypes.
|
|
21
|
-
* the data structure is an array of objects with `term` and `
|
|
20
|
+
* strings to renders as `li` items. For `ListTypes.Description` `List` types,
|
|
21
|
+
* the data structure is an array of objects with `term` and `description`
|
|
22
22
|
* properties to render `dt` and `dd` elements, respectively.
|
|
23
23
|
*/
|
|
24
|
-
listItems?: (string | JSX.Element |
|
|
24
|
+
listItems?: (string | JSX.Element | DescriptionProps)[];
|
|
25
25
|
/** Remove list styling. */
|
|
26
26
|
noStyling?: boolean;
|
|
27
27
|
/** An optional title that will appear over the list. This prop only applies
|
|
28
|
-
* to
|
|
28
|
+
* to Description Lists. */
|
|
29
29
|
title?: string;
|
|
30
|
-
/** The type of list: Ordered, Unordered, or
|
|
30
|
+
/** The type of list: Ordered, Unordered, or Description. Unordered by default. */
|
|
31
31
|
type: ListTypes;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
34
|
-
* A component that renders list item `li` elements or
|
|
34
|
+
* A component that renders list item `li` elements or description item `dt`
|
|
35
35
|
* and `dd` elements based on the `type` prop. Note that the `title` prop will
|
|
36
|
-
* only display for the `
|
|
36
|
+
* only display for the `Description` list type.
|
|
37
37
|
*/
|
|
38
|
-
export
|
|
39
|
-
export
|
|
38
|
+
export declare const List: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<ListProps>) => any, {}>;
|
|
39
|
+
export default List;
|
|
@@ -25,4 +25,5 @@ export interface LogoProps {
|
|
|
25
25
|
* The `Logo` component renders SVG-based logos and color variants that are
|
|
26
26
|
* commonly used by the New York Public Library.
|
|
27
27
|
*/
|
|
28
|
-
export
|
|
28
|
+
export declare const Logo: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<LogoProps>) => JSX.Element, {}>;
|
|
29
|
+
export default Logo;
|
|
@@ -23,6 +23,8 @@ declare const _default: {
|
|
|
23
23
|
logo_qpl_black: string;
|
|
24
24
|
logo_qpl_color: string;
|
|
25
25
|
logo_qpl_white: string;
|
|
26
|
+
logo_reservoir_icon_color: string;
|
|
27
|
+
logo_reservoir_vertical_color: string;
|
|
26
28
|
logo_schomburg_black: string;
|
|
27
29
|
logo_schomburg_circle_black: string;
|
|
28
30
|
logo_schomburg_circle_color: string;
|
|
@@ -36,6 +36,8 @@ export declare enum LogoNames {
|
|
|
36
36
|
QueensPublicLibraryWhite = "logo_qpl_white",
|
|
37
37
|
QueensPublicLibraryAltBlack = "logo_qpl_alt_black",
|
|
38
38
|
QueensPublicLibraryAltWhite = "logo_qpl_alt_white",
|
|
39
|
+
ReservoirIconColor = "logo_reservoir_icon_color",
|
|
40
|
+
ReservoirVerticalColor = "logo_reservoir_vertical_color",
|
|
39
41
|
SchomburgColor = "logo_schomburg_color",
|
|
40
42
|
SchomburgBlack = "logo_schomburg_black",
|
|
41
43
|
SchomburgWhite = "logo_schomburg_white",
|