@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
@@ -2,16 +2,11 @@
2
2
 
3
3
  exports[`Checkbox renders the UI snapshot correctly 1`] = `
4
4
  <fieldset
5
- className="css-0"
5
+ className="css-1u8qly9"
6
6
  id="column-checkbox-group"
7
7
  >
8
8
  <legend>
9
9
  column
10
- <div
11
- className="css-0"
12
- >
13
- Optional
14
- </div>
15
10
  </legend>
16
11
  <div
17
12
  aria-label={null}
@@ -20,7 +15,7 @@ exports[`Checkbox renders the UI snapshot correctly 1`] = `
20
15
  id="column"
21
16
  >
22
17
  <label
23
- className="chakra-checkbox css-g8du1g"
18
+ className="chakra-checkbox css-1cgy6rg"
24
19
  onClick={[Function]}
25
20
  >
26
21
  <input
@@ -81,7 +76,7 @@ exports[`Checkbox renders the UI snapshot correctly 1`] = `
81
76
  </span>
82
77
  </label>
83
78
  <label
84
- className="chakra-checkbox css-g8du1g"
79
+ className="chakra-checkbox css-1cgy6rg"
85
80
  onClick={[Function]}
86
81
  >
87
82
  <input
@@ -147,16 +142,11 @@ exports[`Checkbox renders the UI snapshot correctly 1`] = `
147
142
 
148
143
  exports[`Checkbox renders the UI snapshot correctly 2`] = `
149
144
  <fieldset
150
- className="css-0"
145
+ className="css-1u8qly9"
151
146
  id="row-checkbox-group"
152
147
  >
153
148
  <legend>
154
149
  row
155
- <div
156
- className="css-0"
157
- >
158
- Optional
159
- </div>
160
150
  </legend>
161
151
  <div
162
152
  aria-label={null}
@@ -165,7 +155,7 @@ exports[`Checkbox renders the UI snapshot correctly 2`] = `
165
155
  id="row"
166
156
  >
167
157
  <label
168
- className="chakra-checkbox css-g8du1g"
158
+ className="chakra-checkbox css-1cgy6rg"
169
159
  onClick={[Function]}
170
160
  >
171
161
  <input
@@ -226,7 +216,7 @@ exports[`Checkbox renders the UI snapshot correctly 2`] = `
226
216
  </span>
227
217
  </label>
228
218
  <label
229
- className="chakra-checkbox css-g8du1g"
219
+ className="chakra-checkbox css-1cgy6rg"
230
220
  onClick={[Function]}
231
221
  >
232
222
  <input
@@ -292,16 +282,11 @@ exports[`Checkbox renders the UI snapshot correctly 2`] = `
292
282
 
293
283
  exports[`Checkbox renders the UI snapshot correctly 3`] = `
294
284
  <fieldset
295
- className="css-0"
285
+ className="css-1u8qly9"
296
286
  id="noLabel-checkbox-group"
297
287
  >
298
288
  <legend>
299
289
  no label
300
- <div
301
- className="css-0"
302
- >
303
- Optional
304
- </div>
305
290
  </legend>
306
291
  <div
307
292
  aria-label="no label"
@@ -310,7 +295,7 @@ exports[`Checkbox renders the UI snapshot correctly 3`] = `
310
295
  id="noLabel"
311
296
  >
312
297
  <label
313
- className="chakra-checkbox css-g8du1g"
298
+ className="chakra-checkbox css-1cgy6rg"
314
299
  onClick={[Function]}
315
300
  >
316
301
  <input
@@ -371,7 +356,7 @@ exports[`Checkbox renders the UI snapshot correctly 3`] = `
371
356
  </span>
372
357
  </label>
373
358
  <label
374
- className="chakra-checkbox css-g8du1g"
359
+ className="chakra-checkbox css-1cgy6rg"
375
360
  onClick={[Function]}
376
361
  >
377
362
  <input
@@ -437,16 +422,11 @@ exports[`Checkbox renders the UI snapshot correctly 3`] = `
437
422
 
438
423
  exports[`Checkbox renders the UI snapshot correctly 4`] = `
439
424
  <fieldset
440
- className="css-0"
425
+ className="css-1u8qly9"
441
426
  id="helperText-checkbox-group"
442
427
  >
443
428
  <legend>
444
429
  helperText
445
- <div
446
- className="css-0"
447
- >
448
- Optional
449
- </div>
450
430
  </legend>
451
431
  <div
452
432
  aria-label={null}
@@ -455,7 +435,7 @@ exports[`Checkbox renders the UI snapshot correctly 4`] = `
455
435
  id="helperText"
456
436
  >
457
437
  <label
458
- className="chakra-checkbox css-g8du1g"
438
+ className="chakra-checkbox css-1cgy6rg"
459
439
  onClick={[Function]}
460
440
  >
461
441
  <input
@@ -516,7 +496,7 @@ exports[`Checkbox renders the UI snapshot correctly 4`] = `
516
496
  </span>
517
497
  </label>
518
498
  <label
519
- className="chakra-checkbox css-g8du1g"
499
+ className="chakra-checkbox css-1cgy6rg"
520
500
  onClick={[Function]}
521
501
  >
522
502
  <input
@@ -578,36 +558,27 @@ exports[`Checkbox renders the UI snapshot correctly 4`] = `
578
558
  </label>
579
559
  </div>
580
560
  <div
581
- className="css-0"
582
- >
583
- <div
584
- aria-atomic={true}
585
- aria-live="off"
586
- className=" css-0"
587
- dangerouslySetInnerHTML={
588
- Object {
589
- "__html": "helper text",
590
- }
561
+ aria-atomic={true}
562
+ aria-live="off"
563
+ className="css-1xdhyk6"
564
+ dangerouslySetInnerHTML={
565
+ Object {
566
+ "__html": "helper text",
591
567
  }
592
- data-isinvalid={false}
593
- id="helperText-helperErrorText"
594
- />
595
- </div>
568
+ }
569
+ data-isinvalid={false}
570
+ id="helperText-helperErrorText"
571
+ />
596
572
  </fieldset>
597
573
  `;
598
574
 
599
575
  exports[`Checkbox renders the UI snapshot correctly 5`] = `
600
576
  <fieldset
601
- className="css-0"
577
+ className="css-1u8qly9"
602
578
  id="invalidText-checkbox-group"
603
579
  >
604
580
  <legend>
605
581
  invalidText
606
- <div
607
- className="css-0"
608
- >
609
- Optional
610
- </div>
611
582
  </legend>
612
583
  <div
613
584
  aria-label={null}
@@ -616,7 +587,7 @@ exports[`Checkbox renders the UI snapshot correctly 5`] = `
616
587
  id="invalidText"
617
588
  >
618
589
  <label
619
- className="chakra-checkbox css-g8du1g"
590
+ className="chakra-checkbox css-1cgy6rg"
620
591
  onClick={[Function]}
621
592
  >
622
593
  <input
@@ -677,7 +648,7 @@ exports[`Checkbox renders the UI snapshot correctly 5`] = `
677
648
  </span>
678
649
  </label>
679
650
  <label
680
- className="chakra-checkbox css-g8du1g"
651
+ className="chakra-checkbox css-1cgy6rg"
681
652
  onClick={[Function]}
682
653
  >
683
654
  <input
@@ -743,8 +714,8 @@ exports[`Checkbox renders the UI snapshot correctly 5`] = `
743
714
 
744
715
  exports[`Checkbox renders the UI snapshot correctly 6`] = `
745
716
  <fieldset
746
- className="css-0"
747
- id="optReq-checkbox-group"
717
+ className="css-1u8qly9"
718
+ id="noRequiredLabel-checkbox-group"
748
719
  >
749
720
  <legend>
750
721
  no optional or required label
@@ -753,10 +724,10 @@ exports[`Checkbox renders the UI snapshot correctly 6`] = `
753
724
  aria-label={null}
754
725
  className="chakra-stack css-1wdv1uh"
755
726
  data-testid="checkbox-group"
756
- id="optReq"
727
+ id="noRequiredLabel"
757
728
  >
758
729
  <label
759
- className="chakra-checkbox css-g8du1g"
730
+ className="chakra-checkbox css-1cgy6rg"
760
731
  onClick={[Function]}
761
732
  >
762
733
  <input
@@ -765,14 +736,14 @@ exports[`Checkbox renders the UI snapshot correctly 6`] = `
765
736
  checked={false}
766
737
  className="chakra-checkbox__input"
767
738
  disabled={false}
768
- id="optReq-0"
769
- name="optReq"
739
+ id="noRequiredLabel-0"
740
+ name="noRequiredLabel"
770
741
  onBlur={[Function]}
771
742
  onChange={[Function]}
772
743
  onFocus={[Function]}
773
744
  onKeyDown={[Function]}
774
745
  onKeyUp={[Function]}
775
- required={false}
746
+ required={true}
776
747
  style={
777
748
  Object {
778
749
  "border": "0px",
@@ -817,7 +788,7 @@ exports[`Checkbox renders the UI snapshot correctly 6`] = `
817
788
  </span>
818
789
  </label>
819
790
  <label
820
- className="chakra-checkbox css-g8du1g"
791
+ className="chakra-checkbox css-1cgy6rg"
821
792
  onClick={[Function]}
822
793
  >
823
794
  <input
@@ -826,14 +797,14 @@ exports[`Checkbox renders the UI snapshot correctly 6`] = `
826
797
  checked={false}
827
798
  className="chakra-checkbox__input"
828
799
  disabled={false}
829
- id="optReq-1"
830
- name="optReq"
800
+ id="noRequiredLabel-1"
801
+ name="noRequiredLabel"
831
802
  onBlur={[Function]}
832
803
  onChange={[Function]}
833
804
  onFocus={[Function]}
834
805
  onKeyDown={[Function]}
835
806
  onKeyUp={[Function]}
836
- required={false}
807
+ required={true}
837
808
  style={
838
809
  Object {
839
810
  "border": "0px",
@@ -883,16 +854,14 @@ exports[`Checkbox renders the UI snapshot correctly 6`] = `
883
854
 
884
855
  exports[`Checkbox renders the UI snapshot correctly 7`] = `
885
856
  <fieldset
886
- className="css-0"
857
+ className="css-1u8qly9"
887
858
  id="required-checkbox-group"
888
859
  >
889
860
  <legend>
890
861
  required
891
- <div
892
- className="css-0"
893
- >
894
- Optional
895
- </div>
862
+ <span>
863
+ (Required)
864
+ </span>
896
865
  </legend>
897
866
  <div
898
867
  aria-label={null}
@@ -901,7 +870,7 @@ exports[`Checkbox renders the UI snapshot correctly 7`] = `
901
870
  id="required"
902
871
  >
903
872
  <label
904
- className="chakra-checkbox css-g8du1g"
873
+ className="chakra-checkbox css-1cgy6rg"
905
874
  onClick={[Function]}
906
875
  >
907
876
  <input
@@ -962,7 +931,7 @@ exports[`Checkbox renders the UI snapshot correctly 7`] = `
962
931
  </span>
963
932
  </label>
964
933
  <label
965
- className="chakra-checkbox css-g8du1g"
934
+ className="chakra-checkbox css-1cgy6rg"
966
935
  onClick={[Function]}
967
936
  >
968
937
  <input
@@ -1028,16 +997,11 @@ exports[`Checkbox renders the UI snapshot correctly 7`] = `
1028
997
 
1029
998
  exports[`Checkbox renders the UI snapshot correctly 8`] = `
1030
999
  <fieldset
1031
- className="css-0"
1000
+ className="css-1u8qly9"
1032
1001
  id="invalid-checkbox-group"
1033
1002
  >
1034
1003
  <legend>
1035
1004
  invalid
1036
- <div
1037
- className="css-0"
1038
- >
1039
- Optional
1040
- </div>
1041
1005
  </legend>
1042
1006
  <div
1043
1007
  aria-label={null}
@@ -1046,7 +1010,7 @@ exports[`Checkbox renders the UI snapshot correctly 8`] = `
1046
1010
  id="invalid"
1047
1011
  >
1048
1012
  <label
1049
- className="chakra-checkbox css-g8du1g"
1013
+ className="chakra-checkbox css-1cgy6rg"
1050
1014
  data-invalid=""
1051
1015
  onClick={[Function]}
1052
1016
  >
@@ -1110,7 +1074,7 @@ exports[`Checkbox renders the UI snapshot correctly 8`] = `
1110
1074
  </span>
1111
1075
  </label>
1112
1076
  <label
1113
- className="chakra-checkbox css-g8du1g"
1077
+ className="chakra-checkbox css-1cgy6rg"
1114
1078
  data-invalid=""
1115
1079
  onClick={[Function]}
1116
1080
  >
@@ -1179,16 +1143,11 @@ exports[`Checkbox renders the UI snapshot correctly 8`] = `
1179
1143
 
1180
1144
  exports[`Checkbox renders the UI snapshot correctly 9`] = `
1181
1145
  <fieldset
1182
- className="css-0"
1146
+ className="css-1u8qly9"
1183
1147
  id="disabled-checkbox-group"
1184
1148
  >
1185
1149
  <legend>
1186
1150
  disabled
1187
- <div
1188
- className="css-0"
1189
- >
1190
- Optional
1191
- </div>
1192
1151
  </legend>
1193
1152
  <div
1194
1153
  aria-label={null}
@@ -1197,7 +1156,7 @@ exports[`Checkbox renders the UI snapshot correctly 9`] = `
1197
1156
  id="disabled"
1198
1157
  >
1199
1158
  <label
1200
- className="chakra-checkbox css-g8du1g"
1159
+ className="chakra-checkbox css-1cgy6rg"
1201
1160
  data-disabled=""
1202
1161
  onClick={[Function]}
1203
1162
  >
@@ -1261,7 +1220,7 @@ exports[`Checkbox renders the UI snapshot correctly 9`] = `
1261
1220
  </span>
1262
1221
  </label>
1263
1222
  <label
1264
- className="chakra-checkbox css-g8du1g"
1223
+ className="chakra-checkbox css-1cgy6rg"
1265
1224
  data-disabled=""
1266
1225
  onClick={[Function]}
1267
1226
  >
@@ -1330,16 +1289,11 @@ exports[`Checkbox renders the UI snapshot correctly 9`] = `
1330
1289
 
1331
1290
  exports[`Checkbox renders the UI snapshot correctly 10`] = `
1332
1291
  <fieldset
1333
- className="css-0"
1292
+ className="css-1u8qly9"
1334
1293
  id="jsxLabels-checkbox-group"
1335
1294
  >
1336
1295
  <legend>
1337
1296
  jsxLabels
1338
- <div
1339
- className="css-0"
1340
- >
1341
- Optional
1342
- </div>
1343
1297
  </legend>
1344
1298
  <div
1345
1299
  aria-label={null}
@@ -1348,7 +1302,7 @@ exports[`Checkbox renders the UI snapshot correctly 10`] = `
1348
1302
  id="jsxLabels"
1349
1303
  >
1350
1304
  <label
1351
- className="chakra-checkbox css-g8du1g"
1305
+ className="chakra-checkbox css-1cgy6rg"
1352
1306
  onClick={[Function]}
1353
1307
  >
1354
1308
  <input
@@ -1421,7 +1375,7 @@ exports[`Checkbox renders the UI snapshot correctly 10`] = `
1421
1375
  </span>
1422
1376
  </label>
1423
1377
  <label
1424
- className="chakra-checkbox css-g8du1g"
1378
+ className="chakra-checkbox css-1cgy6rg"
1425
1379
  onClick={[Function]}
1426
1380
  >
1427
1381
  <input
@@ -1496,3 +1450,284 @@ exports[`Checkbox renders the UI snapshot correctly 10`] = `
1496
1450
  </div>
1497
1451
  </fieldset>
1498
1452
  `;
1453
+
1454
+ exports[`Checkbox renders the UI snapshot correctly 11`] = `
1455
+ <fieldset
1456
+ className="css-2bbtg1"
1457
+ id="chakraProps-checkbox-group"
1458
+ >
1459
+ <legend>
1460
+ chakraProps
1461
+ </legend>
1462
+ <div
1463
+ aria-label={null}
1464
+ className="chakra-stack css-1wdv1uh"
1465
+ data-testid="checkbox-group"
1466
+ id="chakraProps"
1467
+ >
1468
+ <label
1469
+ className="chakra-checkbox css-1cgy6rg"
1470
+ onClick={[Function]}
1471
+ >
1472
+ <input
1473
+ aria-disabled={false}
1474
+ aria-invalid={false}
1475
+ checked={false}
1476
+ className="chakra-checkbox__input"
1477
+ disabled={false}
1478
+ id="chakraProps-0"
1479
+ name="chakraProps"
1480
+ onBlur={[Function]}
1481
+ onChange={[Function]}
1482
+ onFocus={[Function]}
1483
+ onKeyDown={[Function]}
1484
+ onKeyUp={[Function]}
1485
+ required={false}
1486
+ style={
1487
+ Object {
1488
+ "border": "0px",
1489
+ "clip": "rect(0px, 0px, 0px, 0px)",
1490
+ "height": "1px",
1491
+ "margin": "-1px",
1492
+ "overflow": "hidden",
1493
+ "padding": "0px",
1494
+ "position": "absolute",
1495
+ "whiteSpace": "nowrap",
1496
+ "width": "1px",
1497
+ }
1498
+ }
1499
+ type="checkbox"
1500
+ value="2"
1501
+ />
1502
+ <span
1503
+ aria-hidden={true}
1504
+ className="chakra-checkbox__control css-dnty2r"
1505
+ onMouseDown={[Function]}
1506
+ onMouseEnter={[Function]}
1507
+ onMouseLeave={[Function]}
1508
+ onMouseUp={[Function]}
1509
+ >
1510
+ <svg
1511
+ className="chakra-icon css-1vfv7ic"
1512
+ focusable={false}
1513
+ viewBox="0 0 24 24"
1514
+ >
1515
+ <path
1516
+ d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
1517
+ fill="currentColor"
1518
+ />
1519
+ </svg>
1520
+ </span>
1521
+ <span
1522
+ className="chakra-checkbox__label css-1oeb2oe"
1523
+ onMouseDown={[Function]}
1524
+ onTouchStart={[Function]}
1525
+ >
1526
+ Checkbox 2
1527
+ </span>
1528
+ </label>
1529
+ <label
1530
+ className="chakra-checkbox css-1cgy6rg"
1531
+ onClick={[Function]}
1532
+ >
1533
+ <input
1534
+ aria-disabled={false}
1535
+ aria-invalid={false}
1536
+ checked={false}
1537
+ className="chakra-checkbox__input"
1538
+ disabled={false}
1539
+ id="chakraProps-1"
1540
+ name="chakraProps"
1541
+ onBlur={[Function]}
1542
+ onChange={[Function]}
1543
+ onFocus={[Function]}
1544
+ onKeyDown={[Function]}
1545
+ onKeyUp={[Function]}
1546
+ required={false}
1547
+ style={
1548
+ Object {
1549
+ "border": "0px",
1550
+ "clip": "rect(0px, 0px, 0px, 0px)",
1551
+ "height": "1px",
1552
+ "margin": "-1px",
1553
+ "overflow": "hidden",
1554
+ "padding": "0px",
1555
+ "position": "absolute",
1556
+ "whiteSpace": "nowrap",
1557
+ "width": "1px",
1558
+ }
1559
+ }
1560
+ type="checkbox"
1561
+ value="3"
1562
+ />
1563
+ <span
1564
+ aria-hidden={true}
1565
+ className="chakra-checkbox__control css-dnty2r"
1566
+ onMouseDown={[Function]}
1567
+ onMouseEnter={[Function]}
1568
+ onMouseLeave={[Function]}
1569
+ onMouseUp={[Function]}
1570
+ >
1571
+ <svg
1572
+ className="chakra-icon css-1vfv7ic"
1573
+ focusable={false}
1574
+ viewBox="0 0 24 24"
1575
+ >
1576
+ <path
1577
+ d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
1578
+ fill="currentColor"
1579
+ />
1580
+ </svg>
1581
+ </span>
1582
+ <span
1583
+ className="chakra-checkbox__label css-1oeb2oe"
1584
+ onMouseDown={[Function]}
1585
+ onTouchStart={[Function]}
1586
+ >
1587
+ Checkbox 3
1588
+ </span>
1589
+ </label>
1590
+ </div>
1591
+ </fieldset>
1592
+ `;
1593
+
1594
+ exports[`Checkbox renders the UI snapshot correctly 12`] = `
1595
+ <fieldset
1596
+ className="css-1u8qly9"
1597
+ data-testid="props"
1598
+ id="otherProps-checkbox-group"
1599
+ >
1600
+ <legend>
1601
+ otherProps
1602
+ </legend>
1603
+ <div
1604
+ aria-label={null}
1605
+ className="chakra-stack css-1wdv1uh"
1606
+ data-testid="checkbox-group"
1607
+ id="otherProps"
1608
+ >
1609
+ <label
1610
+ className="chakra-checkbox css-1cgy6rg"
1611
+ onClick={[Function]}
1612
+ >
1613
+ <input
1614
+ aria-disabled={false}
1615
+ aria-invalid={false}
1616
+ checked={false}
1617
+ className="chakra-checkbox__input"
1618
+ disabled={false}
1619
+ id="otherProps-0"
1620
+ name="otherProps"
1621
+ onBlur={[Function]}
1622
+ onChange={[Function]}
1623
+ onFocus={[Function]}
1624
+ onKeyDown={[Function]}
1625
+ onKeyUp={[Function]}
1626
+ required={false}
1627
+ style={
1628
+ Object {
1629
+ "border": "0px",
1630
+ "clip": "rect(0px, 0px, 0px, 0px)",
1631
+ "height": "1px",
1632
+ "margin": "-1px",
1633
+ "overflow": "hidden",
1634
+ "padding": "0px",
1635
+ "position": "absolute",
1636
+ "whiteSpace": "nowrap",
1637
+ "width": "1px",
1638
+ }
1639
+ }
1640
+ type="checkbox"
1641
+ value="2"
1642
+ />
1643
+ <span
1644
+ aria-hidden={true}
1645
+ className="chakra-checkbox__control css-dnty2r"
1646
+ onMouseDown={[Function]}
1647
+ onMouseEnter={[Function]}
1648
+ onMouseLeave={[Function]}
1649
+ onMouseUp={[Function]}
1650
+ >
1651
+ <svg
1652
+ className="chakra-icon css-1vfv7ic"
1653
+ focusable={false}
1654
+ viewBox="0 0 24 24"
1655
+ >
1656
+ <path
1657
+ d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
1658
+ fill="currentColor"
1659
+ />
1660
+ </svg>
1661
+ </span>
1662
+ <span
1663
+ className="chakra-checkbox__label css-1oeb2oe"
1664
+ onMouseDown={[Function]}
1665
+ onTouchStart={[Function]}
1666
+ >
1667
+ Checkbox 2
1668
+ </span>
1669
+ </label>
1670
+ <label
1671
+ className="chakra-checkbox css-1cgy6rg"
1672
+ onClick={[Function]}
1673
+ >
1674
+ <input
1675
+ aria-disabled={false}
1676
+ aria-invalid={false}
1677
+ checked={false}
1678
+ className="chakra-checkbox__input"
1679
+ disabled={false}
1680
+ id="otherProps-1"
1681
+ name="otherProps"
1682
+ onBlur={[Function]}
1683
+ onChange={[Function]}
1684
+ onFocus={[Function]}
1685
+ onKeyDown={[Function]}
1686
+ onKeyUp={[Function]}
1687
+ required={false}
1688
+ style={
1689
+ Object {
1690
+ "border": "0px",
1691
+ "clip": "rect(0px, 0px, 0px, 0px)",
1692
+ "height": "1px",
1693
+ "margin": "-1px",
1694
+ "overflow": "hidden",
1695
+ "padding": "0px",
1696
+ "position": "absolute",
1697
+ "whiteSpace": "nowrap",
1698
+ "width": "1px",
1699
+ }
1700
+ }
1701
+ type="checkbox"
1702
+ value="3"
1703
+ />
1704
+ <span
1705
+ aria-hidden={true}
1706
+ className="chakra-checkbox__control css-dnty2r"
1707
+ onMouseDown={[Function]}
1708
+ onMouseEnter={[Function]}
1709
+ onMouseLeave={[Function]}
1710
+ onMouseUp={[Function]}
1711
+ >
1712
+ <svg
1713
+ className="chakra-icon css-1vfv7ic"
1714
+ focusable={false}
1715
+ viewBox="0 0 24 24"
1716
+ >
1717
+ <path
1718
+ d="M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z"
1719
+ fill="currentColor"
1720
+ />
1721
+ </svg>
1722
+ </span>
1723
+ <span
1724
+ className="chakra-checkbox__label css-1oeb2oe"
1725
+ onMouseDown={[Function]}
1726
+ onTouchStart={[Function]}
1727
+ >
1728
+ Checkbox 3
1729
+ </span>
1730
+ </label>
1731
+ </div>
1732
+ </fieldset>
1733
+ `;