@nypl/design-system-react-components 0.23.4 → 0.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +98 -1
- package/README.md +46 -11
- package/dist/components/Accordion/Accordion.d.ts +14 -14
- package/dist/components/Autosuggest/Autosuggest.stories.d.ts +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +11 -14
- package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +6 -0
- package/dist/components/Button/Button.d.ts +6 -13
- package/dist/components/Button/ButtonTypes.d.ts +5 -3
- package/dist/components/Card/Card.d.ts +59 -10
- package/dist/components/Card/CardTypes.d.ts +19 -0
- package/dist/components/CardEdition/CardEdition.d.ts +21 -0
- package/dist/components/{StyleGuide/Colors.stories.d.ts → CardEdition/CardEdition.stories.d.ts} +5 -2
- package/dist/components/Checkbox/Checkbox.d.ts +21 -16
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +43 -0
- package/dist/components/CheckboxGroup/CheckboxGroupLayoutTypes.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.d.ts +79 -0
- package/dist/components/DatePicker/DatePickerTypes.d.ts +5 -0
- package/dist/components/Form/Form.d.ts +16 -8
- package/dist/components/Form/FormTypes.d.ts +2 -0
- package/dist/components/Grid/GridTypes.d.ts +9 -0
- package/dist/components/Grid/SimpleGrid.d.ts +14 -0
- package/dist/components/Heading/Heading.d.ts +9 -11
- package/dist/components/Heading/{HeadingDisplaySizes.d.ts → HeadingTypes.d.ts} +8 -0
- package/dist/components/HelperErrorText/HelperErrorText.stories.d.ts +2 -1
- package/dist/components/Hero/Hero.d.ts +19 -14
- package/dist/components/Hero/HeroTypes.d.ts +10 -5
- package/dist/components/Icons/Icon.d.ts +13 -16
- package/dist/components/Icons/IconSvgs.d.ts +4 -0
- package/dist/components/Icons/IconTypes.d.ts +78 -60
- package/dist/components/Image/Image.stories.d.ts +2 -1
- package/dist/components/Label/Label.d.ts +10 -26
- package/dist/components/Link/Link.d.ts +8 -12
- package/dist/components/List/List.stories.d.ts +1 -0
- package/dist/components/Radio/Radio.d.ts +30 -24
- package/dist/components/RadioGroup/RadioGroup.d.ts +40 -0
- package/dist/components/RadioGroup/RadioGroupLayoutTypes.d.ts +4 -0
- package/dist/components/SearchBar/SearchBar.d.ts +45 -27
- package/dist/components/Select/Select.d.ts +34 -35
- package/dist/components/Select/SelectTypes.d.ts +4 -0
- package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +1 -1
- package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +2 -2
- package/dist/components/StatusBadge/StatusBadge.d.ts +8 -6
- package/dist/components/StatusBadge/StatusBadgeTypes.d.ts +5 -0
- package/dist/components/Tabs/Tabs.d.ts +25 -0
- package/dist/components/Template/Template.d.ts +91 -0
- package/dist/components/Text/Text.d.ts +16 -0
- package/dist/components/Text/TextTypes.d.ts +6 -0
- package/dist/components/TextInput/TextInput.d.ts +37 -30
- package/dist/components/TextInput/TextInputTypes.d.ts +5 -0
- package/dist/design-system-react-components.cjs.development.js +4102 -917
- 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 +4023 -920
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/index.d.ts +23 -5
- package/dist/resources.scss +133 -24
- package/dist/styles.css +1 -1
- package/dist/theme/components/accordion.d.ts +25 -0
- package/dist/theme/components/breadcrumb.d.ts +90 -0
- package/dist/theme/components/button.d.ts +109 -0
- package/dist/theme/components/checkbox.d.ts +91 -0
- package/dist/theme/components/customCheckboxGroup.d.ts +18 -0
- package/dist/theme/components/customRadioGroup.d.ts +18 -0
- package/dist/theme/components/global.d.ts +55 -0
- package/dist/theme/components/globalMixins.d.ts +15 -0
- package/dist/theme/components/heading.d.ts +110 -0
- package/dist/theme/components/hero.d.ts +492 -0
- package/dist/theme/components/icon.d.ts +13 -0
- package/dist/theme/components/label.d.ts +16 -0
- package/dist/theme/components/link.d.ts +45 -0
- package/dist/theme/components/radio.d.ts +95 -0
- package/dist/theme/components/searchBar.d.ts +20 -0
- package/dist/theme/components/select.d.ts +58 -0
- package/dist/theme/components/statusBadge.d.ts +25 -0
- package/dist/theme/components/tabs.d.ts +85 -0
- package/dist/theme/components/template.d.ts +105 -0
- package/dist/theme/components/text.d.ts +20 -0
- package/dist/theme/components/textInput.d.ts +105 -0
- package/dist/theme/foundations/breakpoints.d.ts +23 -0
- package/dist/theme/foundations/colors.d.ts +3 -0
- package/dist/theme/foundations/global.d.ts +23 -0
- package/dist/theme/foundations/shadows.d.ts +4 -0
- package/dist/theme/foundations/spacing.d.ts +77 -0
- package/dist/theme/foundations/typography.d.ts +8 -0
- package/dist/theme/index.d.ts +20 -0
- package/dist/theme/provider.d.ts +5 -0
- package/dist/theme/types.d.ts +1 -0
- package/dist/utils/utils.d.ts +6 -0
- package/package.json +9 -2
- package/src/components/Accordion/Accordion.stories.mdx +233 -33
- package/src/components/Accordion/Accordion.test.tsx +135 -19
- package/src/components/Accordion/Accordion.tsx +81 -56
- package/src/components/Autosuggest/Autosuggest.stories.mdx +4 -3
- package/src/components/Autosuggest/Autosuggest.stories.tsx +1 -1
- package/src/components/Autosuggest/_Autosuggest.scss +2 -2
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +57 -56
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +31 -25
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +71 -73
- package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +6 -0
- package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +100 -0
- package/src/components/Button/Button.stories.mdx +125 -138
- package/src/components/Button/Button.test.tsx +65 -11
- package/src/components/Button/Button.tsx +72 -68
- package/src/components/Button/ButtonTypes.tsx +4 -2
- package/src/components/Button/_Button.scss +7 -92
- package/src/components/Button/__snapshots__/Button.test.tsx.snap +58 -3
- package/src/components/Card/Card.stories.mdx +694 -0
- package/src/components/Card/Card.test.tsx +97 -102
- package/src/components/Card/Card.tsx +182 -31
- package/src/components/Card/CardTypes.tsx +21 -0
- package/src/components/Card/_Card.scss +234 -49
- package/src/components/{Card/Card.stories.tsx → CardEdition/CardEdition.stories.tsx} +32 -22
- package/src/components/CardEdition/CardEdition.test.tsx +395 -0
- package/src/components/CardEdition/CardEdition.tsx +60 -0
- package/src/components/CardEdition/_CardEdition.scss +138 -0
- package/src/components/Chakra/Box.stories.mdx +57 -0
- package/src/components/Chakra/Center.stories.mdx +99 -0
- package/src/components/Chakra/Grid.stories.mdx +79 -0
- package/src/components/Chakra/Stack.stories.mdx +93 -0
- package/src/components/Checkbox/Checkbox.stories.mdx +57 -35
- package/src/components/Checkbox/Checkbox.test.tsx +117 -147
- package/src/components/Checkbox/Checkbox.tsx +76 -50
- package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +325 -0
- package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +249 -0
- package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +345 -0
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +148 -0
- package/src/components/CheckboxGroup/CheckboxGroupLayoutTypes.tsx +4 -0
- package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +1360 -0
- package/src/components/DatePicker/DatePicker.stories.mdx +284 -0
- package/src/components/DatePicker/DatePicker.test.tsx +657 -0
- package/src/components/DatePicker/DatePicker.tsx +396 -0
- package/src/components/DatePicker/DatePickerTypes.tsx +5 -0
- package/src/components/DatePicker/_DatePicker.scss +76 -0
- package/src/components/Form/Form.stories.mdx +130 -27
- package/src/components/Form/Form.test.tsx +78 -36
- package/src/components/Form/Form.tsx +53 -19
- package/src/components/Form/FormTypes.tsx +3 -0
- package/src/components/Form/__snapshots__/Form.test.tsx.snap +38 -0
- package/src/components/Grid/GridTypes.tsx +9 -0
- package/src/components/Grid/SimpleGrid.stories.mdx +275 -0
- package/src/components/Grid/SimpleGrid.test.tsx +66 -0
- package/src/components/Grid/SimpleGrid.tsx +37 -0
- package/src/components/Grid/__snapshots__/SimpleGrid.test.tsx.snap +8 -0
- package/src/components/Heading/Heading.stories.mdx +63 -33
- package/src/components/Heading/Heading.test.tsx +24 -16
- package/src/components/Heading/Heading.tsx +54 -38
- package/src/components/Heading/{HeadingDisplaySizes.tsx → HeadingTypes.tsx} +9 -0
- package/src/components/HelperErrorText/HelperErrorText.stories.tsx +2 -1
- package/src/components/HelperErrorText/_HelperErrorText.scss +1 -1
- package/src/components/Hero/Hero.stories.mdx +195 -85
- package/src/components/Hero/Hero.test.tsx +544 -113
- package/src/components/Hero/Hero.tsx +80 -93
- package/src/components/Hero/HeroTypes.tsx +17 -5
- package/src/components/Hero/__snapshots__/Hero.test.tsx.snap +307 -0
- package/src/components/HorizontalRule/HorizontalRule.stories.mdx +6 -1
- package/src/components/HorizontalRule/_HorizontalRule.scss +1 -1
- package/src/components/Icons/Icon.stories.mdx +89 -74
- package/src/components/Icons/Icon.test.tsx +30 -22
- package/src/components/Icons/Icon.tsx +63 -61
- package/src/components/Icons/IconSvgs.tsx +8 -0
- package/src/components/Icons/IconTypes.tsx +80 -60
- package/src/components/Image/Image.stories.tsx +2 -1
- package/src/components/Input/_Input.scss +2 -2
- package/src/components/Label/Label.stories.mdx +77 -0
- package/src/components/Label/Label.test.tsx +43 -12
- package/src/components/Label/Label.tsx +28 -45
- package/src/components/Label/__snapshots__/Label.test.tsx.snap +41 -0
- package/src/components/Link/Link.stories.mdx +47 -41
- package/src/components/Link/Link.test.tsx +33 -44
- package/src/components/Link/Link.tsx +114 -100
- package/src/components/List/List.stories.mdx +7 -3
- package/src/components/List/List.stories.tsx +14 -9
- package/src/components/List/List.test.tsx +12 -8
- package/src/components/List/List.tsx +9 -7
- package/src/components/List/_List.scss +3 -3
- package/src/components/Modal/Modal.stories.mdx +7 -3
- package/src/components/Modal/_Modal.scss +1 -1
- package/src/components/Notification/Notification.stories.mdx +99 -65
- package/src/components/Notification/Notification.test.tsx +3 -16
- package/src/components/Notification/Notification.tsx +12 -12
- package/src/components/Notification/_Notification.scss +5 -4
- package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +1 -1
- package/src/components/Pagination/Pagination.stories.mdx +7 -1
- package/src/components/Pagination/Pagination.test.tsx +16 -10
- package/src/components/Radio/Radio.stories.mdx +57 -46
- package/src/components/Radio/Radio.test.tsx +92 -138
- package/src/components/Radio/Radio.tsx +70 -69
- package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +250 -0
- package/src/components/RadioGroup/RadioGroup.stories.mdx +247 -0
- package/src/components/RadioGroup/RadioGroup.test.tsx +327 -0
- package/src/components/RadioGroup/RadioGroup.tsx +154 -0
- package/src/components/RadioGroup/RadioGroupLayoutTypes.tsx +4 -0
- package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1101 -0
- package/src/components/SearchBar/SearchBar.Test.tsx +151 -16
- package/src/components/SearchBar/SearchBar.stories.mdx +196 -224
- package/src/components/SearchBar/SearchBar.tsx +151 -46
- package/src/components/Select/Select.stories.mdx +193 -168
- package/src/components/Select/Select.test.tsx +129 -324
- package/src/components/Select/Select.tsx +120 -160
- package/src/components/Select/SelectTypes.tsx +4 -0
- package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +18 -29
- package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +7 -7
- package/src/components/SkeletonLoader/SkeletonLoader.tsx +4 -2
- package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +2 -2
- package/src/components/SkeletonLoader/_SkeletonLoader.scss +3 -3
- package/src/components/StatusBadge/StatusBadge.stories.mdx +91 -0
- package/src/components/StatusBadge/StatusBadge.test.tsx +35 -7
- package/src/components/StatusBadge/StatusBadge.tsx +24 -25
- package/src/components/StatusBadge/StatusBadgeTypes.tsx +5 -0
- package/src/components/StatusBadge/__snapshots__/StatusBadge.test.tsx.snap +28 -0
- package/src/components/StyleGuide/Bidirectionality.stories.mdx +112 -90
- package/src/components/StyleGuide/Buttons.stories.mdx +98 -100
- package/src/components/StyleGuide/Colors.stories.mdx +336 -0
- package/src/components/StyleGuide/Forms.stories.mdx +85 -0
- package/src/components/StyleGuide/Iconography.stories.mdx +86 -93
- package/src/components/StyleGuide/Spacing.stories.mdx +0 -1
- package/src/components/StyleGuide/Typography.stories.mdx +164 -166
- package/src/components/StyleGuide/UIDocCard.tsx +4 -4
- package/src/components/Tabs/Tabs.stories.mdx +221 -0
- package/src/components/Tabs/Tabs.test.tsx +264 -0
- package/src/components/Tabs/Tabs.tsx +220 -0
- package/src/components/Template/Template.stories.mdx +574 -0
- package/src/components/Template/Template.test.tsx +124 -0
- package/src/components/Template/Template.tsx +226 -0
- package/src/components/Text/Text.stories.mdx +70 -0
- package/src/components/Text/Text.test.tsx +63 -0
- package/src/components/Text/Text.tsx +55 -0
- package/src/components/Text/TextTypes.tsx +6 -0
- package/src/components/Text/__snapshots__/Text.test.tsx.snap +33 -0
- package/src/components/TextInput/TextInput.stories.mdx +90 -90
- package/src/components/TextInput/TextInput.test.tsx +103 -83
- package/src/components/TextInput/TextInput.tsx +108 -91
- package/src/components/TextInput/TextInputTypes.tsx +6 -0
- package/src/components/VideoPlayer/VideoPlayer.stories.mdx +2 -1
- package/src/components/VideoPlayer/VideoPlayer.tsx +4 -2
- package/src/components/VideoPlayer/_VideoPlayer.scss +1 -1
- package/src/docs/Chakra.stories.mdx +341 -0
- package/src/docs/Intro.stories.mdx +31 -24
- package/src/index.ts +70 -5
- package/src/styles/01-colors/_colors-brand.scss +6 -4
- package/src/styles/01-colors/_colors-utility.scss +14 -15
- package/src/styles/03-space/_space-inline.scss +47 -7
- package/src/styles/03-space/_space-inset.scss +33 -5
- package/src/styles/03-space/_space-stack.scss +48 -8
- package/src/styles/base/_02-breakpoints.scss +5 -4
- package/src/styles/base/_04-base.scss +2 -1
- package/src/styles/base/_place-holder.scss +1 -1
- package/src/styles/base/_typography.scss +1 -29
- package/src/styles.scss +22 -25
- package/src/theme/components/accordion.ts +30 -0
- package/src/theme/components/breadcrumb.ts +77 -0
- package/src/theme/components/button.ts +125 -0
- package/src/theme/components/checkbox.ts +107 -0
- package/src/theme/components/customCheckboxGroup.ts +12 -0
- package/src/theme/components/customRadioGroup.ts +12 -0
- package/src/theme/components/global.ts +71 -0
- package/src/theme/components/globalMixins.ts +16 -0
- package/src/theme/components/heading.ts +72 -0
- package/src/theme/components/hero.ts +239 -0
- package/src/theme/components/icon.ts +79 -0
- package/src/theme/components/label.ts +17 -0
- package/src/theme/components/link.ts +47 -0
- package/src/theme/components/radio.ts +106 -0
- package/src/theme/components/searchBar.ts +21 -0
- package/src/theme/components/select.ts +50 -0
- package/src/theme/components/statusBadge.ts +27 -0
- package/src/theme/components/tabs.ts +79 -0
- package/src/theme/components/template.ts +114 -0
- package/src/theme/components/text.ts +31 -0
- package/src/theme/components/textInput.ts +61 -0
- package/src/theme/foundations/breakpoints.ts +24 -0
- package/src/theme/foundations/colors.ts +208 -0
- package/src/theme/foundations/global.ts +26 -0
- package/src/theme/foundations/shadows.ts +5 -0
- package/src/theme/foundations/spacing.ts +85 -0
- package/src/theme/foundations/typography.ts +35 -0
- package/src/theme/index.ts +88 -0
- package/src/theme/provider.tsx +9 -0
- package/src/theme/types.ts +1 -0
- package/src/utils/componentCategories.ts +56 -21
- package/src/utils/utils.ts +13 -0
- package/dist/components/Accordion/Accordion.stories.d.ts +0 -5
- package/dist/components/Card/Card.stories.d.ts +0 -27
- package/dist/components/Label/Label.stories.d.ts +0 -12
- package/dist/components/StatusBadge/StatusBadge.stories.d.ts +0 -8
- package/dist/components/Template/Template.stories.d.ts +0 -29
- package/src/components/Accordion/Accordion.stories.tsx +0 -65
- package/src/components/Accordion/_Accordion.scss +0 -81
- package/src/components/Breadcrumbs/_Breadcrumbs.scss +0 -97
- package/src/components/Checkbox/_Checkbox.scss +0 -97
- package/src/components/Form/_Form.scss +0 -28
- package/src/components/Heading/_Heading.scss +0 -163
- package/src/components/Hero/_Hero.scss +0 -256
- package/src/components/Icons/_Icons.scss +0 -116
- package/src/components/Label/Label.stories.tsx +0 -30
- package/src/components/Label/_Label.scss +0 -22
- package/src/components/Link/_Link.scss +0 -73
- package/src/components/Radio/_Radio.scss +0 -84
- package/src/components/SearchBar/_SearchBar.scss +0 -16
- package/src/components/Select/_Select.scss +0 -82
- package/src/components/StatusBadge/StatusBadge.stories.tsx +0 -33
- package/src/components/StatusBadge/_StatusBadge.scss +0 -23
- package/src/components/StyleGuide/Colors.stories.tsx +0 -288
- package/src/components/Template/Template.stories.tsx +0 -85
- package/src/components/Template/_Template.scss +0 -63
- package/src/components/TextInput/_TextInput.scss +0 -59
|
@@ -4,40 +4,47 @@ import { HeroTypes } from "../components/Hero/HeroTypes.tsx";
|
|
|
4
4
|
import Heading from "../components/Heading/Heading.tsx";
|
|
5
5
|
import Image from "../components/Image/Image.tsx";
|
|
6
6
|
import getCSSVariable from "../helpers/getCSSVariable";
|
|
7
|
+
import DSProvider from "../theme/provider";
|
|
7
8
|
|
|
8
9
|
<Meta title="Introduction" />
|
|
9
10
|
|
|
10
11
|
# NYPL Design System
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
<DSProvider>
|
|
14
|
+
<Hero
|
|
15
|
+
heroType={HeroTypes.FiftyFifty}
|
|
16
|
+
subHeaderText="With 92 locations across the Bronx, Manhattan, and Staten Island, The New York Public Library is an essential part of neighborhoods across the city. Visit us today."
|
|
17
|
+
image={
|
|
18
|
+
<Image
|
|
19
|
+
src="https://cdn-d8.nypl.org/s3fs-public/styles/2_1_960/public/2020-07/SASB_06_29_2020_Lions_mask-00207%20copy_0.jpeg?h=c8e955ed&itok=n_GLQgoe"
|
|
20
|
+
alt=""
|
|
21
|
+
/>
|
|
22
|
+
}
|
|
23
|
+
backgroundColor={getCSSVariable("--section-books-and-more-primary")}
|
|
24
|
+
foregroundColor={getCSSVariable("--ui-white")}
|
|
25
|
+
/>
|
|
26
|
+
</DSProvider>
|
|
27
|
+
|
|
28
|
+
<br />
|
|
13
29
|
|
|
14
30
|
Welcome to the New York Public Library's Design System React component library.
|
|
15
|
-
This design system is NYPL
|
|
16
|
-
and experiences with accessibility as its foundation. It ships functional
|
|
17
|
-
|
|
18
|
-
|
|
31
|
+
This design system is NYPL's open-source extensible React library for products
|
|
32
|
+
and experiences, with accessibility as its foundation. It ships functional components
|
|
33
|
+
with consistent NYPL styling. You can learn more about the project and its goals
|
|
34
|
+
[on our Confluence page](https://confluence.nypl.org/display/DIGTL/NYPL+Design+System)
|
|
35
|
+
(needs a log in).
|
|
19
36
|
|
|
20
37
|
The best way to get started is through the [Design System's Wiki](https://github.com/NYPL/nypl-design-system/wiki)
|
|
21
|
-
to learn
|
|
38
|
+
to learn about design and implementation at NYPL. The Hero above is just
|
|
22
39
|
one example of how we use the NYPL Design System on NYPL.org.
|
|
23
40
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
image={
|
|
28
|
-
<Image
|
|
29
|
-
src="https://cdn-d8.nypl.org/s3fs-public/styles/2_1_960/public/2020-07/SASB_06_29_2020_Lions_mask-00207%20copy_0.jpeg?h=c8e955ed&itok=n_GLQgoe"
|
|
30
|
-
blockName={"hero"}
|
|
31
|
-
alt={""}
|
|
32
|
-
/>
|
|
33
|
-
}
|
|
34
|
-
backgroundColor={getCSSVariable("--section-books-and-more-primary")}
|
|
35
|
-
foregroundColor={getCSSVariable("--ui-white")}
|
|
36
|
-
/>
|
|
41
|
+
For your convenience, the DS components have been organized into logical categories
|
|
42
|
+
based on both form and function. Please refer to the **COMPONENTS** section in the
|
|
43
|
+
Storybook sidebar.
|
|
37
44
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
### For Developers
|
|
45
|
+
## @nypl/design-system-react-components
|
|
41
46
|
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
This React design system library is currently published on [npm](https://www.npmjs.com/package/@nypl/design-system-react-components).
|
|
48
|
+
If you're looking to contribute to this project, checkout the
|
|
49
|
+
[nypl-design-system](https://github.com/NYPL/nypl-design-system) repo on Github
|
|
50
|
+
for more information.
|
package/src/index.ts
CHANGED
|
@@ -1,14 +1,47 @@
|
|
|
1
1
|
import "./styles.scss";
|
|
2
2
|
|
|
3
|
+
// Note that the NYPL Design System directly re-exports the following
|
|
4
|
+
// components for usage in consuming applications.
|
|
5
|
+
export {
|
|
6
|
+
Box,
|
|
7
|
+
Center,
|
|
8
|
+
Circle,
|
|
9
|
+
Grid,
|
|
10
|
+
GridItem,
|
|
11
|
+
Square,
|
|
12
|
+
Stack,
|
|
13
|
+
HStack,
|
|
14
|
+
VStack,
|
|
15
|
+
} from "@chakra-ui/react";
|
|
3
16
|
export { default as Accordion } from "./components/Accordion/Accordion";
|
|
4
17
|
export { default as Breadcrumbs } from "./components/Breadcrumbs/Breadcrumbs";
|
|
5
|
-
export { default as Button } from "./components/Button/Button";
|
|
18
|
+
export { default as Button, ButtonGroup } from "./components/Button/Button";
|
|
6
19
|
export { ButtonTypes } from "./components/Button/ButtonTypes";
|
|
7
|
-
export {
|
|
20
|
+
export {
|
|
21
|
+
default as Card,
|
|
22
|
+
CardActions,
|
|
23
|
+
CardContent,
|
|
24
|
+
CardHeading,
|
|
25
|
+
} from "./components/Card/Card";
|
|
26
|
+
export {
|
|
27
|
+
CardImageRatios,
|
|
28
|
+
CardImageSizes,
|
|
29
|
+
CardLayouts,
|
|
30
|
+
} from "./components/Card/CardTypes";
|
|
31
|
+
export { default as CardEdition } from "./components/CardEdition/CardEdition";
|
|
8
32
|
export { default as Checkbox } from "./components/Checkbox/Checkbox";
|
|
33
|
+
export { default as CheckboxGroup } from "./components/CheckboxGroup/CheckboxGroup";
|
|
34
|
+
export { CheckboxGroupLayoutTypes } from "./components/CheckboxGroup/CheckboxGroupLayoutTypes";
|
|
35
|
+
export { default as DatePicker } from "./components/DatePicker/DatePicker";
|
|
36
|
+
export { DatePickerTypes } from "./components/DatePicker/DatePickerTypes";
|
|
9
37
|
export { default as Form, FormField, FormRow } from "./components/Form/Form";
|
|
38
|
+
export { FormSpacing } from "./components/Form/FormTypes";
|
|
39
|
+
export { GridGaps } from "./components/Grid/GridTypes";
|
|
10
40
|
export { default as Heading } from "./components/Heading/Heading";
|
|
11
|
-
export {
|
|
41
|
+
export {
|
|
42
|
+
HeadingDisplaySizes,
|
|
43
|
+
HeadingLevels,
|
|
44
|
+
} from "./components/Heading/HeadingTypes";
|
|
12
45
|
export { default as HelperErrorText } from "./components/HelperErrorText/HelperErrorText";
|
|
13
46
|
export { default as Hero } from "./components/Hero/Hero";
|
|
14
47
|
export { HeroTypes } from "./components/Hero/HeroTypes";
|
|
@@ -38,7 +71,10 @@ export {
|
|
|
38
71
|
export { NotificationTypes } from "./components/Notification/NotificationTypes";
|
|
39
72
|
export { default as Pagination } from "./components/Pagination/Pagination";
|
|
40
73
|
export { default as Radio } from "./components/Radio/Radio";
|
|
74
|
+
export { default as RadioGroup } from "./components/RadioGroup/RadioGroup";
|
|
75
|
+
export { RadioGroupLayoutTypes } from "./components/RadioGroup/RadioGroupLayoutTypes";
|
|
41
76
|
export { default as SearchBar } from "./components/SearchBar/SearchBar";
|
|
77
|
+
export { default as SimpleGrid } from "./components/Grid/SimpleGrid";
|
|
42
78
|
export { default as SkeletonLoader } from "./components/SkeletonLoader/SkeletonLoader";
|
|
43
79
|
export {
|
|
44
80
|
SkeletonLoaderImageRatios,
|
|
@@ -46,6 +82,35 @@ export {
|
|
|
46
82
|
} from "./components/SkeletonLoader/SkeletonLoaderTypes";
|
|
47
83
|
export { default as Select } from "./components/Select/Select";
|
|
48
84
|
export { default as StatusBadge } from "./components/StatusBadge/StatusBadge";
|
|
49
|
-
export {
|
|
85
|
+
export {
|
|
86
|
+
Tabs,
|
|
87
|
+
TabList,
|
|
88
|
+
Tab,
|
|
89
|
+
TabPanels,
|
|
90
|
+
TabPanel,
|
|
91
|
+
} from "./components/Tabs/Tabs";
|
|
92
|
+
export { default as Text } from "./components/Text/Text";
|
|
93
|
+
export { TextDisplaySizes } from "./components/Text/TextTypes";
|
|
94
|
+
export {
|
|
95
|
+
TemplateAppContainer,
|
|
96
|
+
Template,
|
|
97
|
+
TemplateHeader,
|
|
98
|
+
TemplateBreakout,
|
|
99
|
+
TemplateContent,
|
|
100
|
+
TemplateContentTop,
|
|
101
|
+
TemplateContentPrimary,
|
|
102
|
+
TemplateContentSidebar,
|
|
103
|
+
TemplateFooter,
|
|
104
|
+
} from "./components/Template/Template";
|
|
105
|
+
|
|
106
|
+
export {
|
|
107
|
+
default as TextInput,
|
|
108
|
+
TextInputRefType,
|
|
109
|
+
} from "./components/TextInput/TextInput";
|
|
110
|
+
export { TextInputTypes } from "./components/TextInput/TextInputTypes";
|
|
50
111
|
export { default as VideoPlayer } from "./components/VideoPlayer/VideoPlayer";
|
|
51
|
-
export {
|
|
112
|
+
export {
|
|
113
|
+
VideoPlayerAspectRatios,
|
|
114
|
+
VideoPlayerTypes,
|
|
115
|
+
} from "./components/VideoPlayer/VideoPlayerTypes";
|
|
116
|
+
export { default as DSProvider } from "./theme/provider";
|
|
@@ -22,6 +22,10 @@ $research-secondary: #006166;
|
|
|
22
22
|
$locations-primary: $brand-primary;
|
|
23
23
|
$locations-secondary: $brand-secondary;
|
|
24
24
|
|
|
25
|
+
// Blogs is used for Blog pages.
|
|
26
|
+
$blogs-primary: #e0e0e0;
|
|
27
|
+
$blogs-secondary: #bdbdbd;
|
|
28
|
+
|
|
25
29
|
// Research libraries with specific brand colors to adhere to.
|
|
26
30
|
$research-library-lpa: #005d53;
|
|
27
31
|
$research-library-schomburg: #a03e31;
|
|
@@ -44,15 +48,13 @@ $colors: (
|
|
|
44
48
|
research-secondary: $research-secondary,
|
|
45
49
|
locations-primary: $locations-primary,
|
|
46
50
|
locations-secondary: $locations-secondary,
|
|
51
|
+
blogs-primary: $blogs-primary,
|
|
52
|
+
blogs-secondary: $blogs-secondary,
|
|
47
53
|
research-library-lpa: $research-library-lpa,
|
|
48
54
|
research-library-schomburg: $research-library-schomburg,
|
|
49
55
|
research-library-schwartzman: $research-library-schwartzman,
|
|
50
56
|
);
|
|
51
57
|
|
|
52
|
-
/* CSS Color Classes*/
|
|
53
|
-
@include color-classes($colors_brand);
|
|
54
|
-
@include color-classes($colors);
|
|
55
|
-
|
|
56
58
|
/* CSS Variables/Custom Properties */
|
|
57
59
|
:root {
|
|
58
60
|
@include css-vars($colors_brand, "brand");
|
|
@@ -9,16 +9,17 @@ $white: #ffffff;
|
|
|
9
9
|
$gray-xdark: #424242;
|
|
10
10
|
$gray-dark: #616161;
|
|
11
11
|
$gray-medium: #bdbdbd;
|
|
12
|
-
$gray-light: #e0e0e0;
|
|
13
|
-
$gray-warm
|
|
14
|
-
$gray-
|
|
15
|
-
$gray-warm
|
|
16
|
-
$gray-
|
|
12
|
+
$gray-light-cool: #e0e0e0;
|
|
13
|
+
$gray-light-warm: #efedeb;
|
|
14
|
+
$gray-x-light-cool: #f5f5f5;
|
|
15
|
+
$gray-x-light-warm: #f8f8f7;
|
|
16
|
+
$gray-xx-light-cool: #fafafa;
|
|
17
17
|
|
|
18
18
|
// State and link utilities
|
|
19
19
|
$disabled-primary: #e0e0e0;
|
|
20
20
|
$disabled-secondary: #fafafa;
|
|
21
|
-
$error: #97272c;
|
|
21
|
+
$error-primary: #97272c;
|
|
22
|
+
$error-secondary: #6f0106;
|
|
22
23
|
$focus: #4181f1;
|
|
23
24
|
$link-primary: #0576d3;
|
|
24
25
|
$link-secondary: #004b98;
|
|
@@ -39,14 +40,15 @@ $colors: (
|
|
|
39
40
|
gray-xdark: $gray-xdark,
|
|
40
41
|
gray-dark: $gray-dark,
|
|
41
42
|
gray-medium: $gray-medium,
|
|
42
|
-
gray-light: $gray-light,
|
|
43
|
-
gray-warm
|
|
44
|
-
gray-
|
|
45
|
-
gray-warm
|
|
46
|
-
gray-
|
|
43
|
+
gray-light-cool: $gray-light-cool,
|
|
44
|
+
gray-light-warm: $gray-light-warm,
|
|
45
|
+
gray-x-light-cool: $gray-x-light-cool,
|
|
46
|
+
gray-x-light-warm: $gray-x-light-warm,
|
|
47
|
+
gray-xx-light-cool: $gray-xx-light-cool,
|
|
47
48
|
disabled-primary: $disabled-primary,
|
|
48
49
|
disabled-secondary: $disabled-secondary,
|
|
49
|
-
error: $error,
|
|
50
|
+
error-primary: $error-primary,
|
|
51
|
+
error-secondary: $error-secondary,
|
|
50
52
|
focus: $focus,
|
|
51
53
|
link-primary: $link-primary,
|
|
52
54
|
link-secondary: $link-secondary,
|
|
@@ -59,9 +61,6 @@ $colors: (
|
|
|
59
61
|
warning-secondary: $warning-secondary,
|
|
60
62
|
);
|
|
61
63
|
|
|
62
|
-
/* Color Classes*/
|
|
63
|
-
@include color-classes($colors);
|
|
64
|
-
|
|
65
64
|
/* CSS Variables/Custom Properties */
|
|
66
65
|
:root {
|
|
67
66
|
@include css-vars($colors, "ui");
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
/**
|
|
2
|
+
* $space-xxs: $space / 4; // 4px
|
|
3
|
+
* $space-xs: $space / 2; // 8px
|
|
4
|
+
* $space-s: $space * 1; // 16px
|
|
5
|
+
* $space-m: $space * 1.5; // 24px
|
|
6
|
+
* $space-l: $space * 2; // 32px
|
|
7
|
+
* $space-xl: $space * 3; // 48px
|
|
8
|
+
* $space-xxl: $space * 4; // 64px
|
|
9
|
+
*/
|
|
8
10
|
|
|
9
11
|
@mixin space-inline-none {
|
|
10
12
|
margin-right: 0;
|
|
@@ -37,3 +39,41 @@
|
|
|
37
39
|
@mixin space-inline-xxl {
|
|
38
40
|
margin-right: var(--space-xxl);
|
|
39
41
|
}
|
|
42
|
+
|
|
43
|
+
@mixin get-space-inline($id) {
|
|
44
|
+
@if $id == "none" {
|
|
45
|
+
@include space-inline-none;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@if $id == "xxs" {
|
|
49
|
+
@include space-inline-xxs;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@if $id == "xs" {
|
|
53
|
+
@include space-inline-xs;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@if $id == "s" {
|
|
57
|
+
@include space-inline-s;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@if $id == "m" {
|
|
61
|
+
@include space-inline-m;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@if $id == "l" {
|
|
65
|
+
@include space-inline-l;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@if $id == "xl" {
|
|
69
|
+
@include space-inline-xl;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@if $id == "xxl" {
|
|
73
|
+
@include space-inline-xxl;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@if $id == "xxxl" {
|
|
77
|
+
@include space-inline-xxxl;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* $space-xs: $space / 2; // 8px
|
|
3
|
+
* $space-s: $space * 1; // 16px
|
|
4
|
+
* $space-m: $space * 1.5; // 24px
|
|
5
|
+
* $space-l: $space * 2; // 32px
|
|
6
|
+
* $space-xl: $space * 3; // 48px
|
|
7
|
+
*/
|
|
6
8
|
|
|
7
9
|
@mixin space-inset-none {
|
|
8
10
|
padding: 0;
|
|
@@ -27,3 +29,29 @@
|
|
|
27
29
|
@mixin space-inset-xl {
|
|
28
30
|
padding: var(--space-xl);
|
|
29
31
|
}
|
|
32
|
+
|
|
33
|
+
@mixin get-space-inset($id) {
|
|
34
|
+
@if $id == "none" {
|
|
35
|
+
@include space-inset-none;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@if $id == "xs" {
|
|
39
|
+
@include space-inset-xs;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@if $id == "s" {
|
|
43
|
+
@include space-inset-s;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@if $id == "m" {
|
|
47
|
+
@include space-inset-m;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@if $id == "l" {
|
|
51
|
+
@include space-inset-l;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
@if $id == "xl" {
|
|
55
|
+
@include space-inset-xl;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
/**
|
|
2
|
+
* --space-xxs: calc(--space / 4); // 4px
|
|
3
|
+
* --space-xs: calc(--space / 2); // 8px
|
|
4
|
+
* --space-s: calc(--space * 1); // 16px
|
|
5
|
+
* --space-m: calc(--space * 1.5); // 24px
|
|
6
|
+
* --space-l: calc(--space * 2); // 32px
|
|
7
|
+
* --space-xl: calc(--space * 3); // 48px
|
|
8
|
+
* --space-xxl: calc(--space * 4); // 64px
|
|
9
|
+
* --space-xxxl: -calc(-space * 6); // 96px
|
|
10
|
+
*/
|
|
9
11
|
|
|
10
12
|
@mixin space-stack-none {
|
|
11
13
|
margin-bottom: 0;
|
|
@@ -74,3 +76,41 @@
|
|
|
74
76
|
}
|
|
75
77
|
}
|
|
76
78
|
}
|
|
79
|
+
|
|
80
|
+
@mixin get-space-stack($id) {
|
|
81
|
+
@if $id == "none" {
|
|
82
|
+
@include space-stack-none;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@if $id == "xxs" {
|
|
86
|
+
@include space-stack-xxs;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@if $id == "xs" {
|
|
90
|
+
@include space-stack-xs;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@if $id == "s" {
|
|
94
|
+
@include space-stack-s;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@if $id == "m" {
|
|
98
|
+
@include space-stack-m;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
@if $id == "l" {
|
|
102
|
+
@include space-stack-l;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@if $id == "xl" {
|
|
106
|
+
@include space-stack-xl;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@if $id == "xxl" {
|
|
110
|
+
@include space-stack-xxl;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@if $id == "xxxl" {
|
|
114
|
+
@include space-stack-xxxl;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
/////////////////////
|
|
8
7
|
// Global Breakpoints
|
|
9
8
|
|
|
10
9
|
// Avoid using in favor of atomic, content-specific, breakpoints.
|
|
11
|
-
// These should be used for generic code, like layouts and typography, only.
|
|
10
|
+
// These should be used for generic code, like layouts and typography, only.
|
|
11
|
+
// The CSS variables and the Sass variables below need to stay in sync.
|
|
12
12
|
// Sass' breakpoint() mixin doesn't work without Sass variables.
|
|
13
13
|
// CSS variables expose the breakpoint variables to consumers.
|
|
14
14
|
:root {
|
|
@@ -22,6 +22,7 @@ $breakpoint-small: 320px;
|
|
|
22
22
|
$breakpoint-medium: 600px;
|
|
23
23
|
$breakpoint-large: 960px;
|
|
24
24
|
$breakpoint-xl: 1280px;
|
|
25
|
-
// The max-width breakpoint is used when the design should be applied at
|
|
26
|
-
// largest breakpoint is regardless of actual pixel value
|
|
25
|
+
// The max-width breakpoint is used when the design should be applied at
|
|
26
|
+
// whatever the largest breakpoint is regardless of actual pixel value,
|
|
27
|
+
// e.g. removing outer margin on body wrapper.
|
|
27
28
|
$max-width: $breakpoint-xl;
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
font-weight: 300;
|
|
9
9
|
line-height: 1.5;
|
|
10
10
|
|
|
11
|
-
// Users with non-overlay scrollbars have a small
|
|
11
|
+
// Users with non-overlay scrollbars have a small horizontal scrollbar from
|
|
12
|
+
// our breakout mixin. Fix identified here: https://cloudfour.com/thinks/breaking-out-with-viewport-units-and-calc/#one-big-dumb-caveat
|
|
12
13
|
overflow-x: hidden;
|
|
13
14
|
|
|
14
15
|
*,
|
|
@@ -5,35 +5,7 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.nypl-ds {
|
|
8
|
-
p
|
|
9
|
-
.paragraph {
|
|
8
|
+
p {
|
|
10
9
|
@include paragraph;
|
|
11
10
|
}
|
|
12
11
|
}
|
|
13
|
-
|
|
14
|
-
.blockquote {
|
|
15
|
-
border-left: solid 3px var(--ui-gray-light);
|
|
16
|
-
font-style: italic;
|
|
17
|
-
margin-left: 1em;
|
|
18
|
-
padding-left: 1em;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.hr {
|
|
22
|
-
border-style: solid;
|
|
23
|
-
border-width: 1px 0 0;
|
|
24
|
-
color: currentColor;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.long-description {
|
|
28
|
-
@include screenreader-only();
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.text-long {
|
|
32
|
-
blockquote {
|
|
33
|
-
@extend .blockquote;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
hr {
|
|
37
|
-
@extend .hr;
|
|
38
|
-
}
|
|
39
|
-
}
|
package/src/styles.scss
CHANGED
|
@@ -6,22 +6,16 @@
|
|
|
6
6
|
// A cleaner way to do breakpoints/media queries, http://breakpoint-sass.com/
|
|
7
7
|
@import "~breakpoint-sass/stylesheets/breakpoint";
|
|
8
8
|
@import "~system-font-css/_system-font.scss";
|
|
9
|
+
|
|
10
|
+
// For the React DatePicker package.
|
|
11
|
+
@import "~react-datepicker/dist/react-datepicker.css";
|
|
9
12
|
// End libs
|
|
10
13
|
|
|
11
14
|
/*
|
|
12
|
-
* The `
|
|
15
|
+
* The `css-vars` mixins have been included here
|
|
13
16
|
* because they are utilized in the colors SCSS files.
|
|
14
17
|
*/
|
|
15
18
|
|
|
16
|
-
// generates a series of color classes that can be used anywhere
|
|
17
|
-
@mixin color-classes($map) {
|
|
18
|
-
@each $name, $color in $map {
|
|
19
|
-
.cl-#{$name} {
|
|
20
|
-
color: $color;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
19
|
// generates a collection of CSS vars
|
|
26
20
|
@mixin css-vars($map, $prefix) {
|
|
27
21
|
$prefix: str-insert($prefix, "-", str-length($prefix) + 1);
|
|
@@ -48,33 +42,36 @@
|
|
|
48
42
|
@import "./styles/base/_card-grid";
|
|
49
43
|
@import "./styles/base/_place-holder";
|
|
50
44
|
@import "./styles/base/_typography";
|
|
51
|
-
@import "./components/Icons/_Icons.scss";
|
|
52
45
|
@import "./components/Button/_Button.scss";
|
|
53
|
-
@import "./components/Link/_Link.scss";
|
|
54
|
-
@import "./components/Heading/_Heading.scss";
|
|
55
46
|
@import "./components/Input/_Input.scss";
|
|
56
|
-
@import "./components/TextInput/_TextInput.scss";
|
|
57
47
|
@import "./components/Autosuggest/_Autosuggest.scss";
|
|
58
48
|
|
|
49
|
+
fieldset {
|
|
50
|
+
.sr-only {
|
|
51
|
+
@include screenreader-only();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Copied over from Label.scss
|
|
56
|
+
.fieldset {
|
|
57
|
+
@include fieldset-reset;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.legend {
|
|
61
|
+
border: 0;
|
|
62
|
+
font-weight: 500;
|
|
63
|
+
}
|
|
64
|
+
|
|
59
65
|
// Order not important
|
|
60
|
-
@import "./components/Accordion/_Accordion.scss";
|
|
61
|
-
@import "./components/Breadcrumbs/_Breadcrumbs.scss";
|
|
62
66
|
@import "./components/Card/_Card.scss";
|
|
63
|
-
@import "./components/
|
|
67
|
+
@import "./components/CardEdition/_CardEdition.scss";
|
|
68
|
+
@import "./components/DatePicker/_DatePicker.scss";
|
|
64
69
|
@import "./components/HelperErrorText/_HelperErrorText.scss";
|
|
65
|
-
@import "./components/Hero/_Hero.scss";
|
|
66
70
|
@import "./components/HorizontalRule/_HorizontalRule.scss";
|
|
67
71
|
@import "./components/Image/_Image.scss";
|
|
68
|
-
@import "./components/Label/_Label.scss";
|
|
69
72
|
@import "./components/List/_List.scss";
|
|
70
73
|
@import "./components/Modal/_Modal.scss";
|
|
71
74
|
@import "./components/Notification/_Notification.scss";
|
|
72
75
|
@import "./components/Pagination/_Pagination.scss";
|
|
73
|
-
@import "./components/Radio/_Radio.scss";
|
|
74
|
-
@import "./components/Checkbox/_Checkbox.scss";
|
|
75
|
-
@import "./components/SearchBar/_SearchBar.scss";
|
|
76
|
-
@import "./components/Select/_Select.scss";
|
|
77
76
|
@import "./components/SkeletonLoader/_SkeletonLoader.scss";
|
|
78
|
-
@import "./components/StatusBadge/_StatusBadge.scss";
|
|
79
|
-
@import "./components/Template/_Template.scss";
|
|
80
77
|
@import "./components/VideoPlayer/_VideoPlayer.scss";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const containerStyles = {
|
|
2
|
+
borderLeftWidth: "1px",
|
|
3
|
+
borderRightWidth: "1px",
|
|
4
|
+
borderColor: "ui.gray.medium",
|
|
5
|
+
width: "100%",
|
|
6
|
+
};
|
|
7
|
+
const buttonStyles = {
|
|
8
|
+
border: "none",
|
|
9
|
+
fontWeight: 500,
|
|
10
|
+
_hover: {
|
|
11
|
+
bg: "ui.gray.light-cool",
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
const panelStyles = {
|
|
15
|
+
paddingTop: "xs",
|
|
16
|
+
paddingRight: "xxxl",
|
|
17
|
+
paddingLeft: "s",
|
|
18
|
+
paddingBottom: "xs",
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const Accordion = {
|
|
22
|
+
parts: ["container", "button", "panel"],
|
|
23
|
+
baseStyle: {
|
|
24
|
+
container: containerStyles,
|
|
25
|
+
button: buttonStyles,
|
|
26
|
+
panel: panelStyles,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export default Accordion;
|