@nypl/design-system-react-components 0.25.13 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (299) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/README.md +10 -10
  3. package/dist/components/Accordion/Accordion.d.ts +1 -1
  4. package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  5. package/dist/components/Button/Button.d.ts +2 -2
  6. package/dist/components/Card/Card.d.ts +11 -9
  7. package/dist/components/Checkbox/Checkbox.d.ts +2 -2
  8. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +5 -4
  9. package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +1 -1
  10. package/dist/components/DatePicker/DatePicker.d.ts +5 -6
  11. package/dist/components/Fieldset/Fieldset.d.ts +5 -6
  12. package/dist/components/Form/Form.d.ts +6 -6
  13. package/dist/components/Grid/GridTypes.d.ts +7 -7
  14. package/dist/components/Grid/SimpleGrid.d.ts +1 -1
  15. package/dist/components/Heading/Heading.d.ts +1 -1
  16. package/dist/components/HelperErrorText/HelperErrorText.d.ts +9 -8
  17. package/dist/components/Hero/Hero.d.ts +2 -1
  18. package/dist/components/HorizontalRule/HorizontalRule.d.ts +2 -10
  19. package/dist/components/Icons/Icon.d.ts +2 -1
  20. package/dist/components/Image/Image.d.ts +2 -2
  21. package/dist/components/Label/Label.d.ts +7 -4
  22. package/dist/components/Link/Link.d.ts +1 -1
  23. package/dist/components/List/List.d.ts +11 -11
  24. package/dist/components/List/ListTypes.d.ts +1 -1
  25. package/dist/components/Logo/Logo.d.ts +2 -1
  26. package/dist/components/Logo/LogoSvgs.d.ts +2 -0
  27. package/dist/components/Logo/LogoTypes.d.ts +2 -0
  28. package/dist/components/Notification/Notification.d.ts +4 -4
  29. package/dist/components/Pagination/Pagination.d.ts +2 -2
  30. package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +3 -3
  31. package/dist/components/Radio/Radio.d.ts +4 -6
  32. package/dist/components/RadioGroup/RadioGroup.d.ts +12 -6
  33. package/dist/components/SearchBar/SearchBar.d.ts +4 -4
  34. package/dist/components/Select/Select.d.ts +10 -6
  35. package/dist/components/Select/SelectTypes.d.ts +4 -0
  36. package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +4 -3
  37. package/dist/components/Slider/Slider.d.ts +6 -4
  38. package/dist/components/StatusBadge/StatusBadge.d.ts +5 -1
  39. package/dist/components/StructuredContent/StructuredContent.d.ts +2 -2
  40. package/dist/components/Table/Table.d.ts +1 -1
  41. package/dist/components/Tabs/Tabs.d.ts +4 -3
  42. package/dist/components/Template/Template.d.ts +4 -3
  43. package/dist/components/Text/Text.d.ts +1 -1
  44. package/dist/components/TextInput/TextInput.d.ts +5 -5
  45. package/dist/components/Toggle/Toggle.d.ts +3 -4
  46. package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
  47. package/dist/design-system-react-components.cjs.development.js +1663 -1139
  48. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  49. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  50. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  51. package/dist/design-system-react-components.esm.js +1667 -1143
  52. package/dist/design-system-react-components.esm.js.map +1 -1
  53. package/dist/hooks/useCarouselStyles.d.ts +3 -2
  54. package/dist/hooks/useNYPLTheme.d.ts +12 -0
  55. package/dist/index.d.ts +4 -1
  56. package/dist/styles.css +1 -1
  57. package/dist/theme/components/button.d.ts +10 -2
  58. package/dist/theme/components/card.d.ts +42 -22
  59. package/dist/theme/components/checkbox.d.ts +5 -4
  60. package/dist/theme/components/checkboxGroup.d.ts +1 -1
  61. package/dist/theme/components/componentWrapper.d.ts +2 -2
  62. package/dist/theme/components/customTable.d.ts +84 -1
  63. package/dist/theme/components/fieldset.d.ts +4 -14
  64. package/dist/theme/components/global.d.ts +23 -17
  65. package/dist/theme/components/heading.d.ts +53 -0
  66. package/dist/theme/components/helperErrorText.d.ts +1 -0
  67. package/dist/theme/components/hero.d.ts +20 -14
  68. package/dist/theme/components/label.d.ts +9 -10
  69. package/dist/theme/components/list.d.ts +99 -9
  70. package/dist/theme/components/radio.d.ts +6 -4
  71. package/dist/theme/components/radioGroup.d.ts +1 -1
  72. package/dist/theme/components/select.d.ts +34 -5
  73. package/dist/theme/components/skeletonLoader.d.ts +2 -2
  74. package/dist/theme/components/slider.d.ts +6 -3
  75. package/dist/theme/components/structuredContent.d.ts +197 -0
  76. package/dist/theme/components/textInput.d.ts +18 -6
  77. package/dist/theme/components/toggle.d.ts +7 -4
  78. package/dist/theme/foundations/global.d.ts +2 -0
  79. package/dist/theme/foundations/radii.d.ts +1 -0
  80. package/dist/theme/foundations/spacing.d.ts +46 -43
  81. package/package.json +5 -6
  82. package/src/components/Accordion/Accordion.stories.mdx +9 -9
  83. package/src/components/Accordion/Accordion.test.tsx +21 -0
  84. package/src/components/Accordion/Accordion.tsx +13 -9
  85. package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +276 -27
  86. package/src/components/Autosuggest/Autosuggest.stories.mdx +4 -3
  87. package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +21 -5
  88. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +52 -31
  89. package/src/components/Breadcrumbs/Breadcrumbs.tsx +8 -7
  90. package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +211 -12
  91. package/src/components/Button/Button.stories.mdx +87 -23
  92. package/src/components/Button/Button.test.tsx +25 -0
  93. package/src/components/Button/Button.tsx +18 -7
  94. package/src/components/Button/__snapshots__/Button.test.tsx.snap +27 -7
  95. package/src/components/Card/Card.stories.mdx +287 -194
  96. package/src/components/Card/Card.test.tsx +102 -0
  97. package/src/components/Card/Card.tsx +73 -32
  98. package/src/components/Card/__snapshots__/Card.test.tsx.snap +195 -35
  99. package/src/components/Chakra/Grid.stories.mdx +4 -4
  100. package/src/components/Checkbox/Checkbox.stories.mdx +62 -10
  101. package/src/components/Checkbox/Checkbox.test.tsx +32 -9
  102. package/src/components/Checkbox/Checkbox.tsx +20 -15
  103. package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +134 -7
  104. package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +65 -17
  105. package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +137 -81
  106. package/src/components/CheckboxGroup/CheckboxGroup.tsx +31 -21
  107. package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +332 -97
  108. package/src/components/ComponentWrapper/ComponentWrapper.test.tsx +12 -0
  109. package/src/components/ComponentWrapper/ComponentWrapper.tsx +39 -41
  110. package/src/components/ComponentWrapper/__snapshots__/ComponentWrapper.test.tsx.snap +47 -34
  111. package/src/components/DatePicker/DatePicker.stories.mdx +63 -27
  112. package/src/components/DatePicker/DatePicker.test.tsx +89 -13
  113. package/src/components/DatePicker/DatePicker.tsx +62 -56
  114. package/src/components/DatePicker/_DatePicker.scss +71 -13
  115. package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +250 -206
  116. package/src/components/Fieldset/Fieldset.stories.mdx +33 -3
  117. package/src/components/Fieldset/Fieldset.test.tsx +58 -28
  118. package/src/components/Fieldset/Fieldset.tsx +35 -30
  119. package/src/components/Fieldset/__snapshots__/Fieldset.test.tsx.snap +40 -19
  120. package/src/components/Form/Form.stories.mdx +72 -39
  121. package/src/components/Form/Form.test.tsx +58 -15
  122. package/src/components/Form/Form.tsx +89 -67
  123. package/src/components/Form/__snapshots__/Form.test.tsx.snap +83 -5
  124. package/src/components/Grid/GridTypes.tsx +7 -7
  125. package/src/components/Grid/SimpleGrid.stories.mdx +34 -6
  126. package/src/components/Grid/SimpleGrid.test.tsx +9 -0
  127. package/src/components/Grid/SimpleGrid.tsx +29 -20
  128. package/src/components/Grid/__snapshots__/SimpleGrid.test.tsx.snap +16 -1
  129. package/src/components/Heading/Heading.stories.mdx +36 -3
  130. package/src/components/Heading/Heading.test.tsx +10 -0
  131. package/src/components/Heading/Heading.tsx +56 -50
  132. package/src/components/Heading/__snapshots__/Heading.test.tsx.snap +26 -7
  133. package/src/components/HelperErrorText/HelperErrorText.stories.mdx +64 -42
  134. package/src/components/HelperErrorText/HelperErrorText.test.tsx +15 -0
  135. package/src/components/HelperErrorText/HelperErrorText.tsx +40 -35
  136. package/src/components/HelperErrorText/__snapshots__/HelperErrorText.test.tsx.snap +35 -4
  137. package/src/components/Hero/Hero.stories.mdx +125 -95
  138. package/src/components/Hero/Hero.test.tsx +33 -0
  139. package/src/components/Hero/Hero.tsx +135 -126
  140. package/src/components/Hero/__snapshots__/Hero.test.tsx.snap +89 -17
  141. package/src/components/HorizontalRule/HorizontalRule.stories.mdx +26 -4
  142. package/src/components/HorizontalRule/HorizontalRule.test.tsx +9 -19
  143. package/src/components/HorizontalRule/HorizontalRule.tsx +9 -26
  144. package/src/components/HorizontalRule/__snapshots__/HorizontalRule.test.tsx.snap +18 -5
  145. package/src/components/Icons/Icon.stories.mdx +31 -6
  146. package/src/components/Icons/Icon.test.tsx +38 -0
  147. package/src/components/Icons/Icon.tsx +93 -76
  148. package/src/components/Icons/__snapshots__/Icon.test.tsx.snap +129 -0
  149. package/src/components/Image/Image.stories.mdx +29 -5
  150. package/src/components/Image/Image.test.tsx +8 -0
  151. package/src/components/Image/Image.tsx +38 -26
  152. package/src/components/Image/__snapshots__/Image.test.tsx.snap +24 -8
  153. package/src/components/Label/Label.stories.mdx +42 -20
  154. package/src/components/Label/Label.test.tsx +42 -17
  155. package/src/components/Label/Label.tsx +22 -13
  156. package/src/components/Label/__snapshots__/Label.test.tsx.snap +19 -15
  157. package/src/components/Link/Link.stories.mdx +25 -1
  158. package/src/components/Link/Link.test.tsx +21 -0
  159. package/src/components/Link/Link.tsx +8 -8
  160. package/src/components/Link/__snapshots__/Link.test.tsx.snap +37 -11
  161. package/src/components/List/List.stories.mdx +75 -40
  162. package/src/components/List/List.test.tsx +67 -19
  163. package/src/components/List/List.tsx +38 -25
  164. package/src/components/List/ListTypes.tsx +1 -1
  165. package/src/components/List/__snapshots__/List.test.tsx.snap +110 -8
  166. package/src/components/Logo/Logo.stories.mdx +30 -6
  167. package/src/components/Logo/Logo.test.tsx +17 -0
  168. package/src/components/Logo/Logo.tsx +18 -6
  169. package/src/components/Logo/LogoSvgs.tsx +4 -0
  170. package/src/components/Logo/LogoTypes.tsx +2 -0
  171. package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +73 -2
  172. package/src/components/Modal/Modal.stories.mdx +13 -0
  173. package/src/components/Notification/Notification.stories.mdx +25 -1
  174. package/src/components/Notification/Notification.test.tsx +23 -0
  175. package/src/components/Notification/Notification.tsx +46 -44
  176. package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +158 -29
  177. package/src/components/Pagination/Pagination.stories.mdx +24 -4
  178. package/src/components/Pagination/Pagination.test.tsx +25 -0
  179. package/src/components/Pagination/Pagination.tsx +6 -6
  180. package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +244 -27
  181. package/src/components/Placeholder/Placeholder.tsx +3 -1
  182. package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +76 -10
  183. package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +81 -11
  184. package/src/components/ProgressIndicator/ProgressIndicator.tsx +17 -9
  185. package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +101 -14
  186. package/src/components/Radio/Radio.stories.mdx +64 -12
  187. package/src/components/Radio/Radio.test.tsx +28 -8
  188. package/src/components/Radio/Radio.tsx +66 -63
  189. package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +103 -6
  190. package/src/components/RadioGroup/RadioGroup.stories.mdx +224 -89
  191. package/src/components/RadioGroup/RadioGroup.test.tsx +122 -62
  192. package/src/components/RadioGroup/RadioGroup.tsx +106 -100
  193. package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1236 -1020
  194. package/src/components/SearchBar/SearchBar.stories.mdx +101 -36
  195. package/src/components/SearchBar/{SearchBar.Test.tsx → SearchBar.test.tsx} +46 -4
  196. package/src/components/SearchBar/SearchBar.tsx +17 -8
  197. package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1039 -0
  198. package/src/components/Select/Select.stories.mdx +128 -49
  199. package/src/components/Select/Select.test.tsx +63 -16
  200. package/src/components/Select/Select.tsx +125 -92
  201. package/src/components/Select/SelectTypes.tsx +5 -0
  202. package/src/components/Select/__snapshots__/Select.test.tsx.snap +749 -409
  203. package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +42 -10
  204. package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +8 -0
  205. package/src/components/SkeletonLoader/SkeletonLoader.tsx +76 -72
  206. package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +169 -10
  207. package/src/components/Slider/Slider.stories.mdx +91 -42
  208. package/src/components/Slider/Slider.test.tsx +65 -17
  209. package/src/components/Slider/Slider.tsx +26 -19
  210. package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +403 -226
  211. package/src/components/StatusBadge/StatusBadge.stories.mdx +19 -1
  212. package/src/components/StatusBadge/StatusBadge.test.tsx +16 -0
  213. package/src/components/StatusBadge/StatusBadge.tsx +25 -20
  214. package/src/components/StatusBadge/__snapshots__/StatusBadge.test.tsx.snap +22 -3
  215. package/src/components/StructuredContent/StructuredContent.stories.mdx +131 -12
  216. package/src/components/StructuredContent/StructuredContent.test.tsx +34 -0
  217. package/src/components/StructuredContent/StructuredContent.tsx +80 -75
  218. package/src/components/StructuredContent/__snapshots__/StructuredContent.test.tsx.snap +102 -17
  219. package/src/components/StyleGuide/Bidirectionality.stories.mdx +5 -5
  220. package/src/components/StyleGuide/Breakpoints.stories.mdx +6 -6
  221. package/src/components/StyleGuide/Buttons.stories.mdx +2 -12
  222. package/src/components/StyleGuide/ColorCard.tsx +1 -1
  223. package/src/components/StyleGuide/Colors.stories.mdx +1 -2
  224. package/src/components/StyleGuide/DesignTokens.stories.mdx +56 -26
  225. package/src/components/StyleGuide/Forms.stories.mdx +27 -12
  226. package/src/components/StyleGuide/Iconography.stories.mdx +2 -12
  227. package/src/components/StyleGuide/Spacing.stories.mdx +80 -41
  228. package/src/components/StyleGuide/Typography.stories.mdx +30 -21
  229. package/src/components/Table/Table.stories.mdx +38 -11
  230. package/src/components/Table/Table.test.tsx +15 -0
  231. package/src/components/Table/Table.tsx +7 -7
  232. package/src/components/Table/__snapshots__/Table.test.tsx.snap +408 -5
  233. package/src/components/Tabs/Tabs.stories.mdx +52 -3
  234. package/src/components/Tabs/Tabs.test.tsx +16 -0
  235. package/src/components/Tabs/Tabs.tsx +10 -6
  236. package/src/components/Tabs/__snapshots__/Tabs.test.tsx.snap +394 -5
  237. package/src/components/Template/Template.stories.mdx +47 -43
  238. package/src/components/Template/Template.test.tsx +33 -0
  239. package/src/components/Template/Template.tsx +65 -60
  240. package/src/components/Template/__snapshots__/Template.test.tsx.snap +191 -20
  241. package/src/components/Text/Text.stories.mdx +20 -1
  242. package/src/components/Text/Text.test.tsx +12 -0
  243. package/src/components/Text/Text.tsx +6 -4
  244. package/src/components/Text/__snapshots__/Text.test.tsx.snap +21 -4
  245. package/src/components/TextInput/TextInput.stories.mdx +65 -19
  246. package/src/components/TextInput/TextInput.test.tsx +42 -28
  247. package/src/components/TextInput/TextInput.tsx +121 -113
  248. package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +96 -73
  249. package/src/components/Toggle/Toggle.stories.mdx +80 -22
  250. package/src/components/Toggle/Toggle.test.tsx +27 -9
  251. package/src/components/Toggle/Toggle.tsx +22 -18
  252. package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +128 -5
  253. package/src/components/VideoPlayer/VideoPlayer.stories.mdx +52 -4
  254. package/src/components/VideoPlayer/VideoPlayer.test.tsx +23 -0
  255. package/src/components/VideoPlayer/VideoPlayer.tsx +133 -126
  256. package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +81 -39
  257. package/src/docs/Chakra.stories.mdx +50 -9
  258. package/src/docs/Welcome.stories.mdx +160 -41
  259. package/src/hooks/useCarouselStyles.stories.mdx +22 -2
  260. package/src/hooks/useCarouselStyles.ts +3 -2
  261. package/src/hooks/useNYPLTheme.stories.mdx +101 -0
  262. package/src/hooks/useNYPLTheme.ts +30 -6
  263. package/src/hooks/useWindowSize.stories.mdx +23 -0
  264. package/src/index.ts +4 -1
  265. package/src/styles/base/_place-holder.scss +1 -1
  266. package/src/theme/components/button.ts +15 -7
  267. package/src/theme/components/card.ts +30 -19
  268. package/src/theme/components/checkbox.ts +10 -8
  269. package/src/theme/components/checkboxGroup.ts +1 -1
  270. package/src/theme/components/componentWrapper.ts +2 -2
  271. package/src/theme/components/customTable.ts +39 -31
  272. package/src/theme/components/fieldset.ts +1 -2
  273. package/src/theme/components/global.ts +25 -20
  274. package/src/theme/components/heading.ts +1 -1
  275. package/src/theme/components/helperErrorText.ts +1 -0
  276. package/src/theme/components/hero.ts +13 -15
  277. package/src/theme/components/label.ts +4 -3
  278. package/src/theme/components/list.ts +73 -66
  279. package/src/theme/components/notification.ts +2 -2
  280. package/src/theme/components/radio.ts +9 -9
  281. package/src/theme/components/radioGroup.ts +1 -1
  282. package/src/theme/components/select.ts +35 -22
  283. package/src/theme/components/skeletonLoader.ts +3 -3
  284. package/src/theme/components/slider.ts +8 -7
  285. package/src/theme/components/statusBadge.ts +2 -2
  286. package/src/theme/components/structuredContent.ts +66 -1
  287. package/src/theme/components/tabs.ts +2 -2
  288. package/src/theme/components/template.ts +9 -9
  289. package/src/theme/components/textInput.ts +13 -12
  290. package/src/theme/components/toggle.ts +17 -10
  291. package/src/theme/components/videoPlayer.ts +1 -1
  292. package/src/theme/foundations/colors.ts +1 -1
  293. package/src/theme/foundations/radii.ts +1 -0
  294. package/src/theme/foundations/spacing.ts +70 -22
  295. package/src/theme/foundations/typography.ts +2 -2
  296. package/src/utils/componentCategories.ts +1 -2
  297. package/dist/components/SearchBar/SearchBar.Test.d.ts +0 -1
  298. package/dist/helpers/generateUUID.d.ts +0 -1
  299. package/src/helpers/generateUUID.tsx +0 -5
package/CHANGELOG.md CHANGED
@@ -8,6 +8,64 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
8
8
 
9
9
  ## Prerelease
10
10
 
11
+ ## 0.26.0 (April 22, 2022)
12
+
13
+ ### Adds
14
+
15
+ - Exports the `useCarouselStyles` and `useWindowSize` hooks and adds documentation for all hooks in Storybook.
16
+ - Adds additional semantic design tokens from `fontWeights` and `fontSizes` to the `useNYPLTheme` hook.
17
+ - Adds a warning if a required `id` prop is not passed to one of the "Form Elements": `Button`, `Checkbox`, `CheckboxGroup`, `DatePicker`, `Fieldset`, `Form`, `Label`, `ProgressIndicator`, `Radio`, `RadioGroup`, `SearchBar`, `Select`, `Slider`, `TextInput`, `Toggle`.
18
+ - Adds the `isRequired` prop to the `Label` component.
19
+ - Adds the `labelPosition` prop to the `Select` component, so that the label can be styled inline with the select input.
20
+ - Adds Chakra's "Style Props" functionality to every Reservoir component. For composed components, such as the `SearchBar` component, these style props are passed to wrapper element. This update also updates the snapshot tests for every component.
21
+ - Adds the functionality to pass all valid HTML attributes to a Reservoir component, such as `data-*` props.
22
+ - Adds semantic design tokens for `spacing` theme object.
23
+ - Adds the `isAlignedRightActions` prop to the `Card` component to render `CardActions` components to the right of the main content area. This only works for the `Card`'s row layout.
24
+ - Adds styles to target native HTML basic elements inside the `StructuredContent` component.
25
+ - Adds `Reservoir` branding to Storybook.
26
+
27
+ ### Changes
28
+
29
+ - Updates the hex color value for `ui.gray.light-cool`, `ui.disabled.primary` and `section.blogs.primary`.
30
+ - Updates the default background color used in the `Accordion` component.
31
+ - Updates the default background color used in the `Hero` component.
32
+ - Updates the background color used in the `SkeletonLoader` component.
33
+ - Updates the background color used in the `VideoPlayer` component.
34
+ - Updates the background colors used in the `Tabs` component.
35
+ - Updates the colors for "secondary" and "pill" variants of the `Button` component.
36
+ - Updates the color values used in the `disabled` state for the `Checkbox`, `Radio`, `Select`, `Slider`, `TextInput` and `Toggle` components.
37
+ - Updates the `Checkbox` component to use "3px" for the border radius.
38
+ - Makes the id prop required for all "Form Elements".
39
+ - Updates how the `Required` text in the `Label` and `Fieldset` components is displayed. Instead of floating to the right of the label and legend elements, it is now displayed inlined as `(Required)`.
40
+ - Renames the `optReqFlag` prop to `showRequiredLabel` in the `CheckboxGroup`, `Fieldset`, `RadioGroup`, and `Slider` components.
41
+ - Renames the `showOptReqLabel` prop to `showRequiredLabel` in the `DatePicker`, `Select`, and `TextInput` components.
42
+ - Uses the design token "text.caption" variable for the `Notification`'s font size.
43
+ - Updates the styling for the `HelperErrorText` to be consistent for all components that use it
44
+ - Refactors the `Checkbox`, `CheckboxGroup`, `ComponentWrapper`, `DatePicker`, `Fieldset`, `Label`, `Radio`, `RadioGroup`, `Select`, `Slider`, `TextInput`, and `Toggle` to better use the updated `HelperErrorText` styling.
45
+ - Renames the `Card`'s `center` prop to `isCentered` and `border` prop to `isBordered`.
46
+ - Renames the `SkeletonLoader` component's `border` prop to `isBordered`.
47
+ - Refactors the DS `RadioGroup` component so it internally implements Chakra's `RadioGroup` component rather than the `useRadioGroup` hook. The "uncontrolled" version of Chakra's `RadioGroup` is not working and will be investigated in the future. It is recommended to use the controlled component pattern.
48
+ - Updates the `Fieldset` component to render the "Optional"/"Required" text in the `legend` element as pseudo CSS in the `::after` rule.
49
+ - Passes the `isRequired` prop in the `RadioGroup` and `CheckboxGroup` to the `Fieldset` wrapper component.
50
+ - Updates the `focus` styles for the `Radio`, `Select` and `TextInput` components.
51
+ - Updates the references of the `<dl>` element from "Definition" to "Description", as that's the official name in HTML5. This affects the `List` element and its `ListTypes.Description` enum value.
52
+ - Updates styles for `React Datepicker`'s calendar popup in the `DatePicker` component.
53
+ - Updates storybook URL from /storybook-static/ to /reservoir/v0_26.
54
+ - Updates all references to "design system" in the Storybook documentation to include "Reservoir" in the name of the design system.
55
+ - Updates language on the `Welcome` page.
56
+
57
+ ### Removals
58
+
59
+ - Removes the default `Optional` text displayed in the `Label` and `Fieldset` components.
60
+ - Removes the `optReqFlag` prop in the `Label` component.
61
+ - Removes the default autogenerated id for all components, as well as the `uuid` package.
62
+ - Removes the `HorizontalRule`'s `height` and `width` props from its prop interface in favor of Chakra's style props; the default values are still set for `height` and `width`.
63
+
64
+ ### Fixes
65
+
66
+ - Fixes how the `Button` component gets rendered inside the `Form` and `FormField` component layout.
67
+ - Fixes how the `Select` component is controlled in the `SearchBar` component.
68
+
11
69
  ## 0.25.13 (April 1, 2022)
12
70
 
13
71
  ### Adds
package/README.md CHANGED
@@ -1,10 +1,10 @@
1
- # NYPL Design System
1
+ # Reservoir Design System
2
2
 
3
3
  ![Build Status](https://github.com/nypl/nypl-design-system/actions/workflows/ci.yml/badge.svg?branch=development)
4
4
 
5
5
  [![npm version](https://badge.fury.io/js/%40nypl%2Fdesign-system-react-components.svg)](https://badge.fury.io/js/%40nypl%2Fdesign-system-react-components)
6
6
 
7
- The NYPL Design System (DS) is NYPL’s open-source extensible React library for products and experiences with the accessibility as its foundation. It ships functional, stateless components with consistent NYPL styling. You can learn more about the project and its goals [on the project's wiki](https://github.com/NYPL/nypl-design-system/wiki).
7
+ The Reservoir Design System (DS) is NYPL’s open-source extensible React library for products and experiences with the accessibility as its foundation. It ships functional, stateless components with consistent NYPL styling. You can learn more about the project and its goals [on the project's wiki](https://github.com/NYPL/nypl-design-system/wiki).
8
8
 
9
9
  _Note: This library is still in beta. Until we release the stable `1.0.0` version, we are loosely using semantic versioning._
10
10
 
@@ -185,7 +185,7 @@ function NewComponent(props) {
185
185
 
186
186
  ## Using Chakra UI Components
187
187
 
188
- The Chakra UI component library has been integrated into the NYPL Design System. We are still progressing towards using Chakra components and patterns to build DS components, and therefore documentation and features are expected to change. While the implementation details of DS components will use Chakra, the DS package itself will export _some_ Chakra components.
188
+ The Chakra UI component library has been integrated into the Reservoir Design System. We are still progressing towards using Chakra components and patterns to build DS components, and therefore documentation and features are expected to change. While the implementation details of DS components will use Chakra, the DS package itself will export _some_ Chakra components.
189
189
 
190
190
  The list of re-exported Chakra components can be found in the main [index.ts](/src/index.ts) file. They include:
191
191
 
@@ -216,15 +216,15 @@ You can check out a working Codepen with unpkg [here](https://codepen.io/edwingu
216
216
 
217
217
  ## Storybook
218
218
 
219
- The NYPL 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 NYPL 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/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.
220
220
 
221
221
  ### Documentation Instances
222
222
 
223
- There are currently two main instances of the NYPL Design System Storybook documentation. There are also "preview" sites that are used to quickly and easily view pull request changes.
223
+ There are currently two main instances of the Reservoir Design System Storybook documentation. There are also "preview" sites that are used to quickly and easily view pull request changes.
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 NYPL 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/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.
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
 
@@ -271,11 +271,11 @@ You can then view `/storybook-static/index.html` in your browser. _Make sure not
271
271
 
272
272
  ## Typescript Usage
273
273
 
274
- The NYPL Design System is built with Typescript. Check out the Design System's [Typescript documentation](/TYPESCRIPT.md) for more information on why we chose to build React components in Typescript and the benefits and the gotchas we encountered.
274
+ The Reservoir Design System is built with Typescript. Check out the Design System's [Typescript documentation](/TYPESCRIPT.md) for more information on why we chose to build React components in Typescript and the benefits and the gotchas we encountered.
275
275
 
276
276
  ## Unit Testing
277
277
 
278
- The NYPL Design System runs unit tests with Jest and React Testing Library.
278
+ The Reservoir Design System runs unit tests with Jest and React Testing Library.
279
279
 
280
280
  To run all tests once:
281
281
 
@@ -359,7 +359,7 @@ After writing new tests, run `npm run test:generate-output` to create a new JSON
359
359
 
360
360
  ### Development and Storybook
361
361
 
362
- The NYPL Design System is built with accessibility in mind. By using Chakra UI as our foundational base, the custom DS components built with Chakra have accessibility concerns already implemented. On top of built-in accessible elements, DS components internally work to link labels with input elements, to add correct `aria-*` attributes, to visually hide text but still associate it with the correct element for titles and descriptions, to auto-generate a random `id` attribute if none was passed, and much more.
362
+ The Reservoir Design System is built with accessibility in mind. By using Chakra UI as our foundational base, the custom DS components built with Chakra have accessibility concerns already implemented. On top of built-in accessible elements, DS components internally work to link labels with input elements, to add correct `aria-*` attributes, to visually hide text but still associate it with the correct element for titles and descriptions, to auto-generate a random `id` attribute if none was passed, and much more.
363
363
 
364
364
  We make use of:
365
365
 
@@ -371,7 +371,7 @@ If applicable, DS components have section(s) on accessibility in their Storybook
371
371
 
372
372
  ### Product Requirements
373
373
 
374
- The NYPL Design System provides accessible stories, but real live data can necessitate additional accessibility requirements beyond what we're committed to in our generic, extensible components. To ensure your products' final result is accessible, please adhere to the accessibility requirements put together by NYPL's accessibility coordinator on [Metronome](http://themetronome.co/).
374
+ The Reservoir Design System provides accessible stories, but real live data can necessitate additional accessibility requirements beyond what we're committed to in our generic, extensible components. To ensure your products' final result is accessible, please adhere to the accessibility requirements put together by NYPL's accessibility coordinator on [Metronome](http://themetronome.co/).
375
375
 
376
376
  NYPL's Metronome instance is currently password protected. For access to Metronome, please contact NYPL's UX team or Design System team.
377
377
 
@@ -17,5 +17,5 @@ export interface AccordionProps {
17
17
  * Accordion component that shows content on toggle. Can be used to display
18
18
  * multiple accordion items together.
19
19
  */
20
- declare function Accordion(props: React.PropsWithChildren<AccordionProps>): JSX.Element;
20
+ export declare const Accordion: import("@chakra-ui/react").ChakraComponent<(props: AccordionProps) => JSX.Element, {}>;
21
21
  export default Accordion;
@@ -18,5 +18,5 @@ export interface BreadcrumbProps {
18
18
  /** ID that other components can cross reference for accessibility purposes */
19
19
  id?: string;
20
20
  }
21
- declare function Breadcrumbs(props: React.PropsWithChildren<BreadcrumbProps>): JSX.Element;
21
+ export declare const Breadcrumbs: import("@chakra-ui/react").ChakraComponent<(props: BreadcrumbProps) => JSX.Element, {}>;
22
22
  export default Breadcrumbs;
@@ -15,7 +15,7 @@ interface ButtonProps {
15
15
  /** Additional className to use. */
16
16
  className?: string;
17
17
  /** ID that other components can cross reference for accessibility purposes. */
18
- id?: string;
18
+ id: string;
19
19
  /** Adds 'disabled' property to the button. */
20
20
  isDisabled?: boolean;
21
21
  /** Trigger the Button's action through the `mouseDown` event handler instead
@@ -29,5 +29,5 @@ interface ButtonProps {
29
29
  /**
30
30
  * Renders a simple `button` element with custom variant styles.
31
31
  */
32
- declare function Button(props: React.PropsWithChildren<ButtonProps>): JSX.Element;
32
+ export declare const Button: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<ButtonProps>) => JSX.Element, {}>;
33
33
  export default Button;
@@ -1,6 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { LayoutTypes } from "../../helpers/enums";
3
- import Heading from "../Heading/Heading";
4
3
  import { ComponentImageProps } from "../Image/Image";
5
4
  interface CardBaseProps {
6
5
  /** Optional value to control the alignment of the text and elements. */
@@ -28,20 +27,23 @@ interface CardActionsProps extends CardBaseProps {
28
27
  export interface CardProps extends CardBaseProps, CardLinkBoxProps {
29
28
  /** Optional hex color value used to set the card background color. */
30
29
  backgroundColor?: string;
31
- /** Optional boolean value to control the visibility of a border around
32
- * the card. */
33
- border?: boolean;
34
30
  /** Optional CSS class name to add. */
35
31
  className?: string;
36
32
  /** Optional hex color value used to override the default text color. */
37
33
  foregroundColor?: string;
38
34
  /** ID that other components can cross reference for accessibility purposes. */
39
35
  id?: string;
36
+ /** Optional boolean value to control the visibility of a border around
37
+ * the card. */
38
+ isBordered?: boolean;
40
39
  /** Object used to create and render the `Image` component. */
41
40
  imageProps?: CardImageProps;
41
+ /** Set CardActions to the right content side. This only works in
42
+ * the row layout. */
43
+ isAlignedRightActions?: boolean;
42
44
  }
43
- export declare const CardHeading: typeof Heading;
44
- export declare function CardContent(props: React.PropsWithChildren<{}>): JSX.Element;
45
- export declare function CardActions(props: React.PropsWithChildren<CardActionsProps>): JSX.Element;
46
- export default function Card(props: React.PropsWithChildren<CardProps>): JSX.Element;
47
- export {};
45
+ export declare const CardHeading: import("@chakra-ui/react").ChakraComponent<import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<import("../Heading/Heading").HeadingProps>) => JSX.Element, {}>, {}>;
46
+ export declare const CardContent: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<{}>) => JSX.Element, {}>;
47
+ export declare const CardActions: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<CardActionsProps>) => JSX.Element, {}>;
48
+ export declare const Card: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<CardProps>) => JSX.Element, {}>;
49
+ export default Card;
@@ -6,7 +6,7 @@ export interface CheckboxProps {
6
6
  /** Optional string to populate the HelperErrorText for standard state */
7
7
  helperText?: HelperErrorTextType;
8
8
  /** ID that other components can cross reference for accessibility purposes */
9
- id?: string;
9
+ id: string;
10
10
  /** Optional string to populate the HelperErrorText for the error state
11
11
  * when `isInvalid` is true. */
12
12
  invalidText?: HelperErrorTextType;
@@ -42,5 +42,5 @@ export interface CheckboxProps {
42
42
  value?: string;
43
43
  }
44
44
  export declare const onChangeDefault: () => void;
45
- declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
45
+ export declare const Checkbox: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>, {}>;
46
46
  export default Checkbox;
@@ -9,7 +9,7 @@ export interface CheckboxGroupProps {
9
9
  /** Optional string to populate the HelperErrorText for standard state */
10
10
  helperText?: HelperErrorTextType;
11
11
  /** ID that other components can cross reference for accessibility purposes */
12
- id?: string;
12
+ id: string;
13
13
  /** Optional string to populate the HelperErrorText for error state */
14
14
  invalidText?: HelperErrorTextType;
15
15
  /** Adds the 'disabled' prop to the input when true. */
@@ -30,13 +30,14 @@ export interface CheckboxGroupProps {
30
30
  name: string;
31
31
  /** The action to perform on the `<input>`'s onChange function */
32
32
  onChange?: (value: string[]) => void;
33
- /** Whether or not to display "Required"/"Optional" in the label text. */
34
- optReqFlag?: boolean;
35
33
  /** Offers the ability to hide the helper/invalid text. */
36
34
  showHelperInvalidText?: boolean;
37
35
  /** Offers the ability to show the group's legend onscreen or hide it. Refer
38
36
  * to the `labelText` property for more information. */
39
37
  showLabel?: boolean;
38
+ /** Whether or not to display the "(Required)" text in the label text.
39
+ * True by default. */
40
+ showRequiredLabel?: boolean;
40
41
  }
41
42
  /**
42
43
  * Wrapper component to wrap `Checkbox` components. Can be displayed in a
@@ -44,5 +45,5 @@ export interface CheckboxGroupProps {
44
45
  * wrapping and associated text elements, but the checkbox input elements
45
46
  * _need_ to be child `Checkbox` components from the NYPL Design System.
46
47
  */
47
- declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLInputElement>>;
48
+ export declare const CheckboxGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLInputElement>>, {}>;
48
49
  export default CheckboxGroup;
@@ -17,5 +17,5 @@ export interface ComponentWrapperProps {
17
17
  /** Sets invalid text in the error state. */
18
18
  isInvalid?: boolean;
19
19
  }
20
- declare function ComponentWrapper(props: React.PropsWithChildren<ComponentWrapperProps>): JSX.Element;
20
+ export declare const ComponentWrapper: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<ComponentWrapperProps>) => JSX.Element, {}>;
21
21
  export default ComponentWrapper;
@@ -11,7 +11,7 @@ export interface FullDateType {
11
11
  }
12
12
  interface DateRangeRowProps {
13
13
  /** ID that other components can cross reference for accessibility purposes. */
14
- id?: string;
14
+ id: string;
15
15
  /** Whether to render a single date input or two for a range of two dates. */
16
16
  isDateRange?: boolean;
17
17
  }
@@ -24,8 +24,9 @@ interface DatePickerWrapperProps extends DateRangeRowProps {
24
24
  labelText: string;
25
25
  /** Offers the ability to show the label onscreen or hide it. */
26
26
  showLabel?: boolean;
27
- /** Whether or not to display the "Required"/"Optional" text in the label text. */
28
- showOptReqLabel?: boolean;
27
+ /** Whether or not to display the "(Required)" text in the label text.
28
+ * True by default. */
29
+ showRequiredLabel?: boolean;
29
30
  }
30
31
  export interface DatePickerProps extends DatePickerWrapperProps {
31
32
  /** The date format to display. Defaults to "yyyy-MM-dd".
@@ -72,11 +73,9 @@ export interface DatePickerProps extends DatePickerWrapperProps {
72
73
  refTo?: React.Ref<TextInputRefType>;
73
74
  /** Offers the ability to hide the helper/invalid text. */
74
75
  showHelperInvalidText?: boolean;
75
- /** Whether or not to display the "Required"/"Optional" text in the label text. */
76
- showOptReqLabel?: boolean;
77
76
  }
78
77
  /**
79
78
  * Returns a single date input field or two date input fields for a date range.
80
79
  */
81
- declare const DatePicker: React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<TextInputRefType>>;
80
+ export declare const DatePicker: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<TextInputRefType>>, {}>;
82
81
  export default DatePicker;
@@ -3,21 +3,20 @@ interface FieldsetProps {
3
3
  /** Additional class name to add. */
4
4
  className?: string;
5
5
  /** ID that other components can cross reference for accessibility purposes */
6
- id?: string;
6
+ id: string;
7
7
  /** Flag to show or hide the text in the `legend` element. False by default. */
8
8
  isLegendHidden?: boolean;
9
- /** Flag to render "Required" or "Optional" in the `legend`.
10
- * False/"Optional" by default. */
9
+ /** Flag to render "Required" in the `legend`. True by default. */
11
10
  isRequired?: boolean;
12
11
  /** Text to display in the `legend` element. */
13
12
  legendText?: string;
14
- /** Flag to show or hide the "Required"/"Optional" text in the `legend`.
13
+ /** Whether or not to display the "(Required)" text in the `legend` text.
15
14
  * True by default. */
16
- optReqFlag?: boolean;
15
+ showRequiredLabel?: boolean;
17
16
  }
18
17
  /**
19
18
  * A wrapper component that renders a `fieldset` element along with a `legend`
20
19
  * element as its first child. Commonly used to wrap form components.
21
20
  */
22
- declare const Fieldset: ({ children, className, id, isLegendHidden, isRequired, legendText, optReqFlag, }: React.PropsWithChildren<FieldsetProps>) => JSX.Element;
21
+ export declare const Fieldset: import("@chakra-ui/react").ChakraComponent<({ children, className, id, isLegendHidden, isRequired, legendText, showRequiredLabel, ...rest }: React.PropsWithChildren<FieldsetProps>) => JSX.Element, {}>;
23
22
  export default Fieldset;
@@ -8,9 +8,9 @@ interface FormBaseProps {
8
8
  * should not be used``` */
9
9
  gap?: FormGaps;
10
10
  /** ID that other components can cross reference (internal use) */
11
- id?: string;
11
+ id: string;
12
12
  }
13
- export interface FormChildProps extends FormBaseProps {
13
+ export interface FormChildProps extends Partial<FormBaseProps> {
14
14
  }
15
15
  export interface FormProps extends FormBaseProps {
16
16
  /** Optional form `action` attribute */
@@ -21,9 +21,9 @@ export interface FormProps extends FormBaseProps {
21
21
  onSubmit?: (e: React.FormEvent<HTMLFormElement>) => void;
22
22
  }
23
23
  /** FormRow child-component */
24
- export declare function FormRow(props: React.PropsWithChildren<FormChildProps>): JSX.Element;
24
+ export declare const FormRow: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<FormChildProps>) => JSX.Element, {}>;
25
25
  /** FormField child-component */
26
- export declare function FormField(props: React.PropsWithChildren<FormChildProps>): JSX.Element;
26
+ export declare const FormField: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<FormChildProps>) => JSX.Element, {}>;
27
27
  /** Main Form component */
28
- export default function Form(props: React.PropsWithChildren<FormProps>): JSX.Element;
29
- export {};
28
+ export declare const Form: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<FormProps>) => JSX.Element, {}>;
29
+ export default Form;
@@ -1,9 +1,9 @@
1
1
  export declare enum GridGaps {
2
- ExtraExtraSmall = "xxs",
3
- ExtraSmall = "xs",
4
- Small = "s",
5
- Medium = "m",
6
- Large = "l",
7
- ExtraLarge = "xl",
8
- ExtraExtraLarge = "xxl"
2
+ ExtraExtraSmall = "grid.xxs",
3
+ ExtraSmall = "grid.xs",
4
+ Small = "grid.s",
5
+ Medium = "grid.m",
6
+ Large = "grid.l",
7
+ ExtraLarge = "grid.xl",
8
+ ExtraExtraLarge = "grid.xxl"
9
9
  }
@@ -10,5 +10,5 @@ export interface SimpleGridProps {
10
10
  /** ID that other components can cross reference for accessibility purposes */
11
11
  id?: string;
12
12
  }
13
- declare function SimpleGrid(props: React.PropsWithChildren<SimpleGridProps>): JSX.Element;
13
+ export declare const SimpleGrid: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<SimpleGridProps>) => JSX.Element, {}>;
14
14
  export default SimpleGrid;
@@ -24,5 +24,5 @@ export interface HeadingProps {
24
24
  /** Optional className for the URL when the `url` prop is passed */
25
25
  urlClass?: string;
26
26
  }
27
- declare function Heading(props: React.PropsWithChildren<HeadingProps>): JSX.Element;
27
+ export declare const Heading: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<HeadingProps>) => JSX.Element, {}>;
28
28
  export default Heading;
@@ -10,11 +10,12 @@ interface HelperErrorTextProps {
10
10
  * read the entire DOM element. When false, only changes (additionals or
11
11
  * removals) will be read. True by default. */
12
12
  ariaAtomic?: boolean;
13
- /** Aria attribute only used in the invalid state to read error text. This
14
- * indicates the priority of the text and when it should be presented to users
15
- * using screen readers; "off" indicates that the content should not be presented,
16
- * "polite" that it will be announced at the next available time slot, and
17
- * "assertive" that it should be announced immediately. "polite" by default. */
13
+ /** Aria attribute used in the invalid state to read error text by default.
14
+ * This indicates the priority of the text and when it should be presented to
15
+ * users using screen readers; "off" indicates that the content should not be
16
+ * presented, "polite" that it will be announced at the next available time
17
+ * slot, and "assertive" that it should be announced immediately. This is set
18
+ * to "off" by default and to "polite" by when `isInvalid` is true. */
18
19
  ariaLive?: AriaLiveValues;
19
20
  /** Additional className to add. */
20
21
  className?: string;
@@ -26,7 +27,7 @@ interface HelperErrorTextProps {
26
27
  text: HelperErrorTextType;
27
28
  }
28
29
  /**
29
- * Helper or Error text for forms
30
+ * Helper or error text for forms components.
30
31
  */
31
- export default function HelperErrorText({ additionalStyles, ariaAtomic, ariaLive, className, id, isInvalid, text, }: HelperErrorTextProps): JSX.Element;
32
- export {};
32
+ export declare const HelperErrorText: import("@chakra-ui/react").ChakraComponent<({ additionalStyles, ariaAtomic, ariaLive, className, id, isInvalid, text, ...rest }: HelperErrorTextProps) => JSX.Element, {}>;
33
+ export default HelperErrorText;
@@ -32,4 +32,5 @@ export interface HeroProps {
32
32
  * underneath the heading element. */
33
33
  subHeaderText?: string | JSX.Element;
34
34
  }
35
- export default function Hero(props: React.PropsWithChildren<HeroProps>): JSX.Element;
35
+ export declare const Hero: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<HeroProps>) => JSX.Element, {}>;
36
+ export default Hero;
@@ -6,14 +6,6 @@ export interface HorizontalRuleProps {
6
6
  align?: "left" | "right";
7
7
  /** ClassName you can add in addition to `horizontal-rule` */
8
8
  className?: string;
9
- /** Optional height value. This value should be entered with the same
10
- * formatting as a CSS height attribute except for percent values (ex. `2`,
11
- * `5px`, `1.5rem`). If this prop is omitted or a percent value is used, the
12
- * horizontal rule will have a default height of 2px. */
13
- height?: string;
14
- /** Optional width value. This value should be entered with the same
15
- * formatting as a CSS width attribute (ex. `50%`, `640px`, `20rem`). If
16
- * omitted, the horizontal rule will have a default width of "100%". */
17
- width?: string;
18
9
  }
19
- export default function HorizontalRule(props: HorizontalRuleProps): JSX.Element;
10
+ export declare const HorizontalRule: import("@chakra-ui/react").ChakraComponent<(props: HorizontalRuleProps) => JSX.Element, {}>;
11
+ export default HorizontalRule;
@@ -32,4 +32,5 @@ export interface IconProps {
32
32
  /**
33
33
  * Renders SVG-based icons.
34
34
  */
35
- export default function Icon(props: React.PropsWithChildren<IconProps>): JSX.Element;
35
+ export declare const Icon: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<IconProps>) => JSX.Element, {}>;
36
+ export default Icon;
@@ -54,5 +54,5 @@ export interface ImageProps extends ImageWrapperProps {
54
54
  /** The src attribute is required, and contains the path to the image you want to embed. */
55
55
  src: string;
56
56
  }
57
- export default function Image(props: ImageProps): JSX.Element;
58
- export {};
57
+ export declare const Image: import("@chakra-ui/react").ChakraComponent<(props: ImageProps) => JSX.Element, {}>;
58
+ export default Image;
@@ -1,5 +1,4 @@
1
1
  import * as React from "react";
2
- declare type optReqFlagType = "Required" | "Optional" | "" | undefined;
3
2
  interface LabelProps {
4
3
  /** Additional CSS class name to render in the `label` element. */
5
4
  className?: string;
@@ -7,11 +6,15 @@ interface LabelProps {
7
6
  htmlFor: string;
8
7
  /** ID that other components can cross reference for accessibility purposes */
9
8
  id?: string;
10
- /** Displays "Required" or "Optional" string alongside the label */
11
- optReqFlag?: optReqFlagType;
9
+ /** Controls whether the label should be inline with the input it goes with.
10
+ * This prop should only be used internally. */
11
+ isInlined?: boolean;
12
+ /** Controls whether the "(Required)" text should be displayed alongside the
13
+ * label's text. False by default. */
14
+ isRequired?: boolean;
12
15
  }
13
16
  /**
14
17
  * A label for form inputs. It should never be used alone.
15
18
  */
16
- declare function Label(props: React.PropsWithChildren<LabelProps>): JSX.Element;
19
+ export declare const Label: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<LabelProps>) => JSX.Element, {}>;
17
20
  export default Label;
@@ -24,5 +24,5 @@ export interface LinkProps {
24
24
  * A component that uses an `href` prop or a child anchor element, to create
25
25
  * an anchor element with added styling and conventions.
26
26
  */
27
- declare const Link: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>;
27
+ export declare const Link: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<HTMLAnchorElement>>, {}>;
28
28
  export default Link;
@@ -1,8 +1,8 @@
1
1
  import * as React from "react";
2
2
  import { ListTypes } from "./ListTypes";
3
- interface DefinitionProps {
3
+ interface DescriptionProps {
4
4
  term: string;
5
- definition: string | JSX.Element;
5
+ description: string | JSX.Element;
6
6
  }
7
7
  export interface ListProps {
8
8
  /** Optionally pass in additional Chakra-based styles. */
@@ -17,23 +17,23 @@ export interface ListProps {
17
17
  inline?: boolean;
18
18
  /** Data to render if children are not passed. For `ListTypes.Ordered` and
19
19
  * `ListTypes.Unordered` `List` types, the data structure is an array of
20
- * strings to renders as `li` items. For `ListTypes.Definition` `List` types,
21
- * the data structure is an array of objects with `term` and `definition`
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
22
  * properties to render `dt` and `dd` elements, respectively.
23
23
  */
24
- listItems?: (string | JSX.Element | DefinitionProps)[];
24
+ listItems?: (string | JSX.Element | DescriptionProps)[];
25
25
  /** Remove list styling. */
26
26
  noStyling?: boolean;
27
27
  /** An optional title that will appear over the list. This prop only applies
28
- * to Definition Lists. */
28
+ * to Description Lists. */
29
29
  title?: string;
30
- /** The type of list: Ordered, Unordered, or Definition. Unordered by default. */
30
+ /** The type of list: Ordered, Unordered, or Description. Unordered by default. */
31
31
  type: ListTypes;
32
32
  }
33
33
  /**
34
- * A component that renders list item `li` elements or definition item `dt`
34
+ * A component that renders list item `li` elements or description item `dt`
35
35
  * and `dd` elements based on the `type` prop. Note that the `title` prop will
36
- * only display for the `Definition` list type.
36
+ * only display for the `Description` list type.
37
37
  */
38
- export default function List(props: React.PropsWithChildren<ListProps>): any;
39
- export {};
38
+ export declare const List: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<ListProps>) => any, {}>;
39
+ export default List;
@@ -1,5 +1,5 @@
1
1
  export declare enum ListTypes {
2
2
  Ordered = "ol",
3
3
  Unordered = "ul",
4
- Definition = "dl"
4
+ Description = "dl"
5
5
  }
@@ -25,4 +25,5 @@ export interface LogoProps {
25
25
  * The `Logo` component renders SVG-based logos and color variants that are
26
26
  * commonly used by the New York Public Library.
27
27
  */
28
- export default function Logo(props: React.PropsWithChildren<LogoProps>): JSX.Element;
28
+ export declare const Logo: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<LogoProps>) => JSX.Element, {}>;
29
+ export default Logo;
@@ -23,6 +23,8 @@ declare const _default: {
23
23
  logo_qpl_black: string;
24
24
  logo_qpl_color: string;
25
25
  logo_qpl_white: string;
26
+ logo_reservoir_icon_color: string;
27
+ logo_reservoir_vertical_color: string;
26
28
  logo_schomburg_black: string;
27
29
  logo_schomburg_circle_black: string;
28
30
  logo_schomburg_circle_color: string;
@@ -36,6 +36,8 @@ export declare enum LogoNames {
36
36
  QueensPublicLibraryWhite = "logo_qpl_white",
37
37
  QueensPublicLibraryAltBlack = "logo_qpl_alt_black",
38
38
  QueensPublicLibraryAltWhite = "logo_qpl_alt_white",
39
+ ReservoirIconColor = "logo_reservoir_icon_color",
40
+ ReservoirVerticalColor = "logo_reservoir_vertical_color",
39
41
  SchomburgColor = "logo_schomburg_color",
40
42
  SchomburgBlack = "logo_schomburg_black",
41
43
  SchomburgWhite = "logo_schomburg_white",
@@ -37,14 +37,14 @@ export interface NotificationProps extends BasePropsWithoutAlignText {
37
37
  /**
38
38
  * NotificationHeading child-component.
39
39
  */
40
- export declare function NotificationHeading(props: React.PropsWithChildren<BasePropsWithoutAlignText>): JSX.Element;
40
+ export declare const NotificationHeading: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<BasePropsWithoutAlignText>) => JSX.Element, {}>;
41
41
  /**
42
42
  * NotificationContent child-component.
43
43
  */
44
- export declare function NotificationContent(props: React.PropsWithChildren<BasePropsWithoutIsCentered>): JSX.Element;
44
+ export declare const NotificationContent: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<BasePropsWithoutIsCentered>) => JSX.Element, {}>;
45
45
  /**
46
46
  * Component used to present users with three different levels of notifications:
47
47
  * standard, announcement, and warning.
48
48
  */
49
- export default function Notification(props: NotificationProps): JSX.Element;
50
- export {};
49
+ export declare const Notification: import("@chakra-ui/react").ChakraComponent<(props: NotificationProps) => JSX.Element, {}>;
50
+ export default Notification;