@nypl/design-system-react-components 0.26.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/README.md +7 -7
  3. package/dist/components/Accordion/Accordion.d.ts +1 -1
  4. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -5
  5. package/dist/components/Button/Button.d.ts +2 -10
  6. package/dist/components/ButtonGroup/ButtonGroup.d.ts +22 -0
  7. package/dist/components/Card/Card.d.ts +2 -2
  8. package/dist/components/Checkbox/Checkbox.d.ts +10 -8
  9. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  10. package/dist/components/DatePicker/DatePicker.d.ts +1 -1
  11. package/dist/components/Form/Form.d.ts +2 -2
  12. package/dist/components/Grid/SimpleGrid.d.ts +6 -3
  13. package/dist/components/Heading/Heading.d.ts +2 -5
  14. package/dist/components/HelperErrorText/HelperErrorText.d.ts +1 -5
  15. package/dist/components/Hero/Hero.d.ts +13 -9
  16. package/dist/components/Icons/Icon.d.ts +6 -5
  17. package/dist/components/Icons/IconSvgs.d.ts +21 -21
  18. package/dist/components/Image/Image.d.ts +8 -5
  19. package/dist/components/Link/Link.d.ts +1 -9
  20. package/dist/components/List/List.d.ts +7 -11
  21. package/dist/components/Logo/Logo.d.ts +2 -5
  22. package/dist/components/Logo/LogoSvgs.d.ts +39 -39
  23. package/dist/components/Modal/Modal.d.ts +28 -8
  24. package/dist/components/Notification/Notification.d.ts +1 -1
  25. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +2 -1
  26. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  27. package/dist/components/SearchBar/SearchBar.d.ts +3 -2
  28. package/dist/components/Select/Select.d.ts +2 -5
  29. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +4 -4
  30. package/dist/components/SkipNavigation/SkipNavigation.d.ts +17 -0
  31. package/dist/components/StatusBadge/StatusBadge.d.ts +2 -3
  32. package/dist/components/StructuredContent/StructuredContent.d.ts +2 -2
  33. package/dist/components/Table/Table.d.ts +1 -1
  34. package/dist/components/Template/Template.d.ts +2 -0
  35. package/dist/components/Text/Text.d.ts +1 -1
  36. package/dist/components/TextInput/TextInput.d.ts +21 -9
  37. package/dist/components/Toggle/Toggle.d.ts +1 -5
  38. package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
  39. package/dist/design-system-react-components.cjs.development.js +983 -1222
  40. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  41. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  42. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  43. package/dist/design-system-react-components.esm.js +982 -1285
  44. package/dist/design-system-react-components.esm.js.map +1 -1
  45. package/dist/helpers/types.d.ts +1 -0
  46. package/dist/index.d.ts +27 -48
  47. package/dist/styles.css +1 -1
  48. package/dist/theme/components/buttonGroup.d.ts +11 -0
  49. package/dist/theme/components/card.d.ts +104 -8
  50. package/dist/theme/components/componentWrapper.d.ts +4 -3
  51. package/dist/theme/components/customTable.d.ts +11 -14
  52. package/dist/theme/components/fieldset.d.ts +4 -3
  53. package/dist/theme/components/helperErrorText.d.ts +4 -3
  54. package/dist/theme/components/hero.d.ts +1 -1
  55. package/dist/theme/components/horizontalRule.d.ts +4 -3
  56. package/dist/theme/components/icon.d.ts +47743 -1
  57. package/dist/theme/components/image.d.ts +563 -10
  58. package/dist/theme/components/label.d.ts +4 -3
  59. package/dist/theme/components/list.d.ts +6 -7
  60. package/dist/theme/components/logo.d.ts +474 -1
  61. package/dist/theme/components/notification.d.ts +20 -16
  62. package/dist/theme/components/progressIndicator.d.ts +6 -4
  63. package/dist/theme/components/select.d.ts +4 -10
  64. package/dist/theme/components/skeletonLoader.d.ts +14 -10
  65. package/dist/theme/components/skipNavigation.d.ts +22 -0
  66. package/dist/theme/components/slider.d.ts +7 -6
  67. package/dist/theme/components/structuredContent.d.ts +10 -9
  68. package/dist/theme/components/text.d.ts +7 -1
  69. package/dist/theme/components/toggle.d.ts +6 -4
  70. package/dist/theme/provider.d.ts +2 -4
  71. package/dist/utils/componentCategories.d.ts +1 -1
  72. package/dist/utils/interfaces.d.ts +5 -0
  73. package/dist/utils/utils.d.ts +2 -18
  74. package/package.json +15 -16
  75. package/src/__tests__/setup.ts +3 -3
  76. package/src/__tests__/utils/utils.test.ts +1 -23
  77. package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +22 -14
  78. package/src/components/Accordion/Accordion.stories.mdx +43 -44
  79. package/src/components/Accordion/Accordion.test.tsx +5 -13
  80. package/src/components/Accordion/Accordion.tsx +14 -18
  81. package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +6 -6
  82. package/src/components/Autosuggest/Autosuggest.stories.mdx +1 -1
  83. package/src/components/Autosuggest/Autosuggest.stories.tsx +23 -25
  84. package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +21 -37
  85. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +4 -17
  86. package/src/components/Breadcrumbs/Breadcrumbs.tsx +18 -21
  87. package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +1 -100
  88. package/src/components/Button/Button.stories.mdx +89 -126
  89. package/src/components/Button/Button.test.tsx +16 -30
  90. package/src/components/Button/Button.tsx +14 -20
  91. package/src/components/ButtonGroup/ButtonGroup.stories.mdx +147 -0
  92. package/src/components/ButtonGroup/ButtonGroup.test.tsx +141 -0
  93. package/src/components/ButtonGroup/ButtonGroup.tsx +99 -0
  94. package/src/components/ButtonGroup/__snapshots__/ButtonGroup.test.tsx.snap +117 -0
  95. package/src/components/Card/Card.stories.mdx +144 -178
  96. package/src/components/Card/Card.test.tsx +36 -97
  97. package/src/components/Card/Card.tsx +78 -74
  98. package/src/components/Chakra/Box.stories.mdx +3 -7
  99. package/src/components/Chakra/Center.stories.mdx +6 -24
  100. package/src/components/Chakra/Flex.stories.mdx +5 -7
  101. package/src/components/Chakra/Grid.stories.mdx +1 -1
  102. package/src/components/Chakra/Stack.stories.mdx +10 -11
  103. package/src/components/Checkbox/Checkbox.stories.mdx +1 -1
  104. package/src/components/Checkbox/Checkbox.test.tsx +2 -2
  105. package/src/components/Checkbox/Checkbox.tsx +20 -13
  106. package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +6 -17
  107. package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +1 -7
  108. package/src/components/CheckboxGroup/CheckboxGroup.tsx +33 -29
  109. package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +0 -11
  110. package/src/components/ComponentWrapper/ComponentWrapper.tsx +3 -10
  111. package/src/components/DatePicker/DatePicker.stories.mdx +23 -37
  112. package/src/components/DatePicker/DatePicker.test.tsx +21 -19
  113. package/src/components/DatePicker/DatePicker.tsx +57 -49
  114. package/src/components/Form/Form.stories.mdx +46 -31
  115. package/src/components/Form/Form.test.tsx +1 -18
  116. package/src/components/Form/Form.tsx +7 -7
  117. package/src/components/Grid/SimpleGrid.stories.mdx +73 -49
  118. package/src/components/Grid/SimpleGrid.test.tsx +7 -9
  119. package/src/components/Grid/SimpleGrid.tsx +14 -11
  120. package/src/components/Heading/Heading.stories.mdx +27 -72
  121. package/src/components/Heading/Heading.test.tsx +18 -44
  122. package/src/components/Heading/Heading.tsx +7 -10
  123. package/src/components/HelperErrorText/HelperErrorText.stories.mdx +1 -3
  124. package/src/components/HelperErrorText/HelperErrorText.tsx +1 -5
  125. package/src/components/Hero/Hero.stories.mdx +219 -216
  126. package/src/components/Hero/Hero.test.tsx +107 -223
  127. package/src/components/Hero/Hero.tsx +63 -61
  128. package/src/components/Icons/Icon.stories.mdx +172 -118
  129. package/src/components/Icons/Icon.test.tsx +8 -16
  130. package/src/components/Icons/Icon.tsx +75 -29
  131. package/src/components/Icons/IconSvgs.tsx +42 -42
  132. package/src/components/Image/Image.stories.mdx +45 -132
  133. package/src/components/Image/Image.test.tsx +16 -31
  134. package/src/components/Image/Image.tsx +28 -12
  135. package/src/components/Link/Link.stories.mdx +30 -94
  136. package/src/components/Link/Link.test.tsx +25 -75
  137. package/src/components/Link/Link.tsx +43 -56
  138. package/src/components/Link/__snapshots__/Link.test.tsx.snap +1 -2
  139. package/src/components/List/List.stories.mdx +20 -31
  140. package/src/components/List/List.test.tsx +24 -43
  141. package/src/components/List/List.tsx +25 -36
  142. package/src/components/Logo/Logo.stories.mdx +94 -50
  143. package/src/components/Logo/Logo.test.tsx +10 -19
  144. package/src/components/Logo/Logo.tsx +50 -17
  145. package/src/components/Logo/LogoSvgs.tsx +78 -78
  146. package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +4 -4
  147. package/src/components/Modal/Modal.stories.mdx +245 -139
  148. package/src/components/Modal/Modal.test.tsx +147 -10
  149. package/src/components/Modal/Modal.tsx +140 -20
  150. package/src/components/Modal/__snapshots__/Modal.test.tsx.snap +25 -0
  151. package/src/components/Notification/Notification.stories.mdx +10 -28
  152. package/src/components/Notification/Notification.test.tsx +9 -12
  153. package/src/components/Notification/Notification.tsx +34 -37
  154. package/src/components/Pagination/Pagination.stories.mdx +3 -4
  155. package/src/components/Pagination/Pagination.tsx +15 -10
  156. package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +27 -53
  157. package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +9 -10
  158. package/src/components/ProgressIndicator/ProgressIndicator.tsx +17 -21
  159. package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +0 -10
  160. package/src/components/Radio/Radio.stories.mdx +1 -1
  161. package/src/components/Radio/Radio.tsx +9 -6
  162. package/src/components/RadioGroup/RadioGroup.stories.mdx +15 -16
  163. package/src/components/RadioGroup/RadioGroup.test.tsx +2 -8
  164. package/src/components/RadioGroup/RadioGroup.tsx +28 -24
  165. package/src/components/SearchBar/SearchBar.stories.mdx +4 -4
  166. package/src/components/SearchBar/SearchBar.test.tsx +1 -1
  167. package/src/components/SearchBar/SearchBar.tsx +14 -22
  168. package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1 -13
  169. package/src/components/Select/Select.stories.mdx +10 -25
  170. package/src/components/Select/Select.test.tsx +6 -7
  171. package/src/components/Select/Select.tsx +28 -35
  172. package/src/components/Select/__snapshots__/Select.test.tsx.snap +24 -24
  173. package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +17 -56
  174. package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +7 -21
  175. package/src/components/SkeletonLoader/SkeletonLoader.tsx +9 -8
  176. package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +33 -33
  177. package/src/components/SkipNavigation/SkipNavigation.stories.mdx +90 -0
  178. package/src/components/SkipNavigation/SkipNavigation.test.tsx +63 -0
  179. package/src/components/SkipNavigation/SkipNavigation.tsx +51 -0
  180. package/src/components/SkipNavigation/__snapshots__/SkipNavigation.test.tsx.snap +130 -0
  181. package/src/components/Slider/Slider.stories.mdx +19 -53
  182. package/src/components/Slider/Slider.test.tsx +2 -2
  183. package/src/components/Slider/Slider.tsx +10 -12
  184. package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +2 -9
  185. package/src/components/StatusBadge/StatusBadge.stories.mdx +6 -21
  186. package/src/components/StatusBadge/StatusBadge.test.tsx +2 -3
  187. package/src/components/StatusBadge/StatusBadge.tsx +3 -10
  188. package/src/components/StructuredContent/StructuredContent.stories.mdx +30 -58
  189. package/src/components/StructuredContent/StructuredContent.test.tsx +42 -44
  190. package/src/components/StructuredContent/StructuredContent.tsx +9 -18
  191. package/src/components/StyleGuide/Bidirectionality.stories.mdx +9 -23
  192. package/src/components/StyleGuide/Buttons.stories.mdx +63 -63
  193. package/src/components/StyleGuide/ColorCard.tsx +2 -4
  194. package/src/components/StyleGuide/Colors.stories.mdx +9 -10
  195. package/src/components/StyleGuide/DesignTokens.stories.mdx +5 -7
  196. package/src/components/StyleGuide/Forms.stories.mdx +2 -2
  197. package/src/components/StyleGuide/Iconography.stories.mdx +60 -78
  198. package/src/components/StyleGuide/Spacing.stories.mdx +1 -2
  199. package/src/components/StyleGuide/Typography.stories.mdx +16 -19
  200. package/src/components/Table/Table.stories.mdx +85 -1
  201. package/src/components/Table/Table.test.tsx +57 -1
  202. package/src/components/Table/Table.tsx +7 -4
  203. package/src/components/Table/__snapshots__/Table.test.tsx.snap +121 -0
  204. package/src/components/Tabs/Tabs.stories.mdx +1 -1
  205. package/src/components/Tabs/Tabs.test.tsx +2 -2
  206. package/src/components/Tabs/Tabs.tsx +26 -27
  207. package/src/components/Template/Template.stories.mdx +49 -54
  208. package/src/components/Template/Template.tsx +9 -3
  209. package/src/components/Text/Text.stories.mdx +5 -11
  210. package/src/components/Text/Text.test.tsx +3 -6
  211. package/src/components/Text/Text.tsx +3 -5
  212. package/src/components/TextInput/TextInput.stories.mdx +10 -22
  213. package/src/components/TextInput/TextInput.test.tsx +32 -62
  214. package/src/components/TextInput/TextInput.tsx +61 -30
  215. package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +1 -0
  216. package/src/components/Toggle/Toggle.stories.mdx +5 -16
  217. package/src/components/Toggle/Toggle.test.tsx +2 -3
  218. package/src/components/Toggle/Toggle.tsx +9 -10
  219. package/src/components/VideoPlayer/VideoPlayer.stories.mdx +13 -29
  220. package/src/components/VideoPlayer/VideoPlayer.test.tsx +18 -23
  221. package/src/components/VideoPlayer/VideoPlayer.tsx +13 -10
  222. package/src/docs/Chakra.stories.mdx +14 -11
  223. package/src/docs/Welcome.stories.mdx +23 -43
  224. package/src/helpers/types.ts +1 -0
  225. package/src/hooks/tests/useNYPLTheme.test.tsx +1 -1
  226. package/src/hooks/useNYPLTheme.stories.mdx +3 -6
  227. package/src/index.ts +52 -46
  228. package/src/styles.scss +0 -1
  229. package/src/theme/components/buttonGroup.ts +10 -0
  230. package/src/theme/components/card.ts +50 -15
  231. package/src/theme/components/componentWrapper.ts +5 -1
  232. package/src/theme/components/customTable.ts +8 -2
  233. package/src/theme/components/fieldset.ts +5 -1
  234. package/src/theme/components/helperErrorText.ts +5 -1
  235. package/src/theme/components/hero.ts +2 -2
  236. package/src/theme/components/horizontalRule.ts +5 -1
  237. package/src/theme/components/icon.ts +7 -1
  238. package/src/theme/components/image.ts +14 -3
  239. package/src/theme/components/label.ts +5 -1
  240. package/src/theme/components/list.ts +8 -2
  241. package/src/theme/components/logo.ts +5 -1
  242. package/src/theme/components/notification.ts +38 -14
  243. package/src/theme/components/progressIndicator.ts +10 -5
  244. package/src/theme/components/select.ts +5 -6
  245. package/src/theme/components/skeletonLoader.ts +8 -2
  246. package/src/theme/components/skipNavigation.ts +26 -0
  247. package/src/theme/components/slider.ts +13 -1
  248. package/src/theme/components/structuredContent.ts +11 -1
  249. package/src/theme/components/text.ts +12 -5
  250. package/src/theme/components/toggle.ts +9 -3
  251. package/src/theme/foundations/colors.ts +6 -9
  252. package/src/theme/index.ts +4 -0
  253. package/src/theme/provider.tsx +1 -1
  254. package/src/utils/componentCategories.ts +13 -5
  255. package/src/utils/interfaces.ts +5 -0
  256. package/src/utils/utils.ts +2 -32
  257. package/dist/components/Accordion/AccordionTypes.d.ts +0 -5
  258. package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +0 -8
  259. package/dist/components/Button/ButtonTypes.d.ts +0 -8
  260. package/dist/components/DatePicker/DatePickerTypes.d.ts +0 -5
  261. package/dist/components/Form/FormTypes.d.ts +0 -2
  262. package/dist/components/Grid/GridTypes.d.ts +0 -9
  263. package/dist/components/Heading/HeadingTypes.d.ts +0 -14
  264. package/dist/components/Hero/HeroTypes.d.ts +0 -12
  265. package/dist/components/Icons/IconTypes.d.ts +0 -77
  266. package/dist/components/Image/ImageTypes.d.ts +0 -22
  267. package/dist/components/Link/LinkTypes.d.ts +0 -8
  268. package/dist/components/List/ListTypes.d.ts +0 -5
  269. package/dist/components/Logo/LogoTypes.d.ts +0 -54
  270. package/dist/components/Notification/NotificationTypes.d.ts +0 -5
  271. package/dist/components/ProgressIndicator/ProgressIndicatorTypes.d.ts +0 -8
  272. package/dist/components/Select/SelectTypes.d.ts +0 -8
  273. package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +0 -5
  274. package/dist/components/StatusBadge/StatusBadgeTypes.d.ts +0 -5
  275. package/dist/components/StructuredContent/StructuredContentTypes.d.ts +0 -5
  276. package/dist/components/Text/TextTypes.d.ts +0 -6
  277. package/dist/components/TextInput/TextInputTypes.d.ts +0 -25
  278. package/dist/components/Toggle/ToggleTypes.d.ts +0 -4
  279. package/dist/components/VideoPlayer/VideoPlayerTypes.d.ts +0 -9
  280. package/dist/helpers/enums.d.ts +0 -4
  281. package/dist/utils/siteSections.d.ts +0 -2
  282. package/src/components/Accordion/AccordionTypes.tsx +0 -5
  283. package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +0 -8
  284. package/src/components/Button/ButtonTypes.tsx +0 -8
  285. package/src/components/DatePicker/DatePickerTypes.tsx +0 -5
  286. package/src/components/Form/FormTypes.tsx +0 -3
  287. package/src/components/Grid/GridTypes.tsx +0 -9
  288. package/src/components/Heading/HeadingTypes.tsx +0 -15
  289. package/src/components/Hero/HeroTypes.tsx +0 -20
  290. package/src/components/Icons/IconTypes.tsx +0 -83
  291. package/src/components/Image/ImageTypes.ts +0 -24
  292. package/src/components/Link/LinkTypes.tsx +0 -8
  293. package/src/components/List/ListTypes.tsx +0 -5
  294. package/src/components/Logo/LogoTypes.tsx +0 -56
  295. package/src/components/Modal/_Modal.scss +0 -18
  296. package/src/components/Notification/NotificationTypes.tsx +0 -5
  297. package/src/components/ProgressIndicator/ProgressIndicatorTypes.ts +0 -8
  298. package/src/components/Select/SelectTypes.tsx +0 -10
  299. package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +0 -5
  300. package/src/components/StatusBadge/StatusBadgeTypes.tsx +0 -5
  301. package/src/components/StructuredContent/StructuredContentTypes.tsx +0 -5
  302. package/src/components/Text/TextTypes.tsx +0 -6
  303. package/src/components/TextInput/TextInputTypes.tsx +0 -48
  304. package/src/components/Toggle/ToggleTypes.tsx +0 -4
  305. package/src/components/VideoPlayer/VideoPlayerTypes.tsx +0 -10
  306. package/src/helpers/enums.ts +0 -4
  307. package/src/utils/siteSections.ts +0 -10
@@ -1580,3 +1580,124 @@ exports[`Table renders the UI snapshot correctly 7`] = `
1580
1580
  </tbody>
1581
1581
  </table>
1582
1582
  `;
1583
+
1584
+ exports[`Table renders the UI snapshot correctly 8`] = `
1585
+ <table
1586
+ className="chakra-table css-1xdhyk6"
1587
+ id="jsx-example"
1588
+ role="table"
1589
+ >
1590
+ <thead
1591
+ className="css-0"
1592
+ >
1593
+ <tr
1594
+ className="css-0"
1595
+ role="row"
1596
+ >
1597
+ <th
1598
+ className="css-0"
1599
+ scope="col"
1600
+ >
1601
+ First Name
1602
+ </th>
1603
+ <th
1604
+ className="css-0"
1605
+ scope="col"
1606
+ >
1607
+ Last Name
1608
+ </th>
1609
+ <th
1610
+ className="css-0"
1611
+ scope="col"
1612
+ >
1613
+ Avatar
1614
+ </th>
1615
+ </tr>
1616
+ </thead>
1617
+ <tbody
1618
+ className="css-0"
1619
+ >
1620
+ <tr
1621
+ className="css-0"
1622
+ role="row"
1623
+ >
1624
+ <td
1625
+ className="css-0"
1626
+ role="gridcell"
1627
+ >
1628
+ Tom
1629
+ </td>
1630
+ <td
1631
+ className="css-0"
1632
+ role="gridcell"
1633
+ >
1634
+ Nook
1635
+ </td>
1636
+ <td
1637
+ className="css-0"
1638
+ role="gridcell"
1639
+ >
1640
+ <img
1641
+ alt="Tom Nook"
1642
+ className="css-0"
1643
+ src="https://play.nintendo.com/images/AC_Tom_FRYtwIN.17345b1513ac044897cfc243542899dce541e8dc.9afde10b.png"
1644
+ />
1645
+ </td>
1646
+ </tr>
1647
+ <tr
1648
+ className="css-0"
1649
+ role="row"
1650
+ >
1651
+ <td
1652
+ className="css-0"
1653
+ role="gridcell"
1654
+ >
1655
+ Isabelle
1656
+ </td>
1657
+ <td
1658
+ className="css-0"
1659
+ role="gridcell"
1660
+ >
1661
+ -
1662
+ </td>
1663
+ <td
1664
+ className="css-0"
1665
+ role="gridcell"
1666
+ >
1667
+ <img
1668
+ alt="Isabelle"
1669
+ className="css-0"
1670
+ src="https://play.nintendo.com/images/AC_Isabelle_7XU6aGu.17345b1513ac044897cfc243542899dce541e8dc.9afde10b.png"
1671
+ />
1672
+ </td>
1673
+ </tr>
1674
+ <tr
1675
+ className="css-0"
1676
+ role="row"
1677
+ >
1678
+ <td
1679
+ className="css-0"
1680
+ role="gridcell"
1681
+ >
1682
+ K.K.
1683
+ </td>
1684
+ <td
1685
+ className="css-0"
1686
+ role="gridcell"
1687
+ >
1688
+ Slider
1689
+ </td>
1690
+ <td
1691
+ className="css-0"
1692
+ role="gridcell"
1693
+ >
1694
+ <img
1695
+ alt="K.K Slider"
1696
+ className="css-0"
1697
+ src="https://play.nintendo.com/images/AC_KK_jh4yj5t.17345b1513ac044897cfc243542899dce541e8dc.9afde10b.png"
1698
+ />
1699
+ </td>
1700
+ </tr>
1701
+ </tbody>
1702
+ </table>
1703
+ `;
@@ -41,7 +41,7 @@ import DSProvider from "../../theme/provider";
41
41
  | Component Version | DS Version |
42
42
  | ----------------- | ---------- |
43
43
  | Added | `0.24.0` |
44
- | Latest | `0.26.0` |
44
+ | Latest | `0.28.0` |
45
45
 
46
46
  ## Table of Contents
47
47
 
@@ -73,7 +73,7 @@ describe("Tabs Accessibility", () => {
73
73
  });
74
74
 
75
75
  describe("Tabs", () => {
76
- const getTabByName = (name) => screen.getByRole("tab", { name });
76
+ const getTabByName = (name: string) => screen.getByRole("tab", { name });
77
77
 
78
78
  it("renders all tabs but only one panel at a time with children", () => {
79
79
  render(
@@ -191,7 +191,7 @@ describe("Tabs", () => {
191
191
 
192
192
  it("invokes the callback function", () => {
193
193
  let selectedIndex = 0;
194
- const onChange = (index) => (selectedIndex = index);
194
+ const onChange = (index: number) => (selectedIndex = index);
195
195
 
196
196
  render(<Tabs tabsData={animalCrossing} onChange={onChange} />);
197
197
 
@@ -10,10 +10,8 @@ import {
10
10
  } from "@chakra-ui/react";
11
11
  import * as React from "react";
12
12
 
13
- import { IconNames, IconRotationTypes, IconSizes } from "../Icons/IconTypes";
14
- import Icon from "../Icons/Icon";
15
- import { ButtonTypes } from "../Button/ButtonTypes";
16
13
  import Button from "../Button/Button";
14
+ import Icon from "../Icons/Icon";
17
15
  import useCarouselStyles from "../../hooks/useCarouselStyles";
18
16
  import useWindowSize from "../../hooks/useWindowSize";
19
17
 
@@ -47,7 +45,7 @@ export interface TabsProps {
47
45
  * An internal function used to update the hash in the URL.
48
46
  * This function is only used when `useHash` is `true`.
49
47
  */
50
- const onClickHash = (tabHash) => {
48
+ const onClickHash = (tabHash: string) => {
51
49
  window.location.hash = tabHash;
52
50
  };
53
51
 
@@ -55,9 +53,12 @@ const onClickHash = (tabHash) => {
55
53
  * This returns an object with `Tab` and `TabPanel` components to rendered in
56
54
  * `TabList` and `TabPanels` components respectively.
57
55
  */
58
- const getElementsFromData = (data, useHash): TabPanelProps => {
59
- const tabs = [];
60
- const panels = [];
56
+ const getElementsFromData = (
57
+ data: TabsDataProps[],
58
+ useHash: boolean
59
+ ): TabPanelProps => {
60
+ const tabs: React.ReactNode[] = [];
61
+ const panels: React.ReactNode[] = [];
61
62
 
62
63
  if (!data?.length) {
63
64
  return { tabs: [], panels: [] };
@@ -76,7 +77,7 @@ const getElementsFromData = (data, useHash): TabPanelProps => {
76
77
  <Tab
77
78
  fontSize={["0", null, "1"]}
78
79
  key={index}
79
- onClick={useHash ? () => onClickHash(`tab${index + 1}`) : null}
80
+ onClick={useHash ? () => onClickHash(`tab${index + 1}`) : undefined}
80
81
  >
81
82
  {tab.label}
82
83
  </Tab>
@@ -107,14 +108,14 @@ const getElementsFromData = (data, useHash): TabPanelProps => {
107
108
  * the DOM when building up the `Tabs` component using child component.
108
109
  */
109
110
  const getElementsFromChildren = (children): TabPanelProps => {
110
- const tabs = [];
111
- const panels = [];
111
+ const tabs: React.ReactNode[] = [];
112
+ const panels: React.ReactNode[] = [];
112
113
 
113
114
  if (!children?.length) {
114
115
  return { tabs: [], panels: [] };
115
116
  }
116
117
 
117
- children.forEach((child) => {
118
+ children.forEach((child: JSX.Element) => {
118
119
  if (child.type === TabList || child.props.mdxType === "TabList") {
119
120
  tabs.push(child);
120
121
 
@@ -187,39 +188,37 @@ export const Tabs = chakra((props: React.PropsWithChildren<TabsProps>) => {
187
188
  }, [goToStart, windowDimensions.width]);
188
189
  const previousButton = (
189
190
  <Button
190
- attributes={{
191
- "aria-label": "Previous",
191
+ aria-label="Previous"
192
+ id={`tabs-previous-${id}`}
193
+ onClick={prevSlide}
194
+ __css={{
192
195
  ...styles.buttonArrows,
193
196
  left: "0",
194
197
  }}
195
- buttonType={ButtonTypes.Primary}
196
- id={`tabs-previous-${id}`}
197
- onClick={prevSlide}
198
198
  >
199
199
  <Icon
200
- iconRotation={IconRotationTypes.Rotate90}
200
+ iconRotation="rotate90"
201
201
  id={`tabs-previous-icon-${id}`}
202
- name={IconNames.Arrow}
203
- size={IconSizes.Small}
202
+ name="arrow"
203
+ size="small"
204
204
  />
205
205
  </Button>
206
206
  );
207
207
  const nextButton = (
208
208
  <Button
209
- attributes={{
210
- "aria-label": "Next",
209
+ aria-label="Next"
210
+ id={`tabs-next-${id}`}
211
+ onClick={nextSlide}
212
+ __css={{
211
213
  ...styles.buttonArrows,
212
214
  right: "0",
213
215
  }}
214
- buttonType={ButtonTypes.Primary}
215
- id={`tabs-next-${id}`}
216
- onClick={nextSlide}
217
216
  >
218
217
  <Icon
219
- iconRotation={IconRotationTypes.Rotate270}
218
+ iconRotation="rotate270"
220
219
  id={`tabs-next-icon-${id}`}
221
- name={IconNames.Arrow}
222
- size={IconSizes.Small}
220
+ name="arrow"
221
+ size="small"
223
222
  />
224
223
  </Button>
225
224
  );
@@ -14,12 +14,9 @@ import Button from "../Button/Button";
14
14
  import Card, { CardHeading, CardContent, CardActions } from "../Card/Card";
15
15
  import Form, { FormRow, FormField } from "../Form/Form";
16
16
  import Heading from "../Heading/Heading";
17
- import { HeadingLevels } from "../Heading/HeadingTypes";
18
17
  import Hero from "../Hero/Hero";
19
18
  import HorizontalRule from "../HorizontalRule/HorizontalRule";
20
- import { HeroTypes } from "../Hero/HeroTypes";
21
19
  import Image from "../Image/Image";
22
- import { ImageRatios, ImageSizes } from "../Image/ImageTypes";
23
20
  import Link from "../Link/Link";
24
21
  import Notification, {
25
22
  NotificationContent,
@@ -27,6 +24,7 @@ import Notification, {
27
24
  NotificationProps,
28
25
  } from "../Notification/Notification";
29
26
  import Placeholder from "../Placeholder/Placeholder";
27
+ import SkipNavigation from "../SkipNavigation/SkipNavigation";
30
28
  import {
31
29
  Template,
32
30
  TemplateAboveHeader,
@@ -40,7 +38,6 @@ import {
40
38
  TemplateAppContainer,
41
39
  } from "./Template";
42
40
  import TextInput from "../TextInput/TextInput";
43
- import { NotificationTypes } from "../Notification/NotificationTypes";
44
41
  import { getCategory } from "../../utils/componentCategories";
45
42
 
46
43
  <Meta
@@ -79,6 +76,9 @@ If you have a custom `Header` component that _already_ renders an HTML `<header>
79
76
  element, set `renderHeaderElement` to false so only one `<header>` element is
80
77
  rendered.
81
78
 
79
+ If you need to render the `SkipNavigation` component, set `renderSkipNavigation`
80
+ to true.
81
+
82
82
  Likewise, if you have a custom `Footer` component that _already_ renders an HTML
83
83
  `<footer>` element, set `renderFooterElement` to false so only one `<footer>`
84
84
  element is rendered.
@@ -107,6 +107,7 @@ import { TemplateAppContainer } from "@nypl/design-system-react-components";
107
107
  </>
108
108
  }
109
109
  footer={<Placeholder variant="short">Footer</Placeholder>}
110
+ renderSkipNavigation={true}
110
111
  />;
111
112
  ```
112
113
 
@@ -137,6 +138,7 @@ import { TemplateAppContainer } from "@nypl/design-system-react-components";
137
138
  sidebar: "left",
138
139
  renderFooterElement: true,
139
140
  renderHeaderElement: true,
141
+ renderSkipNavigation: false,
140
142
  }}
141
143
  argTypes={{
142
144
  aboveHeader: { control: false },
@@ -176,11 +178,15 @@ accessibility violation.
176
178
 
177
179
  The `TemplateAppContainer` component renders a full DOM and one of the children
178
180
  is the `main` HTML element with a default "id" of `"mainContent"`. This should
179
- be used as the anchor element that the skip navigation link points to. As of
180
- v0.25.13, the consuming application is responsible for adding the skip
181
- navigation feature to the application. If your application is using the current
182
- NYPL Header, it already contains the skip navigation feature but make sure it is
183
- pointing to the correct anchor element.
181
+ be used as the anchor element that the skip navigation link points to. If your
182
+ application is using the current NYPL Header, it already contains the skip
183
+ navigation feature but make sure it is pointing to the correct anchor element.
184
+
185
+ If you are using a custom header component or you need to use the Reservoir
186
+ Design System (DS) `SkipNavigation` component, then set the `renderSkipNavigation`
187
+ prop to true. This will render the `SkipNavigation` component at the top of the
188
+ page before any other elements. The main link will point to the `#mainContent`
189
+ `main` element.
184
190
 
185
191
  Resources
186
192
 
@@ -191,13 +197,17 @@ Resources
191
197
 
192
198
  ## Template Children Overview
193
199
 
194
- The Reservoir Design System (DS) also provides a set of "template" components
195
- that work together to render a consistent mobile and desktop layout. More
196
- information on individual components and how they should be composed can be
197
- found below. Even though these component are available for use, we recommend
198
- using the `TemplateAppContainer` component and passing down children component
200
+ The Reservoir Design System (DS) also provides a set of "template" components
201
+ that work together to render a consistent mobile and desktop layout. More
202
+ information on individual components and how they should be composed can be
203
+ found below. Even though these component are available for use, we recommend
204
+ using the `TemplateAppContainer` component and passing down children component
199
205
  as props as needed.
200
206
 
207
+ Note: If you need to render the `SkipNavigation` component, you need to explicitly
208
+ render it immediately before the `TemplateAboveHeader` component. This is done
209
+ automatically in the `TemplateAppContainer` component.
210
+
201
211
  Basic "template" components structure:
202
212
 
203
213
  ```
@@ -215,6 +225,7 @@ import {
215
225
 
216
226
 
217
227
  <Template>
228
+ <SkipNavigation />
218
229
  <TemplateAboveHeader>
219
230
  // ...
220
231
  </TemplateAboveHeader>
@@ -263,6 +274,7 @@ import {
263
274
  >
264
275
  {(args) => (
265
276
  <Template>
277
+ <SkipNavigation />
266
278
  <TemplateAboveHeader>
267
279
  <Placeholder variant="short">Above Header</Placeholder>
268
280
  </TemplateAboveHeader>
@@ -524,9 +536,9 @@ This is best viewed in the Storybook "Canvas" and not "Docs" section.
524
536
  <Canvas>
525
537
  <Story name="Full Example with Template Children Components">
526
538
  <Template>
539
+ <SkipNavigation />
527
540
  <TemplateAboveHeader>
528
541
  <Notification
529
- notificationType={NotificationTypes.Standard}
530
542
  notificationHeading="Standard Notification"
531
543
  notificationContent={
532
544
  <>
@@ -555,12 +567,12 @@ This is best viewed in the Storybook "Canvas" and not "Docs" section.
555
567
  />
556
568
  <Hero
557
569
  backgroundImageSrc="https://placeimg.com/2400/800/nature/grayscale"
558
- heroType={HeroTypes.Campaign}
559
- heading={
560
- <Heading level={HeadingLevels.One} id="1" text="Hero Campaign" />
561
- }
562
- imageAlt="Image example"
563
- imageSrc="https://placeimg.com/800/400/animals"
570
+ heroType="campaign"
571
+ heading={<Heading level="one" id="1" text="Hero Campaign" />}
572
+ imageProps={{
573
+ alt: "Image example",
574
+ src: "https://placeimg.com/800/400/animals",
575
+ }}
564
576
  subHeaderText={otherSubHeaderText}
565
577
  />
566
578
  </TemplateBreakout>
@@ -568,7 +580,7 @@ This is best viewed in the Storybook "Canvas" and not "Docs" section.
568
580
  <TemplateContent sidebar="right">
569
581
  <TemplateContentTop>
570
582
  <Notification
571
- notificationType={NotificationTypes.Announcement}
583
+ notificationType="announcement"
572
584
  notificationHeading="Announcement Notification"
573
585
  notificationContent={
574
586
  <>
@@ -587,18 +599,20 @@ This is best viewed in the Storybook "Canvas" and not "Docs" section.
587
599
  <Accordion accordionData={faqContent} />
588
600
  <HorizontalRule />
589
601
  <p>Fill out the form!</p>
590
- <Form action="/end/point">
602
+ <Form id="form1" action="/end/point">
591
603
  <FormField>
592
604
  <TextInput
593
- labelText="Username"
594
605
  helperText="Make sure to complete this field."
606
+ id="username"
607
+ labelText="Username"
595
608
  required
596
609
  />
597
610
  </FormField>
598
611
  <FormField>
599
612
  <TextInput
600
- labelText="Password"
601
613
  helperText="Make sure to complete this field."
614
+ id="password"
615
+ labelText="Password"
602
616
  required
603
617
  />
604
618
  </FormField>
@@ -614,7 +628,7 @@ This is best viewed in the Storybook "Canvas" and not "Docs" section.
614
628
  </FormField>
615
629
  </FormRow>
616
630
  <FormField>
617
- <Button>Submit</Button>
631
+ <Button id="submit">Submit</Button>
618
632
  </FormField>
619
633
  </Form>
620
634
  </TemplateContentPrimary>
@@ -623,16 +637,14 @@ This is best viewed in the Storybook "Canvas" and not "Docs" section.
623
637
  <Card
624
638
  imageProps={{
625
639
  alt: "Alt text",
626
- aspectRatio: ImageRatios.Square,
627
- size: ImageSizes.Small,
640
+ aspectRatio: "square",
641
+ size: "small",
628
642
  src: "https://placeimg.com/400/200/animals",
629
643
  }}
630
644
  isCentered
631
645
  >
632
- <CardHeading level={HeadingLevels.Two} id="heading1">
633
- Small Animal Image
634
- </CardHeading>
635
- <CardHeading level={HeadingLevels.Three} id="heading2">
646
+ <CardHeading id="heading1">Small Animal Image</CardHeading>
647
+ <CardHeading level="three" id="heading2">
636
648
  Animal info
637
649
  </CardHeading>
638
650
  <CardContent>
@@ -647,16 +659,14 @@ This is best viewed in the Storybook "Canvas" and not "Docs" section.
647
659
  id="custom-card"
648
660
  imageProps={{
649
661
  alt: "Alt text",
650
- aspectRatio: ImageRatios.SixteenByNine,
662
+ aspectRatio: "sixteenByNine",
651
663
  src: "https://cdn-d8.nypl.org/s3fs-public/2020-05/NYPL_MainFacadeRev2Cam2.png",
652
664
  }}
653
665
  layout="horizontal"
654
666
  backgroundColor="#616161"
655
667
  foregroundColor="#FFF"
656
668
  >
657
- <CardHeading id="heading1-footer" level={HeadingLevels.Two}>
658
- Footer
659
- </CardHeading>
669
+ <CardHeading id="heading1-footer">Footer</CardHeading>
660
670
  <CardContent>
661
671
  <p>This is an example footer using the `Card` component.</p>
662
672
  <p>
@@ -665,27 +675,12 @@ This is best viewed in the Storybook "Canvas" and not "Docs" section.
665
675
  </p>
666
676
  </CardContent>
667
677
  <CardActions>
668
- <Link
669
- attributes={{
670
- style: { color: "#FFF", textDecoration: "underline" },
671
- }}
672
- href="#"
673
- >
678
+ <Link color="#FFF" href="#" textDecoration="underline">
674
679
  Facebook
675
680
  </Link>
676
- ,<Link
677
- attributes={{
678
- style: { color: "#FFF", textDecoration: "underline" },
679
- }}
680
- href="#"
681
- >
681
+ ,<Link color="#FFF" href="#" textDecoration="underline">
682
682
  Instagram
683
- </Link>,<Link
684
- attributes={{
685
- style: { color: "#FFF", textDecoration: "underline" },
686
- }}
687
- href="#"
688
- >
683
+ </Link>,<Link color="#FFF" href="#" textDecoration="underline">
689
684
  Twitter
690
685
  </Link>
691
686
  </CardActions>
@@ -1,6 +1,8 @@
1
1
  import { Box, chakra, useStyleConfig } from "@chakra-ui/react";
2
2
  import * as React from "react";
3
3
 
4
+ import SkipNavigation from "../SkipNavigation/SkipNavigation";
5
+
4
6
  export interface TemplateProps {}
5
7
  export interface TemplateHeaderProps {
6
8
  /** Flag to render an HTML header element. True by default. */
@@ -43,6 +45,8 @@ export interface TemplateAppContainerProps
43
45
  footer?: React.ReactElement;
44
46
  /** DOM that will be rendered in the `TemplateHeader` component section. */
45
47
  header?: React.ReactElement;
48
+ /** Render the `SkipNavigation` component or not. False by default. */
49
+ renderSkipNavigation?: boolean;
46
50
  }
47
51
 
48
52
  /**
@@ -89,7 +93,7 @@ const TemplateHeader = ({
89
93
  if (renderHeaderElement) {
90
94
  // But if they passed in a component that renders an HTML `<header>`,
91
95
  // then log a warning.
92
- React.Children.map(children, (child: React.ReactElement) => {
96
+ React.Children.map(children as JSX.Element, (child: React.ReactElement) => {
93
97
  if (child?.type === "header" || child?.props?.mdxType === "header") {
94
98
  console.warn(
95
99
  "NYPL Reservoir TemplateHeader: An HTML `header` element was passed " +
@@ -137,7 +141,7 @@ const TemplateContent = (
137
141
  // Manually pass in the `sidebar` prop to the `TemplateContentPrimary` and
138
142
  // `TemplateContentSidebar` components.
139
143
  const newChildren = React.Children.map(
140
- children,
144
+ children as JSX.Element,
141
145
  (child: React.ReactElement) => {
142
146
  let newChild = child;
143
147
  if (
@@ -224,7 +228,7 @@ const TemplateFooter = ({
224
228
  // The user wants to render the `footer` HTML element.
225
229
  if (renderFooterElement) {
226
230
  // But give a warning if one was passed.
227
- React.Children.map(children, (child: React.ReactElement) => {
231
+ React.Children.map(children as JSX.Element, (child: React.ReactElement) => {
228
232
  if (child?.type === "footer" || child?.props?.mdxType === "footer") {
229
233
  console.warn(
230
234
  "NYPL Reservoir TemplateFooter: An HTML `footer` element was passed " +
@@ -259,6 +263,7 @@ export const TemplateAppContainer = chakra(
259
263
  sidebar = "none",
260
264
  renderFooterElement = true,
261
265
  renderHeaderElement = true,
266
+ renderSkipNavigation = false,
262
267
  ...rest
263
268
  } = props;
264
269
  const aboveHeaderElem = aboveHeader && (
@@ -278,6 +283,7 @@ export const TemplateAppContainer = chakra(
278
283
  );
279
284
  return (
280
285
  <Template {...rest}>
286
+ {renderSkipNavigation ? <SkipNavigation /> : null}
281
287
  {aboveHeaderElem}
282
288
  {(header || breakoutElem) && (
283
289
  <TemplateHeader renderHeaderElement={renderHeaderElement}>
@@ -8,11 +8,7 @@ import {
8
8
  import { withDesign } from "storybook-addon-designs";
9
9
 
10
10
  import Text from "./Text";
11
- import { TextSizes } from "./TextTypes";
12
11
  import { getCategory } from "../../utils/componentCategories";
13
- import { getStorybookEnumValues } from "../../utils/utils";
14
-
15
- export const enumValues = getStorybookEnumValues(TextSizes, "TextSizes");
16
12
 
17
13
  <Meta
18
14
  title={getCategory("Text")}
@@ -30,9 +26,7 @@ export const enumValues = getStorybookEnumValues(TextSizes, "TextSizes");
30
26
  isItalic: { table: { defaultValue: { summary: false } } },
31
27
  noSpace: { table: { defaultValue: { summary: false } } },
32
28
  size: {
33
- control: { type: "select" },
34
- options: enumValues.options,
35
- table: { defaultValue: { summary: "TextSizes.Default" } },
29
+ table: { defaultValue: { summary: "default" } },
36
30
  },
37
31
  }}
38
32
  />
@@ -42,7 +36,7 @@ export const enumValues = getStorybookEnumValues(TextSizes, "TextSizes");
42
36
  | Component Version | DS Version |
43
37
  | ----------------- | ---------- |
44
38
  | Added | `0.25.1` |
45
- | Latest | `0.26.0` |
39
+ | Latest | `0.28.0` |
46
40
 
47
41
  ## Table of Contents
48
42
 
@@ -64,7 +58,7 @@ The `Text` component renders a basic `<p>` element. As its name indicates, the
64
58
  name="Text"
65
59
  args={{
66
60
  className: undefined,
67
- size: "TextSizes.Default",
61
+ size: "default",
68
62
  isBold: false,
69
63
  isItalic: false,
70
64
  noSpace: false,
@@ -72,7 +66,7 @@ The `Text` component renders a basic `<p>` element. As its name indicates, the
72
66
  >
73
67
  {(args) => (
74
68
  <>
75
- <Text {...args} size={enumValues.getValue(args.size)}>
69
+ <Text {...args}>
76
70
  Animal Crossing[a] is a social simulation video game series developed
77
71
  and published by Nintendo. The series was conceptualized and created
78
72
  by Katsuya Eguchi and Hisashi Nogami. In Animal Crossing, the player
@@ -82,7 +76,7 @@ The `Text` component renders a basic `<p>` element. As its name indicates, the
82
76
  open-ended gameplay and use of the video game console's internal clock
83
77
  and calendar to simulate real passage of time.
84
78
  </Text>
85
- <Text {...args} size={enumValues.getValue(args.size)}>
79
+ <Text {...args}>
86
80
  Since its initial release in 2001, five Animal Crossing games have
87
81
  been released worldwide, one each for the Nintendo 64/iQue Player
88
82
  (enhanced and reissued for the GameCube), Nintendo DS, Wii, Nintendo
@@ -4,7 +4,6 @@ import { axe } from "jest-axe";
4
4
  import renderer from "react-test-renderer";
5
5
 
6
6
  import Text from "./Text";
7
- import { TextSizes } from "./TextTypes";
8
7
 
9
8
  describe("Text Accessibility", () => {
10
9
  it("passes axe accessibility test", async () => {
@@ -35,15 +34,13 @@ describe("Text", () => {
35
34
  .create(<Text>Animal Crossing is all that!</Text>)
36
35
  .toJSON();
37
36
  const caption = renderer
38
- .create(
39
- <Text size={TextSizes.Caption}>Animal Crossing is all that!</Text>
40
- )
37
+ .create(<Text size="caption">Animal Crossing is all that!</Text>)
41
38
  .toJSON();
42
39
  const tag = renderer
43
- .create(<Text size={TextSizes.Tag}>Animal Crossing is all that!</Text>)
40
+ .create(<Text size="tag">Animal Crossing is all that!</Text>)
44
41
  .toJSON();
45
42
  const mini = renderer
46
- .create(<Text size={TextSizes.Mini}>Animal Crossing is all that!</Text>)
43
+ .create(<Text size="mini">Animal Crossing is all that!</Text>)
47
44
  .toJSON();
48
45
  const withChakraProps = renderer
49
46
  .create(