@nypl/design-system-react-components 0.25.13 → 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 (299) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +10 -10
  3. package/dist/components/Accordion/Accordion.d.ts +1 -1
  4. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  5. package/dist/components/Button/Button.d.ts +2 -2
  6. package/dist/components/Card/Card.d.ts +11 -9
  7. package/dist/components/Checkbox/Checkbox.d.ts +2 -2
  8. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +5 -4
  9. package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +1 -1
  10. package/dist/components/DatePicker/DatePicker.d.ts +5 -6
  11. package/dist/components/Fieldset/Fieldset.d.ts +5 -6
  12. package/dist/components/Form/Form.d.ts +6 -6
  13. package/dist/components/Grid/GridTypes.d.ts +7 -7
  14. package/dist/components/Grid/SimpleGrid.d.ts +1 -1
  15. package/dist/components/Heading/Heading.d.ts +1 -1
  16. package/dist/components/HelperErrorText/HelperErrorText.d.ts +9 -8
  17. package/dist/components/Hero/Hero.d.ts +2 -1
  18. package/dist/components/HorizontalRule/HorizontalRule.d.ts +2 -10
  19. package/dist/components/Icons/Icon.d.ts +2 -1
  20. package/dist/components/Image/Image.d.ts +2 -2
  21. package/dist/components/Label/Label.d.ts +7 -4
  22. package/dist/components/Link/Link.d.ts +1 -1
  23. package/dist/components/List/List.d.ts +11 -11
  24. package/dist/components/List/ListTypes.d.ts +1 -1
  25. package/dist/components/Logo/Logo.d.ts +2 -1
  26. package/dist/components/Logo/LogoSvgs.d.ts +2 -0
  27. package/dist/components/Logo/LogoTypes.d.ts +2 -0
  28. package/dist/components/Notification/Notification.d.ts +4 -4
  29. package/dist/components/Pagination/Pagination.d.ts +2 -2
  30. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +3 -3
  31. package/dist/components/Radio/Radio.d.ts +4 -6
  32. package/dist/components/RadioGroup/RadioGroup.d.ts +12 -6
  33. package/dist/components/SearchBar/SearchBar.d.ts +4 -4
  34. package/dist/components/Select/Select.d.ts +10 -6
  35. package/dist/components/Select/SelectTypes.d.ts +4 -0
  36. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +4 -3
  37. package/dist/components/Slider/Slider.d.ts +6 -4
  38. package/dist/components/StatusBadge/StatusBadge.d.ts +5 -1
  39. package/dist/components/StructuredContent/StructuredContent.d.ts +2 -2
  40. package/dist/components/Table/Table.d.ts +1 -1
  41. package/dist/components/Tabs/Tabs.d.ts +4 -3
  42. package/dist/components/Template/Template.d.ts +4 -3
  43. package/dist/components/Text/Text.d.ts +1 -1
  44. package/dist/components/TextInput/TextInput.d.ts +5 -5
  45. package/dist/components/Toggle/Toggle.d.ts +3 -4
  46. package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
  47. package/dist/design-system-react-components.cjs.development.js +1663 -1139
  48. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  49. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  50. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  51. package/dist/design-system-react-components.esm.js +1667 -1143
  52. package/dist/design-system-react-components.esm.js.map +1 -1
  53. package/dist/hooks/useCarouselStyles.d.ts +3 -2
  54. package/dist/hooks/useNYPLTheme.d.ts +12 -0
  55. package/dist/index.d.ts +4 -1
  56. package/dist/styles.css +1 -1
  57. package/dist/theme/components/button.d.ts +10 -2
  58. package/dist/theme/components/card.d.ts +42 -22
  59. package/dist/theme/components/checkbox.d.ts +5 -4
  60. package/dist/theme/components/checkboxGroup.d.ts +1 -1
  61. package/dist/theme/components/componentWrapper.d.ts +2 -2
  62. package/dist/theme/components/customTable.d.ts +84 -1
  63. package/dist/theme/components/fieldset.d.ts +4 -14
  64. package/dist/theme/components/global.d.ts +23 -17
  65. package/dist/theme/components/heading.d.ts +53 -0
  66. package/dist/theme/components/helperErrorText.d.ts +1 -0
  67. package/dist/theme/components/hero.d.ts +20 -14
  68. package/dist/theme/components/label.d.ts +9 -10
  69. package/dist/theme/components/list.d.ts +99 -9
  70. package/dist/theme/components/radio.d.ts +6 -4
  71. package/dist/theme/components/radioGroup.d.ts +1 -1
  72. package/dist/theme/components/select.d.ts +34 -5
  73. package/dist/theme/components/skeletonLoader.d.ts +2 -2
  74. package/dist/theme/components/slider.d.ts +6 -3
  75. package/dist/theme/components/structuredContent.d.ts +197 -0
  76. package/dist/theme/components/textInput.d.ts +18 -6
  77. package/dist/theme/components/toggle.d.ts +7 -4
  78. package/dist/theme/foundations/global.d.ts +2 -0
  79. package/dist/theme/foundations/radii.d.ts +1 -0
  80. package/dist/theme/foundations/spacing.d.ts +46 -43
  81. package/package.json +5 -6
  82. package/src/components/Accordion/Accordion.stories.mdx +9 -9
  83. package/src/components/Accordion/Accordion.test.tsx +21 -0
  84. package/src/components/Accordion/Accordion.tsx +13 -9
  85. package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +276 -27
  86. package/src/components/Autosuggest/Autosuggest.stories.mdx +4 -3
  87. package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +21 -5
  88. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +52 -31
  89. package/src/components/Breadcrumbs/Breadcrumbs.tsx +8 -7
  90. package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +211 -12
  91. package/src/components/Button/Button.stories.mdx +87 -23
  92. package/src/components/Button/Button.test.tsx +25 -0
  93. package/src/components/Button/Button.tsx +18 -7
  94. package/src/components/Button/__snapshots__/Button.test.tsx.snap +27 -7
  95. package/src/components/Card/Card.stories.mdx +287 -194
  96. package/src/components/Card/Card.test.tsx +102 -0
  97. package/src/components/Card/Card.tsx +73 -32
  98. package/src/components/Card/__snapshots__/Card.test.tsx.snap +195 -35
  99. package/src/components/Chakra/Grid.stories.mdx +4 -4
  100. package/src/components/Checkbox/Checkbox.stories.mdx +62 -10
  101. package/src/components/Checkbox/Checkbox.test.tsx +32 -9
  102. package/src/components/Checkbox/Checkbox.tsx +20 -15
  103. package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +134 -7
  104. package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +65 -17
  105. package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +137 -81
  106. package/src/components/CheckboxGroup/CheckboxGroup.tsx +31 -21
  107. package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +332 -97
  108. package/src/components/ComponentWrapper/ComponentWrapper.test.tsx +12 -0
  109. package/src/components/ComponentWrapper/ComponentWrapper.tsx +39 -41
  110. package/src/components/ComponentWrapper/__snapshots__/ComponentWrapper.test.tsx.snap +47 -34
  111. package/src/components/DatePicker/DatePicker.stories.mdx +63 -27
  112. package/src/components/DatePicker/DatePicker.test.tsx +89 -13
  113. package/src/components/DatePicker/DatePicker.tsx +62 -56
  114. package/src/components/DatePicker/_DatePicker.scss +71 -13
  115. package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +250 -206
  116. package/src/components/Fieldset/Fieldset.stories.mdx +33 -3
  117. package/src/components/Fieldset/Fieldset.test.tsx +58 -28
  118. package/src/components/Fieldset/Fieldset.tsx +35 -30
  119. package/src/components/Fieldset/__snapshots__/Fieldset.test.tsx.snap +40 -19
  120. package/src/components/Form/Form.stories.mdx +72 -39
  121. package/src/components/Form/Form.test.tsx +58 -15
  122. package/src/components/Form/Form.tsx +89 -67
  123. package/src/components/Form/__snapshots__/Form.test.tsx.snap +83 -5
  124. package/src/components/Grid/GridTypes.tsx +7 -7
  125. package/src/components/Grid/SimpleGrid.stories.mdx +34 -6
  126. package/src/components/Grid/SimpleGrid.test.tsx +9 -0
  127. package/src/components/Grid/SimpleGrid.tsx +29 -20
  128. package/src/components/Grid/__snapshots__/SimpleGrid.test.tsx.snap +16 -1
  129. package/src/components/Heading/Heading.stories.mdx +36 -3
  130. package/src/components/Heading/Heading.test.tsx +10 -0
  131. package/src/components/Heading/Heading.tsx +56 -50
  132. package/src/components/Heading/__snapshots__/Heading.test.tsx.snap +26 -7
  133. package/src/components/HelperErrorText/HelperErrorText.stories.mdx +64 -42
  134. package/src/components/HelperErrorText/HelperErrorText.test.tsx +15 -0
  135. package/src/components/HelperErrorText/HelperErrorText.tsx +40 -35
  136. package/src/components/HelperErrorText/__snapshots__/HelperErrorText.test.tsx.snap +35 -4
  137. package/src/components/Hero/Hero.stories.mdx +125 -95
  138. package/src/components/Hero/Hero.test.tsx +33 -0
  139. package/src/components/Hero/Hero.tsx +135 -126
  140. package/src/components/Hero/__snapshots__/Hero.test.tsx.snap +89 -17
  141. package/src/components/HorizontalRule/HorizontalRule.stories.mdx +26 -4
  142. package/src/components/HorizontalRule/HorizontalRule.test.tsx +9 -19
  143. package/src/components/HorizontalRule/HorizontalRule.tsx +9 -26
  144. package/src/components/HorizontalRule/__snapshots__/HorizontalRule.test.tsx.snap +18 -5
  145. package/src/components/Icons/Icon.stories.mdx +31 -6
  146. package/src/components/Icons/Icon.test.tsx +38 -0
  147. package/src/components/Icons/Icon.tsx +93 -76
  148. package/src/components/Icons/__snapshots__/Icon.test.tsx.snap +129 -0
  149. package/src/components/Image/Image.stories.mdx +29 -5
  150. package/src/components/Image/Image.test.tsx +8 -0
  151. package/src/components/Image/Image.tsx +38 -26
  152. package/src/components/Image/__snapshots__/Image.test.tsx.snap +24 -8
  153. package/src/components/Label/Label.stories.mdx +42 -20
  154. package/src/components/Label/Label.test.tsx +42 -17
  155. package/src/components/Label/Label.tsx +22 -13
  156. package/src/components/Label/__snapshots__/Label.test.tsx.snap +19 -15
  157. package/src/components/Link/Link.stories.mdx +25 -1
  158. package/src/components/Link/Link.test.tsx +21 -0
  159. package/src/components/Link/Link.tsx +8 -8
  160. package/src/components/Link/__snapshots__/Link.test.tsx.snap +37 -11
  161. package/src/components/List/List.stories.mdx +75 -40
  162. package/src/components/List/List.test.tsx +67 -19
  163. package/src/components/List/List.tsx +38 -25
  164. package/src/components/List/ListTypes.tsx +1 -1
  165. package/src/components/List/__snapshots__/List.test.tsx.snap +110 -8
  166. package/src/components/Logo/Logo.stories.mdx +30 -6
  167. package/src/components/Logo/Logo.test.tsx +17 -0
  168. package/src/components/Logo/Logo.tsx +18 -6
  169. package/src/components/Logo/LogoSvgs.tsx +4 -0
  170. package/src/components/Logo/LogoTypes.tsx +2 -0
  171. package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +73 -2
  172. package/src/components/Modal/Modal.stories.mdx +13 -0
  173. package/src/components/Notification/Notification.stories.mdx +25 -1
  174. package/src/components/Notification/Notification.test.tsx +23 -0
  175. package/src/components/Notification/Notification.tsx +46 -44
  176. package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +158 -29
  177. package/src/components/Pagination/Pagination.stories.mdx +24 -4
  178. package/src/components/Pagination/Pagination.test.tsx +25 -0
  179. package/src/components/Pagination/Pagination.tsx +6 -6
  180. package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +244 -27
  181. package/src/components/Placeholder/Placeholder.tsx +3 -1
  182. package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +76 -10
  183. package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +81 -11
  184. package/src/components/ProgressIndicator/ProgressIndicator.tsx +17 -9
  185. package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +101 -14
  186. package/src/components/Radio/Radio.stories.mdx +64 -12
  187. package/src/components/Radio/Radio.test.tsx +28 -8
  188. package/src/components/Radio/Radio.tsx +66 -63
  189. package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +103 -6
  190. package/src/components/RadioGroup/RadioGroup.stories.mdx +224 -89
  191. package/src/components/RadioGroup/RadioGroup.test.tsx +122 -62
  192. package/src/components/RadioGroup/RadioGroup.tsx +106 -100
  193. package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1236 -1020
  194. package/src/components/SearchBar/SearchBar.stories.mdx +101 -36
  195. package/src/components/SearchBar/{SearchBar.Test.tsx → SearchBar.test.tsx} +46 -4
  196. package/src/components/SearchBar/SearchBar.tsx +17 -8
  197. package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1039 -0
  198. package/src/components/Select/Select.stories.mdx +128 -49
  199. package/src/components/Select/Select.test.tsx +63 -16
  200. package/src/components/Select/Select.tsx +125 -92
  201. package/src/components/Select/SelectTypes.tsx +5 -0
  202. package/src/components/Select/__snapshots__/Select.test.tsx.snap +749 -409
  203. package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +42 -10
  204. package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +8 -0
  205. package/src/components/SkeletonLoader/SkeletonLoader.tsx +76 -72
  206. package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +169 -10
  207. package/src/components/Slider/Slider.stories.mdx +91 -42
  208. package/src/components/Slider/Slider.test.tsx +65 -17
  209. package/src/components/Slider/Slider.tsx +26 -19
  210. package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +403 -226
  211. package/src/components/StatusBadge/StatusBadge.stories.mdx +19 -1
  212. package/src/components/StatusBadge/StatusBadge.test.tsx +16 -0
  213. package/src/components/StatusBadge/StatusBadge.tsx +25 -20
  214. package/src/components/StatusBadge/__snapshots__/StatusBadge.test.tsx.snap +22 -3
  215. package/src/components/StructuredContent/StructuredContent.stories.mdx +131 -12
  216. package/src/components/StructuredContent/StructuredContent.test.tsx +34 -0
  217. package/src/components/StructuredContent/StructuredContent.tsx +80 -75
  218. package/src/components/StructuredContent/__snapshots__/StructuredContent.test.tsx.snap +102 -17
  219. package/src/components/StyleGuide/Bidirectionality.stories.mdx +5 -5
  220. package/src/components/StyleGuide/Breakpoints.stories.mdx +6 -6
  221. package/src/components/StyleGuide/Buttons.stories.mdx +2 -12
  222. package/src/components/StyleGuide/ColorCard.tsx +1 -1
  223. package/src/components/StyleGuide/Colors.stories.mdx +1 -2
  224. package/src/components/StyleGuide/DesignTokens.stories.mdx +56 -26
  225. package/src/components/StyleGuide/Forms.stories.mdx +27 -12
  226. package/src/components/StyleGuide/Iconography.stories.mdx +2 -12
  227. package/src/components/StyleGuide/Spacing.stories.mdx +80 -41
  228. package/src/components/StyleGuide/Typography.stories.mdx +30 -21
  229. package/src/components/Table/Table.stories.mdx +38 -11
  230. package/src/components/Table/Table.test.tsx +15 -0
  231. package/src/components/Table/Table.tsx +7 -7
  232. package/src/components/Table/__snapshots__/Table.test.tsx.snap +408 -5
  233. package/src/components/Tabs/Tabs.stories.mdx +52 -3
  234. package/src/components/Tabs/Tabs.test.tsx +16 -0
  235. package/src/components/Tabs/Tabs.tsx +10 -6
  236. package/src/components/Tabs/__snapshots__/Tabs.test.tsx.snap +394 -5
  237. package/src/components/Template/Template.stories.mdx +47 -43
  238. package/src/components/Template/Template.test.tsx +33 -0
  239. package/src/components/Template/Template.tsx +65 -60
  240. package/src/components/Template/__snapshots__/Template.test.tsx.snap +191 -20
  241. package/src/components/Text/Text.stories.mdx +20 -1
  242. package/src/components/Text/Text.test.tsx +12 -0
  243. package/src/components/Text/Text.tsx +6 -4
  244. package/src/components/Text/__snapshots__/Text.test.tsx.snap +21 -4
  245. package/src/components/TextInput/TextInput.stories.mdx +65 -19
  246. package/src/components/TextInput/TextInput.test.tsx +42 -28
  247. package/src/components/TextInput/TextInput.tsx +121 -113
  248. package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +96 -73
  249. package/src/components/Toggle/Toggle.stories.mdx +80 -22
  250. package/src/components/Toggle/Toggle.test.tsx +27 -9
  251. package/src/components/Toggle/Toggle.tsx +22 -18
  252. package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +128 -5
  253. package/src/components/VideoPlayer/VideoPlayer.stories.mdx +52 -4
  254. package/src/components/VideoPlayer/VideoPlayer.test.tsx +23 -0
  255. package/src/components/VideoPlayer/VideoPlayer.tsx +133 -126
  256. package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +81 -39
  257. package/src/docs/Chakra.stories.mdx +50 -9
  258. package/src/docs/Welcome.stories.mdx +160 -41
  259. package/src/hooks/useCarouselStyles.stories.mdx +22 -2
  260. package/src/hooks/useCarouselStyles.ts +3 -2
  261. package/src/hooks/useNYPLTheme.stories.mdx +101 -0
  262. package/src/hooks/useNYPLTheme.ts +30 -6
  263. package/src/hooks/useWindowSize.stories.mdx +23 -0
  264. package/src/index.ts +4 -1
  265. package/src/styles/base/_place-holder.scss +1 -1
  266. package/src/theme/components/button.ts +15 -7
  267. package/src/theme/components/card.ts +30 -19
  268. package/src/theme/components/checkbox.ts +10 -8
  269. package/src/theme/components/checkboxGroup.ts +1 -1
  270. package/src/theme/components/componentWrapper.ts +2 -2
  271. package/src/theme/components/customTable.ts +39 -31
  272. package/src/theme/components/fieldset.ts +1 -2
  273. package/src/theme/components/global.ts +25 -20
  274. package/src/theme/components/heading.ts +1 -1
  275. package/src/theme/components/helperErrorText.ts +1 -0
  276. package/src/theme/components/hero.ts +13 -15
  277. package/src/theme/components/label.ts +4 -3
  278. package/src/theme/components/list.ts +73 -66
  279. package/src/theme/components/notification.ts +2 -2
  280. package/src/theme/components/radio.ts +9 -9
  281. package/src/theme/components/radioGroup.ts +1 -1
  282. package/src/theme/components/select.ts +35 -22
  283. package/src/theme/components/skeletonLoader.ts +3 -3
  284. package/src/theme/components/slider.ts +8 -7
  285. package/src/theme/components/statusBadge.ts +2 -2
  286. package/src/theme/components/structuredContent.ts +66 -1
  287. package/src/theme/components/tabs.ts +2 -2
  288. package/src/theme/components/template.ts +9 -9
  289. package/src/theme/components/textInput.ts +13 -12
  290. package/src/theme/components/toggle.ts +17 -10
  291. package/src/theme/components/videoPlayer.ts +1 -1
  292. package/src/theme/foundations/colors.ts +1 -1
  293. package/src/theme/foundations/radii.ts +1 -0
  294. package/src/theme/foundations/spacing.ts +70 -22
  295. package/src/theme/foundations/typography.ts +2 -2
  296. package/src/utils/componentCategories.ts +1 -2
  297. package/dist/components/SearchBar/SearchBar.Test.d.ts +0 -1
  298. package/dist/helpers/generateUUID.d.ts +0 -1
  299. package/src/helpers/generateUUID.tsx +0 -5
@@ -3,19 +3,19 @@
3
3
  exports[`Pagination Rendering renders the UI snapshot correctly 1`] = `
4
4
  <nav
5
5
  aria-label="Pagination"
6
- className="css-0"
6
+ className="css-1xdhyk6"
7
7
  id="firstPage"
8
8
  role="navigation"
9
9
  >
10
10
  <ul
11
- className="css-0"
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-1858g8z"
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-0"
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-0"
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-0"
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-0"
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-0"
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-0"
98
+ className="css-1xdhyk6"
99
99
  href="page=2"
100
100
  id="firstPage-Next"
101
101
  rel={null}
@@ -111,18 +111,18 @@ exports[`Pagination Rendering renders the UI snapshot correctly 1`] = `
111
111
  exports[`Pagination Rendering renders the UI snapshot correctly 2`] = `
112
112
  <nav
113
113
  aria-label="Pagination"
114
- className="css-0"
114
+ className="css-1xdhyk6"
115
115
  id="lastPage"
116
116
  role="navigation"
117
117
  >
118
118
  <ul
119
- className="css-0"
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-0"
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-0"
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-0"
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-0"
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-0"
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-0"
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-1858g8z"
206
+ className="css-1eo4rk2"
207
207
  href="page=10"
208
208
  id="lastPage-10"
209
209
  rel={null}
@@ -219,18 +219,18 @@ exports[`Pagination Rendering renders the UI snapshot correctly 2`] = `
219
219
  exports[`Pagination Rendering renders the UI snapshot correctly 3`] = `
220
220
  <nav
221
221
  aria-label="Pagination"
222
- className="css-0"
222
+ className="css-1xdhyk6"
223
223
  id="middlePage"
224
224
  role="navigation"
225
225
  >
226
226
  <ul
227
- className="css-0"
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-0"
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-0"
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-0"
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-1858g8z"
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-0"
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-0"
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-0"
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 <div className={`placeholder placeholder-${variant}`}>{children}</div>;
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.25.12` |
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
- ### Sizing
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
- ### Labels
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
- ### Indeterminate State
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
- ### Dark Mode
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
- ### Example
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}