@nypl/design-system-react-components 1.0.1 → 1.0.2
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 +1428 -3
- package/README.md +391 -3
- package/dist/__tests__/fileMock.d.ts +4 -0
- package/dist/__tests__/setup.d.ts +2 -0
- package/{lib/stories/0-Welcome.stories.d.ts → dist/__tests__/utils/utils.test.d.ts} +1 -1
- package/dist/components/Accordion/Accordion.d.ts +21 -0
- package/dist/components/Autosuggest/Autosuggest.stories.d.ts +4 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +18 -0
- package/dist/components/Button/Button.d.ts +25 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +22 -0
- package/dist/components/Card/Card.d.ts +49 -0
- package/dist/components/Checkbox/Checkbox.d.ts +47 -0
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +49 -0
- package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +29 -0
- package/dist/components/DatePicker/DatePicker.d.ts +81 -0
- package/dist/components/Fieldset/Fieldset.d.ts +22 -0
- package/dist/components/Form/Form.d.ts +29 -0
- package/dist/components/Grid/SimpleGrid.d.ts +17 -0
- package/dist/components/Heading/Heading.d.ts +27 -0
- package/dist/components/HelperErrorText/HelperErrorText.d.ts +29 -0
- package/dist/components/Hero/Hero.d.ts +40 -0
- package/dist/components/HorizontalRule/HorizontalRule.d.ts +11 -0
- package/dist/components/Icons/Icon.d.ts +37 -0
- package/dist/components/Icons/IconSvgs.d.ts +33 -0
- package/dist/components/Image/Image.d.ts +61 -0
- package/dist/components/Label/Label.d.ts +20 -0
- package/dist/components/Link/Link.d.ts +20 -0
- package/dist/components/List/List.d.ts +35 -0
- package/dist/components/Logo/Logo.d.ts +26 -0
- package/dist/components/Logo/LogoSvgs.d.ts +46 -0
- package/dist/components/Modal/Modal.d.ts +33 -0
- package/dist/components/Notification/Notification.d.ts +50 -0
- package/dist/components/Pagination/Pagination.d.ts +27 -0
- package/dist/components/Placeholder/Placeholder.d.ts +10 -0
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +30 -0
- package/dist/components/Radio/Radio.d.ts +43 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +51 -0
- package/dist/components/SearchBar/SearchBar.d.ts +61 -0
- package/dist/components/Select/Select.d.ts +57 -0
- package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +39 -0
- package/dist/components/SkipNavigation/SkipNavigation.d.ts +17 -0
- package/dist/components/Slider/Slider.d.ts +60 -0
- package/dist/components/StatusBadge/StatusBadge.d.ts +16 -0
- package/dist/components/StructuredContent/StructuredContent.d.ts +28 -0
- package/dist/components/StyleGuide/ColorCard.d.ts +12 -0
- package/dist/components/Table/Table.d.ts +29 -0
- package/dist/components/Tabs/Tabs.d.ts +26 -0
- package/dist/components/Template/Template.d.ts +126 -0
- package/dist/components/Text/Text.d.ts +16 -0
- package/dist/components/TextInput/TextInput.d.ts +78 -0
- package/dist/components/Toggle/Toggle.d.ts +42 -0
- package/dist/components/VideoPlayer/VideoPlayer.d.ts +38 -0
- package/dist/design-system-react-components.cjs.development.js +11305 -0
- package/dist/design-system-react-components.cjs.development.js.map +1 -0
- package/dist/design-system-react-components.cjs.production.min.js +2 -0
- package/dist/design-system-react-components.cjs.production.min.js.map +1 -0
- package/dist/design-system-react-components.esm.js +11150 -0
- package/dist/design-system-react-components.esm.js.map +1 -0
- package/dist/helpers/types.d.ts +1 -0
- package/dist/hooks/tests/useCarouselStyles.test.d.ts +1 -0
- package/dist/hooks/useCarouselStyles.d.ts +17 -0
- package/dist/hooks/useNYPLTheme.d.ts +66 -0
- package/dist/hooks/useWindowSize.d.ts +10 -0
- package/dist/index.d.ts +48 -0
- package/dist/index.js +8 -0
- package/dist/resources.scss +386 -0
- package/dist/styles.css +3 -0
- package/dist/theme/components/accordion.d.ts +20 -0
- package/dist/theme/components/breadcrumb.d.ts +105 -0
- package/dist/theme/components/button.d.ts +120 -0
- package/dist/theme/components/buttonGroup.d.ts +11 -0
- package/dist/theme/components/card.d.ts +381 -0
- package/dist/theme/components/checkbox.d.ts +95 -0
- package/dist/theme/components/checkboxGroup.d.ts +14 -0
- package/dist/theme/components/componentWrapper.d.ts +12 -0
- package/dist/theme/components/customTable.d.ts +136 -0
- package/dist/theme/components/datePicker.d.ts +16 -0
- package/dist/theme/components/fieldset.d.ts +20 -0
- package/dist/theme/components/global.d.ts +73 -0
- package/dist/theme/components/globalMixins.d.ts +23 -0
- package/dist/theme/components/heading.d.ts +160 -0
- package/dist/theme/components/helperErrorText.d.ts +12 -0
- package/dist/theme/components/hero.d.ts +499 -0
- package/dist/theme/components/horizontalRule.d.ts +15 -0
- package/dist/theme/components/icon.d.ts +47755 -0
- package/dist/theme/components/image.d.ts +590 -0
- package/dist/theme/components/label.d.ts +18 -0
- package/dist/theme/components/link.d.ts +62 -0
- package/dist/theme/components/list.d.ts +182 -0
- package/dist/theme/components/logo.d.ts +477 -0
- package/dist/theme/components/notification.d.ts +95 -0
- package/dist/theme/components/pagination.d.ts +16 -0
- package/dist/theme/components/progressIndicator.d.ts +52 -0
- package/dist/theme/components/radio.d.ts +99 -0
- package/dist/theme/components/radioGroup.d.ts +14 -0
- package/dist/theme/components/searchBar.d.ts +18 -0
- package/dist/theme/components/select.d.ts +87 -0
- package/dist/theme/components/skeletonLoader.d.ts +102 -0
- package/dist/theme/components/skipNavigation.d.ts +25 -0
- package/dist/theme/components/slider.d.ts +59 -0
- package/dist/theme/components/statusBadge.d.ts +25 -0
- package/dist/theme/components/structuredContent.d.ts +226 -0
- package/dist/theme/components/tabs.d.ts +136 -0
- package/dist/theme/components/template.d.ts +105 -0
- package/dist/theme/components/text.d.ts +26 -0
- package/dist/theme/components/textInput.d.ts +124 -0
- package/dist/theme/components/toggle.d.ts +92 -0
- package/dist/theme/components/videoPlayer.d.ts +40 -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 +58 -0
- package/dist/theme/foundations/radii.d.ts +6 -0
- package/dist/theme/foundations/shadows.d.ts +4 -0
- package/dist/theme/foundations/spacing.d.ts +82 -0
- package/dist/theme/foundations/typography.d.ts +8 -0
- package/dist/theme/index.d.ts +20 -0
- package/dist/theme/provider.d.ts +3 -0
- package/dist/theme/types.d.ts +1 -0
- package/dist/utils/componentCategories.d.ts +1 -0
- package/dist/utils/interfaces.d.ts +5 -0
- package/dist/utils/utils.d.ts +31 -0
- package/package.json +133 -20
- package/src/__tests__/fileMock.ts +6 -0
- package/src/__tests__/setup.ts +27 -0
- package/src/__tests__/utils/utils.test.ts +18 -0
- package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +42 -0
- package/src/components/Accordion/Accordion.stories.mdx +333 -0
- package/src/components/Accordion/Accordion.test.tsx +237 -0
- package/src/components/Accordion/Accordion.tsx +137 -0
- package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +734 -0
- package/src/components/Autosuggest/Autosuggest.stories.mdx +75 -0
- package/src/components/Autosuggest/Autosuggest.stories.tsx +211 -0
- package/src/components/Autosuggest/_Autosuggest.scss +51 -0
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +231 -0
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +144 -0
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +98 -0
- package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +695 -0
- package/src/components/Button/Button.stories.mdx +320 -0
- package/src/components/Button/Button.test.tsx +184 -0
- package/src/components/Button/Button.tsx +95 -0
- package/src/components/Button/__snapshots__/Button.test.tsx.snap +106 -0
- package/src/components/ButtonGroup/ButtonGroup.stories.mdx +178 -0
- package/src/components/ButtonGroup/ButtonGroup.test.tsx +141 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +100 -0
- package/src/components/ButtonGroup/__snapshots__/ButtonGroup.test.tsx.snap +117 -0
- package/src/components/Card/Card.stories.mdx +1041 -0
- package/src/components/Card/Card.test.tsx +388 -0
- package/src/components/Card/Card.tsx +346 -0
- package/src/components/Card/__snapshots__/Card.test.tsx.snap +568 -0
- package/src/components/Chakra/Box.stories.mdx +52 -0
- package/src/components/Chakra/Center.stories.mdx +96 -0
- package/src/components/Chakra/Flex.stories.mdx +111 -0
- package/src/components/Chakra/Grid.stories.mdx +89 -0
- package/src/components/Chakra/Stack.stories.mdx +109 -0
- package/src/components/Checkbox/Checkbox.stories.mdx +243 -0
- package/src/components/Checkbox/Checkbox.test.tsx +350 -0
- package/src/components/Checkbox/Checkbox.tsx +152 -0
- package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +661 -0
- package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +462 -0
- package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +492 -0
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +173 -0
- package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +1842 -0
- package/src/components/ComponentWrapper/ComponentWrapper.test.tsx +163 -0
- package/src/components/ComponentWrapper/ComponentWrapper.tsx +76 -0
- package/src/components/ComponentWrapper/__snapshots__/ComponentWrapper.test.tsx.snap +103 -0
- package/src/components/DatePicker/DatePicker.stories.mdx +452 -0
- package/src/components/DatePicker/DatePicker.test.tsx +940 -0
- package/src/components/DatePicker/DatePicker.tsx +450 -0
- package/src/components/DatePicker/_DatePicker.scss +100 -0
- package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +908 -0
- package/src/components/Fieldset/Fieldset.stories.mdx +96 -0
- package/src/components/Fieldset/Fieldset.test.tsx +155 -0
- package/src/components/Fieldset/Fieldset.tsx +55 -0
- package/src/components/Fieldset/__snapshots__/Fieldset.test.tsx.snap +89 -0
- package/src/components/Form/Form.stories.mdx +426 -0
- package/src/components/Form/Form.test.tsx +234 -0
- package/src/components/Form/Form.tsx +124 -0
- package/src/components/Form/__snapshots__/Form.test.tsx.snap +115 -0
- package/src/components/Grid/SimpleGrid.stories.mdx +336 -0
- package/src/components/Grid/SimpleGrid.test.tsx +79 -0
- package/src/components/Grid/SimpleGrid.tsx +49 -0
- package/src/components/Grid/__snapshots__/SimpleGrid.test.tsx.snap +23 -0
- package/src/components/Heading/Heading.stories.mdx +187 -0
- package/src/components/Heading/Heading.test.tsx +171 -0
- package/src/components/Heading/Heading.tsx +104 -0
- package/src/components/Heading/__snapshots__/Heading.test.tsx.snap +90 -0
- package/src/components/HelperErrorText/HelperErrorText.stories.mdx +172 -0
- package/src/components/HelperErrorText/HelperErrorText.test.tsx +114 -0
- package/src/components/HelperErrorText/HelperErrorText.tsx +62 -0
- package/src/components/HelperErrorText/__snapshots__/HelperErrorText.test.tsx.snap +93 -0
- package/src/components/Hero/Hero.stories.mdx +378 -0
- package/src/components/Hero/Hero.test.tsx +611 -0
- package/src/components/Hero/Hero.tsx +203 -0
- package/src/components/Hero/__snapshots__/Hero.test.tsx.snap +379 -0
- package/src/components/HorizontalRule/HorizontalRule.stories.mdx +73 -0
- package/src/components/HorizontalRule/HorizontalRule.test.tsx +54 -0
- package/src/components/HorizontalRule/HorizontalRule.tsx +27 -0
- package/src/components/HorizontalRule/__snapshots__/HorizontalRule.test.tsx.snap +44 -0
- package/src/components/Icons/Icon.stories.mdx +413 -0
- package/src/components/Icons/Icon.test.tsx +120 -0
- package/src/components/Icons/Icon.tsx +187 -0
- package/src/components/Icons/IconSvgs.tsx +64 -0
- package/src/components/Icons/__snapshots__/Icon.test.tsx.snap +129 -0
- package/src/components/Image/Image.stories.mdx +332 -0
- package/src/components/Image/Image.test.tsx +155 -0
- package/src/components/Image/Image.tsx +171 -0
- package/src/components/Image/__snapshots__/Image.test.tsx.snap +269 -0
- package/src/components/Label/Label.stories.mdx +100 -0
- package/src/components/Label/Label.test.tsx +116 -0
- package/src/components/Label/Label.tsx +55 -0
- package/src/components/Label/__snapshots__/Label.test.tsx.snap +45 -0
- package/src/components/Link/Link.stories.mdx +249 -0
- package/src/components/Link/Link.test.tsx +224 -0
- package/src/components/Link/Link.tsx +178 -0
- package/src/components/Link/__snapshots__/Link.test.tsx.snap +286 -0
- package/src/components/List/List.stories.mdx +393 -0
- package/src/components/List/List.test.tsx +265 -0
- package/src/components/List/List.tsx +156 -0
- package/src/components/List/__snapshots__/List.test.tsx.snap +213 -0
- package/src/components/Logo/Logo.stories.mdx +295 -0
- package/src/components/Logo/Logo.test.tsx +116 -0
- package/src/components/Logo/Logo.tsx +151 -0
- package/src/components/Logo/LogoSvgs.tsx +90 -0
- package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +142 -0
- package/src/components/Modal/Modal.stories.mdx +294 -0
- package/src/components/Modal/Modal.test.tsx +157 -0
- package/src/components/Modal/Modal.tsx +154 -0
- package/src/components/Modal/__snapshots__/Modal.test.tsx.snap +25 -0
- package/src/components/Notification/Notification.stories.mdx +358 -0
- package/src/components/Notification/Notification.test.tsx +279 -0
- package/src/components/Notification/Notification.tsx +224 -0
- package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +525 -0
- package/src/components/Pagination/Pagination.stories.mdx +184 -0
- package/src/components/Pagination/Pagination.test.tsx +419 -0
- package/src/components/Pagination/Pagination.tsx +269 -0
- package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +544 -0
- package/src/components/Placeholder/Placeholder.tsx +19 -0
- package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +360 -0
- package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +298 -0
- package/src/components/ProgressIndicator/ProgressIndicator.tsx +132 -0
- package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +434 -0
- package/src/components/Radio/Radio.stories.mdx +216 -0
- package/src/components/Radio/Radio.test.tsx +247 -0
- package/src/components/Radio/Radio.tsx +119 -0
- package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +451 -0
- package/src/components/RadioGroup/RadioGroup.stories.mdx +479 -0
- package/src/components/RadioGroup/RadioGroup.test.tsx +471 -0
- package/src/components/RadioGroup/RadioGroup.tsx +171 -0
- package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1550 -0
- package/src/components/SearchBar/SearchBar.stories.mdx +518 -0
- package/src/components/SearchBar/SearchBar.test.tsx +435 -0
- package/src/components/SearchBar/SearchBar.tsx +210 -0
- package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1049 -0
- package/src/components/Select/Select.stories.mdx +439 -0
- package/src/components/Select/Select.test.tsx +358 -0
- package/src/components/Select/Select.tsx +183 -0
- package/src/components/Select/__snapshots__/Select.test.tsx.snap +895 -0
- package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +142 -0
- package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +116 -0
- package/src/components/SkeletonLoader/SkeletonLoader.tsx +123 -0
- package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +898 -0
- package/src/components/SkipNavigation/SkipNavigation.stories.mdx +90 -0
- package/src/components/SkipNavigation/SkipNavigation.test.tsx +63 -0
- package/src/components/SkipNavigation/SkipNavigation.tsx +51 -0
- package/src/components/SkipNavigation/__snapshots__/SkipNavigation.test.tsx.snap +130 -0
- package/src/components/Slider/Slider.stories.mdx +628 -0
- package/src/components/Slider/Slider.test.tsx +736 -0
- package/src/components/Slider/Slider.tsx +322 -0
- package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +2186 -0
- package/src/components/StatusBadge/StatusBadge.stories.mdx +109 -0
- package/src/components/StatusBadge/StatusBadge.test.tsx +70 -0
- package/src/components/StatusBadge/StatusBadge.tsx +35 -0
- package/src/components/StatusBadge/__snapshots__/StatusBadge.test.tsx.snap +47 -0
- package/src/components/StructuredContent/StructuredContent.stories.mdx +567 -0
- package/src/components/StructuredContent/StructuredContent.test.tsx +435 -0
- package/src/components/StructuredContent/StructuredContent.tsx +139 -0
- package/src/components/StructuredContent/__snapshots__/StructuredContent.test.tsx.snap +368 -0
- package/src/components/StyleGuide/Bidirectionality.stories.mdx +206 -0
- package/src/components/StyleGuide/Breakpoints.stories.mdx +55 -0
- package/src/components/StyleGuide/Buttons.stories.mdx +194 -0
- package/src/components/StyleGuide/ColorCard.tsx +43 -0
- package/src/components/StyleGuide/Colors.stories.mdx +201 -0
- package/src/components/StyleGuide/DesignTokens.stories.mdx +193 -0
- package/src/components/StyleGuide/Forms.stories.mdx +94 -0
- package/src/components/StyleGuide/Iconography.stories.mdx +142 -0
- package/src/components/StyleGuide/Spacing.stories.mdx +116 -0
- package/src/components/StyleGuide/Typography.stories.mdx +419 -0
- package/src/components/Table/Table.stories.mdx +272 -0
- package/src/components/Table/Table.test.tsx +241 -0
- package/src/components/Table/Table.tsx +152 -0
- package/src/components/Table/__snapshots__/Table.test.tsx.snap +1703 -0
- package/src/components/Tabs/Tabs.stories.mdx +338 -0
- package/src/components/Tabs/Tabs.test.tsx +298 -0
- package/src/components/Tabs/Tabs.tsx +264 -0
- package/src/components/Tabs/__snapshots__/Tabs.test.tsx.snap +584 -0
- package/src/components/Template/Template.stories.mdx +695 -0
- package/src/components/Template/Template.test.tsx +309 -0
- package/src/components/Template/Template.tsx +326 -0
- package/src/components/Template/__snapshots__/Template.test.tsx.snap +342 -0
- package/src/components/Text/Text.stories.mdx +103 -0
- package/src/components/Text/Text.test.tsx +63 -0
- package/src/components/Text/Text.tsx +50 -0
- package/src/components/Text/__snapshots__/Text.test.tsx.snap +50 -0
- package/src/components/TextInput/TextInput.stories.mdx +268 -0
- package/src/components/TextInput/TextInput.test.tsx +451 -0
- package/src/components/TextInput/TextInput.tsx +240 -0
- package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +274 -0
- package/src/components/Toggle/Toggle.stories.mdx +237 -0
- package/src/components/Toggle/Toggle.test.tsx +170 -0
- package/src/components/Toggle/Toggle.tsx +128 -0
- package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +470 -0
- package/src/components/VideoPlayer/VideoPlayer.stories.mdx +212 -0
- package/src/components/VideoPlayer/VideoPlayer.test.tsx +308 -0
- package/src/components/VideoPlayer/VideoPlayer.tsx +188 -0
- package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +192 -0
- package/src/docs/Chakra.stories.mdx +563 -0
- package/src/docs/Welcome.stories.mdx +148 -0
- package/src/helpers/types.ts +1 -0
- package/src/hooks/tests/useCarouselStyles.test.ts +140 -0
- package/src/hooks/tests/useNYPLTheme.test.tsx +36 -0
- package/src/hooks/useCarouselStyles.stories.mdx +30 -0
- package/src/hooks/useCarouselStyles.ts +35 -0
- package/src/hooks/useNYPLTheme.stories.mdx +98 -0
- package/src/hooks/useNYPLTheme.ts +91 -0
- package/src/hooks/useWindowSize.stories.mdx +23 -0
- package/src/hooks/useWindowSize.ts +40 -0
- package/src/index.ts +136 -0
- package/src/resources.scss +6 -0
- package/src/styles/base/_01-breakpoints.scss +27 -0
- package/src/styles/base/_02-mixins.scss +103 -0
- package/src/styles/base/_place-holder.scss +33 -0
- package/src/styles/space/_space-inline.scss +79 -0
- package/src/styles/space/_space-inset.scss +57 -0
- package/src/styles/space/_space-stack.scss +116 -0
- package/src/styles.scss +23 -0
- package/src/theme/components/accordion.ts +25 -0
- package/src/theme/components/breadcrumb.ts +94 -0
- package/src/theme/components/button.ts +133 -0
- package/src/theme/components/buttonGroup.ts +10 -0
- package/src/theme/components/card.ts +237 -0
- package/src/theme/components/checkbox.ts +110 -0
- package/src/theme/components/checkboxGroup.ts +10 -0
- package/src/theme/components/componentWrapper.ts +14 -0
- package/src/theme/components/customTable.ts +77 -0
- package/src/theme/components/datePicker.ts +17 -0
- package/src/theme/components/fieldset.ts +23 -0
- package/src/theme/components/global.ts +91 -0
- package/src/theme/components/globalMixins.ts +24 -0
- package/src/theme/components/heading.ts +79 -0
- package/src/theme/components/helperErrorText.ts +14 -0
- package/src/theme/components/hero.ts +238 -0
- package/src/theme/components/horizontalRule.ts +17 -0
- package/src/theme/components/icon.ts +88 -0
- package/src/theme/components/image.ts +136 -0
- package/src/theme/components/label.ts +15 -0
- package/src/theme/components/link.ts +63 -0
- package/src/theme/components/list.ts +88 -0
- package/src/theme/components/logo.ts +58 -0
- package/src/theme/components/notification.ts +132 -0
- package/src/theme/components/pagination.ts +17 -0
- package/src/theme/components/progressIndicator.ts +67 -0
- package/src/theme/components/radio.ts +103 -0
- package/src/theme/components/radioGroup.ts +10 -0
- package/src/theme/components/searchBar.ts +19 -0
- package/src/theme/components/select.ts +72 -0
- package/src/theme/components/skeletonLoader.ts +113 -0
- package/src/theme/components/skipNavigation.ts +29 -0
- package/src/theme/components/slider.ts +95 -0
- package/src/theme/components/statusBadge.ts +26 -0
- package/src/theme/components/structuredContent.ts +149 -0
- package/src/theme/components/tabs.ts +109 -0
- package/src/theme/components/template.ts +114 -0
- package/src/theme/components/text.ts +38 -0
- package/src/theme/components/textInput.ts +65 -0
- package/src/theme/components/toggle.ts +109 -0
- package/src/theme/components/videoPlayer.ts +47 -0
- package/src/theme/foundations/breakpoints.ts +24 -0
- package/src/theme/foundations/colors.ts +212 -0
- package/src/theme/foundations/global.ts +43 -0
- package/src/theme/foundations/radii.ts +7 -0
- package/src/theme/foundations/shadows.ts +5 -0
- package/src/theme/foundations/spacing.ts +136 -0
- package/src/theme/foundations/typography.ts +107 -0
- package/src/theme/index.ts +131 -0
- package/src/theme/provider.tsx +9 -0
- package/src/theme/types.ts +1 -0
- package/src/utils/componentCategories.ts +152 -0
- package/src/utils/interfaces.ts +5 -0
- package/src/utils/utils.ts +84 -0
- package/lib/components/Button/Button.d.ts +0 -17
- package/lib/components/Button/Button.js +0 -42
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -6
- package/lib/stories/0-Welcome.stories.js +0 -19
- package/lib/stories/1-Button.stories.d.ts +0 -6
- package/lib/stories/1-Button.stories.js +0 -20
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare type LayoutTypes = "column" | "row";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook that controls the sliding function for the carousel wrapper.
|
|
3
|
+
* This returns functions to use for the "previous" and "next" buttons as well
|
|
4
|
+
* as a CSS style object that should be use to transition between slides. There
|
|
5
|
+
* is also a function to programmatically slide to the first slide.
|
|
6
|
+
* Inspired by: https://codesandbox.io/s/fxjeo
|
|
7
|
+
*/
|
|
8
|
+
export declare const useCarouselStyles: (slidesCount?: number, slideWidth?: number) => {
|
|
9
|
+
prevSlide: () => void;
|
|
10
|
+
nextSlide: () => void;
|
|
11
|
+
carouselStyle: {
|
|
12
|
+
transition: string;
|
|
13
|
+
marginLeft: string;
|
|
14
|
+
};
|
|
15
|
+
goToStart: () => void;
|
|
16
|
+
};
|
|
17
|
+
export default useCarouselStyles;
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A custom hook that returns the Chakra-based NYPL theme object. This must be
|
|
3
|
+
* used inside a component that is wrapped in the `DSProvider` component, so
|
|
4
|
+
* that the theme object can be available to use.
|
|
5
|
+
*/
|
|
6
|
+
declare function useNYPLTheme(): {
|
|
7
|
+
breakpoints?: undefined;
|
|
8
|
+
colors?: undefined;
|
|
9
|
+
fontSizes?: undefined;
|
|
10
|
+
fontWeights?: undefined;
|
|
11
|
+
fonts?: undefined;
|
|
12
|
+
radii?: undefined;
|
|
13
|
+
space?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
breakpoints: any;
|
|
16
|
+
colors: {
|
|
17
|
+
brand: any;
|
|
18
|
+
section: any;
|
|
19
|
+
transparent: any;
|
|
20
|
+
ui: any;
|
|
21
|
+
};
|
|
22
|
+
fontSizes: {
|
|
23
|
+
"-3": any;
|
|
24
|
+
"-2": any;
|
|
25
|
+
"-1": any;
|
|
26
|
+
0: any;
|
|
27
|
+
1: any;
|
|
28
|
+
2: any;
|
|
29
|
+
3: any;
|
|
30
|
+
4: any;
|
|
31
|
+
breadcrumbs: any;
|
|
32
|
+
button: any;
|
|
33
|
+
heading: any;
|
|
34
|
+
helper: any;
|
|
35
|
+
label: any;
|
|
36
|
+
text: any;
|
|
37
|
+
};
|
|
38
|
+
fontWeights: {
|
|
39
|
+
light: any;
|
|
40
|
+
regular: any;
|
|
41
|
+
medium: any;
|
|
42
|
+
bold: any;
|
|
43
|
+
breadcrumbs: any;
|
|
44
|
+
button: any;
|
|
45
|
+
heading: any;
|
|
46
|
+
helper: any;
|
|
47
|
+
label: any;
|
|
48
|
+
text: any;
|
|
49
|
+
};
|
|
50
|
+
fonts: {
|
|
51
|
+
body: any;
|
|
52
|
+
heading: any;
|
|
53
|
+
};
|
|
54
|
+
radii: any;
|
|
55
|
+
space: {
|
|
56
|
+
xxs: any;
|
|
57
|
+
xs: any;
|
|
58
|
+
s: any;
|
|
59
|
+
m: any;
|
|
60
|
+
l: any;
|
|
61
|
+
xl: any;
|
|
62
|
+
xxl: any;
|
|
63
|
+
xxxl: any;
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
export default useNYPLTheme;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface WindowSize {
|
|
2
|
+
width: number;
|
|
3
|
+
height: number;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* React hook used to get the window size on device resizing.
|
|
7
|
+
* Based on https://usehooks-typescript.com/react-hook/use-window-size
|
|
8
|
+
*/
|
|
9
|
+
declare function useWindowSize(): WindowSize;
|
|
10
|
+
export default useWindowSize;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import "./styles.scss";
|
|
2
|
+
export { Box, Center, Circle, Flex, Grid, GridItem, HStack, Spacer, Square, Stack, VStack, } from "@chakra-ui/react";
|
|
3
|
+
export { default as Accordion, AccordionTypes, } from "./components/Accordion/Accordion";
|
|
4
|
+
export { default as Breadcrumbs, BreadcrumbsTypes, } from "./components/Breadcrumbs/Breadcrumbs";
|
|
5
|
+
export { default as Button, ButtonTypes } from "./components/Button/Button";
|
|
6
|
+
export { default as ButtonGroup } from "./components/ButtonGroup/ButtonGroup";
|
|
7
|
+
export { default as Card, CardActions, CardContent, CardHeading, } from "./components/Card/Card";
|
|
8
|
+
export { default as Checkbox } from "./components/Checkbox/Checkbox";
|
|
9
|
+
export { default as CheckboxGroup } from "./components/CheckboxGroup/CheckboxGroup";
|
|
10
|
+
export { default as DatePicker, DatePickerTypes, FullDateType, } from "./components/DatePicker/DatePicker";
|
|
11
|
+
export { default as DSProvider } from "./theme/provider";
|
|
12
|
+
export { default as Fieldset } from "./components/Fieldset/Fieldset";
|
|
13
|
+
export { default as Form, FormField, FormRow } from "./components/Form/Form";
|
|
14
|
+
export { default as Heading, HeadingSizes, HeadingLevels, } from "./components/Heading/Heading";
|
|
15
|
+
export { default as HelperErrorText } from "./components/HelperErrorText/HelperErrorText";
|
|
16
|
+
export { default as Hero, HeroTypes } from "./components/Hero/Hero";
|
|
17
|
+
export { default as HorizontalRule } from "./components/HorizontalRule/HorizontalRule";
|
|
18
|
+
export { default as Icon, IconAlign, IconColors, IconNames, IconRotationTypes, IconSizes, IconTypes, } from "./components/Icons/Icon";
|
|
19
|
+
export { default as Image, ImageRatios, ImageSizes, ImageTypes, } from "./components/Image/Image";
|
|
20
|
+
export { default as Label } from "./components/Label/Label";
|
|
21
|
+
export { LayoutTypes } from "./helpers/types";
|
|
22
|
+
export { default as Link, LinkTypes } from "./components/Link/Link";
|
|
23
|
+
export { default as List, ListTypes } from "./components/List/List";
|
|
24
|
+
export { default as Logo, LogoNames, LogoSizes } from "./components/Logo/Logo";
|
|
25
|
+
export { ModalTrigger, useModal } from "./components/Modal/Modal";
|
|
26
|
+
export { default as Notification, NotificationTypes, } from "./components/Notification/Notification";
|
|
27
|
+
export { default as Pagination } from "./components/Pagination/Pagination";
|
|
28
|
+
export { default as ProgressIndicator, ProgressIndicatorSizes, ProgressIndicatorTypes, } from "./components/ProgressIndicator/ProgressIndicator";
|
|
29
|
+
export { default as Radio } from "./components/Radio/Radio";
|
|
30
|
+
export { default as RadioGroup } from "./components/RadioGroup/RadioGroup";
|
|
31
|
+
export { default as SearchBar } from "./components/SearchBar/SearchBar";
|
|
32
|
+
export { default as Select, LabelPositions } from "./components/Select/Select";
|
|
33
|
+
export { default as SimpleGrid, GridGaps } from "./components/Grid/SimpleGrid";
|
|
34
|
+
export { default as SkeletonLoader, SkeletonLoaderImageRatios, } from "./components/SkeletonLoader/SkeletonLoader";
|
|
35
|
+
export { default as SkipNavigation } from "./components/SkipNavigation/SkipNavigation";
|
|
36
|
+
export { default as Slider } from "./components/Slider/Slider";
|
|
37
|
+
export { default as StatusBadge, StatusBadgeTypes, } from "./components/StatusBadge/StatusBadge";
|
|
38
|
+
export { default as StructuredContent, StructuredContentImagePosition, } from "./components/StructuredContent/StructuredContent";
|
|
39
|
+
export { default as Tabs, TabList, Tab, TabPanels, TabPanel, } from "./components/Tabs/Tabs";
|
|
40
|
+
export { TemplateAppContainer, Template, TemplateAboveHeader, TemplateHeader, TemplateBreakout, TemplateContent, TemplateContentTop, TemplateContentPrimary, TemplateContentSidebar, TemplateFooter, } from "./components/Template/Template";
|
|
41
|
+
export { default as Text, TextSizes } from "./components/Text/Text";
|
|
42
|
+
export { default as TextInput, TextInputRefType, TextInputTypes, } from "./components/TextInput/TextInput";
|
|
43
|
+
export { default as Toggle, ToggleSizes } from "./components/Toggle/Toggle";
|
|
44
|
+
export { default as useCarouselStyles } from "./hooks/useCarouselStyles";
|
|
45
|
+
export { default as useNYPLTheme } from "./hooks/useNYPLTheme";
|
|
46
|
+
export { default as useWindowSize } from "./hooks/useWindowSize";
|
|
47
|
+
export { default as VideoPlayer, VideoPlayerAspectRatios, VideoPlayerTypes, } from "./components/VideoPlayer/VideoPlayer";
|
|
48
|
+
export { default as Table } from "./components/Table/Table";
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Breakpoint Configuration
|
|
3
|
+
* @see https://github.com/Team-Sass/breakpoint/wiki
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// Global Breakpoints
|
|
7
|
+
|
|
8
|
+
// Avoid using in favor of atomic, content-specific, breakpoints.
|
|
9
|
+
// These should be used for generic code, like layouts and typography, only.
|
|
10
|
+
// The CSS variables and the Sass variables below need to stay in sync.
|
|
11
|
+
// Sass' breakpoint() mixin doesn't work without Sass variables.
|
|
12
|
+
// CSS variables expose the breakpoint variables to consumers.
|
|
13
|
+
:root {
|
|
14
|
+
--nypl-breakpoint-small: 320px;
|
|
15
|
+
--nypl-breakpoint-medium: 600px;
|
|
16
|
+
--nypl-breakpoint-large: 960px;
|
|
17
|
+
--nypl-breakpoint-xl: 1280px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
$nypl-breakpoint-small: 320px;
|
|
21
|
+
$nypl-breakpoint-medium: 600px;
|
|
22
|
+
$nypl-breakpoint-large: 960px;
|
|
23
|
+
$nypl-breakpoint-xl: 1280px;
|
|
24
|
+
// The max-width breakpoint is used when the design should be applied at
|
|
25
|
+
// whatever the largest breakpoint is regardless of actual pixel value,
|
|
26
|
+
// e.g. removing outer margin on body wrapper.
|
|
27
|
+
$nypl-max-width: $nypl-breakpoint-xl;
|
|
28
|
+
|
|
29
|
+
/////////////////////
|
|
30
|
+
// General Mixins (put specific ones in component files where applicable)
|
|
31
|
+
|
|
32
|
+
/// Mixin - Clearfix.
|
|
33
|
+
/// Adds clearfix based on http://bourbon.io/docs/#clearfix
|
|
34
|
+
/// use example = @include clearfix
|
|
35
|
+
|
|
36
|
+
@mixin clearfix {
|
|
37
|
+
&::after {
|
|
38
|
+
clear: both;
|
|
39
|
+
content: "";
|
|
40
|
+
display: table;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@mixin list-reset {
|
|
45
|
+
list-style: none;
|
|
46
|
+
margin: 0;
|
|
47
|
+
padding: 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@mixin fieldset-reset {
|
|
51
|
+
border: none;
|
|
52
|
+
margin: 0;
|
|
53
|
+
padding: 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/// Mixin - Wrapper
|
|
57
|
+
/// Outer container mixin for large screens
|
|
58
|
+
@mixin wrapper(
|
|
59
|
+
$container-max-width: $max-width,
|
|
60
|
+
$outer-container-break: $nypl-breakpoint-small,
|
|
61
|
+
$v-margin: 0,
|
|
62
|
+
$v-padding: 0,
|
|
63
|
+
$h-padding: var(--nypl-space-s)
|
|
64
|
+
) {
|
|
65
|
+
margin: #{$v-margin} auto;
|
|
66
|
+
max-width: #{$container-max-width};
|
|
67
|
+
padding: #{$v-padding} #{$h-padding};
|
|
68
|
+
width: 100%;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.container {
|
|
72
|
+
padding: var(--nypl-space-s);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/// Use the breakout mixin for elements that should be edge-to-edge
|
|
76
|
+
/// Even when a parent container uses the wrapper mixin
|
|
77
|
+
@mixin breakout($v-padding: var(--nypl-space-s)) {
|
|
78
|
+
margin-left: calc(-50vw + 50%);
|
|
79
|
+
margin-right: calc(-50vw + 50%);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Use the screenreader-only mixin for elements that you want to be visually hidden, but still want screenreaders to read out
|
|
83
|
+
@mixin screenreader-only() {
|
|
84
|
+
clip: rect(1px, 1px, 1px, 1px);
|
|
85
|
+
height: 1px;
|
|
86
|
+
overflow: hidden;
|
|
87
|
+
position: absolute !important;
|
|
88
|
+
width: 1px;
|
|
89
|
+
word-wrap: normal;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Focus state mixin
|
|
93
|
+
@mixin focus-outline($darkBackground: false) {
|
|
94
|
+
outline: 2px solid var(--nypl-colors-ui-focus);
|
|
95
|
+
outline-offset: 2px;
|
|
96
|
+
z-index: 9999;
|
|
97
|
+
|
|
98
|
+
@if $darkBackground {
|
|
99
|
+
outline-color: var(--nypl-colors-ui-white);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
//Convert pixel values to rem
|
|
104
|
+
@function to-rem($size) {
|
|
105
|
+
@return $size / 16px * 1rem;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
//Process a color variable so that it can be used in a data URI/URL
|
|
109
|
+
@function url-friendly-colour($colour) {
|
|
110
|
+
@return "%23" + str-slice("#{$colour}", 2, -1);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@mixin placeholder {
|
|
114
|
+
&::-webkit-input-placeholder {
|
|
115
|
+
@content;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&::-moz-placeholder {
|
|
119
|
+
@content;
|
|
120
|
+
|
|
121
|
+
opacity: 1;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:-moz-placeholder {
|
|
125
|
+
@content;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&:-ms-input-placeholder {
|
|
129
|
+
@content;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* --nypl-space-xxs: --nypl-space-s / 4 // 4px or 0.25rem
|
|
135
|
+
* --nypl-space-xs: --nypl-space-s / 2 // 8px or 0.5rem
|
|
136
|
+
* --nypl-space-s: --nypl-space-s * 1; // 16px or 1rem
|
|
137
|
+
* --nypl-space-m: --nypl-space * 1.5; // 24px or 1.5rem
|
|
138
|
+
* --nypl-space-l: --nypl-space * 2; // 32px or 2rem
|
|
139
|
+
* --nypl-space-xl: --nypl-space * 3; // 48px or 3rem
|
|
140
|
+
* --nypl-space-xxl: --nypl-space * 4; // 64px or 4rem
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
@mixin space-inline-none {
|
|
144
|
+
margin-right: 0;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@mixin space-inline-xxs {
|
|
148
|
+
margin-right: var(--nypl-space-xxs);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@mixin space-inline-xs {
|
|
152
|
+
margin-right: var(--nypl-space-xs);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
@mixin space-inline-s {
|
|
156
|
+
margin-right: var(--nypl-space-s);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
@mixin space-inline-m {
|
|
160
|
+
margin-right: var(--nypl-space-m);
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@mixin space-inline-l {
|
|
164
|
+
margin-right: var(--nypl-space-l);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
@mixin space-inline-xl {
|
|
168
|
+
margin-right: var(--nypl-space-xl);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
@mixin space-inline-xxl {
|
|
172
|
+
margin-right: var(--nypl-space-xxl);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
@mixin get-space-inline($id) {
|
|
176
|
+
@if $id == "none" {
|
|
177
|
+
@include space-inline-none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
@if $id == "xxs" {
|
|
181
|
+
@include space-inline-xxs;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@if $id == "xs" {
|
|
185
|
+
@include space-inline-xs;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@if $id == "s" {
|
|
189
|
+
@include space-inline-s;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
@if $id == "m" {
|
|
193
|
+
@include space-inline-m;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@if $id == "l" {
|
|
197
|
+
@include space-inline-l;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
@if $id == "xl" {
|
|
201
|
+
@include space-inline-xl;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
@if $id == "xxl" {
|
|
205
|
+
@include space-inline-xxl;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@if $id == "xxxl" {
|
|
209
|
+
@include space-inline-xxxl;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* --nypl-space-xs: --nypl-space-s / 2 // 8px or 0.5rem
|
|
215
|
+
* --nypl-space-s: --nypl-space-s * 1; // 16px or 1rem
|
|
216
|
+
* --nypl-space-m: --nypl-space * 1.5; // 24px or 1.5rem
|
|
217
|
+
* --nypl-space-l: --nypl-space * 2; // 32px or 2rem
|
|
218
|
+
* --nypl-space-xl: --nypl-space * 3; // 48px or 3rem
|
|
219
|
+
*/
|
|
220
|
+
|
|
221
|
+
@mixin space-inset-none {
|
|
222
|
+
padding: 0;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@mixin space-inset-xs {
|
|
226
|
+
padding: var(--nypl-space-xs);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
@mixin space-inset-s {
|
|
230
|
+
padding: var(--nypl-space-s);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
@mixin space-inset-m {
|
|
234
|
+
padding: var(--nypl-space-m);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
@mixin space-inset-l {
|
|
238
|
+
padding: var(--nypl-space-l);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@mixin space-inset-xl {
|
|
242
|
+
padding: var(--nypl-space-xl);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@mixin get-space-inset($id) {
|
|
246
|
+
@if $id == "none" {
|
|
247
|
+
@include space-inset-none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
@if $id == "xs" {
|
|
251
|
+
@include space-inset-xs;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
@if $id == "s" {
|
|
255
|
+
@include space-inset-s;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
@if $id == "m" {
|
|
259
|
+
@include space-inset-m;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@if $id == "l" {
|
|
263
|
+
@include space-inset-l;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
@if $id == "xl" {
|
|
267
|
+
@include space-inset-xl;
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
/**
|
|
272
|
+
* --nypl-space-xxs: --nypl-space-s / 4 // 4px or 0.25rem
|
|
273
|
+
* --nypl-space-xs: --nypl-space-s / 2 // 8px or 0.5rem
|
|
274
|
+
* --nypl-space-s: --nypl-space-s * 1; // 16px or 1rem
|
|
275
|
+
* --nypl-space-m: --nypl-space-s * 1.5; // 24px or 1.5rem
|
|
276
|
+
* --nypl-space-l: --nypl-space-s * 2; // 32px or 2rem
|
|
277
|
+
* --nypl-space-xl: --nypl-space-s * 3; // 48px or 3rem
|
|
278
|
+
* --nypl-space-xxl: --nypl-space-s * 4; // 64px or 4rem
|
|
279
|
+
* --nypl-space-xxxl: --nypl-space-s * 6; // 96px or 6rem
|
|
280
|
+
*/
|
|
281
|
+
|
|
282
|
+
@mixin space-stack-none {
|
|
283
|
+
margin-bottom: 0;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
@mixin space-stack-xxs {
|
|
287
|
+
margin-bottom: var(--nypl-space-xxs);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
@mixin space-stack-xs {
|
|
291
|
+
margin-bottom: var(--nypl-space-xs);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
@mixin space-stack-s {
|
|
295
|
+
margin-bottom: var(--nypl-space-s);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
@mixin space-stack-m {
|
|
299
|
+
margin-bottom: var(--nypl-space-m);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
@mixin space-stack-l {
|
|
303
|
+
margin-bottom: var(--nypl-space-l);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
@mixin space-stack-xl {
|
|
307
|
+
margin-bottom: var(--nypl-space-xl);
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
@mixin space-stack-xxl {
|
|
311
|
+
margin-bottom: var(--nypl-space-xxl);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
@mixin space-stack-xxxl {
|
|
315
|
+
margin-bottom: var(--nypl-space-xxxl);
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@mixin space-stack-page {
|
|
319
|
+
@include space-stack-l;
|
|
320
|
+
|
|
321
|
+
@include breakpoint($nypl-breakpoint-large) {
|
|
322
|
+
@include space-stack-xl;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
&--full {
|
|
326
|
+
@include space-stack-xxl;
|
|
327
|
+
|
|
328
|
+
@include breakpoint($nypl-breakpoint-large) {
|
|
329
|
+
@include space-stack-xxxl;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
@mixin remove-stack-page {
|
|
335
|
+
margin-top: calc(-1 * 32px);
|
|
336
|
+
|
|
337
|
+
@include breakpoint($nypl-breakpoint-large) {
|
|
338
|
+
margin-top: calc(-1 * 48px);
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
&--full {
|
|
342
|
+
margin-top: calc(-1 * 64px);
|
|
343
|
+
|
|
344
|
+
@include breakpoint($nypl-breakpoint-large) {
|
|
345
|
+
margin-top: calc(-1 * 96px);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
@mixin get-space-stack($id) {
|
|
351
|
+
@if $id == "none" {
|
|
352
|
+
@include space-stack-none;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
@if $id == "xxs" {
|
|
356
|
+
@include space-stack-xxs;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
@if $id == "xs" {
|
|
360
|
+
@include space-stack-xs;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
@if $id == "s" {
|
|
364
|
+
@include space-stack-s;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
@if $id == "m" {
|
|
368
|
+
@include space-stack-m;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
@if $id == "l" {
|
|
372
|
+
@include space-stack-l;
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
@if $id == "xl" {
|
|
376
|
+
@include space-stack-xl;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
@if $id == "xxl" {
|
|
380
|
+
@include space-stack-xxl;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
@if $id == "xxxl" {
|
|
384
|
+
@include space-stack-xxxl;
|
|
385
|
+
}
|
|
386
|
+
}
|
package/dist/styles.css
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */@import "~react-datepicker/dist/react-datepicker.css";html{-webkit-text-size-adjust:100%;line-height:1.15}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}
|
|
2
|
+
|
|
3
|
+
/*! system-font.css v2.0.2 | CC0-1.0 License | github.com/jonathantneal/system-font-css */@font-face{font-family:system-ui;font-style:normal;font-weight:300;src:local(".SFNSText-Light"),local(".HelveticaNeueDeskInterface-Light"),local(".LucidaGrandeUI"),local("Segoe UI Light"),local("Ubuntu Light"),local("Roboto-Light"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:italic;font-weight:300;src:local(".SFNSText-LightItalic"),local(".HelveticaNeueDeskInterface-Italic"),local(".LucidaGrandeUI"),local("Segoe UI Light Italic"),local("Ubuntu Light Italic"),local("Roboto-LightItalic"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:normal;font-weight:400;src:local(".SFNSText-Regular"),local(".HelveticaNeueDeskInterface-Regular"),local(".LucidaGrandeUI"),local("Segoe UI"),local("Ubuntu"),local("Roboto-Regular"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:italic;font-weight:400;src:local(".SFNSText-Italic"),local(".HelveticaNeueDeskInterface-Italic"),local(".LucidaGrandeUI"),local("Segoe UI Italic"),local("Ubuntu Italic"),local("Roboto-Italic"),local("DroidSans"),local("Tahoma")}@font-face{font-family:system-ui;font-style:normal;font-weight:500;src:local(".SFNSText-Medium"),local(".HelveticaNeueDeskInterface-MediumP4"),local(".LucidaGrandeUI"),local("Segoe UI Semibold"),local("Ubuntu Medium"),local("Roboto-Medium"),local("DroidSans-Bold"),local("Tahoma Bold")}@font-face{font-family:system-ui;font-style:italic;font-weight:500;src:local(".SFNSText-MediumItalic"),local(".HelveticaNeueDeskInterface-MediumItalicP4"),local(".LucidaGrandeUI"),local("Segoe UI Semibold Italic"),local("Ubuntu Medium Italic"),local("Roboto-MediumItalic"),local("DroidSans-Bold"),local("Tahoma Bold")}@font-face{font-family:system-ui;font-style:normal;font-weight:700;src:local(".SFNSText-Bold"),local(".HelveticaNeueDeskInterface-Bold"),local(".LucidaGrandeUI"),local("Segoe UI Bold"),local("Ubuntu Bold"),local("Roboto-Bold"),local("DroidSans-Bold"),local("Tahoma Bold")}@font-face{font-family:system-ui;font-style:italic;font-weight:700;src:local(".SFNSText-BoldItalic"),local(".HelveticaNeueDeskInterface-BoldItalic"),local(".LucidaGrandeUI"),local("Segoe UI Bold Italic"),local("Ubuntu Bold Italic"),local("Roboto-BoldItalic"),local("DroidSans-Bold"),local("Tahoma Bold")}:root{--nypl-breakpoint-small:320px;--nypl-breakpoint-medium:600px;--nypl-breakpoint-large:960px;--nypl-breakpoint-xl:1280px}.container{padding:var(--nypl-space-s)}.placeholder{--color-place-holder:var(--nypl-colors-ui-gray-dark);align-items:center;border:4px dashed var(--color-place-holder);color:var(--color-place-holder);display:flex;font-size:3rem;justify-content:center;line-height:1.4;margin-bottom:var(--nypl-space-l);padding:4rem 1rem;width:100%}@media (min-width:960px){.placeholder{margin-bottom:var(--nypl-space-l)}}.placeholder--full{margin-bottom:var(--nypl-space-xxl)}@media (min-width:960px){.placeholder--full{margin-bottom:var(--nypl-space-xxxl)}}.placeholder--short{padding:1rem}.react-autosuggest__container{display:inline;position:relative;width:100%}.react-autosuggest__input--focused{outline:none}.react-autosuggest__input--open{border-bottom-left-radius:0;border-bottom-right-radius:0;width:100%}.react-autosuggest__suggestions-container{display:none;width:100%}.react-autosuggest__suggestions-container--open{background-color:var(--nypl-colors-ui-white);display:block;font-weight:300;margin-top:1px;outline:1px solid var(--nypl-colors-ui-gray-light-cool);position:relative;width:100%;z-index:2}.react-autosuggest__suggestions-list{list-style-type:none;margin:0;padding:0}.react-autosuggest__suggestion{cursor:pointer;padding:var(--nypl-space-xs)}.react-autosuggest__suggestion--highlighted{background-color:var(--nypl-colors-ui-gray-light-cool)}.auto-suggest-bottom{padding:var(--nypl-space-xs)}.date-picker-calendar{font-family:var(--nypl-fonts-body)}.date-picker-calendar .react-datepicker{border-color:var(--nypl-colors-ui-gray-medium)}.date-picker-calendar .react-datepicker__triangle{transform:translate(32px)!important}.date-picker-calendar .react-datepicker__triangle:before{border-bottom-color:var(--nypl-colors-ui-gray-medium)!important}.date-picker-calendar .react-datepicker__triangle:after{border-bottom-color:var(--nypl-colors-ui-gray-x-light-cool)!important}.date-picker-calendar .react-datepicker__navigation-icon{top:5px;width:0}.date-picker-calendar .react-datepicker__navigation-icon:before{border-color:var(--nypl-colors-ui-gray-medium)}.date-picker-calendar .react-datepicker__navigation:hover .react-datepicker__navigation-icon:before{border-color:var(--nypl-colors-ui-gray-dark)}.date-picker-calendar .react-datepicker__header{background-color:var(--nypl-colors-ui-gray-x-light-cool);border-color:var(--nypl-colors-ui-gray-medium)}.date-picker-calendar .react-datepicker__year-wrapper{max-width:220px}.date-picker-calendar .react-datepicker__day--keyboard-selected,.date-picker-calendar .react-datepicker__day:hover,.date-picker-calendar .react-datepicker__month-text:hover,.date-picker-calendar .react-datepicker__year-text:not(.react-datepicker__year-text--disabled):hover{background-color:var(--nypl-colors-ui-gray-x-light-cool);border-radius:0;color:var(--nypl-colors-ui-black)}.date-picker-calendar .react-datepicker__day--in-range.react-datepicker__day--in-range,.date-picker-calendar .react-datepicker__day--keyboard-selected,.date-picker-calendar .react-datepicker__month--in-range.react-datepicker__day--in-range,.date-picker-calendar .react-datepicker__year--in-range.react-datepicker__day--in-range{opacity:1}.date-picker-calendar .react-datepicker__day--in-range,.date-picker-calendar .react-datepicker__day--in-selecting-range,.date-picker-calendar .react-datepicker__day--keyboard-selected,.date-picker-calendar .react-datepicker__day-text--keyboard-selected,.date-picker-calendar .react-datepicker__month--in-range,.date-picker-calendar .react-datepicker__month--in-selecting-range,.date-picker-calendar .react-datepicker__month--keyboard-selected,.date-picker-calendar .react-datepicker__month-text--keyboard-selected,.date-picker-calendar .react-datepicker__year--in-range,.date-picker-calendar .react-datepicker__year--in-selecting-range,.date-picker-calendar .react-datepicker__year--keyboard-selected,.date-picker-calendar .react-datepicker__year-text--keyboard-selected{background-color:var(--nypl-colors-ui-gray-x-light-cool);border-radius:0;color:var(--nypl-colors-ui-black)}.date-picker-calendar .react-datepicker__day--today,.date-picker-calendar .react-datepicker__day--today:hover,.date-picker-calendar .react-datepicker__day-text--today,.date-picker-calendar .react-datepicker__day-text--today:hover,.date-picker-calendar .react-datepicker__month--today,.date-picker-calendar .react-datepicker__month--today:hover,.date-picker-calendar .react-datepicker__month-text--today,.date-picker-calendar .react-datepicker__month-text--today:hover,.date-picker-calendar .react-datepicker__year--today,.date-picker-calendar .react-datepicker__year--today:hover,.date-picker-calendar .react-datepicker__year-text--today,.date-picker-calendar .react-datepicker__year-text--today:hover{background-color:var(--nypl-colors-ui-gray-light-cool);color:var(--nypl-colors-ui-black)}.date-picker-calendar .react-datepicker__day--selected,.date-picker-calendar .react-datepicker__day-text--selected,.date-picker-calendar .react-datepicker__month--selected,.date-picker-calendar .react-datepicker__month-text--selected,.date-picker-calendar .react-datepicker__year--selected,.date-picker-calendar .react-datepicker__year-text--selected{background-color:var(--nypl-colors-ui-focus);border-radius:0;color:var(--nypl-colors-ui-white);font-weight:700;opacity:1}.date-picker-calendar .react-datepicker__day--selected:hover,.date-picker-calendar .react-datepicker__day-text--selected:hover,.date-picker-calendar .react-datepicker__month--selected:hover,.date-picker-calendar .react-datepicker__month-text--selected:hover,.date-picker-calendar .react-datepicker__year--selected:hover,.date-picker-calendar .react-datepicker__year-text--selected:hover{background-color:var(--nypl-colors-ui-focus);color:var(--nypl-colors-ui-white)}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const Accordion: {
|
|
2
|
+
parts: string[];
|
|
3
|
+
baseStyle: {
|
|
4
|
+
container: {
|
|
5
|
+
border: string;
|
|
6
|
+
width: string;
|
|
7
|
+
};
|
|
8
|
+
button: {
|
|
9
|
+
borderWidth: string;
|
|
10
|
+
fontWeight: string;
|
|
11
|
+
};
|
|
12
|
+
panel: {
|
|
13
|
+
padding: string;
|
|
14
|
+
borderLeftWidth: string;
|
|
15
|
+
borderRightWidth: string;
|
|
16
|
+
borderBottomWidth: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export default Accordion;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
declare const Breadcrumb: {
|
|
2
|
+
baseStyle: {
|
|
3
|
+
bg: string;
|
|
4
|
+
color: string;
|
|
5
|
+
fontSize: string;
|
|
6
|
+
fontWeight: string;
|
|
7
|
+
paddingBottom: string;
|
|
8
|
+
paddingTop: string;
|
|
9
|
+
ol: {
|
|
10
|
+
alignItems: {
|
|
11
|
+
base: string;
|
|
12
|
+
md: string;
|
|
13
|
+
};
|
|
14
|
+
display: {
|
|
15
|
+
base: string;
|
|
16
|
+
md: string;
|
|
17
|
+
};
|
|
18
|
+
margin: string;
|
|
19
|
+
maxWidth: string;
|
|
20
|
+
paddingLeft: string;
|
|
21
|
+
paddingRight: string;
|
|
22
|
+
};
|
|
23
|
+
a: {
|
|
24
|
+
_hover: {
|
|
25
|
+
color: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
"li:last-child": {
|
|
29
|
+
fontWeight: {
|
|
30
|
+
base: string;
|
|
31
|
+
md: string;
|
|
32
|
+
};
|
|
33
|
+
".chakra-breadcrumb__link": {
|
|
34
|
+
_hover: {
|
|
35
|
+
cursor: string;
|
|
36
|
+
textDecoration: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
".icon": {
|
|
40
|
+
display: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
"li:not(:last-child)": {
|
|
44
|
+
display: {
|
|
45
|
+
base: string;
|
|
46
|
+
md: string;
|
|
47
|
+
};
|
|
48
|
+
a: {
|
|
49
|
+
marginRight: {
|
|
50
|
+
base: string;
|
|
51
|
+
md: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
".icon": {
|
|
55
|
+
display: {
|
|
56
|
+
base: string;
|
|
57
|
+
md: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
"span:not(.breadcrumb-label)": {
|
|
61
|
+
marginInlineEnd: string;
|
|
62
|
+
marginInlineStart: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
"li:nth-last-of-type(2)": {
|
|
66
|
+
display: string;
|
|
67
|
+
span: {
|
|
68
|
+
display: {
|
|
69
|
+
base: string;
|
|
70
|
+
md: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
variants: {
|
|
76
|
+
blogs: {
|
|
77
|
+
bg: string;
|
|
78
|
+
color: string;
|
|
79
|
+
a: {
|
|
80
|
+
_hover: {
|
|
81
|
+
color: string;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
svg: {
|
|
85
|
+
fill: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
booksAndMore: {
|
|
89
|
+
bg: string;
|
|
90
|
+
};
|
|
91
|
+
education: {
|
|
92
|
+
bg: string;
|
|
93
|
+
};
|
|
94
|
+
locations: {
|
|
95
|
+
bg: string;
|
|
96
|
+
};
|
|
97
|
+
research: {
|
|
98
|
+
bg: string;
|
|
99
|
+
};
|
|
100
|
+
whatsOn: {
|
|
101
|
+
bg: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
export default Breadcrumb;
|