@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
package/CHANGELOG.md CHANGED
@@ -8,6 +8,60 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
8
8
 
9
9
  ## Prerelease
10
10
 
11
+ ## 1.0.0 (May 12, 2022)
12
+
13
+ This is the first stable release of the NYPL Reservoir Design System! We've been looking forward to this moment for over two years.
14
+
15
+ ### Updates
16
+
17
+ - Updates all links throughout the documentation to point to the new production URLs.
18
+
19
+ ## 0.28.0 (May 9, 2022)
20
+
21
+ ### Adds
22
+
23
+ - Adds `max`, `maxLength`, `min`, and `onClick` props to the `TextInput` component.
24
+ - Adds the `SkipNavigation` component and adds this component inside the `TemplateAppContainer` component. The `SkipNavigation` component renders accessible links to the main content of a page and accessibility information on NYPL.org.
25
+ - Adds the `ButtonGroup` component for `Button` layout.
26
+
27
+ ### Updates
28
+
29
+ - Updates how styles are passed down to internal components in `Card`, `Checkbox`, `CheckboxGroup`, `ComponentWrapper`, `DatePicker`, `Hero`, `Notification`, `Pagination`, `Radio`, `RadioGroup`, `SearchBar`, and `Slider`. This is based on removing the `additionalStyles` prop and passing down styles to the `__css` prop.
30
+ - Updates how the `id` is passed in the `DatePicker`'s custom `TextInput` component.
31
+ - Updates how some prop values are passed. Instead of using a Typescript enum object, a Typescript type with the string literal values is used. This still restricts the accepted values for certain props. The enum to string literal type conversion includes the following variables: `AccordionType`, `BreadcrumbsTypes`, `ButtonTypes`, `DatePickerTypes`, `FormGaps` (deleted), `GridGaps`, `HeadingSizes`, `HeadingLevels`, `HeroTypes`, `IconAlign`, `IconTypes`, `IconRotationTypes`, `IconColors`, `IconSizes`, `IconNames`, `LinkTypes`, `ListTypes`, `LogoColors`, `LogoSizes`, `LogoNames`, `NotificationTypes`, `SelectTypes`, `LabelPositions`, `SkeletonLoaderImageRatios`, `StatusBadgeTypes`, `StructuredContentImagePosition`, `TextSizes`, `TextInputTypes`, `TextInputFormats`, `TextInputVariants`, `ToggleSizes`, `VideoPlayerTypes`, `VideoPlayerAspectRatios`, and `LayoutTypes`.
32
+ - Updates the spacing for caption and credit text from `margin-bottom` to `margin-top` in `Image` component
33
+ - Updates how the `DatePicker` and `Slider` components internally use `TextInput`.
34
+ - Updates how the `Pagination` component internally uses `Link`.
35
+ - Updates how the `Tabs` component internally uses `Button`.
36
+ - Updates how images are passed to the `Hero` component. Instead of `imageAlt` and `imageSrc` props, now an object must be passed to the `imageProps` prop.
37
+ - Updates the values for the `name` prop for the `Icon` and `Logo` components.
38
+ - Updates the `Table` component to allow JSX elements to be rendered in the data cells.
39
+
40
+ ### Removals
41
+
42
+ - Removes the `additionalStyles` attributes from the `Breadcrumbs`, `Button`, `Heading`, `HelperErrorText`, `Icon`, `Link`, `List`, `Logo`, `Select`, `TextInput`, and `Toggle` components.
43
+ - Removes `getVariant` and `getStorybookEnumValues` helper functions.
44
+ - Removes all Typescript enum objects in favor of string literal types.
45
+ - Remove the bottom margin attribute that is applied to the parent element for the `Select` component.
46
+ - Removes the `attributes` prop from: `Button`, `Link`, and `TextInput` components.
47
+
48
+ ## 0.27.0 (April 27, 2022)
49
+
50
+ ### Adds
51
+
52
+ - Adds two patterns for rendering the updated `Modal` component. This is still an ongoing work-in-progress as the `Modal` gets finalized but it is now using Chakra under-the-hood.
53
+ - Adds `@chakra-ui/storybook-addon` so stories automatically pick up the Chakra-based NYPL theme.
54
+
55
+ ### Updates
56
+
57
+ - Updates React and React DOM to version 17.
58
+ - Updates Chakra packages `@chakra-ui/react` and `@chakra-ui/system`.
59
+ - Updates the `HelperErrorText` styling to correctly display when used with a `Select` element with a `labelPosition` of inline.
60
+
61
+ ### Removals
62
+
63
+ - Removes the following packages: `@storybook/addon-queryparams` and `react-router-dom`.
64
+
11
65
  ## 0.26.1 (April 22, 2022)
12
66
 
13
67
  ### Updates
package/README.md CHANGED
@@ -10,7 +10,7 @@ _Note: This library is still in beta. Until we release the stable `1.0.0` versio
10
10
 
11
11
  Storybook documentation
12
12
 
13
- - [Production - deployed to Github Pages](https://nypl.github.io/nypl-design-system/storybook-static/?path=/story/introduction--page)
13
+ - [Production - deployed to Github Pages](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/story/welcome--page)
14
14
  - [Development - deployed to Tugboat QA](https://development-6y1v6na1ceqnmojvc5akrm5ewys3cshs.tugboat.qa/?path=/story/introduction--page)
15
15
 
16
16
  | Table of Contents | |
@@ -194,7 +194,7 @@ The list of re-exported Chakra components can be found in the main [index.ts](/s
194
194
  Find more information about the Design System's internal use of Chakra to create and refactor components in the Storybook documentation page. The following two links have the same information but in different formats for your reading preference:
195
195
 
196
196
  - [MDX format](/src/docs/Chakra.stories.mdx)
197
- - [Storybook page](https://nypl.github.io/nypl-design-system/storybook-static/?path=/story/chakra-ui--page)
197
+ - [Storybook page](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/story/chakra-ui--page)
198
198
 
199
199
  Chakra was integrated into the Design System in version `0.25.0`. For those looking to update to a version greater than or equal `0.25.0`, check out our [Chakra Migration Guide](/CHAKRA_MIGRATION_GUIDE.md).
200
200
 
@@ -216,7 +216,7 @@ You can check out a working Codepen with unpkg [here](https://codepen.io/edwingu
216
216
 
217
217
  ## Storybook
218
218
 
219
- The Reservoir Design System leverages Storybook to document all the React components and style guidelines. The Storybook documentation can be found [here](https://nypl.github.io/nypl-design-system/storybook-static/?path=/story/introduction--page). For your convenience, the Reservoir Design System components have been organized into logical categories based on both form and function. Please refer to the COMPONENTS section in the Storybook sidebar.
219
+ The Reservoir Design System leverages Storybook to document all the React components and style guidelines. The Storybook documentation can be found [here](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/story/welcome--page). For your convenience, the Reservoir Design System components have been organized into logical categories based on both form and function. Please refer to the COMPONENTS section in the Storybook sidebar.
220
220
 
221
221
  ### Documentation Instances
222
222
 
@@ -224,7 +224,7 @@ There are currently two main instances of the Reservoir Design System Storybook
224
224
 
225
225
  **Production**
226
226
 
227
- The production Storybook documentation is deployed to [Github Pages](https://nypl.github.io/nypl-design-system/storybook-static/?path=/story/introduction--page). This is the main instance we use to share the latest stable release of the Reservoir Design System. This documentation site is deployed through [Github Actions](/.github/workflows/gh-pages.yml) only on merges to the `release` branch.
227
+ The production Storybook documentation is deployed to [Github Pages](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/story/welcome--page). This is the main instance we use to share the latest stable release of the Reservoir Design System. This documentation site is deployed through [Github Actions](/.github/workflows/gh-pages.yml) only on merges to the `release` branch.
228
228
 
229
229
  As of July, 2021, the Github Pages production site gets deployed every two weeks on the same schedule as npm releases.
230
230
 
@@ -261,13 +261,13 @@ To help consuming application developers understand which version of the DS is r
261
261
 
262
262
  ### Static Build
263
263
 
264
- There should be no need to run the static Storybook instance while actively developing -- it's used exclusively for building out the `gh-pages` environment and deploying it to [Github Pages](https://nypl.github.io/nypl-design-system/storybook-static/?path=/story/introduction--page). In the event that you do run the static Storybook npm script, run:
264
+ There should be no need to run the static Storybook instance while actively developing -- it's used exclusively for building out the `gh-pages` environment and deploying it to [Github Pages](https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/story/welcome--page). In the event that you do run the static Storybook npm script, run:
265
265
 
266
266
  ```sh
267
- $ npm run build-storybook
267
+ $ npm run build-storybook:v1
268
268
  ```
269
269
 
270
- You can then view `/storybook-static/index.html` in your browser. _Make sure not to commit this directory_.
270
+ You can then view `/reservoir/v1/index.html` in your browser. _Make sure not to commit this directory_.
271
271
 
272
272
  ## Typescript Usage
273
273
 
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { AccordionTypes } from "./AccordionTypes";
2
+ export declare type AccordionTypes = "default" | "warning" | "error";
3
3
  export interface AccordionDataProps {
4
4
  accordionType?: AccordionTypes;
5
5
  label: string;
@@ -1,14 +1,10 @@
1
1
  import * as React from "react";
2
- import { BreadcrumbsTypes } from "./BreadcrumbsTypes";
2
+ export declare type BreadcrumbsTypes = "blogs" | "booksAndMore" | "education" | "locations" | "research" | "whatsOn";
3
3
  export interface BreadcrumbsDataProps {
4
4
  url: string;
5
5
  text: string | React.ReactNode;
6
6
  }
7
7
  export interface BreadcrumbProps {
8
- /** Optionally pass in additional Chakra-based styles. */
9
- additionalStyles?: {
10
- [key: string]: any;
11
- };
12
8
  /** Breadcrumb links as an array */
13
9
  breadcrumbsData: BreadcrumbsDataProps[];
14
10
  /** Used to control how the `Hero` component will be rendered. */
@@ -1,16 +1,8 @@
1
1
  import * as React from "react";
2
- import { ButtonTypes } from "./ButtonTypes";
3
2
  export declare type ButtonElementType = "submit" | "button" | "reset";
3
+ export declare type ButtonTypes = "primary" | "secondary" | "callout" | "pill" | "link" | "noBrand";
4
4
  interface ButtonProps {
5
- /** Optionally pass in additional Chakra-based styles. */
6
- additionalStyles?: {
7
- [key: string]: any;
8
- };
9
- /** Additional attributes passed to the button. */
10
- attributes?: {
11
- [key: string]: any;
12
- };
13
- /** The kind of button assigned through the `ButtonTypes` enum. */
5
+ /** The button variation to render based on the `ButtonTypes` type.*/
14
6
  buttonType?: ButtonTypes;
15
7
  /** Additional className to use. */
16
8
  className?: string;
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ import { LayoutTypes } from "../../helpers/types";
3
+ export declare type ButtonGroupWidths = "default" | "full";
4
+ interface ButtonGroupProps {
5
+ /** Sets the width to "default" (for "fit-content") or "full". */
6
+ buttonWidth?: ButtonGroupWidths;
7
+ /** Additional className to use. */
8
+ className?: string;
9
+ /** ID that other components can cross reference for accessibility purposes. */
10
+ id?: string;
11
+ /** Set's the disabled state to all the internal `Button` components. */
12
+ isDisabled?: boolean;
13
+ /** Renders the layout of `Button` components in a row or column. */
14
+ layout?: LayoutTypes;
15
+ }
16
+ /**
17
+ * A simple wrapper to group `Button` components together. The layout can be set
18
+ * to row or column and the width of internal `Button` components can be set to
19
+ * the parent's full width or the `Button`'s content width
20
+ */
21
+ export declare const ButtonGroup: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<ButtonGroupProps>) => JSX.Element, {}>;
22
+ export default ButtonGroup;
@@ -1,11 +1,11 @@
1
1
  import * as React from "react";
2
- import { LayoutTypes } from "../../helpers/enums";
2
+ import { LayoutTypes } from "../../helpers/types";
3
3
  import { ComponentImageProps } from "../Image/Image";
4
4
  interface CardBaseProps {
5
5
  /** Optional value to control the alignment of the text and elements. */
6
6
  isCentered?: boolean;
7
7
  /** Optional value to render the layout in a row or column.
8
- * Default is `LayoutTypes.Column`. */
8
+ * Default is `"column"`. */
9
9
  layout?: LayoutTypes;
10
10
  }
11
11
  interface CardLinkBoxProps {
@@ -1,6 +1,15 @@
1
1
  import * as React from "react";
2
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
- export interface CheckboxProps {
3
+ interface CheckboxIconProps {
4
+ /** When using the Checkbox as a "controlled" form element, you can specify
5
+ * the Checkbox's checked state using this prop.
6
+ * Learn more about controlled and uncontrolled form fields:
7
+ * https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */
8
+ isChecked?: boolean;
9
+ /** Adds the indeterminate state to the `Checkbox`. */
10
+ isIndeterminate?: boolean;
11
+ }
12
+ export interface CheckboxProps extends CheckboxIconProps {
4
13
  /** className you can add in addition to 'input' */
5
14
  className?: string;
6
15
  /** Optional string to populate the HelperErrorText for standard state */
@@ -10,16 +19,9 @@ export interface CheckboxProps {
10
19
  /** Optional string to populate the HelperErrorText for the error state
11
20
  * when `isInvalid` is true. */
12
21
  invalidText?: HelperErrorTextType;
13
- /** When using the Checkbox as a "controlled" form element, you can specify
14
- * the Checkbox's checked state using this prop.
15
- * Learn more about controlled and uncontrolled form fields:
16
- * https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */
17
- isChecked?: boolean;
18
22
  /** Adds the 'disabled' and `aria-disabled` attributes to the input when true.
19
23
  * This also makes the text italic and color scheme gray. */
20
24
  isDisabled?: boolean;
21
- /** Adds the indeterminate state to the `Checkbox`. */
22
- isIndeterminate?: boolean;
23
25
  /** Adds the 'aria-invalid' attribute to the input when true. This also makes
24
26
  * the color theme "NYPL error" red for the button and text. */
25
27
  isInvalid?: boolean;
@@ -1,6 +1,6 @@
1
1
  import * as React from "react";
2
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
- import { LayoutTypes } from "../../helpers/enums";
3
+ import { LayoutTypes } from "../../helpers/types";
4
4
  export interface CheckboxGroupProps {
5
5
  /** Any child node passed to the component. */
6
6
  children: React.ReactNode;
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
- import { DatePickerTypes } from "./DatePickerTypes";
3
2
  import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
4
3
  import { TextInputRefType } from "../TextInput/TextInput";
4
+ export declare type DatePickerTypes = "full" | "month" | "year";
5
5
  export interface FullDateType {
6
6
  /** Date object that gets returned for the onChange
7
7
  * function only for date ranges. */
@@ -1,12 +1,12 @@
1
1
  import * as React from "react";
2
- import { FormGaps } from "./FormTypes";
2
+ import { GridGaps } from "../Grid/SimpleGrid";
3
3
  interface FormBaseProps {
4
4
  /** className to be applied to FormRow, FormField, and Form */
5
5
  className?: string;
6
6
  /** Optional spacing size; if omitted, the default `large` (2rem / 32px)
7
7
  * spacing will be used; ```IMPORTANT: for general form layout, this prop
8
8
  * should not be used``` */
9
- gap?: FormGaps;
9
+ gap?: GridGaps;
10
10
  /** ID that other components can cross reference (internal use) */
11
11
  id: string;
12
12
  }
@@ -1,11 +1,14 @@
1
1
  import * as React from "react";
2
- import { GridGaps } from "./GridTypes";
2
+ export declare type GridGaps = "grid.xxs" | "grid.xs" | "grid.s" | "grid.m" | "grid.l" | "grid.xl" | "grid.xxl";
3
3
  export interface SimpleGridProps {
4
4
  /** Additional class name. */
5
5
  className?: string;
6
- /** Optional numeric value to override the default column count; the default column count is 3 */
6
+ /** Optional numeric value to override the default column count; the default
7
+ * column count is 3. */
7
8
  columns?: number;
8
- /** Optional gap size; if omitted, the default `large` (2rem / 32px) spacing will be used; ```IMPORTANT: for standard grid layouts, this prop should not be used``` */
9
+ /** Optional gap size; if omitted, the default `large` (2rem / 32px) spacing
10
+ * will be used; `IMPORTANT: for standard grid layouts, this prop should
11
+ * not be used.` */
9
12
  gap?: GridGaps;
10
13
  /** ID that other components can cross reference for accessibility purposes */
11
14
  id?: string;
@@ -1,10 +1,7 @@
1
1
  import * as React from "react";
2
- import { HeadingSizes, HeadingLevels } from "./HeadingTypes";
2
+ export declare type HeadingSizes = "primary" | "secondary" | "tertiary" | "callout";
3
+ export declare type HeadingLevels = "one" | "two" | "three" | "four" | "five" | "six";
3
4
  export interface HeadingProps {
4
- /** Optionally pass in additional Chakra-based styles. */
5
- additionalStyles?: {
6
- [key: string]: any;
7
- };
8
5
  /** Optional className that appears in addition to `heading` */
9
6
  className?: string;
10
7
  /** Optional ID that other components can cross reference for accessibility purposes */
@@ -2,10 +2,6 @@
2
2
  export declare type AriaLiveValues = "assertive" | "off" | "polite";
3
3
  export declare type HelperErrorTextType = string | JSX.Element;
4
4
  interface HelperErrorTextProps {
5
- /** Optionally pass in additional Chakra-based styles. */
6
- additionalStyles?: {
7
- [key: string]: any;
8
- };
9
5
  /** Aria attribute. When true, assistive technologies will
10
6
  * read the entire DOM element. When false, only changes (additionals or
11
7
  * removals) will be read. True by default. */
@@ -29,5 +25,5 @@ interface HelperErrorTextProps {
29
25
  /**
30
26
  * Helper or error text for forms components.
31
27
  */
32
- export declare const HelperErrorText: import("@chakra-ui/react").ChakraComponent<({ additionalStyles, ariaAtomic, ariaLive, className, id, isInvalid, text, ...rest }: HelperErrorTextProps) => JSX.Element, {}>;
28
+ export declare const HelperErrorText: import("@chakra-ui/react").ChakraComponent<({ ariaAtomic, ariaLive, className, id, isInvalid, text, ...rest }: HelperErrorTextProps) => JSX.Element, {}>;
33
29
  export default HelperErrorText;
@@ -1,5 +1,9 @@
1
1
  import * as React from "react";
2
- import { HeroTypes } from "./HeroTypes";
2
+ import { ComponentImageProps } from "../Image/Image";
3
+ export declare type HeroTypes = "primary" | "secondary" | "secondaryBooksAndMore" | "secondaryLocations" | "secondaryResearch" | "secondaryWhatsOn" | "tertiary" | "campaign" | "fiftyFifty";
4
+ export declare const heroSecondaryTypes: string[];
5
+ export interface HeroImageProps extends Pick<ComponentImageProps, "alt" | "src"> {
6
+ }
3
7
  export interface HeroProps {
4
8
  /** Optional hex color value used to override the default background
5
9
  * color for a given `Hero` variation.
@@ -17,14 +21,14 @@ export interface HeroProps {
17
21
  heading?: JSX.Element;
18
22
  /** Used to control how the `Hero` component will be rendered. */
19
23
  heroType?: HeroTypes;
20
- /** Text description of the image; to follow best practices for accessibility,
21
- * this prop should not be left blank if `imageSrc` is passed. */
22
- imageAlt?: string;
23
- /** Optional `imageSrc` used for SECONDARY, FIFTYFIFTY and CAMPAIGN
24
- * `Hero` types; Note: `imageSrc` can only be used in conjunction with
25
- * `backgroundImageSrc` for the CAMPAIGN `Hero` type.
26
- * Note: not all `Hero` variations utilize this prop. */
27
- imageSrc?: string;
24
+ /** Object used to create and render the `Image` component. Note that only
25
+ * `src` and `alt` are the available attributes to pass. If `imageProps.alt`
26
+ * is left blank, a warning will be logged to the console and will cause
27
+ * accessibility issues. For `imageProps.src`, it will only work for the
28
+ * "secondary", "fiftyFifty" and "campaign" `Hero` types; Note: `imageProps.src`
29
+ * can only be used in conjunction with `backgroundImageSrc` for the "campaign"
30
+ * `Hero` type. Note: not all `Hero` variations utilize this prop. */
31
+ imageProps?: HeroImageProps;
28
32
  /** Optional details area that contains location data.
29
33
  * Note: not all `Hero` variations utilize this prop. */
30
34
  locationDetails?: JSX.Element;
@@ -1,10 +1,11 @@
1
1
  import * as React from "react";
2
- import { IconAlign, IconColors, IconNames, IconRotationTypes, IconSizes, IconTypes } from "./IconTypes";
2
+ export declare type IconAlign = "left" | "right" | "none";
3
+ export declare type IconColors = "ui.black" | "ui.white" | "brand.primary" | "brand.secondary" | "section.blogs.primary" | "section.blogs.secondary" | "section.books-and-more.primary" | "section.books-and-more.secondary" | "section.education.primary" | "section.education.secondary" | "section.locations.primary" | "section.locations.secondary" | "section.research.primary" | "section.research.secondary" | "section.research-library.lpa" | "section.research-library.schomburg" | "section.research-library.schwartzman" | "section.whats-on.primary" | "section.whats-on.secondary";
4
+ export declare type IconNames = "accessibilityFull" | "accessibilityPartial" | "actionCheckCircle" | "actionHelpDefault" | "actionHelpOutline" | "actionLaunch" | "alertNotificationImportant" | "arrow" | "check" | "clock" | "close" | "download" | "errorFilled" | "errorOutline" | "fileTypeAudio" | "fileTypeDoc" | "fileTypeGenericDoc" | "fileTypeImage" | "fileTypePdf" | "fileTypeSpreadsheet" | "fileTypeVideo" | "headset" | "minus" | "plus" | "search" | "speakerNotes" | "utilityAccountFilled" | "utilityAccountUnfilled" | "utilityHamburger" | "utilitySearch";
5
+ export declare type IconRotationTypes = "rotate0" | "rotate90" | "rotate180" | "rotate270";
6
+ export declare type IconSizes = "default" | "small" | "medium" | "large" | "xlarge" | "xxlarge" | "xxxlarge";
7
+ export declare type IconTypes = "default" | "breadcrumbs";
3
8
  export interface IconProps {
4
- /** Optionally pass in additional Chakra-based styles. */
5
- additionalStyles?: {
6
- [key: string]: any;
7
- };
8
9
  /** Aligns the icon. */
9
10
  align?: IconAlign;
10
11
  /** Optional className that will be added to the parent element */
@@ -1,33 +1,33 @@
1
1
  declare const _default: {
2
- accessibility_full: string;
3
- accessibility_partial: string;
4
- action_check_circle: string;
5
- action_help_default: string;
6
- action_help_outline: string;
7
- action_launch: string;
8
- alert_notification_important: string;
2
+ accessibilityFull: string;
3
+ accessibilityPartial: string;
4
+ actionCheckCircle: string;
5
+ actionHelpDefault: string;
6
+ actionHelpOutline: string;
7
+ actionLaunch: string;
8
+ alertNotificationImportant: string;
9
9
  arrow: string;
10
10
  check: string;
11
11
  clock: string;
12
12
  close: string;
13
13
  download: string;
14
- error_filled: string;
15
- error_outline: string;
16
- file_type_audio: string;
17
- file_type_doc: string;
18
- file_type_generic_doc: string;
19
- file_type_image: string;
20
- file_type_pdf: string;
21
- file_type_spreadsheet: string;
22
- file_type_video: string;
14
+ errorFilled: string;
15
+ errorOutline: string;
16
+ fileTypeAudio: string;
17
+ fileTypeDoc: string;
18
+ fileTypeGenericDoc: string;
19
+ fileTypeImage: string;
20
+ fileTypePdf: string;
21
+ fileTypeSpreadsheet: string;
22
+ fileTypeVideo: string;
23
23
  headset: string;
24
24
  minus: string;
25
25
  plus: string;
26
26
  search: string;
27
- speaker_notes: string;
28
- utility_account_filled: string;
29
- utility_account_unfilled: string;
30
- utility_hamburger: string;
31
- utility_search: string;
27
+ speakerNotes: string;
28
+ utilityAccountFilled: string;
29
+ utilityAccountUnfilled: string;
30
+ utilityHamburger: string;
31
+ utilitySearch: string;
32
32
  };
33
33
  export default _default;
@@ -1,5 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { ImageRatios, ImageSizes, ImageTypes } from "./ImageTypes";
2
+ export declare type ImageRatios = "fourByThree" | "oneByTwo" | "original" | "sixteenByNine" | "square" | "threeByFour" | "threeByTwo" | "twoByOne";
3
+ export declare type ImageSizes = "default" | "xxsmall" | "xsmall" | "small" | "medium" | "large";
4
+ export declare type ImageTypes = "default" | "circle";
3
5
  export interface ComponentImageProps {
4
6
  /** String value used to populate the `alt` attribute of the internal `Image`
5
7
  * component's `img` element. @NOTE if an image is used, this value must be passed. */
@@ -14,7 +16,7 @@ export interface ComponentImageProps {
14
16
  /** Optional value to render as a credit for the internal `Image` component. */
15
17
  credit?: string;
16
18
  /** Optional value to control the size of the internal `Image` component.
17
- * Defaults to `ImageSizes.Medium`. */
19
+ * Defaults to `ImageSizes.Default`. */
18
20
  size?: ImageSizes;
19
21
  /** Optional value that contains the path to an image. If omitted, the internal
20
22
  * DS `Image` component will not render. */
@@ -27,7 +29,8 @@ interface ImageWrapperProps {
27
29
  };
28
30
  /** ClassName you can add in addition to 'image' */
29
31
  className?: string;
30
- /** Optional value to control the aspect ratio of the cartd image; default value is `square` */
32
+ /** Optional value to control the aspect ratio of the card image; default
33
+ * value is `"original"` */
31
34
  aspectRatio?: ImageRatios;
32
35
  /** Optional value to control the size of the image */
33
36
  size?: ImageSizes;
@@ -42,7 +45,7 @@ export interface ImageProps extends ImageWrapperProps {
42
45
  [key: string]: any;
43
46
  };
44
47
  /** Alternate text description of the image */
45
- alt: string;
48
+ alt?: string;
46
49
  /** Adding will wrap the image in a <figure> */
47
50
  caption?: string;
48
51
  /** Custom image component */
@@ -52,7 +55,7 @@ export interface ImageProps extends ImageWrapperProps {
52
55
  /** Optional value for the image type */
53
56
  imageType?: ImageTypes;
54
57
  /** The src attribute is required, and contains the path to the image you want to embed. */
55
- src: string;
58
+ src?: string;
56
59
  }
57
60
  export declare const Image: import("@chakra-ui/react").ChakraComponent<(props: ImageProps) => JSX.Element, {}>;
58
61
  export default Image;
@@ -1,14 +1,6 @@
1
1
  import * as React from "react";
2
- import { LinkTypes } from "./LinkTypes";
2
+ export declare type LinkTypes = "action" | "backwards" | "button" | "default" | "external" | "forwards";
3
3
  export interface LinkProps {
4
- /** Optionally pass in additional Chakra-based styles. */
5
- additionalStyles?: {
6
- [key: string]: any;
7
- };
8
- /** Additional attributes, such as `rel=nofollow`, to pass to the `<a>` tag. */
9
- attributes?: {
10
- [key: string]: any;
11
- };
12
4
  /** Any child node passed to the component. */
13
5
  children: React.ReactNode;
14
6
  /** Additional class name to render in the `Link` component. */
@@ -1,25 +1,21 @@
1
1
  import * as React from "react";
2
- import { ListTypes } from "./ListTypes";
2
+ export declare type ListTypes = "ol" | "ul" | "dl";
3
3
  interface DescriptionProps {
4
4
  term: string;
5
5
  description: string | JSX.Element;
6
6
  }
7
7
  export interface ListProps {
8
- /** Optionally pass in additional Chakra-based styles. */
9
- additionalStyles?: {
10
- [key: string]: any;
11
- };
12
8
  /** ClassName you can add in addition to 'list' */
13
9
  className?: string;
14
10
  /** ID that other components can cross reference for accessibility purposes */
15
11
  id?: string;
16
12
  /** Display the list in a row. */
17
13
  inline?: boolean;
18
- /** Data to render if children are not passed. For `ListTypes.Ordered` and
19
- * `ListTypes.Unordered` `List` types, the data structure is an array of
20
- * strings to renders as `li` items. For `ListTypes.Description` `List` types,
21
- * the data structure is an array of objects with `term` and `description`
22
- * properties to render `dt` and `dd` elements, respectively.
14
+ /** Data to render if children are not passed. For `listTypes` orderd `"ol"`
15
+ * and unordered `"ul"` `List` types, the data structure is an array of strings
16
+ * to renders as `li` items. For descroption `"dl"` `List` types, the data
17
+ * structure is an array of objects with `term` and `description` properties
18
+ * to render `dt` and `dd` elements, respectively.
23
19
  */
24
20
  listItems?: (string | JSX.Element | DescriptionProps)[];
25
21
  /** Remove list styling. */
@@ -27,7 +23,7 @@ export interface ListProps {
27
23
  /** An optional title that will appear over the list. This prop only applies
28
24
  * to Description Lists. */
29
25
  title?: string;
30
- /** The type of list: Ordered, Unordered, or Description. Unordered by default. */
26
+ /** The type of list: "ol", "ul", or "dl". "ul" by default. */
31
27
  type: ListTypes;
32
28
  }
33
29
  /**
@@ -1,10 +1,7 @@
1
1
  import * as React from "react";
2
- import { LogoNames, LogoSizes } from "./LogoTypes";
2
+ export declare type LogoNames = "bplBlack" | "bplWhite" | "cleverColor" | "cleverWhite" | "firstbookColor" | "firstbookColorNegative" | "lpaBlack" | "lpaColor" | "lpaWhite" | "mlnBlack" | "mlnWhite" | "nyplFullBlack" | "nyplFullWhite" | "nyplLionBlack" | "nyplLionWhite" | "openebooksColor" | "openebooksNegative" | "openebooksWithTextColor" | "openebooksWithTextNegative" | "qplAltBlack" | "qplAltWhite" | "qplBlack" | "qplColor" | "qplWhite" | "reservoirIconColor" | "reservoirVerticalColor" | "schomburgBlack" | "schomburgCircleBlack" | "schomburgCircleColor" | "schomburgCircleWhite" | "schomburgColor" | "schomburgWhite" | "simplyeBlack" | "simplyeWhite" | "simplyeColor" | "snflBlack" | "snflWhite" | "treasuresColor" | "treasuresColorNegative";
3
+ export declare type LogoSizes = "default" | "xxsmall" | "xsmall" | "small" | "medium" | "large";
3
4
  export interface LogoProps {
4
- /** Optionally pass in additional Chakra-based styles. */
5
- additionalStyles?: {
6
- [key: string]: any;
7
- };
8
5
  /** Optional className that will be added to the parent element */
9
6
  className?: string;
10
7
  /** Logos designated as decorative will be ignored by screenreaders. False