@nypl/design-system-react-components 0.25.11 → 0.26.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 +151 -0
- package/README.md +14 -26
- package/dist/components/Accordion/Accordion.d.ts +6 -4
- package/dist/components/Accordion/AccordionTypes.d.ts +5 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +4 -4
- package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +2 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Card/Card.d.ts +22 -29
- package/dist/components/Checkbox/Checkbox.d.ts +3 -3
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +9 -6
- 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 +5 -5
- package/dist/components/Heading/HeadingTypes.d.ts +1 -1
- package/dist/components/HelperErrorText/HelperErrorText.d.ts +9 -8
- package/dist/components/Hero/Hero.d.ts +9 -5
- package/dist/components/HorizontalRule/HorizontalRule.d.ts +2 -10
- package/dist/components/Icons/Icon.d.ts +2 -1
- package/dist/components/Icons/IconTypes.d.ts +10 -7
- package/dist/components/Image/Image.d.ts +27 -9
- package/dist/components/Image/ImageTypes.d.ts +4 -4
- 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 +8 -0
- package/dist/components/Logo/LogoTypes.d.ts +10 -2
- package/dist/components/Notification/Notification.d.ts +7 -7
- package/dist/components/Pagination/Pagination.d.ts +8 -4
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +3 -3
- package/dist/components/Radio/Radio.d.ts +5 -7
- package/dist/components/RadioGroup/RadioGroup.d.ts +16 -8
- package/dist/components/SearchBar/SearchBar.d.ts +5 -5
- package/dist/components/Select/Select.d.ts +12 -8
- package/dist/components/Select/SelectTypes.d.ts +4 -0
- package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +8 -6
- package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +0 -4
- 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 +10 -23
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +7 -6
- package/dist/components/Template/Template.d.ts +18 -9
- package/dist/components/Text/Text.d.ts +4 -4
- package/dist/components/Text/TextTypes.d.ts +1 -1
- package/dist/components/TextInput/TextInput.d.ts +7 -7
- package/dist/components/Toggle/Toggle.d.ts +8 -10
- package/dist/components/Toggle/{ToggleSizes.d.ts → ToggleTypes.d.ts} +1 -1
- package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
- package/dist/design-system-react-components.cjs.development.js +2802 -1686
- 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 +2811 -1699
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/helpers/enums.d.ts +4 -0
- package/dist/hooks/useCarouselStyles.d.ts +3 -2
- package/dist/hooks/useNYPLTheme.d.ts +12 -0
- package/dist/index.d.ts +11 -9
- package/dist/styles.css +1 -1
- package/dist/theme/components/accordion.d.ts +7 -12
- package/dist/theme/components/breadcrumb.d.ts +6 -0
- package/dist/theme/components/button.d.ts +10 -2
- package/dist/theme/components/card.d.ts +44 -24
- package/dist/theme/components/checkbox.d.ts +6 -6
- package/dist/theme/components/checkboxGroup.d.ts +4 -2
- 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 +6 -14
- package/dist/theme/components/global.d.ts +37 -29
- package/dist/theme/components/globalMixins.d.ts +8 -8
- 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 +21 -15
- package/dist/theme/components/image.d.ts +1 -1
- package/dist/theme/components/label.d.ts +9 -10
- package/dist/theme/components/list.d.ts +105 -9
- package/dist/theme/components/notification.d.ts +7 -4
- package/dist/theme/components/pagination.d.ts +2 -5
- package/dist/theme/components/radio.d.ts +10 -6
- package/dist/theme/components/radioGroup.d.ts +4 -2
- package/dist/theme/components/select.d.ts +38 -13
- package/dist/theme/components/skeletonLoader.d.ts +2 -2
- package/dist/theme/components/slider.d.ts +14 -7
- package/dist/theme/components/structuredContent.d.ts +197 -0
- package/dist/theme/components/textInput.d.ts +22 -14
- package/dist/theme/components/toggle.d.ts +25 -6
- package/dist/theme/foundations/global.d.ts +33 -3
- package/dist/theme/foundations/radii.d.ts +1 -0
- package/dist/theme/foundations/spacing.d.ts +46 -43
- package/dist/utils/utils.d.ts +10 -0
- package/package.json +5 -6
- package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +34 -0
- package/src/components/Accordion/Accordion.stories.mdx +150 -66
- package/src/components/Accordion/Accordion.test.tsx +65 -17
- package/src/components/Accordion/Accordion.tsx +61 -27
- package/src/components/Accordion/AccordionTypes.tsx +5 -0
- package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +505 -14
- package/src/components/Autosuggest/Autosuggest.stories.mdx +4 -3
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +53 -18
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +66 -35
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +14 -13
- package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +2 -1
- package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +308 -10
- 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 +493 -329
- package/src/components/Card/Card.test.tsx +138 -18
- package/src/components/Card/Card.tsx +151 -85
- package/src/components/Card/__snapshots__/Card.test.tsx.snap +220 -100
- package/src/components/Chakra/Center.stories.mdx +2 -2
- package/src/components/Chakra/Grid.stories.mdx +4 -4
- package/src/components/Checkbox/Checkbox.stories.mdx +73 -9
- package/src/components/Checkbox/Checkbox.test.tsx +89 -10
- package/src/components/Checkbox/Checkbox.tsx +27 -16
- package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +209 -6
- package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +135 -23
- package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +216 -90
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +39 -26
- package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +493 -89
- 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 +94 -15
- package/src/components/DatePicker/DatePicker.tsx +67 -58
- 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 +118 -47
- package/src/components/Form/Form.test.tsx +59 -16
- package/src/components/Form/Form.tsx +89 -65
- 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 +87 -41
- package/src/components/Grid/SimpleGrid.test.tsx +24 -9
- 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 +56 -25
- package/src/components/Heading/Heading.test.tsx +17 -7
- package/src/components/Heading/Heading.tsx +60 -58
- package/src/components/Heading/HeadingTypes.tsx +1 -1
- package/src/components/Heading/__snapshots__/Heading.test.tsx.snap +27 -8
- 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 +143 -113
- package/src/components/Hero/Hero.test.tsx +146 -58
- package/src/components/Hero/Hero.tsx +144 -112
- 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 -17
- package/src/components/HorizontalRule/HorizontalRule.tsx +9 -25
- package/src/components/HorizontalRule/__snapshots__/HorizontalRule.test.tsx.snap +18 -5
- package/src/components/Icons/Icon.stories.mdx +80 -23
- package/src/components/Icons/Icon.test.tsx +51 -2
- package/src/components/Icons/Icon.tsx +93 -71
- package/src/components/Icons/IconTypes.tsx +9 -6
- package/src/components/Icons/__snapshots__/Icon.test.tsx.snap +129 -0
- package/src/components/Image/Image.stories.mdx +160 -71
- package/src/components/Image/Image.test.tsx +40 -48
- package/src/components/Image/Image.tsx +80 -48
- package/src/components/Image/ImageTypes.ts +4 -4
- package/src/components/Image/__snapshots__/Image.test.tsx.snap +84 -21
- 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 -1
- package/src/components/Link/Link.test.tsx +21 -0
- package/src/components/Link/Link.tsx +16 -9
- 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 +73 -22
- package/src/components/List/List.tsx +44 -28
- 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 +40 -16
- package/src/components/Logo/Logo.test.tsx +29 -2
- package/src/components/Logo/Logo.tsx +28 -11
- package/src/components/Logo/LogoSvgs.tsx +16 -0
- package/src/components/Logo/LogoTypes.tsx +9 -1
- package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +73 -2
- package/src/components/Modal/Modal.stories.mdx +13 -0
- package/src/components/Notification/Notification.stories.mdx +34 -5
- package/src/components/Notification/Notification.test.tsx +43 -9
- package/src/components/Notification/Notification.tsx +59 -55
- package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +256 -32
- package/src/components/Pagination/Pagination.stories.mdx +76 -13
- package/src/components/Pagination/Pagination.test.tsx +116 -5
- package/src/components/Pagination/Pagination.tsx +54 -29
- package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +247 -30
- package/src/components/Placeholder/Placeholder.tsx +3 -1
- package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +76 -10
- package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +87 -13
- package/src/components/ProgressIndicator/ProgressIndicator.tsx +20 -10
- package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +101 -14
- package/src/components/Radio/Radio.stories.mdx +75 -11
- package/src/components/Radio/Radio.test.tsx +83 -9
- package/src/components/Radio/Radio.tsx +70 -61
- package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +168 -10
- package/src/components/RadioGroup/RadioGroup.stories.mdx +293 -94
- package/src/components/RadioGroup/RadioGroup.test.tsx +193 -68
- package/src/components/RadioGroup/RadioGroup.tsx +110 -101
- package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1258 -902
- package/src/components/SearchBar/SearchBar.stories.mdx +104 -39
- package/src/components/SearchBar/{SearchBar.Test.tsx → SearchBar.test.tsx} +66 -6
- package/src/components/SearchBar/SearchBar.tsx +23 -13
- package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1039 -0
- package/src/components/Select/Select.stories.mdx +151 -62
- package/src/components/Select/Select.test.tsx +56 -44
- package/src/components/Select/Select.tsx +125 -104
- package/src/components/Select/SelectTypes.tsx +5 -0
- package/src/components/Select/__snapshots__/Select.test.tsx.snap +749 -409
- package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +53 -23
- package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +14 -8
- package/src/components/SkeletonLoader/SkeletonLoader.tsx +80 -78
- package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +0 -5
- package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +169 -10
- package/src/components/Slider/Slider.stories.mdx +123 -41
- package/src/components/Slider/Slider.test.tsx +65 -17
- package/src/components/Slider/Slider.tsx +34 -24
- 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 +19 -1
- 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 +229 -61
- package/src/components/StructuredContent/StructuredContent.test.tsx +162 -101
- package/src/components/StructuredContent/StructuredContent.tsx +98 -103
- package/src/components/StructuredContent/__snapshots__/StructuredContent.test.tsx.snap +102 -17
- package/src/components/StyleGuide/Bidirectionality.stories.mdx +9 -9
- package/src/components/StyleGuide/Breakpoints.stories.mdx +6 -6
- package/src/components/StyleGuide/Buttons.stories.mdx +2 -12
- package/src/components/StyleGuide/ColorCard.tsx +4 -4
- package/src/components/StyleGuide/Colors.stories.mdx +34 -20
- 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 +47 -33
- package/src/components/Table/Table.stories.mdx +38 -11
- package/src/components/Table/Table.test.tsx +16 -1
- package/src/components/Table/Table.tsx +10 -8
- package/src/components/Table/__snapshots__/Table.test.tsx.snap +408 -5
- package/src/components/Tabs/Tabs.stories.mdx +59 -10
- package/src/components/Tabs/Tabs.test.tsx +29 -11
- package/src/components/Tabs/Tabs.tsx +28 -21
- package/src/components/Tabs/__snapshots__/Tabs.test.tsx.snap +394 -5
- package/src/components/Template/Template.stories.mdx +73 -32
- package/src/components/Template/Template.test.tsx +68 -5
- package/src/components/Template/Template.tsx +86 -72
- package/src/components/Template/__snapshots__/Template.test.tsx.snap +195 -22
- package/src/components/Text/Text.stories.mdx +32 -15
- package/src/components/Text/Text.test.tsx +14 -11
- package/src/components/Text/Text.tsx +13 -16
- package/src/components/Text/TextTypes.tsx +1 -1
- package/src/components/Text/__snapshots__/Text.test.tsx.snap +21 -4
- package/src/components/TextInput/TextInput.stories.mdx +73 -27
- package/src/components/TextInput/TextInput.test.tsx +65 -50
- package/src/components/TextInput/TextInput.tsx +123 -115
- package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +96 -73
- package/src/components/Toggle/Toggle.stories.mdx +74 -26
- package/src/components/Toggle/Toggle.test.tsx +41 -10
- package/src/components/Toggle/Toggle.tsx +31 -27
- package/src/components/Toggle/{ToggleSizes.tsx → ToggleTypes.tsx} +1 -1
- package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +195 -8
- package/src/components/VideoPlayer/VideoPlayer.stories.mdx +52 -4
- package/src/components/VideoPlayer/VideoPlayer.test.tsx +41 -6
- package/src/components/VideoPlayer/VideoPlayer.tsx +134 -120
- package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +81 -39
- package/src/docs/Chakra.stories.mdx +51 -10
- package/src/docs/Welcome.stories.mdx +168 -0
- package/src/{components/Card/CardTypes.tsx → helpers/enums.ts} +2 -2
- package/src/hooks/tests/useNYPLTheme.test.tsx +1 -1
- package/src/hooks/useCarouselStyles.stories.mdx +30 -0
- package/src/hooks/useCarouselStyles.ts +3 -2
- package/src/hooks/useNYPLTheme.stories.mdx +101 -0
- package/src/hooks/useNYPLTheme.ts +31 -7
- package/src/hooks/useWindowSize.stories.mdx +23 -0
- package/src/index.ts +11 -15
- package/src/styles/base/_place-holder.scss +3 -1
- package/src/styles.scss +0 -2
- package/src/theme/components/accordion.ts +7 -12
- package/src/theme/components/breadcrumb.ts +7 -0
- package/src/theme/components/button.ts +15 -7
- package/src/theme/components/card.ts +56 -36
- package/src/theme/components/checkbox.ts +12 -14
- package/src/theme/components/checkboxGroup.ts +4 -2
- package/src/theme/components/componentWrapper.ts +2 -2
- package/src/theme/components/customTable.ts +39 -31
- package/src/theme/components/fieldset.ts +3 -2
- package/src/theme/components/global.ts +42 -33
- package/src/theme/components/globalMixins.ts +8 -8
- package/src/theme/components/heading.ts +1 -1
- package/src/theme/components/helperErrorText.ts +1 -0
- package/src/theme/components/hero.ts +14 -16
- package/src/theme/components/icon.ts +5 -2
- package/src/theme/components/image.ts +1 -1
- package/src/theme/components/label.ts +4 -3
- package/src/theme/components/list.ts +76 -65
- package/src/theme/components/notification.ts +10 -7
- package/src/theme/components/pagination.ts +2 -5
- package/src/theme/components/progressIndicator.ts +3 -3
- package/src/theme/components/radio.ts +11 -14
- package/src/theme/components/radioGroup.ts +4 -2
- package/src/theme/components/select.ts +37 -18
- package/src/theme/components/skeletonLoader.ts +3 -3
- package/src/theme/components/slider.ts +19 -15
- 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 +76 -42
- package/src/theme/components/videoPlayer.ts +1 -1
- package/src/theme/foundations/colors.ts +20 -13
- package/src/theme/foundations/global.ts +17 -5
- package/src/theme/foundations/radii.ts +1 -0
- package/src/theme/foundations/spacing.ts +70 -22
- package/src/theme/foundations/typography.ts +3 -3
- package/src/utils/componentCategories.ts +28 -21
- package/src/utils/utils.ts +28 -0
- package/dist/components/Card/CardTypes.d.ts +0 -4
- package/dist/components/CheckboxGroup/CheckboxGroupLayoutTypes.d.ts +0 -4
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -13
- package/dist/components/RadioGroup/RadioGroupLayoutTypes.d.ts +0 -4
- package/dist/components/SearchBar/SearchBar.Test.d.ts +0 -1
- package/dist/helpers/generateUUID.d.ts +0 -1
- package/src/components/CheckboxGroup/CheckboxGroupLayoutTypes.tsx +0 -4
- package/src/components/Pagination/Pagination.stories.tsx +0 -54
- package/src/components/RadioGroup/RadioGroupLayoutTypes.tsx +0 -4
- package/src/docs/Intro.stories.mdx +0 -53
- package/src/helpers/generateUUID.tsx +0 -5
- package/src/styles/base/_03-base.scss +0 -25
- package/src/styles/base/_04-focus.scss +0 -22
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
exports[`StructuredContent renders the UI snapshot 1`] = `
|
|
4
4
|
<div
|
|
5
|
-
className="css-
|
|
5
|
+
className="css-1xdhyk6"
|
|
6
6
|
id="withHTMLStringContent"
|
|
7
7
|
>
|
|
8
8
|
<h2
|
|
9
|
-
className="chakra-heading css-
|
|
9
|
+
className="chakra-heading css-1xdhyk6"
|
|
10
10
|
id="withHTMLStringContent-heading"
|
|
11
11
|
>
|
|
12
12
|
Heading text
|
|
13
13
|
</h2>
|
|
14
14
|
<h3
|
|
15
|
-
className="chakra-heading css-
|
|
15
|
+
className="chakra-heading css-1xdhyk6"
|
|
16
16
|
id="withHTMLStringContent-callout"
|
|
17
17
|
>
|
|
18
18
|
This is the callout text
|
|
@@ -41,6 +41,7 @@ exports[`StructuredContent renders the UI snapshot 1`] = `
|
|
|
41
41
|
</figcaption>
|
|
42
42
|
</figure>
|
|
43
43
|
<div
|
|
44
|
+
className="structuredcontent-body"
|
|
44
45
|
dangerouslySetInnerHTML={
|
|
45
46
|
Object {
|
|
46
47
|
"__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
|
|
@@ -52,17 +53,17 @@ exports[`StructuredContent renders the UI snapshot 1`] = `
|
|
|
52
53
|
|
|
53
54
|
exports[`StructuredContent renders the UI snapshot 2`] = `
|
|
54
55
|
<div
|
|
55
|
-
className="css-
|
|
56
|
+
className="css-1xdhyk6"
|
|
56
57
|
id="withHTMLDOMContent"
|
|
57
58
|
>
|
|
58
59
|
<h2
|
|
59
|
-
className="chakra-heading css-
|
|
60
|
+
className="chakra-heading css-1xdhyk6"
|
|
60
61
|
id="withHTMLDOMContent-heading"
|
|
61
62
|
>
|
|
62
63
|
Heading text
|
|
63
64
|
</h2>
|
|
64
65
|
<h3
|
|
65
|
-
className="chakra-heading css-
|
|
66
|
+
className="chakra-heading css-1xdhyk6"
|
|
66
67
|
id="withHTMLDOMContent-callout"
|
|
67
68
|
>
|
|
68
69
|
This is the callout text
|
|
@@ -91,7 +92,7 @@ exports[`StructuredContent renders the UI snapshot 2`] = `
|
|
|
91
92
|
</figcaption>
|
|
92
93
|
</figure>
|
|
93
94
|
<div
|
|
94
|
-
className="css-0"
|
|
95
|
+
className="structuredcontent-body css-0"
|
|
95
96
|
>
|
|
96
97
|
<p>
|
|
97
98
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt.
|
|
@@ -137,22 +138,23 @@ exports[`StructuredContent renders the UI snapshot 2`] = `
|
|
|
137
138
|
|
|
138
139
|
exports[`StructuredContent renders the UI snapshot 3`] = `
|
|
139
140
|
<div
|
|
140
|
-
className="css-
|
|
141
|
+
className="css-1xdhyk6"
|
|
141
142
|
id="withoutAnImage"
|
|
142
143
|
>
|
|
143
144
|
<h2
|
|
144
|
-
className="chakra-heading css-
|
|
145
|
+
className="chakra-heading css-1xdhyk6"
|
|
145
146
|
id="withoutAnImage-heading"
|
|
146
147
|
>
|
|
147
148
|
Heading text
|
|
148
149
|
</h2>
|
|
149
150
|
<h3
|
|
150
|
-
className="chakra-heading css-
|
|
151
|
+
className="chakra-heading css-1xdhyk6"
|
|
151
152
|
id="withoutAnImage-callout"
|
|
152
153
|
>
|
|
153
154
|
This is the callout text
|
|
154
155
|
</h3>
|
|
155
156
|
<div
|
|
157
|
+
className="structuredcontent-body"
|
|
156
158
|
dangerouslySetInnerHTML={
|
|
157
159
|
Object {
|
|
158
160
|
"__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
|
|
@@ -164,17 +166,17 @@ exports[`StructuredContent renders the UI snapshot 3`] = `
|
|
|
164
166
|
|
|
165
167
|
exports[`StructuredContent renders the UI snapshot 4`] = `
|
|
166
168
|
<div
|
|
167
|
-
className="css-
|
|
169
|
+
className="css-1xdhyk6"
|
|
168
170
|
id="withImageWithoutCaptionOrCredit"
|
|
169
171
|
>
|
|
170
172
|
<h2
|
|
171
|
-
className="chakra-heading css-
|
|
173
|
+
className="chakra-heading css-1xdhyk6"
|
|
172
174
|
id="withImageWithoutCaptionOrCredit-heading"
|
|
173
175
|
>
|
|
174
176
|
Heading text
|
|
175
177
|
</h2>
|
|
176
178
|
<h3
|
|
177
|
-
className="chakra-heading css-
|
|
179
|
+
className="chakra-heading css-1xdhyk6"
|
|
178
180
|
id="withImageWithoutCaptionOrCredit-callout"
|
|
179
181
|
>
|
|
180
182
|
This is the callout text
|
|
@@ -185,6 +187,7 @@ exports[`StructuredContent renders the UI snapshot 4`] = `
|
|
|
185
187
|
src="https://placeimg.com/400/300/animals"
|
|
186
188
|
/>
|
|
187
189
|
<div
|
|
190
|
+
className="structuredcontent-body"
|
|
188
191
|
dangerouslySetInnerHTML={
|
|
189
192
|
Object {
|
|
190
193
|
"__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
|
|
@@ -196,11 +199,11 @@ exports[`StructuredContent renders the UI snapshot 4`] = `
|
|
|
196
199
|
|
|
197
200
|
exports[`StructuredContent renders the UI snapshot 5`] = `
|
|
198
201
|
<div
|
|
199
|
-
className="css-
|
|
202
|
+
className="css-1xdhyk6"
|
|
200
203
|
id="withoutHeading"
|
|
201
204
|
>
|
|
202
205
|
<h3
|
|
203
|
-
className="chakra-heading css-
|
|
206
|
+
className="chakra-heading css-1xdhyk6"
|
|
204
207
|
id="withoutHeading-callout"
|
|
205
208
|
>
|
|
206
209
|
This is the callout text
|
|
@@ -229,6 +232,7 @@ exports[`StructuredContent renders the UI snapshot 5`] = `
|
|
|
229
232
|
</figcaption>
|
|
230
233
|
</figure>
|
|
231
234
|
<div
|
|
235
|
+
className="structuredcontent-body"
|
|
232
236
|
dangerouslySetInnerHTML={
|
|
233
237
|
Object {
|
|
234
238
|
"__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
|
|
@@ -240,15 +244,95 @@ exports[`StructuredContent renders the UI snapshot 5`] = `
|
|
|
240
244
|
|
|
241
245
|
exports[`StructuredContent renders the UI snapshot 6`] = `
|
|
242
246
|
<div
|
|
243
|
-
className="css-
|
|
247
|
+
className="css-1xdhyk6"
|
|
244
248
|
id="withoutCalloutText"
|
|
245
249
|
>
|
|
246
250
|
<h2
|
|
247
|
-
className="chakra-heading css-
|
|
251
|
+
className="chakra-heading css-1xdhyk6"
|
|
248
252
|
id="withoutCalloutText-heading"
|
|
249
253
|
>
|
|
250
254
|
Heading text
|
|
251
255
|
</h2>
|
|
256
|
+
<div
|
|
257
|
+
className="structuredcontent-body"
|
|
258
|
+
dangerouslySetInnerHTML={
|
|
259
|
+
Object {
|
|
260
|
+
"__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
/>
|
|
264
|
+
</div>
|
|
265
|
+
`;
|
|
266
|
+
|
|
267
|
+
exports[`StructuredContent renders the UI snapshot 7`] = `
|
|
268
|
+
<div
|
|
269
|
+
className="css-kle7zy"
|
|
270
|
+
id="withChakraProps"
|
|
271
|
+
>
|
|
272
|
+
<h2
|
|
273
|
+
className="chakra-heading css-1xdhyk6"
|
|
274
|
+
id="withChakraProps-heading"
|
|
275
|
+
>
|
|
276
|
+
Heading text
|
|
277
|
+
</h2>
|
|
278
|
+
<h3
|
|
279
|
+
className="chakra-heading css-1xdhyk6"
|
|
280
|
+
id="withChakraProps-callout"
|
|
281
|
+
>
|
|
282
|
+
This is the callout text
|
|
283
|
+
</h3>
|
|
284
|
+
<figure
|
|
285
|
+
className="css-0"
|
|
286
|
+
>
|
|
287
|
+
<img
|
|
288
|
+
alt="Image alt text"
|
|
289
|
+
className="css-0"
|
|
290
|
+
src="https://placeimg.com/400/300/animals"
|
|
291
|
+
/>
|
|
292
|
+
<figcaption
|
|
293
|
+
className="css-0"
|
|
294
|
+
>
|
|
295
|
+
<div
|
|
296
|
+
className="css-0"
|
|
297
|
+
>
|
|
298
|
+
Image caption
|
|
299
|
+
</div>
|
|
300
|
+
<div
|
|
301
|
+
className="css-0"
|
|
302
|
+
>
|
|
303
|
+
Image credit
|
|
304
|
+
</div>
|
|
305
|
+
</figcaption>
|
|
306
|
+
</figure>
|
|
307
|
+
<div
|
|
308
|
+
className="structuredcontent-body"
|
|
309
|
+
dangerouslySetInnerHTML={
|
|
310
|
+
Object {
|
|
311
|
+
"__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
/>
|
|
315
|
+
</div>
|
|
316
|
+
`;
|
|
317
|
+
|
|
318
|
+
exports[`StructuredContent renders the UI snapshot 8`] = `
|
|
319
|
+
<div
|
|
320
|
+
className="css-1xdhyk6"
|
|
321
|
+
data-testid="props"
|
|
322
|
+
id="withOtherProps"
|
|
323
|
+
>
|
|
324
|
+
<h2
|
|
325
|
+
className="chakra-heading css-1xdhyk6"
|
|
326
|
+
id="withOtherProps-heading"
|
|
327
|
+
>
|
|
328
|
+
Heading text
|
|
329
|
+
</h2>
|
|
330
|
+
<h3
|
|
331
|
+
className="chakra-heading css-1xdhyk6"
|
|
332
|
+
id="withOtherProps-callout"
|
|
333
|
+
>
|
|
334
|
+
This is the callout text
|
|
335
|
+
</h3>
|
|
252
336
|
<figure
|
|
253
337
|
className="css-0"
|
|
254
338
|
>
|
|
@@ -273,6 +357,7 @@ exports[`StructuredContent renders the UI snapshot 6`] = `
|
|
|
273
357
|
</figcaption>
|
|
274
358
|
</figure>
|
|
275
359
|
<div
|
|
360
|
+
className="structuredcontent-body"
|
|
276
361
|
dangerouslySetInnerHTML={
|
|
277
362
|
Object {
|
|
278
363
|
"__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
|
|
@@ -31,16 +31,16 @@ for more information on layout mirroring.
|
|
|
31
31
|
## Background
|
|
32
32
|
|
|
33
33
|
While the majority of applications at NYPL will have a LTR direction, some applications
|
|
34
|
-
will introduce internationalization through different means. While the
|
|
34
|
+
will introduce internationalization through different means. While the Reservoir Design
|
|
35
35
|
System (DS) has _no preference_ in how an application is internationalized, DS
|
|
36
36
|
components should work appropriately in RTL configurations in any browser.
|
|
37
37
|
|
|
38
38
|
## Application Implementation
|
|
39
39
|
|
|
40
|
-
Components in the
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
Components in the DS will support layout and component mirroring, but application
|
|
41
|
+
directionality should be implemented at the application level. The following are
|
|
42
|
+
general guidelines on how to set up directionality but implementation will be up
|
|
43
|
+
to the application and its architecture.
|
|
44
44
|
|
|
45
45
|
### `dir` HTML attribute
|
|
46
46
|
|
|
@@ -51,11 +51,11 @@ implementation is `dir="rtl"`.
|
|
|
51
51
|
|
|
52
52
|
The placement of this attribute can be added at the root `<html>` element but can
|
|
53
53
|
also be placed in specific DOM elements within a page to target specific page sections.
|
|
54
|
-
For example, if you only want to target NYPL DS components within
|
|
55
|
-
the `dir` attribute can be added to that element:
|
|
54
|
+
For example, if you only want to target NYPL DS components within your top-level
|
|
55
|
+
`app` class, the `dir` attribute can be added to that element:
|
|
56
56
|
|
|
57
57
|
```jsx
|
|
58
|
-
<div className="app
|
|
58
|
+
<div className="app" dir="rtl">
|
|
59
59
|
...
|
|
60
60
|
</div>
|
|
61
61
|
```
|
|
@@ -66,7 +66,7 @@ do the following:
|
|
|
66
66
|
|
|
67
67
|
```jsx
|
|
68
68
|
// don't do this
|
|
69
|
-
<div className="app
|
|
69
|
+
<div className="app" dir="rtl">
|
|
70
70
|
<div dir="rtl">
|
|
71
71
|
<p dir="rtl">
|
|
72
72
|
Some text <button dir="rtl">Button</button>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Meta } from "@storybook/addon-docs";
|
|
2
|
-
import { withDesign } from "storybook-addon-designs";
|
|
3
2
|
|
|
4
3
|
import Heading from "../Heading/Heading";
|
|
5
4
|
import { getCategory } from "../../utils/componentCategories";
|
|
@@ -16,7 +15,8 @@ import { getCategory } from "../../utils/componentCategories";
|
|
|
16
15
|
|
|
17
16
|
## General Information
|
|
18
17
|
|
|
19
|
-
The DS adheres to four global breakpoints for
|
|
18
|
+
The Reservoir Design System (DS) adheres to four global breakpoints for
|
|
19
|
+
responsive layouts and typography.
|
|
20
20
|
|
|
21
21
|
- Mobile: 320px
|
|
22
22
|
- Tablet Portrait: 600px
|
|
@@ -27,7 +27,7 @@ The DS adheres to four global breakpoints for responsive layouts and typography.
|
|
|
27
27
|
|
|
28
28
|
The following CSS variables are available through the DS.
|
|
29
29
|
|
|
30
|
-
```
|
|
30
|
+
```css
|
|
31
31
|
--nypl-breakpoint-small: 320px;
|
|
32
32
|
--nypl-breakpoint-medium: 600px;
|
|
33
33
|
--nypl-breakpoint-large: 960px;
|
|
@@ -36,9 +36,9 @@ The following CSS variables are available through the DS.
|
|
|
36
36
|
|
|
37
37
|
## SCSS Variables
|
|
38
38
|
|
|
39
|
-
If you are using SCSS and imported the
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
If you are using SCSS and imported the DS `/dist/resources.scss` file, then you
|
|
40
|
+
can use the following SCSS variables in your media queries or SCSS `breakpoint`
|
|
41
|
+
function (if used).
|
|
42
42
|
|
|
43
43
|
```scss
|
|
44
44
|
$nypl-breakpoint-small: 320px;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ButtonGroup } from "@chakra-ui/react";
|
|
2
2
|
import { Canvas, Meta } from "@storybook/addon-docs";
|
|
3
|
-
import { withDesign } from "storybook-addon-designs";
|
|
4
3
|
|
|
5
4
|
import Button from "../Button/Button";
|
|
6
5
|
import { ButtonTypes } from "../Button/ButtonTypes";
|
|
@@ -14,16 +13,7 @@ import {
|
|
|
14
13
|
import { getCategory } from "../../utils/componentCategories";
|
|
15
14
|
import DSProvider from "../../theme/provider";
|
|
16
15
|
|
|
17
|
-
<Meta
|
|
18
|
-
title={getCategory("Buttons")}
|
|
19
|
-
decorators={[withDesign]}
|
|
20
|
-
parameters={{
|
|
21
|
-
design: {
|
|
22
|
-
type: "figma",
|
|
23
|
-
url: "https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Master?node-id=11477%3A2298",
|
|
24
|
-
},
|
|
25
|
-
}}
|
|
26
|
-
/>
|
|
16
|
+
<Meta title={getCategory("Buttons")} />
|
|
27
17
|
|
|
28
18
|
# Buttons
|
|
29
19
|
|
|
@@ -38,7 +28,7 @@ import DSProvider from "../../theme/provider";
|
|
|
38
28
|
|
|
39
29
|
## General Information
|
|
40
30
|
|
|
41
|
-
Use the
|
|
31
|
+
Use the [Button](https://nypl.github.io/nypl-design-system/storybook-static/?path=/docs/form-elements-button--basic)
|
|
42
32
|
component to render form buttons.
|
|
43
33
|
|
|
44
34
|
```jsx
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
|
|
3
3
|
import Card from "../Card/Card";
|
|
4
|
-
import { CardLayouts } from "../Card/CardTypes";
|
|
5
4
|
import Heading from "../Heading/Heading";
|
|
6
5
|
import { HeadingLevels } from "../Heading/HeadingTypes";
|
|
6
|
+
import { LayoutTypes } from "../../helpers/enums";
|
|
7
7
|
|
|
8
8
|
export interface ColorCardProps {
|
|
9
9
|
/** backgroundColor of the color card */
|
|
@@ -25,9 +25,9 @@ export default function ColorCard(
|
|
|
25
25
|
<div style={{ display: "flex", alignItems: "center" }}>
|
|
26
26
|
<Card
|
|
27
27
|
backgroundColor={backgroundColor}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
isBordered
|
|
29
|
+
isCentered
|
|
30
|
+
layout={LayoutTypes.Column}
|
|
31
31
|
/>
|
|
32
32
|
<div style={{ marginLeft: "1rem" }}>
|
|
33
33
|
<Heading level={HeadingLevels.Four}>{colorName}</Heading>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Canvas, Meta } from "@storybook/addon-docs";
|
|
2
|
-
import { withDesign } from "storybook-addon-designs";
|
|
3
2
|
|
|
4
3
|
import ColorCard from "./ColorCard";
|
|
5
4
|
import Heading from "../Heading/Heading";
|
|
@@ -10,31 +9,35 @@ import DSProvider from "../../theme/provider";
|
|
|
10
9
|
|
|
11
10
|
export const cssVars = {
|
|
12
11
|
brand: ["--nypl-colors-brand-primary", "--nypl-colors-brand-secondary"],
|
|
13
|
-
|
|
14
|
-
"--nypl-colors-section-
|
|
15
|
-
"--nypl-colors-section-
|
|
12
|
+
blogs: [
|
|
13
|
+
"--nypl-colors-section-blogs-primary",
|
|
14
|
+
"--nypl-colors-section-blogs-secondary",
|
|
16
15
|
],
|
|
17
16
|
booksAndMore: [
|
|
18
17
|
"--nypl-colors-section-books-and-more-primary",
|
|
19
18
|
"--nypl-colors-section-books-and-more-secondary",
|
|
20
19
|
],
|
|
21
|
-
|
|
22
|
-
"--nypl-colors-section-
|
|
23
|
-
"--nypl-colors-section-
|
|
20
|
+
education: [
|
|
21
|
+
"--nypl-colors-section-education-primary",
|
|
22
|
+
"--nypl-colors-section-education-secondary",
|
|
24
23
|
],
|
|
25
24
|
locations: [
|
|
26
25
|
"--nypl-colors-section-locations-primary",
|
|
27
26
|
"--nypl-colors-section-locations-secondary",
|
|
28
27
|
],
|
|
29
|
-
|
|
30
|
-
"--nypl-colors-section-
|
|
31
|
-
"--nypl-colors-section-
|
|
28
|
+
research: [
|
|
29
|
+
"--nypl-colors-section-research-primary",
|
|
30
|
+
"--nypl-colors-section-research-secondary",
|
|
32
31
|
],
|
|
33
32
|
researchLibraries: [
|
|
34
33
|
"--nypl-colors-section-research-library-lpa",
|
|
35
34
|
"--nypl-colors-section-research-library-schomburg",
|
|
36
35
|
"--nypl-colors-section-research-library-schwartzman",
|
|
37
36
|
],
|
|
37
|
+
whatsOn: [
|
|
38
|
+
"--nypl-colors-section-whats-on-primary",
|
|
39
|
+
"--nypl-colors-section-whats-on-secondary",
|
|
40
|
+
],
|
|
38
41
|
ui: [
|
|
39
42
|
"--nypl-colors-ui-black",
|
|
40
43
|
"--nypl-colors-ui-white",
|
|
@@ -84,7 +87,7 @@ export const getColorCards = (cat) => {
|
|
|
84
87
|
return cards;
|
|
85
88
|
};
|
|
86
89
|
|
|
87
|
-
<Meta title={getCategory("Colors")}
|
|
90
|
+
<Meta title={getCategory("Colors")} />
|
|
88
91
|
|
|
89
92
|
# NYPL Colors
|
|
90
93
|
|
|
@@ -112,9 +115,9 @@ Section colors are branding colors only in use at NYPL.
|
|
|
112
115
|
|
|
113
116
|
<Canvas>
|
|
114
117
|
<DSProvider>
|
|
115
|
-
<Heading level={HeadingLevels.Two}>
|
|
116
|
-
<p>
|
|
117
|
-
<SimpleGrid columns={1}>{getColorCards("
|
|
118
|
+
<Heading level={HeadingLevels.Two}>Blogs</Heading>
|
|
119
|
+
<p>Blogs is used for the Blogs section.</p>
|
|
120
|
+
<SimpleGrid columns={1}>{getColorCards("blogs")}</SimpleGrid>
|
|
118
121
|
</DSProvider>
|
|
119
122
|
</Canvas>
|
|
120
123
|
|
|
@@ -131,9 +134,12 @@ Section colors are branding colors only in use at NYPL.
|
|
|
131
134
|
|
|
132
135
|
<Canvas>
|
|
133
136
|
<DSProvider>
|
|
134
|
-
<Heading level={HeadingLevels.Two}>
|
|
135
|
-
<p>
|
|
136
|
-
|
|
137
|
+
<Heading level={HeadingLevels.Two}>Education</Heading>
|
|
138
|
+
<p>
|
|
139
|
+
Education is used for the Education section front and all associated
|
|
140
|
+
sub-sections.
|
|
141
|
+
</p>
|
|
142
|
+
<SimpleGrid columns={1}>{getColorCards("education")}</SimpleGrid>
|
|
137
143
|
</DSProvider>
|
|
138
144
|
</Canvas>
|
|
139
145
|
|
|
@@ -150,9 +156,9 @@ Section colors are branding colors only in use at NYPL.
|
|
|
150
156
|
|
|
151
157
|
<Canvas>
|
|
152
158
|
<DSProvider>
|
|
153
|
-
<Heading level={HeadingLevels.Two}>
|
|
154
|
-
<p>
|
|
155
|
-
<SimpleGrid columns={1}>{getColorCards("
|
|
159
|
+
<Heading level={HeadingLevels.Two}>Research</Heading>
|
|
160
|
+
<p>Research is used for the Research Catalog and SCC.</p>
|
|
161
|
+
<SimpleGrid columns={1}>{getColorCards("research")}</SimpleGrid>
|
|
156
162
|
</DSProvider>
|
|
157
163
|
</Canvas>
|
|
158
164
|
|
|
@@ -164,6 +170,14 @@ Section colors are branding colors only in use at NYPL.
|
|
|
164
170
|
</DSProvider>
|
|
165
171
|
</Canvas>
|
|
166
172
|
|
|
173
|
+
<Canvas>
|
|
174
|
+
<DSProvider>
|
|
175
|
+
<Heading level={HeadingLevels.Two}>What's On</Heading>
|
|
176
|
+
<p>What's On is used for Events, Exhibitions & Audio Guides.</p>
|
|
177
|
+
<SimpleGrid columns={1}>{getColorCards("whatsOn")}</SimpleGrid>
|
|
178
|
+
</DSProvider>
|
|
179
|
+
</Canvas>
|
|
180
|
+
|
|
167
181
|
## Utility Colors
|
|
168
182
|
|
|
169
183
|
<Canvas>
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Meta } from "@storybook/addon-docs";
|
|
2
|
-
import { withDesign } from "storybook-addon-designs";
|
|
3
2
|
|
|
4
3
|
import { getCategory } from "../../utils/componentCategories";
|
|
5
4
|
|
|
@@ -7,34 +6,49 @@ import { getCategory } from "../../utils/componentCategories";
|
|
|
7
6
|
|
|
8
7
|
# Design Tokens
|
|
9
8
|
|
|
10
|
-
| Table of Contents
|
|
11
|
-
|
|
|
12
|
-
| 1. [What are Design Tokens?](#what-are-design-tokens)
|
|
13
|
-
| 2. [Why Use Design Tokens?](#why-use-design-tokens)
|
|
14
|
-
| 3. [How to Use the
|
|
15
|
-
| 4. [Using
|
|
16
|
-
| 5. [Using
|
|
17
|
-
| 6. [
|
|
9
|
+
| Table of Contents |
|
|
10
|
+
| ---------------------------------------------------------------------------------------------- |
|
|
11
|
+
| 1. [What are Design Tokens?](#what-are-design-tokens) |
|
|
12
|
+
| 2. [Why Use Design Tokens?](#why-use-design-tokens) |
|
|
13
|
+
| 3. [How to Use the Reservoir Design Tokens](#figma-reference) |
|
|
14
|
+
| 4. [Using Reservoir Design Tokens in CSS](#using-reservoir-design-tokens-in-css) |
|
|
15
|
+
| 5. [Using Reservoir Design Tokens in Javascript](#using-reservoir-design-tokens-in-javascript) |
|
|
16
|
+
| 6. [Reservoir Design Token Categories](#reservoir-design-token-categories) |
|
|
18
17
|
|
|
19
18
|
## What are Design Tokens?
|
|
20
19
|
|
|
21
|
-
Design tokens are the style values that define a design system. These values
|
|
20
|
+
Design tokens are the style values that define a design system. These values
|
|
21
|
+
can include, but may not be limited to, spacing, color, typography, breakpoints
|
|
22
|
+
and object styles. Ultimately, these values are used to construct and maintain
|
|
23
|
+
the components that make up our system.
|
|
22
24
|
|
|
23
25
|
## Why Use Design Tokens?
|
|
24
26
|
|
|
25
|
-
_"With design tokens, you can capture low-level values and then use them to
|
|
27
|
+
_"With design tokens, you can capture low-level values and then use them to
|
|
28
|
+
create the styles for your product or app. You can maintain a scalable and
|
|
29
|
+
consistent visual system for UI development."_ - Jina Bolton, Lead Designer
|
|
30
|
+
for the Salesforce Design System
|
|
26
31
|
|
|
27
|
-
Design tokens are a single source of truth when it comes to styles. They allow
|
|
32
|
+
Design tokens are a single source of truth when it comes to styles. They allow
|
|
33
|
+
an organization to more easily build multiple applications - web and/or native -
|
|
34
|
+
that feel and look the same without slowing down the development team.
|
|
28
35
|
|
|
29
|
-
## How to Use the
|
|
36
|
+
## How to Use the Reservoir Design Tokens
|
|
30
37
|
|
|
31
|
-
The NYPL design tokens are built into the
|
|
38
|
+
The NYPL design tokens are built into the Reservoir Design System (DS) and are
|
|
39
|
+
offered in two formats for consumption: CSS variables and javascript data
|
|
40
|
+
objects. To access either of these formats, the DS `v0.25.9` or higher needs
|
|
41
|
+
to be properly installed in a consuming React application.
|
|
32
42
|
|
|
33
|
-
## Using
|
|
43
|
+
## Using Reservoir Design Tokens in CSS
|
|
34
44
|
|
|
35
|
-
If your app uses CSS or SCSS to handle styles, the DS creates standard CSS
|
|
45
|
+
If your app uses CSS or SCSS to handle styles, the DS creates standard CSS
|
|
46
|
+
custom properties (e.g. variables) for consumption in your stylesheets. If the
|
|
47
|
+
DS is properly installed, the CSS custom properties will be available for you
|
|
48
|
+
to use. Nothing more needs to be done to your app.
|
|
36
49
|
|
|
37
|
-
To assist with CSS scope isolation, all of the CSS custom properties created
|
|
50
|
+
To assist with CSS scope isolation, all of the CSS custom properties created
|
|
51
|
+
by the DS are prefixed with "nypl." Please see the examples below.
|
|
38
52
|
|
|
39
53
|
```css
|
|
40
54
|
--nypl-colors-brand-primary
|
|
@@ -50,7 +64,8 @@ To assist with CSS scope isolation, all of the CSS custom properties created by
|
|
|
50
64
|
--nypl-space-l
|
|
51
65
|
```
|
|
52
66
|
|
|
53
|
-
The CSS custom properties are defined on the :root pseudo-class and should be
|
|
67
|
+
The CSS custom properties are defined on the :root pseudo-class and should be
|
|
68
|
+
implemented using standard CSS custom properties conventions.
|
|
54
69
|
|
|
55
70
|
```css
|
|
56
71
|
/* Property Declaration in the DS */
|
|
@@ -64,18 +79,25 @@ The CSS custom properties are defined on the :root pseudo-class and should be im
|
|
|
64
79
|
}
|
|
65
80
|
```
|
|
66
81
|
|
|
67
|
-
## Using
|
|
82
|
+
## Using Reservoir Design Tokens in Javascript
|
|
68
83
|
|
|
69
|
-
If you would like to use CSS-in-JS styles in your React components, the
|
|
84
|
+
If you would like to use CSS-in-JS styles in your React components, the
|
|
85
|
+
`useNYPLTheme` hook will provide you with Reservoir design token values. The hook
|
|
86
|
+
depends on the `DSProvider` component and will not work properly outside of
|
|
87
|
+
the `DSProvider` wrapper component.
|
|
70
88
|
|
|
71
|
-
After importing and implementing the `DSProvider` wrapper component, as
|
|
89
|
+
After importing and implementing the `DSProvider` wrapper component, as
|
|
90
|
+
explained in the `DSProvider` section of the [DS Chakra UI](?path=/story/chakra-ui--page#dsprovider)
|
|
91
|
+
document, your children components can use this hook function.
|
|
72
92
|
|
|
73
93
|
```tsx
|
|
74
94
|
import { useNYPLTheme } from "@nypl/design-system-react-components";
|
|
75
95
|
const theme = useNYPLTheme();
|
|
76
96
|
```
|
|
77
97
|
|
|
78
|
-
The theme variable will be a javascript object containing the NYPL design
|
|
98
|
+
The theme variable will be a javascript object containing the NYPL design
|
|
99
|
+
token style values. This will allow you to use design token values in your
|
|
100
|
+
components through CSS-in-JS.
|
|
79
101
|
|
|
80
102
|
```tsx
|
|
81
103
|
// theme
|
|
@@ -97,9 +119,16 @@ The theme variable will be a javascript object containing the NYPL design token
|
|
|
97
119
|
|
|
98
120
|
#### Using in DS Components
|
|
99
121
|
|
|
100
|
-
The general rule of thumb is that DS components and the available variants
|
|
122
|
+
The general rule of thumb is that DS components and the available variants
|
|
123
|
+
should be used with the styles and variants as they are shown in Storybook,
|
|
124
|
+
but there may be rare times when a component does require a modification.
|
|
125
|
+
That said, if a DS component does need an updated style, first contact the
|
|
126
|
+
Design System and UX teams about this update.
|
|
101
127
|
|
|
102
|
-
If you receive approval to make a change in a consuming app, then you can add
|
|
128
|
+
If you receive approval to make a change in a consuming app, then you can add
|
|
129
|
+
styles directly to the `additionalStyles` prop. For example, if the `Heading`
|
|
130
|
+
component needs to render text in Reservoir's "success primary" green color and add
|
|
131
|
+
a bold font weight, then you can do the following:
|
|
103
132
|
|
|
104
133
|
```tsx
|
|
105
134
|
const theme = useNYPLTheme();
|
|
@@ -145,7 +174,7 @@ const CustomButton = styled.button`
|
|
|
145
174
|
`;
|
|
146
175
|
```
|
|
147
176
|
|
|
148
|
-
##
|
|
177
|
+
## Reservoir Design Token Categories
|
|
149
178
|
|
|
150
179
|
The DS design tokens are broken into the following categories:
|
|
151
180
|
|
|
@@ -162,4 +191,5 @@ The DS design tokens are broken into the following categories:
|
|
|
162
191
|
- font sizes
|
|
163
192
|
- font weights
|
|
164
193
|
|
|
165
|
-
For details related to a specific category, please refer to the corresponding
|
|
194
|
+
For details related to a specific category, please refer to the corresponding
|
|
195
|
+
section in the Style Guide available in the DS Storybook.
|