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

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 (337) hide show
  1. package/CHANGELOG.md +131 -1
  2. package/README.md +10 -10
  3. package/dist/components/Accordion/Accordion.d.ts +6 -4
  4. package/dist/components/Accordion/AccordionTypes.d.ts +5 -0
  5. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +4 -4
  6. package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +1 -1
  7. package/dist/components/Button/Button.d.ts +2 -2
  8. package/dist/components/Card/Card.d.ts +22 -29
  9. package/dist/components/Checkbox/Checkbox.d.ts +3 -3
  10. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +9 -6
  11. package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +1 -1
  12. package/dist/components/DatePicker/DatePicker.d.ts +5 -6
  13. package/dist/components/Fieldset/Fieldset.d.ts +5 -6
  14. package/dist/components/Form/Form.d.ts +6 -6
  15. package/dist/components/Grid/GridTypes.d.ts +7 -7
  16. package/dist/components/Grid/SimpleGrid.d.ts +1 -1
  17. package/dist/components/Heading/Heading.d.ts +5 -5
  18. package/dist/components/Heading/HeadingTypes.d.ts +1 -1
  19. package/dist/components/HelperErrorText/HelperErrorText.d.ts +9 -8
  20. package/dist/components/Hero/Hero.d.ts +9 -5
  21. package/dist/components/HorizontalRule/HorizontalRule.d.ts +2 -10
  22. package/dist/components/Icons/Icon.d.ts +2 -1
  23. package/dist/components/Icons/IconTypes.d.ts +1 -0
  24. package/dist/components/Image/Image.d.ts +27 -9
  25. package/dist/components/Image/ImageTypes.d.ts +4 -4
  26. package/dist/components/Label/Label.d.ts +7 -4
  27. package/dist/components/Link/Link.d.ts +1 -1
  28. package/dist/components/List/List.d.ts +11 -11
  29. package/dist/components/List/ListTypes.d.ts +1 -1
  30. package/dist/components/Logo/Logo.d.ts +2 -1
  31. package/dist/components/Logo/LogoSvgs.d.ts +2 -0
  32. package/dist/components/Logo/LogoTypes.d.ts +4 -2
  33. package/dist/components/Notification/Notification.d.ts +7 -7
  34. package/dist/components/Pagination/Pagination.d.ts +2 -2
  35. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +3 -3
  36. package/dist/components/Radio/Radio.d.ts +5 -7
  37. package/dist/components/RadioGroup/RadioGroup.d.ts +16 -8
  38. package/dist/components/SearchBar/SearchBar.d.ts +4 -4
  39. package/dist/components/Select/Select.d.ts +12 -8
  40. package/dist/components/Select/SelectTypes.d.ts +4 -0
  41. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +8 -6
  42. package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +0 -4
  43. package/dist/components/Slider/Slider.d.ts +6 -4
  44. package/dist/components/StatusBadge/StatusBadge.d.ts +5 -1
  45. package/dist/components/StructuredContent/StructuredContent.d.ts +10 -23
  46. package/dist/components/Table/Table.d.ts +1 -1
  47. package/dist/components/Tabs/Tabs.d.ts +7 -6
  48. package/dist/components/Template/Template.d.ts +17 -8
  49. package/dist/components/Text/Text.d.ts +4 -4
  50. package/dist/components/Text/TextTypes.d.ts +1 -1
  51. package/dist/components/TextInput/TextInput.d.ts +7 -7
  52. package/dist/components/Toggle/Toggle.d.ts +8 -10
  53. package/dist/components/Toggle/{ToggleSizes.d.ts → ToggleTypes.d.ts} +1 -1
  54. package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
  55. package/dist/design-system-react-components.cjs.development.js +2075 -1468
  56. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  57. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  58. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  59. package/dist/design-system-react-components.esm.js +2086 -1483
  60. package/dist/design-system-react-components.esm.js.map +1 -1
  61. package/dist/helpers/enums.d.ts +4 -0
  62. package/dist/hooks/useCarouselStyles.d.ts +3 -2
  63. package/dist/hooks/useNYPLTheme.d.ts +12 -0
  64. package/dist/index.d.ts +11 -9
  65. package/dist/styles.css +1 -1
  66. package/dist/theme/components/accordion.d.ts +7 -12
  67. package/dist/theme/components/breadcrumb.d.ts +3 -0
  68. package/dist/theme/components/button.d.ts +10 -2
  69. package/dist/theme/components/card.d.ts +44 -24
  70. package/dist/theme/components/checkbox.d.ts +6 -4
  71. package/dist/theme/components/checkboxGroup.d.ts +4 -2
  72. package/dist/theme/components/componentWrapper.d.ts +2 -2
  73. package/dist/theme/components/customTable.d.ts +84 -1
  74. package/dist/theme/components/fieldset.d.ts +4 -14
  75. package/dist/theme/components/global.d.ts +25 -18
  76. package/dist/theme/components/heading.d.ts +53 -0
  77. package/dist/theme/components/helperErrorText.d.ts +1 -0
  78. package/dist/theme/components/hero.d.ts +21 -15
  79. package/dist/theme/components/image.d.ts +1 -1
  80. package/dist/theme/components/label.d.ts +9 -10
  81. package/dist/theme/components/list.d.ts +99 -9
  82. package/dist/theme/components/notification.d.ts +4 -4
  83. package/dist/theme/components/pagination.d.ts +2 -5
  84. package/dist/theme/components/radio.d.ts +7 -4
  85. package/dist/theme/components/radioGroup.d.ts +4 -2
  86. package/dist/theme/components/select.d.ts +37 -5
  87. package/dist/theme/components/skeletonLoader.d.ts +2 -2
  88. package/dist/theme/components/slider.d.ts +6 -3
  89. package/dist/theme/components/structuredContent.d.ts +197 -0
  90. package/dist/theme/components/textInput.d.ts +18 -6
  91. package/dist/theme/components/toggle.d.ts +20 -5
  92. package/dist/theme/foundations/global.d.ts +2 -0
  93. package/dist/theme/foundations/radii.d.ts +1 -0
  94. package/dist/theme/foundations/spacing.d.ts +46 -43
  95. package/package.json +5 -6
  96. package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +34 -0
  97. package/src/components/Accordion/Accordion.stories.mdx +150 -66
  98. package/src/components/Accordion/Accordion.test.tsx +65 -17
  99. package/src/components/Accordion/Accordion.tsx +61 -27
  100. package/src/components/Accordion/AccordionTypes.tsx +5 -0
  101. package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +505 -14
  102. package/src/components/Autosuggest/Autosuggest.stories.mdx +4 -3
  103. package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +37 -19
  104. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +57 -36
  105. package/src/components/Breadcrumbs/Breadcrumbs.tsx +14 -13
  106. package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +1 -1
  107. package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +211 -12
  108. package/src/components/Button/Button.stories.mdx +87 -23
  109. package/src/components/Button/Button.test.tsx +25 -0
  110. package/src/components/Button/Button.tsx +18 -7
  111. package/src/components/Button/__snapshots__/Button.test.tsx.snap +27 -7
  112. package/src/components/Card/Card.stories.mdx +493 -329
  113. package/src/components/Card/Card.test.tsx +138 -18
  114. package/src/components/Card/Card.tsx +151 -85
  115. package/src/components/Card/__snapshots__/Card.test.tsx.snap +221 -101
  116. package/src/components/Chakra/Center.stories.mdx +2 -2
  117. package/src/components/Chakra/Grid.stories.mdx +4 -4
  118. package/src/components/Checkbox/Checkbox.stories.mdx +73 -9
  119. package/src/components/Checkbox/Checkbox.test.tsx +89 -10
  120. package/src/components/Checkbox/Checkbox.tsx +26 -16
  121. package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +209 -6
  122. package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +135 -23
  123. package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +216 -90
  124. package/src/components/CheckboxGroup/CheckboxGroup.tsx +39 -26
  125. package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +493 -89
  126. package/src/components/ComponentWrapper/ComponentWrapper.test.tsx +12 -0
  127. package/src/components/ComponentWrapper/ComponentWrapper.tsx +39 -41
  128. package/src/components/ComponentWrapper/__snapshots__/ComponentWrapper.test.tsx.snap +47 -34
  129. package/src/components/DatePicker/DatePicker.stories.mdx +63 -27
  130. package/src/components/DatePicker/DatePicker.test.tsx +94 -15
  131. package/src/components/DatePicker/DatePicker.tsx +67 -58
  132. package/src/components/DatePicker/_DatePicker.scss +71 -13
  133. package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +250 -206
  134. package/src/components/Fieldset/Fieldset.stories.mdx +33 -3
  135. package/src/components/Fieldset/Fieldset.test.tsx +58 -28
  136. package/src/components/Fieldset/Fieldset.tsx +35 -30
  137. package/src/components/Fieldset/__snapshots__/Fieldset.test.tsx.snap +40 -19
  138. package/src/components/Form/Form.stories.mdx +118 -47
  139. package/src/components/Form/Form.test.tsx +59 -16
  140. package/src/components/Form/Form.tsx +89 -65
  141. package/src/components/Form/__snapshots__/Form.test.tsx.snap +83 -5
  142. package/src/components/Grid/GridTypes.tsx +7 -7
  143. package/src/components/Grid/SimpleGrid.stories.mdx +87 -41
  144. package/src/components/Grid/SimpleGrid.test.tsx +24 -9
  145. package/src/components/Grid/SimpleGrid.tsx +29 -20
  146. package/src/components/Grid/__snapshots__/SimpleGrid.test.tsx.snap +16 -1
  147. package/src/components/Heading/Heading.stories.mdx +56 -25
  148. package/src/components/Heading/Heading.test.tsx +17 -7
  149. package/src/components/Heading/Heading.tsx +60 -58
  150. package/src/components/Heading/HeadingTypes.tsx +1 -1
  151. package/src/components/Heading/__snapshots__/Heading.test.tsx.snap +27 -8
  152. package/src/components/HelperErrorText/HelperErrorText.stories.mdx +64 -42
  153. package/src/components/HelperErrorText/HelperErrorText.test.tsx +15 -0
  154. package/src/components/HelperErrorText/HelperErrorText.tsx +40 -35
  155. package/src/components/HelperErrorText/__snapshots__/HelperErrorText.test.tsx.snap +35 -4
  156. package/src/components/Hero/Hero.stories.mdx +143 -113
  157. package/src/components/Hero/Hero.test.tsx +146 -58
  158. package/src/components/Hero/Hero.tsx +144 -112
  159. package/src/components/Hero/__snapshots__/Hero.test.tsx.snap +89 -17
  160. package/src/components/HorizontalRule/HorizontalRule.stories.mdx +26 -4
  161. package/src/components/HorizontalRule/HorizontalRule.test.tsx +9 -17
  162. package/src/components/HorizontalRule/HorizontalRule.tsx +9 -25
  163. package/src/components/HorizontalRule/__snapshots__/HorizontalRule.test.tsx.snap +18 -5
  164. package/src/components/Icons/Icon.stories.mdx +80 -23
  165. package/src/components/Icons/Icon.test.tsx +51 -2
  166. package/src/components/Icons/Icon.tsx +93 -71
  167. package/src/components/Icons/IconTypes.tsx +1 -0
  168. package/src/components/Icons/__snapshots__/Icon.test.tsx.snap +129 -0
  169. package/src/components/Image/Image.stories.mdx +160 -71
  170. package/src/components/Image/Image.test.tsx +40 -48
  171. package/src/components/Image/Image.tsx +80 -48
  172. package/src/components/Image/ImageTypes.ts +4 -4
  173. package/src/components/Image/__snapshots__/Image.test.tsx.snap +84 -21
  174. package/src/components/Label/Label.stories.mdx +42 -20
  175. package/src/components/Label/Label.test.tsx +42 -17
  176. package/src/components/Label/Label.tsx +22 -13
  177. package/src/components/Label/__snapshots__/Label.test.tsx.snap +19 -15
  178. package/src/components/Link/Link.stories.mdx +25 -1
  179. package/src/components/Link/Link.test.tsx +21 -0
  180. package/src/components/Link/Link.tsx +16 -9
  181. package/src/components/Link/__snapshots__/Link.test.tsx.snap +37 -11
  182. package/src/components/List/List.stories.mdx +75 -40
  183. package/src/components/List/List.test.tsx +73 -22
  184. package/src/components/List/List.tsx +44 -28
  185. package/src/components/List/ListTypes.tsx +1 -1
  186. package/src/components/List/__snapshots__/List.test.tsx.snap +110 -8
  187. package/src/components/Logo/Logo.stories.mdx +40 -16
  188. package/src/components/Logo/Logo.test.tsx +29 -2
  189. package/src/components/Logo/Logo.tsx +28 -11
  190. package/src/components/Logo/LogoSvgs.tsx +4 -0
  191. package/src/components/Logo/LogoTypes.tsx +3 -1
  192. package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +73 -2
  193. package/src/components/Modal/Modal.stories.mdx +13 -0
  194. package/src/components/Notification/Notification.stories.mdx +29 -5
  195. package/src/components/Notification/Notification.test.tsx +23 -0
  196. package/src/components/Notification/Notification.tsx +53 -51
  197. package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +158 -29
  198. package/src/components/Pagination/Pagination.stories.mdx +27 -6
  199. package/src/components/Pagination/Pagination.test.tsx +55 -2
  200. package/src/components/Pagination/Pagination.tsx +12 -9
  201. package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +244 -27
  202. package/src/components/Placeholder/Placeholder.tsx +3 -1
  203. package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +76 -10
  204. package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +87 -13
  205. package/src/components/ProgressIndicator/ProgressIndicator.tsx +20 -10
  206. package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +101 -14
  207. package/src/components/Radio/Radio.stories.mdx +75 -11
  208. package/src/components/Radio/Radio.test.tsx +83 -9
  209. package/src/components/Radio/Radio.tsx +70 -62
  210. package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +163 -5
  211. package/src/components/RadioGroup/RadioGroup.stories.mdx +293 -94
  212. package/src/components/RadioGroup/RadioGroup.test.tsx +193 -68
  213. package/src/components/RadioGroup/RadioGroup.tsx +110 -101
  214. package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1258 -902
  215. package/src/components/SearchBar/SearchBar.stories.mdx +101 -36
  216. package/src/components/SearchBar/{SearchBar.Test.tsx → SearchBar.test.tsx} +46 -4
  217. package/src/components/SearchBar/SearchBar.tsx +20 -11
  218. package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1039 -0
  219. package/src/components/Select/Select.stories.mdx +151 -62
  220. package/src/components/Select/Select.test.tsx +56 -44
  221. package/src/components/Select/Select.tsx +125 -104
  222. package/src/components/Select/SelectTypes.tsx +5 -0
  223. package/src/components/Select/__snapshots__/Select.test.tsx.snap +749 -409
  224. package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +53 -23
  225. package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +14 -8
  226. package/src/components/SkeletonLoader/SkeletonLoader.tsx +80 -78
  227. package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +0 -5
  228. package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +169 -10
  229. package/src/components/Slider/Slider.stories.mdx +123 -41
  230. package/src/components/Slider/Slider.test.tsx +65 -17
  231. package/src/components/Slider/Slider.tsx +30 -23
  232. package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +403 -226
  233. package/src/components/StatusBadge/StatusBadge.stories.mdx +19 -1
  234. package/src/components/StatusBadge/StatusBadge.test.tsx +19 -1
  235. package/src/components/StatusBadge/StatusBadge.tsx +25 -20
  236. package/src/components/StatusBadge/__snapshots__/StatusBadge.test.tsx.snap +22 -3
  237. package/src/components/StructuredContent/StructuredContent.stories.mdx +229 -61
  238. package/src/components/StructuredContent/StructuredContent.test.tsx +162 -101
  239. package/src/components/StructuredContent/StructuredContent.tsx +98 -103
  240. package/src/components/StructuredContent/__snapshots__/StructuredContent.test.tsx.snap +102 -17
  241. package/src/components/StyleGuide/Bidirectionality.stories.mdx +5 -5
  242. package/src/components/StyleGuide/Breakpoints.stories.mdx +6 -6
  243. package/src/components/StyleGuide/Buttons.stories.mdx +2 -12
  244. package/src/components/StyleGuide/ColorCard.tsx +4 -4
  245. package/src/components/StyleGuide/Colors.stories.mdx +1 -2
  246. package/src/components/StyleGuide/DesignTokens.stories.mdx +56 -26
  247. package/src/components/StyleGuide/Forms.stories.mdx +27 -12
  248. package/src/components/StyleGuide/Iconography.stories.mdx +2 -12
  249. package/src/components/StyleGuide/Spacing.stories.mdx +80 -41
  250. package/src/components/StyleGuide/Typography.stories.mdx +47 -33
  251. package/src/components/Table/Table.stories.mdx +38 -11
  252. package/src/components/Table/Table.test.tsx +16 -1
  253. package/src/components/Table/Table.tsx +10 -8
  254. package/src/components/Table/__snapshots__/Table.test.tsx.snap +408 -5
  255. package/src/components/Tabs/Tabs.stories.mdx +59 -10
  256. package/src/components/Tabs/Tabs.test.tsx +29 -11
  257. package/src/components/Tabs/Tabs.tsx +28 -21
  258. package/src/components/Tabs/__snapshots__/Tabs.test.tsx.snap +394 -5
  259. package/src/components/Template/Template.stories.mdx +73 -32
  260. package/src/components/Template/Template.test.tsx +68 -5
  261. package/src/components/Template/Template.tsx +89 -71
  262. package/src/components/Template/__snapshots__/Template.test.tsx.snap +195 -22
  263. package/src/components/Text/Text.stories.mdx +32 -15
  264. package/src/components/Text/Text.test.tsx +14 -11
  265. package/src/components/Text/Text.tsx +13 -16
  266. package/src/components/Text/TextTypes.tsx +1 -1
  267. package/src/components/Text/__snapshots__/Text.test.tsx.snap +21 -4
  268. package/src/components/TextInput/TextInput.stories.mdx +73 -27
  269. package/src/components/TextInput/TextInput.test.tsx +65 -50
  270. package/src/components/TextInput/TextInput.tsx +123 -115
  271. package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +96 -73
  272. package/src/components/Toggle/Toggle.stories.mdx +74 -26
  273. package/src/components/Toggle/Toggle.test.tsx +41 -10
  274. package/src/components/Toggle/Toggle.tsx +29 -26
  275. package/src/components/Toggle/{ToggleSizes.tsx → ToggleTypes.tsx} +1 -1
  276. package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +191 -4
  277. package/src/components/VideoPlayer/VideoPlayer.stories.mdx +52 -4
  278. package/src/components/VideoPlayer/VideoPlayer.test.tsx +41 -6
  279. package/src/components/VideoPlayer/VideoPlayer.tsx +134 -120
  280. package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +81 -39
  281. package/src/docs/Chakra.stories.mdx +50 -9
  282. package/src/docs/Welcome.stories.mdx +168 -0
  283. package/src/{components/Card/CardTypes.tsx → helpers/enums.ts} +2 -2
  284. package/src/hooks/tests/useNYPLTheme.test.tsx +1 -1
  285. package/src/hooks/useCarouselStyles.stories.mdx +30 -0
  286. package/src/hooks/useCarouselStyles.ts +3 -2
  287. package/src/hooks/useNYPLTheme.stories.mdx +101 -0
  288. package/src/hooks/useNYPLTheme.ts +31 -7
  289. package/src/hooks/useWindowSize.stories.mdx +23 -0
  290. package/src/index.ts +11 -15
  291. package/src/styles/base/_place-holder.scss +1 -1
  292. package/src/theme/components/accordion.ts +7 -12
  293. package/src/theme/components/breadcrumb.ts +3 -0
  294. package/src/theme/components/button.ts +15 -7
  295. package/src/theme/components/card.ts +56 -36
  296. package/src/theme/components/checkbox.ts +10 -8
  297. package/src/theme/components/checkboxGroup.ts +4 -2
  298. package/src/theme/components/componentWrapper.ts +2 -2
  299. package/src/theme/components/customTable.ts +39 -31
  300. package/src/theme/components/fieldset.ts +1 -2
  301. package/src/theme/components/global.ts +29 -23
  302. package/src/theme/components/heading.ts +1 -1
  303. package/src/theme/components/helperErrorText.ts +1 -0
  304. package/src/theme/components/hero.ts +14 -16
  305. package/src/theme/components/icon.ts +5 -2
  306. package/src/theme/components/image.ts +1 -1
  307. package/src/theme/components/label.ts +4 -3
  308. package/src/theme/components/list.ts +73 -66
  309. package/src/theme/components/notification.ts +7 -7
  310. package/src/theme/components/pagination.ts +2 -5
  311. package/src/theme/components/progressIndicator.ts +3 -3
  312. package/src/theme/components/radio.ts +9 -9
  313. package/src/theme/components/radioGroup.ts +4 -2
  314. package/src/theme/components/select.ts +35 -16
  315. package/src/theme/components/skeletonLoader.ts +3 -3
  316. package/src/theme/components/slider.ts +8 -7
  317. package/src/theme/components/statusBadge.ts +2 -2
  318. package/src/theme/components/structuredContent.ts +66 -1
  319. package/src/theme/components/tabs.ts +2 -2
  320. package/src/theme/components/template.ts +9 -9
  321. package/src/theme/components/textInput.ts +13 -12
  322. package/src/theme/components/toggle.ts +43 -13
  323. package/src/theme/components/videoPlayer.ts +1 -1
  324. package/src/theme/foundations/colors.ts +1 -1
  325. package/src/theme/foundations/radii.ts +1 -0
  326. package/src/theme/foundations/spacing.ts +70 -22
  327. package/src/theme/foundations/typography.ts +2 -2
  328. package/src/utils/componentCategories.ts +28 -21
  329. package/dist/components/Card/CardTypes.d.ts +0 -4
  330. package/dist/components/CheckboxGroup/CheckboxGroupLayoutTypes.d.ts +0 -4
  331. package/dist/components/RadioGroup/RadioGroupLayoutTypes.d.ts +0 -4
  332. package/dist/components/SearchBar/SearchBar.Test.d.ts +0 -1
  333. package/dist/helpers/generateUUID.d.ts +0 -1
  334. package/src/components/CheckboxGroup/CheckboxGroupLayoutTypes.tsx +0 -4
  335. package/src/components/RadioGroup/RadioGroupLayoutTypes.tsx +0 -4
  336. package/src/docs/Intro.stories.mdx +0 -53
  337. package/src/helpers/generateUUID.tsx +0 -5
@@ -2,17 +2,17 @@
2
2
 
3
3
  exports[`StructuredContent renders the UI snapshot 1`] = `
4
4
  <div
5
- className="css-0"
5
+ className="css-1xdhyk6"
6
6
  id="withHTMLStringContent"
7
7
  >
8
8
  <h2
9
- className="chakra-heading css-0"
9
+ className="chakra-heading css-1xdhyk6"
10
10
  id="withHTMLStringContent-heading"
11
11
  >
12
12
  Heading text
13
13
  </h2>
14
14
  <h3
15
- className="chakra-heading css-0"
15
+ className="chakra-heading css-1xdhyk6"
16
16
  id="withHTMLStringContent-callout"
17
17
  >
18
18
  This is the callout text
@@ -41,6 +41,7 @@ exports[`StructuredContent renders the UI snapshot 1`] = `
41
41
  </figcaption>
42
42
  </figure>
43
43
  <div
44
+ className="structuredcontent-body"
44
45
  dangerouslySetInnerHTML={
45
46
  Object {
46
47
  "__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
@@ -52,17 +53,17 @@ exports[`StructuredContent renders the UI snapshot 1`] = `
52
53
 
53
54
  exports[`StructuredContent renders the UI snapshot 2`] = `
54
55
  <div
55
- className="css-0"
56
+ className="css-1xdhyk6"
56
57
  id="withHTMLDOMContent"
57
58
  >
58
59
  <h2
59
- className="chakra-heading css-0"
60
+ className="chakra-heading css-1xdhyk6"
60
61
  id="withHTMLDOMContent-heading"
61
62
  >
62
63
  Heading text
63
64
  </h2>
64
65
  <h3
65
- className="chakra-heading css-0"
66
+ className="chakra-heading css-1xdhyk6"
66
67
  id="withHTMLDOMContent-callout"
67
68
  >
68
69
  This is the callout text
@@ -91,7 +92,7 @@ exports[`StructuredContent renders the UI snapshot 2`] = `
91
92
  </figcaption>
92
93
  </figure>
93
94
  <div
94
- className="css-0"
95
+ className="structuredcontent-body css-0"
95
96
  >
96
97
  <p>
97
98
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt.
@@ -137,22 +138,23 @@ exports[`StructuredContent renders the UI snapshot 2`] = `
137
138
 
138
139
  exports[`StructuredContent renders the UI snapshot 3`] = `
139
140
  <div
140
- className="css-0"
141
+ className="css-1xdhyk6"
141
142
  id="withoutAnImage"
142
143
  >
143
144
  <h2
144
- className="chakra-heading css-0"
145
+ className="chakra-heading css-1xdhyk6"
145
146
  id="withoutAnImage-heading"
146
147
  >
147
148
  Heading text
148
149
  </h2>
149
150
  <h3
150
- className="chakra-heading css-0"
151
+ className="chakra-heading css-1xdhyk6"
151
152
  id="withoutAnImage-callout"
152
153
  >
153
154
  This is the callout text
154
155
  </h3>
155
156
  <div
157
+ className="structuredcontent-body"
156
158
  dangerouslySetInnerHTML={
157
159
  Object {
158
160
  "__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
@@ -164,17 +166,17 @@ exports[`StructuredContent renders the UI snapshot 3`] = `
164
166
 
165
167
  exports[`StructuredContent renders the UI snapshot 4`] = `
166
168
  <div
167
- className="css-0"
169
+ className="css-1xdhyk6"
168
170
  id="withImageWithoutCaptionOrCredit"
169
171
  >
170
172
  <h2
171
- className="chakra-heading css-0"
173
+ className="chakra-heading css-1xdhyk6"
172
174
  id="withImageWithoutCaptionOrCredit-heading"
173
175
  >
174
176
  Heading text
175
177
  </h2>
176
178
  <h3
177
- className="chakra-heading css-0"
179
+ className="chakra-heading css-1xdhyk6"
178
180
  id="withImageWithoutCaptionOrCredit-callout"
179
181
  >
180
182
  This is the callout text
@@ -185,6 +187,7 @@ exports[`StructuredContent renders the UI snapshot 4`] = `
185
187
  src="https://placeimg.com/400/300/animals"
186
188
  />
187
189
  <div
190
+ className="structuredcontent-body"
188
191
  dangerouslySetInnerHTML={
189
192
  Object {
190
193
  "__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
@@ -196,11 +199,11 @@ exports[`StructuredContent renders the UI snapshot 4`] = `
196
199
 
197
200
  exports[`StructuredContent renders the UI snapshot 5`] = `
198
201
  <div
199
- className="css-0"
202
+ className="css-1xdhyk6"
200
203
  id="withoutHeading"
201
204
  >
202
205
  <h3
203
- className="chakra-heading css-0"
206
+ className="chakra-heading css-1xdhyk6"
204
207
  id="withoutHeading-callout"
205
208
  >
206
209
  This is the callout text
@@ -229,6 +232,7 @@ exports[`StructuredContent renders the UI snapshot 5`] = `
229
232
  </figcaption>
230
233
  </figure>
231
234
  <div
235
+ className="structuredcontent-body"
232
236
  dangerouslySetInnerHTML={
233
237
  Object {
234
238
  "__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
@@ -240,15 +244,95 @@ exports[`StructuredContent renders the UI snapshot 5`] = `
240
244
 
241
245
  exports[`StructuredContent renders the UI snapshot 6`] = `
242
246
  <div
243
- className="css-0"
247
+ className="css-1xdhyk6"
244
248
  id="withoutCalloutText"
245
249
  >
246
250
  <h2
247
- className="chakra-heading css-0"
251
+ className="chakra-heading css-1xdhyk6"
248
252
  id="withoutCalloutText-heading"
249
253
  >
250
254
  Heading text
251
255
  </h2>
256
+ <div
257
+ className="structuredcontent-body"
258
+ dangerouslySetInnerHTML={
259
+ Object {
260
+ "__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
261
+ }
262
+ }
263
+ />
264
+ </div>
265
+ `;
266
+
267
+ exports[`StructuredContent renders the UI snapshot 7`] = `
268
+ <div
269
+ className="css-kle7zy"
270
+ id="withChakraProps"
271
+ >
272
+ <h2
273
+ className="chakra-heading css-1xdhyk6"
274
+ id="withChakraProps-heading"
275
+ >
276
+ Heading text
277
+ </h2>
278
+ <h3
279
+ className="chakra-heading css-1xdhyk6"
280
+ id="withChakraProps-callout"
281
+ >
282
+ This is the callout text
283
+ </h3>
284
+ <figure
285
+ className="css-0"
286
+ >
287
+ <img
288
+ alt="Image alt text"
289
+ className="css-0"
290
+ src="https://placeimg.com/400/300/animals"
291
+ />
292
+ <figcaption
293
+ className="css-0"
294
+ >
295
+ <div
296
+ className="css-0"
297
+ >
298
+ Image caption
299
+ </div>
300
+ <div
301
+ className="css-0"
302
+ >
303
+ Image credit
304
+ </div>
305
+ </figcaption>
306
+ </figure>
307
+ <div
308
+ className="structuredcontent-body"
309
+ dangerouslySetInnerHTML={
310
+ Object {
311
+ "__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
312
+ }
313
+ }
314
+ />
315
+ </div>
316
+ `;
317
+
318
+ exports[`StructuredContent renders the UI snapshot 8`] = `
319
+ <div
320
+ className="css-1xdhyk6"
321
+ data-testid="props"
322
+ id="withOtherProps"
323
+ >
324
+ <h2
325
+ className="chakra-heading css-1xdhyk6"
326
+ id="withOtherProps-heading"
327
+ >
328
+ Heading text
329
+ </h2>
330
+ <h3
331
+ className="chakra-heading css-1xdhyk6"
332
+ id="withOtherProps-callout"
333
+ >
334
+ This is the callout text
335
+ </h3>
252
336
  <figure
253
337
  className="css-0"
254
338
  >
@@ -273,6 +357,7 @@ exports[`StructuredContent renders the UI snapshot 6`] = `
273
357
  </figcaption>
274
358
  </figure>
275
359
  <div
360
+ className="structuredcontent-body"
276
361
  dangerouslySetInnerHTML={
277
362
  Object {
278
363
  "__html": "<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed doeiusmod tempor incididunt ut labore et dolore magna aliqua.Pellentesque massa placerat duis ultricies lacus sed turpis tincidunt. <a href='#'>Porttitor eget dolor</a> morbi non arcu risus quis varius.Faucibus in ornare quam viverra orci sagittis.</p><p>Nisl vel pretium lectusquam id leo in. Etiam dignissim diam quis enim lobortis scelerisque fermentum.Diam maecenas sed enim ut sem viverra. <b>Diam quam nulla porttitor massaid neque. Sed faucibus turpis in eu mi.</b></p><p>Ornare lectus sit amet est placeratin. Quis blandit turpis cursus in. Aliquam ut porttitor leo a diam sollicitudintempor id eu. Pellentesque eu tincidunt tortor aliquam nulla facilisi crasfermentum. Porttitor leo a diam sollicitudin tempor id eu nisl nunc. Feugiatnisl pretium fusce id velit ut tortor. Porttitor leo a diam sollicitudin tempor id eu nisl nunc.</p><ul><li>one</li><li>two</li><li>three</li><li>four</li></ul><p><i>Mauris nunc congue nisi vitae suscipittellus mauris a diam. Purus gravida quis blandit turpis cursus in hac.Morbi tempus iaculis urna id volutpat. Lectus nulla at volutpat diam utvenenatis. Donec ac odio tempor orci dapibus ultrices in iaculis. Dui vivamusarcu felis bibendum ut tristique. Cras semper auctor neque vitae tempusquam pellentesque. Placerat orci nulla pellentesque dignissim enim sitamet. Feugiat pretium nibh ipsum consequat. Placerat orci nulla pellentesquedignissim. Suspendisse faucibus interdum posuere lorem. Nullam non nisiest sit. Turpis egestas integer eget aliquet nibh praesent. Tortor at risusviverra adipiscing at. Eu augue ut lectus arcu bibendum at varius velpharetra.</i></p>",
@@ -31,16 +31,16 @@ for more information on layout mirroring.
31
31
  ## Background
32
32
 
33
33
  While the majority of applications at NYPL will have a LTR direction, some applications
34
- will introduce internationalization through different means. While the NYPL Design
34
+ will introduce internationalization through different means. While the Reservoir Design
35
35
  System (DS) has _no preference_ in how an application is internationalized, DS
36
36
  components should work appropriately in RTL configurations in any browser.
37
37
 
38
38
  ## Application Implementation
39
39
 
40
- Components in the NYPL Design System will support layout and component mirroring,
41
- but application directionality should be implemented at the application level. The
42
- following are general guidelines on how to set up directionality but implementation
43
- will be up to the application and its architecture.
40
+ Components in the DS will support layout and component mirroring, but application
41
+ directionality should be implemented at the application level. The following are
42
+ general guidelines on how to set up directionality but implementation will be up
43
+ to the application and its architecture.
44
44
 
45
45
  ### `dir` HTML attribute
46
46
 
@@ -1,5 +1,4 @@
1
1
  import { Meta } from "@storybook/addon-docs";
2
- import { withDesign } from "storybook-addon-designs";
3
2
 
4
3
  import Heading from "../Heading/Heading";
5
4
  import { getCategory } from "../../utils/componentCategories";
@@ -16,7 +15,8 @@ import { getCategory } from "../../utils/componentCategories";
16
15
 
17
16
  ## General Information
18
17
 
19
- The DS adheres to four global breakpoints for responsive layouts and typography.
18
+ The Reservoir Design System (DS) adheres to four global breakpoints for
19
+ responsive layouts and typography.
20
20
 
21
21
  - Mobile: 320px
22
22
  - Tablet Portrait: 600px
@@ -27,7 +27,7 @@ The DS adheres to four global breakpoints for responsive layouts and typography.
27
27
 
28
28
  The following CSS variables are available through the DS.
29
29
 
30
- ```scss
30
+ ```css
31
31
  --nypl-breakpoint-small: 320px;
32
32
  --nypl-breakpoint-medium: 600px;
33
33
  --nypl-breakpoint-large: 960px;
@@ -36,9 +36,9 @@ The following CSS variables are available through the DS.
36
36
 
37
37
  ## SCSS Variables
38
38
 
39
- If you are using SCSS and imported the NYPL Design System `/dist/resources.scss`
40
- file, then you can use the following SCSS variables in your media queries or
41
- SCSS `breakpoint` function (if used).
39
+ If you are using SCSS and imported the DS `/dist/resources.scss` file, then you
40
+ can use the following SCSS variables in your media queries or SCSS `breakpoint`
41
+ function (if used).
42
42
 
43
43
  ```scss
44
44
  $nypl-breakpoint-small: 320px;
@@ -1,6 +1,5 @@
1
1
  import { ButtonGroup } from "@chakra-ui/react";
2
2
  import { Canvas, Meta } from "@storybook/addon-docs";
3
- import { withDesign } from "storybook-addon-designs";
4
3
 
5
4
  import Button from "../Button/Button";
6
5
  import { ButtonTypes } from "../Button/ButtonTypes";
@@ -14,16 +13,7 @@ import {
14
13
  import { getCategory } from "../../utils/componentCategories";
15
14
  import DSProvider from "../../theme/provider";
16
15
 
17
- <Meta
18
- title={getCategory("Buttons")}
19
- decorators={[withDesign]}
20
- parameters={{
21
- design: {
22
- type: "figma",
23
- url: "https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Master?node-id=11477%3A2298",
24
- },
25
- }}
26
- />
16
+ <Meta title={getCategory("Buttons")} />
27
17
 
28
18
  # Buttons
29
19
 
@@ -38,7 +28,7 @@ import DSProvider from "../../theme/provider";
38
28
 
39
29
  ## General Information
40
30
 
41
- Use the NYPL Design System [Button](https://nypl.github.io/nypl-design-system/storybook-static/?path=/docs/form-elements-button--basic)
31
+ Use the [Button](https://nypl.github.io/nypl-design-system/storybook-static/?path=/docs/form-elements-button--basic)
42
32
  component to render form buttons.
43
33
 
44
34
  ```jsx
@@ -1,9 +1,9 @@
1
1
  import * as React from "react";
2
2
 
3
3
  import Card from "../Card/Card";
4
- import { CardLayouts } from "../Card/CardTypes";
5
4
  import Heading from "../Heading/Heading";
6
5
  import { HeadingLevels } from "../Heading/HeadingTypes";
6
+ import { LayoutTypes } from "../../helpers/enums";
7
7
 
8
8
  export interface ColorCardProps {
9
9
  /** backgroundColor of the color card */
@@ -25,9 +25,9 @@ export default function ColorCard(
25
25
  <div style={{ display: "flex", alignItems: "center" }}>
26
26
  <Card
27
27
  backgroundColor={backgroundColor}
28
- center
29
- layout={CardLayouts.Column}
30
- border
28
+ isBordered
29
+ isCentered
30
+ layout={LayoutTypes.Column}
31
31
  />
32
32
  <div style={{ marginLeft: "1rem" }}>
33
33
  <Heading level={HeadingLevels.Four}>{colorName}</Heading>
@@ -1,5 +1,4 @@
1
1
  import { Canvas, Meta } from "@storybook/addon-docs";
2
- import { withDesign } from "storybook-addon-designs";
3
2
 
4
3
  import ColorCard from "./ColorCard";
5
4
  import Heading from "../Heading/Heading";
@@ -88,7 +87,7 @@ export const getColorCards = (cat) => {
88
87
  return cards;
89
88
  };
90
89
 
91
- <Meta title={getCategory("Colors")} decorators={[withDesign]} />
90
+ <Meta title={getCategory("Colors")} />
92
91
 
93
92
  # NYPL Colors
94
93
 
@@ -1,5 +1,4 @@
1
1
  import { Meta } from "@storybook/addon-docs";
2
- import { withDesign } from "storybook-addon-designs";
3
2
 
4
3
  import { getCategory } from "../../utils/componentCategories";
5
4
 
@@ -7,34 +6,49 @@ import { getCategory } from "../../utils/componentCategories";
7
6
 
8
7
  # Design Tokens
9
8
 
10
- | Table of Contents |
11
- | ------------------------------------------------------------------------------------ |
12
- | 1. [What are Design Tokens?](#what-are-design-tokens) |
13
- | 2. [Why Use Design Tokens?](#why-use-design-tokens) |
14
- | 3. [How to Use the NYPL Design Tokens](#figma-reference) |
15
- | 4. [Using NYPL Design Tokens in CSS](#using-nypl-design-tokens-in-css) |
16
- | 5. [Using NYPL Design Tokens in Javascript](#using-nypl-design-tokens-in-javascript) |
17
- | 6. [NYPL Design Token Categories](#nypl-design-token-categories) |
9
+ | Table of Contents |
10
+ | ---------------------------------------------------------------------------------------------- |
11
+ | 1. [What are Design Tokens?](#what-are-design-tokens) |
12
+ | 2. [Why Use Design Tokens?](#why-use-design-tokens) |
13
+ | 3. [How to Use the Reservoir Design Tokens](#figma-reference) |
14
+ | 4. [Using Reservoir Design Tokens in CSS](#using-reservoir-design-tokens-in-css) |
15
+ | 5. [Using Reservoir Design Tokens in Javascript](#using-reservoir-design-tokens-in-javascript) |
16
+ | 6. [Reservoir Design Token Categories](#reservoir-design-token-categories) |
18
17
 
19
18
  ## What are Design Tokens?
20
19
 
21
- Design tokens are the style values that define a design system. These values can include, but may not be limited to, spacing, color, typography, breakpoints and object styles. Ultimately, these values are used to construct and maintain the components that make up our system.
20
+ Design tokens are the style values that define a design system. These values
21
+ can include, but may not be limited to, spacing, color, typography, breakpoints
22
+ and object styles. Ultimately, these values are used to construct and maintain
23
+ the components that make up our system.
22
24
 
23
25
  ## Why Use Design Tokens?
24
26
 
25
- _"With design tokens, you can capture low-level values and then use them to create the styles for your product or app. You can maintain a scalable and consistent visual system for UI development."_ – Jina Bolton, Lead Designer for the Salesforce Design System
27
+ _"With design tokens, you can capture low-level values and then use them to
28
+ create the styles for your product or app. You can maintain a scalable and
29
+ consistent visual system for UI development."_ - Jina Bolton, Lead Designer
30
+ for the Salesforce Design System
26
31
 
27
- Design tokens are a single source of truth when it comes to styles. They allow an organization to more easily build multiple applications – web and/or native – that feel and look the same without slowing down the development team.
32
+ Design tokens are a single source of truth when it comes to styles. They allow
33
+ an organization to more easily build multiple applications - web and/or native -
34
+ that feel and look the same without slowing down the development team.
28
35
 
29
- ## How to Use the NYPL Design Tokens
36
+ ## How to Use the Reservoir Design Tokens
30
37
 
31
- The NYPL design tokens are built into the NYPL Design System (the DS) and are offered in two formats for consumption: CSS variables and javascript data objects. To access either of these formats, the DS `v0.25.9` or higher needs to be properly installed in a consuming React application.
38
+ The NYPL design tokens are built into the Reservoir Design System (DS) and are
39
+ offered in two formats for consumption: CSS variables and javascript data
40
+ objects. To access either of these formats, the DS `v0.25.9` or higher needs
41
+ to be properly installed in a consuming React application.
32
42
 
33
- ## Using NYPL Design Tokens in CSS
43
+ ## Using Reservoir Design Tokens in CSS
34
44
 
35
- If your app uses CSS or SCSS to handle styles, the DS creates standard CSS custom properties (e.g. variables) for consumption in your stylesheets. If the DS is properly installed, the CSS custom properties will be available for you to use. Nothing more needs to be done to your app.
45
+ If your app uses CSS or SCSS to handle styles, the DS creates standard CSS
46
+ custom properties (e.g. variables) for consumption in your stylesheets. If the
47
+ DS is properly installed, the CSS custom properties will be available for you
48
+ to use. Nothing more needs to be done to your app.
36
49
 
37
- To assist with CSS scope isolation, all of the CSS custom properties created by the DS are prefixed with "nypl." Please see the examples below.
50
+ To assist with CSS scope isolation, all of the CSS custom properties created
51
+ by the DS are prefixed with "nypl." Please see the examples below.
38
52
 
39
53
  ```css
40
54
  --nypl-colors-brand-primary
@@ -50,7 +64,8 @@ To assist with CSS scope isolation, all of the CSS custom properties created by
50
64
  --nypl-space-l
51
65
  ```
52
66
 
53
- The CSS custom properties are defined on the :root pseudo-class and should be implemented using standard CSS custom properties conventions.
67
+ The CSS custom properties are defined on the :root pseudo-class and should be
68
+ implemented using standard CSS custom properties conventions.
54
69
 
55
70
  ```css
56
71
  /* Property Declaration in the DS */
@@ -64,18 +79,25 @@ The CSS custom properties are defined on the :root pseudo-class and should be im
64
79
  }
65
80
  ```
66
81
 
67
- ## Using NYPL Design Tokens in Javascript
82
+ ## Using Reservoir Design Tokens in Javascript
68
83
 
69
- If you would like to use CSS-in-JS styles in your React components, the `useNYPLTheme` hook will provide you with NYPL design token values. The hook depends on the `DSProvider` component and will not work properly outside of the `DSProvider` wrapper component.
84
+ If you would like to use CSS-in-JS styles in your React components, the
85
+ `useNYPLTheme` hook will provide you with Reservoir design token values. The hook
86
+ depends on the `DSProvider` component and will not work properly outside of
87
+ the `DSProvider` wrapper component.
70
88
 
71
- After importing and implementing the `DSProvider` wrapper component, as explained in the `DSProvider` section of the [DS Chakra UI](?path=/story/chakra-ui--page#dsprovider) document, your children components can use this hook function.
89
+ After importing and implementing the `DSProvider` wrapper component, as
90
+ explained in the `DSProvider` section of the [DS Chakra UI](?path=/story/chakra-ui--page#dsprovider)
91
+ document, your children components can use this hook function.
72
92
 
73
93
  ```tsx
74
94
  import { useNYPLTheme } from "@nypl/design-system-react-components";
75
95
  const theme = useNYPLTheme();
76
96
  ```
77
97
 
78
- The theme variable will be a javascript object containing the NYPL design token style values. This will allow you to use design token values in your components through CSS-in-JS.
98
+ The theme variable will be a javascript object containing the NYPL design
99
+ token style values. This will allow you to use design token values in your
100
+ components through CSS-in-JS.
79
101
 
80
102
  ```tsx
81
103
  // theme
@@ -97,9 +119,16 @@ The theme variable will be a javascript object containing the NYPL design token
97
119
 
98
120
  #### Using in DS Components
99
121
 
100
- The general rule of thumb is that DS components and the available variants should be used with the styles and variants as they are shown in Storybook, but there may be rare times when a component does require a modification. That said, if a DS component does need an updated style, first contact the Design System and UX teams about this update.
122
+ The general rule of thumb is that DS components and the available variants
123
+ should be used with the styles and variants as they are shown in Storybook,
124
+ but there may be rare times when a component does require a modification.
125
+ That said, if a DS component does need an updated style, first contact the
126
+ Design System and UX teams about this update.
101
127
 
102
- If you receive approval to make a change in a consuming app, then you can add styles directly to the `additionalStyles` prop. For example, if the `Heading` component needs to render text in NYPL's "success primary" green color and add a bold font weight, then you can do the following:
128
+ If you receive approval to make a change in a consuming app, then you can add
129
+ styles directly to the `additionalStyles` prop. For example, if the `Heading`
130
+ component needs to render text in Reservoir's "success primary" green color and add
131
+ a bold font weight, then you can do the following:
103
132
 
104
133
  ```tsx
105
134
  const theme = useNYPLTheme();
@@ -145,7 +174,7 @@ const CustomButton = styled.button`
145
174
  `;
146
175
  ```
147
176
 
148
- ## NYPL Design Token Categories
177
+ ## Reservoir Design Token Categories
149
178
 
150
179
  The DS design tokens are broken into the following categories:
151
180
 
@@ -162,4 +191,5 @@ The DS design tokens are broken into the following categories:
162
191
  - font sizes
163
192
  - font weights
164
193
 
165
- For details related to a specific category, please refer to the corresponding section in the Style Guide available in the DS Storybook.
194
+ For details related to a specific category, please refer to the corresponding
195
+ section in the Style Guide available in the DS Storybook.
@@ -1,5 +1,4 @@
1
1
  import { Meta } from "@storybook/addon-docs";
2
- import { withDesign } from "storybook-addon-designs";
3
2
 
4
3
  import Card from "../Card/Card";
5
4
  import List from "../List/List";
@@ -20,46 +19,62 @@ import { getCategory } from "../../utils/componentCategories";
20
19
 
21
20
  ## General Information
22
21
 
23
- Use the NYPL Design System [Form](https://nypl.github.io/nypl-design-system/storybook-static/?path=/story/form-elements-form--form) component to control the placement and spacing for standard HTML forms.
22
+ Use the [Form](https://nypl.github.io/nypl-design-system/storybook-static/?path=/story/form-elements-form--form) component to control the placement and spacing for standard HTML forms.
24
23
 
25
24
  ## Form Layout
26
25
 
27
- The `Form` component offers two child-components to assist with layout: `FormRow` and `FormField`.
26
+ The `Form` component offers two child-components to assist with layout:
27
+ `FormRow` and `FormField`.
28
28
 
29
- The `FormField` component is used as a parent for all input components from the NYPL Design System (`Button`, `Select`, `TextInput`, etc.). When using the `Form` is it is necessary to wrap each individual form input component within a `FormField` component to ensure proper spacing and responsiveness.
29
+ The `FormField` component is used as a parent for all input components from
30
+ the Reservoir Design System (DS) (`Button`, `Select`, `TextInput`, etc.). When using the
31
+ `Form` is it is necessary to wrap each individual form input component within
32
+ a `FormField` component to ensure proper spacing and responsiveness.
30
33
 
31
- The `FormRow` component is used as a parent of multiple `FormField` components when you need to render more than one input component in a horizontal row.
34
+ The `FormRow` component is used as a parent of multiple `FormField` components
35
+ when you need to render more than one input component in a horizontal row.
32
36
 
33
- The recommended layout and spacing within individual form input components is built into the components. Consuming apps should rely on the components to handle NYPL best practices for layout and responsiveness.
37
+ The recommended layout and spacing within individual form input components is
38
+ built into the components. Consuming apps should rely on the components to
39
+ handle NYPL best practices for layout and responsiveness.
34
40
 
35
41
  ## Form Input Components
36
42
 
37
- The list of form input fields available in the DS includes, but is not limited to, the following:
43
+ The list of form input fields available in the Reservoir Design System (DS)
44
+ includes, but is not limited to, the following:
38
45
 
39
46
  - Button
40
47
  - Checkbox
41
48
  - CheckboxGroup
42
49
  - DatePicker
43
50
  - Dropdown \*\*\*
51
+ - Fieldset
44
52
  - FileUploader \*\*\*
53
+ - Form
45
54
  - Label
46
55
  - Radio
47
56
  - RadioGroup
48
57
  - SearchBar
49
58
  - Select
50
- - Slider \*\*\*
59
+ - Slider
51
60
  - TextInput (text, tel, url, number, password, textarea)
52
- - Toggle \*\*\*
61
+ - Toggle
53
62
 
54
63
  \*\*\* currently under development
55
64
 
56
65
  ## Input Labelling
57
66
 
58
- Most form components in the NYPL Design System will have the option to show a label, basic helper text and error text.
67
+ Most form components in the DS will have the option to show a
68
+ label, basic helper text and error text.
59
69
 
60
- For accessibility compliance, a text value for the label is always required. If necessary, the label can be hidden from the screen. In cases where the label is hidden, appropriate ARIA tags will be added to the form input component.
70
+ For accessibility compliance, a text value for the label is always required. If
71
+ necessary, the label can be hidden from the screen. In cases where the label is
72
+ hidden, appropriate ARIA tags will be added to the form input component.
61
73
 
62
- When the label is visible, `CheckboxGroup`, `DatePicker`, `FileUploader`, `RadioGroup`, `Select`, `Slider` and `TextInput` will show the label at the top of the rendered component. While `Checkbox`, `Radio` and `Toggle` will show the label to the right of the input field.
74
+ When the label is visible, `CheckboxGroup`, `DatePicker`, `FileUploader`,
75
+ `RadioGroup`, `Select`, `Slider` and `TextInput` will show the label at the top
76
+ of the rendered component. While `Checkbox`, `Radio` and `Toggle` will show the
77
+ label to the right of the input field.
63
78
 
64
79
  The helper and error text will always be rendered below the input field.
65
80
 
@@ -1,22 +1,12 @@
1
1
  import { Stack } from "@chakra-ui/react";
2
2
  import { Canvas, Meta } from "@storybook/addon-docs";
3
- import { withDesign } from "storybook-addon-designs";
4
3
 
5
4
  import Icon from "../Icons/Icon";
6
5
  import { IconColors, IconSizes, IconNames } from "../Icons/IconTypes";
7
6
  import { getCategory } from "../../utils/componentCategories";
8
7
  import DSProvider from "../../theme/provider";
9
8
 
10
- <Meta
11
- title={getCategory("Iconography")}
12
- decorators={[withDesign]}
13
- parameters={{
14
- design: {
15
- type: "figma",
16
- url: "https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Master?node-id=10975%3A16",
17
- },
18
- }}
19
- />
9
+ <Meta title={getCategory("Iconography")} />
20
10
 
21
11
  # Iconography
22
12
 
@@ -31,7 +21,7 @@ import DSProvider from "../../theme/provider";
31
21
 
32
22
  ## General Information
33
23
 
34
- Use the NYPL Design System [Icon](https://nypl.github.io/nypl-design-system/storybook-static/?path=/docs/icon--control-props)
24
+ Use the Reservoir Design System (DS) [Icon](https://nypl.github.io/nypl-design-system/storybook-static/?path=/docs/icon--control-props)
35
25
  component to render and control icons as `<svg>` elements within consuming apps.
36
26
 
37
27
  The DS utilizes the `Filled` icons available in the [Material UI Design System](https://material-ui.com/components/material-icons/).