@nypl/design-system-react-components 0.25.11 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +151 -0
- package/README.md +14 -26
- package/dist/components/Accordion/Accordion.d.ts +6 -4
- package/dist/components/Accordion/AccordionTypes.d.ts +5 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +4 -4
- package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +2 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Card/Card.d.ts +22 -29
- package/dist/components/Checkbox/Checkbox.d.ts +3 -3
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +9 -6
- package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +5 -6
- package/dist/components/Fieldset/Fieldset.d.ts +5 -6
- package/dist/components/Form/Form.d.ts +6 -6
- package/dist/components/Grid/GridTypes.d.ts +7 -7
- package/dist/components/Grid/SimpleGrid.d.ts +1 -1
- package/dist/components/Heading/Heading.d.ts +5 -5
- package/dist/components/Heading/HeadingTypes.d.ts +1 -1
- package/dist/components/HelperErrorText/HelperErrorText.d.ts +9 -8
- package/dist/components/Hero/Hero.d.ts +9 -5
- package/dist/components/HorizontalRule/HorizontalRule.d.ts +2 -10
- package/dist/components/Icons/Icon.d.ts +2 -1
- package/dist/components/Icons/IconTypes.d.ts +10 -7
- package/dist/components/Image/Image.d.ts +27 -9
- package/dist/components/Image/ImageTypes.d.ts +4 -4
- package/dist/components/Label/Label.d.ts +7 -4
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/List/List.d.ts +11 -11
- package/dist/components/List/ListTypes.d.ts +1 -1
- package/dist/components/Logo/Logo.d.ts +2 -1
- package/dist/components/Logo/LogoSvgs.d.ts +8 -0
- package/dist/components/Logo/LogoTypes.d.ts +10 -2
- package/dist/components/Notification/Notification.d.ts +7 -7
- package/dist/components/Pagination/Pagination.d.ts +8 -4
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +3 -3
- package/dist/components/Radio/Radio.d.ts +5 -7
- package/dist/components/RadioGroup/RadioGroup.d.ts +16 -8
- package/dist/components/SearchBar/SearchBar.d.ts +5 -5
- package/dist/components/Select/Select.d.ts +12 -8
- package/dist/components/Select/SelectTypes.d.ts +4 -0
- package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +8 -6
- package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +0 -4
- package/dist/components/Slider/Slider.d.ts +6 -4
- package/dist/components/StatusBadge/StatusBadge.d.ts +5 -1
- package/dist/components/StructuredContent/StructuredContent.d.ts +10 -23
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +7 -6
- package/dist/components/Template/Template.d.ts +18 -9
- package/dist/components/Text/Text.d.ts +4 -4
- package/dist/components/Text/TextTypes.d.ts +1 -1
- package/dist/components/TextInput/TextInput.d.ts +7 -7
- package/dist/components/Toggle/Toggle.d.ts +8 -10
- package/dist/components/Toggle/{ToggleSizes.d.ts → ToggleTypes.d.ts} +1 -1
- package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
- package/dist/design-system-react-components.cjs.development.js +2802 -1686
- package/dist/design-system-react-components.cjs.development.js.map +1 -1
- package/dist/design-system-react-components.cjs.production.min.js +1 -1
- package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
- package/dist/design-system-react-components.esm.js +2811 -1699
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/helpers/enums.d.ts +4 -0
- package/dist/hooks/useCarouselStyles.d.ts +3 -2
- package/dist/hooks/useNYPLTheme.d.ts +12 -0
- package/dist/index.d.ts +11 -9
- package/dist/styles.css +1 -1
- package/dist/theme/components/accordion.d.ts +7 -12
- package/dist/theme/components/breadcrumb.d.ts +6 -0
- package/dist/theme/components/button.d.ts +10 -2
- package/dist/theme/components/card.d.ts +44 -24
- package/dist/theme/components/checkbox.d.ts +6 -6
- package/dist/theme/components/checkboxGroup.d.ts +4 -2
- package/dist/theme/components/componentWrapper.d.ts +2 -2
- package/dist/theme/components/customTable.d.ts +84 -1
- package/dist/theme/components/fieldset.d.ts +6 -14
- package/dist/theme/components/global.d.ts +37 -29
- package/dist/theme/components/globalMixins.d.ts +8 -8
- package/dist/theme/components/heading.d.ts +53 -0
- package/dist/theme/components/helperErrorText.d.ts +1 -0
- package/dist/theme/components/hero.d.ts +21 -15
- package/dist/theme/components/image.d.ts +1 -1
- package/dist/theme/components/label.d.ts +9 -10
- package/dist/theme/components/list.d.ts +105 -9
- package/dist/theme/components/notification.d.ts +7 -4
- package/dist/theme/components/pagination.d.ts +2 -5
- package/dist/theme/components/radio.d.ts +10 -6
- package/dist/theme/components/radioGroup.d.ts +4 -2
- package/dist/theme/components/select.d.ts +38 -13
- package/dist/theme/components/skeletonLoader.d.ts +2 -2
- package/dist/theme/components/slider.d.ts +14 -7
- package/dist/theme/components/structuredContent.d.ts +197 -0
- package/dist/theme/components/textInput.d.ts +22 -14
- package/dist/theme/components/toggle.d.ts +25 -6
- package/dist/theme/foundations/global.d.ts +33 -3
- package/dist/theme/foundations/radii.d.ts +1 -0
- package/dist/theme/foundations/spacing.d.ts +46 -43
- package/dist/utils/utils.d.ts +10 -0
- package/package.json +5 -6
- package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +34 -0
- package/src/components/Accordion/Accordion.stories.mdx +150 -66
- package/src/components/Accordion/Accordion.test.tsx +65 -17
- package/src/components/Accordion/Accordion.tsx +61 -27
- package/src/components/Accordion/AccordionTypes.tsx +5 -0
- package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +505 -14
- package/src/components/Autosuggest/Autosuggest.stories.mdx +4 -3
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +53 -18
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +66 -35
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +14 -13
- package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +2 -1
- package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +308 -10
- package/src/components/Button/Button.stories.mdx +87 -23
- package/src/components/Button/Button.test.tsx +25 -0
- package/src/components/Button/Button.tsx +18 -7
- package/src/components/Button/__snapshots__/Button.test.tsx.snap +27 -7
- package/src/components/Card/Card.stories.mdx +493 -329
- package/src/components/Card/Card.test.tsx +138 -18
- package/src/components/Card/Card.tsx +151 -85
- package/src/components/Card/__snapshots__/Card.test.tsx.snap +220 -100
- package/src/components/Chakra/Center.stories.mdx +2 -2
- package/src/components/Chakra/Grid.stories.mdx +4 -4
- package/src/components/Checkbox/Checkbox.stories.mdx +73 -9
- package/src/components/Checkbox/Checkbox.test.tsx +89 -10
- package/src/components/Checkbox/Checkbox.tsx +27 -16
- package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +209 -6
- package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +135 -23
- package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +216 -90
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +39 -26
- package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +493 -89
- package/src/components/ComponentWrapper/ComponentWrapper.test.tsx +12 -0
- package/src/components/ComponentWrapper/ComponentWrapper.tsx +39 -41
- package/src/components/ComponentWrapper/__snapshots__/ComponentWrapper.test.tsx.snap +47 -34
- package/src/components/DatePicker/DatePicker.stories.mdx +63 -27
- package/src/components/DatePicker/DatePicker.test.tsx +94 -15
- package/src/components/DatePicker/DatePicker.tsx +67 -58
- package/src/components/DatePicker/_DatePicker.scss +71 -13
- package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +250 -206
- package/src/components/Fieldset/Fieldset.stories.mdx +33 -3
- package/src/components/Fieldset/Fieldset.test.tsx +58 -28
- package/src/components/Fieldset/Fieldset.tsx +35 -30
- package/src/components/Fieldset/__snapshots__/Fieldset.test.tsx.snap +40 -19
- package/src/components/Form/Form.stories.mdx +118 -47
- package/src/components/Form/Form.test.tsx +59 -16
- package/src/components/Form/Form.tsx +89 -65
- package/src/components/Form/__snapshots__/Form.test.tsx.snap +83 -5
- package/src/components/Grid/GridTypes.tsx +7 -7
- package/src/components/Grid/SimpleGrid.stories.mdx +87 -41
- package/src/components/Grid/SimpleGrid.test.tsx +24 -9
- package/src/components/Grid/SimpleGrid.tsx +29 -20
- package/src/components/Grid/__snapshots__/SimpleGrid.test.tsx.snap +16 -1
- package/src/components/Heading/Heading.stories.mdx +56 -25
- package/src/components/Heading/Heading.test.tsx +17 -7
- package/src/components/Heading/Heading.tsx +60 -58
- package/src/components/Heading/HeadingTypes.tsx +1 -1
- package/src/components/Heading/__snapshots__/Heading.test.tsx.snap +27 -8
- package/src/components/HelperErrorText/HelperErrorText.stories.mdx +64 -42
- package/src/components/HelperErrorText/HelperErrorText.test.tsx +15 -0
- package/src/components/HelperErrorText/HelperErrorText.tsx +40 -35
- package/src/components/HelperErrorText/__snapshots__/HelperErrorText.test.tsx.snap +35 -4
- package/src/components/Hero/Hero.stories.mdx +143 -113
- package/src/components/Hero/Hero.test.tsx +146 -58
- package/src/components/Hero/Hero.tsx +144 -112
- package/src/components/Hero/__snapshots__/Hero.test.tsx.snap +89 -17
- package/src/components/HorizontalRule/HorizontalRule.stories.mdx +26 -4
- package/src/components/HorizontalRule/HorizontalRule.test.tsx +9 -17
- package/src/components/HorizontalRule/HorizontalRule.tsx +9 -25
- package/src/components/HorizontalRule/__snapshots__/HorizontalRule.test.tsx.snap +18 -5
- package/src/components/Icons/Icon.stories.mdx +80 -23
- package/src/components/Icons/Icon.test.tsx +51 -2
- package/src/components/Icons/Icon.tsx +93 -71
- package/src/components/Icons/IconTypes.tsx +9 -6
- package/src/components/Icons/__snapshots__/Icon.test.tsx.snap +129 -0
- package/src/components/Image/Image.stories.mdx +160 -71
- package/src/components/Image/Image.test.tsx +40 -48
- package/src/components/Image/Image.tsx +80 -48
- package/src/components/Image/ImageTypes.ts +4 -4
- package/src/components/Image/__snapshots__/Image.test.tsx.snap +84 -21
- package/src/components/Label/Label.stories.mdx +42 -20
- package/src/components/Label/Label.test.tsx +42 -17
- package/src/components/Label/Label.tsx +22 -13
- package/src/components/Label/__snapshots__/Label.test.tsx.snap +19 -15
- package/src/components/Link/Link.stories.mdx +25 -1
- package/src/components/Link/Link.test.tsx +21 -0
- package/src/components/Link/Link.tsx +16 -9
- package/src/components/Link/__snapshots__/Link.test.tsx.snap +37 -11
- package/src/components/List/List.stories.mdx +75 -40
- package/src/components/List/List.test.tsx +73 -22
- package/src/components/List/List.tsx +44 -28
- package/src/components/List/ListTypes.tsx +1 -1
- package/src/components/List/__snapshots__/List.test.tsx.snap +110 -8
- package/src/components/Logo/Logo.stories.mdx +40 -16
- package/src/components/Logo/Logo.test.tsx +29 -2
- package/src/components/Logo/Logo.tsx +28 -11
- package/src/components/Logo/LogoSvgs.tsx +16 -0
- package/src/components/Logo/LogoTypes.tsx +9 -1
- package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +73 -2
- package/src/components/Modal/Modal.stories.mdx +13 -0
- package/src/components/Notification/Notification.stories.mdx +34 -5
- package/src/components/Notification/Notification.test.tsx +43 -9
- package/src/components/Notification/Notification.tsx +59 -55
- package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +256 -32
- package/src/components/Pagination/Pagination.stories.mdx +76 -13
- package/src/components/Pagination/Pagination.test.tsx +116 -5
- package/src/components/Pagination/Pagination.tsx +54 -29
- package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +247 -30
- package/src/components/Placeholder/Placeholder.tsx +3 -1
- package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +76 -10
- package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +87 -13
- package/src/components/ProgressIndicator/ProgressIndicator.tsx +20 -10
- package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +101 -14
- package/src/components/Radio/Radio.stories.mdx +75 -11
- package/src/components/Radio/Radio.test.tsx +83 -9
- package/src/components/Radio/Radio.tsx +70 -61
- package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +168 -10
- package/src/components/RadioGroup/RadioGroup.stories.mdx +293 -94
- package/src/components/RadioGroup/RadioGroup.test.tsx +193 -68
- package/src/components/RadioGroup/RadioGroup.tsx +110 -101
- package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1258 -902
- package/src/components/SearchBar/SearchBar.stories.mdx +104 -39
- package/src/components/SearchBar/{SearchBar.Test.tsx → SearchBar.test.tsx} +66 -6
- package/src/components/SearchBar/SearchBar.tsx +23 -13
- package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1039 -0
- package/src/components/Select/Select.stories.mdx +151 -62
- package/src/components/Select/Select.test.tsx +56 -44
- package/src/components/Select/Select.tsx +125 -104
- package/src/components/Select/SelectTypes.tsx +5 -0
- package/src/components/Select/__snapshots__/Select.test.tsx.snap +749 -409
- package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +53 -23
- package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +14 -8
- package/src/components/SkeletonLoader/SkeletonLoader.tsx +80 -78
- package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +0 -5
- package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +169 -10
- package/src/components/Slider/Slider.stories.mdx +123 -41
- package/src/components/Slider/Slider.test.tsx +65 -17
- package/src/components/Slider/Slider.tsx +34 -24
- package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +403 -226
- package/src/components/StatusBadge/StatusBadge.stories.mdx +19 -1
- package/src/components/StatusBadge/StatusBadge.test.tsx +19 -1
- package/src/components/StatusBadge/StatusBadge.tsx +25 -20
- package/src/components/StatusBadge/__snapshots__/StatusBadge.test.tsx.snap +22 -3
- package/src/components/StructuredContent/StructuredContent.stories.mdx +229 -61
- package/src/components/StructuredContent/StructuredContent.test.tsx +162 -101
- package/src/components/StructuredContent/StructuredContent.tsx +98 -103
- package/src/components/StructuredContent/__snapshots__/StructuredContent.test.tsx.snap +102 -17
- package/src/components/StyleGuide/Bidirectionality.stories.mdx +9 -9
- package/src/components/StyleGuide/Breakpoints.stories.mdx +6 -6
- package/src/components/StyleGuide/Buttons.stories.mdx +2 -12
- package/src/components/StyleGuide/ColorCard.tsx +4 -4
- package/src/components/StyleGuide/Colors.stories.mdx +34 -20
- package/src/components/StyleGuide/DesignTokens.stories.mdx +56 -26
- package/src/components/StyleGuide/Forms.stories.mdx +27 -12
- package/src/components/StyleGuide/Iconography.stories.mdx +2 -12
- package/src/components/StyleGuide/Spacing.stories.mdx +80 -41
- package/src/components/StyleGuide/Typography.stories.mdx +47 -33
- package/src/components/Table/Table.stories.mdx +38 -11
- package/src/components/Table/Table.test.tsx +16 -1
- package/src/components/Table/Table.tsx +10 -8
- package/src/components/Table/__snapshots__/Table.test.tsx.snap +408 -5
- package/src/components/Tabs/Tabs.stories.mdx +59 -10
- package/src/components/Tabs/Tabs.test.tsx +29 -11
- package/src/components/Tabs/Tabs.tsx +28 -21
- package/src/components/Tabs/__snapshots__/Tabs.test.tsx.snap +394 -5
- package/src/components/Template/Template.stories.mdx +73 -32
- package/src/components/Template/Template.test.tsx +68 -5
- package/src/components/Template/Template.tsx +86 -72
- package/src/components/Template/__snapshots__/Template.test.tsx.snap +195 -22
- package/src/components/Text/Text.stories.mdx +32 -15
- package/src/components/Text/Text.test.tsx +14 -11
- package/src/components/Text/Text.tsx +13 -16
- package/src/components/Text/TextTypes.tsx +1 -1
- package/src/components/Text/__snapshots__/Text.test.tsx.snap +21 -4
- package/src/components/TextInput/TextInput.stories.mdx +73 -27
- package/src/components/TextInput/TextInput.test.tsx +65 -50
- package/src/components/TextInput/TextInput.tsx +123 -115
- package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +96 -73
- package/src/components/Toggle/Toggle.stories.mdx +74 -26
- package/src/components/Toggle/Toggle.test.tsx +41 -10
- package/src/components/Toggle/Toggle.tsx +31 -27
- package/src/components/Toggle/{ToggleSizes.tsx → ToggleTypes.tsx} +1 -1
- package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +195 -8
- package/src/components/VideoPlayer/VideoPlayer.stories.mdx +52 -4
- package/src/components/VideoPlayer/VideoPlayer.test.tsx +41 -6
- package/src/components/VideoPlayer/VideoPlayer.tsx +134 -120
- package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +81 -39
- package/src/docs/Chakra.stories.mdx +51 -10
- package/src/docs/Welcome.stories.mdx +168 -0
- package/src/{components/Card/CardTypes.tsx → helpers/enums.ts} +2 -2
- package/src/hooks/tests/useNYPLTheme.test.tsx +1 -1
- package/src/hooks/useCarouselStyles.stories.mdx +30 -0
- package/src/hooks/useCarouselStyles.ts +3 -2
- package/src/hooks/useNYPLTheme.stories.mdx +101 -0
- package/src/hooks/useNYPLTheme.ts +31 -7
- package/src/hooks/useWindowSize.stories.mdx +23 -0
- package/src/index.ts +11 -15
- package/src/styles/base/_place-holder.scss +3 -1
- package/src/styles.scss +0 -2
- package/src/theme/components/accordion.ts +7 -12
- package/src/theme/components/breadcrumb.ts +7 -0
- package/src/theme/components/button.ts +15 -7
- package/src/theme/components/card.ts +56 -36
- package/src/theme/components/checkbox.ts +12 -14
- package/src/theme/components/checkboxGroup.ts +4 -2
- package/src/theme/components/componentWrapper.ts +2 -2
- package/src/theme/components/customTable.ts +39 -31
- package/src/theme/components/fieldset.ts +3 -2
- package/src/theme/components/global.ts +42 -33
- package/src/theme/components/globalMixins.ts +8 -8
- package/src/theme/components/heading.ts +1 -1
- package/src/theme/components/helperErrorText.ts +1 -0
- package/src/theme/components/hero.ts +14 -16
- package/src/theme/components/icon.ts +5 -2
- package/src/theme/components/image.ts +1 -1
- package/src/theme/components/label.ts +4 -3
- package/src/theme/components/list.ts +76 -65
- package/src/theme/components/notification.ts +10 -7
- package/src/theme/components/pagination.ts +2 -5
- package/src/theme/components/progressIndicator.ts +3 -3
- package/src/theme/components/radio.ts +11 -14
- package/src/theme/components/radioGroup.ts +4 -2
- package/src/theme/components/select.ts +37 -18
- package/src/theme/components/skeletonLoader.ts +3 -3
- package/src/theme/components/slider.ts +19 -15
- package/src/theme/components/statusBadge.ts +2 -2
- package/src/theme/components/structuredContent.ts +66 -1
- package/src/theme/components/tabs.ts +2 -2
- package/src/theme/components/template.ts +9 -9
- package/src/theme/components/textInput.ts +13 -12
- package/src/theme/components/toggle.ts +76 -42
- package/src/theme/components/videoPlayer.ts +1 -1
- package/src/theme/foundations/colors.ts +20 -13
- package/src/theme/foundations/global.ts +17 -5
- package/src/theme/foundations/radii.ts +1 -0
- package/src/theme/foundations/spacing.ts +70 -22
- package/src/theme/foundations/typography.ts +3 -3
- package/src/utils/componentCategories.ts +28 -21
- package/src/utils/utils.ts +28 -0
- package/dist/components/Card/CardTypes.d.ts +0 -4
- package/dist/components/CheckboxGroup/CheckboxGroupLayoutTypes.d.ts +0 -4
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -13
- package/dist/components/RadioGroup/RadioGroupLayoutTypes.d.ts +0 -4
- package/dist/components/SearchBar/SearchBar.Test.d.ts +0 -1
- package/dist/helpers/generateUUID.d.ts +0 -1
- package/src/components/CheckboxGroup/CheckboxGroupLayoutTypes.tsx +0 -4
- package/src/components/Pagination/Pagination.stories.tsx +0 -54
- package/src/components/RadioGroup/RadioGroupLayoutTypes.tsx +0 -4
- package/src/docs/Intro.stories.mdx +0 -53
- package/src/helpers/generateUUID.tsx +0 -5
- package/src/styles/base/_03-base.scss +0 -25
- package/src/styles/base/_04-focus.scss +0 -22
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Pagination Rendering
|
|
3
|
+
exports[`Pagination Rendering renders the UI snapshot correctly 1`] = `
|
|
4
4
|
<nav
|
|
5
5
|
aria-label="Pagination"
|
|
6
|
-
className="css-
|
|
6
|
+
className="css-1xdhyk6"
|
|
7
7
|
id="firstPage"
|
|
8
8
|
role="navigation"
|
|
9
9
|
>
|
|
10
10
|
<ul
|
|
11
|
-
className="css-
|
|
11
|
+
className="css-1xdhyk6"
|
|
12
12
|
id="firstPage-list"
|
|
13
13
|
>
|
|
14
14
|
<li>
|
|
15
15
|
<a
|
|
16
16
|
aria-current="page"
|
|
17
17
|
aria-label="Page 1"
|
|
18
|
-
className="css-
|
|
18
|
+
className="css-1eo4rk2"
|
|
19
19
|
href="page=1"
|
|
20
20
|
id="firstPage-1"
|
|
21
21
|
rel={null}
|
|
@@ -28,7 +28,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 1`] = `
|
|
|
28
28
|
<a
|
|
29
29
|
aria-current={null}
|
|
30
30
|
aria-label="Page 2"
|
|
31
|
-
className="css-
|
|
31
|
+
className="css-1xdhyk6"
|
|
32
32
|
href="page=2"
|
|
33
33
|
id="firstPage-2"
|
|
34
34
|
rel={null}
|
|
@@ -41,7 +41,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 1`] = `
|
|
|
41
41
|
<a
|
|
42
42
|
aria-current={null}
|
|
43
43
|
aria-label="Page 3"
|
|
44
|
-
className="css-
|
|
44
|
+
className="css-1xdhyk6"
|
|
45
45
|
href="page=3"
|
|
46
46
|
id="firstPage-3"
|
|
47
47
|
rel={null}
|
|
@@ -54,7 +54,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 1`] = `
|
|
|
54
54
|
<a
|
|
55
55
|
aria-current={null}
|
|
56
56
|
aria-label="Page 4"
|
|
57
|
-
className="css-
|
|
57
|
+
className="css-1xdhyk6"
|
|
58
58
|
href="page=4"
|
|
59
59
|
id="firstPage-4"
|
|
60
60
|
rel={null}
|
|
@@ -67,7 +67,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 1`] = `
|
|
|
67
67
|
<a
|
|
68
68
|
aria-current={null}
|
|
69
69
|
aria-label="Page 5"
|
|
70
|
-
className="css-
|
|
70
|
+
className="css-1xdhyk6"
|
|
71
71
|
href="page=5"
|
|
72
72
|
id="firstPage-5"
|
|
73
73
|
rel={null}
|
|
@@ -83,7 +83,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 1`] = `
|
|
|
83
83
|
<a
|
|
84
84
|
aria-current={null}
|
|
85
85
|
aria-label="Page 10"
|
|
86
|
-
className="css-
|
|
86
|
+
className="css-1xdhyk6"
|
|
87
87
|
href="page=10"
|
|
88
88
|
id="firstPage-10"
|
|
89
89
|
rel={null}
|
|
@@ -95,7 +95,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 1`] = `
|
|
|
95
95
|
<li>
|
|
96
96
|
<a
|
|
97
97
|
aria-label="Next page"
|
|
98
|
-
className="css-
|
|
98
|
+
className="css-1xdhyk6"
|
|
99
99
|
href="page=2"
|
|
100
100
|
id="firstPage-Next"
|
|
101
101
|
rel={null}
|
|
@@ -108,21 +108,21 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 1`] = `
|
|
|
108
108
|
</nav>
|
|
109
109
|
`;
|
|
110
110
|
|
|
111
|
-
exports[`Pagination Rendering
|
|
111
|
+
exports[`Pagination Rendering renders the UI snapshot correctly 2`] = `
|
|
112
112
|
<nav
|
|
113
113
|
aria-label="Pagination"
|
|
114
|
-
className="css-
|
|
114
|
+
className="css-1xdhyk6"
|
|
115
115
|
id="lastPage"
|
|
116
116
|
role="navigation"
|
|
117
117
|
>
|
|
118
118
|
<ul
|
|
119
|
-
className="css-
|
|
119
|
+
className="css-1xdhyk6"
|
|
120
120
|
id="lastPage-list"
|
|
121
121
|
>
|
|
122
122
|
<li>
|
|
123
123
|
<a
|
|
124
124
|
aria-label="Previous page"
|
|
125
|
-
className="css-
|
|
125
|
+
className="css-1xdhyk6"
|
|
126
126
|
href="page=9"
|
|
127
127
|
id="lastPage-Previous"
|
|
128
128
|
rel={null}
|
|
@@ -135,7 +135,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 2`] = `
|
|
|
135
135
|
<a
|
|
136
136
|
aria-current={null}
|
|
137
137
|
aria-label="Page 1"
|
|
138
|
-
className="css-
|
|
138
|
+
className="css-1xdhyk6"
|
|
139
139
|
href="page=1"
|
|
140
140
|
id="lastPage-1"
|
|
141
141
|
rel={null}
|
|
@@ -151,7 +151,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 2`] = `
|
|
|
151
151
|
<a
|
|
152
152
|
aria-current={null}
|
|
153
153
|
aria-label="Page 6"
|
|
154
|
-
className="css-
|
|
154
|
+
className="css-1xdhyk6"
|
|
155
155
|
href="page=6"
|
|
156
156
|
id="lastPage-6"
|
|
157
157
|
rel={null}
|
|
@@ -164,7 +164,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 2`] = `
|
|
|
164
164
|
<a
|
|
165
165
|
aria-current={null}
|
|
166
166
|
aria-label="Page 7"
|
|
167
|
-
className="css-
|
|
167
|
+
className="css-1xdhyk6"
|
|
168
168
|
href="page=7"
|
|
169
169
|
id="lastPage-7"
|
|
170
170
|
rel={null}
|
|
@@ -177,7 +177,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 2`] = `
|
|
|
177
177
|
<a
|
|
178
178
|
aria-current={null}
|
|
179
179
|
aria-label="Page 8"
|
|
180
|
-
className="css-
|
|
180
|
+
className="css-1xdhyk6"
|
|
181
181
|
href="page=8"
|
|
182
182
|
id="lastPage-8"
|
|
183
183
|
rel={null}
|
|
@@ -190,7 +190,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 2`] = `
|
|
|
190
190
|
<a
|
|
191
191
|
aria-current={null}
|
|
192
192
|
aria-label="Page 9"
|
|
193
|
-
className="css-
|
|
193
|
+
className="css-1xdhyk6"
|
|
194
194
|
href="page=9"
|
|
195
195
|
id="lastPage-9"
|
|
196
196
|
rel={null}
|
|
@@ -203,7 +203,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 2`] = `
|
|
|
203
203
|
<a
|
|
204
204
|
aria-current="page"
|
|
205
205
|
aria-label="Page 10"
|
|
206
|
-
className="css-
|
|
206
|
+
className="css-1eo4rk2"
|
|
207
207
|
href="page=10"
|
|
208
208
|
id="lastPage-10"
|
|
209
209
|
rel={null}
|
|
@@ -216,21 +216,21 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 2`] = `
|
|
|
216
216
|
</nav>
|
|
217
217
|
`;
|
|
218
218
|
|
|
219
|
-
exports[`Pagination Rendering
|
|
219
|
+
exports[`Pagination Rendering renders the UI snapshot correctly 3`] = `
|
|
220
220
|
<nav
|
|
221
221
|
aria-label="Pagination"
|
|
222
|
-
className="css-
|
|
222
|
+
className="css-1xdhyk6"
|
|
223
223
|
id="middlePage"
|
|
224
224
|
role="navigation"
|
|
225
225
|
>
|
|
226
226
|
<ul
|
|
227
|
-
className="css-
|
|
227
|
+
className="css-1xdhyk6"
|
|
228
228
|
id="middlePage-list"
|
|
229
229
|
>
|
|
230
230
|
<li>
|
|
231
231
|
<a
|
|
232
232
|
aria-label="Previous page"
|
|
233
|
-
className="css-
|
|
233
|
+
className="css-1xdhyk6"
|
|
234
234
|
href="page=4"
|
|
235
235
|
id="middlePage-Previous"
|
|
236
236
|
rel={null}
|
|
@@ -243,7 +243,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 3`] = `
|
|
|
243
243
|
<a
|
|
244
244
|
aria-current={null}
|
|
245
245
|
aria-label="Page 1"
|
|
246
|
-
className="css-
|
|
246
|
+
className="css-1xdhyk6"
|
|
247
247
|
href="page=1"
|
|
248
248
|
id="middlePage-1"
|
|
249
249
|
rel={null}
|
|
@@ -259,7 +259,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 3`] = `
|
|
|
259
259
|
<a
|
|
260
260
|
aria-current={null}
|
|
261
261
|
aria-label="Page 4"
|
|
262
|
-
className="css-
|
|
262
|
+
className="css-1xdhyk6"
|
|
263
263
|
href="page=4"
|
|
264
264
|
id="middlePage-4"
|
|
265
265
|
rel={null}
|
|
@@ -272,7 +272,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 3`] = `
|
|
|
272
272
|
<a
|
|
273
273
|
aria-current="page"
|
|
274
274
|
aria-label="Page 5"
|
|
275
|
-
className="css-
|
|
275
|
+
className="css-1eo4rk2"
|
|
276
276
|
href="page=5"
|
|
277
277
|
id="middlePage-5"
|
|
278
278
|
rel={null}
|
|
@@ -285,7 +285,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 3`] = `
|
|
|
285
285
|
<a
|
|
286
286
|
aria-current={null}
|
|
287
287
|
aria-label="Page 6"
|
|
288
|
-
className="css-
|
|
288
|
+
className="css-1xdhyk6"
|
|
289
289
|
href="page=6"
|
|
290
290
|
id="middlePage-6"
|
|
291
291
|
rel={null}
|
|
@@ -301,7 +301,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 3`] = `
|
|
|
301
301
|
<a
|
|
302
302
|
aria-current={null}
|
|
303
303
|
aria-label="Page 10"
|
|
304
|
-
className="css-
|
|
304
|
+
className="css-1xdhyk6"
|
|
305
305
|
href="page=10"
|
|
306
306
|
id="middlePage-10"
|
|
307
307
|
rel={null}
|
|
@@ -313,7 +313,7 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 3`] = `
|
|
|
313
313
|
<li>
|
|
314
314
|
<a
|
|
315
315
|
aria-label="Next page"
|
|
316
|
-
className="css-
|
|
316
|
+
className="css-1xdhyk6"
|
|
317
317
|
href="page=6"
|
|
318
318
|
id="middlePage-Next"
|
|
319
319
|
rel={null}
|
|
@@ -325,3 +325,220 @@ exports[`Pagination Rendering Renders the UI snapshot correctly 3`] = `
|
|
|
325
325
|
</ul>
|
|
326
326
|
</nav>
|
|
327
327
|
`;
|
|
328
|
+
|
|
329
|
+
exports[`Pagination Rendering renders the UI snapshot correctly 4`] = `
|
|
330
|
+
<nav
|
|
331
|
+
aria-label="Pagination"
|
|
332
|
+
className="css-kle7zy"
|
|
333
|
+
id="chakra"
|
|
334
|
+
role="navigation"
|
|
335
|
+
>
|
|
336
|
+
<ul
|
|
337
|
+
className="css-1xdhyk6"
|
|
338
|
+
id="chakra-list"
|
|
339
|
+
>
|
|
340
|
+
<li>
|
|
341
|
+
<a
|
|
342
|
+
aria-current="page"
|
|
343
|
+
aria-label="Page 1"
|
|
344
|
+
className="css-1eo4rk2"
|
|
345
|
+
href="page=1"
|
|
346
|
+
id="chakra-1"
|
|
347
|
+
rel={null}
|
|
348
|
+
target={null}
|
|
349
|
+
>
|
|
350
|
+
1
|
|
351
|
+
</a>
|
|
352
|
+
</li>
|
|
353
|
+
<li>
|
|
354
|
+
<a
|
|
355
|
+
aria-current={null}
|
|
356
|
+
aria-label="Page 2"
|
|
357
|
+
className="css-1xdhyk6"
|
|
358
|
+
href="page=2"
|
|
359
|
+
id="chakra-2"
|
|
360
|
+
rel={null}
|
|
361
|
+
target={null}
|
|
362
|
+
>
|
|
363
|
+
2
|
|
364
|
+
</a>
|
|
365
|
+
</li>
|
|
366
|
+
<li>
|
|
367
|
+
<a
|
|
368
|
+
aria-current={null}
|
|
369
|
+
aria-label="Page 3"
|
|
370
|
+
className="css-1xdhyk6"
|
|
371
|
+
href="page=3"
|
|
372
|
+
id="chakra-3"
|
|
373
|
+
rel={null}
|
|
374
|
+
target={null}
|
|
375
|
+
>
|
|
376
|
+
3
|
|
377
|
+
</a>
|
|
378
|
+
</li>
|
|
379
|
+
<li>
|
|
380
|
+
<a
|
|
381
|
+
aria-current={null}
|
|
382
|
+
aria-label="Page 4"
|
|
383
|
+
className="css-1xdhyk6"
|
|
384
|
+
href="page=4"
|
|
385
|
+
id="chakra-4"
|
|
386
|
+
rel={null}
|
|
387
|
+
target={null}
|
|
388
|
+
>
|
|
389
|
+
4
|
|
390
|
+
</a>
|
|
391
|
+
</li>
|
|
392
|
+
<li>
|
|
393
|
+
<a
|
|
394
|
+
aria-current={null}
|
|
395
|
+
aria-label="Page 5"
|
|
396
|
+
className="css-1xdhyk6"
|
|
397
|
+
href="page=5"
|
|
398
|
+
id="chakra-5"
|
|
399
|
+
rel={null}
|
|
400
|
+
target={null}
|
|
401
|
+
>
|
|
402
|
+
5
|
|
403
|
+
</a>
|
|
404
|
+
</li>
|
|
405
|
+
<li>
|
|
406
|
+
...
|
|
407
|
+
</li>
|
|
408
|
+
<li>
|
|
409
|
+
<a
|
|
410
|
+
aria-current={null}
|
|
411
|
+
aria-label="Page 10"
|
|
412
|
+
className="css-1xdhyk6"
|
|
413
|
+
href="page=10"
|
|
414
|
+
id="chakra-10"
|
|
415
|
+
rel={null}
|
|
416
|
+
target={null}
|
|
417
|
+
>
|
|
418
|
+
10
|
|
419
|
+
</a>
|
|
420
|
+
</li>
|
|
421
|
+
<li>
|
|
422
|
+
<a
|
|
423
|
+
aria-label="Next page"
|
|
424
|
+
className="css-1xdhyk6"
|
|
425
|
+
href="page=2"
|
|
426
|
+
id="chakra-Next"
|
|
427
|
+
rel={null}
|
|
428
|
+
target={null}
|
|
429
|
+
>
|
|
430
|
+
Next
|
|
431
|
+
</a>
|
|
432
|
+
</li>
|
|
433
|
+
</ul>
|
|
434
|
+
</nav>
|
|
435
|
+
`;
|
|
436
|
+
|
|
437
|
+
exports[`Pagination Rendering renders the UI snapshot correctly 5`] = `
|
|
438
|
+
<nav
|
|
439
|
+
aria-label="Pagination"
|
|
440
|
+
className="css-1xdhyk6"
|
|
441
|
+
data-testid="props"
|
|
442
|
+
id="props"
|
|
443
|
+
role="navigation"
|
|
444
|
+
>
|
|
445
|
+
<ul
|
|
446
|
+
className="css-1xdhyk6"
|
|
447
|
+
id="props-list"
|
|
448
|
+
>
|
|
449
|
+
<li>
|
|
450
|
+
<a
|
|
451
|
+
aria-current="page"
|
|
452
|
+
aria-label="Page 1"
|
|
453
|
+
className="css-1eo4rk2"
|
|
454
|
+
href="page=1"
|
|
455
|
+
id="props-1"
|
|
456
|
+
rel={null}
|
|
457
|
+
target={null}
|
|
458
|
+
>
|
|
459
|
+
1
|
|
460
|
+
</a>
|
|
461
|
+
</li>
|
|
462
|
+
<li>
|
|
463
|
+
<a
|
|
464
|
+
aria-current={null}
|
|
465
|
+
aria-label="Page 2"
|
|
466
|
+
className="css-1xdhyk6"
|
|
467
|
+
href="page=2"
|
|
468
|
+
id="props-2"
|
|
469
|
+
rel={null}
|
|
470
|
+
target={null}
|
|
471
|
+
>
|
|
472
|
+
2
|
|
473
|
+
</a>
|
|
474
|
+
</li>
|
|
475
|
+
<li>
|
|
476
|
+
<a
|
|
477
|
+
aria-current={null}
|
|
478
|
+
aria-label="Page 3"
|
|
479
|
+
className="css-1xdhyk6"
|
|
480
|
+
href="page=3"
|
|
481
|
+
id="props-3"
|
|
482
|
+
rel={null}
|
|
483
|
+
target={null}
|
|
484
|
+
>
|
|
485
|
+
3
|
|
486
|
+
</a>
|
|
487
|
+
</li>
|
|
488
|
+
<li>
|
|
489
|
+
<a
|
|
490
|
+
aria-current={null}
|
|
491
|
+
aria-label="Page 4"
|
|
492
|
+
className="css-1xdhyk6"
|
|
493
|
+
href="page=4"
|
|
494
|
+
id="props-4"
|
|
495
|
+
rel={null}
|
|
496
|
+
target={null}
|
|
497
|
+
>
|
|
498
|
+
4
|
|
499
|
+
</a>
|
|
500
|
+
</li>
|
|
501
|
+
<li>
|
|
502
|
+
<a
|
|
503
|
+
aria-current={null}
|
|
504
|
+
aria-label="Page 5"
|
|
505
|
+
className="css-1xdhyk6"
|
|
506
|
+
href="page=5"
|
|
507
|
+
id="props-5"
|
|
508
|
+
rel={null}
|
|
509
|
+
target={null}
|
|
510
|
+
>
|
|
511
|
+
5
|
|
512
|
+
</a>
|
|
513
|
+
</li>
|
|
514
|
+
<li>
|
|
515
|
+
...
|
|
516
|
+
</li>
|
|
517
|
+
<li>
|
|
518
|
+
<a
|
|
519
|
+
aria-current={null}
|
|
520
|
+
aria-label="Page 10"
|
|
521
|
+
className="css-1xdhyk6"
|
|
522
|
+
href="page=10"
|
|
523
|
+
id="props-10"
|
|
524
|
+
rel={null}
|
|
525
|
+
target={null}
|
|
526
|
+
>
|
|
527
|
+
10
|
|
528
|
+
</a>
|
|
529
|
+
</li>
|
|
530
|
+
<li>
|
|
531
|
+
<a
|
|
532
|
+
aria-label="Next page"
|
|
533
|
+
className="css-1xdhyk6"
|
|
534
|
+
href="page=2"
|
|
535
|
+
id="props-Next"
|
|
536
|
+
rel={null}
|
|
537
|
+
target={null}
|
|
538
|
+
>
|
|
539
|
+
Next
|
|
540
|
+
</a>
|
|
541
|
+
</li>
|
|
542
|
+
</ul>
|
|
543
|
+
</nav>
|
|
544
|
+
`;
|
|
@@ -13,5 +13,7 @@ export default function Placeholder({
|
|
|
13
13
|
children,
|
|
14
14
|
variant,
|
|
15
15
|
}: React.PropsWithChildren<PlaceholderProps>) {
|
|
16
|
-
return
|
|
16
|
+
return (
|
|
17
|
+
<div className={`placeholder placeholder--${variant}`}>{children}</div>
|
|
18
|
+
);
|
|
17
19
|
}
|
|
@@ -71,10 +71,27 @@ export const typesEnumValues = getStorybookEnumValues(
|
|
|
71
71
|
| Component Version | DS Version |
|
|
72
72
|
| ----------------- | ---------- |
|
|
73
73
|
| Added | `0.25.4` |
|
|
74
|
-
| Latest | `0.
|
|
74
|
+
| Latest | `0.26.0` |
|
|
75
|
+
|
|
76
|
+
## Table of Contents
|
|
77
|
+
|
|
78
|
+
- [Overview](#overview)
|
|
79
|
+
- [Component Props](#component-props)
|
|
80
|
+
- [Accessibility](#accessibility)
|
|
81
|
+
- [Linear Type](#linear-type)
|
|
82
|
+
- [Circular Type](#circular-type)
|
|
83
|
+
- [Sizing](#sizing)
|
|
84
|
+
- [Labels](#labels)
|
|
85
|
+
- [Indeterminate State](#indeterminate-state)
|
|
86
|
+
- [Dark Mode](#dark-mode)
|
|
87
|
+
- [Get Input Values](#get-input-values)
|
|
88
|
+
|
|
89
|
+
## Overview
|
|
75
90
|
|
|
76
91
|
<Description of={ProgressIndicator} />
|
|
77
92
|
|
|
93
|
+
## Component Props
|
|
94
|
+
|
|
78
95
|
<Canvas withToolbar>
|
|
79
96
|
<Story
|
|
80
97
|
name="ProgressIndicator with Controls"
|
|
@@ -101,6 +118,26 @@ export const typesEnumValues = getStorybookEnumValues(
|
|
|
101
118
|
|
|
102
119
|
<ArgsTable story="ProgressIndicator with Controls" />
|
|
103
120
|
|
|
121
|
+
## Accessibility
|
|
122
|
+
|
|
123
|
+
Chakra UI takes care of the internal accessibility attributes for this component.
|
|
124
|
+
Specifically, the `role` attribute is set to `progressbar` and the `aria-valuenow`
|
|
125
|
+
attribute is set to the value of the `value` prop, or the percentage completion
|
|
126
|
+
value. The min and max values are set to "0" and "100", respectively, and are set
|
|
127
|
+
with the `aria-valuemin` and `aria-valuemax` attributes. This makes this
|
|
128
|
+
component and its value(s) visible to screen readers.
|
|
129
|
+
|
|
130
|
+
When `showLabel` is set to false, the `labelText` value will be set to the
|
|
131
|
+
main `<div>`'s `aria-label` attribute. This is the same div that contains the
|
|
132
|
+
`aria-valuemin`, `aria-valuemax`, and `aria-valuenow` attributes.
|
|
133
|
+
|
|
134
|
+
Resources:
|
|
135
|
+
|
|
136
|
+
- [DigitalA11y WAI-ARIA: ROLE=PROGRESSBAR](https://www.digitala11y.com/progressbar-role/)
|
|
137
|
+
- [MDN Using the progressbar role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_progressbar_role)
|
|
138
|
+
- [Chakra UI Progress](https://chakra-ui.com/docs/components/feedback/progress)
|
|
139
|
+
- [Chakra UI Circular Progress](https://chakra-ui.com/docs/components/feedback/circular-progress)
|
|
140
|
+
|
|
104
141
|
## Linear Type
|
|
105
142
|
|
|
106
143
|
Progress bars are preferred in vertically narrow areas such as tables, cards,
|
|
@@ -114,6 +151,7 @@ dialogs, etc.
|
|
|
114
151
|
}}
|
|
115
152
|
>
|
|
116
153
|
<ProgressIndicator
|
|
154
|
+
id="linear"
|
|
117
155
|
indicatorType={ProgressIndicatorTypes.Linear}
|
|
118
156
|
labelText="Linear Progress Type"
|
|
119
157
|
value={50}
|
|
@@ -135,6 +173,7 @@ full-screen loading. Set the `indicatorType` prop to
|
|
|
135
173
|
}}
|
|
136
174
|
>
|
|
137
175
|
<ProgressIndicator
|
|
176
|
+
id="circular"
|
|
138
177
|
indicatorType={ProgressIndicatorTypes.Circular}
|
|
139
178
|
labelText="Linear Progress Type"
|
|
140
179
|
value={50}
|
|
@@ -142,7 +181,7 @@ full-screen loading. Set the `indicatorType` prop to
|
|
|
142
181
|
</Story>
|
|
143
182
|
</Canvas>
|
|
144
183
|
|
|
145
|
-
|
|
184
|
+
## Sizing
|
|
146
185
|
|
|
147
186
|
The starting height for the progress bar is 4px on mobile and 8px for desktop.
|
|
148
187
|
The `size` prop can be used to optionally set the height to 4px for desktop
|
|
@@ -153,8 +192,13 @@ through the `ProgressIndicatorSizes.Small` value.
|
|
|
153
192
|
<Canvas>
|
|
154
193
|
<DSProvider>
|
|
155
194
|
<SimpleGrid columns={1} gap={GridGaps.Medium}>
|
|
156
|
-
<ProgressIndicator labelText="Default 8px size" value={50} />
|
|
157
195
|
<ProgressIndicator
|
|
196
|
+
id="default-size"
|
|
197
|
+
labelText="Default 8px size"
|
|
198
|
+
value={50}
|
|
199
|
+
/>
|
|
200
|
+
<ProgressIndicator
|
|
201
|
+
id="small-size"
|
|
158
202
|
labelText="Small 4px size"
|
|
159
203
|
size={ProgressIndicatorSizes.Small}
|
|
160
204
|
value={50}
|
|
@@ -174,11 +218,13 @@ percentage will not displayed.
|
|
|
174
218
|
<DSProvider>
|
|
175
219
|
<SimpleGrid columns={1} gap={GridGaps.Medium}>
|
|
176
220
|
<ProgressIndicator
|
|
221
|
+
id="default-size"
|
|
177
222
|
indicatorType={ProgressIndicatorTypes.Circular}
|
|
178
223
|
labelText="Default 48px size"
|
|
179
224
|
value={50}
|
|
180
225
|
/>
|
|
181
226
|
<ProgressIndicator
|
|
227
|
+
id="small-size"
|
|
182
228
|
indicatorType={ProgressIndicatorTypes.Circular}
|
|
183
229
|
labelText="Small 24px size"
|
|
184
230
|
size={ProgressIndicatorSizes.Small}
|
|
@@ -188,7 +234,7 @@ percentage will not displayed.
|
|
|
188
234
|
</DSProvider>
|
|
189
235
|
</Canvas>
|
|
190
236
|
|
|
191
|
-
|
|
237
|
+
## Labels
|
|
192
238
|
|
|
193
239
|
The `labelText` value and the `value` percentage are displayed by default. They
|
|
194
240
|
can be hidden through the `showLabel` prop.
|
|
@@ -202,11 +248,13 @@ the progress element to provide a description of the progress for screen readers
|
|
|
202
248
|
<DSProvider>
|
|
203
249
|
<SimpleGrid columns={1} gap={GridGaps.Medium}>
|
|
204
250
|
<ProgressIndicator
|
|
251
|
+
id="label"
|
|
205
252
|
labelText="This label will be added through aria-label"
|
|
206
253
|
showLabel={false}
|
|
207
254
|
value={50}
|
|
208
255
|
/>
|
|
209
256
|
<ProgressIndicator
|
|
257
|
+
id="label-hidden"
|
|
210
258
|
indicatorType={ProgressIndicatorTypes.Circular}
|
|
211
259
|
labelText="This label will be added through aria-label"
|
|
212
260
|
showLabel={false}
|
|
@@ -216,7 +264,7 @@ the progress element to provide a description of the progress for screen readers
|
|
|
216
264
|
</DSProvider>
|
|
217
265
|
</Canvas>
|
|
218
266
|
|
|
219
|
-
|
|
267
|
+
## Indeterminate State
|
|
220
268
|
|
|
221
269
|
When the `isIndeterminate` prop is set to true, the `value` prop is ignored and
|
|
222
270
|
the state is set to an animated indeterminate state. This is often used when the
|
|
@@ -226,11 +274,13 @@ exact value or progress of the task is unknown.
|
|
|
226
274
|
<DSProvider>
|
|
227
275
|
<SimpleGrid columns={1} gap={GridGaps.Medium}>
|
|
228
276
|
<ProgressIndicator
|
|
277
|
+
id="indeterminate"
|
|
229
278
|
isIndeterminate
|
|
230
279
|
labelText="Indeterminate state"
|
|
231
280
|
value={50}
|
|
232
281
|
/>
|
|
233
282
|
<ProgressIndicator
|
|
283
|
+
id="indeterminate-circular"
|
|
234
284
|
indicatorType={ProgressIndicatorTypes.Circular}
|
|
235
285
|
isIndeterminate
|
|
236
286
|
labelText="Indeterminate state"
|
|
@@ -240,7 +290,7 @@ exact value or progress of the task is unknown.
|
|
|
240
290
|
</DSProvider>
|
|
241
291
|
</Canvas>
|
|
242
292
|
|
|
243
|
-
|
|
293
|
+
## Dark Mode
|
|
244
294
|
|
|
245
295
|
When in "dark mode", set the `darkMode` prop to true. This will render the
|
|
246
296
|
progress bar and the label text in white for better contrast.
|
|
@@ -251,9 +301,15 @@ Note: the background is manually set to better showcase the `darkMode` prop.
|
|
|
251
301
|
<DSProvider>
|
|
252
302
|
<Box bg="black" w="100%" h="200px" p="20px">
|
|
253
303
|
<SimpleGrid columns={1} gap={GridGaps.Medium}>
|
|
254
|
-
<ProgressIndicator labelText="Dark Mode" value={50} darkMode />
|
|
255
304
|
<ProgressIndicator
|
|
256
305
|
darkMode
|
|
306
|
+
id="darkmode"
|
|
307
|
+
labelText="Dark Mode"
|
|
308
|
+
value={50}
|
|
309
|
+
/>
|
|
310
|
+
<ProgressIndicator
|
|
311
|
+
darkMode
|
|
312
|
+
id="darkmode-circular"
|
|
257
313
|
indicatorType={ProgressIndicatorTypes.Circular}
|
|
258
314
|
labelText="Dark Mode"
|
|
259
315
|
value={50}
|
|
@@ -263,7 +319,7 @@ Note: the background is manually set to better showcase the `darkMode` prop.
|
|
|
263
319
|
</DSProvider>
|
|
264
320
|
</Canvas>
|
|
265
321
|
|
|
266
|
-
|
|
322
|
+
## Get Input Values
|
|
267
323
|
|
|
268
324
|
In the following example, we are setting the `value` prop based on a timer that
|
|
269
325
|
increases the value every second by 10. Once it reaches 100, it resets to 0.
|
|
@@ -282,8 +338,13 @@ function ProgressIndicatorExample() {
|
|
|
282
338
|
}, []);
|
|
283
339
|
return (
|
|
284
340
|
<SimpleGrid columns={1} gap={GridGaps.Medium}>
|
|
285
|
-
<ProgressIndicator labelText="Progress example" value={value} />
|
|
286
341
|
<ProgressIndicator
|
|
342
|
+
id="example"
|
|
343
|
+
labelText="Progress example"
|
|
344
|
+
value={value}
|
|
345
|
+
/>
|
|
346
|
+
<ProgressIndicator
|
|
347
|
+
id="example-circular"
|
|
287
348
|
indicatorType={ProgressIndicatorTypes.Circular}
|
|
288
349
|
labelText="Progress example"
|
|
289
350
|
value={value}
|
|
@@ -303,8 +364,13 @@ export function ProgressIndicatorExample() {
|
|
|
303
364
|
}, []);
|
|
304
365
|
return (
|
|
305
366
|
<SimpleGrid columns={1} gap={GridGaps.Medium}>
|
|
306
|
-
<ProgressIndicator labelText="Progress example" value={value} />
|
|
307
367
|
<ProgressIndicator
|
|
368
|
+
id="example"
|
|
369
|
+
labelText="Progress example"
|
|
370
|
+
value={value}
|
|
371
|
+
/>
|
|
372
|
+
<ProgressIndicator
|
|
373
|
+
id="example-circular"
|
|
308
374
|
indicatorType={ProgressIndicatorTypes.Circular}
|
|
309
375
|
labelText="Progress example"
|
|
310
376
|
value={value}
|