@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.
Files changed (347) hide show
  1. package/CHANGELOG.md +151 -0
  2. package/README.md +14 -26
  3. package/dist/components/Accordion/Accordion.d.ts +6 -4
  4. package/dist/components/Accordion/AccordionTypes.d.ts +5 -0
  5. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +4 -4
  6. package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +2 -1
  7. package/dist/components/Button/Button.d.ts +2 -2
  8. package/dist/components/Card/Card.d.ts +22 -29
  9. package/dist/components/Checkbox/Checkbox.d.ts +3 -3
  10. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +9 -6
  11. package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +1 -1
  12. package/dist/components/DatePicker/DatePicker.d.ts +5 -6
  13. package/dist/components/Fieldset/Fieldset.d.ts +5 -6
  14. package/dist/components/Form/Form.d.ts +6 -6
  15. package/dist/components/Grid/GridTypes.d.ts +7 -7
  16. package/dist/components/Grid/SimpleGrid.d.ts +1 -1
  17. package/dist/components/Heading/Heading.d.ts +5 -5
  18. package/dist/components/Heading/HeadingTypes.d.ts +1 -1
  19. package/dist/components/HelperErrorText/HelperErrorText.d.ts +9 -8
  20. package/dist/components/Hero/Hero.d.ts +9 -5
  21. package/dist/components/HorizontalRule/HorizontalRule.d.ts +2 -10
  22. package/dist/components/Icons/Icon.d.ts +2 -1
  23. package/dist/components/Icons/IconTypes.d.ts +10 -7
  24. package/dist/components/Image/Image.d.ts +27 -9
  25. package/dist/components/Image/ImageTypes.d.ts +4 -4
  26. package/dist/components/Label/Label.d.ts +7 -4
  27. package/dist/components/Link/Link.d.ts +1 -1
  28. package/dist/components/List/List.d.ts +11 -11
  29. package/dist/components/List/ListTypes.d.ts +1 -1
  30. package/dist/components/Logo/Logo.d.ts +2 -1
  31. package/dist/components/Logo/LogoSvgs.d.ts +8 -0
  32. package/dist/components/Logo/LogoTypes.d.ts +10 -2
  33. package/dist/components/Notification/Notification.d.ts +7 -7
  34. package/dist/components/Pagination/Pagination.d.ts +8 -4
  35. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +3 -3
  36. package/dist/components/Radio/Radio.d.ts +5 -7
  37. package/dist/components/RadioGroup/RadioGroup.d.ts +16 -8
  38. package/dist/components/SearchBar/SearchBar.d.ts +5 -5
  39. package/dist/components/Select/Select.d.ts +12 -8
  40. package/dist/components/Select/SelectTypes.d.ts +4 -0
  41. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +8 -6
  42. package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +0 -4
  43. package/dist/components/Slider/Slider.d.ts +6 -4
  44. package/dist/components/StatusBadge/StatusBadge.d.ts +5 -1
  45. package/dist/components/StructuredContent/StructuredContent.d.ts +10 -23
  46. package/dist/components/Table/Table.d.ts +1 -1
  47. package/dist/components/Tabs/Tabs.d.ts +7 -6
  48. package/dist/components/Template/Template.d.ts +18 -9
  49. package/dist/components/Text/Text.d.ts +4 -4
  50. package/dist/components/Text/TextTypes.d.ts +1 -1
  51. package/dist/components/TextInput/TextInput.d.ts +7 -7
  52. package/dist/components/Toggle/Toggle.d.ts +8 -10
  53. package/dist/components/Toggle/{ToggleSizes.d.ts → ToggleTypes.d.ts} +1 -1
  54. package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
  55. package/dist/design-system-react-components.cjs.development.js +2802 -1686
  56. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  57. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  58. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  59. package/dist/design-system-react-components.esm.js +2811 -1699
  60. package/dist/design-system-react-components.esm.js.map +1 -1
  61. package/dist/helpers/enums.d.ts +4 -0
  62. package/dist/hooks/useCarouselStyles.d.ts +3 -2
  63. package/dist/hooks/useNYPLTheme.d.ts +12 -0
  64. package/dist/index.d.ts +11 -9
  65. package/dist/styles.css +1 -1
  66. package/dist/theme/components/accordion.d.ts +7 -12
  67. package/dist/theme/components/breadcrumb.d.ts +6 -0
  68. package/dist/theme/components/button.d.ts +10 -2
  69. package/dist/theme/components/card.d.ts +44 -24
  70. package/dist/theme/components/checkbox.d.ts +6 -6
  71. package/dist/theme/components/checkboxGroup.d.ts +4 -2
  72. package/dist/theme/components/componentWrapper.d.ts +2 -2
  73. package/dist/theme/components/customTable.d.ts +84 -1
  74. package/dist/theme/components/fieldset.d.ts +6 -14
  75. package/dist/theme/components/global.d.ts +37 -29
  76. package/dist/theme/components/globalMixins.d.ts +8 -8
  77. package/dist/theme/components/heading.d.ts +53 -0
  78. package/dist/theme/components/helperErrorText.d.ts +1 -0
  79. package/dist/theme/components/hero.d.ts +21 -15
  80. package/dist/theme/components/image.d.ts +1 -1
  81. package/dist/theme/components/label.d.ts +9 -10
  82. package/dist/theme/components/list.d.ts +105 -9
  83. package/dist/theme/components/notification.d.ts +7 -4
  84. package/dist/theme/components/pagination.d.ts +2 -5
  85. package/dist/theme/components/radio.d.ts +10 -6
  86. package/dist/theme/components/radioGroup.d.ts +4 -2
  87. package/dist/theme/components/select.d.ts +38 -13
  88. package/dist/theme/components/skeletonLoader.d.ts +2 -2
  89. package/dist/theme/components/slider.d.ts +14 -7
  90. package/dist/theme/components/structuredContent.d.ts +197 -0
  91. package/dist/theme/components/textInput.d.ts +22 -14
  92. package/dist/theme/components/toggle.d.ts +25 -6
  93. package/dist/theme/foundations/global.d.ts +33 -3
  94. package/dist/theme/foundations/radii.d.ts +1 -0
  95. package/dist/theme/foundations/spacing.d.ts +46 -43
  96. package/dist/utils/utils.d.ts +10 -0
  97. package/package.json +5 -6
  98. package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +34 -0
  99. package/src/components/Accordion/Accordion.stories.mdx +150 -66
  100. package/src/components/Accordion/Accordion.test.tsx +65 -17
  101. package/src/components/Accordion/Accordion.tsx +61 -27
  102. package/src/components/Accordion/AccordionTypes.tsx +5 -0
  103. package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +505 -14
  104. package/src/components/Autosuggest/Autosuggest.stories.mdx +4 -3
  105. package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +53 -18
  106. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +66 -35
  107. package/src/components/Breadcrumbs/Breadcrumbs.tsx +14 -13
  108. package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +2 -1
  109. package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +308 -10
  110. package/src/components/Button/Button.stories.mdx +87 -23
  111. package/src/components/Button/Button.test.tsx +25 -0
  112. package/src/components/Button/Button.tsx +18 -7
  113. package/src/components/Button/__snapshots__/Button.test.tsx.snap +27 -7
  114. package/src/components/Card/Card.stories.mdx +493 -329
  115. package/src/components/Card/Card.test.tsx +138 -18
  116. package/src/components/Card/Card.tsx +151 -85
  117. package/src/components/Card/__snapshots__/Card.test.tsx.snap +220 -100
  118. package/src/components/Chakra/Center.stories.mdx +2 -2
  119. package/src/components/Chakra/Grid.stories.mdx +4 -4
  120. package/src/components/Checkbox/Checkbox.stories.mdx +73 -9
  121. package/src/components/Checkbox/Checkbox.test.tsx +89 -10
  122. package/src/components/Checkbox/Checkbox.tsx +27 -16
  123. package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +209 -6
  124. package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +135 -23
  125. package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +216 -90
  126. package/src/components/CheckboxGroup/CheckboxGroup.tsx +39 -26
  127. package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +493 -89
  128. package/src/components/ComponentWrapper/ComponentWrapper.test.tsx +12 -0
  129. package/src/components/ComponentWrapper/ComponentWrapper.tsx +39 -41
  130. package/src/components/ComponentWrapper/__snapshots__/ComponentWrapper.test.tsx.snap +47 -34
  131. package/src/components/DatePicker/DatePicker.stories.mdx +63 -27
  132. package/src/components/DatePicker/DatePicker.test.tsx +94 -15
  133. package/src/components/DatePicker/DatePicker.tsx +67 -58
  134. package/src/components/DatePicker/_DatePicker.scss +71 -13
  135. package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +250 -206
  136. package/src/components/Fieldset/Fieldset.stories.mdx +33 -3
  137. package/src/components/Fieldset/Fieldset.test.tsx +58 -28
  138. package/src/components/Fieldset/Fieldset.tsx +35 -30
  139. package/src/components/Fieldset/__snapshots__/Fieldset.test.tsx.snap +40 -19
  140. package/src/components/Form/Form.stories.mdx +118 -47
  141. package/src/components/Form/Form.test.tsx +59 -16
  142. package/src/components/Form/Form.tsx +89 -65
  143. package/src/components/Form/__snapshots__/Form.test.tsx.snap +83 -5
  144. package/src/components/Grid/GridTypes.tsx +7 -7
  145. package/src/components/Grid/SimpleGrid.stories.mdx +87 -41
  146. package/src/components/Grid/SimpleGrid.test.tsx +24 -9
  147. package/src/components/Grid/SimpleGrid.tsx +29 -20
  148. package/src/components/Grid/__snapshots__/SimpleGrid.test.tsx.snap +16 -1
  149. package/src/components/Heading/Heading.stories.mdx +56 -25
  150. package/src/components/Heading/Heading.test.tsx +17 -7
  151. package/src/components/Heading/Heading.tsx +60 -58
  152. package/src/components/Heading/HeadingTypes.tsx +1 -1
  153. package/src/components/Heading/__snapshots__/Heading.test.tsx.snap +27 -8
  154. package/src/components/HelperErrorText/HelperErrorText.stories.mdx +64 -42
  155. package/src/components/HelperErrorText/HelperErrorText.test.tsx +15 -0
  156. package/src/components/HelperErrorText/HelperErrorText.tsx +40 -35
  157. package/src/components/HelperErrorText/__snapshots__/HelperErrorText.test.tsx.snap +35 -4
  158. package/src/components/Hero/Hero.stories.mdx +143 -113
  159. package/src/components/Hero/Hero.test.tsx +146 -58
  160. package/src/components/Hero/Hero.tsx +144 -112
  161. package/src/components/Hero/__snapshots__/Hero.test.tsx.snap +89 -17
  162. package/src/components/HorizontalRule/HorizontalRule.stories.mdx +26 -4
  163. package/src/components/HorizontalRule/HorizontalRule.test.tsx +9 -17
  164. package/src/components/HorizontalRule/HorizontalRule.tsx +9 -25
  165. package/src/components/HorizontalRule/__snapshots__/HorizontalRule.test.tsx.snap +18 -5
  166. package/src/components/Icons/Icon.stories.mdx +80 -23
  167. package/src/components/Icons/Icon.test.tsx +51 -2
  168. package/src/components/Icons/Icon.tsx +93 -71
  169. package/src/components/Icons/IconTypes.tsx +9 -6
  170. package/src/components/Icons/__snapshots__/Icon.test.tsx.snap +129 -0
  171. package/src/components/Image/Image.stories.mdx +160 -71
  172. package/src/components/Image/Image.test.tsx +40 -48
  173. package/src/components/Image/Image.tsx +80 -48
  174. package/src/components/Image/ImageTypes.ts +4 -4
  175. package/src/components/Image/__snapshots__/Image.test.tsx.snap +84 -21
  176. package/src/components/Label/Label.stories.mdx +42 -20
  177. package/src/components/Label/Label.test.tsx +42 -17
  178. package/src/components/Label/Label.tsx +22 -13
  179. package/src/components/Label/__snapshots__/Label.test.tsx.snap +19 -15
  180. package/src/components/Link/Link.stories.mdx +25 -1
  181. package/src/components/Link/Link.test.tsx +21 -0
  182. package/src/components/Link/Link.tsx +16 -9
  183. package/src/components/Link/__snapshots__/Link.test.tsx.snap +37 -11
  184. package/src/components/List/List.stories.mdx +75 -40
  185. package/src/components/List/List.test.tsx +73 -22
  186. package/src/components/List/List.tsx +44 -28
  187. package/src/components/List/ListTypes.tsx +1 -1
  188. package/src/components/List/__snapshots__/List.test.tsx.snap +110 -8
  189. package/src/components/Logo/Logo.stories.mdx +40 -16
  190. package/src/components/Logo/Logo.test.tsx +29 -2
  191. package/src/components/Logo/Logo.tsx +28 -11
  192. package/src/components/Logo/LogoSvgs.tsx +16 -0
  193. package/src/components/Logo/LogoTypes.tsx +9 -1
  194. package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +73 -2
  195. package/src/components/Modal/Modal.stories.mdx +13 -0
  196. package/src/components/Notification/Notification.stories.mdx +34 -5
  197. package/src/components/Notification/Notification.test.tsx +43 -9
  198. package/src/components/Notification/Notification.tsx +59 -55
  199. package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +256 -32
  200. package/src/components/Pagination/Pagination.stories.mdx +76 -13
  201. package/src/components/Pagination/Pagination.test.tsx +116 -5
  202. package/src/components/Pagination/Pagination.tsx +54 -29
  203. package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +247 -30
  204. package/src/components/Placeholder/Placeholder.tsx +3 -1
  205. package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +76 -10
  206. package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +87 -13
  207. package/src/components/ProgressIndicator/ProgressIndicator.tsx +20 -10
  208. package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +101 -14
  209. package/src/components/Radio/Radio.stories.mdx +75 -11
  210. package/src/components/Radio/Radio.test.tsx +83 -9
  211. package/src/components/Radio/Radio.tsx +70 -61
  212. package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +168 -10
  213. package/src/components/RadioGroup/RadioGroup.stories.mdx +293 -94
  214. package/src/components/RadioGroup/RadioGroup.test.tsx +193 -68
  215. package/src/components/RadioGroup/RadioGroup.tsx +110 -101
  216. package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1258 -902
  217. package/src/components/SearchBar/SearchBar.stories.mdx +104 -39
  218. package/src/components/SearchBar/{SearchBar.Test.tsx → SearchBar.test.tsx} +66 -6
  219. package/src/components/SearchBar/SearchBar.tsx +23 -13
  220. package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1039 -0
  221. package/src/components/Select/Select.stories.mdx +151 -62
  222. package/src/components/Select/Select.test.tsx +56 -44
  223. package/src/components/Select/Select.tsx +125 -104
  224. package/src/components/Select/SelectTypes.tsx +5 -0
  225. package/src/components/Select/__snapshots__/Select.test.tsx.snap +749 -409
  226. package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +53 -23
  227. package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +14 -8
  228. package/src/components/SkeletonLoader/SkeletonLoader.tsx +80 -78
  229. package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +0 -5
  230. package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +169 -10
  231. package/src/components/Slider/Slider.stories.mdx +123 -41
  232. package/src/components/Slider/Slider.test.tsx +65 -17
  233. package/src/components/Slider/Slider.tsx +34 -24
  234. package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +403 -226
  235. package/src/components/StatusBadge/StatusBadge.stories.mdx +19 -1
  236. package/src/components/StatusBadge/StatusBadge.test.tsx +19 -1
  237. package/src/components/StatusBadge/StatusBadge.tsx +25 -20
  238. package/src/components/StatusBadge/__snapshots__/StatusBadge.test.tsx.snap +22 -3
  239. package/src/components/StructuredContent/StructuredContent.stories.mdx +229 -61
  240. package/src/components/StructuredContent/StructuredContent.test.tsx +162 -101
  241. package/src/components/StructuredContent/StructuredContent.tsx +98 -103
  242. package/src/components/StructuredContent/__snapshots__/StructuredContent.test.tsx.snap +102 -17
  243. package/src/components/StyleGuide/Bidirectionality.stories.mdx +9 -9
  244. package/src/components/StyleGuide/Breakpoints.stories.mdx +6 -6
  245. package/src/components/StyleGuide/Buttons.stories.mdx +2 -12
  246. package/src/components/StyleGuide/ColorCard.tsx +4 -4
  247. package/src/components/StyleGuide/Colors.stories.mdx +34 -20
  248. package/src/components/StyleGuide/DesignTokens.stories.mdx +56 -26
  249. package/src/components/StyleGuide/Forms.stories.mdx +27 -12
  250. package/src/components/StyleGuide/Iconography.stories.mdx +2 -12
  251. package/src/components/StyleGuide/Spacing.stories.mdx +80 -41
  252. package/src/components/StyleGuide/Typography.stories.mdx +47 -33
  253. package/src/components/Table/Table.stories.mdx +38 -11
  254. package/src/components/Table/Table.test.tsx +16 -1
  255. package/src/components/Table/Table.tsx +10 -8
  256. package/src/components/Table/__snapshots__/Table.test.tsx.snap +408 -5
  257. package/src/components/Tabs/Tabs.stories.mdx +59 -10
  258. package/src/components/Tabs/Tabs.test.tsx +29 -11
  259. package/src/components/Tabs/Tabs.tsx +28 -21
  260. package/src/components/Tabs/__snapshots__/Tabs.test.tsx.snap +394 -5
  261. package/src/components/Template/Template.stories.mdx +73 -32
  262. package/src/components/Template/Template.test.tsx +68 -5
  263. package/src/components/Template/Template.tsx +86 -72
  264. package/src/components/Template/__snapshots__/Template.test.tsx.snap +195 -22
  265. package/src/components/Text/Text.stories.mdx +32 -15
  266. package/src/components/Text/Text.test.tsx +14 -11
  267. package/src/components/Text/Text.tsx +13 -16
  268. package/src/components/Text/TextTypes.tsx +1 -1
  269. package/src/components/Text/__snapshots__/Text.test.tsx.snap +21 -4
  270. package/src/components/TextInput/TextInput.stories.mdx +73 -27
  271. package/src/components/TextInput/TextInput.test.tsx +65 -50
  272. package/src/components/TextInput/TextInput.tsx +123 -115
  273. package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +96 -73
  274. package/src/components/Toggle/Toggle.stories.mdx +74 -26
  275. package/src/components/Toggle/Toggle.test.tsx +41 -10
  276. package/src/components/Toggle/Toggle.tsx +31 -27
  277. package/src/components/Toggle/{ToggleSizes.tsx → ToggleTypes.tsx} +1 -1
  278. package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +195 -8
  279. package/src/components/VideoPlayer/VideoPlayer.stories.mdx +52 -4
  280. package/src/components/VideoPlayer/VideoPlayer.test.tsx +41 -6
  281. package/src/components/VideoPlayer/VideoPlayer.tsx +134 -120
  282. package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +81 -39
  283. package/src/docs/Chakra.stories.mdx +51 -10
  284. package/src/docs/Welcome.stories.mdx +168 -0
  285. package/src/{components/Card/CardTypes.tsx → helpers/enums.ts} +2 -2
  286. package/src/hooks/tests/useNYPLTheme.test.tsx +1 -1
  287. package/src/hooks/useCarouselStyles.stories.mdx +30 -0
  288. package/src/hooks/useCarouselStyles.ts +3 -2
  289. package/src/hooks/useNYPLTheme.stories.mdx +101 -0
  290. package/src/hooks/useNYPLTheme.ts +31 -7
  291. package/src/hooks/useWindowSize.stories.mdx +23 -0
  292. package/src/index.ts +11 -15
  293. package/src/styles/base/_place-holder.scss +3 -1
  294. package/src/styles.scss +0 -2
  295. package/src/theme/components/accordion.ts +7 -12
  296. package/src/theme/components/breadcrumb.ts +7 -0
  297. package/src/theme/components/button.ts +15 -7
  298. package/src/theme/components/card.ts +56 -36
  299. package/src/theme/components/checkbox.ts +12 -14
  300. package/src/theme/components/checkboxGroup.ts +4 -2
  301. package/src/theme/components/componentWrapper.ts +2 -2
  302. package/src/theme/components/customTable.ts +39 -31
  303. package/src/theme/components/fieldset.ts +3 -2
  304. package/src/theme/components/global.ts +42 -33
  305. package/src/theme/components/globalMixins.ts +8 -8
  306. package/src/theme/components/heading.ts +1 -1
  307. package/src/theme/components/helperErrorText.ts +1 -0
  308. package/src/theme/components/hero.ts +14 -16
  309. package/src/theme/components/icon.ts +5 -2
  310. package/src/theme/components/image.ts +1 -1
  311. package/src/theme/components/label.ts +4 -3
  312. package/src/theme/components/list.ts +76 -65
  313. package/src/theme/components/notification.ts +10 -7
  314. package/src/theme/components/pagination.ts +2 -5
  315. package/src/theme/components/progressIndicator.ts +3 -3
  316. package/src/theme/components/radio.ts +11 -14
  317. package/src/theme/components/radioGroup.ts +4 -2
  318. package/src/theme/components/select.ts +37 -18
  319. package/src/theme/components/skeletonLoader.ts +3 -3
  320. package/src/theme/components/slider.ts +19 -15
  321. package/src/theme/components/statusBadge.ts +2 -2
  322. package/src/theme/components/structuredContent.ts +66 -1
  323. package/src/theme/components/tabs.ts +2 -2
  324. package/src/theme/components/template.ts +9 -9
  325. package/src/theme/components/textInput.ts +13 -12
  326. package/src/theme/components/toggle.ts +76 -42
  327. package/src/theme/components/videoPlayer.ts +1 -1
  328. package/src/theme/foundations/colors.ts +20 -13
  329. package/src/theme/foundations/global.ts +17 -5
  330. package/src/theme/foundations/radii.ts +1 -0
  331. package/src/theme/foundations/spacing.ts +70 -22
  332. package/src/theme/foundations/typography.ts +3 -3
  333. package/src/utils/componentCategories.ts +28 -21
  334. package/src/utils/utils.ts +28 -0
  335. package/dist/components/Card/CardTypes.d.ts +0 -4
  336. package/dist/components/CheckboxGroup/CheckboxGroupLayoutTypes.d.ts +0 -4
  337. package/dist/components/Pagination/Pagination.stories.d.ts +0 -13
  338. package/dist/components/RadioGroup/RadioGroupLayoutTypes.d.ts +0 -4
  339. package/dist/components/SearchBar/SearchBar.Test.d.ts +0 -1
  340. package/dist/helpers/generateUUID.d.ts +0 -1
  341. package/src/components/CheckboxGroup/CheckboxGroupLayoutTypes.tsx +0 -4
  342. package/src/components/Pagination/Pagination.stories.tsx +0 -54
  343. package/src/components/RadioGroup/RadioGroupLayoutTypes.tsx +0 -4
  344. package/src/docs/Intro.stories.mdx +0 -53
  345. package/src/helpers/generateUUID.tsx +0 -5
  346. package/src/styles/base/_03-base.scss +0 -25
  347. package/src/styles/base/_04-focus.scss +0 -22
@@ -9,10 +9,15 @@ import { ProgressIndicatorTypes } from "./ProgressIndicatorTypes";
9
9
  describe("ProgressIndicator Accessibility", () => {
10
10
  it("passes axe accessibility for linear and circular types", async () => {
11
11
  const linearUtils = render(
12
- <ProgressIndicator labelText="Linear" value={50} />
12
+ <ProgressIndicator
13
+ id="progressIndicatorLinear"
14
+ labelText="Linear"
15
+ value={50}
16
+ />
13
17
  );
14
18
  const circularUtils = render(
15
19
  <ProgressIndicator
20
+ id="progressIndicatorCircular"
16
21
  labelText="Circular"
17
22
  value={50}
18
23
  indicatorType={ProgressIndicatorTypes.Circular}
@@ -24,10 +29,16 @@ describe("ProgressIndicator Accessibility", () => {
24
29
 
25
30
  it("passes axe accessibility for linear and circular types without labels", async () => {
26
31
  const linearUtils = render(
27
- <ProgressIndicator labelText="Linear" value={50} showLabel={false} />
32
+ <ProgressIndicator
33
+ id="progressIndicatorLinear"
34
+ labelText="Linear"
35
+ value={50}
36
+ showLabel={false}
37
+ />
28
38
  );
29
39
  const circularUtils = render(
30
40
  <ProgressIndicator
41
+ id="progressIndicatorCircular"
31
42
  labelText="Circular"
32
43
  value={50}
33
44
  indicatorType={ProgressIndicatorTypes.Circular}
@@ -40,10 +51,16 @@ describe("ProgressIndicator Accessibility", () => {
40
51
 
41
52
  it("passes axe accessibility for linear and circular types for indeterminate state", async () => {
42
53
  const linearUtils = render(
43
- <ProgressIndicator labelText="Linear" value={50} isIndeterminate />
54
+ <ProgressIndicator
55
+ id="progressIndicatorLinear"
56
+ labelText="Linear"
57
+ value={50}
58
+ isIndeterminate
59
+ />
44
60
  );
45
61
  const circularUtils = render(
46
62
  <ProgressIndicator
63
+ id="progressIndicatorCircular"
47
64
  labelText="Circular"
48
65
  value={50}
49
66
  indicatorType={ProgressIndicatorTypes.Circular}
@@ -56,10 +73,16 @@ describe("ProgressIndicator Accessibility", () => {
56
73
 
57
74
  it("passes axe accessibility for linear and circular types for dark mode", async () => {
58
75
  const linearUtils = render(
59
- <ProgressIndicator labelText="Linear" value={50} darkMode />
76
+ <ProgressIndicator
77
+ id="progressIndicatorLinear"
78
+ labelText="Linear"
79
+ value={50}
80
+ darkMode
81
+ />
60
82
  );
61
83
  const circularUtils = render(
62
84
  <ProgressIndicator
85
+ id="progressIndicatorCircular"
63
86
  labelText="Circular"
64
87
  value={50}
65
88
  indicatorType={ProgressIndicatorTypes.Circular}
@@ -73,7 +96,9 @@ describe("ProgressIndicator Accessibility", () => {
73
96
 
74
97
  describe("ProgressIndicator", () => {
75
98
  it("renders a label and a progressbar for the linear type", () => {
76
- render(<ProgressIndicator labelText="Linear" value={50} />);
99
+ render(
100
+ <ProgressIndicator id="progressIndicator" labelText="Linear" value={50} />
101
+ );
77
102
  expect(screen.getByLabelText("Linear")).toBeInTheDocument();
78
103
  expect(screen.getByRole("progressbar")).toBeInTheDocument();
79
104
  });
@@ -81,6 +106,7 @@ describe("ProgressIndicator", () => {
81
106
  it("renders a label, a progressbar, and an svg for the circular type", () => {
82
107
  const { container } = render(
83
108
  <ProgressIndicator
109
+ id="progressIndicator"
84
110
  labelText="Circular"
85
111
  indicatorType={ProgressIndicatorTypes.Circular}
86
112
  value={50}
@@ -93,7 +119,12 @@ describe("ProgressIndicator", () => {
93
119
 
94
120
  it("renders the appropriate aria atttribute when the label is hidden", () => {
95
121
  render(
96
- <ProgressIndicator labelText="Linear" value={50} showLabel={false} />
122
+ <ProgressIndicator
123
+ id="progressIndicator"
124
+ labelText="Linear"
125
+ value={50}
126
+ showLabel={false}
127
+ />
97
128
  );
98
129
  expect(screen.getByLabelText("Linear")).toBeInTheDocument();
99
130
  expect(screen.getByRole("progressbar")).toHaveAttribute(
@@ -104,32 +135,52 @@ describe("ProgressIndicator", () => {
104
135
 
105
136
  it("renders the value passed", () => {
106
137
  const { rerender } = render(
107
- <ProgressIndicator labelText="Linear" value={50} />
138
+ <ProgressIndicator id="progressIndicator" labelText="Linear" value={50} />
108
139
  );
109
140
  expect(screen.getByText("50%")).toBeInTheDocument();
110
141
 
111
- rerender(<ProgressIndicator labelText="Linear" value={89} />);
142
+ rerender(
143
+ <ProgressIndicator id="progressIndicator" labelText="Linear" value={89} />
144
+ );
112
145
  expect(screen.getByText("89%")).toBeInTheDocument();
113
146
 
114
- rerender(<ProgressIndicator labelText="Linear" value={4} />);
147
+ rerender(
148
+ <ProgressIndicator id="progressIndicator" labelText="Linear" value={4} />
149
+ );
115
150
  expect(screen.getByText("4%")).toBeInTheDocument();
116
151
  });
117
152
 
118
153
  it("logs a warning if a value less than 0 is passed", () => {
119
154
  const warn = jest.spyOn(console, "warn");
120
- render(<ProgressIndicator labelText="Linear" value={-20} />);
155
+ render(
156
+ <ProgressIndicator
157
+ id="progressIndicator"
158
+ labelText="Linear"
159
+ value={-20}
160
+ />
161
+ );
121
162
 
122
163
  expect(warn).toHaveBeenCalledWith(
123
- "ProgressIndicator: pass in a `value` between 0 and 100. Defaulting to 0."
164
+ "NYPL Reservoir ProgressIndicator: An invalid value was passed for the" +
165
+ " `value` prop, so 0 will be used. A valid value should be a number" +
166
+ " between 0 and 100."
124
167
  );
125
168
  });
126
169
 
127
170
  it("logs a warning if a value more than 100 is passed", () => {
128
171
  const warn = jest.spyOn(console, "warn");
129
- render(<ProgressIndicator labelText="Linear" value={150} />);
172
+ render(
173
+ <ProgressIndicator
174
+ id="progressIndicator"
175
+ labelText="Linear"
176
+ value={150}
177
+ />
178
+ );
130
179
 
131
180
  expect(warn).toHaveBeenCalledWith(
132
- "ProgressIndicator: pass in a `value` between 0 and 100. Defaulting to 0."
181
+ "NYPL Reservoir ProgressIndicator: An invalid value was passed for the" +
182
+ " `value` prop, so 0 will be used. A valid value should be a number" +
183
+ " between 0 and 100."
133
184
  );
134
185
  });
135
186
 
@@ -212,6 +263,27 @@ describe("ProgressIndicator", () => {
212
263
  />
213
264
  )
214
265
  .toJSON();
266
+ const withChakraProps = renderer
267
+ .create(
268
+ <ProgressIndicator
269
+ id="chakra"
270
+ labelText="Linear"
271
+ value={50}
272
+ p="20px"
273
+ color="ui.red.primary"
274
+ />
275
+ )
276
+ .toJSON();
277
+ const withOtherProps = renderer
278
+ .create(
279
+ <ProgressIndicator
280
+ id="props"
281
+ labelText="Linear"
282
+ value={50}
283
+ data-testid="props"
284
+ />
285
+ )
286
+ .toJSON();
215
287
 
216
288
  expect(linearBasic).toMatchSnapshot();
217
289
  expect(circularBasic).toMatchSnapshot();
@@ -221,5 +293,7 @@ describe("ProgressIndicator", () => {
221
293
  expect(circularIndeterminate).toMatchSnapshot();
222
294
  expect(linearDarkMode).toMatchSnapshot();
223
295
  expect(circularDarkMode).toMatchSnapshot();
296
+ expect(withChakraProps).toMatchSnapshot();
297
+ expect(withOtherProps).toMatchSnapshot();
224
298
  });
225
299
  });
@@ -1,24 +1,24 @@
1
- import React from "react";
2
1
  import {
3
2
  Box,
3
+ chakra,
4
4
  CircularProgress as ChakraCircularProgress,
5
5
  CircularProgressLabel as ChakraCircularProgressLabel,
6
6
  Progress as ChakraProgress,
7
7
  useMultiStyleConfig,
8
8
  } from "@chakra-ui/react";
9
+ import React from "react";
9
10
 
10
11
  import {
11
12
  ProgressIndicatorSizes,
12
13
  ProgressIndicatorTypes,
13
14
  } from "./ProgressIndicatorTypes";
14
- import generateUUID from "../../helpers/generateUUID";
15
15
  import Label from "../Label/Label";
16
16
 
17
17
  export interface ProgressIndicatorProps {
18
18
  /** Flag to render the component in a dark background. */
19
19
  darkMode?: boolean;
20
20
  /** ID that other components can cross reference for accessibility purposes. */
21
- id?: string;
21
+ id: string;
22
22
  /** Whether the `ProgressIndicator` should be linear or circular. */
23
23
  indicatorType?: ProgressIndicatorTypes;
24
24
  /** Whether the progress animation should display because the `value` prop is
@@ -40,27 +40,33 @@ export interface ProgressIndicatorProps {
40
40
  * time to complete or consists of multiple steps. Examples include downloading,
41
41
  * uploading, or processing.
42
42
  */
43
- const ProgressIndicator: React.FC<ProgressIndicatorProps> = (
44
- props: ProgressIndicatorProps
45
- ) => {
43
+ export const ProgressIndicator = chakra((props: ProgressIndicatorProps) => {
46
44
  const {
47
45
  darkMode = false,
48
- id = generateUUID(),
46
+ id,
49
47
  indicatorType = ProgressIndicatorTypes.Linear,
50
48
  isIndeterminate = false,
51
49
  labelText,
52
50
  showLabel = true,
53
51
  size = ProgressIndicatorSizes.Default,
54
52
  value = 0,
53
+ ...rest
55
54
  } = props;
56
55
  const styles = useMultiStyleConfig("ProgressIndicator", {
57
56
  darkMode,
58
57
  size,
59
58
  });
60
59
  let finalValue = value;
60
+ if (!id) {
61
+ console.warn(
62
+ "NYPL Reservoir Progress Indicator: This component's required `id` prop was not passed."
63
+ );
64
+ }
61
65
  if (finalValue < 0 || finalValue > 100) {
62
66
  console.warn(
63
- "ProgressIndicator: pass in a `value` between 0 and 100. Defaulting to 0."
67
+ "NYPL Reservoir ProgressIndicator: An invalid value was passed for the" +
68
+ " `value` prop, so 0 will be used. A valid value should be a number" +
69
+ " between 0 and 100."
64
70
  );
65
71
  finalValue = 0;
66
72
  }
@@ -120,7 +126,11 @@ const ProgressIndicator: React.FC<ProgressIndicatorProps> = (
120
126
  );
121
127
  };
122
128
 
123
- return <Box __css={styles}>{progressComponent(indicatorType)}</Box>;
124
- };
129
+ return (
130
+ <Box __css={styles} {...rest}>
131
+ {progressComponent(indicatorType)}
132
+ </Box>
133
+ );
134
+ });
125
135
 
126
136
  export default ProgressIndicator;
@@ -2,10 +2,10 @@
2
2
 
3
3
  exports[`ProgressIndicator Renders the UI snapshot correctly 1`] = `
4
4
  <div
5
- className="css-0"
5
+ className="css-1xdhyk6"
6
6
  >
7
7
  <label
8
- className="css-0"
8
+ className="css-1xdhyk6"
9
9
  htmlFor="linearBasic"
10
10
  id="linearBasic-label"
11
11
  >
@@ -45,7 +45,7 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 1`] = `
45
45
 
46
46
  exports[`ProgressIndicator Renders the UI snapshot correctly 2`] = `
47
47
  <div
48
- className="css-0"
48
+ className="css-1xdhyk6"
49
49
  >
50
50
  <div
51
51
  className="css-0"
@@ -89,7 +89,7 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 2`] = `
89
89
  </div>
90
90
  </div>
91
91
  <label
92
- className="css-0"
92
+ className="css-1xdhyk6"
93
93
  htmlFor="circularBasic"
94
94
  id="circularBasic-label"
95
95
  >
@@ -101,7 +101,7 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 2`] = `
101
101
 
102
102
  exports[`ProgressIndicator Renders the UI snapshot correctly 3`] = `
103
103
  <div
104
- className="css-0"
104
+ className="css-1xdhyk6"
105
105
  >
106
106
  <div
107
107
  className="css-0"
@@ -131,7 +131,7 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 3`] = `
131
131
 
132
132
  exports[`ProgressIndicator Renders the UI snapshot correctly 4`] = `
133
133
  <div
134
- className="css-0"
134
+ className="css-1xdhyk6"
135
135
  >
136
136
  <div
137
137
  className="css-0"
@@ -174,10 +174,10 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 4`] = `
174
174
 
175
175
  exports[`ProgressIndicator Renders the UI snapshot correctly 5`] = `
176
176
  <div
177
- className="css-0"
177
+ className="css-1xdhyk6"
178
178
  >
179
179
  <label
180
- className="css-0"
180
+ className="css-1xdhyk6"
181
181
  htmlFor="linearIndeterminate"
182
182
  id="linearIndeterminate-label"
183
183
  >
@@ -211,7 +211,7 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 5`] = `
211
211
 
212
212
  exports[`ProgressIndicator Renders the UI snapshot correctly 6`] = `
213
213
  <div
214
- className="css-0"
214
+ className="css-1xdhyk6"
215
215
  >
216
216
  <div
217
217
  className="css-0"
@@ -247,7 +247,7 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 6`] = `
247
247
  </svg>
248
248
  </div>
249
249
  <label
250
- className="css-0"
250
+ className="css-1xdhyk6"
251
251
  htmlFor="circularIndeterminate"
252
252
  id="circularIndeterminate-label"
253
253
  >
@@ -259,10 +259,10 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 6`] = `
259
259
 
260
260
  exports[`ProgressIndicator Renders the UI snapshot correctly 7`] = `
261
261
  <div
262
- className="css-0"
262
+ className="css-1xdhyk6"
263
263
  >
264
264
  <label
265
- className="css-0"
265
+ className="css-1xdhyk6"
266
266
  htmlFor="linearDarkMode"
267
267
  id="linearDarkMode-label"
268
268
  >
@@ -302,7 +302,7 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 7`] = `
302
302
 
303
303
  exports[`ProgressIndicator Renders the UI snapshot correctly 8`] = `
304
304
  <div
305
- className="css-0"
305
+ className="css-1xdhyk6"
306
306
  >
307
307
  <div
308
308
  className="css-0"
@@ -346,7 +346,7 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 8`] = `
346
346
  </div>
347
347
  </div>
348
348
  <label
349
- className="css-0"
349
+ className="css-1xdhyk6"
350
350
  htmlFor="circularDarkMode"
351
351
  id="circularDarkMode-label"
352
352
  >
@@ -355,3 +355,90 @@ exports[`ProgressIndicator Renders the UI snapshot correctly 8`] = `
355
355
  </div>
356
356
  </div>
357
357
  `;
358
+
359
+ exports[`ProgressIndicator Renders the UI snapshot correctly 9`] = `
360
+ <div
361
+ className="css-10g9ftz"
362
+ >
363
+ <label
364
+ className="css-1xdhyk6"
365
+ htmlFor="chakra"
366
+ id="chakra-label"
367
+ >
368
+ Linear
369
+ </label>
370
+ <div
371
+ className="css-0"
372
+ >
373
+ <div
374
+ className="css-kdwx3d"
375
+ id="chakra"
376
+ >
377
+ <div
378
+ aria-label={null}
379
+ aria-labelledby="chakra-label"
380
+ aria-valuemax={100}
381
+ aria-valuemin={0}
382
+ aria-valuenow={50}
383
+ className="css-1jy0d03"
384
+ role="progressbar"
385
+ style={
386
+ Object {
387
+ "width": "50%",
388
+ }
389
+ }
390
+ />
391
+ </div>
392
+ <div
393
+ className="css-0"
394
+ >
395
+ 50
396
+ %
397
+ </div>
398
+ </div>
399
+ </div>
400
+ `;
401
+
402
+ exports[`ProgressIndicator Renders the UI snapshot correctly 10`] = `
403
+ <div
404
+ className="css-1xdhyk6"
405
+ data-testid="props"
406
+ >
407
+ <label
408
+ className="css-1xdhyk6"
409
+ htmlFor="props"
410
+ id="props-label"
411
+ >
412
+ Linear
413
+ </label>
414
+ <div
415
+ className="css-0"
416
+ >
417
+ <div
418
+ className="css-kdwx3d"
419
+ id="props"
420
+ >
421
+ <div
422
+ aria-label={null}
423
+ aria-labelledby="props-label"
424
+ aria-valuemax={100}
425
+ aria-valuemin={0}
426
+ aria-valuenow={50}
427
+ className="css-1jy0d03"
428
+ role="progressbar"
429
+ style={
430
+ Object {
431
+ "width": "50%",
432
+ }
433
+ }
434
+ />
435
+ </div>
436
+ <div
437
+ className="css-0"
438
+ >
439
+ 50
440
+ %
441
+ </div>
442
+ </div>
443
+ </div>
444
+ `;
@@ -53,7 +53,22 @@ import DSProvider from "../../theme/provider";
53
53
  | Component Version | DS Version |
54
54
  | ----------------- | ---------- |
55
55
  | Added | `0.22.0` |
56
- | Latest | `0.25.10` |
56
+ | Latest | `0.26.0` |
57
+
58
+ ## Table of Contents
59
+
60
+ - [Overview](#overview)
61
+ - [Component Props](#component-props)
62
+ - [Accessibility](#accessibility)
63
+ - [Checked](#checked)
64
+ - [Focused](#focused)
65
+ - [Errored](#errored)
66
+ - [Disabled](#disabled)
67
+ - [Helper Text](#helper-text)
68
+ - [Error Text](#error-text)
69
+ - [With JSX Element Label](#with-jsx-element-label)
70
+
71
+ ## Overview
57
72
 
58
73
  <Description of={Radio} />
59
74
 
@@ -62,6 +77,8 @@ show the `Radio` button in isolation. We recommend to always use the `Radio`
62
77
  component inside the Design System `RadioGroup` component. The `RadioGroup`
63
78
  component will handle all the states and data management.
64
79
 
80
+ ## Component Props
81
+
65
82
  <Canvas withToolbar>
66
83
  <Story
67
84
  name="Radio"
@@ -88,11 +105,27 @@ component will handle all the states and data management.
88
105
 
89
106
  <ArgsTable story="Radio" />
90
107
 
108
+ ## Accessibility
109
+
110
+ The `Radio` component renders an `input` element with the `type="radio"` attribute.
111
+ This HTML element is accessible by default.
112
+
113
+ When `showLabel` is set to false, the `labelText` value will be set to the
114
+ `<input>`'s `aria-label` attribute.
115
+
116
+ Resources:
117
+
118
+ - [W3C ARIA radiogroup and radio example](https://www.w3.org/TR/2016/WD-wai-aria-practices-1.1-20160317/examples/radio/radio.html)
119
+ - [W3C Radio Button Example](https://www.w3.org/TR/2017/WD-wai-aria-practices-1.1-20170628/examples/radio/radio-1/radio-1.html)
120
+ - [MDN input type="radio"](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/radio)
121
+ - [Deque University Radio and Radio Group](https://dequeuniversity.com/library/aria/radio-and-radio-group)
122
+ - [Chakra UI Radio](https://chakra-ui.com/docs/components/form/radio)
123
+
91
124
  ## Checked
92
125
 
93
126
  <Canvas>
94
127
  <DSProvider>
95
- <Radio labelText="I am checked" isChecked value="1" />
128
+ <Radio labelText="I am checked" id="checked" isChecked value="1" />
96
129
  </DSProvider>
97
130
  </Canvas>
98
131
 
@@ -100,7 +133,10 @@ component will handle all the states and data management.
100
133
 
101
134
  <Canvas>
102
135
  <DSProvider>
103
- <Radio labelText="Click or tab to the Radio to see its focus state" />
136
+ <Radio
137
+ id="focused"
138
+ labelText="Click or tab to the Radio to see its focus state"
139
+ />
104
140
  </DSProvider>
105
141
  </Canvas>
106
142
 
@@ -109,8 +145,13 @@ component will handle all the states and data management.
109
145
  <Canvas>
110
146
  <DSProvider>
111
147
  <HStack>
112
- <Radio isInvalid labelText="I am in an error state" />
113
- <Radio isInvalid isChecked labelText="I am checked in an error state" />
148
+ <Radio id="invalid" isInvalid labelText="I am in an error state" />
149
+ <Radio
150
+ id="invalid-checked"
151
+ isInvalid
152
+ isChecked
153
+ labelText="I am checked in an error state"
154
+ />
114
155
  </HStack>
115
156
  </DSProvider>
116
157
  </Canvas>
@@ -120,8 +161,13 @@ component will handle all the states and data management.
120
161
  <Canvas>
121
162
  <DSProvider>
122
163
  <HStack>
123
- <Radio isDisabled labelText="I am disabled" />
124
- <Radio isDisabled isChecked labelText="I am checked and disabled" />
164
+ <Radio id="disabled" isDisabled labelText="I am disabled" />
165
+ <Radio
166
+ id="disabled-checked"
167
+ isDisabled
168
+ isChecked
169
+ labelText="I am checked and disabled"
170
+ />
125
171
  </HStack>
126
172
  </DSProvider>
127
173
  </Canvas>
@@ -131,9 +177,10 @@ component will handle all the states and data management.
131
177
  <Canvas>
132
178
  <DSProvider>
133
179
  <Radio
134
- name="testHelperText"
135
- labelText="I have helper text"
136
180
  helperText="I am the helper text for this Radio"
181
+ id="help-text"
182
+ labelText="I have helper text"
183
+ name="testHelperText"
137
184
  />
138
185
  </DSProvider>
139
186
  </Canvas>
@@ -143,10 +190,27 @@ component will handle all the states and data management.
143
190
  <Canvas>
144
191
  <DSProvider>
145
192
  <Radio
146
- name="testErrorText"
147
- labelText="I have error text"
193
+ id="invalid-text"
148
194
  invalidText="I am the error text for this Radio"
149
195
  isInvalid
196
+ labelText="I have error text"
197
+ name="testErrorText"
198
+ />
199
+ </DSProvider>
200
+ </Canvas>
201
+
202
+ ## With JSX Element Label
203
+
204
+ This is useful when you want to add dynamic content to the label or add
205
+ a layout to the label. View the `RadioGroup` documentation for this
206
+ usage.
207
+
208
+ <Canvas>
209
+ <DSProvider>
210
+ <Radio
211
+ id="jsx-label"
212
+ labelText={<span>Arts</span>}
213
+ name="jsxElementLabel"
150
214
  />
151
215
  </DSProvider>
152
216
  </Canvas>