@nypl/design-system-react-components 0.26.0 → 0.28.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 +56 -0
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -5
- package/dist/components/Button/Button.d.ts +2 -10
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +22 -0
- package/dist/components/Card/Card.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.d.ts +10 -8
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Form/Form.d.ts +2 -2
- package/dist/components/Grid/SimpleGrid.d.ts +6 -3
- package/dist/components/Heading/Heading.d.ts +2 -5
- package/dist/components/HelperErrorText/HelperErrorText.d.ts +1 -5
- package/dist/components/Hero/Hero.d.ts +13 -9
- package/dist/components/Icons/Icon.d.ts +6 -5
- package/dist/components/Icons/IconSvgs.d.ts +21 -21
- package/dist/components/Image/Image.d.ts +8 -5
- package/dist/components/Link/Link.d.ts +1 -9
- package/dist/components/List/List.d.ts +7 -11
- package/dist/components/Logo/Logo.d.ts +2 -5
- package/dist/components/Logo/LogoSvgs.d.ts +39 -39
- package/dist/components/Modal/Modal.d.ts +28 -8
- package/dist/components/Notification/Notification.d.ts +1 -1
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +2 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +3 -2
- package/dist/components/Select/Select.d.ts +2 -5
- package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +4 -4
- package/dist/components/SkipNavigation/SkipNavigation.d.ts +17 -0
- package/dist/components/StatusBadge/StatusBadge.d.ts +2 -3
- package/dist/components/StructuredContent/StructuredContent.d.ts +2 -2
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Template/Template.d.ts +2 -0
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/TextInput/TextInput.d.ts +21 -9
- package/dist/components/Toggle/Toggle.d.ts +1 -5
- package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
- package/dist/design-system-react-components.cjs.development.js +977 -1213
- 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 +976 -1276
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/helpers/types.d.ts +1 -0
- package/dist/index.d.ts +27 -48
- package/dist/styles.css +1 -1
- package/dist/theme/components/buttonGroup.d.ts +11 -0
- package/dist/theme/components/card.d.ts +104 -8
- package/dist/theme/components/componentWrapper.d.ts +4 -3
- package/dist/theme/components/customTable.d.ts +11 -14
- package/dist/theme/components/fieldset.d.ts +4 -3
- package/dist/theme/components/helperErrorText.d.ts +4 -3
- package/dist/theme/components/hero.d.ts +1 -1
- package/dist/theme/components/horizontalRule.d.ts +4 -3
- package/dist/theme/components/icon.d.ts +47743 -1
- package/dist/theme/components/image.d.ts +563 -10
- package/dist/theme/components/label.d.ts +4 -3
- package/dist/theme/components/list.d.ts +6 -7
- package/dist/theme/components/logo.d.ts +474 -1
- package/dist/theme/components/notification.d.ts +20 -16
- package/dist/theme/components/progressIndicator.d.ts +6 -4
- package/dist/theme/components/select.d.ts +4 -10
- package/dist/theme/components/skeletonLoader.d.ts +14 -10
- package/dist/theme/components/skipNavigation.d.ts +22 -0
- package/dist/theme/components/slider.d.ts +7 -6
- package/dist/theme/components/structuredContent.d.ts +10 -9
- package/dist/theme/components/text.d.ts +7 -1
- package/dist/theme/components/toggle.d.ts +6 -4
- package/dist/theme/provider.d.ts +2 -4
- package/dist/utils/componentCategories.d.ts +1 -1
- package/dist/utils/interfaces.d.ts +5 -0
- package/dist/utils/utils.d.ts +2 -18
- package/package.json +15 -16
- package/src/__tests__/setup.ts +3 -3
- package/src/__tests__/utils/utils.test.ts +1 -23
- package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +22 -14
- package/src/components/Accordion/Accordion.stories.mdx +43 -44
- package/src/components/Accordion/Accordion.test.tsx +5 -13
- package/src/components/Accordion/Accordion.tsx +14 -18
- package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +6 -6
- package/src/components/Autosuggest/Autosuggest.stories.mdx +1 -1
- package/src/components/Autosuggest/Autosuggest.stories.tsx +23 -25
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +21 -37
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +4 -17
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +18 -21
- package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +1 -100
- package/src/components/Button/Button.stories.mdx +89 -126
- package/src/components/Button/Button.test.tsx +16 -30
- package/src/components/Button/Button.tsx +14 -20
- package/src/components/ButtonGroup/ButtonGroup.stories.mdx +147 -0
- package/src/components/ButtonGroup/ButtonGroup.test.tsx +141 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +99 -0
- package/src/components/ButtonGroup/__snapshots__/ButtonGroup.test.tsx.snap +117 -0
- package/src/components/Card/Card.stories.mdx +143 -177
- package/src/components/Card/Card.test.tsx +36 -97
- package/src/components/Card/Card.tsx +78 -74
- package/src/components/Card/__snapshots__/Card.test.tsx.snap +1 -1
- package/src/components/Chakra/Box.stories.mdx +2 -6
- package/src/components/Chakra/Center.stories.mdx +5 -23
- package/src/components/Chakra/Flex.stories.mdx +4 -6
- package/src/components/Chakra/Stack.stories.mdx +9 -10
- package/src/components/Checkbox/Checkbox.stories.mdx +1 -1
- package/src/components/Checkbox/Checkbox.test.tsx +2 -2
- package/src/components/Checkbox/Checkbox.tsx +20 -13
- package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +9 -9
- package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +6 -17
- package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +1 -7
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +33 -29
- package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +24 -35
- package/src/components/ComponentWrapper/ComponentWrapper.tsx +3 -10
- package/src/components/DatePicker/DatePicker.stories.mdx +23 -37
- package/src/components/DatePicker/DatePicker.test.tsx +21 -19
- package/src/components/DatePicker/DatePicker.tsx +57 -49
- package/src/components/Form/Form.stories.mdx +46 -31
- package/src/components/Form/Form.test.tsx +1 -18
- package/src/components/Form/Form.tsx +7 -7
- package/src/components/Grid/SimpleGrid.stories.mdx +73 -49
- package/src/components/Grid/SimpleGrid.test.tsx +7 -9
- package/src/components/Grid/SimpleGrid.tsx +14 -11
- package/src/components/Heading/Heading.stories.mdx +27 -72
- package/src/components/Heading/Heading.test.tsx +18 -44
- package/src/components/Heading/Heading.tsx +7 -10
- package/src/components/HelperErrorText/HelperErrorText.stories.mdx +1 -3
- package/src/components/HelperErrorText/HelperErrorText.tsx +1 -5
- package/src/components/Hero/Hero.stories.mdx +219 -216
- package/src/components/Hero/Hero.test.tsx +107 -223
- package/src/components/Hero/Hero.tsx +63 -61
- package/src/components/Icons/Icon.stories.mdx +172 -118
- package/src/components/Icons/Icon.test.tsx +8 -16
- package/src/components/Icons/Icon.tsx +75 -29
- package/src/components/Icons/IconSvgs.tsx +42 -42
- package/src/components/Image/Image.stories.mdx +45 -132
- package/src/components/Image/Image.test.tsx +16 -31
- package/src/components/Image/Image.tsx +28 -12
- package/src/components/Link/Link.stories.mdx +30 -94
- package/src/components/Link/Link.test.tsx +25 -75
- package/src/components/Link/Link.tsx +43 -56
- package/src/components/Link/__snapshots__/Link.test.tsx.snap +1 -2
- package/src/components/List/List.stories.mdx +20 -31
- package/src/components/List/List.test.tsx +24 -43
- package/src/components/List/List.tsx +25 -36
- package/src/components/Logo/Logo.stories.mdx +94 -50
- package/src/components/Logo/Logo.test.tsx +10 -19
- package/src/components/Logo/Logo.tsx +50 -17
- package/src/components/Logo/LogoSvgs.tsx +78 -78
- package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +4 -4
- package/src/components/Modal/Modal.stories.mdx +245 -139
- package/src/components/Modal/Modal.test.tsx +147 -10
- 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 +10 -28
- package/src/components/Notification/Notification.test.tsx +9 -12
- package/src/components/Notification/Notification.tsx +34 -37
- package/src/components/Pagination/Pagination.stories.mdx +3 -4
- package/src/components/Pagination/Pagination.tsx +15 -10
- package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +27 -53
- package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +9 -10
- package/src/components/ProgressIndicator/ProgressIndicator.tsx +17 -21
- package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +0 -10
- package/src/components/Radio/Radio.stories.mdx +1 -1
- package/src/components/Radio/Radio.tsx +9 -6
- package/src/components/RadioGroup/RadioGroup.stories.mdx +15 -16
- package/src/components/RadioGroup/RadioGroup.test.tsx +2 -8
- package/src/components/RadioGroup/RadioGroup.tsx +28 -24
- package/src/components/SearchBar/SearchBar.stories.mdx +1 -1
- package/src/components/SearchBar/SearchBar.test.tsx +1 -1
- package/src/components/SearchBar/SearchBar.tsx +14 -22
- package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1 -13
- package/src/components/Select/Select.stories.mdx +10 -25
- package/src/components/Select/Select.test.tsx +6 -7
- package/src/components/Select/Select.tsx +28 -35
- package/src/components/Select/__snapshots__/Select.test.tsx.snap +24 -24
- package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +17 -56
- package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +7 -21
- package/src/components/SkeletonLoader/SkeletonLoader.tsx +9 -8
- package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +33 -33
- package/src/components/SkipNavigation/SkipNavigation.stories.mdx +90 -0
- package/src/components/SkipNavigation/SkipNavigation.test.tsx +63 -0
- package/src/components/SkipNavigation/SkipNavigation.tsx +51 -0
- package/src/components/SkipNavigation/__snapshots__/SkipNavigation.test.tsx.snap +130 -0
- package/src/components/Slider/Slider.stories.mdx +19 -53
- package/src/components/Slider/Slider.test.tsx +2 -2
- package/src/components/Slider/Slider.tsx +10 -12
- package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +2 -9
- package/src/components/StatusBadge/StatusBadge.stories.mdx +6 -21
- package/src/components/StatusBadge/StatusBadge.test.tsx +2 -3
- package/src/components/StatusBadge/StatusBadge.tsx +3 -10
- package/src/components/StructuredContent/StructuredContent.stories.mdx +30 -58
- package/src/components/StructuredContent/StructuredContent.test.tsx +42 -44
- package/src/components/StructuredContent/StructuredContent.tsx +9 -18
- package/src/components/StyleGuide/Bidirectionality.stories.mdx +9 -23
- package/src/components/StyleGuide/Buttons.stories.mdx +62 -62
- package/src/components/StyleGuide/ColorCard.tsx +2 -4
- package/src/components/StyleGuide/Colors.stories.mdx +7 -8
- package/src/components/StyleGuide/DesignTokens.stories.mdx +5 -7
- package/src/components/StyleGuide/Forms.stories.mdx +0 -1
- package/src/components/StyleGuide/Iconography.stories.mdx +59 -77
- package/src/components/StyleGuide/Spacing.stories.mdx +0 -1
- package/src/components/StyleGuide/Typography.stories.mdx +15 -18
- package/src/components/Table/Table.stories.mdx +85 -1
- package/src/components/Table/Table.test.tsx +57 -1
- package/src/components/Table/Table.tsx +7 -4
- package/src/components/Table/__snapshots__/Table.test.tsx.snap +121 -0
- package/src/components/Tabs/Tabs.stories.mdx +1 -1
- package/src/components/Tabs/Tabs.test.tsx +2 -2
- package/src/components/Tabs/Tabs.tsx +26 -27
- package/src/components/Template/Template.stories.mdx +49 -54
- package/src/components/Template/Template.tsx +9 -3
- package/src/components/Text/Text.stories.mdx +5 -11
- package/src/components/Text/Text.test.tsx +3 -6
- package/src/components/Text/Text.tsx +3 -5
- package/src/components/TextInput/TextInput.stories.mdx +10 -22
- package/src/components/TextInput/TextInput.test.tsx +32 -62
- package/src/components/TextInput/TextInput.tsx +61 -30
- package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +1 -0
- package/src/components/Toggle/Toggle.stories.mdx +5 -16
- package/src/components/Toggle/Toggle.test.tsx +2 -3
- package/src/components/Toggle/Toggle.tsx +9 -10
- package/src/components/VideoPlayer/VideoPlayer.stories.mdx +13 -29
- package/src/components/VideoPlayer/VideoPlayer.test.tsx +18 -23
- package/src/components/VideoPlayer/VideoPlayer.tsx +13 -10
- package/src/docs/Chakra.stories.mdx +14 -11
- package/src/docs/Welcome.stories.mdx +23 -43
- package/src/helpers/types.ts +1 -0
- package/src/hooks/tests/useNYPLTheme.test.tsx +1 -1
- package/src/hooks/useNYPLTheme.stories.mdx +3 -6
- package/src/index.ts +52 -46
- package/src/styles.scss +0 -1
- package/src/theme/components/buttonGroup.ts +10 -0
- package/src/theme/components/card.ts +50 -15
- package/src/theme/components/componentWrapper.ts +5 -1
- package/src/theme/components/customTable.ts +8 -2
- package/src/theme/components/fieldset.ts +5 -1
- package/src/theme/components/helperErrorText.ts +5 -1
- package/src/theme/components/hero.ts +2 -2
- package/src/theme/components/horizontalRule.ts +5 -1
- package/src/theme/components/icon.ts +7 -1
- package/src/theme/components/image.ts +14 -3
- package/src/theme/components/label.ts +5 -1
- package/src/theme/components/list.ts +8 -2
- package/src/theme/components/logo.ts +5 -1
- package/src/theme/components/notification.ts +38 -14
- package/src/theme/components/progressIndicator.ts +10 -5
- package/src/theme/components/select.ts +5 -6
- package/src/theme/components/skeletonLoader.ts +8 -2
- package/src/theme/components/skipNavigation.ts +26 -0
- package/src/theme/components/slider.ts +13 -1
- package/src/theme/components/structuredContent.ts +11 -1
- package/src/theme/components/text.ts +12 -5
- package/src/theme/components/toggle.ts +9 -3
- package/src/theme/index.ts +4 -0
- package/src/theme/provider.tsx +1 -1
- package/src/utils/componentCategories.ts +13 -5
- package/src/utils/interfaces.ts +5 -0
- package/src/utils/utils.ts +2 -32
- package/dist/components/Accordion/AccordionTypes.d.ts +0 -5
- package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +0 -8
- package/dist/components/Button/ButtonTypes.d.ts +0 -8
- package/dist/components/DatePicker/DatePickerTypes.d.ts +0 -5
- package/dist/components/Form/FormTypes.d.ts +0 -2
- package/dist/components/Grid/GridTypes.d.ts +0 -9
- package/dist/components/Heading/HeadingTypes.d.ts +0 -14
- package/dist/components/Hero/HeroTypes.d.ts +0 -12
- package/dist/components/Icons/IconTypes.d.ts +0 -77
- package/dist/components/Image/ImageTypes.d.ts +0 -22
- package/dist/components/Link/LinkTypes.d.ts +0 -8
- package/dist/components/List/ListTypes.d.ts +0 -5
- package/dist/components/Logo/LogoTypes.d.ts +0 -54
- package/dist/components/Notification/NotificationTypes.d.ts +0 -5
- package/dist/components/ProgressIndicator/ProgressIndicatorTypes.d.ts +0 -8
- package/dist/components/Select/SelectTypes.d.ts +0 -8
- package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +0 -5
- package/dist/components/StatusBadge/StatusBadgeTypes.d.ts +0 -5
- package/dist/components/StructuredContent/StructuredContentTypes.d.ts +0 -5
- package/dist/components/Text/TextTypes.d.ts +0 -6
- package/dist/components/TextInput/TextInputTypes.d.ts +0 -25
- package/dist/components/Toggle/ToggleTypes.d.ts +0 -4
- package/dist/components/VideoPlayer/VideoPlayerTypes.d.ts +0 -9
- package/dist/helpers/enums.d.ts +0 -4
- package/dist/utils/siteSections.d.ts +0 -2
- package/src/components/Accordion/AccordionTypes.tsx +0 -5
- package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +0 -8
- package/src/components/Button/ButtonTypes.tsx +0 -8
- package/src/components/DatePicker/DatePickerTypes.tsx +0 -5
- package/src/components/Form/FormTypes.tsx +0 -3
- package/src/components/Grid/GridTypes.tsx +0 -9
- package/src/components/Heading/HeadingTypes.tsx +0 -15
- package/src/components/Hero/HeroTypes.tsx +0 -20
- package/src/components/Icons/IconTypes.tsx +0 -83
- package/src/components/Image/ImageTypes.ts +0 -24
- package/src/components/Link/LinkTypes.tsx +0 -8
- package/src/components/List/ListTypes.tsx +0 -5
- package/src/components/Logo/LogoTypes.tsx +0 -56
- package/src/components/Modal/_Modal.scss +0 -18
- package/src/components/Notification/NotificationTypes.tsx +0 -5
- package/src/components/ProgressIndicator/ProgressIndicatorTypes.ts +0 -8
- package/src/components/Select/SelectTypes.tsx +0 -10
- package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +0 -5
- package/src/components/StatusBadge/StatusBadgeTypes.tsx +0 -5
- package/src/components/StructuredContent/StructuredContentTypes.tsx +0 -5
- package/src/components/Text/TextTypes.tsx +0 -6
- package/src/components/TextInput/TextInputTypes.tsx +0 -48
- package/src/components/Toggle/ToggleTypes.tsx +0 -4
- package/src/components/VideoPlayer/VideoPlayerTypes.tsx +0 -10
- package/src/helpers/enums.ts +0 -4
- package/src/utils/siteSections.ts +0 -10
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,62 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
|
|
|
8
8
|
|
|
9
9
|
## Prerelease
|
|
10
10
|
|
|
11
|
+
## 0.28.0 (May 9, 2022)
|
|
12
|
+
|
|
13
|
+
### Adds
|
|
14
|
+
|
|
15
|
+
- Adds `max`, `maxLength`, `min`, and `onClick` props to the `TextInput` component.
|
|
16
|
+
- Adds the `SkipNavigation` component and adds this component inside the `TemplateAppContainer` component. The `SkipNavigation` component renders accessible links to the main content of a page and accessibility information on NYPL.org.
|
|
17
|
+
- Adds the `ButtonGroup` component for `Button` layout.
|
|
18
|
+
|
|
19
|
+
### Updates
|
|
20
|
+
|
|
21
|
+
- Updates how styles are passed down to internal components in `Card`, `Checkbox`, `CheckboxGroup`, `ComponentWrapper`, `DatePicker`, `Hero`, `Notification`, `Pagination`, `Radio`, `RadioGroup`, `SearchBar`, and `Slider`. This is based on removing the `additionalStyles` prop and passing down styles to the `__css` prop.
|
|
22
|
+
- Updates how the `id` is passed in the `DatePicker`'s custom `TextInput` component.
|
|
23
|
+
- Updates how some prop values are passed. Instead of using a Typescript enum object, a Typescript type with the string literal values is used. This still restricts the accepted values for certain props. The enum to string literal type conversion includes the following variables: `AccordionType`, `BreadcrumbsTypes`, `ButtonTypes`, `DatePickerTypes`, `FormGaps` (deleted), `GridGaps`, `HeadingSizes`, `HeadingLevels`, `HeroTypes`, `IconAlign`, `IconTypes`, `IconRotationTypes`, `IconColors`, `IconSizes`, `IconNames`, `LinkTypes`, `ListTypes`, `LogoColors`, `LogoSizes`, `LogoNames`, `NotificationTypes`, `SelectTypes`, `LabelPositions`, `SkeletonLoaderImageRatios`, `StatusBadgeTypes`, `StructuredContentImagePosition`, `TextSizes`, `TextInputTypes`, `TextInputFormats`, `TextInputVariants`, `ToggleSizes`, `VideoPlayerTypes`, `VideoPlayerAspectRatios`, and `LayoutTypes`.
|
|
24
|
+
- Updates the spacing for caption and credit text from `margin-bottom` to `margin-top` in `Image` component
|
|
25
|
+
- Updates how the `DatePicker` and `Slider` components internally use `TextInput`.
|
|
26
|
+
- Updates how the `Pagination` component internally uses `Link`.
|
|
27
|
+
- Updates how the `Tabs` component internally uses `Button`.
|
|
28
|
+
- Updates how images are passed to the `Hero` component. Instead of `imageAlt` and `imageSrc` props, now an object must be passed to the `imageProps` prop.
|
|
29
|
+
- Updates the values for the `name` prop for the `Icon` and `Logo` components.
|
|
30
|
+
- Updates the `Table` component to allow JSX elements to be rendered in the data cells.
|
|
31
|
+
|
|
32
|
+
### Removals
|
|
33
|
+
|
|
34
|
+
- Removes the `additionalStyles` attributes from the `Breadcrumbs`, `Button`, `Heading`, `HelperErrorText`, `Icon`, `Link`, `List`, `Logo`, `Select`, `TextInput`, and `Toggle` components.
|
|
35
|
+
- Removes `getVariant` and `getStorybookEnumValues` helper functions.
|
|
36
|
+
- Removes all Typescript enum objects in favor of string literal types.
|
|
37
|
+
- Remove the bottom margin attribute that is applied to the parent element for the `Select` component.
|
|
38
|
+
- Removes the `attributes` prop from: `Button`, `Link`, and `TextInput` components.
|
|
39
|
+
|
|
40
|
+
## 0.27.0 (April 27, 2022)
|
|
41
|
+
|
|
42
|
+
### Adds
|
|
43
|
+
|
|
44
|
+
- 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.
|
|
45
|
+
- Adds `@chakra-ui/storybook-addon` so stories automatically pick up the Chakra-based NYPL theme.
|
|
46
|
+
|
|
47
|
+
### Updates
|
|
48
|
+
|
|
49
|
+
- Updates React and React DOM to version 17.
|
|
50
|
+
- Updates Chakra packages `@chakra-ui/react` and `@chakra-ui/system`.
|
|
51
|
+
- Updates the `HelperErrorText` styling to correctly display when used with a `Select` element with a `labelPosition` of inline.
|
|
52
|
+
|
|
53
|
+
### Removals
|
|
54
|
+
|
|
55
|
+
- Removes the following packages: `@storybook/addon-queryparams` and `react-router-dom`.
|
|
56
|
+
|
|
57
|
+
## 0.26.1 (April 22, 2022)
|
|
58
|
+
|
|
59
|
+
### Updates
|
|
60
|
+
|
|
61
|
+
- Updates storybook URL from /reservoir/v0_26 to /reservoir/v0.
|
|
62
|
+
|
|
63
|
+
### Fixes
|
|
64
|
+
|
|
65
|
+
- Adds updated package-lock file to fix bad installations.
|
|
66
|
+
|
|
11
67
|
## 0.26.0 (April 22, 2022)
|
|
12
68
|
|
|
13
69
|
### Adds
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
export declare type BreadcrumbsTypes = "blogs" | "booksAndMore" | "education" | "locations" | "research" | "whatsOn";
|
|
3
3
|
export interface BreadcrumbsDataProps {
|
|
4
4
|
url: string;
|
|
5
5
|
text: string | React.ReactNode;
|
|
6
6
|
}
|
|
7
7
|
export interface BreadcrumbProps {
|
|
8
|
-
/** Optionally pass in additional Chakra-based styles. */
|
|
9
|
-
additionalStyles?: {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
};
|
|
12
8
|
/** Breadcrumb links as an array */
|
|
13
9
|
breadcrumbsData: BreadcrumbsDataProps[];
|
|
14
10
|
/** Used to control how the `Hero` component will be rendered. */
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { ButtonTypes } from "./ButtonTypes";
|
|
3
2
|
export declare type ButtonElementType = "submit" | "button" | "reset";
|
|
3
|
+
export declare type ButtonTypes = "primary" | "secondary" | "callout" | "pill" | "link" | "noBrand";
|
|
4
4
|
interface ButtonProps {
|
|
5
|
-
/**
|
|
6
|
-
additionalStyles?: {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
|
-
/** Additional attributes passed to the button. */
|
|
10
|
-
attributes?: {
|
|
11
|
-
[key: string]: any;
|
|
12
|
-
};
|
|
13
|
-
/** The kind of button assigned through the `ButtonTypes` enum. */
|
|
5
|
+
/** The button variation to render based on the `ButtonTypes` type.*/
|
|
14
6
|
buttonType?: ButtonTypes;
|
|
15
7
|
/** Additional className to use. */
|
|
16
8
|
className?: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { LayoutTypes } from "../../helpers/types";
|
|
3
|
+
export declare type ButtonGroupWidths = "default" | "full";
|
|
4
|
+
interface ButtonGroupProps {
|
|
5
|
+
/** Sets the width to "default" (for "fit-content") or "full". */
|
|
6
|
+
buttonWidth?: ButtonGroupWidths;
|
|
7
|
+
/** Additional className to use. */
|
|
8
|
+
className?: string;
|
|
9
|
+
/** ID that other components can cross reference for accessibility purposes. */
|
|
10
|
+
id?: string;
|
|
11
|
+
/** Set's the disabled state to all the internal `Button` components. */
|
|
12
|
+
isDisabled?: boolean;
|
|
13
|
+
/** Renders the layout of `Button` components in a row or column. */
|
|
14
|
+
layout?: LayoutTypes;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A simple wrapper to group `Button` components together. The layout can be set
|
|
18
|
+
* to row or column and the width of internal `Button` components can be set to
|
|
19
|
+
* the parent's full width or the `Button`'s content width
|
|
20
|
+
*/
|
|
21
|
+
export declare const ButtonGroup: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<ButtonGroupProps>) => JSX.Element, {}>;
|
|
22
|
+
export default ButtonGroup;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import { LayoutTypes } from "../../helpers/
|
|
2
|
+
import { LayoutTypes } from "../../helpers/types";
|
|
3
3
|
import { ComponentImageProps } from "../Image/Image";
|
|
4
4
|
interface CardBaseProps {
|
|
5
5
|
/** Optional value to control the alignment of the text and elements. */
|
|
6
6
|
isCentered?: boolean;
|
|
7
7
|
/** Optional value to render the layout in a row or column.
|
|
8
|
-
* Default is `
|
|
8
|
+
* Default is `"column"`. */
|
|
9
9
|
layout?: LayoutTypes;
|
|
10
10
|
}
|
|
11
11
|
interface CardLinkBoxProps {
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
-
|
|
3
|
+
interface CheckboxIconProps {
|
|
4
|
+
/** When using the Checkbox as a "controlled" form element, you can specify
|
|
5
|
+
* the Checkbox's checked state using this prop.
|
|
6
|
+
* Learn more about controlled and uncontrolled form fields:
|
|
7
|
+
* https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */
|
|
8
|
+
isChecked?: boolean;
|
|
9
|
+
/** Adds the indeterminate state to the `Checkbox`. */
|
|
10
|
+
isIndeterminate?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface CheckboxProps extends CheckboxIconProps {
|
|
4
13
|
/** className you can add in addition to 'input' */
|
|
5
14
|
className?: string;
|
|
6
15
|
/** Optional string to populate the HelperErrorText for standard state */
|
|
@@ -10,16 +19,9 @@ export interface CheckboxProps {
|
|
|
10
19
|
/** Optional string to populate the HelperErrorText for the error state
|
|
11
20
|
* when `isInvalid` is true. */
|
|
12
21
|
invalidText?: HelperErrorTextType;
|
|
13
|
-
/** When using the Checkbox as a "controlled" form element, you can specify
|
|
14
|
-
* the Checkbox's checked state using this prop.
|
|
15
|
-
* Learn more about controlled and uncontrolled form fields:
|
|
16
|
-
* https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */
|
|
17
|
-
isChecked?: boolean;
|
|
18
22
|
/** Adds the 'disabled' and `aria-disabled` attributes to the input when true.
|
|
19
23
|
* This also makes the text italic and color scheme gray. */
|
|
20
24
|
isDisabled?: boolean;
|
|
21
|
-
/** Adds the indeterminate state to the `Checkbox`. */
|
|
22
|
-
isIndeterminate?: boolean;
|
|
23
25
|
/** Adds the 'aria-invalid' attribute to the input when true. This also makes
|
|
24
26
|
* the color theme "NYPL error" red for the button and text. */
|
|
25
27
|
isInvalid?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
3
|
-
import { LayoutTypes } from "../../helpers/
|
|
3
|
+
import { LayoutTypes } from "../../helpers/types";
|
|
4
4
|
export interface CheckboxGroupProps {
|
|
5
5
|
/** Any child node passed to the component. */
|
|
6
6
|
children: React.ReactNode;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { DatePickerTypes } from "./DatePickerTypes";
|
|
3
2
|
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
4
3
|
import { TextInputRefType } from "../TextInput/TextInput";
|
|
4
|
+
export declare type DatePickerTypes = "full" | "month" | "year";
|
|
5
5
|
export interface FullDateType {
|
|
6
6
|
/** Date object that gets returned for the onChange
|
|
7
7
|
* function only for date ranges. */
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { GridGaps } from "../Grid/SimpleGrid";
|
|
3
3
|
interface FormBaseProps {
|
|
4
4
|
/** className to be applied to FormRow, FormField, and Form */
|
|
5
5
|
className?: string;
|
|
6
6
|
/** Optional spacing size; if omitted, the default `large` (2rem / 32px)
|
|
7
7
|
* spacing will be used; ```IMPORTANT: for general form layout, this prop
|
|
8
8
|
* should not be used``` */
|
|
9
|
-
gap?:
|
|
9
|
+
gap?: GridGaps;
|
|
10
10
|
/** ID that other components can cross reference (internal use) */
|
|
11
11
|
id: string;
|
|
12
12
|
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
export declare type GridGaps = "grid.xxs" | "grid.xs" | "grid.s" | "grid.m" | "grid.l" | "grid.xl" | "grid.xxl";
|
|
3
3
|
export interface SimpleGridProps {
|
|
4
4
|
/** Additional class name. */
|
|
5
5
|
className?: string;
|
|
6
|
-
/** Optional numeric value to override the default column count; the default
|
|
6
|
+
/** Optional numeric value to override the default column count; the default
|
|
7
|
+
* column count is 3. */
|
|
7
8
|
columns?: number;
|
|
8
|
-
/** Optional gap size; if omitted, the default `large` (2rem / 32px) spacing
|
|
9
|
+
/** Optional gap size; if omitted, the default `large` (2rem / 32px) spacing
|
|
10
|
+
* will be used; `IMPORTANT: for standard grid layouts, this prop should
|
|
11
|
+
* not be used.` */
|
|
9
12
|
gap?: GridGaps;
|
|
10
13
|
/** ID that other components can cross reference for accessibility purposes */
|
|
11
14
|
id?: string;
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
export declare type HeadingSizes = "primary" | "secondary" | "tertiary" | "callout";
|
|
3
|
+
export declare type HeadingLevels = "one" | "two" | "three" | "four" | "five" | "six";
|
|
3
4
|
export interface HeadingProps {
|
|
4
|
-
/** Optionally pass in additional Chakra-based styles. */
|
|
5
|
-
additionalStyles?: {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
8
5
|
/** Optional className that appears in addition to `heading` */
|
|
9
6
|
className?: string;
|
|
10
7
|
/** Optional ID that other components can cross reference for accessibility purposes */
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
export declare type AriaLiveValues = "assertive" | "off" | "polite";
|
|
3
3
|
export declare type HelperErrorTextType = string | JSX.Element;
|
|
4
4
|
interface HelperErrorTextProps {
|
|
5
|
-
/** Optionally pass in additional Chakra-based styles. */
|
|
6
|
-
additionalStyles?: {
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
};
|
|
9
5
|
/** Aria attribute. When true, assistive technologies will
|
|
10
6
|
* read the entire DOM element. When false, only changes (additionals or
|
|
11
7
|
* removals) will be read. True by default. */
|
|
@@ -29,5 +25,5 @@ interface HelperErrorTextProps {
|
|
|
29
25
|
/**
|
|
30
26
|
* Helper or error text for forms components.
|
|
31
27
|
*/
|
|
32
|
-
export declare const HelperErrorText: import("@chakra-ui/react").ChakraComponent<({
|
|
28
|
+
export declare const HelperErrorText: import("@chakra-ui/react").ChakraComponent<({ ariaAtomic, ariaLive, className, id, isInvalid, text, ...rest }: HelperErrorTextProps) => JSX.Element, {}>;
|
|
33
29
|
export default HelperErrorText;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentImageProps } from "../Image/Image";
|
|
3
|
+
export declare type HeroTypes = "primary" | "secondary" | "secondaryBooksAndMore" | "secondaryLocations" | "secondaryResearch" | "secondaryWhatsOn" | "tertiary" | "campaign" | "fiftyFifty";
|
|
4
|
+
export declare const heroSecondaryTypes: string[];
|
|
5
|
+
export interface HeroImageProps extends Pick<ComponentImageProps, "alt" | "src"> {
|
|
6
|
+
}
|
|
3
7
|
export interface HeroProps {
|
|
4
8
|
/** Optional hex color value used to override the default background
|
|
5
9
|
* color for a given `Hero` variation.
|
|
@@ -17,14 +21,14 @@ export interface HeroProps {
|
|
|
17
21
|
heading?: JSX.Element;
|
|
18
22
|
/** Used to control how the `Hero` component will be rendered. */
|
|
19
23
|
heroType?: HeroTypes;
|
|
20
|
-
/**
|
|
21
|
-
*
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
* `Hero` types; Note: `
|
|
25
|
-
* `backgroundImageSrc` for the
|
|
26
|
-
* Note: not all `Hero` variations utilize this prop. */
|
|
27
|
-
|
|
24
|
+
/** Object used to create and render the `Image` component. Note that only
|
|
25
|
+
* `src` and `alt` are the available attributes to pass. If `imageProps.alt`
|
|
26
|
+
* is left blank, a warning will be logged to the console and will cause
|
|
27
|
+
* accessibility issues. For `imageProps.src`, it will only work for the
|
|
28
|
+
* "secondary", "fiftyFifty" and "campaign" `Hero` types; Note: `imageProps.src`
|
|
29
|
+
* can only be used in conjunction with `backgroundImageSrc` for the "campaign"
|
|
30
|
+
* `Hero` type. Note: not all `Hero` variations utilize this prop. */
|
|
31
|
+
imageProps?: HeroImageProps;
|
|
28
32
|
/** Optional details area that contains location data.
|
|
29
33
|
* Note: not all `Hero` variations utilize this prop. */
|
|
30
34
|
locationDetails?: JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
export declare type IconAlign = "left" | "right" | "none";
|
|
3
|
+
export declare type IconColors = "ui.black" | "ui.white" | "brand.primary" | "brand.secondary" | "section.blogs.primary" | "section.blogs.secondary" | "section.books-and-more.primary" | "section.books-and-more.secondary" | "section.education.primary" | "section.education.secondary" | "section.locations.primary" | "section.locations.secondary" | "section.research.primary" | "section.research.secondary" | "section.research-library.lpa" | "section.research-library.schomburg" | "section.research-library.schwartzman" | "section.whats-on.primary" | "section.whats-on.secondary";
|
|
4
|
+
export declare type IconNames = "accessibilityFull" | "accessibilityPartial" | "actionCheckCircle" | "actionHelpDefault" | "actionHelpOutline" | "actionLaunch" | "alertNotificationImportant" | "arrow" | "check" | "clock" | "close" | "download" | "errorFilled" | "errorOutline" | "fileTypeAudio" | "fileTypeDoc" | "fileTypeGenericDoc" | "fileTypeImage" | "fileTypePdf" | "fileTypeSpreadsheet" | "fileTypeVideo" | "headset" | "minus" | "plus" | "search" | "speakerNotes" | "utilityAccountFilled" | "utilityAccountUnfilled" | "utilityHamburger" | "utilitySearch";
|
|
5
|
+
export declare type IconRotationTypes = "rotate0" | "rotate90" | "rotate180" | "rotate270";
|
|
6
|
+
export declare type IconSizes = "default" | "small" | "medium" | "large" | "xlarge" | "xxlarge" | "xxxlarge";
|
|
7
|
+
export declare type IconTypes = "default" | "breadcrumbs";
|
|
3
8
|
export interface IconProps {
|
|
4
|
-
/** Optionally pass in additional Chakra-based styles. */
|
|
5
|
-
additionalStyles?: {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
8
9
|
/** Aligns the icon. */
|
|
9
10
|
align?: IconAlign;
|
|
10
11
|
/** Optional className that will be added to the parent element */
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
accessibilityFull: string;
|
|
3
|
+
accessibilityPartial: string;
|
|
4
|
+
actionCheckCircle: string;
|
|
5
|
+
actionHelpDefault: string;
|
|
6
|
+
actionHelpOutline: string;
|
|
7
|
+
actionLaunch: string;
|
|
8
|
+
alertNotificationImportant: string;
|
|
9
9
|
arrow: string;
|
|
10
10
|
check: string;
|
|
11
11
|
clock: string;
|
|
12
12
|
close: string;
|
|
13
13
|
download: string;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
errorFilled: string;
|
|
15
|
+
errorOutline: string;
|
|
16
|
+
fileTypeAudio: string;
|
|
17
|
+
fileTypeDoc: string;
|
|
18
|
+
fileTypeGenericDoc: string;
|
|
19
|
+
fileTypeImage: string;
|
|
20
|
+
fileTypePdf: string;
|
|
21
|
+
fileTypeSpreadsheet: string;
|
|
22
|
+
fileTypeVideo: string;
|
|
23
23
|
headset: string;
|
|
24
24
|
minus: string;
|
|
25
25
|
plus: string;
|
|
26
26
|
search: string;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
speakerNotes: string;
|
|
28
|
+
utilityAccountFilled: string;
|
|
29
|
+
utilityAccountUnfilled: string;
|
|
30
|
+
utilityHamburger: string;
|
|
31
|
+
utilitySearch: string;
|
|
32
32
|
};
|
|
33
33
|
export default _default;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
2
|
+
export declare type ImageRatios = "fourByThree" | "oneByTwo" | "original" | "sixteenByNine" | "square" | "threeByFour" | "threeByTwo" | "twoByOne";
|
|
3
|
+
export declare type ImageSizes = "default" | "xxsmall" | "xsmall" | "small" | "medium" | "large";
|
|
4
|
+
export declare type ImageTypes = "default" | "circle";
|
|
3
5
|
export interface ComponentImageProps {
|
|
4
6
|
/** String value used to populate the `alt` attribute of the internal `Image`
|
|
5
7
|
* component's `img` element. @NOTE if an image is used, this value must be passed. */
|
|
@@ -14,7 +16,7 @@ export interface ComponentImageProps {
|
|
|
14
16
|
/** Optional value to render as a credit for the internal `Image` component. */
|
|
15
17
|
credit?: string;
|
|
16
18
|
/** Optional value to control the size of the internal `Image` component.
|
|
17
|
-
* Defaults to `ImageSizes.
|
|
19
|
+
* Defaults to `ImageSizes.Default`. */
|
|
18
20
|
size?: ImageSizes;
|
|
19
21
|
/** Optional value that contains the path to an image. If omitted, the internal
|
|
20
22
|
* DS `Image` component will not render. */
|
|
@@ -27,7 +29,8 @@ interface ImageWrapperProps {
|
|
|
27
29
|
};
|
|
28
30
|
/** ClassName you can add in addition to 'image' */
|
|
29
31
|
className?: string;
|
|
30
|
-
/** Optional value to control the aspect ratio of the
|
|
32
|
+
/** Optional value to control the aspect ratio of the card image; default
|
|
33
|
+
* value is `"original"` */
|
|
31
34
|
aspectRatio?: ImageRatios;
|
|
32
35
|
/** Optional value to control the size of the image */
|
|
33
36
|
size?: ImageSizes;
|
|
@@ -42,7 +45,7 @@ export interface ImageProps extends ImageWrapperProps {
|
|
|
42
45
|
[key: string]: any;
|
|
43
46
|
};
|
|
44
47
|
/** Alternate text description of the image */
|
|
45
|
-
alt
|
|
48
|
+
alt?: string;
|
|
46
49
|
/** Adding will wrap the image in a <figure> */
|
|
47
50
|
caption?: string;
|
|
48
51
|
/** Custom image component */
|
|
@@ -52,7 +55,7 @@ export interface ImageProps extends ImageWrapperProps {
|
|
|
52
55
|
/** Optional value for the image type */
|
|
53
56
|
imageType?: ImageTypes;
|
|
54
57
|
/** The src attribute is required, and contains the path to the image you want to embed. */
|
|
55
|
-
src
|
|
58
|
+
src?: string;
|
|
56
59
|
}
|
|
57
60
|
export declare const Image: import("@chakra-ui/react").ChakraComponent<(props: ImageProps) => JSX.Element, {}>;
|
|
58
61
|
export default Image;
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
export declare type LinkTypes = "action" | "backwards" | "button" | "default" | "external" | "forwards";
|
|
3
3
|
export interface LinkProps {
|
|
4
|
-
/** Optionally pass in additional Chakra-based styles. */
|
|
5
|
-
additionalStyles?: {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
8
|
-
/** Additional attributes, such as `rel=nofollow`, to pass to the `<a>` tag. */
|
|
9
|
-
attributes?: {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
};
|
|
12
4
|
/** Any child node passed to the component. */
|
|
13
5
|
children: React.ReactNode;
|
|
14
6
|
/** Additional class name to render in the `Link` component. */
|
|
@@ -1,25 +1,21 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
export declare type ListTypes = "ol" | "ul" | "dl";
|
|
3
3
|
interface DescriptionProps {
|
|
4
4
|
term: string;
|
|
5
5
|
description: string | JSX.Element;
|
|
6
6
|
}
|
|
7
7
|
export interface ListProps {
|
|
8
|
-
/** Optionally pass in additional Chakra-based styles. */
|
|
9
|
-
additionalStyles?: {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
};
|
|
12
8
|
/** ClassName you can add in addition to 'list' */
|
|
13
9
|
className?: string;
|
|
14
10
|
/** ID that other components can cross reference for accessibility purposes */
|
|
15
11
|
id?: string;
|
|
16
12
|
/** Display the list in a row. */
|
|
17
13
|
inline?: boolean;
|
|
18
|
-
/** Data to render if children are not passed. For `
|
|
19
|
-
* `
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
14
|
+
/** Data to render if children are not passed. For `listTypes` orderd `"ol"`
|
|
15
|
+
* and unordered `"ul"` `List` types, the data structure is an array of strings
|
|
16
|
+
* to renders as `li` items. For descroption `"dl"` `List` types, the data
|
|
17
|
+
* structure is an array of objects with `term` and `description` properties
|
|
18
|
+
* to render `dt` and `dd` elements, respectively.
|
|
23
19
|
*/
|
|
24
20
|
listItems?: (string | JSX.Element | DescriptionProps)[];
|
|
25
21
|
/** Remove list styling. */
|
|
@@ -27,7 +23,7 @@ export interface ListProps {
|
|
|
27
23
|
/** An optional title that will appear over the list. This prop only applies
|
|
28
24
|
* to Description Lists. */
|
|
29
25
|
title?: string;
|
|
30
|
-
/** The type of list:
|
|
26
|
+
/** The type of list: "ol", "ul", or "dl". "ul" by default. */
|
|
31
27
|
type: ListTypes;
|
|
32
28
|
}
|
|
33
29
|
/**
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
export declare type LogoNames = "bplBlack" | "bplWhite" | "cleverColor" | "cleverWhite" | "firstbookColor" | "firstbookColorNegative" | "lpaBlack" | "lpaColor" | "lpaWhite" | "mlnBlack" | "mlnWhite" | "nyplFullBlack" | "nyplFullWhite" | "nyplLionBlack" | "nyplLionWhite" | "openebooksColor" | "openebooksNegative" | "openebooksWithTextColor" | "openebooksWithTextNegative" | "qplAltBlack" | "qplAltWhite" | "qplBlack" | "qplColor" | "qplWhite" | "reservoirIconColor" | "reservoirVerticalColor" | "schomburgBlack" | "schomburgCircleBlack" | "schomburgCircleColor" | "schomburgCircleWhite" | "schomburgColor" | "schomburgWhite" | "simplyeBlack" | "simplyeWhite" | "simplyeColor" | "snflBlack" | "snflWhite" | "treasuresColor" | "treasuresColorNegative";
|
|
3
|
+
export declare type LogoSizes = "default" | "xxsmall" | "xsmall" | "small" | "medium" | "large";
|
|
3
4
|
export interface LogoProps {
|
|
4
|
-
/** Optionally pass in additional Chakra-based styles. */
|
|
5
|
-
additionalStyles?: {
|
|
6
|
-
[key: string]: any;
|
|
7
|
-
};
|
|
8
5
|
/** Optional className that will be added to the parent element */
|
|
9
6
|
className?: string;
|
|
10
7
|
/** Logos designated as decorative will be ignored by screenreaders. False
|
|
@@ -1,42 +1,42 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
2
|
+
bplBlack: string;
|
|
3
|
+
bplWhite: string;
|
|
4
|
+
cleverColor: string;
|
|
5
|
+
cleverWhite: string;
|
|
6
|
+
firstbookColor: string;
|
|
7
|
+
firstbookColorNegative: string;
|
|
8
|
+
lpaBlack: string;
|
|
9
|
+
lpaColor: string;
|
|
10
|
+
lpaWhite: string;
|
|
11
|
+
mlnBlack: string;
|
|
12
|
+
mlnWhite: string;
|
|
13
|
+
nyplFullBlack: string;
|
|
14
|
+
nyplFullWhite: string;
|
|
15
|
+
nyplLionBlack: string;
|
|
16
|
+
nyplLionWhite: string;
|
|
17
|
+
openebooksColor: string;
|
|
18
|
+
openebooksNegative: string;
|
|
19
|
+
openebooksWithTextColor: string;
|
|
20
|
+
openebooksWithTextNegative: string;
|
|
21
|
+
qplAltBlack: string;
|
|
22
|
+
qplAltWhite: string;
|
|
23
|
+
qplBlack: string;
|
|
24
|
+
qplColor: string;
|
|
25
|
+
qplWhite: string;
|
|
26
|
+
reservoirIconColor: string;
|
|
27
|
+
reservoirVerticalColor: string;
|
|
28
|
+
schomburgBlack: string;
|
|
29
|
+
schomburgCircleBlack: string;
|
|
30
|
+
schomburgCircleColor: string;
|
|
31
|
+
schomburgCircleWhite: string;
|
|
32
|
+
schomburgColor: string;
|
|
33
|
+
schomburgWhite: string;
|
|
34
|
+
simplyeBlack: string;
|
|
35
|
+
simplyeWhite: string;
|
|
36
|
+
simplyeColor: string;
|
|
37
|
+
snflBlack: string;
|
|
38
|
+
snflWhite: string;
|
|
39
|
+
treasuresColor: string;
|
|
40
|
+
treasuresColorNegative: string;
|
|
41
41
|
};
|
|
42
42
|
export default _default;
|
|
@@ -1,13 +1,33 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
interface BaseModalProps {
|
|
3
|
+
bodyContent?: string | JSX.Element;
|
|
4
|
+
closeButtonLabel?: string;
|
|
5
|
+
headingText?: string | JSX.Element;
|
|
5
6
|
/** ID that other components can cross reference for accessibility purposes */
|
|
6
7
|
id?: string;
|
|
8
|
+
isOpen?: boolean;
|
|
9
|
+
onClose?: () => void;
|
|
7
10
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
export interface ModalProps {
|
|
12
|
+
buttonText?: string;
|
|
13
|
+
/** ID that other components can cross reference for accessibility purposes */
|
|
14
|
+
id?: string;
|
|
15
|
+
modalProps: BaseModalProps;
|
|
13
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<({ buttonText, id, modalProps, ...rest }: React.PropsWithChildren<ModalProps>) => JSX.Element, {}>;
|
|
23
|
+
/**
|
|
24
|
+
* This hook function can be used to render the `Modal` component with a custom
|
|
25
|
+
* open button(s) and optional custom close button(s). You must render your own
|
|
26
|
+
* button and pass the appropriate `onOpen` and ` handler for the modal to open.
|
|
27
|
+
*/
|
|
28
|
+
export declare function useModal(): {
|
|
29
|
+
onClose: () => void;
|
|
30
|
+
onOpen: () => void;
|
|
31
|
+
Modal: import("@chakra-ui/react").ChakraComponent<({ bodyContent, closeButtonLabel, headingText, id, ...rest }: React.PropsWithChildren<BaseModalProps>) => JSX.Element, {}>;
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
export declare type NotificationTypes = "standard" | "announcement" | "warning";
|
|
3
3
|
interface BaseProps {
|
|
4
4
|
/** Optional prop to control text alignment in `NotificationContent` */
|
|
5
5
|
alignText?: boolean;
|