@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
|
@@ -19,7 +19,6 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 1`] = `
|
|
|
19
19
|
id="linearBasic"
|
|
20
20
|
>
|
|
21
21
|
<div
|
|
22
|
-
aria-label={null}
|
|
23
22
|
aria-labelledby="linearBasic-label"
|
|
24
23
|
aria-valuemax={100}
|
|
25
24
|
aria-valuemin={0}
|
|
@@ -51,7 +50,6 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 2`] = `
|
|
|
51
50
|
className="css-0"
|
|
52
51
|
>
|
|
53
52
|
<div
|
|
54
|
-
aria-label={null}
|
|
55
53
|
aria-labelledby="circularBasic-label"
|
|
56
54
|
aria-valuemax={100}
|
|
57
55
|
aria-valuemin={0}
|
|
@@ -112,7 +110,6 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 3`] = `
|
|
|
112
110
|
>
|
|
113
111
|
<div
|
|
114
112
|
aria-label="Linear"
|
|
115
|
-
aria-labelledby={null}
|
|
116
113
|
aria-valuemax={100}
|
|
117
114
|
aria-valuemin={0}
|
|
118
115
|
aria-valuenow={50}
|
|
@@ -138,7 +135,6 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 4`] = `
|
|
|
138
135
|
>
|
|
139
136
|
<div
|
|
140
137
|
aria-label="Circular"
|
|
141
|
-
aria-labelledby={null}
|
|
142
138
|
aria-valuemax={100}
|
|
143
139
|
aria-valuemin={0}
|
|
144
140
|
aria-valuenow={50}
|
|
@@ -191,7 +187,6 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 5`] = `
|
|
|
191
187
|
id="linearIndeterminate"
|
|
192
188
|
>
|
|
193
189
|
<div
|
|
194
|
-
aria-label={null}
|
|
195
190
|
aria-labelledby="linearIndeterminate-label"
|
|
196
191
|
aria-valuemax={100}
|
|
197
192
|
aria-valuemin={0}
|
|
@@ -217,7 +212,6 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 6`] = `
|
|
|
217
212
|
className="css-0"
|
|
218
213
|
>
|
|
219
214
|
<div
|
|
220
|
-
aria-label={null}
|
|
221
215
|
aria-labelledby="circularIndeterminate-label"
|
|
222
216
|
aria-valuemax={100}
|
|
223
217
|
aria-valuemin={0}
|
|
@@ -276,7 +270,6 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 7`] = `
|
|
|
276
270
|
id="linearDarkMode"
|
|
277
271
|
>
|
|
278
272
|
<div
|
|
279
|
-
aria-label={null}
|
|
280
273
|
aria-labelledby="linearDarkMode-label"
|
|
281
274
|
aria-valuemax={100}
|
|
282
275
|
aria-valuemin={0}
|
|
@@ -308,7 +301,6 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 8`] = `
|
|
|
308
301
|
className="css-0"
|
|
309
302
|
>
|
|
310
303
|
<div
|
|
311
|
-
aria-label={null}
|
|
312
304
|
aria-labelledby="circularDarkMode-label"
|
|
313
305
|
aria-valuemax={100}
|
|
314
306
|
aria-valuemin={0}
|
|
@@ -375,7 +367,6 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 9`] = `
|
|
|
375
367
|
id="chakra"
|
|
376
368
|
>
|
|
377
369
|
<div
|
|
378
|
-
aria-label={null}
|
|
379
370
|
aria-labelledby="chakra-label"
|
|
380
371
|
aria-valuemax={100}
|
|
381
372
|
aria-valuemin={0}
|
|
@@ -419,7 +410,6 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 10`] = `
|
|
|
419
410
|
id="props"
|
|
420
411
|
>
|
|
421
412
|
<div
|
|
422
|
-
aria-label={null}
|
|
423
413
|
aria-labelledby="props-label"
|
|
424
414
|
aria-valuemax={100}
|
|
425
415
|
aria-valuemin={0}
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
useMultiStyleConfig,
|
|
5
5
|
} from "@chakra-ui/react";
|
|
6
6
|
import * as React from "react";
|
|
7
|
+
import { AriaAttributes } from "../../utils/interfaces";
|
|
7
8
|
|
|
8
9
|
import HelperErrorText, {
|
|
9
10
|
HelperErrorTextType,
|
|
@@ -69,7 +70,7 @@ export const Radio = chakra(
|
|
|
69
70
|
} = props;
|
|
70
71
|
const styles = useMultiStyleConfig("Radio", {});
|
|
71
72
|
const footnote = isInvalid ? invalidText : helperText;
|
|
72
|
-
const
|
|
73
|
+
const ariaAttributes: AriaAttributes = {};
|
|
73
74
|
|
|
74
75
|
if (!id) {
|
|
75
76
|
console.warn(
|
|
@@ -83,10 +84,12 @@ export const Radio = chakra(
|
|
|
83
84
|
"NYPL Reservoir Radio: `labelText` must be a string when `showLabel` is false."
|
|
84
85
|
);
|
|
85
86
|
}
|
|
86
|
-
|
|
87
|
-
labelText && footnote
|
|
87
|
+
ariaAttributes["aria-label"] =
|
|
88
|
+
labelText && footnote
|
|
89
|
+
? `${labelText} - ${footnote}`
|
|
90
|
+
: (labelText as string);
|
|
88
91
|
} else if (footnote) {
|
|
89
|
-
|
|
92
|
+
ariaAttributes["aria-describedby"] = `${id}-helperText`;
|
|
90
93
|
}
|
|
91
94
|
|
|
92
95
|
return (
|
|
@@ -104,17 +107,17 @@ export const Radio = chakra(
|
|
|
104
107
|
ref={ref}
|
|
105
108
|
alignItems="flex-start"
|
|
106
109
|
__css={styles}
|
|
107
|
-
{...
|
|
110
|
+
{...ariaAttributes}
|
|
108
111
|
{...rest}
|
|
109
112
|
>
|
|
110
113
|
{showLabel && labelText}
|
|
111
114
|
</ChakraRadio>
|
|
112
115
|
{footnote && showHelperInvalidText && (
|
|
113
116
|
<HelperErrorText
|
|
114
|
-
additionalStyles={styles.helperErrorText}
|
|
115
117
|
id={`${id}-helperText`}
|
|
116
118
|
isInvalid={isInvalid}
|
|
117
119
|
text={footnote}
|
|
120
|
+
__css={styles.helperErrorText}
|
|
118
121
|
/>
|
|
119
122
|
)}
|
|
120
123
|
</>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Flex, Spacer } from "@chakra-ui/react";
|
|
2
2
|
import {
|
|
3
3
|
ArgsTable,
|
|
4
4
|
Canvas,
|
|
@@ -9,16 +9,13 @@ import {
|
|
|
9
9
|
import { withDesign } from "storybook-addon-designs";
|
|
10
10
|
|
|
11
11
|
import Button from "../Button/Button";
|
|
12
|
+
import ButtonGroup from "../ButtonGroup/ButtonGroup";
|
|
12
13
|
import Form from "../Form/Form";
|
|
13
14
|
import Radio from "../Radio/Radio";
|
|
14
15
|
import RadioGroup from "./RadioGroup";
|
|
15
|
-
import { LayoutTypes } from "../../helpers/enums";
|
|
16
16
|
import SimpleGrid from "../Grid/SimpleGrid";
|
|
17
17
|
import { getCategory } from "../../utils/componentCategories";
|
|
18
18
|
import DSProvider from "../../theme/provider";
|
|
19
|
-
import { getStorybookEnumValues } from "../../utils/utils";
|
|
20
|
-
|
|
21
|
-
export const enumValues = getStorybookEnumValues(LayoutTypes, "LayoutTypes");
|
|
22
19
|
|
|
23
20
|
<Meta
|
|
24
21
|
title={getCategory("RadioGroup")}
|
|
@@ -48,9 +45,7 @@ export const enumValues = getStorybookEnumValues(LayoutTypes, "LayoutTypes");
|
|
|
48
45
|
table: { defaultValue: { summary: false } },
|
|
49
46
|
},
|
|
50
47
|
layout: {
|
|
51
|
-
|
|
52
|
-
table: { defaultValue: { summary: "LayoutTypes.Column" } },
|
|
53
|
-
options: enumValues.options,
|
|
48
|
+
table: { defaultValue: { summary: "column" } },
|
|
54
49
|
},
|
|
55
50
|
key: { table: { disable: true } },
|
|
56
51
|
onChange: { control: false },
|
|
@@ -72,7 +67,7 @@ export const enumValues = getStorybookEnumValues(LayoutTypes, "LayoutTypes");
|
|
|
72
67
|
| Component Version | DS Version |
|
|
73
68
|
| ----------------- | ---------- |
|
|
74
69
|
| Added | `0.25.0` |
|
|
75
|
-
| Latest | `0.
|
|
70
|
+
| Latest | `0.28.0` |
|
|
76
71
|
|
|
77
72
|
## Table of Contents
|
|
78
73
|
|
|
@@ -106,7 +101,7 @@ export const enumValues = getStorybookEnumValues(LayoutTypes, "LayoutTypes");
|
|
|
106
101
|
isInvalid: false,
|
|
107
102
|
isRequired: false,
|
|
108
103
|
labelText: "Standard Radio Group",
|
|
109
|
-
layout: "
|
|
104
|
+
layout: "column",
|
|
110
105
|
name: "radio-story",
|
|
111
106
|
onChange: undefined,
|
|
112
107
|
showHelperInvalidText: true,
|
|
@@ -115,7 +110,7 @@ export const enumValues = getStorybookEnumValues(LayoutTypes, "LayoutTypes");
|
|
|
115
110
|
}}
|
|
116
111
|
>
|
|
117
112
|
{(args) => (
|
|
118
|
-
<RadioGroup {...args}
|
|
113
|
+
<RadioGroup {...args}>
|
|
119
114
|
<Radio id="main-2" labelText="Radio 2" value="2" />
|
|
120
115
|
<Radio id="main-3" labelText="Radio 3" value="3" />
|
|
121
116
|
<Radio id="main-4" labelText="Radio 4" value="4" />
|
|
@@ -163,7 +158,7 @@ a row.
|
|
|
163
158
|
id="row"
|
|
164
159
|
labelText="Row"
|
|
165
160
|
name="row-example"
|
|
166
|
-
layout=
|
|
161
|
+
layout="row"
|
|
167
162
|
>
|
|
168
163
|
<Radio id="row-2" labelText="Radio 2" value="2" />
|
|
169
164
|
<Radio id="row-3" labelText="Radio 3" value="3" />
|
|
@@ -420,7 +415,7 @@ export function RadioGroupUncontrolledExample() {
|
|
|
420
415
|
console.log(`Uncontrolled example. Selected: ${radioGroupValue}`);
|
|
421
416
|
};
|
|
422
417
|
return (
|
|
423
|
-
<Form onSubmit={onSubmit}>
|
|
418
|
+
<Form id="form" onSubmit={onSubmit}>
|
|
424
419
|
<SimpleGrid columns="1">
|
|
425
420
|
<RadioGroup
|
|
426
421
|
defaultValue="3"
|
|
@@ -434,7 +429,9 @@ export function RadioGroupUncontrolledExample() {
|
|
|
434
429
|
<Radio id="4" labelText="Radio 4" value="4" />
|
|
435
430
|
</RadioGroup>
|
|
436
431
|
<ButtonGroup>
|
|
437
|
-
<Button type="submit">
|
|
432
|
+
<Button id="submit" type="submit">
|
|
433
|
+
Submit
|
|
434
|
+
</Button>
|
|
438
435
|
</ButtonGroup>
|
|
439
436
|
</SimpleGrid>
|
|
440
437
|
</Form>
|
|
@@ -451,7 +448,7 @@ export function RadioGroupUncontrolledExample() {
|
|
|
451
448
|
console.log(`Uncontrolled example. Selected: ${radioGroupValue}`);
|
|
452
449
|
};
|
|
453
450
|
return (
|
|
454
|
-
<Form onSubmit={onSubmit}>
|
|
451
|
+
<Form id="form" onSubmit={onSubmit}>
|
|
455
452
|
<SimpleGrid columns="1">
|
|
456
453
|
<RadioGroup
|
|
457
454
|
defaultValue="3"
|
|
@@ -465,7 +462,9 @@ export function RadioGroupUncontrolledExample() {
|
|
|
465
462
|
<Radio id="4" labelText="Radio 4" value="4" />
|
|
466
463
|
</RadioGroup>
|
|
467
464
|
<ButtonGroup>
|
|
468
|
-
<Button type="submit">
|
|
465
|
+
<Button id="submit" type="submit">
|
|
466
|
+
Submit
|
|
467
|
+
</Button>
|
|
469
468
|
</ButtonGroup>
|
|
470
469
|
</SimpleGrid>
|
|
471
470
|
</Form>
|
|
@@ -7,7 +7,6 @@ import renderer from "react-test-renderer";
|
|
|
7
7
|
|
|
8
8
|
import Radio from "../Radio/Radio";
|
|
9
9
|
import RadioGroup from "./RadioGroup";
|
|
10
|
-
import { LayoutTypes } from "../../helpers/enums";
|
|
11
10
|
|
|
12
11
|
describe("Radio Accessibility", () => {
|
|
13
12
|
it("passes axe accessibility with string labels", async () => {
|
|
@@ -154,7 +153,7 @@ describe("Radio Button", () => {
|
|
|
154
153
|
|
|
155
154
|
it("sets the next value through the onChange function", () => {
|
|
156
155
|
let newValue = "";
|
|
157
|
-
const onChange = (value) => {
|
|
156
|
+
const onChange = (value: string) => {
|
|
158
157
|
newValue = value;
|
|
159
158
|
};
|
|
160
159
|
render(
|
|
@@ -275,12 +274,7 @@ describe("Radio Button", () => {
|
|
|
275
274
|
.toJSON();
|
|
276
275
|
const row = renderer
|
|
277
276
|
.create(
|
|
278
|
-
<RadioGroup
|
|
279
|
-
labelText="row"
|
|
280
|
-
name="row"
|
|
281
|
-
id="row"
|
|
282
|
-
layout={LayoutTypes.Row}
|
|
283
|
-
>
|
|
277
|
+
<RadioGroup labelText="row" name="row" id="row" layout="row">
|
|
284
278
|
<Radio value="2" labelText="Radio 2" id="radio-2" />
|
|
285
279
|
<Radio value="3" labelText="Radio 3" id="radio-3" />
|
|
286
280
|
</RadioGroup>
|
|
@@ -12,7 +12,8 @@ import HelperErrorText, {
|
|
|
12
12
|
} from "../HelperErrorText/HelperErrorText";
|
|
13
13
|
import { spacing } from "../../theme/foundations/spacing";
|
|
14
14
|
import Radio from "../Radio/Radio";
|
|
15
|
-
import { LayoutTypes } from "../../helpers/
|
|
15
|
+
import { LayoutTypes } from "../../helpers/types";
|
|
16
|
+
|
|
16
17
|
export interface RadioGroupProps {
|
|
17
18
|
/** Additional class name. */
|
|
18
19
|
className?: string;
|
|
@@ -75,7 +76,7 @@ export const RadioGroup = chakra(
|
|
|
75
76
|
isInvalid = false,
|
|
76
77
|
isRequired = false,
|
|
77
78
|
labelText,
|
|
78
|
-
layout =
|
|
79
|
+
layout = "column",
|
|
79
80
|
name,
|
|
80
81
|
onChange,
|
|
81
82
|
showHelperInvalidText = true,
|
|
@@ -87,7 +88,7 @@ export const RadioGroup = chakra(
|
|
|
87
88
|
const footnote: HelperErrorTextType = isInvalid
|
|
88
89
|
? invalidText
|
|
89
90
|
: helperText;
|
|
90
|
-
const spacingProp = layout ===
|
|
91
|
+
const spacingProp = layout === "column" ? spacing.s : spacing.l;
|
|
91
92
|
const newChildren: JSX.Element[] = [];
|
|
92
93
|
// Get the Chakra-based styles for the custom elements in this component.
|
|
93
94
|
const styles = useMultiStyleConfig("RadioGroup", { isFullWidth });
|
|
@@ -110,29 +111,32 @@ export const RadioGroup = chakra(
|
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
// Go through the Radio children and update them as needed.
|
|
113
|
-
React.Children.map(
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
if (child
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
114
|
+
React.Children.map(
|
|
115
|
+
children as JSX.Element,
|
|
116
|
+
(child: React.ReactElement, key) => {
|
|
117
|
+
if (child?.type !== Radio) {
|
|
118
|
+
// Special case for Storybook MDX documentation.
|
|
119
|
+
if (child.props?.mdxType && child.props?.mdxType === "Radio") {
|
|
120
|
+
noop();
|
|
121
|
+
} else {
|
|
122
|
+
console.warn(
|
|
123
|
+
"NYPL Reservoir RadioGroup: Only `Radio` components are allowed " +
|
|
124
|
+
"inside the `RadioGroup` component."
|
|
125
|
+
);
|
|
126
|
+
}
|
|
123
127
|
}
|
|
124
|
-
}
|
|
125
128
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
if (child !== undefined && child !== null) {
|
|
130
|
+
const newProps = {
|
|
131
|
+
key,
|
|
132
|
+
isDisabled,
|
|
133
|
+
isInvalid,
|
|
134
|
+
isRequired,
|
|
135
|
+
};
|
|
136
|
+
newChildren.push(React.cloneElement(child, newProps));
|
|
137
|
+
}
|
|
134
138
|
}
|
|
135
|
-
|
|
139
|
+
);
|
|
136
140
|
|
|
137
141
|
return (
|
|
138
142
|
<Fieldset
|
|
@@ -151,10 +155,10 @@ export const RadioGroup = chakra(
|
|
|
151
155
|
</ChakraRadioGroup>
|
|
152
156
|
{footnote && showHelperInvalidText && (
|
|
153
157
|
<HelperErrorText
|
|
154
|
-
additionalStyles={styles.helperErrorText}
|
|
155
158
|
id={`${id}-helperErrorText`}
|
|
156
159
|
isInvalid={isInvalid}
|
|
157
160
|
text={footnote}
|
|
161
|
+
__css={styles.helperErrorText}
|
|
158
162
|
/>
|
|
159
163
|
)}
|
|
160
164
|
</Fieldset>
|
|
@@ -60,7 +60,7 @@ import DSProvider from "../../theme/provider";
|
|
|
60
60
|
| Component Version | DS Version |
|
|
61
61
|
| ----------------- | ---------- |
|
|
62
62
|
| Added | `0.0.4` |
|
|
63
|
-
| Latest | `0.
|
|
63
|
+
| Latest | `0.28.0` |
|
|
64
64
|
|
|
65
65
|
## Table of Contents
|
|
66
66
|
|
|
@@ -164,8 +164,8 @@ screenreaders to pick up this entire search form.
|
|
|
164
164
|
|
|
165
165
|
Resources:
|
|
166
166
|
|
|
167
|
-
- [Reservoir Select](https://nypl.github.io/nypl-design-system/
|
|
168
|
-
- [Reservoir TextInput](https://nypl.github.io/nypl-design-system/
|
|
167
|
+
- [Reservoir Select](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/components-form-elements-select--select-with-controls)
|
|
168
|
+
- [Reservoir TextInput](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/components-form-elements-textinput--text-input-with-controls)
|
|
169
169
|
- [a11ymatters Accessible Search Form](https://www.a11ymatters.com/pattern/accessible-search/)
|
|
170
170
|
- [MDN ARIA: search role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/search_role)
|
|
171
171
|
|
|
@@ -310,7 +310,7 @@ const helperText = "";
|
|
|
310
310
|
While the Design System does not implement an `Autosuggest` or `Autocomplete`
|
|
311
311
|
component, it does show a pattern for using the `react-autosuggest` package.
|
|
312
312
|
In this example, we're using the `react-autosuggest` example found in the
|
|
313
|
-
[Basic Autosuggest story](https://nypl.github.io/nypl-design-system/
|
|
313
|
+
[Basic Autosuggest story](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/development-guide-autosuggest--autosuggest-library)
|
|
314
314
|
as the main component inside the `SearchBar` component.
|
|
315
315
|
|
|
316
316
|
In order to render this custom input element in the `SearchBar` component, pass
|
|
@@ -164,7 +164,7 @@ describe("SearchBar", () => {
|
|
|
164
164
|
|
|
165
165
|
it("calls the Select onChange callback function", () => {
|
|
166
166
|
let selectValue = "Songs";
|
|
167
|
-
selectProps.onChange = (e) => (selectValue = e.target.value);
|
|
167
|
+
selectProps.onChange = (e) => (selectValue = (e.target as any).value);
|
|
168
168
|
selectProps.value = selectValue;
|
|
169
169
|
|
|
170
170
|
render(
|
|
@@ -2,15 +2,12 @@ import { Box, chakra, useMultiStyleConfig } from "@chakra-ui/react";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
4
|
import Button from "../Button/Button";
|
|
5
|
-
import { ButtonTypes } from "../Button/ButtonTypes";
|
|
6
5
|
import ComponentWrapper from "../ComponentWrapper/ComponentWrapper";
|
|
7
6
|
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
8
7
|
import Icon from "../Icons/Icon";
|
|
9
|
-
import { IconAlign, IconNames, IconSizes } from "../Icons/IconTypes";
|
|
10
8
|
import Select from "../Select/Select";
|
|
11
|
-
import { SelectTypes } from "../Select/SelectTypes";
|
|
12
9
|
import TextInput from "../TextInput/TextInput";
|
|
13
|
-
|
|
10
|
+
|
|
14
11
|
interface BaseProps {
|
|
15
12
|
labelText: string;
|
|
16
13
|
name: string;
|
|
@@ -24,6 +21,7 @@ interface BaseProps {
|
|
|
24
21
|
// Internal interfaces that are used only for `SearchBar` props.
|
|
25
22
|
export interface SelectProps extends BaseProps {
|
|
26
23
|
optionsData: string[];
|
|
24
|
+
onChange?: (event: React.FormEvent) => void;
|
|
27
25
|
}
|
|
28
26
|
export interface TextInputProps extends BaseProps {
|
|
29
27
|
placeholder?: string;
|
|
@@ -57,8 +55,8 @@ export interface SearchBarProps {
|
|
|
57
55
|
labelText: string;
|
|
58
56
|
/** Adds 'method' property to the `form` element. */
|
|
59
57
|
method?: string;
|
|
60
|
-
/** Sets the `Button` variant type to `
|
|
61
|
-
* false by default which sets the type to `
|
|
58
|
+
/** Sets the `Button` variant type to `noBrand` when true;
|
|
59
|
+
* false by default which sets the type to `primary`. */
|
|
62
60
|
noBrandButtonType?: boolean;
|
|
63
61
|
/** Handler function when the form is submitted. */
|
|
64
62
|
onSubmit: (event: React.FormEvent) => void;
|
|
@@ -77,7 +75,7 @@ export interface SearchBarProps {
|
|
|
77
75
|
export const SearchBar = chakra((props: SearchBarProps) => {
|
|
78
76
|
const {
|
|
79
77
|
action,
|
|
80
|
-
buttonOnClick
|
|
78
|
+
buttonOnClick,
|
|
81
79
|
className,
|
|
82
80
|
descriptionText,
|
|
83
81
|
headingText,
|
|
@@ -111,9 +109,7 @@ export const SearchBar = chakra((props: SearchBarProps) => {
|
|
|
111
109
|
const textInputPlaceholder = `${inputPlaceholder} ${
|
|
112
110
|
isRequired ? "(Required)" : ""
|
|
113
111
|
}`;
|
|
114
|
-
const buttonType = noBrandButtonType
|
|
115
|
-
? ButtonTypes.NoBrand
|
|
116
|
-
: ButtonTypes.Primary;
|
|
112
|
+
const buttonType = noBrandButtonType ? "noBrand" : "primary";
|
|
117
113
|
const searchBarButtonStyles = {
|
|
118
114
|
borderLeftRadius: "none",
|
|
119
115
|
borderRightRadius: { base: "none", md: "sm" },
|
|
@@ -129,13 +125,13 @@ export const SearchBar = chakra((props: SearchBarProps) => {
|
|
|
129
125
|
// Render the `Select` component.
|
|
130
126
|
const selectElem = selectProps && (
|
|
131
127
|
<Select
|
|
132
|
-
additionalStyles={styles.select}
|
|
133
128
|
id={`searchbar-select-${id}`}
|
|
134
129
|
labelText={selectProps?.labelText}
|
|
135
130
|
name={selectProps?.name}
|
|
136
131
|
onChange={selectProps?.onChange}
|
|
137
|
-
selectType=
|
|
132
|
+
selectType="searchbar"
|
|
138
133
|
value={selectProps?.value}
|
|
134
|
+
__css={styles.select}
|
|
139
135
|
{...stateProps}
|
|
140
136
|
>
|
|
141
137
|
{selectProps?.optionsData.map((option) => (
|
|
@@ -153,12 +149,8 @@ export const SearchBar = chakra((props: SearchBarProps) => {
|
|
|
153
149
|
name={textInputProps?.name}
|
|
154
150
|
onChange={textInputProps?.onChange}
|
|
155
151
|
placeholder={textInputPlaceholder}
|
|
156
|
-
textInputType={
|
|
157
|
-
|
|
158
|
-
? TextInputVariants.SearchBarSelect
|
|
159
|
-
: TextInputVariants.SearchBar
|
|
160
|
-
}
|
|
161
|
-
type={TextInputTypes.text}
|
|
152
|
+
textInputType={selectElem ? "searchBarSelect" : "searchBar"}
|
|
153
|
+
type="text"
|
|
162
154
|
value={textInputProps?.value}
|
|
163
155
|
{...stateProps}
|
|
164
156
|
/>
|
|
@@ -166,18 +158,18 @@ export const SearchBar = chakra((props: SearchBarProps) => {
|
|
|
166
158
|
// Render the `Button` component.
|
|
167
159
|
const buttonElem = (
|
|
168
160
|
<Button
|
|
169
|
-
additionalStyles={searchBarButtonStyles}
|
|
170
161
|
buttonType={buttonType}
|
|
171
162
|
id={`searchbar-button-${id}`}
|
|
172
163
|
isDisabled={isDisabled}
|
|
173
164
|
onClick={buttonOnClick}
|
|
174
165
|
type="submit"
|
|
166
|
+
__css={searchBarButtonStyles}
|
|
175
167
|
>
|
|
176
168
|
<Icon
|
|
177
|
-
align=
|
|
169
|
+
align="left"
|
|
178
170
|
id={`searchbar-icon-${id}`}
|
|
179
|
-
name=
|
|
180
|
-
size=
|
|
171
|
+
name="search"
|
|
172
|
+
size="small"
|
|
181
173
|
/>
|
|
182
174
|
Search
|
|
183
175
|
</Button>
|
|
@@ -34,7 +34,6 @@ exports[`SearchBar renders the UI snapshot correctly 1`] = `
|
|
|
34
34
|
className="chakra-button css-1me3d5y"
|
|
35
35
|
data-testid="button"
|
|
36
36
|
id="searchbar-button-basic"
|
|
37
|
-
onClick={null}
|
|
38
37
|
type="submit"
|
|
39
38
|
>
|
|
40
39
|
<svg
|
|
@@ -214,8 +213,8 @@ exports[`SearchBar renders the UI snapshot correctly 2`] = `
|
|
|
214
213
|
</svg>
|
|
215
214
|
</div>
|
|
216
215
|
</div>
|
|
217
|
-
|
|
218
216
|
</div>
|
|
217
|
+
|
|
219
218
|
</div>
|
|
220
219
|
<div
|
|
221
220
|
className="css-1xdhyk6"
|
|
@@ -240,7 +239,6 @@ exports[`SearchBar renders the UI snapshot correctly 2`] = `
|
|
|
240
239
|
className="chakra-button css-1me3d5y"
|
|
241
240
|
data-testid="button"
|
|
242
241
|
id="searchbar-button-withSelect"
|
|
243
|
-
onClick={null}
|
|
244
242
|
type="submit"
|
|
245
243
|
>
|
|
246
244
|
<svg
|
|
@@ -327,7 +325,6 @@ exports[`SearchBar renders the UI snapshot correctly 3`] = `
|
|
|
327
325
|
className="chakra-button css-1me3d5y"
|
|
328
326
|
data-testid="button"
|
|
329
327
|
id="searchbar-button-withoutHelperText"
|
|
330
|
-
onClick={null}
|
|
331
328
|
type="submit"
|
|
332
329
|
>
|
|
333
330
|
<svg
|
|
@@ -402,7 +399,6 @@ exports[`SearchBar renders the UI snapshot correctly 4`] = `
|
|
|
402
399
|
className="chakra-button css-1me3d5y"
|
|
403
400
|
data-testid="button"
|
|
404
401
|
id="searchbar-button-invalidState"
|
|
405
|
-
onClick={null}
|
|
406
402
|
type="submit"
|
|
407
403
|
>
|
|
408
404
|
<svg
|
|
@@ -478,7 +474,6 @@ exports[`SearchBar renders the UI snapshot correctly 5`] = `
|
|
|
478
474
|
data-testid="button"
|
|
479
475
|
disabled={true}
|
|
480
476
|
id="searchbar-button-disabledState"
|
|
481
|
-
onClick={null}
|
|
482
477
|
type="submit"
|
|
483
478
|
>
|
|
484
479
|
<svg
|
|
@@ -555,7 +550,6 @@ exports[`SearchBar renders the UI snapshot correctly 6`] = `
|
|
|
555
550
|
data-testid="button"
|
|
556
551
|
disabled={true}
|
|
557
552
|
id="searchbar-button-requiredState"
|
|
558
|
-
onClick={null}
|
|
559
553
|
type="submit"
|
|
560
554
|
>
|
|
561
555
|
<svg
|
|
@@ -632,7 +626,6 @@ exports[`SearchBar renders the UI snapshot correctly 7`] = `
|
|
|
632
626
|
data-testid="button"
|
|
633
627
|
disabled={true}
|
|
634
628
|
id="searchbar-button-noBrandButtonType"
|
|
635
|
-
onClick={null}
|
|
636
629
|
type="submit"
|
|
637
630
|
>
|
|
638
631
|
<svg
|
|
@@ -694,7 +687,6 @@ exports[`SearchBar renders the UI snapshot correctly 8`] = `
|
|
|
694
687
|
className="chakra-button css-1me3d5y"
|
|
695
688
|
data-testid="button"
|
|
696
689
|
id="searchbar-button-withHeading"
|
|
697
|
-
onClick={null}
|
|
698
690
|
type="submit"
|
|
699
691
|
>
|
|
700
692
|
<svg
|
|
@@ -755,7 +747,6 @@ exports[`SearchBar renders the UI snapshot correctly 9`] = `
|
|
|
755
747
|
className="chakra-button css-1me3d5y"
|
|
756
748
|
data-testid="button"
|
|
757
749
|
id="searchbar-button-withDescription"
|
|
758
|
-
onClick={null}
|
|
759
750
|
type="submit"
|
|
760
751
|
>
|
|
761
752
|
<svg
|
|
@@ -822,7 +813,6 @@ exports[`SearchBar renders the UI snapshot correctly 10`] = `
|
|
|
822
813
|
className="chakra-button css-1me3d5y"
|
|
823
814
|
data-testid="button"
|
|
824
815
|
id="searchbar-button-withHeadingAndDescription"
|
|
825
|
-
onClick={null}
|
|
826
816
|
type="submit"
|
|
827
817
|
>
|
|
828
818
|
<svg
|
|
@@ -897,7 +887,6 @@ exports[`SearchBar renders the UI snapshot correctly 11`] = `
|
|
|
897
887
|
className="chakra-button css-1me3d5y"
|
|
898
888
|
data-testid="button"
|
|
899
889
|
id="searchbar-button-chakra"
|
|
900
|
-
onClick={null}
|
|
901
890
|
type="submit"
|
|
902
891
|
>
|
|
903
892
|
<svg
|
|
@@ -985,7 +974,6 @@ exports[`SearchBar renders the UI snapshot correctly 12`] = `
|
|
|
985
974
|
className="chakra-button css-1me3d5y"
|
|
986
975
|
data-testid="button"
|
|
987
976
|
id="searchbar-button-props"
|
|
988
|
-
onClick={null}
|
|
989
977
|
type="submit"
|
|
990
978
|
>
|
|
991
979
|
<svg
|