@nypl/design-system-react-components 0.26.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/README.md +7 -7
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -5
- package/dist/components/Button/Button.d.ts +2 -10
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +22 -0
- package/dist/components/Card/Card.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.d.ts +10 -8
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Form/Form.d.ts +2 -2
- package/dist/components/Grid/SimpleGrid.d.ts +6 -3
- package/dist/components/Heading/Heading.d.ts +2 -5
- package/dist/components/HelperErrorText/HelperErrorText.d.ts +1 -5
- package/dist/components/Hero/Hero.d.ts +13 -9
- package/dist/components/Icons/Icon.d.ts +6 -5
- package/dist/components/Icons/IconSvgs.d.ts +21 -21
- package/dist/components/Image/Image.d.ts +8 -5
- package/dist/components/Link/Link.d.ts +1 -9
- package/dist/components/List/List.d.ts +7 -11
- package/dist/components/Logo/Logo.d.ts +2 -5
- package/dist/components/Logo/LogoSvgs.d.ts +39 -39
- package/dist/components/Modal/Modal.d.ts +28 -8
- package/dist/components/Notification/Notification.d.ts +1 -1
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +2 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +3 -2
- package/dist/components/Select/Select.d.ts +2 -5
- package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +4 -4
- package/dist/components/SkipNavigation/SkipNavigation.d.ts +17 -0
- package/dist/components/StatusBadge/StatusBadge.d.ts +2 -3
- package/dist/components/StructuredContent/StructuredContent.d.ts +2 -2
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Template/Template.d.ts +2 -0
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/TextInput/TextInput.d.ts +21 -9
- package/dist/components/Toggle/Toggle.d.ts +1 -5
- package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
- package/dist/design-system-react-components.cjs.development.js +983 -1222
- 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 +982 -1285
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/helpers/types.d.ts +1 -0
- package/dist/index.d.ts +27 -48
- package/dist/styles.css +1 -1
- package/dist/theme/components/buttonGroup.d.ts +11 -0
- package/dist/theme/components/card.d.ts +104 -8
- package/dist/theme/components/componentWrapper.d.ts +4 -3
- package/dist/theme/components/customTable.d.ts +11 -14
- package/dist/theme/components/fieldset.d.ts +4 -3
- package/dist/theme/components/helperErrorText.d.ts +4 -3
- package/dist/theme/components/hero.d.ts +1 -1
- package/dist/theme/components/horizontalRule.d.ts +4 -3
- package/dist/theme/components/icon.d.ts +47743 -1
- package/dist/theme/components/image.d.ts +563 -10
- package/dist/theme/components/label.d.ts +4 -3
- package/dist/theme/components/list.d.ts +6 -7
- package/dist/theme/components/logo.d.ts +474 -1
- package/dist/theme/components/notification.d.ts +20 -16
- package/dist/theme/components/progressIndicator.d.ts +6 -4
- package/dist/theme/components/select.d.ts +4 -10
- package/dist/theme/components/skeletonLoader.d.ts +14 -10
- package/dist/theme/components/skipNavigation.d.ts +22 -0
- package/dist/theme/components/slider.d.ts +7 -6
- package/dist/theme/components/structuredContent.d.ts +10 -9
- package/dist/theme/components/text.d.ts +7 -1
- package/dist/theme/components/toggle.d.ts +6 -4
- package/dist/theme/provider.d.ts +2 -4
- package/dist/utils/componentCategories.d.ts +1 -1
- package/dist/utils/interfaces.d.ts +5 -0
- package/dist/utils/utils.d.ts +2 -18
- package/package.json +15 -16
- package/src/__tests__/setup.ts +3 -3
- package/src/__tests__/utils/utils.test.ts +1 -23
- package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +22 -14
- package/src/components/Accordion/Accordion.stories.mdx +43 -44
- package/src/components/Accordion/Accordion.test.tsx +5 -13
- package/src/components/Accordion/Accordion.tsx +14 -18
- package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +6 -6
- package/src/components/Autosuggest/Autosuggest.stories.mdx +1 -1
- package/src/components/Autosuggest/Autosuggest.stories.tsx +23 -25
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +21 -37
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +4 -17
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +18 -21
- package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +1 -100
- package/src/components/Button/Button.stories.mdx +89 -126
- package/src/components/Button/Button.test.tsx +16 -30
- package/src/components/Button/Button.tsx +14 -20
- package/src/components/ButtonGroup/ButtonGroup.stories.mdx +147 -0
- package/src/components/ButtonGroup/ButtonGroup.test.tsx +141 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +99 -0
- package/src/components/ButtonGroup/__snapshots__/ButtonGroup.test.tsx.snap +117 -0
- package/src/components/Card/Card.stories.mdx +144 -178
- package/src/components/Card/Card.test.tsx +36 -97
- package/src/components/Card/Card.tsx +78 -74
- package/src/components/Chakra/Box.stories.mdx +3 -7
- package/src/components/Chakra/Center.stories.mdx +6 -24
- package/src/components/Chakra/Flex.stories.mdx +5 -7
- package/src/components/Chakra/Grid.stories.mdx +1 -1
- package/src/components/Chakra/Stack.stories.mdx +10 -11
- package/src/components/Checkbox/Checkbox.stories.mdx +1 -1
- package/src/components/Checkbox/Checkbox.test.tsx +2 -2
- package/src/components/Checkbox/Checkbox.tsx +20 -13
- package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +6 -17
- package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +1 -7
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +33 -29
- package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +0 -11
- package/src/components/ComponentWrapper/ComponentWrapper.tsx +3 -10
- package/src/components/DatePicker/DatePicker.stories.mdx +23 -37
- package/src/components/DatePicker/DatePicker.test.tsx +21 -19
- package/src/components/DatePicker/DatePicker.tsx +57 -49
- package/src/components/Form/Form.stories.mdx +46 -31
- package/src/components/Form/Form.test.tsx +1 -18
- package/src/components/Form/Form.tsx +7 -7
- package/src/components/Grid/SimpleGrid.stories.mdx +73 -49
- package/src/components/Grid/SimpleGrid.test.tsx +7 -9
- package/src/components/Grid/SimpleGrid.tsx +14 -11
- package/src/components/Heading/Heading.stories.mdx +27 -72
- package/src/components/Heading/Heading.test.tsx +18 -44
- package/src/components/Heading/Heading.tsx +7 -10
- package/src/components/HelperErrorText/HelperErrorText.stories.mdx +1 -3
- package/src/components/HelperErrorText/HelperErrorText.tsx +1 -5
- package/src/components/Hero/Hero.stories.mdx +219 -216
- package/src/components/Hero/Hero.test.tsx +107 -223
- package/src/components/Hero/Hero.tsx +63 -61
- package/src/components/Icons/Icon.stories.mdx +172 -118
- package/src/components/Icons/Icon.test.tsx +8 -16
- package/src/components/Icons/Icon.tsx +75 -29
- package/src/components/Icons/IconSvgs.tsx +42 -42
- package/src/components/Image/Image.stories.mdx +45 -132
- package/src/components/Image/Image.test.tsx +16 -31
- package/src/components/Image/Image.tsx +28 -12
- package/src/components/Link/Link.stories.mdx +30 -94
- package/src/components/Link/Link.test.tsx +25 -75
- package/src/components/Link/Link.tsx +43 -56
- package/src/components/Link/__snapshots__/Link.test.tsx.snap +1 -2
- package/src/components/List/List.stories.mdx +20 -31
- package/src/components/List/List.test.tsx +24 -43
- package/src/components/List/List.tsx +25 -36
- package/src/components/Logo/Logo.stories.mdx +94 -50
- package/src/components/Logo/Logo.test.tsx +10 -19
- package/src/components/Logo/Logo.tsx +50 -17
- package/src/components/Logo/LogoSvgs.tsx +78 -78
- package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +4 -4
- package/src/components/Modal/Modal.stories.mdx +245 -139
- package/src/components/Modal/Modal.test.tsx +147 -10
- package/src/components/Modal/Modal.tsx +140 -20
- package/src/components/Modal/__snapshots__/Modal.test.tsx.snap +25 -0
- package/src/components/Notification/Notification.stories.mdx +10 -28
- package/src/components/Notification/Notification.test.tsx +9 -12
- package/src/components/Notification/Notification.tsx +34 -37
- package/src/components/Pagination/Pagination.stories.mdx +3 -4
- package/src/components/Pagination/Pagination.tsx +15 -10
- package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +27 -53
- package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +9 -10
- package/src/components/ProgressIndicator/ProgressIndicator.tsx +17 -21
- package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +0 -10
- package/src/components/Radio/Radio.stories.mdx +1 -1
- package/src/components/Radio/Radio.tsx +9 -6
- package/src/components/RadioGroup/RadioGroup.stories.mdx +15 -16
- package/src/components/RadioGroup/RadioGroup.test.tsx +2 -8
- package/src/components/RadioGroup/RadioGroup.tsx +28 -24
- package/src/components/SearchBar/SearchBar.stories.mdx +4 -4
- package/src/components/SearchBar/SearchBar.test.tsx +1 -1
- package/src/components/SearchBar/SearchBar.tsx +14 -22
- package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1 -13
- package/src/components/Select/Select.stories.mdx +10 -25
- package/src/components/Select/Select.test.tsx +6 -7
- package/src/components/Select/Select.tsx +28 -35
- package/src/components/Select/__snapshots__/Select.test.tsx.snap +24 -24
- package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +17 -56
- package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +7 -21
- package/src/components/SkeletonLoader/SkeletonLoader.tsx +9 -8
- package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +33 -33
- package/src/components/SkipNavigation/SkipNavigation.stories.mdx +90 -0
- package/src/components/SkipNavigation/SkipNavigation.test.tsx +63 -0
- package/src/components/SkipNavigation/SkipNavigation.tsx +51 -0
- package/src/components/SkipNavigation/__snapshots__/SkipNavigation.test.tsx.snap +130 -0
- package/src/components/Slider/Slider.stories.mdx +19 -53
- package/src/components/Slider/Slider.test.tsx +2 -2
- package/src/components/Slider/Slider.tsx +10 -12
- package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +2 -9
- package/src/components/StatusBadge/StatusBadge.stories.mdx +6 -21
- package/src/components/StatusBadge/StatusBadge.test.tsx +2 -3
- package/src/components/StatusBadge/StatusBadge.tsx +3 -10
- package/src/components/StructuredContent/StructuredContent.stories.mdx +30 -58
- package/src/components/StructuredContent/StructuredContent.test.tsx +42 -44
- package/src/components/StructuredContent/StructuredContent.tsx +9 -18
- package/src/components/StyleGuide/Bidirectionality.stories.mdx +9 -23
- package/src/components/StyleGuide/Buttons.stories.mdx +63 -63
- package/src/components/StyleGuide/ColorCard.tsx +2 -4
- package/src/components/StyleGuide/Colors.stories.mdx +9 -10
- package/src/components/StyleGuide/DesignTokens.stories.mdx +5 -7
- package/src/components/StyleGuide/Forms.stories.mdx +2 -2
- package/src/components/StyleGuide/Iconography.stories.mdx +60 -78
- package/src/components/StyleGuide/Spacing.stories.mdx +1 -2
- package/src/components/StyleGuide/Typography.stories.mdx +16 -19
- package/src/components/Table/Table.stories.mdx +85 -1
- package/src/components/Table/Table.test.tsx +57 -1
- package/src/components/Table/Table.tsx +7 -4
- package/src/components/Table/__snapshots__/Table.test.tsx.snap +121 -0
- package/src/components/Tabs/Tabs.stories.mdx +1 -1
- package/src/components/Tabs/Tabs.test.tsx +2 -2
- package/src/components/Tabs/Tabs.tsx +26 -27
- package/src/components/Template/Template.stories.mdx +49 -54
- package/src/components/Template/Template.tsx +9 -3
- package/src/components/Text/Text.stories.mdx +5 -11
- package/src/components/Text/Text.test.tsx +3 -6
- package/src/components/Text/Text.tsx +3 -5
- package/src/components/TextInput/TextInput.stories.mdx +10 -22
- package/src/components/TextInput/TextInput.test.tsx +32 -62
- package/src/components/TextInput/TextInput.tsx +61 -30
- package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +1 -0
- package/src/components/Toggle/Toggle.stories.mdx +5 -16
- package/src/components/Toggle/Toggle.test.tsx +2 -3
- package/src/components/Toggle/Toggle.tsx +9 -10
- package/src/components/VideoPlayer/VideoPlayer.stories.mdx +13 -29
- package/src/components/VideoPlayer/VideoPlayer.test.tsx +18 -23
- package/src/components/VideoPlayer/VideoPlayer.tsx +13 -10
- package/src/docs/Chakra.stories.mdx +14 -11
- package/src/docs/Welcome.stories.mdx +23 -43
- package/src/helpers/types.ts +1 -0
- package/src/hooks/tests/useNYPLTheme.test.tsx +1 -1
- package/src/hooks/useNYPLTheme.stories.mdx +3 -6
- package/src/index.ts +52 -46
- package/src/styles.scss +0 -1
- package/src/theme/components/buttonGroup.ts +10 -0
- package/src/theme/components/card.ts +50 -15
- package/src/theme/components/componentWrapper.ts +5 -1
- package/src/theme/components/customTable.ts +8 -2
- package/src/theme/components/fieldset.ts +5 -1
- package/src/theme/components/helperErrorText.ts +5 -1
- package/src/theme/components/hero.ts +2 -2
- package/src/theme/components/horizontalRule.ts +5 -1
- package/src/theme/components/icon.ts +7 -1
- package/src/theme/components/image.ts +14 -3
- package/src/theme/components/label.ts +5 -1
- package/src/theme/components/list.ts +8 -2
- package/src/theme/components/logo.ts +5 -1
- package/src/theme/components/notification.ts +38 -14
- package/src/theme/components/progressIndicator.ts +10 -5
- package/src/theme/components/select.ts +5 -6
- package/src/theme/components/skeletonLoader.ts +8 -2
- package/src/theme/components/skipNavigation.ts +26 -0
- package/src/theme/components/slider.ts +13 -1
- package/src/theme/components/structuredContent.ts +11 -1
- package/src/theme/components/text.ts +12 -5
- package/src/theme/components/toggle.ts +9 -3
- package/src/theme/foundations/colors.ts +6 -9
- package/src/theme/index.ts +4 -0
- package/src/theme/provider.tsx +1 -1
- package/src/utils/componentCategories.ts +13 -5
- package/src/utils/interfaces.ts +5 -0
- package/src/utils/utils.ts +2 -32
- package/dist/components/Accordion/AccordionTypes.d.ts +0 -5
- package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +0 -8
- package/dist/components/Button/ButtonTypes.d.ts +0 -8
- package/dist/components/DatePicker/DatePickerTypes.d.ts +0 -5
- package/dist/components/Form/FormTypes.d.ts +0 -2
- package/dist/components/Grid/GridTypes.d.ts +0 -9
- package/dist/components/Heading/HeadingTypes.d.ts +0 -14
- package/dist/components/Hero/HeroTypes.d.ts +0 -12
- package/dist/components/Icons/IconTypes.d.ts +0 -77
- package/dist/components/Image/ImageTypes.d.ts +0 -22
- package/dist/components/Link/LinkTypes.d.ts +0 -8
- package/dist/components/List/ListTypes.d.ts +0 -5
- package/dist/components/Logo/LogoTypes.d.ts +0 -54
- package/dist/components/Notification/NotificationTypes.d.ts +0 -5
- package/dist/components/ProgressIndicator/ProgressIndicatorTypes.d.ts +0 -8
- package/dist/components/Select/SelectTypes.d.ts +0 -8
- package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +0 -5
- package/dist/components/StatusBadge/StatusBadgeTypes.d.ts +0 -5
- package/dist/components/StructuredContent/StructuredContentTypes.d.ts +0 -5
- package/dist/components/Text/TextTypes.d.ts +0 -6
- package/dist/components/TextInput/TextInputTypes.d.ts +0 -25
- package/dist/components/Toggle/ToggleTypes.d.ts +0 -4
- package/dist/components/VideoPlayer/VideoPlayerTypes.d.ts +0 -9
- package/dist/helpers/enums.d.ts +0 -4
- package/dist/utils/siteSections.d.ts +0 -2
- package/src/components/Accordion/AccordionTypes.tsx +0 -5
- package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +0 -8
- package/src/components/Button/ButtonTypes.tsx +0 -8
- package/src/components/DatePicker/DatePickerTypes.tsx +0 -5
- package/src/components/Form/FormTypes.tsx +0 -3
- package/src/components/Grid/GridTypes.tsx +0 -9
- package/src/components/Heading/HeadingTypes.tsx +0 -15
- package/src/components/Hero/HeroTypes.tsx +0 -20
- package/src/components/Icons/IconTypes.tsx +0 -83
- package/src/components/Image/ImageTypes.ts +0 -24
- package/src/components/Link/LinkTypes.tsx +0 -8
- package/src/components/List/ListTypes.tsx +0 -5
- package/src/components/Logo/LogoTypes.tsx +0 -56
- package/src/components/Modal/_Modal.scss +0 -18
- package/src/components/Notification/NotificationTypes.tsx +0 -5
- package/src/components/ProgressIndicator/ProgressIndicatorTypes.ts +0 -8
- package/src/components/Select/SelectTypes.tsx +0 -10
- package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +0 -5
- package/src/components/StatusBadge/StatusBadgeTypes.tsx +0 -5
- package/src/components/StructuredContent/StructuredContentTypes.tsx +0 -5
- package/src/components/Text/TextTypes.tsx +0 -6
- package/src/components/TextInput/TextInputTypes.tsx +0 -48
- package/src/components/Toggle/ToggleTypes.tsx +0 -4
- package/src/components/VideoPlayer/VideoPlayerTypes.tsx +0 -10
- package/src/helpers/enums.ts +0 -4
- package/src/utils/siteSections.ts +0 -10
|
@@ -11,7 +11,7 @@ exports[`Accordion Renders the UI snapshot correctly 1`] = `
|
|
|
11
11
|
<button
|
|
12
12
|
aria-controls="accordion-panel-accordian-item-0"
|
|
13
13
|
aria-expanded={false}
|
|
14
|
-
className="chakra-accordion__button css-
|
|
14
|
+
className="chakra-accordion__button css-1l67k39"
|
|
15
15
|
disabled={false}
|
|
16
16
|
id="accordion-button-accordian-item-0"
|
|
17
17
|
onClick={[Function]}
|
|
@@ -133,7 +133,7 @@ exports[`Accordion Renders the UI snapshot correctly 2`] = `
|
|
|
133
133
|
<button
|
|
134
134
|
aria-controls="accordion-panel-accordian-item-0"
|
|
135
135
|
aria-expanded={false}
|
|
136
|
-
className="chakra-accordion__button css-
|
|
136
|
+
className="chakra-accordion__button css-1l67k39"
|
|
137
137
|
disabled={false}
|
|
138
138
|
id="accordion-button-accordian-item-0"
|
|
139
139
|
onClick={[Function]}
|
|
@@ -255,7 +255,7 @@ exports[`Accordion Renders the UI snapshot correctly 3`] = `
|
|
|
255
255
|
<button
|
|
256
256
|
aria-controls="accordion-panel-accordian-item-0"
|
|
257
257
|
aria-expanded={false}
|
|
258
|
-
className="chakra-accordion__button css-
|
|
258
|
+
className="chakra-accordion__button css-1l67k39"
|
|
259
259
|
disabled={false}
|
|
260
260
|
id="accordion-button-accordian-item-0"
|
|
261
261
|
onClick={[Function]}
|
|
@@ -378,7 +378,7 @@ exports[`Accordion Renders the UI snapshot correctly 4`] = `
|
|
|
378
378
|
<button
|
|
379
379
|
aria-controls="accordion-panel-accordian-item-0"
|
|
380
380
|
aria-expanded={false}
|
|
381
|
-
className="chakra-accordion__button css-
|
|
381
|
+
className="chakra-accordion__button css-1l67k39"
|
|
382
382
|
disabled={false}
|
|
383
383
|
id="accordion-button-accordian-item-0"
|
|
384
384
|
onClick={[Function]}
|
|
@@ -500,7 +500,7 @@ exports[`Accordion Renders the UI snapshot correctly 5`] = `
|
|
|
500
500
|
<button
|
|
501
501
|
aria-controls="accordion-panel-accordian-item-0"
|
|
502
502
|
aria-expanded={false}
|
|
503
|
-
className="chakra-accordion__button css-
|
|
503
|
+
className="chakra-accordion__button css-1uqlcgc"
|
|
504
504
|
disabled={false}
|
|
505
505
|
id="accordion-button-accordian-item-0"
|
|
506
506
|
onClick={[Function]}
|
|
@@ -622,7 +622,7 @@ exports[`Accordion Renders the UI snapshot correctly 6`] = `
|
|
|
622
622
|
<button
|
|
623
623
|
aria-controls="accordion-panel-accordian-item-0"
|
|
624
624
|
aria-expanded={false}
|
|
625
|
-
className="chakra-accordion__button css-
|
|
625
|
+
className="chakra-accordion__button css-1ld1swj"
|
|
626
626
|
disabled={false}
|
|
627
627
|
id="accordion-button-accordian-item-0"
|
|
628
628
|
onClick={[Function]}
|
|
@@ -2,7 +2,6 @@ import React, { useState } from "react";
|
|
|
2
2
|
|
|
3
3
|
import Autosuggest from "react-autosuggest";
|
|
4
4
|
import Icon from "../Icons/Icon";
|
|
5
|
-
import { IconNames } from "../Icons/IconTypes";
|
|
6
5
|
import TextInput from "../TextInput/TextInput";
|
|
7
6
|
|
|
8
7
|
/**
|
|
@@ -10,37 +9,41 @@ import TextInput from "../TextInput/TextInput";
|
|
|
10
9
|
* Wrapper component just to give the Autosuggest examples more space for the
|
|
11
10
|
* suggestions dropdown to display.
|
|
12
11
|
*/
|
|
13
|
-
const StoryWrapper = ({ children }) => (
|
|
12
|
+
const StoryWrapper = ({ children }: { children: JSX.Element }) => (
|
|
14
13
|
<div style={{ padding: "5px", minHeight: "400px" }}>{children}</div>
|
|
15
14
|
);
|
|
16
15
|
|
|
17
|
-
const libraryRenderInputComponent = (
|
|
18
|
-
inputProps: React.HTMLProps<HTMLInputElement>
|
|
19
|
-
) => {
|
|
16
|
+
const libraryRenderInputComponent = (inputProps: any) => {
|
|
20
17
|
return (
|
|
21
18
|
<TextInput
|
|
22
|
-
attributes={{
|
|
23
|
-
...inputProps,
|
|
24
|
-
}}
|
|
25
19
|
id="library-autosuggest"
|
|
26
20
|
isRequired
|
|
27
21
|
labelText="Home Library"
|
|
28
22
|
name="homeLibraryName"
|
|
29
23
|
helperText="Select your home library. Start by typing the name of the library. Try 'ba'."
|
|
24
|
+
{...inputProps}
|
|
30
25
|
/>
|
|
31
26
|
);
|
|
32
27
|
};
|
|
33
28
|
|
|
29
|
+
interface Library {
|
|
30
|
+
label: string;
|
|
31
|
+
}
|
|
32
|
+
|
|
34
33
|
/**
|
|
35
34
|
* LibraryExample
|
|
36
35
|
* An example component that internally uses the `react-autosuggest` library.
|
|
37
36
|
* The list is made up of objects with `label` key. It adds a Label, Input, and
|
|
38
37
|
* HelperErrorText as elements for the autosuggest component to render.
|
|
39
38
|
*/
|
|
40
|
-
const LibraryExample = ({
|
|
39
|
+
const LibraryExample = ({
|
|
40
|
+
renderInputComponent,
|
|
41
|
+
}: {
|
|
42
|
+
renderInputComponent: JSX.Element;
|
|
43
|
+
}) => {
|
|
41
44
|
const [value, setValue] = useState("");
|
|
42
45
|
const [suggestions, setSuggestions] = useState([]);
|
|
43
|
-
const libraryList = [
|
|
46
|
+
const libraryList: Library[] = [
|
|
44
47
|
{ label: "SimplyE" },
|
|
45
48
|
{ label: "53rd Street Branch" },
|
|
46
49
|
{ label: "Aguilar Branch" },
|
|
@@ -55,10 +58,11 @@ const LibraryExample = ({ renderInputComponent }) => {
|
|
|
55
58
|
{ label: "Soundview Branch" },
|
|
56
59
|
{ label: "St. George Library Center" },
|
|
57
60
|
];
|
|
58
|
-
const onChange = (_: any, { newValue }
|
|
61
|
+
const onChange = (_: any, { newValue }: { newValue: string }) =>
|
|
62
|
+
setValue(newValue);
|
|
59
63
|
// Tell autosuggest to suggest by the first letter of the library. This can
|
|
60
64
|
// be manipulated.
|
|
61
|
-
const getSuggestions = (value, list) => {
|
|
65
|
+
const getSuggestions = (value: string, list: Library[]) => {
|
|
62
66
|
const inputValue = value.trim().toLowerCase();
|
|
63
67
|
const inputLength = inputValue.length;
|
|
64
68
|
|
|
@@ -71,7 +75,7 @@ const LibraryExample = ({ renderInputComponent }) => {
|
|
|
71
75
|
|
|
72
76
|
// Autosuggest will call this function every time suggestions need to be
|
|
73
77
|
// updated. `getSuggestions` must be passed.
|
|
74
|
-
const onSuggestionsFetchRequested = ({ value }) =>
|
|
78
|
+
const onSuggestionsFetchRequested = ({ value }: { value: string }) =>
|
|
75
79
|
setSuggestions(getSuggestions(value, libraryList));
|
|
76
80
|
// Clear out any suggestions.
|
|
77
81
|
const onSuggestionsClearRequested = () => setSuggestions([]);
|
|
@@ -104,7 +108,7 @@ const LibraryExample = ({ renderInputComponent }) => {
|
|
|
104
108
|
|
|
105
109
|
export const AutosuggestLibrary = () => (
|
|
106
110
|
<StoryWrapper>
|
|
107
|
-
<LibraryExample renderInputComponent={libraryRenderInputComponent} />
|
|
111
|
+
<LibraryExample renderInputComponent={libraryRenderInputComponent as any} />
|
|
108
112
|
</StoryWrapper>
|
|
109
113
|
);
|
|
110
114
|
|
|
@@ -133,12 +137,10 @@ const FishExample = () => {
|
|
|
133
137
|
const renderInputComponent = (inputProps) => {
|
|
134
138
|
return (
|
|
135
139
|
<TextInput
|
|
136
|
-
attributes={{
|
|
137
|
-
...inputProps,
|
|
138
|
-
}}
|
|
139
140
|
id="library-fish-autosuggest"
|
|
140
141
|
labelText="Fish in Animal Crossing"
|
|
141
142
|
name="favoriteFish"
|
|
143
|
+
{...inputProps}
|
|
142
144
|
/>
|
|
143
145
|
);
|
|
144
146
|
};
|
|
@@ -147,7 +149,7 @@ const FishExample = () => {
|
|
|
147
149
|
const renderSuggestion = (suggestion) => (
|
|
148
150
|
<span>
|
|
149
151
|
{suggestion}
|
|
150
|
-
<Icon name=
|
|
152
|
+
<Icon name="check" size="medium" />
|
|
151
153
|
</span>
|
|
152
154
|
);
|
|
153
155
|
const getSuggestionValue = (suggestion) => suggestion;
|
|
@@ -192,22 +194,18 @@ export const AutosuggestFish = () => (
|
|
|
192
194
|
</StoryWrapper>
|
|
193
195
|
);
|
|
194
196
|
|
|
195
|
-
const searchBarRenderInputComponent = (
|
|
196
|
-
inputProps: React.HTMLProps<HTMLInputElement>
|
|
197
|
-
) => {
|
|
197
|
+
const searchBarRenderInputComponent = (inputProps: any) => {
|
|
198
198
|
return (
|
|
199
199
|
<TextInput
|
|
200
|
-
attributes={{
|
|
201
|
-
...inputProps,
|
|
202
|
-
}}
|
|
203
200
|
id="autosuggest-searchBar"
|
|
204
201
|
isRequired
|
|
205
202
|
labelText="home library"
|
|
206
203
|
name="homeLibraryName"
|
|
204
|
+
{...inputProps}
|
|
207
205
|
/>
|
|
208
206
|
);
|
|
209
207
|
};
|
|
210
208
|
|
|
211
209
|
export const SearchBarExample = () => (
|
|
212
|
-
<LibraryExample renderInputComponent={searchBarRenderInputComponent} />
|
|
210
|
+
<LibraryExample renderInputComponent={searchBarRenderInputComponent as any} />
|
|
213
211
|
);
|
|
@@ -7,19 +7,11 @@ import {
|
|
|
7
7
|
} from "@storybook/addon-docs";
|
|
8
8
|
import { withDesign } from "storybook-addon-designs";
|
|
9
9
|
|
|
10
|
-
import Breadcrumbs from "./Breadcrumbs";
|
|
11
|
-
import { BreadcrumbsTypes } from "./BreadcrumbsTypes";
|
|
10
|
+
import Breadcrumbs, { BreadcrumbsTypes } from "./Breadcrumbs";
|
|
12
11
|
import Heading from "../Heading/Heading";
|
|
13
|
-
import { HeadingLevels } from "../Heading/HeadingTypes";
|
|
14
12
|
import Link from "../Link/Link";
|
|
15
13
|
import { getCategory } from "../../utils/componentCategories";
|
|
16
14
|
import DSProvider from "../../theme/provider";
|
|
17
|
-
import { getStorybookEnumValues } from "../../utils/utils";
|
|
18
|
-
|
|
19
|
-
export const enumValues = getStorybookEnumValues(
|
|
20
|
-
BreadcrumbsTypes,
|
|
21
|
-
"BreadcrumbsTypes"
|
|
22
|
-
);
|
|
23
15
|
|
|
24
16
|
<Meta
|
|
25
17
|
title={getCategory("Breadcrumbs")}
|
|
@@ -33,13 +25,11 @@ export const enumValues = getStorybookEnumValues(
|
|
|
33
25
|
jest: ["Breadcrumbs.test.tsx"],
|
|
34
26
|
}}
|
|
35
27
|
argTypes={{
|
|
36
|
-
additionalStyles: { control: false },
|
|
37
28
|
breadcrumbsData: { control: false },
|
|
38
|
-
className: { control: false },
|
|
39
29
|
breadcrumbsType: {
|
|
40
|
-
|
|
41
|
-
options: enumValues.options,
|
|
30
|
+
table: { defaultValue: { summary: "whatsOn" } },
|
|
42
31
|
},
|
|
32
|
+
className: { control: false },
|
|
43
33
|
id: { control: false },
|
|
44
34
|
}}
|
|
45
35
|
/>
|
|
@@ -49,7 +39,7 @@ export const enumValues = getStorybookEnumValues(
|
|
|
49
39
|
| Component Version | DS Version |
|
|
50
40
|
| ----------------- | ---------- |
|
|
51
41
|
| Added | `0.0.3` |
|
|
52
|
-
| Latest | `0.
|
|
42
|
+
| Latest | `0.28.0` |
|
|
53
43
|
|
|
54
44
|
## Table of Contents
|
|
55
45
|
|
|
@@ -73,23 +63,17 @@ available in the breadcrumb hierarchy.
|
|
|
73
63
|
<Story
|
|
74
64
|
name="Breadcrumbs with Controls"
|
|
75
65
|
args={{
|
|
76
|
-
additionalStyles: undefined,
|
|
77
66
|
breadcrumbsData: [
|
|
78
67
|
{ url: "#", text: "Parent" },
|
|
79
68
|
{ url: "#", text: "Child" },
|
|
80
69
|
{ url: "#", text: "Grandchild" },
|
|
81
70
|
],
|
|
82
71
|
className: undefined,
|
|
83
|
-
breadcrumbsType:
|
|
72
|
+
breadcrumbsType: "whatsOn",
|
|
84
73
|
id: "breadcrumbs-id",
|
|
85
74
|
}}
|
|
86
75
|
>
|
|
87
|
-
{(args) =>
|
|
88
|
-
<Breadcrumbs
|
|
89
|
-
{...args}
|
|
90
|
-
breadcrumbsType={enumValues.getValue(args.breadcrumbsType)}
|
|
91
|
-
/>
|
|
92
|
-
)}
|
|
76
|
+
{(args) => <Breadcrumbs {...args} />}
|
|
93
77
|
</Story>
|
|
94
78
|
</Canvas>
|
|
95
79
|
|
|
@@ -131,20 +115,20 @@ denoted by an `aria-current` attribute value of "page".
|
|
|
131
115
|
|
|
132
116
|
## Color Variations
|
|
133
117
|
|
|
134
|
-
The `Breadcrumbs` component background color can be set
|
|
135
|
-
|
|
136
|
-
|
|
118
|
+
The `Breadcrumbs` component background color can be set to a value of the
|
|
119
|
+
`breadcrumbsType` type. If the `breadcrumbsType` prop is omitted, the default
|
|
120
|
+
background color is `"whatsOn"` (`ui.black`).
|
|
137
121
|
|
|
138
122
|
<Canvas>
|
|
139
123
|
<Story
|
|
140
124
|
name="Color Variations"
|
|
141
125
|
args={{
|
|
142
|
-
breadcrumbsType:
|
|
126
|
+
breadcrumbsType: "blogs",
|
|
143
127
|
}}
|
|
144
128
|
>
|
|
145
129
|
{(args) => (
|
|
146
130
|
<>
|
|
147
|
-
<Heading level=
|
|
131
|
+
<Heading level="three">Blogs</Heading>
|
|
148
132
|
<Breadcrumbs
|
|
149
133
|
breadcrumbsData={[
|
|
150
134
|
{ url: "#", text: "Parent" },
|
|
@@ -163,7 +147,7 @@ the default background color is `black`.
|
|
|
163
147
|
|
|
164
148
|
<Canvas>
|
|
165
149
|
<DSProvider>
|
|
166
|
-
<Heading level=
|
|
150
|
+
<Heading level="three">Books and More</Heading>
|
|
167
151
|
<Breadcrumbs
|
|
168
152
|
breadcrumbsData={[
|
|
169
153
|
{ url: "#", text: "Parent" },
|
|
@@ -173,14 +157,14 @@ the default background color is `black`.
|
|
|
173
157
|
text: "Grandchild",
|
|
174
158
|
},
|
|
175
159
|
]}
|
|
176
|
-
breadcrumbsType=
|
|
160
|
+
breadcrumbsType="booksAndMore"
|
|
177
161
|
/>
|
|
178
162
|
</DSProvider>
|
|
179
163
|
</Canvas>
|
|
180
164
|
|
|
181
165
|
<Canvas>
|
|
182
166
|
<DSProvider>
|
|
183
|
-
<Heading level=
|
|
167
|
+
<Heading level="three">Education</Heading>
|
|
184
168
|
<Breadcrumbs
|
|
185
169
|
breadcrumbsData={[
|
|
186
170
|
{ url: "#", text: "Parent" },
|
|
@@ -190,14 +174,14 @@ the default background color is `black`.
|
|
|
190
174
|
text: "Grandchild",
|
|
191
175
|
},
|
|
192
176
|
]}
|
|
193
|
-
breadcrumbsType=
|
|
177
|
+
breadcrumbsType="education"
|
|
194
178
|
/>
|
|
195
179
|
</DSProvider>
|
|
196
180
|
</Canvas>
|
|
197
181
|
|
|
198
182
|
<Canvas>
|
|
199
183
|
<DSProvider>
|
|
200
|
-
<Heading level=
|
|
184
|
+
<Heading level="three">Locations</Heading>
|
|
201
185
|
<Breadcrumbs
|
|
202
186
|
breadcrumbsData={[
|
|
203
187
|
{ url: "#", text: "Parent" },
|
|
@@ -207,14 +191,14 @@ the default background color is `black`.
|
|
|
207
191
|
text: "Grandchild",
|
|
208
192
|
},
|
|
209
193
|
]}
|
|
210
|
-
breadcrumbsType=
|
|
194
|
+
breadcrumbsType="locations"
|
|
211
195
|
/>
|
|
212
196
|
</DSProvider>
|
|
213
197
|
</Canvas>
|
|
214
198
|
|
|
215
199
|
<Canvas>
|
|
216
200
|
<DSProvider>
|
|
217
|
-
<Heading level=
|
|
201
|
+
<Heading level="three">Research</Heading>
|
|
218
202
|
<Breadcrumbs
|
|
219
203
|
breadcrumbsData={[
|
|
220
204
|
{ url: "#", text: "Parent" },
|
|
@@ -224,14 +208,14 @@ the default background color is `black`.
|
|
|
224
208
|
text: "Grandchild",
|
|
225
209
|
},
|
|
226
210
|
]}
|
|
227
|
-
breadcrumbsType=
|
|
211
|
+
breadcrumbsType="research"
|
|
228
212
|
/>
|
|
229
213
|
</DSProvider>
|
|
230
214
|
</Canvas>
|
|
231
215
|
|
|
232
216
|
<Canvas>
|
|
233
217
|
<DSProvider>
|
|
234
|
-
<Heading level=
|
|
218
|
+
<Heading level="three">What's On</Heading>
|
|
235
219
|
<Breadcrumbs
|
|
236
220
|
breadcrumbsData={[
|
|
237
221
|
{ url: "#", text: "Parent" },
|
|
@@ -241,7 +225,7 @@ the default background color is `black`.
|
|
|
241
225
|
text: "Grandchild",
|
|
242
226
|
},
|
|
243
227
|
]}
|
|
244
|
-
breadcrumbsType=
|
|
228
|
+
breadcrumbsType="whatsOn"
|
|
245
229
|
/>
|
|
246
230
|
</DSProvider>
|
|
247
231
|
</Canvas>
|
|
@@ -4,7 +4,6 @@ import renderer from "react-test-renderer";
|
|
|
4
4
|
import { axe } from "jest-axe";
|
|
5
5
|
|
|
6
6
|
import Breadcrumbs from "./Breadcrumbs";
|
|
7
|
-
import { BreadcrumbsTypes } from "./BreadcrumbsTypes";
|
|
8
7
|
|
|
9
8
|
describe("Breadcrumbs Accessibility", () => {
|
|
10
9
|
const breadcrumbsData = [
|
|
@@ -82,7 +81,7 @@ describe("Breadcrumbs Snapshot", () => {
|
|
|
82
81
|
.create(
|
|
83
82
|
<Breadcrumbs
|
|
84
83
|
breadcrumbsData={breadcrumbsData}
|
|
85
|
-
breadcrumbsType=
|
|
84
|
+
breadcrumbsType="booksAndMore"
|
|
86
85
|
id="breadcrumbs-test"
|
|
87
86
|
/>
|
|
88
87
|
)
|
|
@@ -91,7 +90,7 @@ describe("Breadcrumbs Snapshot", () => {
|
|
|
91
90
|
.create(
|
|
92
91
|
<Breadcrumbs
|
|
93
92
|
breadcrumbsData={breadcrumbsData}
|
|
94
|
-
breadcrumbsType=
|
|
93
|
+
breadcrumbsType="blogs"
|
|
95
94
|
id="breadcrumbs-test"
|
|
96
95
|
/>
|
|
97
96
|
)
|
|
@@ -100,7 +99,7 @@ describe("Breadcrumbs Snapshot", () => {
|
|
|
100
99
|
.create(
|
|
101
100
|
<Breadcrumbs
|
|
102
101
|
breadcrumbsData={breadcrumbsData}
|
|
103
|
-
breadcrumbsType=
|
|
102
|
+
breadcrumbsType="blogs"
|
|
104
103
|
id="breadcrumbs-test"
|
|
105
104
|
/>
|
|
106
105
|
)
|
|
@@ -109,18 +108,7 @@ describe("Breadcrumbs Snapshot", () => {
|
|
|
109
108
|
.create(
|
|
110
109
|
<Breadcrumbs
|
|
111
110
|
breadcrumbsData={breadcrumbsData}
|
|
112
|
-
breadcrumbsType=
|
|
113
|
-
id="breadcrumbs-test"
|
|
114
|
-
/>
|
|
115
|
-
)
|
|
116
|
-
.toJSON();
|
|
117
|
-
const breadcrumbsAdditionalStyles = renderer
|
|
118
|
-
.create(
|
|
119
|
-
<Breadcrumbs
|
|
120
|
-
additionalStyles={{
|
|
121
|
-
bg: "var(--nypl-colors-ui-error-primary)",
|
|
122
|
-
}}
|
|
123
|
-
breadcrumbsData={breadcrumbsData}
|
|
111
|
+
breadcrumbsType="education"
|
|
124
112
|
id="breadcrumbs-test"
|
|
125
113
|
/>
|
|
126
114
|
)
|
|
@@ -150,7 +138,6 @@ describe("Breadcrumbs Snapshot", () => {
|
|
|
150
138
|
expect(breadcrumbsBlogsVariant).toMatchSnapshot();
|
|
151
139
|
expect(breadcrumbsLocationsVariant).toMatchSnapshot();
|
|
152
140
|
expect(breadcrumbsEducationVariant).toMatchSnapshot();
|
|
153
|
-
expect(breadcrumbsAdditionalStyles).toMatchSnapshot();
|
|
154
141
|
expect(withChakraProps).toMatchSnapshot();
|
|
155
142
|
expect(withOtherProps).toMatchSnapshot();
|
|
156
143
|
});
|
|
@@ -8,23 +8,20 @@ import {
|
|
|
8
8
|
import * as React from "react";
|
|
9
9
|
|
|
10
10
|
import Icon from "../Icons/Icon";
|
|
11
|
-
import {
|
|
12
|
-
IconNames,
|
|
13
|
-
IconRotationTypes,
|
|
14
|
-
IconSizes,
|
|
15
|
-
IconTypes,
|
|
16
|
-
} from "../Icons/IconTypes";
|
|
17
|
-
import { BreadcrumbsTypes } from "./BreadcrumbsTypes";
|
|
18
|
-
import { getVariant } from "../../utils/utils";
|
|
19
11
|
|
|
12
|
+
export type BreadcrumbsTypes =
|
|
13
|
+
| "blogs"
|
|
14
|
+
| "booksAndMore"
|
|
15
|
+
| "education"
|
|
16
|
+
| "locations"
|
|
17
|
+
| "research"
|
|
18
|
+
| "whatsOn";
|
|
20
19
|
export interface BreadcrumbsDataProps {
|
|
21
20
|
url: string;
|
|
22
21
|
text: string | React.ReactNode;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
export interface BreadcrumbProps {
|
|
26
|
-
/** Optionally pass in additional Chakra-based styles. */
|
|
27
|
-
additionalStyles?: { [key: string]: any };
|
|
28
25
|
/** Breadcrumb links as an array */
|
|
29
26
|
breadcrumbsData: BreadcrumbsDataProps[];
|
|
30
27
|
/** Used to control how the `Hero` component will be rendered. */
|
|
@@ -35,7 +32,10 @@ export interface BreadcrumbProps {
|
|
|
35
32
|
id?: string;
|
|
36
33
|
}
|
|
37
34
|
|
|
38
|
-
const getElementsFromData = (
|
|
35
|
+
const getElementsFromData = (
|
|
36
|
+
data: BreadcrumbsDataProps[],
|
|
37
|
+
breadcrumbsID?: string
|
|
38
|
+
) => {
|
|
39
39
|
if (!data?.length) {
|
|
40
40
|
return {};
|
|
41
41
|
}
|
|
@@ -48,12 +48,12 @@ const getElementsFromData = (data, breadcrumbsID) => {
|
|
|
48
48
|
<BreadcrumbLink href={breadcrumbData.url}>
|
|
49
49
|
{index === data.length - 2 && (
|
|
50
50
|
<Icon
|
|
51
|
-
name=
|
|
52
|
-
size=
|
|
53
|
-
iconRotation=
|
|
51
|
+
name="arrow"
|
|
52
|
+
size="small"
|
|
53
|
+
iconRotation="rotate90"
|
|
54
54
|
id={`${breadcrumbsID}__backarrow`}
|
|
55
55
|
className="breadcrumbs-icon"
|
|
56
|
-
type=
|
|
56
|
+
type="breadcrumbs"
|
|
57
57
|
/>
|
|
58
58
|
)}
|
|
59
59
|
<span className="breadcrumb-label">{breadcrumbData.text}</span>
|
|
@@ -66,14 +66,12 @@ const getElementsFromData = (data, breadcrumbsID) => {
|
|
|
66
66
|
|
|
67
67
|
export const Breadcrumbs = chakra((props: BreadcrumbProps) => {
|
|
68
68
|
const {
|
|
69
|
-
additionalStyles = {},
|
|
70
69
|
breadcrumbsData,
|
|
71
|
-
breadcrumbsType,
|
|
70
|
+
breadcrumbsType = "whatsOn",
|
|
72
71
|
className,
|
|
73
72
|
id,
|
|
74
73
|
...rest
|
|
75
74
|
} = props;
|
|
76
|
-
const variant = getVariant(breadcrumbsType, BreadcrumbsTypes);
|
|
77
75
|
|
|
78
76
|
if (!breadcrumbsData || breadcrumbsData.length === 0) {
|
|
79
77
|
throw new Error(
|
|
@@ -81,8 +79,7 @@ export const Breadcrumbs = chakra((props: BreadcrumbProps) => {
|
|
|
81
79
|
);
|
|
82
80
|
}
|
|
83
81
|
|
|
84
|
-
const styles = useStyleConfig("Breadcrumb", { variant });
|
|
85
|
-
const finalStyles = { ...styles, ...additionalStyles };
|
|
82
|
+
const styles = useStyleConfig("Breadcrumb", { variant: breadcrumbsType });
|
|
86
83
|
const breadcrumbItems = getElementsFromData(breadcrumbsData, id);
|
|
87
84
|
|
|
88
85
|
return (
|
|
@@ -90,7 +87,7 @@ export const Breadcrumbs = chakra((props: BreadcrumbProps) => {
|
|
|
90
87
|
aria-label="Breadcrumb"
|
|
91
88
|
className={className}
|
|
92
89
|
id={id}
|
|
93
|
-
__css={
|
|
90
|
+
__css={styles}
|
|
94
91
|
{...rest}
|
|
95
92
|
>
|
|
96
93
|
{breadcrumbItems}
|
|
@@ -496,105 +496,6 @@ exports[`Breadcrumbs Snapshot Renders the UI snapshot correctly 5`] = `
|
|
|
496
496
|
`;
|
|
497
497
|
|
|
498
498
|
exports[`Breadcrumbs Snapshot Renders the UI snapshot correctly 6`] = `
|
|
499
|
-
<nav
|
|
500
|
-
aria-label="Breadcrumb"
|
|
501
|
-
className="chakra-breadcrumb css-ruvqk2"
|
|
502
|
-
id="breadcrumbs-test"
|
|
503
|
-
>
|
|
504
|
-
<ol
|
|
505
|
-
className="chakra-breadcrumb__list css-0"
|
|
506
|
-
>
|
|
507
|
-
<li
|
|
508
|
-
className="chakra-breadcrumb__list-item css-18biwo"
|
|
509
|
-
>
|
|
510
|
-
<a
|
|
511
|
-
className="chakra-breadcrumb__link css-0"
|
|
512
|
-
href="#string1"
|
|
513
|
-
>
|
|
514
|
-
<span
|
|
515
|
-
className="breadcrumb-label"
|
|
516
|
-
>
|
|
517
|
-
string1
|
|
518
|
-
</span>
|
|
519
|
-
</a>
|
|
520
|
-
<span
|
|
521
|
-
className="css-t4q1nq"
|
|
522
|
-
role="presentation"
|
|
523
|
-
>
|
|
524
|
-
/
|
|
525
|
-
</span>
|
|
526
|
-
</li>
|
|
527
|
-
<li
|
|
528
|
-
className="chakra-breadcrumb__list-item css-18biwo"
|
|
529
|
-
>
|
|
530
|
-
<a
|
|
531
|
-
className="chakra-breadcrumb__link css-0"
|
|
532
|
-
href="#string2"
|
|
533
|
-
>
|
|
534
|
-
<svg
|
|
535
|
-
aria-hidden={true}
|
|
536
|
-
className="chakra-icon breadcrumbs-icon css-1grhd2q"
|
|
537
|
-
focusable={false}
|
|
538
|
-
id="breadcrumbs-test__backarrow"
|
|
539
|
-
role="img"
|
|
540
|
-
title="arrow icon"
|
|
541
|
-
viewBox="0 0 24 24"
|
|
542
|
-
>
|
|
543
|
-
<g
|
|
544
|
-
stroke="currentColor"
|
|
545
|
-
strokeWidth="1.5"
|
|
546
|
-
>
|
|
547
|
-
<path
|
|
548
|
-
d="M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"
|
|
549
|
-
fill="none"
|
|
550
|
-
strokeLinecap="round"
|
|
551
|
-
/>
|
|
552
|
-
<path
|
|
553
|
-
d="M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"
|
|
554
|
-
fill="currentColor"
|
|
555
|
-
strokeLinecap="round"
|
|
556
|
-
/>
|
|
557
|
-
<circle
|
|
558
|
-
cx="12"
|
|
559
|
-
cy="12"
|
|
560
|
-
fill="none"
|
|
561
|
-
r="11.25"
|
|
562
|
-
strokeMiterlimit="10"
|
|
563
|
-
/>
|
|
564
|
-
</g>
|
|
565
|
-
</svg>
|
|
566
|
-
<span
|
|
567
|
-
className="breadcrumb-label"
|
|
568
|
-
>
|
|
569
|
-
string2
|
|
570
|
-
</span>
|
|
571
|
-
</a>
|
|
572
|
-
<span
|
|
573
|
-
className="css-t4q1nq"
|
|
574
|
-
role="presentation"
|
|
575
|
-
>
|
|
576
|
-
/
|
|
577
|
-
</span>
|
|
578
|
-
</li>
|
|
579
|
-
<li
|
|
580
|
-
className="chakra-breadcrumb__list-item css-18biwo"
|
|
581
|
-
>
|
|
582
|
-
<span
|
|
583
|
-
aria-current="page"
|
|
584
|
-
className="chakra-breadcrumb__link css-0"
|
|
585
|
-
>
|
|
586
|
-
<span
|
|
587
|
-
className="breadcrumb-label"
|
|
588
|
-
>
|
|
589
|
-
string3
|
|
590
|
-
</span>
|
|
591
|
-
</span>
|
|
592
|
-
</li>
|
|
593
|
-
</ol>
|
|
594
|
-
</nav>
|
|
595
|
-
`;
|
|
596
|
-
|
|
597
|
-
exports[`Breadcrumbs Snapshot Renders the UI snapshot correctly 7`] = `
|
|
598
499
|
<nav
|
|
599
500
|
aria-label="Breadcrumb"
|
|
600
501
|
className="chakra-breadcrumb css-1t0bvx9"
|
|
@@ -693,7 +594,7 @@ exports[`Breadcrumbs Snapshot Renders the UI snapshot correctly 7`] = `
|
|
|
693
594
|
</nav>
|
|
694
595
|
`;
|
|
695
596
|
|
|
696
|
-
exports[`Breadcrumbs Snapshot Renders the UI snapshot correctly
|
|
597
|
+
exports[`Breadcrumbs Snapshot Renders the UI snapshot correctly 7`] = `
|
|
697
598
|
<nav
|
|
698
599
|
aria-label="Breadcrumb"
|
|
699
600
|
className="chakra-breadcrumb css-1xdhyk6"
|