@nypl/design-system-react-components 1.0.2 → 1.0.4

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 (309) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/README.md +171 -135
  3. package/dist/__tests__/mediaMatchMock.d.ts +79 -0
  4. package/dist/components/Card/Card.d.ts +8 -6
  5. package/dist/components/Heading/Heading.d.ts +6 -0
  6. package/dist/components/Icons/Icon.d.ts +1 -1
  7. package/dist/components/Icons/IconSvgs.d.ts +10 -0
  8. package/dist/components/Logo/Logo.d.ts +1 -1
  9. package/dist/components/Logo/LogoSvgs.d.ts +3 -0
  10. package/dist/components/Slider/Slider.d.ts +1 -2
  11. package/dist/components/Table/Table.d.ts +3 -2
  12. package/dist/components/Text/Text.d.ts +6 -0
  13. package/dist/components/TextInput/TextInput.d.ts +2 -1
  14. package/dist/design-system-react-components.cjs.development.js +1700 -878
  15. package/dist/design-system-react-components.cjs.development.js.map +1 -1
  16. package/dist/design-system-react-components.cjs.production.min.js +1 -1
  17. package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
  18. package/dist/design-system-react-components.esm.js +1672 -881
  19. package/dist/design-system-react-components.esm.js.map +1 -1
  20. package/dist/hooks/{tests → __tests__}/useCarouselStyles.test.d.ts +0 -0
  21. package/dist/hooks/__tests__/useNYPLBreakpoints.test.d.ts +1 -0
  22. package/dist/hooks/useNYPLBreakpoints.d.ts +13 -0
  23. package/dist/index.d.ts +2 -1
  24. package/dist/resources.scss +0 -4
  25. package/dist/styles.css +3 -2
  26. package/dist/theme/components/button.d.ts +7 -2
  27. package/dist/theme/components/checkbox.d.ts +1 -0
  28. package/dist/theme/components/customTable.d.ts +522 -34
  29. package/dist/theme/components/datePicker.d.ts +1 -0
  30. package/dist/theme/components/global.d.ts +5 -2
  31. package/dist/theme/components/heading.d.ts +5 -1
  32. package/dist/theme/components/image.d.ts +18 -0
  33. package/dist/theme/components/radio.d.ts +9 -0
  34. package/dist/theme/components/searchBar.d.ts +6 -0
  35. package/dist/theme/components/select.d.ts +4 -5
  36. package/dist/theme/components/structuredContent.d.ts +117 -17
  37. package/dist/theme/components/template.d.ts +4 -1
  38. package/dist/theme/components/text.d.ts +5 -1
  39. package/dist/theme/components/textInput.d.ts +4 -0
  40. package/dist/theme/components/toggle.d.ts +1 -0
  41. package/dist/theme/provider.d.ts +2 -1
  42. package/package.json +16 -16
  43. package/src/__tests__/fileMock.ts +0 -6
  44. package/src/__tests__/setup.ts +0 -27
  45. package/src/__tests__/utils/utils.test.ts +0 -18
  46. package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +0 -42
  47. package/src/components/Accordion/Accordion.stories.mdx +0 -333
  48. package/src/components/Accordion/Accordion.test.tsx +0 -237
  49. package/src/components/Accordion/Accordion.tsx +0 -137
  50. package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +0 -734
  51. package/src/components/Autosuggest/Autosuggest.stories.mdx +0 -75
  52. package/src/components/Autosuggest/Autosuggest.stories.tsx +0 -211
  53. package/src/components/Autosuggest/_Autosuggest.scss +0 -51
  54. package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +0 -231
  55. package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +0 -144
  56. package/src/components/Breadcrumbs/Breadcrumbs.tsx +0 -98
  57. package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +0 -695
  58. package/src/components/Button/Button.stories.mdx +0 -320
  59. package/src/components/Button/Button.test.tsx +0 -184
  60. package/src/components/Button/Button.tsx +0 -95
  61. package/src/components/Button/__snapshots__/Button.test.tsx.snap +0 -106
  62. package/src/components/ButtonGroup/ButtonGroup.stories.mdx +0 -178
  63. package/src/components/ButtonGroup/ButtonGroup.test.tsx +0 -141
  64. package/src/components/ButtonGroup/ButtonGroup.tsx +0 -100
  65. package/src/components/ButtonGroup/__snapshots__/ButtonGroup.test.tsx.snap +0 -117
  66. package/src/components/Card/Card.stories.mdx +0 -1041
  67. package/src/components/Card/Card.test.tsx +0 -388
  68. package/src/components/Card/Card.tsx +0 -346
  69. package/src/components/Card/__snapshots__/Card.test.tsx.snap +0 -568
  70. package/src/components/Chakra/Box.stories.mdx +0 -52
  71. package/src/components/Chakra/Center.stories.mdx +0 -96
  72. package/src/components/Chakra/Flex.stories.mdx +0 -111
  73. package/src/components/Chakra/Grid.stories.mdx +0 -89
  74. package/src/components/Chakra/Stack.stories.mdx +0 -109
  75. package/src/components/Checkbox/Checkbox.stories.mdx +0 -243
  76. package/src/components/Checkbox/Checkbox.test.tsx +0 -350
  77. package/src/components/Checkbox/Checkbox.tsx +0 -152
  78. package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +0 -661
  79. package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +0 -462
  80. package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +0 -492
  81. package/src/components/CheckboxGroup/CheckboxGroup.tsx +0 -173
  82. package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +0 -1842
  83. package/src/components/ComponentWrapper/ComponentWrapper.test.tsx +0 -163
  84. package/src/components/ComponentWrapper/ComponentWrapper.tsx +0 -76
  85. package/src/components/ComponentWrapper/__snapshots__/ComponentWrapper.test.tsx.snap +0 -103
  86. package/src/components/DatePicker/DatePicker.stories.mdx +0 -452
  87. package/src/components/DatePicker/DatePicker.test.tsx +0 -940
  88. package/src/components/DatePicker/DatePicker.tsx +0 -450
  89. package/src/components/DatePicker/_DatePicker.scss +0 -100
  90. package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +0 -908
  91. package/src/components/Fieldset/Fieldset.stories.mdx +0 -96
  92. package/src/components/Fieldset/Fieldset.test.tsx +0 -155
  93. package/src/components/Fieldset/Fieldset.tsx +0 -55
  94. package/src/components/Fieldset/__snapshots__/Fieldset.test.tsx.snap +0 -89
  95. package/src/components/Form/Form.stories.mdx +0 -426
  96. package/src/components/Form/Form.test.tsx +0 -234
  97. package/src/components/Form/Form.tsx +0 -124
  98. package/src/components/Form/__snapshots__/Form.test.tsx.snap +0 -115
  99. package/src/components/Grid/SimpleGrid.stories.mdx +0 -336
  100. package/src/components/Grid/SimpleGrid.test.tsx +0 -79
  101. package/src/components/Grid/SimpleGrid.tsx +0 -49
  102. package/src/components/Grid/__snapshots__/SimpleGrid.test.tsx.snap +0 -23
  103. package/src/components/Heading/Heading.stories.mdx +0 -187
  104. package/src/components/Heading/Heading.test.tsx +0 -171
  105. package/src/components/Heading/Heading.tsx +0 -104
  106. package/src/components/Heading/__snapshots__/Heading.test.tsx.snap +0 -90
  107. package/src/components/HelperErrorText/HelperErrorText.stories.mdx +0 -172
  108. package/src/components/HelperErrorText/HelperErrorText.test.tsx +0 -114
  109. package/src/components/HelperErrorText/HelperErrorText.tsx +0 -62
  110. package/src/components/HelperErrorText/__snapshots__/HelperErrorText.test.tsx.snap +0 -93
  111. package/src/components/Hero/Hero.stories.mdx +0 -378
  112. package/src/components/Hero/Hero.test.tsx +0 -611
  113. package/src/components/Hero/Hero.tsx +0 -203
  114. package/src/components/Hero/__snapshots__/Hero.test.tsx.snap +0 -379
  115. package/src/components/HorizontalRule/HorizontalRule.stories.mdx +0 -73
  116. package/src/components/HorizontalRule/HorizontalRule.test.tsx +0 -54
  117. package/src/components/HorizontalRule/HorizontalRule.tsx +0 -27
  118. package/src/components/HorizontalRule/__snapshots__/HorizontalRule.test.tsx.snap +0 -44
  119. package/src/components/Icons/Icon.stories.mdx +0 -413
  120. package/src/components/Icons/Icon.test.tsx +0 -120
  121. package/src/components/Icons/Icon.tsx +0 -187
  122. package/src/components/Icons/IconSvgs.tsx +0 -64
  123. package/src/components/Icons/__snapshots__/Icon.test.tsx.snap +0 -129
  124. package/src/components/Image/Image.stories.mdx +0 -332
  125. package/src/components/Image/Image.test.tsx +0 -155
  126. package/src/components/Image/Image.tsx +0 -171
  127. package/src/components/Image/__snapshots__/Image.test.tsx.snap +0 -269
  128. package/src/components/Label/Label.stories.mdx +0 -100
  129. package/src/components/Label/Label.test.tsx +0 -116
  130. package/src/components/Label/Label.tsx +0 -55
  131. package/src/components/Label/__snapshots__/Label.test.tsx.snap +0 -45
  132. package/src/components/Link/Link.stories.mdx +0 -249
  133. package/src/components/Link/Link.test.tsx +0 -224
  134. package/src/components/Link/Link.tsx +0 -178
  135. package/src/components/Link/__snapshots__/Link.test.tsx.snap +0 -286
  136. package/src/components/List/List.stories.mdx +0 -393
  137. package/src/components/List/List.test.tsx +0 -265
  138. package/src/components/List/List.tsx +0 -156
  139. package/src/components/List/__snapshots__/List.test.tsx.snap +0 -213
  140. package/src/components/Logo/Logo.stories.mdx +0 -295
  141. package/src/components/Logo/Logo.test.tsx +0 -116
  142. package/src/components/Logo/Logo.tsx +0 -151
  143. package/src/components/Logo/LogoSvgs.tsx +0 -90
  144. package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +0 -142
  145. package/src/components/Modal/Modal.stories.mdx +0 -294
  146. package/src/components/Modal/Modal.test.tsx +0 -157
  147. package/src/components/Modal/Modal.tsx +0 -154
  148. package/src/components/Modal/__snapshots__/Modal.test.tsx.snap +0 -25
  149. package/src/components/Notification/Notification.stories.mdx +0 -358
  150. package/src/components/Notification/Notification.test.tsx +0 -279
  151. package/src/components/Notification/Notification.tsx +0 -224
  152. package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +0 -525
  153. package/src/components/Pagination/Pagination.stories.mdx +0 -184
  154. package/src/components/Pagination/Pagination.test.tsx +0 -419
  155. package/src/components/Pagination/Pagination.tsx +0 -269
  156. package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +0 -544
  157. package/src/components/Placeholder/Placeholder.tsx +0 -19
  158. package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +0 -360
  159. package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +0 -298
  160. package/src/components/ProgressIndicator/ProgressIndicator.tsx +0 -132
  161. package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +0 -434
  162. package/src/components/Radio/Radio.stories.mdx +0 -216
  163. package/src/components/Radio/Radio.test.tsx +0 -247
  164. package/src/components/Radio/Radio.tsx +0 -119
  165. package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +0 -451
  166. package/src/components/RadioGroup/RadioGroup.stories.mdx +0 -479
  167. package/src/components/RadioGroup/RadioGroup.test.tsx +0 -471
  168. package/src/components/RadioGroup/RadioGroup.tsx +0 -171
  169. package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +0 -1550
  170. package/src/components/SearchBar/SearchBar.stories.mdx +0 -518
  171. package/src/components/SearchBar/SearchBar.test.tsx +0 -435
  172. package/src/components/SearchBar/SearchBar.tsx +0 -210
  173. package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +0 -1049
  174. package/src/components/Select/Select.stories.mdx +0 -439
  175. package/src/components/Select/Select.test.tsx +0 -358
  176. package/src/components/Select/Select.tsx +0 -183
  177. package/src/components/Select/__snapshots__/Select.test.tsx.snap +0 -895
  178. package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +0 -142
  179. package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +0 -116
  180. package/src/components/SkeletonLoader/SkeletonLoader.tsx +0 -123
  181. package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +0 -898
  182. package/src/components/SkipNavigation/SkipNavigation.stories.mdx +0 -90
  183. package/src/components/SkipNavigation/SkipNavigation.test.tsx +0 -63
  184. package/src/components/SkipNavigation/SkipNavigation.tsx +0 -51
  185. package/src/components/SkipNavigation/__snapshots__/SkipNavigation.test.tsx.snap +0 -130
  186. package/src/components/Slider/Slider.stories.mdx +0 -628
  187. package/src/components/Slider/Slider.test.tsx +0 -736
  188. package/src/components/Slider/Slider.tsx +0 -322
  189. package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +0 -2186
  190. package/src/components/StatusBadge/StatusBadge.stories.mdx +0 -109
  191. package/src/components/StatusBadge/StatusBadge.test.tsx +0 -70
  192. package/src/components/StatusBadge/StatusBadge.tsx +0 -35
  193. package/src/components/StatusBadge/__snapshots__/StatusBadge.test.tsx.snap +0 -47
  194. package/src/components/StructuredContent/StructuredContent.stories.mdx +0 -567
  195. package/src/components/StructuredContent/StructuredContent.test.tsx +0 -435
  196. package/src/components/StructuredContent/StructuredContent.tsx +0 -139
  197. package/src/components/StructuredContent/__snapshots__/StructuredContent.test.tsx.snap +0 -368
  198. package/src/components/StyleGuide/Bidirectionality.stories.mdx +0 -206
  199. package/src/components/StyleGuide/Breakpoints.stories.mdx +0 -55
  200. package/src/components/StyleGuide/Buttons.stories.mdx +0 -194
  201. package/src/components/StyleGuide/ColorCard.tsx +0 -43
  202. package/src/components/StyleGuide/Colors.stories.mdx +0 -201
  203. package/src/components/StyleGuide/DesignTokens.stories.mdx +0 -193
  204. package/src/components/StyleGuide/Forms.stories.mdx +0 -94
  205. package/src/components/StyleGuide/Iconography.stories.mdx +0 -142
  206. package/src/components/StyleGuide/Spacing.stories.mdx +0 -116
  207. package/src/components/StyleGuide/Typography.stories.mdx +0 -419
  208. package/src/components/Table/Table.stories.mdx +0 -272
  209. package/src/components/Table/Table.test.tsx +0 -241
  210. package/src/components/Table/Table.tsx +0 -152
  211. package/src/components/Table/__snapshots__/Table.test.tsx.snap +0 -1703
  212. package/src/components/Tabs/Tabs.stories.mdx +0 -338
  213. package/src/components/Tabs/Tabs.test.tsx +0 -298
  214. package/src/components/Tabs/Tabs.tsx +0 -264
  215. package/src/components/Tabs/__snapshots__/Tabs.test.tsx.snap +0 -584
  216. package/src/components/Template/Template.stories.mdx +0 -695
  217. package/src/components/Template/Template.test.tsx +0 -309
  218. package/src/components/Template/Template.tsx +0 -326
  219. package/src/components/Template/__snapshots__/Template.test.tsx.snap +0 -342
  220. package/src/components/Text/Text.stories.mdx +0 -103
  221. package/src/components/Text/Text.test.tsx +0 -63
  222. package/src/components/Text/Text.tsx +0 -50
  223. package/src/components/Text/__snapshots__/Text.test.tsx.snap +0 -50
  224. package/src/components/TextInput/TextInput.stories.mdx +0 -268
  225. package/src/components/TextInput/TextInput.test.tsx +0 -451
  226. package/src/components/TextInput/TextInput.tsx +0 -240
  227. package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +0 -274
  228. package/src/components/Toggle/Toggle.stories.mdx +0 -237
  229. package/src/components/Toggle/Toggle.test.tsx +0 -170
  230. package/src/components/Toggle/Toggle.tsx +0 -128
  231. package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +0 -470
  232. package/src/components/VideoPlayer/VideoPlayer.stories.mdx +0 -212
  233. package/src/components/VideoPlayer/VideoPlayer.test.tsx +0 -308
  234. package/src/components/VideoPlayer/VideoPlayer.tsx +0 -188
  235. package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +0 -192
  236. package/src/docs/Chakra.stories.mdx +0 -563
  237. package/src/docs/Welcome.stories.mdx +0 -148
  238. package/src/helpers/types.ts +0 -1
  239. package/src/hooks/tests/useCarouselStyles.test.ts +0 -140
  240. package/src/hooks/tests/useNYPLTheme.test.tsx +0 -36
  241. package/src/hooks/useCarouselStyles.stories.mdx +0 -30
  242. package/src/hooks/useCarouselStyles.ts +0 -35
  243. package/src/hooks/useNYPLTheme.stories.mdx +0 -98
  244. package/src/hooks/useNYPLTheme.ts +0 -91
  245. package/src/hooks/useWindowSize.stories.mdx +0 -23
  246. package/src/hooks/useWindowSize.ts +0 -40
  247. package/src/index.ts +0 -136
  248. package/src/resources.scss +0 -6
  249. package/src/styles/base/_01-breakpoints.scss +0 -27
  250. package/src/styles/base/_02-mixins.scss +0 -103
  251. package/src/styles/base/_place-holder.scss +0 -33
  252. package/src/styles/space/_space-inline.scss +0 -79
  253. package/src/styles/space/_space-inset.scss +0 -57
  254. package/src/styles/space/_space-stack.scss +0 -116
  255. package/src/styles.scss +0 -23
  256. package/src/theme/components/accordion.ts +0 -25
  257. package/src/theme/components/breadcrumb.ts +0 -94
  258. package/src/theme/components/button.ts +0 -133
  259. package/src/theme/components/buttonGroup.ts +0 -10
  260. package/src/theme/components/card.ts +0 -237
  261. package/src/theme/components/checkbox.ts +0 -110
  262. package/src/theme/components/checkboxGroup.ts +0 -10
  263. package/src/theme/components/componentWrapper.ts +0 -14
  264. package/src/theme/components/customTable.ts +0 -77
  265. package/src/theme/components/datePicker.ts +0 -17
  266. package/src/theme/components/fieldset.ts +0 -23
  267. package/src/theme/components/global.ts +0 -91
  268. package/src/theme/components/globalMixins.ts +0 -24
  269. package/src/theme/components/heading.ts +0 -79
  270. package/src/theme/components/helperErrorText.ts +0 -14
  271. package/src/theme/components/hero.ts +0 -238
  272. package/src/theme/components/horizontalRule.ts +0 -17
  273. package/src/theme/components/icon.ts +0 -88
  274. package/src/theme/components/image.ts +0 -136
  275. package/src/theme/components/label.ts +0 -15
  276. package/src/theme/components/link.ts +0 -63
  277. package/src/theme/components/list.ts +0 -88
  278. package/src/theme/components/logo.ts +0 -58
  279. package/src/theme/components/notification.ts +0 -132
  280. package/src/theme/components/pagination.ts +0 -17
  281. package/src/theme/components/progressIndicator.ts +0 -67
  282. package/src/theme/components/radio.ts +0 -103
  283. package/src/theme/components/radioGroup.ts +0 -10
  284. package/src/theme/components/searchBar.ts +0 -19
  285. package/src/theme/components/select.ts +0 -72
  286. package/src/theme/components/skeletonLoader.ts +0 -113
  287. package/src/theme/components/skipNavigation.ts +0 -29
  288. package/src/theme/components/slider.ts +0 -95
  289. package/src/theme/components/statusBadge.ts +0 -26
  290. package/src/theme/components/structuredContent.ts +0 -149
  291. package/src/theme/components/tabs.ts +0 -109
  292. package/src/theme/components/template.ts +0 -114
  293. package/src/theme/components/text.ts +0 -38
  294. package/src/theme/components/textInput.ts +0 -65
  295. package/src/theme/components/toggle.ts +0 -109
  296. package/src/theme/components/videoPlayer.ts +0 -47
  297. package/src/theme/foundations/breakpoints.ts +0 -24
  298. package/src/theme/foundations/colors.ts +0 -212
  299. package/src/theme/foundations/global.ts +0 -43
  300. package/src/theme/foundations/radii.ts +0 -7
  301. package/src/theme/foundations/shadows.ts +0 -5
  302. package/src/theme/foundations/spacing.ts +0 -136
  303. package/src/theme/foundations/typography.ts +0 -107
  304. package/src/theme/index.ts +0 -131
  305. package/src/theme/provider.tsx +0 -9
  306. package/src/theme/types.ts +0 -1
  307. package/src/utils/componentCategories.ts +0 -152
  308. package/src/utils/interfaces.ts +0 -5
  309. package/src/utils/utils.ts +0 -84
@@ -1 +1 @@
1
- {"version":3,"file":"design-system-react-components.esm.js","sources":["../src/components/Icons/IconSvgs.tsx","../src/components/Icons/Icon.tsx","../src/components/Accordion/Accordion.tsx","../src/components/Breadcrumbs/Breadcrumbs.tsx","../src/components/Button/Button.tsx","../src/hooks/useWindowSize.ts","../src/components/ButtonGroup/ButtonGroup.tsx","../src/components/Link/Link.tsx","../src/components/Heading/Heading.tsx","../src/components/Image/Image.tsx","../src/components/Card/Card.tsx","../src/components/HelperErrorText/HelperErrorText.tsx","../src/components/Text/Text.tsx","../src/components/ComponentWrapper/ComponentWrapper.tsx","../src/utils/utils.ts","../src/components/Checkbox/Checkbox.tsx","../src/components/Fieldset/Fieldset.tsx","../src/theme/foundations/spacing.ts","../src/components/CheckboxGroup/CheckboxGroup.tsx","../src/components/Grid/SimpleGrid.tsx","../src/components/Form/Form.tsx","../src/components/Label/Label.tsx","../src/components/TextInput/TextInput.tsx","../src/components/DatePicker/DatePicker.tsx","../src/theme/components/globalMixins.ts","../src/theme/components/global.ts","../src/theme/foundations/global.ts","../src/theme/foundations/breakpoints.ts","../src/theme/foundations/colors.ts","../src/theme/foundations/radii.ts","../src/theme/foundations/shadows.ts","../src/theme/foundations/typography.ts","../src/theme/components/accordion.ts","../src/theme/components/breadcrumb.ts","../src/theme/components/button.ts","../src/theme/components/buttonGroup.ts","../src/theme/components/card.ts","../src/theme/components/checkbox.ts","../src/theme/components/componentWrapper.ts","../src/theme/components/checkboxGroup.ts","../src/theme/components/image.ts","../src/theme/components/select.ts","../src/theme/components/datePicker.ts","../src/theme/components/fieldset.ts","../src/theme/components/link.ts","../src/theme/components/heading.ts","../src/theme/components/helperErrorText.ts","../src/theme/components/hero.ts","../src/theme/components/horizontalRule.ts","../src/theme/components/icon.ts","../src/theme/components/label.ts","../src/theme/components/list.ts","../src/theme/components/logo.ts","../src/theme/components/notification.ts","../src/theme/components/pagination.ts","../src/theme/components/progressIndicator.ts","../src/theme/components/radio.ts","../src/theme/components/radioGroup.ts","../src/theme/components/searchBar.ts","../src/theme/components/skeletonLoader.ts","../src/theme/components/skipNavigation.ts","../src/theme/components/slider.ts","../src/theme/components/statusBadge.ts","../src/theme/components/customTable.ts","../src/theme/components/structuredContent.ts","../src/theme/components/tabs.ts","../src/theme/components/template.ts","../src/theme/components/text.ts","../src/theme/components/textInput.ts","../src/theme/components/toggle.ts","../src/theme/components/videoPlayer.ts","../src/theme/index.ts","../src/theme/provider.tsx","../src/components/Hero/Hero.tsx","../src/components/HorizontalRule/HorizontalRule.tsx","../src/components/List/List.tsx","../src/components/Logo/LogoSvgs.tsx","../src/components/Logo/Logo.tsx","../src/components/Modal/Modal.tsx","../src/components/Notification/Notification.tsx","../src/components/Pagination/Pagination.tsx","../src/components/ProgressIndicator/ProgressIndicator.tsx","../src/components/Radio/Radio.tsx","../src/components/RadioGroup/RadioGroup.tsx","../src/components/Select/Select.tsx","../src/components/SearchBar/SearchBar.tsx","../src/components/SkeletonLoader/SkeletonLoader.tsx","../src/components/SkipNavigation/SkipNavigation.tsx","../src/components/Slider/Slider.tsx","../src/components/StatusBadge/StatusBadge.tsx","../src/components/StructuredContent/StructuredContent.tsx","../src/hooks/useCarouselStyles.ts","../src/components/Tabs/Tabs.tsx","../src/components/Template/Template.tsx","../src/components/Toggle/Toggle.tsx","../src/hooks/useNYPLTheme.ts","../src/components/VideoPlayer/VideoPlayer.tsx","../src/components/Table/Table.tsx"],"sourcesContent":["/* eslint-disable camelcase */\nimport accessibilityFull from \"../../../icons/svg/accessibility-full.svg\";\nimport accessibilityPartial from \"../../../icons/svg/accessibility-partial.svg\";\nimport actionCheckCircle from \"../../../icons/svg/action-check-circle.svg\";\nimport actionHelpDefault from \"../../../icons/svg/action-help-default.svg\";\nimport actionHelpOutline from \"../../../icons/svg/action-help-outline.svg\";\nimport actionLaunch from \"../../../icons/svg/action-launch.svg\";\nimport alertNotificationImportant from \"../../../icons/svg/alert-notification-important.svg\";\nimport arrow from \"../../../icons/svg/arrow.svg\";\nimport check from \"../../../icons/svg/check.svg\";\nimport clock from \"../../../icons/svg/clock.svg\";\nimport close from \"../../../icons/svg/close.svg\";\nimport fileTypeAudio from \"../../../icons/svg/file-type-audio.svg\";\nimport fileTypeDoc from \"../../../icons/svg/file-type-doc.svg\";\nimport fileTypeGenericDoc from \"../../../icons/svg/file-type-generic-doc.svg\";\nimport fileTypeImage from \"../../../icons/svg/file-type-image.svg\";\nimport fileTypePdf from \"../../../icons/svg/file-type-pdf.svg\";\nimport fileTypeSpreadsheet from \"../../../icons/svg/file-type-spreadsheet.svg\";\nimport fileTypeVideo from \"../../../icons/svg/file-type-video.svg\";\nimport download from \"../../../icons/svg/download.svg\";\nimport errorFilled from \"../../../icons/svg/error-filled.svg\";\nimport errorOutline from \"../../../icons/svg/error-outline.svg\";\nimport headset from \"../../../icons/svg/headset.svg\";\nimport minus from \"../../../icons/svg/minus.svg\";\nimport plus from \"../../../icons/svg/plus.svg\";\nimport search from \"../../../icons/svg/search.svg\";\nimport speakerNotes from \"../../../icons/svg/speaker-notes.svg\";\nimport utilityAccountFilled from \"../../../icons/svg/utility-account-filled.svg\";\nimport utilityAccountUnfilled from \"../../../icons/svg/utility-account-unfilled.svg\";\nimport utilityHamburger from \"../../../icons/svg/utility-hamburger.svg\";\nimport utilitySearch from \"../../../icons/svg/search.svg\";\n\nexport default {\n accessibilityFull,\n accessibilityPartial,\n actionCheckCircle,\n actionHelpDefault,\n actionHelpOutline,\n actionLaunch,\n alertNotificationImportant,\n arrow,\n check,\n clock,\n close,\n download,\n errorFilled,\n errorOutline,\n fileTypeAudio,\n fileTypeDoc,\n fileTypeGenericDoc,\n fileTypeImage,\n fileTypePdf,\n fileTypeSpreadsheet,\n fileTypeVideo,\n headset,\n minus,\n plus,\n search,\n speakerNotes,\n utilityAccountFilled,\n utilityAccountUnfilled,\n utilityHamburger,\n utilitySearch,\n};\n","import {\n Icon as ChakraIcon,\n Box,\n chakra,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport iconSvgs from \"./IconSvgs\";\n\nexport type IconAlign = \"left\" | \"right\" | \"none\";\nexport type IconColors =\n | \"ui.black\"\n | \"ui.white\"\n | \"brand.primary\"\n | \"brand.secondary\"\n | \"section.blogs.primary\"\n | \"section.blogs.secondary\"\n | \"section.books-and-more.primary\"\n | \"section.books-and-more.secondary\"\n | \"section.education.primary\"\n | \"section.education.secondary\"\n | \"section.locations.primary\"\n | \"section.locations.secondary\"\n | \"section.research.primary\"\n | \"section.research.secondary\"\n | \"section.research-library.lpa\"\n | \"section.research-library.schomburg\"\n | \"section.research-library.schwartzman\"\n | \"section.whats-on.primary\"\n | \"section.whats-on.secondary\";\nexport type IconNames =\n | \"accessibilityFull\"\n | \"accessibilityPartial\"\n | \"actionCheckCircle\"\n | \"actionHelpDefault\"\n | \"actionHelpOutline\"\n | \"actionLaunch\"\n | \"alertNotificationImportant\"\n | \"arrow\"\n | \"check\"\n | \"clock\"\n | \"close\"\n | \"download\"\n | \"errorFilled\"\n | \"errorOutline\"\n | \"fileTypeAudio\"\n | \"fileTypeDoc\"\n | \"fileTypeGenericDoc\"\n | \"fileTypeImage\"\n | \"fileTypePdf\"\n | \"fileTypeSpreadsheet\"\n | \"fileTypeVideo\"\n | \"headset\"\n | \"minus\"\n | \"plus\"\n | \"search\"\n | \"speakerNotes\"\n | \"utilityAccountFilled\"\n | \"utilityAccountUnfilled\"\n | \"utilityHamburger\"\n | \"utilitySearch\";\nexport type IconRotationTypes =\n | \"rotate0\"\n | \"rotate90\"\n | \"rotate180\"\n | \"rotate270\";\nexport type IconSizes =\n | \"default\"\n | \"small\"\n | \"medium\"\n | \"large\"\n | \"xlarge\"\n | \"xxlarge\"\n | \"xxxlarge\";\nexport type IconTypes = \"default\" | \"breadcrumbs\";\n\nexport interface IconProps {\n /** Aligns the icon. */\n align?: IconAlign;\n /** Optional className that will be added to the parent element */\n className?: string;\n /** Overrides default icon color (black). */\n color?: IconColors;\n /** Icons designated as decorative will be ignored by screenreaders. True\n * by default. */\n decorative?: boolean;\n /** Rotates the icon clockwise in increments of 90deg */\n iconRotation?: IconRotationTypes;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** The name of the icon you want to use. */\n name?: IconNames;\n /** Sets the icon size. */\n size?: IconSizes;\n /** For accessibility purposes, the text passed in the `title` prop gets\n * rendered in a `title` element in the SVG. This descriptive text is not\n * visible but is needed for screenreaders to describe the graphic. */\n title?: string;\n /** FOR INTERNAL DS USE ONLY: the icon variant to display. */\n type?: IconTypes;\n}\n\n/**\n * Renders SVG-based icons.\n */\nexport const Icon = chakra(\n (props: React.PropsWithChildren<IconProps>) => {\n const {\n align = \"none\",\n children,\n className,\n color = \"ui.black\",\n decorative = true,\n iconRotation = \"rotate0\",\n id,\n name,\n size = \"default\",\n title = `${name} icon`,\n type = \"default\",\n ...rest\n } = props;\n const styles = useStyleConfig(\"Icon\", {\n align,\n color,\n iconRotation,\n size,\n variant: type,\n });\n const iconProps = {\n \"aria-hidden\": decorative,\n className,\n id,\n role: \"img\",\n title,\n ...rest,\n };\n let childSVG = null;\n\n // Component prop validation\n if (name && children) {\n console.warn(\n \"NYPL Reservoir Icon: Pass in either a `name` prop or an `svg` element \" +\n \"child. Do not pass both.\"\n );\n return null;\n } else if (!name && !children) {\n console.warn(\n \"NYPL Reservoir Icon: Pass an icon `name` prop or an SVG child to \" +\n \"ensure an icon appears.\"\n );\n return null;\n }\n\n // The user wants to render an existing icon. Load the icon and render it\n // as a component through Chakra's Icon component. Otherwise, we're going to\n // render the SVG child with NYPL-theme styling.\n if (name) {\n const SvgComponent: any = iconSvgs[name];\n return <ChakraIcon as={SvgComponent} {...iconProps} __css={styles} />;\n }\n\n // If no `name` prop was passed, we expect a child SVG element to be passed.\n // Apply icon props to the SVG child.\n if (\n (children as JSX.Element).type === \"svg\" ||\n (children as JSX.Element).props?.type === \"svg\" ||\n (children as JSX.Element).props?.mdxType === \"svg\"\n ) {\n childSVG = React.cloneElement(children as JSX.Element, {\n ...iconProps,\n });\n } else {\n console.warn(\n \"NYPL Reservoir Icon: An `svg` element must be passed to the `Icon` \" +\n \"component as its child.\"\n );\n }\n\n return <Box __css={styles}>{childSVG}</Box>;\n },\n // Pass all custom props to Chakra and override, e.g. we want the\n // DS color value set and not color strings.\n { shouldForwardProp: () => true }\n);\n\nexport default Icon;\n","import {\n Accordion as ChakraAccordion,\n AccordionButton,\n AccordionItem,\n AccordionPanel,\n Box,\n chakra,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Icon from \"../Icons/Icon\";\n\nexport type AccordionTypes = \"default\" | \"warning\" | \"error\";\nexport interface AccordionDataProps {\n accordionType?: AccordionTypes;\n label: string;\n panel: string | React.ReactNode;\n}\nexport interface AccordionProps {\n /** Array of data to display, and an optional accordionType */\n accordionData: AccordionDataProps[];\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Whether the accordion is open by default only on its initial rendering */\n isDefaultOpen?: boolean;\n}\n\n/**\n * Get the minus or plus icon depending on whether the accordion\n * is open or closed.\n */\nconst getIcon = (isExpanded = false, index: number, id: string) => {\n const iconName = isExpanded ? \"minus\" : \"plus\";\n return (\n <Icon id={`accordion-${id}-icon-${index}`} name={iconName} size=\"small\" />\n );\n};\n\n/**\n * Returns `AccordionItems` for every accordion object in the data\n * array. This automatically creates the `AccordionButton` and `AccordionPanel`\n * combination that is required for the Chakra `Accordion` component.\n */\nconst getElementsFromData = (data: AccordionDataProps[] = [], id: string) => {\n const colorMap = {\n default: \"ui.white\",\n warning: \"ui.status.primary\",\n error: \"ui.status.secondary\",\n };\n // For FAQ-style multiple accordions, the button should be bigger.\n // Otherwise, use the default.\n const multipleFontSize = data?.length > 1 ? \"text.default\" : \"text.caption\";\n const multiplePadding = data?.length > 1 ? \"s\" : \"xs s\";\n\n return data.map((content, index) => {\n // This is done to support both string and DOM element input.\n const panel =\n typeof content.panel === \"string\" ? (\n <AccordionPanel\n id={`${id}-panel-${index}`}\n key={index}\n dangerouslySetInnerHTML={{ __html: content.panel }}\n />\n ) : (\n <AccordionPanel id={`${id}-panel-${index}`} key={index}>\n {content.panel}\n </AccordionPanel>\n );\n\n return (\n <AccordionItem id={`${id}-item-${index}`} key={index}>\n {/* Get the current state to render the correct icon. */}\n {({ isExpanded }) => {\n const bgColorByAccordionType = colorMap[content.accordionType];\n return (\n <>\n <AccordionButton\n id={`${id}-button-${index}`}\n padding={multiplePadding}\n bg={\n !content.accordionType\n ? colorMap.default\n : bgColorByAccordionType\n }\n _expanded={{\n bg:\n !content.accordionType ||\n content.accordionType === \"default\"\n ? \"ui.gray.light-cool\"\n : bgColorByAccordionType,\n }}\n _hover={{\n bg:\n !content.accordionType ||\n content.accordionType === \"default\"\n ? \"transparent\"\n : bgColorByAccordionType,\n borderColor: \"ui.gray.dark\",\n }}\n >\n <Box flex=\"1\" fontSize={multipleFontSize} textAlign=\"left\">\n {content.label}\n </Box>\n {getIcon(isExpanded, index, id)}\n </AccordionButton>\n {panel}\n </>\n );\n }}\n </AccordionItem>\n );\n });\n};\n\n/**\n * Accordion component that shows content on toggle. Can be used to display\n * multiple accordion items together.\n */\nexport const Accordion = chakra((props: AccordionProps) => {\n const { accordionData, id, isDefaultOpen = false, ...rest } = props;\n\n // Pass `0` to open the first accordion in the 0-index based array.\n const openFirstAccordion = isDefaultOpen ? [0] : undefined;\n\n return (\n <ChakraAccordion\n id={id}\n defaultIndex={openFirstAccordion}\n allowMultiple\n {...rest}\n >\n {getElementsFromData(accordionData, id)}\n </ChakraAccordion>\n );\n});\n\nexport default Accordion;\n","import {\n Breadcrumb as ChakraBreadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n chakra,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Icon from \"../Icons/Icon\";\n\nexport type BreadcrumbsTypes =\n | \"blogs\"\n | \"booksAndMore\"\n | \"education\"\n | \"locations\"\n | \"research\"\n | \"whatsOn\";\nexport interface BreadcrumbsDataProps {\n url: string;\n text: string | React.ReactNode;\n}\n\nexport interface BreadcrumbProps {\n /** Breadcrumb links as an array */\n breadcrumbsData: BreadcrumbsDataProps[];\n /** Used to control how the `Hero` component will be rendered. */\n breadcrumbsType?: BreadcrumbsTypes;\n /** className you can add in addition to 'input' */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n}\n\nconst getElementsFromData = (\n data: BreadcrumbsDataProps[],\n breadcrumbsID?: string\n) => {\n if (!data?.length) {\n return {};\n }\n\n const breadcrumbItems = data.map((breadcrumbData, index) => (\n <BreadcrumbItem\n key={index}\n isCurrentPage={index === data.length - 1 ? true : false}\n >\n <BreadcrumbLink href={breadcrumbData.url}>\n {index === data.length - 2 && (\n <Icon\n name=\"arrow\"\n size=\"small\"\n iconRotation=\"rotate90\"\n id={`${breadcrumbsID}__backarrow`}\n className=\"breadcrumbs-icon\"\n type=\"breadcrumbs\"\n />\n )}\n <span className=\"breadcrumb-label\">{breadcrumbData.text}</span>\n </BreadcrumbLink>\n </BreadcrumbItem>\n ));\n\n return breadcrumbItems;\n};\n\nexport const Breadcrumbs = chakra((props: BreadcrumbProps) => {\n const {\n breadcrumbsData,\n breadcrumbsType = \"whatsOn\",\n className,\n id,\n ...rest\n } = props;\n\n if (!breadcrumbsData || breadcrumbsData.length === 0) {\n throw new Error(\n \"NYPL Reservoir Breadcrumbs: No data was passed to the `breadcrumbsData` prop.\"\n );\n }\n\n const styles = useStyleConfig(\"Breadcrumb\", { variant: breadcrumbsType });\n const breadcrumbItems = getElementsFromData(breadcrumbsData, id);\n\n return (\n <ChakraBreadcrumb\n aria-label=\"Breadcrumb\"\n className={className}\n id={id}\n __css={styles}\n {...rest}\n >\n {breadcrumbItems}\n </ChakraBreadcrumb>\n );\n});\n\nexport default Breadcrumbs;\n","import {\n Button as ChakraButton,\n chakra,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Icon from \"../Icons/Icon\";\n\nexport type ButtonElementType = \"submit\" | \"button\" | \"reset\";\nexport type ButtonTypes =\n | \"primary\"\n | \"secondary\"\n | \"callout\"\n | \"pill\"\n | \"link\"\n | \"noBrand\";\n\ninterface ButtonProps {\n /** The button variation to render based on the `ButtonTypes` type.*/\n buttonType?: ButtonTypes;\n /** Additional className to use. */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes. */\n id: string;\n /** Adds 'disabled' property to the button. */\n isDisabled?: boolean;\n /** Trigger the Button's action through the `mouseDown` event handler instead\n * of `onClick`. `false` by default. */\n mouseDown?: boolean;\n /** The action to perform on the `<button>`'s onClick function. */\n onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;\n /** The HTML button type attribute. */\n type?: ButtonElementType;\n}\n\n/**\n * Renders a simple `button` element with custom variant styles.\n */\nexport const Button = chakra((props: React.PropsWithChildren<ButtonProps>) => {\n const {\n buttonType = \"primary\",\n children,\n className = \"\",\n id,\n isDisabled = false,\n mouseDown = false,\n onClick,\n type = \"button\",\n ...rest\n } = props;\n const btnCallback = mouseDown ? { onMouseDown: onClick } : { onClick };\n let childCount = 0;\n let hasIcon = false;\n let variant: string | ButtonTypes = buttonType;\n let styles = {};\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Button: This component's required `id` prop was not passed.\"\n );\n }\n\n React.Children.map(children as JSX.Element, (child: React.ReactElement) => {\n childCount++;\n if (child !== undefined && child !== null) {\n if (child.type === Icon || child?.props?.mdxType === \"Icon\") {\n hasIcon = true;\n }\n }\n });\n\n if (childCount === 1 && hasIcon) {\n variant = \"iconOnly\";\n }\n\n styles = useStyleConfig(\"Button\", { variant });\n\n return (\n <ChakraButton\n id={id}\n data-testid=\"button\"\n className={className}\n type={type}\n isDisabled={isDisabled}\n {...btnCallback}\n __css={styles}\n {...rest}\n >\n {children}\n </ChakraButton>\n );\n});\n\nexport default Button;\n","import React from \"react\";\n\ninterface WindowSize {\n width: number;\n height: number;\n}\n\n/**\n * React hook used to get the window size on device resizing.\n * Based on https://usehooks-typescript.com/react-hook/use-window-size\n */\nfunction useWindowSize(): WindowSize {\n const [windowSize, setWindowSize] = React.useState<WindowSize>({\n width: 0,\n height: 0,\n });\n\n React.useEffect(() => {\n const handler = () => {\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n };\n\n // Set size at the first client-side load\n handler();\n\n window.addEventListener(\"resize\", handler);\n\n // Remove event listener on cleanup\n return () => {\n window.removeEventListener(\"resize\", handler);\n };\n }, []);\n\n return windowSize;\n}\n\nexport default useWindowSize;\n","import { chakra, Stack, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Button from \"../Button/Button\";\nimport { LayoutTypes } from \"../../helpers/types\";\nimport useWindowSize from \"../../hooks/useWindowSize\";\n\nexport type ButtonGroupWidths = \"default\" | \"full\";\n\ninterface ButtonGroupProps {\n /** Sets the width to \"default\" (for \"fit-content\") or \"full\". */\n buttonWidth?: ButtonGroupWidths;\n /** Additional className to use. */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes. */\n id?: string;\n /** Set's the disabled state to all the internal `Button` components. */\n isDisabled?: boolean;\n /** Renders the layout of `Button` components in a row or column. */\n layout?: LayoutTypes;\n}\n\nconst noop = () => {};\n\n/**\n * A simple wrapper to group `Button` components together. The layout can be set\n * to row or column and the width of internal `Button` components can be set to\n * the parent's full width or the `Button`'s content width\n */\nexport const ButtonGroup = chakra(\n (props: React.PropsWithChildren<ButtonGroupProps>) => {\n const {\n buttonWidth = \"default\",\n children,\n className = \"\",\n id,\n isDisabled = false,\n layout = \"row\",\n ...rest\n } = props;\n const newChildren: JSX.Element[] = [];\n // Based on --nypl-breakpoint-medium\n const breakpointMedium = 600;\n const [finalLayout, setFinalLayout] = React.useState<LayoutTypes>(layout);\n const [finalButtonWidth, setFinalButtonWidth] =\n React.useState<ButtonGroupWidths>(buttonWidth);\n const windowDimensions = useWindowSize();\n React.useEffect(() => {\n // When on a mobile device or narrow window, always set the layout to\n // column and the button width to \"full\".\n if (windowDimensions.width <= breakpointMedium) {\n setFinalButtonWidth(\"full\");\n setFinalLayout(\"column\");\n } else {\n // Otherwise, set the layout and button width to the values\n // passed in via the `buttonWidth` and `layout` props.\n setFinalButtonWidth(buttonWidth);\n setFinalLayout(layout);\n }\n }, [buttonWidth, layout, windowDimensions.width]);\n const styles = useStyleConfig(\"ButtonGroup\", {\n buttonWidth: finalButtonWidth,\n });\n\n React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement, key: number) => {\n if (child.type !== Button) {\n // Special case for Storybook MDX documentation.\n if (child.props.mdxType && child.props.mdxType === \"Button\") {\n noop();\n } else {\n console.warn(\n \"NYPL Reservoir ButtonGroup: Only Button components can be children of ButtonGroup.\"\n );\n return;\n }\n }\n const disabledProps = isDisabled ? { isDisabled } : {};\n newChildren.push(React.cloneElement(child, { key, ...disabledProps }));\n }\n );\n\n return (\n <Stack\n id={id}\n className={className}\n direction={finalLayout}\n // Always set the spacing to \"8px\".\n spacing=\"xs\"\n sx={styles}\n {...rest}\n >\n {newChildren}\n </Stack>\n );\n }\n);\n\nexport default ButtonGroup;\n","import { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Icon from \"../Icons/Icon\";\n\nexport type LinkTypes =\n | \"action\"\n | \"backwards\"\n | \"button\"\n | \"default\"\n | \"external\"\n | \"forwards\";\nexport interface LinkProps {\n /** Any child node passed to the component. */\n children: React.ReactNode;\n /** Additional class name to render in the `Link` component. */\n className?: string;\n /** The `href` attribute for the anchor element. */\n href?: string;\n /** ID used for accessibility purposes. */\n id?: string;\n /** Controls the link visuals: action, button, backwards, forwards, or default. */\n type?: LinkTypes;\n}\n\n/**\n * Renders the `Link` children components with a direction arrow icon based\n * on the `\"backwards\"` or `\"forwards\"` `linkType` value.\n */\nfunction getWithDirectionIcon(\n children: JSX.Element,\n type: LinkTypes,\n linkId: string\n) {\n let iconRotation;\n let iconAlign;\n let icon = null;\n\n // An icon needs a position in order for it to be created and\n // rendered in the link.\n if (type === \"backwards\") {\n iconRotation = \"rotate90\";\n iconAlign = \"left\";\n } else if (type === \"forwards\") {\n iconRotation = \"rotate270\";\n iconAlign = \"right\";\n }\n\n const iconId = `${linkId}-icon`;\n\n icon = (\n <Icon\n align={iconAlign}\n className=\"more-link\"\n iconRotation={iconRotation}\n id={iconId}\n name=\"arrow\"\n size=\"medium\"\n />\n );\n\n return (\n <>\n {type === \"backwards\" && icon}\n {children}\n {type === \"forwards\" && icon}\n </>\n );\n}\n\nfunction getExternalIcon(children: JSX.Element, linkId: string) {\n const iconId = `${linkId}-icon`;\n const icon = (\n <Icon\n align={\"right\"}\n className=\"more-link\"\n id={iconId}\n name=\"actionLaunch\"\n size=\"medium\"\n />\n );\n\n return (\n <>\n {children}\n {icon}\n </>\n );\n}\n\n/**\n * A component that uses an `href` prop or a child anchor element, to create\n * an anchor element with added styling and conventions.\n */\nexport const Link = chakra(\n React.forwardRef<HTMLAnchorElement, LinkProps>((props, ref: any) => {\n const { children, className, href, id, type = \"default\", ...rest } = props;\n\n // Merge the necessary props alongside any extra props for the\n // anchor element.\n const linkProps = {\n id,\n href,\n ...rest,\n };\n // The \"default\" type.\n let variant = \"link\";\n\n if (typeof children === \"string\" && !href) {\n throw new Error(\"`Link` needs the `href` prop.\");\n }\n\n if (\n type === \"action\" ||\n type === \"forwards\" ||\n type === \"backwards\" ||\n type === \"external\"\n ) {\n variant = \"moreLink\";\n } else if (type === \"button\") {\n variant = \"button\";\n }\n const style = useStyleConfig(\"Link\", { variant });\n const rel = type === \"external\" ? \"nofollow\" : null;\n const target = type === \"external\" ? \"_blank\" : null;\n // Render with specific direction arrows if the type is\n // Forwards or Backwards. Or render with the launch icon\n // if the type is External. Otherwise, do not add an icon.\n const newChildren =\n ((type === \"forwards\" || type === \"backwards\") &&\n getWithDirectionIcon(children as JSX.Element, type, id)) ||\n (type === \"external\" && getExternalIcon(children as JSX.Element, id)) ||\n children;\n\n if (!href) {\n // React Types error makes this fail:\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/32832\n // let children = React.Children.only(children);\n if (React.Children.count(children) > 1) {\n throw new Error(\"Please pass only one child into `Link`.\");\n }\n const childrenToClone: any = children[0] ? children[0] : children;\n const childProps = childrenToClone.props;\n return (\n <Box as=\"span\" __css={style}>\n {React.cloneElement(\n childrenToClone,\n {\n className,\n ...linkProps,\n ...childProps,\n ref,\n rel,\n target,\n },\n [childrenToClone.props.children]\n )}\n </Box>\n );\n } else {\n return (\n <Box\n as=\"a\"\n className={className}\n ref={ref}\n rel={rel}\n target={target}\n {...linkProps}\n __css={style}\n >\n {newChildren}\n </Box>\n );\n }\n })\n);\n\nexport default Link;\n","import {\n chakra,\n Heading as ChakraHeading,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Link from \"../Link/Link\";\n\nexport type HeadingSizes = \"primary\" | \"secondary\" | \"tertiary\" | \"callout\";\nexport type HeadingLevels = \"one\" | \"two\" | \"three\" | \"four\" | \"five\" | \"six\";\nexport interface HeadingProps {\n /** Optional className that appears in addition to `heading` */\n className?: string;\n /** Optional ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Optional number 1-6 used to create the `<h*>` tag; if prop is not passed,\n * `Heading` will default to `<h2>` */\n level?: HeadingLevels;\n /** Optional size used to override the default styles of the semantic HTM\n * `<h>` elements */\n size?: HeadingSizes;\n /** Optional prop used to remove default spacing */\n noSpace?: boolean;\n /** Inner text of the `<h*>` element */\n text?: string;\n /** Optional URL that header points to; when `url` prop is passed to\n * `Heading`, a child `<a>` element is created and the heading text becomes\n * an active link */\n url?: string;\n /** Optional className for the URL when the `url` prop is passed */\n urlClass?: string;\n}\n\n/** Map the word heading level to the number heading level. The default is 2. */\nconst getMappedLevel = (level = \"two\") => {\n const levelMap = {\n one: 1,\n two: 2,\n three: 3,\n four: 4,\n five: 5,\n six: 6,\n };\n return levelMap[level] || 2;\n};\n\nexport const Heading = chakra(\n (props: React.PropsWithChildren<HeadingProps>) => {\n const {\n className,\n id,\n level = \"two\",\n size,\n noSpace,\n text,\n url,\n urlClass,\n ...rest\n } = props;\n const finalLevel = getMappedLevel(level);\n const variant = size ? size : `h${finalLevel}`;\n const styles = useStyleConfig(\"Heading\", { variant, noSpace });\n // Combine native base styles with any additional styles.\n // This is used in the `Hero` and `Notification` components.\n const asHeading: any = `h${finalLevel}`;\n\n if (!props.children && !text) {\n throw new Error(\n \"NYPL Reservoir Heading: No children or value was passed to the `text` prop.\"\n );\n }\n\n if (React.Children.count(props.children) > 1) {\n // Catching the error because React's error isn't as helpful.\n throw new Error(\n \"NYPL Reservoir Heading: Only pass one child into Heading.\"\n );\n }\n\n const contentToRender = props.children ? props.children : text;\n const content = url ? (\n <Link className={urlClass} href={url} id={`${id}-link`}>\n {contentToRender}\n </Link>\n ) : (\n contentToRender\n );\n\n return (\n <ChakraHeading\n as={asHeading}\n className={className}\n id={id}\n sx={styles}\n {...rest}\n >\n {content}\n </ChakraHeading>\n );\n }\n);\n\nexport default Heading;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport type ImageRatios =\n | \"fourByThree\"\n | \"oneByTwo\"\n | \"original\"\n | \"sixteenByNine\"\n | \"square\"\n | \"threeByFour\"\n | \"threeByTwo\"\n | \"twoByOne\";\nexport type ImageSizes =\n | \"default\"\n | \"xxsmall\"\n | \"xsmall\"\n | \"small\"\n | \"medium\"\n | \"large\";\nexport type ImageTypes = \"default\" | \"circle\";\n// Used for components that have an `imageProps` prop.\nexport interface ComponentImageProps {\n /** String value used to populate the `alt` attribute of the internal `Image`\n * component's `img` element. @NOTE if an image is used, this value must be passed. */\n alt?: string;\n /** Optional value to control the aspect ratio of the internal `Image` component.\n * Defaults to `ImageRatios.Square`. */\n aspectRatio?: ImageRatios;\n /** Optional value to render as a caption for the internal `Image` component. */\n caption?: string;\n /** Optional DOM element to use instead of the DS `Image` component. */\n component?: JSX.Element;\n /** Optional value to render as a credit for the internal `Image` component. */\n credit?: string;\n /** Optional value to control the size of the internal `Image` component.\n * Defaults to `ImageSizes.Default`. */\n size?: ImageSizes;\n /** Optional value that contains the path to an image. If omitted, the internal\n * DS `Image` component will not render. */\n src?: string;\n}\n\ninterface ImageWrapperProps {\n /** Optionally pass in additional Chakra-based styles. */\n additionalWrapperStyles?: { [key: string]: any };\n /** ClassName you can add in addition to 'image' */\n className?: string;\n /** Optional value to control the aspect ratio of the card image; default\n * value is `\"original\"` */\n aspectRatio?: ImageRatios;\n /** Optional value to control the size of the image */\n size?: ImageSizes;\n}\n\nexport interface ImageProps extends ImageWrapperProps {\n /** Optionally pass in additional Chakra-based styles only for the figure. */\n additionalFigureStyles?: { [key: string]: any };\n /** Optionally pass in additional Chakra-based styles only for the image. */\n additionalImageStyles?: { [key: string]: any };\n /** Alternate text description of the image */\n alt?: string;\n /** Adding will wrap the image in a <figure> */\n caption?: string;\n /** Custom image component */\n component?: JSX.Element | null;\n /** Adding will wrap the image in a <figure> */\n credit?: string;\n /** Optional value for the image type */\n imageType?: ImageTypes;\n /** The src attribute is required, and contains the path to the image you want to embed. */\n src?: string;\n}\n\nconst ImageWrapper = chakra(\n (props: React.PropsWithChildren<ImageWrapperProps>) => {\n const {\n additionalWrapperStyles = {},\n className = \"\",\n children,\n aspectRatio = \"original\",\n size = \"default\",\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"CustomImageWrapper\", {\n ratio: aspectRatio,\n size,\n });\n return (\n <Box\n className={`the-wrap ${className}`}\n __css={{ ...styles, ...additionalWrapperStyles }}\n {...rest}\n >\n <Box className=\"the-crop\" __css={styles.crop}>\n {children}\n </Box>\n </Box>\n );\n }\n);\n\nexport const Image = chakra((props: ImageProps) => {\n const {\n additionalFigureStyles = {},\n additionalImageStyles = {},\n additionalWrapperStyles = {},\n alt,\n aspectRatio = \"original\",\n caption,\n className = \"\",\n component,\n credit,\n imageType = \"default\",\n size = \"default\",\n src,\n ...rest\n } = props;\n const useImageWrapper = aspectRatio !== \"original\";\n const styles = useMultiStyleConfig(\"CustomImage\", {\n variant: imageType,\n size,\n });\n\n if (alt && alt.length > 300) {\n throw new Error(\n \"NYPL Reservoir Image: Alt text must be less than 300 characters.\"\n );\n }\n\n const imageComponent: JSX.Element = component ? (\n component\n ) : (\n <Box\n as=\"img\"\n src={src}\n alt={alt}\n __css={{ ...styles.img, ...additionalImageStyles }}\n />\n );\n const finalImage = useImageWrapper ? (\n <ImageWrapper\n additionalWrapperStyles={additionalWrapperStyles}\n aspectRatio={aspectRatio}\n className={className}\n size={size}\n {...(caption || credit ? {} : rest)}\n >\n {imageComponent}\n </ImageWrapper>\n ) : (\n imageComponent\n );\n\n return caption || credit ? (\n <Box\n as=\"figure\"\n __css={{ ...styles.figure, ...additionalFigureStyles }}\n {...rest}\n >\n {finalImage}\n <Box as=\"figcaption\" __css={styles.figcaption}>\n {caption && <Box __css={styles.captionWrappers}>{caption}</Box>}\n {credit && <Box __css={styles.captionWrappers}>{credit}</Box>}\n </Box>\n </Box>\n ) : (\n finalImage\n );\n});\n\nexport default Image;\n","import {\n Box,\n chakra,\n LinkBox as ChakraLinkBox,\n LinkOverlay as ChakraLinkOverlay,\n useMultiStyleConfig,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport { LayoutTypes } from \"../../helpers/types\";\nimport Heading from \"../Heading/Heading\";\nimport Image, {\n ComponentImageProps,\n ImageProps,\n ImageSizes,\n} from \"../Image/Image\";\nimport useWindowSize from \"../../hooks/useWindowSize\";\n\ninterface CustomColorProps {\n backgroundColor?: string;\n color?: string;\n}\n\ninterface CardBaseProps {\n /** Optional value to control the alignment of the text and elements. */\n isCentered?: boolean;\n /** Optional value to render the layout in a row or column.\n * Default is `\"column\"`. */\n layout?: LayoutTypes;\n}\n\ninterface CardLinkBoxProps {\n /** Main link to use when the full `Card` component should be clickable. */\n mainActionLink?: string;\n}\n\n// Used internally only for the `imageProps` prop for the `Card` component.\ninterface CardImageProps extends ComponentImageProps {\n /** Optional boolean value to control the position of the `CardImage`. */\n isAtEnd?: boolean;\n}\n\ninterface CardActionsProps extends CardBaseProps {\n /** Optional boolean value to control visibility of border on the bottom edge\n * of the card actions element */\n bottomBorder?: boolean;\n /** Optional boolean value to control visibility of border on the top edge of\n * the card actions element */\n topBorder?: boolean;\n}\n\n/** Used only internally for the `CardImage` component. */\ninterface CardImageComponentProps extends CardBaseProps, ImageProps {\n /** Optional boolean value to control the position of the `CardImage`. */\n isAtEnd?: boolean;\n}\n\nexport interface CardProps extends CardBaseProps, CardLinkBoxProps {\n /** Optional hex color value used to set the card background color. */\n backgroundColor?: string;\n /** Optional CSS class name to add. */\n className?: string;\n /** Optional hex color value used to override the default text color. */\n foregroundColor?: string;\n /** ID that other components can cross reference for accessibility purposes. */\n id?: string;\n /** Optional boolean value to control the visibility of a border around\n * the card. */\n isBordered?: boolean;\n /** Object used to create and render the `Image` component. */\n imageProps?: CardImageProps;\n /** Set CardActions to the right content side. This only works in\n * the row layout. */\n isAlignedRightActions?: boolean;\n}\n\n/**\n * The CardImage component is used internally in the `Card` component. It\n * renders an `Image` component but with overriding styles specific to the\n * `Card` component.\n */\nfunction CardImage(\n props: React.ComponentProps<\"img\"> & CardImageComponentProps\n) {\n const {\n alt,\n aspectRatio,\n caption,\n component,\n credit,\n isAtEnd,\n isCentered,\n layout,\n size,\n src,\n } = props;\n // Additional styles to add to the `Image` component.\n const styles = useStyleConfig(\"CardImage\", {\n imageIsAtEnd: isAtEnd,\n isCentered,\n layout,\n size,\n });\n return (\n <Box __css={styles}>\n <Image\n alt={alt}\n caption={caption}\n component={component}\n credit={credit}\n aspectRatio={aspectRatio}\n size={size}\n src={src}\n />\n </Box>\n );\n}\n\n// CardHeading child-component\nexport const CardHeading = chakra(Heading);\n\n// CardContent child-component\nexport const CardContent = chakra((props: React.PropsWithChildren<{}>) => {\n const { children, ...rest } = props;\n const styles = useStyleConfig(\"CardContent\");\n return children ? (\n <Box __css={styles} {...rest}>\n {children}\n </Box>\n ) : null;\n});\n\n// CardActions child-component\nexport const CardActions = chakra(\n (props: React.PropsWithChildren<CardActionsProps>) => {\n const { bottomBorder, children, isCentered, layout, topBorder, ...rest } =\n props;\n const styles = useStyleConfig(\"CardActions\", {\n bottomBorder,\n isCentered,\n layout,\n topBorder,\n });\n\n return children ? (\n <Box __css={styles} {...rest}>\n {children}\n </Box>\n ) : null;\n }\n);\n\n/**\n * If `mainActionLink` is passed, then this adds Chakra's `LinkBox` wrapper\n * component to the entire `Card` component. This works together with the\n * `CardLinkOverlay` component to provide a clickable overlay.\n */\nfunction CardLinkBox({\n children,\n mainActionLink,\n}: React.PropsWithChildren<CardLinkBoxProps>) {\n return mainActionLink ? (\n <ChakraLinkBox>{children}</ChakraLinkBox>\n ) : (\n <>{children}</>\n );\n}\n\n/**\n * If `mainActionLink` is passed, then this adds Chakra's `LinkOverlay` around\n * text that should be linked, in this case the `CardHeading` text. This works\n * together with the `CardLinkBox` component to provide a clickable overlay to\n * the `Card` component while still allowing links in the `CardActions` to be\n * clickable.\n */\nfunction CardLinkOverlay({\n children,\n mainActionLink,\n}: React.PropsWithChildren<CardLinkBoxProps>) {\n return mainActionLink ? (\n <ChakraLinkOverlay href={mainActionLink}>{children}</ChakraLinkOverlay>\n ) : (\n <>{children}</>\n );\n}\n\nexport const Card = chakra((props: React.PropsWithChildren<CardProps>) => {\n const {\n backgroundColor,\n children,\n className,\n foregroundColor,\n id,\n imageProps = {\n alt: \"\",\n aspectRatio: \"square\",\n caption: undefined,\n component: undefined,\n credit: undefined,\n isAtEnd: false,\n size: \"default\",\n src: \"\",\n },\n isAlignedRightActions = false,\n isBordered,\n isCentered = false,\n layout = \"column\",\n mainActionLink,\n ...rest\n } = props;\n const hasImage = imageProps.src || imageProps.component;\n const [finalImageSize, setFinalImageSize] = React.useState<ImageSizes>(\n imageProps.size || \"default\"\n );\n const finalImageAspectRatio = imageProps.component\n ? \"original\"\n : imageProps.aspectRatio;\n const customColors: CustomColorProps = {};\n const cardContents: JSX.Element[] = [];\n const cardRightContents: JSX.Element[] = [];\n const windowDimensions = useWindowSize();\n let cardHeadingCount = 0;\n\n if (imageProps.component && imageProps.aspectRatio) {\n console.warn(\n \"NYPL Reservoir Card: Both the `imageProps.component` and `imageProps.aspectRatio` \" +\n \"props were set but `imageProps.aspectRatio` will be ignored in favor \" +\n \"of the aspect ratio on `imageProps.component` prop.\"\n );\n }\n\n // The `Card`'s image should always display as 100% width on mobile. To\n // achieve this, we set the size to `\"default\"` only when the\n // viewport is less than \"600px\". Otherwise, we set the size to\n // the value passed in via `imageSize`.\n React.useEffect(() => {\n if (windowDimensions.width < 600) {\n setFinalImageSize(\"default\");\n } else {\n setFinalImageSize(imageProps.size);\n }\n }, [windowDimensions.width, imageProps.size]);\n\n backgroundColor && (customColors[\"backgroundColor\"] = backgroundColor);\n foregroundColor && (customColors[\"color\"] = foregroundColor);\n\n const styles = useMultiStyleConfig(\"Card\", {\n hasImage,\n imageIsAtEnd: imageProps.isAtEnd,\n isAlignedRightActions,\n isBordered,\n isCentered,\n layout,\n mainActionLink,\n });\n\n React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement, key) => {\n const isCardActions =\n child.type === CardActions || child.props.mdxType === \"CardActions\";\n if (child.type === CardHeading || child.props.mdxType === \"CardHeading\") {\n // If the child is a `CardHeading` component, then we add the\n // `CardLinkOverlay` inside of the `Heading` component and wrap its text.\n // This allows other links in the `CardActions` to be clickable. This is\n // only done for the first `CardHeading` component but does not affect\n // the full-click feature.\n const newChildren =\n cardHeadingCount === 0 ? (\n <CardLinkOverlay mainActionLink={mainActionLink}>\n {child.props.children}\n </CardLinkOverlay>\n ) : (\n child.props.children\n );\n const elem = React.cloneElement(child, {\n key,\n // Override the child text with the potential `CardLinkOverlay`.\n children: newChildren,\n layout,\n __css: styles.heading,\n });\n cardContents.push(elem);\n cardHeadingCount++;\n } else if (\n child.type === CardContent ||\n child.props.mdxType === \"CardContent\"\n ) {\n const elem = React.cloneElement(child, { key });\n cardContents.push(elem);\n } else if (isCardActions) {\n const elem = React.cloneElement(child, { key, isCentered, layout });\n\n // Only allow `CardActions` to align to the right of the main\n // `CardContent` component when in the row layout.\n if (isAlignedRightActions && layout === \"row\") {\n cardRightContents.push(elem);\n } else {\n cardContents.push(elem);\n }\n }\n }\n );\n\n return (\n <CardLinkBox mainActionLink={mainActionLink}>\n <Box\n id={id}\n className={className}\n __css={{\n ...styles,\n ...customColors,\n }}\n {...rest}\n >\n {hasImage && (\n <CardImage\n alt={imageProps.alt}\n aspectRatio={finalImageAspectRatio}\n caption={imageProps.caption}\n component={imageProps.component}\n credit={imageProps.credit}\n isAtEnd={imageProps.isAtEnd}\n layout={layout}\n size={finalImageSize}\n src={imageProps.src ? imageProps.src : undefined}\n />\n )}\n <Box className=\"card-body\" __css={styles.body}>\n {cardContents}\n </Box>\n {cardRightContents.length ? (\n <Box\n className=\"card-right\"\n __css={{ ...styles.body, ...styles.actions }}\n >\n {cardRightContents}\n </Box>\n ) : null}\n </Box>\n </CardLinkBox>\n );\n});\n\nexport default Card;\n","import { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport type AriaLiveValues = \"assertive\" | \"off\" | \"polite\";\nexport type HelperErrorTextType = string | JSX.Element;\n\ninterface HelperErrorTextProps {\n /** Aria attribute. When true, assistive technologies will\n * read the entire DOM element. When false, only changes (additionals or\n * removals) will be read. True by default. */\n ariaAtomic?: boolean;\n /** Aria attribute used in the invalid state to read error text by default.\n * This indicates the priority of the text and when it should be presented to\n * users using screen readers; \"off\" indicates that the content should not be\n * presented, \"polite\" that it will be announced at the next available time\n * slot, and \"assertive\" that it should be announced immediately. This is set\n * to \"off\" by default and to \"polite\" by when `isInvalid` is true. */\n ariaLive?: AriaLiveValues;\n /** Additional className to add. */\n className?: string;\n /** Unique ID for accessibility purposes. */\n id?: string;\n /** Toggles between helper and invalid styling. */\n isInvalid?: boolean;\n /** The text to display. */\n text: HelperErrorTextType;\n}\n\n/**\n * Helper or error text for forms components.\n */\nexport const HelperErrorText = chakra(\n ({\n ariaAtomic = true,\n ariaLive = \"polite\",\n className = \"\",\n id,\n isInvalid = false,\n text,\n ...rest\n }: HelperErrorTextProps) => {\n // Only announce the text in the invalid state.\n const announceAriaLive = isInvalid;\n const styles = useStyleConfig(\"HelperErrorText\", { isInvalid });\n const props = {\n \"aria-atomic\": ariaAtomic,\n \"aria-live\": announceAriaLive ? ariaLive : \"off\",\n className,\n \"data-isinvalid\": isInvalid,\n id,\n __css: styles,\n ...rest,\n };\n return typeof text === \"string\" ? (\n <Box {...props} dangerouslySetInnerHTML={{ __html: text }} />\n ) : (\n <Box {...props}>{text}</Box>\n );\n }\n);\n\nexport default HelperErrorText;\n","import { Text as ChakraText, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport type TextSizes = \"default\" | \"caption\" | \"tag\" | \"mini\";\n\nexport interface TextProps {\n /** Additional class name to render in the `Text` component. */\n className?: string;\n /** Optional prop used to show bolded text */\n isBold?: boolean;\n /** Optional prop used to show itlicized text */\n isItalic?: boolean;\n /** Optional prop used to remove default spacing */\n noSpace?: boolean;\n /** Optional prop to control the text styling */\n size?: TextSizes;\n}\n\nexport const Text = chakra((props: React.PropsWithChildren<TextProps>) => {\n const {\n children,\n className = \"\",\n isBold,\n isItalic,\n noSpace,\n size = \"default\",\n ...rest\n } = props;\n const styles = useStyleConfig(\"Text\", {\n variant: size,\n isBold,\n isItalic,\n noSpace,\n });\n\n if (!children) {\n console.warn(\n \"NYPL Reservoir Text: No children were passed and the `Text` component \" +\n \"will not render correctly.\"\n );\n }\n\n return (\n <ChakraText className={className} sx={styles} {...rest}>\n {children}\n </ChakraText>\n );\n});\n\nexport default Text;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Heading from \"../Heading/Heading\";\nimport HelperErrorText, {\n HelperErrorTextType,\n} from \"../HelperErrorText/HelperErrorText\";\nimport Text from \"../Text/Text\";\nexport interface ComponentWrapperProps {\n /** The UI elements that will be wrapped by this component */\n children: React.ReactNode;\n /** A class name for the `div` parent element. */\n className?: string;\n /** Optional string to set the text for the component's description */\n descriptionText?: string;\n /** Optional string to set the text for a `Heading` component */\n headingText?: string;\n /** Optional string to set the text for a `HelperErrorText` component */\n helperText?: HelperErrorTextType;\n /** Styles that target the helper text. */\n helperTextStyles?: { [key: string]: any };\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Optional string to populate the `HelperErrorText` for the error state\n * when `isInvalid` is true. */\n invalidText?: HelperErrorTextType;\n /** Sets invalid text in the error state. */\n isInvalid?: boolean;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n}\n\nexport const ComponentWrapper = chakra(\n (props: React.PropsWithChildren<ComponentWrapperProps>) => {\n const {\n children,\n className,\n descriptionText,\n headingText,\n helperText,\n helperTextStyles = {},\n id,\n invalidText,\n isInvalid = false,\n showHelperInvalidText = true,\n ...rest\n } = props;\n const hasChildren = !!children;\n const styles = useMultiStyleConfig(\"ComponentWrapper\", { hasChildren });\n const footnote = isInvalid ? invalidText : helperText;\n\n // Note: Typescript warns when there are no children passed and\n // doesn't compile. This is meant to log in non-Typescript apps.\n if (!hasChildren) {\n console.warn(\"NYPL Reservoir ComponentWrapper: No children were passed.\");\n }\n\n return (\n <Box className={className} id={`${id}-wrapper`} __css={styles} {...rest}>\n {headingText && <Heading id={`${id}-heading`} text={headingText} />}\n {descriptionText && <Text>{descriptionText}</Text>}\n {children}\n {footnote && showHelperInvalidText && (\n <HelperErrorText\n id={`${id}-helperText`}\n isInvalid={isInvalid}\n text={footnote}\n __css={{ ...styles.helperErrorText, ...helperTextStyles }}\n />\n )}\n </Box>\n );\n }\n);\n\nexport default ComponentWrapper;\n","import { HelperErrorTextType } from \"../components/HelperErrorText/HelperErrorText\";\nimport { AriaAttributes } from \"./interfaces\";\n\n// Utility functions to use throughout the codebase\n\n/**\n * range\n * Get an array of values from `start` to `stop` - 1 with an optional\n * `step` between values.\n */\nexport const range = (start: number, stop: number, step = 1): number[] => {\n if (!start) {\n return [];\n }\n\n return Array(Math.ceil((stop - start) / step))\n .fill(start)\n .map((x, y) => x + y * step);\n};\n\n/**\n * Given a pagination's pageCount, this will return (1) a page number,\n * derived from the current URL, and (2) a function that, when passed to\n * Pagination component, makes the URL change and refreshes the page.\n * @NOTE this is only used for Storybook documentation.\n */\nexport const getStorybookHrefProps = (pageCount: number) => {\n // This uses the `addon-queryparams` Storybook addon.\n const urlParams = new URLSearchParams(document.location.search);\n const pageParam = urlParams.get(\"page\");\n\n const getPageNumber = (page: number, pageCount: number) => {\n return page > 0 && page <= pageCount ? page : 1;\n };\n const computedCurrentPage =\n pageParam &&\n Number(pageParam) &&\n getPageNumber(Number(pageParam), pageCount);\n const location = window.location;\n // Passing this function into `Pagination` makes the URL to change\n // and refreshes the page.\n const getPageHref = (selectedPage: number) => {\n return `${location.href}&page=${selectedPage}`;\n };\n\n return { computedCurrentPage, getPageHref };\n};\n\ninterface GetAriaAttrsProps {\n footnote: HelperErrorTextType;\n id: string;\n labelText: HelperErrorTextType;\n name: string;\n showLabel: boolean;\n}\n/**\n * Get aria-* attributes for input components. This sets the `aria-label` and\n * `aria-describedby` attributes, based on the label and footnote values.\n */\nexport const getAriaAttrs = ({\n footnote,\n id,\n labelText,\n name,\n showLabel,\n}: GetAriaAttrsProps): AriaAttributes => {\n let ariaAttributes: AriaAttributes = {};\n\n if (!showLabel) {\n if (typeof labelText !== \"string\") {\n console.warn(\n `NYPL Reservoir ${name}: \\`labelText\\` must be a string when \\`showLabel\\` is false.`\n );\n }\n ariaAttributes[\"aria-label\"] =\n labelText && footnote\n ? `${labelText} - ${footnote}`\n : (labelText as string);\n } else if (footnote) {\n ariaAttributes[\"aria-describedby\"] = `${id}-helperText`;\n }\n\n return ariaAttributes;\n};\n","import {\n chakra,\n Checkbox as ChakraCheckbox,\n Icon,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport { getAriaAttrs } from \"../../utils/utils\";\n\ninterface CheckboxIconProps {\n /** When using the Checkbox as a \"controlled\" form element, you can specify\n * the Checkbox's checked state using this prop.\n * Learn more about controlled and uncontrolled form fields:\n * https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */\n isChecked?: boolean;\n /** Adds the indeterminate state to the `Checkbox`. */\n isIndeterminate?: boolean;\n}\n\nexport interface CheckboxProps extends CheckboxIconProps {\n /** className you can add in addition to 'input' */\n className?: string;\n /** Optional string to populate the HelperErrorText for standard state */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the HelperErrorText for the error state\n * when `isInvalid` is true. */\n invalidText?: HelperErrorTextType;\n /** Adds the 'disabled' and `aria-disabled` attributes to the input when true.\n * This also makes the text italic and color scheme gray. */\n isDisabled?: boolean;\n /** Adds the 'aria-invalid' attribute to the input when true. This also makes\n * the color theme \"NYPL error\" red for the button and text. */\n isInvalid?: boolean;\n /** Adds the 'required' attribute to the input when true. */\n isRequired?: boolean;\n /** The checkbox's label. This will serve as the text content for a `<label>`\n * element if `showlabel` is true, or an \"aria-label\" if `showLabel` is false. */\n labelText: string | JSX.Element;\n /** The name prop indicates into which group of checkboxes this checkbox\n * belongs. If none is specified, 'default' will be used */\n name?: string;\n /** The action to perform on the `<input>`'s onChange function */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the checkbox's label onscreen or hide it.\n * Refer to the `labelText` property for more information. */\n showLabel?: boolean;\n /** Populates the value of the input */\n value?: string;\n}\n\nfunction CheckboxIcon(props: CheckboxIconProps) {\n // We don't need the `isIndeterminate` or `isChecked` props but it\n // causes rendering issues on the SVG element, so we remove them\n // before passing all the props to the `Icon` component.\n const { isIndeterminate, isChecked, ...rest } = props;\n\n return (\n <Icon viewBox=\"0 0 24 24\" {...rest}>\n <path\n fill=\"currentColor\"\n d=\"M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z\"\n />\n </Icon>\n );\n}\n\nexport const Checkbox = chakra(\n React.forwardRef<HTMLInputElement, CheckboxProps>((props, ref?) => {\n const {\n className,\n invalidText,\n helperText,\n id,\n isChecked,\n isDisabled = false,\n isIndeterminate = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n name,\n onChange,\n showHelperInvalidText = true,\n showLabel = true,\n value,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"Checkbox\", {});\n const footnote = isInvalid ? invalidText : helperText;\n // Use Chakra's default indeterminate icon.\n const icon = !isIndeterminate ? <CheckboxIcon /> : undefined;\n const ariaAttributes = getAriaAttrs({\n footnote,\n id,\n labelText,\n name: \"Checkbox\",\n showLabel,\n });\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Checkbox: This component's required `id` prop was not passed.\"\n );\n }\n\n return (\n <ComponentWrapper\n helperText={helperText}\n helperTextStyles={styles.helperErrorText}\n id={id}\n invalidText={invalidText}\n isInvalid={isInvalid}\n showHelperInvalidText={showHelperInvalidText}\n {...rest}\n >\n <ChakraCheckbox\n className={className}\n icon={icon}\n id={id}\n isDisabled={isDisabled}\n isIndeterminate={isIndeterminate}\n isInvalid={isInvalid}\n isRequired={isRequired}\n name={name || \"default\"}\n ref={ref}\n value={value}\n {...(isChecked !== undefined\n ? {\n isChecked,\n onChange,\n }\n : {\n defaultIsChecked: false,\n })}\n alignItems=\"flex-start\"\n __css={styles}\n {...ariaAttributes}\n >\n {showLabel && labelText}\n </ChakraCheckbox>\n </ComponentWrapper>\n );\n })\n);\n\nexport default Checkbox;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport React from \"react\";\n\ninterface FieldsetProps {\n /** Additional class name to add. */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Flag to show or hide the text in the `legend` element. False by default. */\n isLegendHidden?: boolean;\n /** Flag to render \"Required\" in the `legend`. True by default. */\n isRequired?: boolean;\n /** Text to display in the `legend` element. */\n legendText?: string;\n /** Whether or not to display the \"(Required)\" text in the `legend` text.\n * True by default. */\n showRequiredLabel?: boolean;\n}\n\n/**\n * A wrapper component that renders a `fieldset` element along with a `legend`\n * element as its first child. Commonly used to wrap form components.\n */\nexport const Fieldset = chakra(\n ({\n children,\n className,\n id,\n isLegendHidden = false,\n isRequired = false,\n legendText,\n showRequiredLabel = true,\n ...rest\n }: React.PropsWithChildren<FieldsetProps>) => {\n const styles = useMultiStyleConfig(\"Fieldset\", { isLegendHidden });\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Fieldset: This component's required `id` prop was not passed.\"\n );\n }\n\n return (\n <Box as=\"fieldset\" id={id} __css={styles} className={className} {...rest}>\n <legend>\n {legendText}\n {showRequiredLabel && isRequired && <span> (Required)</span>}\n </legend>\n {children}\n </Box>\n );\n }\n);\n\nexport default Fieldset;\n","/**\n * Chakra spacing values are based on:\n * root size of 16px or 1rem\n * 1 spacing unit is 4px or 0.25rem\n *\n * Chakra's mental model: If you need a spacing of 40px, divide it by 4.\n * That'll give you 10. Then use it in your component.\n *\n * The DS uses nine CSS variables/values found in \"src/styles/03-space/_space.css\":\n * --nypl-space-xxxs = 2px or 0.125rem\n * --nypl-space-xxs = 4px or 0.25rem\n * --nypl-space-xs = 8px or 0.5rem\n * --nypl-space-s = 16px or 1rem\n * --nypl-space-m = 24px or 1.5rem\n * --nypl-space-l = 32px or 2rem\n * --nypl-space-xl = 48px or 3rem\n * --nypl-space-xxl = 64px or 4rem\n * --nypl-space-xxxl = 96px or 6rem\n *\n * @note Even though all the following values are available through Chakra,\n * we recommend to only use the spacing values that map to the DS values\n * declared above.\n *\n * Chakra Number Value | Chakra Name value | DS Variable\n * ------------------- | ----------------- | -----------------\n * 0.5 | xxxs | --nypl-space-xxxs\n * 1 | xxs | --nypl-space-xxs\n * 2 | xs | --nypl-space-xs\n * 4 | s | --nypl-space-s\n * 6 | m | --nypl-space-m\n * 8 | l | --nypl-space-l\n * 12 | xl | --nypl-space-xl\n * 16 | xxl | --nypl-space-xxl\n * 24 | xxxl | --nypl-space-xxxl\n */\nconst chakraSpacingTokens = {\n px: \"1px\",\n 0: \"0\",\n 0.5: \"0.125rem\",\n 1: \"0.25rem\",\n 1.5: \"0.375rem\",\n 2: \"0.5rem\",\n 2.5: \"0.625rem\",\n 3: \"0.75rem\",\n 3.5: \"0.875rem\",\n 4: \"1rem\",\n 5: \"1.25rem\",\n 6: \"1.5rem\",\n 7: \"1.75rem\",\n 8: \"2rem\",\n 9: \"2.25rem\",\n 10: \"2.5rem\",\n 12: \"3rem\",\n 14: \"3.5rem\",\n 16: \"4rem\",\n 20: \"5rem\",\n 24: \"6rem\",\n 28: \"7rem\",\n 32: \"8rem\",\n 36: \"9rem\",\n 40: \"10rem\",\n 44: \"11rem\",\n 48: \"12rem\",\n 52: \"13rem\",\n 56: \"14rem\",\n 60: \"15rem\",\n 64: \"16rem\",\n 72: \"18rem\",\n 80: \"20rem\",\n 96: \"24rem\",\n};\nconst reservoirSpacingValues = {\n xxxs: \"0.125rem\", // 2px\n xxs: \"0.25rem\", // 4px\n xs: \"0.5rem\", // 8px\n s: \"1rem\", // 16px\n m: \"1.5rem\", // 24px\n l: \"2rem\", // 32px\n xl: \"3rem\", // 48px\n xxl: \"4rem\", // 64px\n xxxl: \"6rem\", // 96px\n};\nconst reservoirSpacingTokens = {\n // Reservoir generic tokens\n xxxs: reservoirSpacingValues[\"xxxs\"],\n xxs: reservoirSpacingValues[\"xxs\"],\n xs: reservoirSpacingValues[\"xs\"],\n s: reservoirSpacingValues[\"s\"],\n m: reservoirSpacingValues[\"m\"],\n l: reservoirSpacingValues[\"l\"],\n xl: reservoirSpacingValues[\"xl\"],\n xxl: reservoirSpacingValues[\"xxl\"],\n xxxl: reservoirSpacingValues[\"xxxl\"],\n // Reservoir semantic tokens\n input: {\n group: {\n button: {\n hstack: reservoirSpacingValues[\"xs\"],\n vstack: reservoirSpacingValues[\"xs\"],\n },\n default: {\n hstack: reservoirSpacingValues[\"l\"],\n vstack: reservoirSpacingValues[\"s\"],\n },\n },\n },\n inset: {\n default: reservoirSpacingValues[\"s\"],\n extranarrow: reservoirSpacingValues[\"xxs\"],\n extrawide: reservoirSpacingValues[\"xl\"],\n narrow: reservoirSpacingValues[\"xs\"],\n wide: reservoirSpacingValues[\"l\"],\n },\n grid: {\n default: reservoirSpacingValues[\"l\"],\n xxs: reservoirSpacingValues[\"xxs\"],\n xs: reservoirSpacingValues[\"xs\"],\n s: reservoirSpacingValues[\"s\"],\n m: reservoirSpacingValues[\"m\"],\n l: reservoirSpacingValues[\"l\"],\n xl: reservoirSpacingValues[\"xl\"],\n xxl: reservoirSpacingValues[\"xxl\"],\n },\n page: {\n hstack: reservoirSpacingValues[\"l\"],\n vstack: reservoirSpacingValues[\"l\"],\n },\n table: {\n column: reservoirSpacingValues[\"m\"],\n row: reservoirSpacingValues[\"l\"],\n },\n};\nexport const spacing = {\n ...chakraSpacingTokens,\n ...reservoirSpacingTokens,\n};\n","import {\n chakra,\n CheckboxGroup as ChakraCheckboxGroup,\n Stack,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Checkbox from \"../Checkbox/Checkbox\";\nimport Fieldset from \"../Fieldset/Fieldset\";\nimport HelperErrorText, {\n HelperErrorTextType,\n} from \"../HelperErrorText/HelperErrorText\";\nimport { LayoutTypes } from \"../../helpers/types\";\nimport { spacing } from \"../../theme/foundations/spacing\";\n\nexport interface CheckboxGroupProps {\n /** Any child node passed to the component. */\n children: React.ReactNode;\n /** Populates the initial value of the input */\n defaultValue?: string[];\n /** Optional string to populate the HelperErrorText for standard state */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the HelperErrorText for error state */\n invalidText?: HelperErrorTextType;\n /** Adds the 'disabled' prop to the input when true. */\n isDisabled?: boolean;\n /** Set's the `Checkbox`s' wrapper to be full width. */\n isFullWidth?: boolean;\n /** A`dds the 'aria-invalid' attribute to the input and\n * sets the error state when true. */\n isInvalid?: boolean;\n /** Adds the 'required' attribute to the input when true. */\n isRequired?: boolean;\n /** The checkbox group label displayed in a `legend` element if `showlabel` is\n * true, or an \"aria-label\" if `showLabel` is false. */\n labelText: string;\n /** Renders the checkbox buttons in a row or column (default). */\n layout?: LayoutTypes;\n /** The `name` prop indicates the form group for all the `Checkbox` children. */\n name: string;\n /** The action to perform on the `<input>`'s onChange function */\n onChange?: (value: string[]) => void;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the group's legend onscreen or hide it. Refer\n * to the `labelText` property for more information. */\n showLabel?: boolean;\n /** Whether or not to display the \"(Required)\" text in the label text.\n * True by default. */\n showRequiredLabel?: boolean;\n}\n\nconst noop = () => {};\n\n/**\n * Wrapper component to wrap `Checkbox` components. Can be displayed in a\n * column or in a row. The `CheckboxGroup` component renders all the necessary\n * wrapping and associated text elements, but the checkbox input elements\n * _need_ to be child `Checkbox` components from the NYPL Design System.\n */\nexport const CheckboxGroup = chakra(\n React.forwardRef<HTMLInputElement, CheckboxGroupProps>((props, ref?) => {\n const {\n children,\n defaultValue = [],\n helperText,\n id,\n invalidText,\n isDisabled = false,\n isFullWidth = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n layout = \"column\",\n name,\n onChange,\n showHelperInvalidText = true,\n showLabel = true,\n showRequiredLabel = true,\n ...rest\n } = props;\n const footnote = isInvalid ? invalidText : helperText;\n const newChildren: JSX.Element[] = [];\n const spacingProp =\n layout === \"column\"\n ? spacing.input.group.default.vstack\n : spacing.input.group.default.hstack;\n const checkboxProps =\n defaultValue && onChange\n ? {\n defaultValue,\n onChange,\n }\n : {};\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir CheckboxGroup: This component's required `id` prop was not passed.\"\n );\n }\n\n // Go through the Checkbox children and update them as needed.\n React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement, i) => {\n if (child.type !== Checkbox) {\n // Special case for Storybook MDX documentation.\n if (child.props.mdxType && child.props.mdxType === \"Checkbox\") {\n noop();\n } else {\n console.warn(\n \"NYPL Reservoir CheckboxGroup: Only `Checkbox` components are \" +\n \"allowed as children.\"\n );\n }\n }\n\n if (child !== undefined && child !== null) {\n const newProps = {\n key: i,\n id: `${id}-${i}`,\n name,\n isDisabled,\n isInvalid,\n isRequired,\n };\n newChildren.push(React.cloneElement(child, newProps));\n }\n }\n );\n\n // Get the Chakra-based styles for the custom elements in this component.\n const styles = useMultiStyleConfig(\"CheckboxGroup\", { isFullWidth });\n\n return (\n <Fieldset\n id={`${id}-checkbox-group`}\n isLegendHidden={!showLabel}\n isRequired={isRequired}\n legendText={labelText}\n showRequiredLabel={showRequiredLabel}\n {...rest}\n __css={styles}\n >\n <ChakraCheckboxGroup {...checkboxProps}>\n <Stack\n id={id}\n data-testid=\"checkbox-group\"\n direction={[layout]}\n spacing={spacingProp}\n ref={ref}\n aria-label={!showLabel ? labelText : undefined}\n >\n {newChildren}\n </Stack>\n </ChakraCheckboxGroup>\n {footnote && showHelperInvalidText && (\n <HelperErrorText\n id={`${id}-helperErrorText`}\n isInvalid={isInvalid}\n text={footnote}\n __css={styles.helperErrorText}\n />\n )}\n </Fieldset>\n );\n })\n);\n\nexport default CheckboxGroup;\n","import { chakra, SimpleGrid as ChakraSimpleGrid } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport type GridGaps =\n | \"grid.xxs\"\n | \"grid.xs\"\n | \"grid.s\"\n | \"grid.m\"\n | \"grid.l\"\n | \"grid.xl\"\n | \"grid.xxl\";\nexport interface SimpleGridProps {\n /** Additional class name. */\n className?: string;\n /** Optional numeric value to override the default column count; the default\n * column count is 3. */\n columns?: number;\n /** Optional gap size; if omitted, the default `large` (2rem / 32px) spacing\n * will be used; `IMPORTANT: for standard grid layouts, this prop should\n * not be used.` */\n gap?: GridGaps;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n}\n\nexport const SimpleGrid = chakra(\n (props: React.PropsWithChildren<SimpleGridProps>) => {\n const { children, columns, className, gap = \"grid.l\", id, ...rest } = props;\n\n const responsiveCols = columns\n ? { base: 1, md: columns }\n : { base: 1, md: 2, lg: 3 };\n\n return (\n <ChakraSimpleGrid\n columns={responsiveCols}\n gap={gap}\n id={id}\n className={className}\n {...rest}\n >\n {children}\n </ChakraSimpleGrid>\n );\n },\n { shouldForwardProp: () => true }\n);\n\nexport default SimpleGrid;\n","import { chakra } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport SimpleGrid, { GridGaps } from \"../Grid/SimpleGrid\";\n\ninterface FormBaseProps {\n /** className to be applied to FormRow, FormField, and Form */\n className?: string;\n /** Optional spacing size; if omitted, the default `large` (2rem / 32px)\n * spacing will be used; ```IMPORTANT: for general form layout, this prop\n * should not be used``` */\n gap?: GridGaps;\n /** ID that other components can cross reference (internal use) */\n id: string;\n}\n\nexport interface FormChildProps extends Partial<FormBaseProps> {}\n\nexport interface FormProps extends FormBaseProps {\n /** Optional form `action` attribute */\n action?: string;\n /** Optional form `method` attribute */\n method?: \"get\" | \"post\";\n /** Function to call for the `onSubmit` form event. */\n onSubmit?: (e: React.FormEvent<HTMLFormElement>) => void;\n}\n\n/** FormRow child-component */\nexport const FormRow = chakra(\n (props: React.PropsWithChildren<FormChildProps>) => {\n const { children, className, gap, id, ...rest } = props;\n const count = React.Children.count(children);\n const alteredChildren = React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement, i) => {\n if (!child) return null;\n if (child.type === FormField || child.props.mdxType === \"FormField\") {\n return React.cloneElement(child, { id: `${id}-grandchild${i}` });\n }\n console.warn(\n \"NYPL Reservoir FormRow: Children must be `FormField` components.\"\n );\n return null;\n }\n );\n return (\n <SimpleGrid\n columns={count}\n className={className}\n gap={gap}\n id={id}\n {...rest}\n >\n {alteredChildren}\n </SimpleGrid>\n );\n }\n);\n\n/** FormField child-component */\nexport const FormField = chakra(\n (props: React.PropsWithChildren<FormChildProps>) => {\n const { children, className, gap, id, ...rest } = props;\n return (\n <SimpleGrid columns={1} className={className} gap={gap} id={id} {...rest}>\n {children}\n </SimpleGrid>\n );\n }\n);\n\n/** Main Form component */\nexport const Form = chakra(\n (props: React.PropsWithChildren<FormProps>) => {\n const {\n action,\n children,\n className,\n gap = \"grid.l\",\n id,\n method,\n onSubmit,\n ...rest\n } = props;\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Form: This component's required `id` prop was not passed.\"\n );\n }\n\n const attributes: Partial<FormProps> = {};\n action && (attributes[\"action\"] = action);\n\n method &&\n (method === \"get\" || method === \"post\") &&\n (attributes[\"method\"] = method);\n\n const alteredChildren = React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement, i) => {\n return React.cloneElement(child, { gap, id: `${id}-child${i}` });\n }\n );\n\n return (\n <form\n aria-label=\"form\"\n className={className}\n id={id}\n onSubmit={onSubmit}\n {...attributes}\n {...rest}\n >\n <SimpleGrid columns={1} gap={gap} id={`${id}-parent`}>\n {alteredChildren}\n </SimpleGrid>\n </form>\n );\n },\n { shouldForwardProp: () => true }\n);\n\nexport default Form;\n","import { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\ninterface LabelProps {\n /** Additional CSS class name to render in the `label` element. */\n className?: string;\n /** The id of the html element that this `Label` is describing. */\n htmlFor: string;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Controls whether the label should be inline with the input it goes with.\n * This prop should only be used internally. */\n isInlined?: boolean;\n /** Controls whether the \"(Required)\" text should be displayed alongside the\n * label's text. False by default. */\n isRequired?: boolean;\n}\n\n/**\n * A label for form inputs. It should never be used alone.\n */\nexport const Label = chakra((props: React.PropsWithChildren<LabelProps>) => {\n const {\n children,\n className,\n htmlFor,\n id,\n isInlined = false,\n isRequired = false,\n ...rest\n } = props;\n const styles = useStyleConfig(\"Label\", { isInlined });\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Label: This component's required `id` prop was not passed.\"\n );\n }\n\n return (\n <Box\n as=\"label\"\n id={id}\n className={className}\n htmlFor={htmlFor}\n __css={styles}\n {...rest}\n >\n {children}\n {isRequired && <span> (Required)</span>}\n </Box>\n );\n});\n\nexport default Label;\n","import {\n chakra,\n Input as ChakraInput,\n Textarea as ChakraTextarea,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport Label from \"../Label/Label\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport { getAriaAttrs } from \"../../utils/utils\";\n\n// HTML Input types as defined by MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input\nexport type TextInputTypes =\n | \"email\"\n | \"hidden\"\n | \"number\"\n | \"password\"\n | \"text\"\n | \"textarea\"\n | \"tel\"\n | \"url\";\n\n// Only used internally.\nexport const TextInputFormats = {\n email: \"jdoe@domain.com\",\n hidden: \"\",\n password: \"\",\n text: \"\",\n tel: \"(123) 123-1234\",\n textarea: \"\",\n url: \"https://domain.com\",\n};\n\n// Only used internally in `TextInput` and `SearchBar`.\nexport type TextInputVariants = \"default\" | \"searchBar\" | \"searchBarSelect\";\n\nexport interface InputProps {\n /** A class name for the TextInput parent div. */\n className?: string;\n /** The starting value of the input field. */\n defaultValue?: string;\n /** Populates the HelperErrorText for the standard state */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Populates the HelperErrorText for the error state */\n invalidText?: HelperErrorTextType;\n /** Adds the `disabled` and `aria-disabled` prop to the input when true */\n isDisabled?: boolean;\n /** Adds errored styling to the input/textarea and helper text elements */\n isInvalid?: boolean;\n /** Will add `required` and `aria-required` props to the input/textarea elements */\n isRequired?: boolean;\n /** Provides text for a `Label` component if `showLabel` is set to true;\n * populates an `aria-label` attribute if `showLabel` is set to false. */\n labelText: string;\n /** The max number for a `number` TextInput type. */\n max?: number;\n /** The max length of the input field. */\n maxLength?: number;\n /** The min number for a `number` TextInput type. */\n min?: number;\n /** Used to reference the input element in forms. */\n name?: string;\n /** The action to perform on the `input`/`textarea`'s onChange function */\n onChange?: (\n event:\n | React.ChangeEvent<HTMLInputElement>\n | React.ChangeEvent<HTMLTextAreaElement>\n ) => void;\n /** The action to perform on the `input`/`textarea`'s onClick function */\n onClick?: (event: React.MouseEvent<HTMLInputElement, MouseEvent>) => void;\n /** The action to perform on the `input`/`textarea`'s onFocus function */\n onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n /** Populates the placeholder for the input/textarea elements */\n placeholder?: string;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the label onscreen or hide it. Refer to the\n * `labelText` property for more information. */\n showLabel?: boolean;\n /** Whether or not to display the \"(Required)\" text in the label text.\n * True by default. */\n showRequiredLabel?: boolean;\n /** The amount to increase or decrease when using the number type. */\n step?: number;\n /** FOR INTERNAL DS USE ONLY: the input variant to display. */\n textInputType?: TextInputVariants;\n /** HTML Input types as defined by MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input */\n type?: TextInputTypes;\n /** Populates the value of the input/textarea elements */\n value?: string;\n}\n\n/**\n * The type used for `ref`s. We want to extend both `input` and `textarea`\n * since both are available to create through `TextInput`.\n */\nexport type TextInputRefType = HTMLInputElement & HTMLTextAreaElement;\n\n/**\n * Renders either an `input` element with a specified type or a `textarea`\n * element. All types will render an accessible `Label` component and an\n * optional `HelperErrorText` component.\n */\nexport const TextInput = chakra(\n React.forwardRef<TextInputRefType, InputProps>(\n (props, ref: React.Ref<TextInputRefType>) => {\n const {\n className,\n defaultValue,\n helperText,\n id,\n invalidText,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n max,\n maxLength,\n min,\n name,\n onChange,\n onClick,\n onFocus,\n placeholder,\n showHelperInvalidText = true,\n showLabel = true,\n showRequiredLabel = true,\n step = 1,\n textInputType = \"default\",\n type = \"text\",\n value,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"TextInput\", {\n variant: textInputType,\n });\n const isTextArea = type === \"textarea\";\n const isHidden = type === \"hidden\";\n const finalInvalidText = invalidText\n ? invalidText\n : \"There is an error related to this field.\";\n let footnote: HelperErrorTextType = isInvalid\n ? finalInvalidText\n : helperText;\n const ariaAttributes = getAriaAttrs({\n footnote,\n id,\n labelText,\n name: \"TextInput\",\n showLabel,\n });\n let fieldOutput;\n let options;\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir TextInput: This component's required `id` prop was not passed.\"\n );\n }\n\n if (type === \"tel\" || type === \"url\" || type === \"email\") {\n const example = TextInputFormats[type] || \"\";\n footnote = (\n <>\n Ex: {example}\n <br />\n {footnote}\n </>\n );\n }\n\n // When the type is \"hidden\", the input element needs fewer attributes.\n options = isHidden\n ? { id, \"aria-hidden\": isHidden, name, onChange, ref }\n : {\n \"aria-required\": isRequired,\n defaultValue,\n id,\n isDisabled,\n isRequired,\n isInvalid,\n max,\n maxLength,\n min,\n name,\n onChange,\n onClick,\n onFocus,\n placeholder,\n ref,\n // The `step` attribute is useful for the number type.\n step: type === \"number\" ? step : null,\n ...ariaAttributes,\n ...rest,\n };\n // For `input` and `textarea`, all attributes are the same but `input`\n // also needs `type` and `value` to render correctly.\n if (!isTextArea) {\n options = { type, value, ...options } as any;\n fieldOutput = <ChakraInput {...options} __css={styles.input} />;\n } else {\n fieldOutput = (\n <ChakraTextarea {...options} __css={styles.textarea}>\n {value}\n </ChakraTextarea>\n );\n }\n\n return (\n <ComponentWrapper\n className={className}\n helperText={helperText}\n id={id}\n invalidText={finalInvalidText}\n isInvalid={isInvalid}\n showHelperInvalidText={showHelperInvalidText && !isHidden}\n __css={styles}\n {...rest}\n >\n {labelText && showLabel && !isHidden && (\n <Label\n htmlFor={id}\n id={`${id}-label`}\n isRequired={showRequiredLabel && isRequired}\n >\n {labelText}\n </Label>\n )}\n {fieldOutput}\n </ComponentWrapper>\n );\n }\n )\n);\n\nexport default TextInput;\n","import { chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport React, { useState, forwardRef } from \"react\";\nimport ReactDatePicker from \"react-datepicker\";\n\nimport Fieldset from \"../Fieldset/Fieldset\";\nimport { FormRow, FormField } from \"../Form/Form\";\nimport HelperErrorText, {\n HelperErrorTextType,\n} from \"../HelperErrorText/HelperErrorText\";\nimport TextInput, {\n InputProps,\n TextInputRefType,\n} from \"../TextInput/TextInput\";\n\ninterface ReactDatePickerAttrs {\n popperClassName: string;\n popperPlacement: string;\n popperModifiers: any[];\n minDate: Date | null;\n maxDate: Date | null;\n dateFormat: string;\n showMonthYearPicker?: boolean;\n showYearPicker?: boolean;\n yearItemNumber?: number;\n}\nexport type DatePickerTypes = \"full\" | \"month\" | \"year\";\n\n// The object shape for the DatePicker's start and end date state values.\nexport interface FullDateType {\n /** Date object that gets returned for the onChange\n * function only for date ranges. */\n endDate?: Date;\n /** Date object that gets returned for the onChange function. */\n startDate: Date;\n}\n\n// Used for the input fields' parent wrapper. Internal use only.\ninterface DateRangeRowProps {\n /** ID that other components can cross reference for accessibility purposes. */\n id: string;\n /** Whether to render a single date input or two for a range of two dates. */\n isDateRange?: boolean;\n}\n\n// Interface used by the `div` or `fieldset` parent wrapper element.\n// Internal use only.\ninterface DatePickerWrapperProps extends DateRangeRowProps {\n /** Additional className. */\n className?: string;\n /** Adds the 'required' property to the input element(s). */\n isRequired?: boolean;\n /** Passed to the `TextInput` component to render a label associated with an input field. */\n labelText: string;\n /** Offers the ability to show the label onscreen or hide it. */\n showLabel?: boolean;\n /** Whether or not to display the \"(Required)\" text in the label text.\n * True by default. */\n showRequiredLabel?: boolean;\n}\n\n// Interface used by the internal DS `TextInput` component as a custom\n// component for the ReactDatePicker plugin component. Internal use only.\ninterface CustomTextInputProps extends Partial<InputProps> {\n /** The ReactDatePicker plugin manipulates the ref value so we declare our\n * own for some cases. */\n dsRef?: React.Ref<TextInputRefType>;\n /** The ReactDatePicker plugin has its own `required` prop so we use this to\n * pass the value from the parent `DatePicker` component. */\n isRequired?: boolean;\n /** Event handler used by the ReactDatePicker plugin to open the popup calendar. */\n onClick?: (data: any) => any;\n /** Data value used by the ReactDatePicker plugin and the custom TextInput component. */\n value?: string;\n}\n\n// Main interface for the exported DS DatePicker component.\nexport interface DatePickerProps extends DatePickerWrapperProps {\n /** The date format to display. Defaults to \"yyyy-MM-dd\".\n * Must be in ISO-8601 format. */\n dateFormat?: string;\n /** DatePicker date types that can be rendered. */\n dateType?: DatePickerTypes;\n /** Populates the `HelperErrorText` component in this component. */\n helperText?: HelperErrorTextType;\n /** Populates the `HelperErrorText` component in the \"From\" `TextInput` component. */\n helperTextFrom?: string;\n /** Populates the `HelperErrorText` component in the \"To\" `TextInput` component. */\n helperTextTo?: string;\n /** The initial date value. This must be in the mm/dd/yyyy format. */\n initialDate?: string;\n /** The initialTo date value used for date ranges.\n * This must be in the mm/dd/yyyy format. */\n initialDateTo?: string;\n /** Populates the `HelperErrorText` error state for both \"From\"\n * and \"To\" input components. */\n invalidText?: HelperErrorTextType;\n /** Adds the 'disabled' property to the input element(s). */\n isDisabled?: boolean;\n /** Adds 'isInvalid' styling. */\n isInvalid?: boolean;\n /** Adds the 'required' property to the input element(s). */\n isRequired?: boolean;\n /** The maximum date value that applies to both input fields.\n * This must be in the mm/dd/yyyy format. */\n maxDate?: string;\n /** The minimum date value that applies to both input fields.\n * This must be in the mm/dd/yyyy format. */\n minDate?: string;\n /** Value name for the single input field or the \"From\" input field in a date range. */\n nameFrom?: string;\n /** Value name for the \"To\" input field */\n nameTo?: string;\n /** The action to perform on the `input`'s onChange function for both fields.\n * This will return the data in an object with `startDate` and `endDate` keys.\n */\n onChange?: (data: FullDateType) => void;\n /** An additional explicit React ref passed for a date range's \"To\"\n * input field. Note that the \"From\" input takes the initial \"ref\" value. */\n refTo?: React.Ref<TextInputRefType>;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n}\n\n/**\n * A Design System `TextInput` component that is used as the custom input\n * element for the `react-datepicker` plugin. This uses `forwardRef` because,\n * internally, the `react-datepicker` plugin needs to keep track of the input data.\n * @note This is only used internally for this file.\n * @note we don't declare an `onClick` prop but the `react-datepicker` plugin\n * takes care of that. That is used and needed to open/close the popup calendar.\n */\nconst CustomTextInput = forwardRef<TextInputRefType, CustomTextInputProps>(\n (\n {\n dsRef,\n helperText,\n id,\n invalidText,\n isDisabled,\n isInvalid,\n isRequired,\n labelText,\n name,\n onChange,\n onClick,\n showLabel,\n showHelperInvalidText,\n showRequiredLabel,\n value,\n },\n ref: React.Ref<TextInputRefType>\n ) => {\n return (\n <TextInput\n helperText={helperText}\n id={id}\n invalidText={invalidText}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n labelText={labelText}\n name={name}\n onChange={onChange}\n onClick={onClick}\n showHelperInvalidText={showHelperInvalidText}\n showLabel={showLabel}\n showRequiredLabel={showRequiredLabel}\n value={value}\n // Use either the specific prop-based or the `forwardRef` value.\n // `react-datepicker` manipulates the `ref` value so when we\n // want a specific ref, use the `dsRef` prop.\n ref={dsRef || ref}\n />\n );\n }\n);\n\n/**\n * This is the wrapper component that is rendered as the parent for the input\n * element(s). For a single date input field, we need to render a \"div\", while\n * for a date range we render a \"fieldset\".\n * @note This is only used internally for this file.\n */\nconst DatePickerWrapper: React.FC<DatePickerWrapperProps> = chakra(\n ({\n children,\n className,\n id,\n isDateRange,\n isRequired,\n labelText,\n showLabel,\n showRequiredLabel,\n ...rest\n }) => (\n <FormField id={`${id}-form-field`} {...rest}>\n {isDateRange ? (\n <Fieldset\n className={className}\n id={id}\n isLegendHidden={!showLabel}\n isRequired={isRequired}\n legendText={labelText}\n showRequiredLabel={showRequiredLabel}\n >\n {children}\n </Fieldset>\n ) : (\n children\n )}\n </FormField>\n ),\n { shouldForwardProp: () => true }\n);\n\n/**\n * This is the wrapper component that conditionally renders the input fields\n * in a `FormRow` only for date range options. This is used for a better visual\n * layout for the two side-by-side date input fields.\n * @note This is only used internally for this file.\n */\nconst DateRangeRow: React.FC<DateRangeRowProps> = ({\n id,\n isDateRange,\n children,\n}) =>\n isDateRange ? (\n <FormRow id={`${id}-form-row`} gap=\"grid.xs\">\n {children}\n </FormRow>\n ) : (\n <>{children}</>\n );\n\n/**\n * Returns a single date input field or two date input fields for a date range.\n */\nexport const DatePicker = chakra(\n React.forwardRef<TextInputRefType, DatePickerProps>((props, ref?) => {\n const {\n className,\n dateFormat = \"yyyy-MM-dd\",\n dateType = \"full\",\n helperText,\n helperTextFrom,\n helperTextTo,\n id,\n initialDate,\n initialDateTo,\n invalidText,\n isDateRange = false,\n isDisabled,\n isInvalid,\n isRequired,\n labelText = \"From\",\n maxDate,\n minDate,\n nameFrom,\n nameTo,\n onChange,\n refTo,\n showHelperInvalidText = true,\n showLabel = true,\n showRequiredLabel = true,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"DatePicker\", {});\n const finalStyles = isDateRange ? styles : {};\n const initStartDate = initialDate ? new Date(initialDate) : new Date();\n const initEndDate = initialDateTo ? new Date(initialDateTo) : new Date();\n let initFullDate: FullDateType = { startDate: initStartDate };\n // Only include the `endDate` key for date ranges.\n if (isDateRange) {\n initFullDate = { ...initFullDate, endDate: initEndDate };\n }\n const [fullDate, setFullDate] = useState<FullDateType>(initFullDate);\n // This updates the internal state for the start and end date values,\n // and also calls the `onChange` prop if it was passed to return the\n // date value to the parent.\n const onChangeDefault = (date: Date, value: string) => {\n setFullDate({ ...fullDate, [value]: date });\n onChange && onChange({ ...fullDate, [value]: date });\n };\n // How many years to display in the \"year\" option.\n const yearsToDisplay = 12;\n // Both `ReactDatePicker` components share some props.\n let baseDatePickerAttrs: ReactDatePickerAttrs = {\n popperClassName: \"date-picker-calendar\",\n popperPlacement: \"bottom-start\",\n popperModifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, -8],\n },\n },\n ],\n minDate: minDate ? new Date(minDate) : null,\n maxDate: maxDate ? new Date(maxDate) : null,\n dateFormat,\n };\n // Both custom `TextInput` components share some props.\n let baseCustomTextInputAttrs = {\n isRequired,\n // In the date range type, don't display the \"(Required)\" text in\n // individual input labels. It'll display in the legend element.\n showRequiredLabel: isDateRange ? false : showRequiredLabel,\n // Always display the labels for the input fields when\n // the DatePicker component is a date range type.\n showLabel: isDateRange ? true : showLabel,\n isDisabled,\n isInvalid,\n helperText: isDateRange ? helperTextFrom : helperText,\n showHelperInvalidText,\n invalidText,\n __css: finalStyles.subLabels,\n };\n // These are attribute objects for the `react-datepicker` package component.\n let startDatePickerAttrs = {};\n let endDatePickerAttrs = {};\n // This sets set only for date ranges for the \"To\" input field.\n let endDatePickerElement = null;\n // This changes to \"From\" when `isDateRange` is true.\n let startLabelText = labelText;\n\n // Update the appropriate props for the selected date type to render.\n if (dateType === \"month\") {\n baseDatePickerAttrs[\"showMonthYearPicker\"] = true;\n baseDatePickerAttrs.dateFormat = \"MM-yyyy\";\n } else if (dateType === \"year\") {\n baseDatePickerAttrs[\"showYearPicker\"] = true;\n baseDatePickerAttrs[\"yearItemNumber\"] = yearsToDisplay;\n baseDatePickerAttrs.dateFormat = \"yyyy\";\n }\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir DatePicker: This component's required `id` prop was not passed.\"\n );\n }\n\n if ((ref && !nameFrom) || (refTo && !nameTo)) {\n console.warn(\n \"NYPL Reservoir DatePicker: A `ref` or `refTo` prop was passed but \" +\n \"not the equivalent `nameFrom` or `nameTo` prop.\"\n );\n }\n if (onChange && (ref || refTo || nameFrom || nameTo)) {\n console.warn(\n \"NYPL Reservoir DatePicker: A `ref`, `refTo`, `nameFrom`, or `nameTo` \" +\n \"prop was passed and an `onChange` prop as well. Use whichever is best \" +\n \"for your app but not both.\"\n );\n }\n\n // Set the \"From\" DatePicker values here based on the base props. If a date\n // range is selected, additional props get added automatically.\n startDatePickerAttrs = { ...baseDatePickerAttrs };\n\n // A date range is selected. We must now update the props for the\n // \"start\"/\"from\" input component and render an \"end\"/\"To\" input component.\n if (isDateRange) {\n const endCustomTextInputAttrs = {\n ...baseCustomTextInputAttrs,\n helperText: helperTextTo,\n };\n // These props are used to follow the pattern recommended by\n // the react-datepicker plugin.\n startDatePickerAttrs = {\n ...startDatePickerAttrs,\n selectsStart: true,\n startDate: fullDate.startDate,\n endDate: fullDate.endDate,\n };\n endDatePickerAttrs = {\n ...baseDatePickerAttrs,\n selectsEnd: true,\n minDate: fullDate.startDate,\n startDate: fullDate.startDate,\n endDate: fullDate.endDate,\n };\n startLabelText = \"From\";\n endDatePickerElement = (\n <ReactDatePicker\n customInput={\n <CustomTextInput\n dsRef={refTo}\n labelText=\"To\"\n {...endCustomTextInputAttrs}\n />\n }\n id={`${id}-end`}\n name={nameTo}\n onChange={(date: Date) => onChangeDefault(date, \"endDate\")}\n selected={fullDate.endDate}\n {...endDatePickerAttrs}\n />\n );\n }\n const startDatePickerElement = (\n <ReactDatePicker\n customInput={\n <CustomTextInput\n dsRef={ref}\n labelText={startLabelText}\n {...baseCustomTextInputAttrs}\n />\n }\n id={`${id}-start`}\n name={nameFrom}\n onChange={(date: Date) => onChangeDefault(date, \"startDate\")}\n selected={fullDate.startDate}\n {...startDatePickerAttrs}\n />\n );\n\n return (\n <DatePickerWrapper\n id={id}\n isDateRange={isDateRange}\n showLabel={showLabel}\n labelText={labelText}\n className={className}\n isRequired={isRequired}\n showRequiredLabel={showRequiredLabel}\n {...rest}\n >\n <DateRangeRow id={id} isDateRange={isDateRange}>\n <FormField id={`${id}-start-form`}>\n {startDatePickerElement}\n </FormField>\n\n {endDatePickerElement && (\n <FormField id={`${id}-end-form`}>{endDatePickerElement}</FormField>\n )}\n </DateRangeRow>\n {helperText && isDateRange && showHelperInvalidText && (\n <HelperErrorText\n id={`${id}-helper-text`}\n isInvalid={false}\n text={helperText}\n />\n )}\n </DatePickerWrapper>\n );\n }),\n { shouldForwardProp: () => true }\n);\n\nexport default DatePicker;\n","/**\n * These objects are also SCSS mixins but are now JS objects in the\n * context of css-in-js and the custom NYPL-theme.\n */\nconst screenreaderOnly = {\n clip: \"rect(1px, 1px, 1px, 1px)\",\n height: \"1px\",\n overflow: \"hidden\",\n position: \"absolute !important\",\n width: \"1px\",\n wordWrap: \"normal\",\n};\nconst wrapperStyles = {\n marginY: \"0\",\n marginX: \"auto\",\n maxWidth: \"1280px\",\n paddingTop: \"0\",\n paddingBottom: \"0\",\n paddingRight: \"0\",\n paddingLeft: \"0\",\n width: \"100%\",\n};\n\nexport { screenreaderOnly, wrapperStyles };\n","/** Export \"mixin\" styles. */\nexport { wrapperStyles } from \"./globalMixins\";\n\n/** Reusable component styles. */\n\n// Used in `Select` and `TextInput`.\nconst activeFocus = (darkMode = false) => ({\n boxShadow: \"none\",\n outline: \"2px solid\",\n outlineOffset: \"2px\",\n outlineColor: darkMode ? \"ui.white\" : \"ui.focus\",\n zIndex: \"9999\",\n});\n// Used in `Checkbox` and `Radio`.\nconst checkboxRadioLabelStyles = {\n userSelect: \"none\",\n fontWeight: \"text.default\",\n marginBottom: \"0\",\n marginLeft: \"xs\",\n width: \"100%\",\n _disabled: {\n color: \"ui.gray.dark\",\n opacity: 1,\n fontStyle: \"italic\",\n },\n _invalid: {\n color: \"ui.error.primary\",\n },\n};\n// Custom values not in the spacing theme.\n// Used in `Checkbox` and `Radio`.\nconst checkboxRadioControlSize = {\n h: \"1.375rem\",\n w: \"1.375rem\",\n};\n// Used in `Checkbox` and `Radio`.\nconst checkboxRadioHelperErrorTextStyle = {\n marginLeft: \"30px\", // calc(22px + var(--nypl-space-xs))\n _disabled: {\n color: \"ui.gray.dark\",\n fontStyle: \"italic\",\n },\n};\nconst checkboxRadioGroupStyles = (isFullWidth = false) => ({\n helperErrorText: {\n marginTop: \"xs\",\n },\n label: {\n width: isFullWidth ? \"100%\" : \"fit-content\",\n },\n});\n// Used in `Label` and `Fieldset`.\nconst labelLegendText = {\n display: \"inline-block\",\n fontSize: \"label.default\",\n fontWeight: \"label.default\",\n marginBottom: \"xs\",\n width: \"100%\",\n span: {\n fontWeight: \"regular\",\n },\n};\n// Used for the disabled state of Select and TextInput\nconst selectTextInputDisabledStyles = {\n bg: \"ui.disabled.secondary\",\n borderColor: \"ui.disabled.primary\",\n color: \"ui.gray.dark\",\n opacity: \"1\",\n};\n// Used for the focus state of Select and TextInput\nconst selectTextInputFocusStyles = {\n ...activeFocus(),\n borderColor: \"ui.focus\",\n};\n// Used for p, ul, and ol\nconst textMargin = {\n margin: \"0\",\n marginBottom: \"s\",\n};\n\nexport {\n activeFocus,\n checkboxRadioControlSize,\n checkboxRadioGroupStyles,\n checkboxRadioHelperErrorTextStyle,\n checkboxRadioLabelStyles,\n labelLegendText,\n selectTextInputDisabledStyles,\n selectTextInputFocusStyles,\n textMargin,\n};\n","import { activeFocus } from \"../components/global\";\nimport { textMargin } from \"../components/global\";\n\n/**\n * These rules affect all the global elements on the `body` element of the\n * page when the `DSProvider` component is used.\n */\nconst global = {\n // styles for the `body` element\n body: {\n boxSizing: \"border-box\",\n bg: \"ui.white\",\n color: \"ui.black\",\n fontFamily: \"body\",\n fontSize: \"text.default\",\n fontWeight: \"text.default\",\n lineHeight: \"1.5\",\n overflowX: \"hidden\",\n },\n // styles for the `a` element\n a: {\n color: \"ui.link.primary\",\n },\n svg: {\n display: \"inline\",\n },\n \"button, select, input, textarea\": {\n \"&:not([disabled])\": {\n _focus: activeFocus(),\n },\n },\n \"iframe, [href], [tabindex], [contentEditable='true']\": {\n _focus: activeFocus(),\n },\n p: textMargin,\n ul: textMargin,\n ol: textMargin,\n \"*, *::before, &::after\": {\n boxSizing: \"inherit\",\n },\n};\n\nexport default global;\n","import { createBreakpoints } from \"@chakra-ui/theme-tools\";\n\n/**\n * Breakpoints from \"src/styles/base/_01-breakpoints.scss\"\n * How to use Chakra responsive styles: https://chakra-ui.com/docs/features/responsive-styles\n *\n * Chakra Value | DS Variable | EM/PX value\n * ------------------------------------------------------\n * sm | --nypl-breakpoint-small | 20em/320px\n * md | --nypl-breakpoint-medium | 38em/600px\n * lg | --nypl-breakpoint-large | 60em/960px\n * xl | --nypl-breakpoint-xl | 80em/1280px\n * 2xl | N/A | 96em/1536px\n *\n * @Note Chakra provides a 2xl option while the DS does not. We don't\n * recommend using this value until further notice.\n */\nexport default createBreakpoints({\n sm: \"20em\",\n md: \"38em\",\n lg: \"60em\",\n xl: \"80em\",\n \"2xl\": \"96em\",\n});\n","import { Colors } from \"@chakra-ui/react\";\n\n/**\n * All colors can be found in Storybook:\n * https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/style-guide-colors--page\n *\n * All UI colors can be found in Figma:\n * https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Main?node-id=47083%3A27674\n *\n * All Brand colors can be found in Figma:\n * https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Main?node-id=15454%3A47007\n *\n * At the end of this file, there are objects that extend Chakra's default\n * color shade palette for individual colors. WE DO NOT RECOMMEND to use them\n * and only recommend to use the colors defined by the Design System such as the\n * following \"ui\", \"brand\", and \"section\" colors below.\n */\n\n// Reusable variables:\nconst grayLightCool = \"#E9E9E9\";\nconst grayxxLightCool = \"#FAFAFA\";\nconst grayMedium = \"#BDBDBD\";\nconst brandPrimary = \"#C60917\";\nconst brandSecondary = \"#760000\";\nconst brandObj = {\n primary: brandPrimary,\n secondary: brandSecondary,\n};\n\nconst colors: Colors = {\n transparent: \"transparent\",\n\n // ui fills\n ui: {\n black: \"#000\",\n white: \"#fff\",\n /// State and link utilities\n disabled: {\n primary: grayLightCool,\n secondary: grayxxLightCool,\n },\n error: {\n primary: \"#97272C\",\n secondary: \"#6F0106\",\n },\n focus: \"#4181F1\",\n link: {\n primary: \"#0576D3\",\n secondary: \"#004B98\",\n },\n status: {\n primary: \"#F9E08E\",\n secondary: \"#FBE7E1\",\n },\n success: {\n primary: \"#077719\",\n secondary: \"#095212\",\n },\n test: \"#FF6347\",\n warning: {\n primary: \"#F0974E\",\n secondary: \"#EC7B1F\",\n },\n // Grayscale\n gray: {\n xdark: \"#424242\",\n dark: \"#616161\",\n medium: grayMedium,\n \"light-cool\": grayLightCool,\n \"light-warm\": \"#EFEDEB\",\n \"x-light-cool\": \"#F5F5F5\",\n \"x-light-warm\": \"#F8F8F7\",\n \"xx-light-cool\": grayxxLightCool,\n },\n },\n\n /** Brand fills are the NYPL primary and secondary colors. */\n brand: brandObj,\n\n /** Brand fills for sections on NYPL pages. */\n section: {\n /** Blogs is used for the Blogs section. */\n blogs: {\n primary: grayLightCool,\n secondary: grayMedium,\n },\n\n /** Books and More is used for the Catalog, Staff Picks, Recommendations,\n * New Arrivals, and E-Book Central. */\n \"books-and-more\": brandObj,\n\n /** Education is used for the Education section front and associated\n * sub-sections. */\n education: {\n primary: \"#1D62E6\",\n secondary: \"#2540A4\",\n },\n\n /** Locations is used for Location Finder and all branch pages with\n * the exceptions of some research libraries. */\n locations: brandObj,\n\n /** Research is used for the Research Catalog and SCC. */\n research: {\n primary: \"#00838a\",\n secondary: \"#006166\",\n },\n\n /** Research libraries with specific brand colors to adhere to. */\n \"research-library\": {\n lpa: \"#005d53\",\n schomburg: \"#a03e31\",\n schwartzman: brandSecondary,\n },\n\n /** What's On is used for Exhibitions & Events. */\n \"whats-on\": {\n primary: \"#242424\",\n secondary: \"#000000\",\n },\n },\n\n /**\n * The following color scales are useful for color edge cases where a\n * distinct named ui or brand color doesn't quite work. These are used by\n * Chakra and have been generated through https://themera.vercel.app/.\n * While these colors are available, WE DO NOT RECOMMEND using them. Stick\n * with the utility colors declared above.\n * @Note If you do need to use a color variant, please contant the DS team.\n */\n\n /** based on ui.gray.medium = #DBDBDB */\n gray: {\n 50: \"#F2F2F2\",\n 100: \"#DBDBDB\",\n 200: \"#C4C4C4\",\n 300: \"#ADADAD\",\n 400: \"#969696\",\n 500: \"#808080\",\n 600: \"#666666\",\n 700: \"#4D4D4D\",\n 800: \"#333333\",\n 900: \"#1A1A1A\",\n },\n /** based on ui.brand.primary = #C60917 */\n red: {\n 50: \"#FEE7E8\",\n 100: \"#FCBBC0\",\n 200: \"#FA8F97\",\n 300: \"#F8636E\",\n 400: \"#F63745\",\n 500: \"#F40B1C\",\n 600: \"#C30917\",\n 700: \"#920711\",\n 800: \"#62040B\",\n 900: \"#310206\",\n },\n /** based on ui.warning.secondary = #F0974E */\n orange: {\n 50: \"#FDF1E7\",\n 100: \"#F9D8BD\",\n 200: \"#F6BF93\",\n 300: \"#F2A769\",\n 400: \"#EF8E3E\",\n 500: \"#EB7514\",\n 600: \"#BC5E10\",\n 700: \"#8D460C\",\n 800: \"#5E2F08\",\n 900: \"#2F1704\",\n },\n /** based on ui.status.primary = #F9E08E */\n yellow: {\n 50: \"#FEF8E7\",\n 100: \"#FBECBB\",\n 200: \"#F9E090\",\n 300: \"#F7D464\",\n 400: \"#F4C938\",\n 500: \"#F2BD0D\",\n 600: \"#C2970A\",\n 700: \"#917108\",\n 800: \"#614B05\",\n 900: \"#302603\",\n },\n /** based on ui.success.primary = #077719 */\n green: {\n 50: \"#E7FEEB\",\n 100: \"#BCFBC6\",\n 200: \"#90F8A1\",\n 300: \"#65F67C\",\n 400: \"#3AF357\",\n 500: \"#0EF133\",\n 600: \"#0BC128\",\n 700: \"#08911E\",\n 800: \"#066014\",\n 900: \"#03300A\",\n },\n /** based on ui.link.primary = #0576D3 */\n blue: {\n 50: \"#E6F3FE\",\n 100: \"#B9DFFD\",\n 200: \"#8CCAFC\",\n 300: \"#60B5FB\",\n 400: \"#33A0FA\",\n 500: \"#068BF9\",\n 600: \"#056FC7\",\n 700: \"#045495\",\n 800: \"#023864\",\n 900: \"#011C32\",\n },\n};\n\nexport default colors;\n","const radii = {\n checkbox: \"3px\",\n pill: \"20px\",\n round: \"100%\",\n};\n\nexport default radii;\n","const shadows = {\n outline: \"none\",\n};\n\nexport default shadows;\n","import { Dict } from \"../types\";\n\ntype Typography = {\n fonts: Dict;\n fontSizes: Dict;\n fontWeights: Dict;\n};\n\nconst fontSizeValues = {\n \"-3\": \"0.625rem\",\n \"-2\": \"0.75rem\",\n \"-1\": \"0.875rem\",\n \"0\": \"1rem\",\n \"1\": \"1.125rem\",\n \"2\": \"1.375rem\",\n \"3\": \"1.75rem\",\n \"4\": \"2.25rem\",\n};\n\nconst fontWeightValues = {\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n};\n\nconst typography: Typography = {\n // Values from \"src/styles/02-typography/_typeface.css\"\n fonts: {\n body: \"-apple-system, BlinkMacSystemFont, system-ui, sans-serif\",\n heading: \"-apple-system, BlinkMacSystemFont, system-ui, sans-serif\",\n },\n // Values from \"src/styles/02-typography/_type-scale.css\"\n fontSizes: {\n // generic tokens\n \"-3\": fontSizeValues[\"-3\"],\n \"-2\": fontSizeValues[\"-2\"],\n \"-1\": fontSizeValues[\"-1\"],\n \"0\": fontSizeValues[\"0\"],\n \"1\": fontSizeValues[\"1\"],\n \"2\": fontSizeValues[\"2\"],\n \"3\": fontSizeValues[\"3\"],\n \"4\": fontSizeValues[\"4\"],\n // semantic tokens\n breadcrumbs: {\n default: fontSizeValues[\"-1\"],\n },\n button: {\n default: fontSizeValues[\"-1\"],\n },\n heading: {\n primary: fontSizeValues[\"4\"],\n secondary: fontSizeValues[\"3\"],\n tertiary: fontSizeValues[\"2\"],\n callout: fontSizeValues[\"1\"],\n },\n helper: {\n default: fontSizeValues[\"-2\"],\n },\n label: {\n default: fontSizeValues[\"-1\"],\n secondary: fontSizeValues[\"-2\"],\n },\n text: {\n default: fontSizeValues[\"0\"],\n caption: fontSizeValues[\"-1\"],\n tag: fontSizeValues[\"-2\"],\n mini: fontSizeValues[\"-3\"],\n },\n },\n // Values from \"src/styles/02-typography/_type-weight.css\"\n fontWeights: {\n // generic tokens\n light: fontWeightValues[\"light\"],\n regular: fontWeightValues[\"regular\"],\n medium: fontWeightValues[\"medium\"],\n bold: fontWeightValues[\"bold\"],\n // semantic tokens\n breadcrumbs: {\n default: fontWeightValues[\"regular\"],\n lastChild: fontWeightValues[\"bold\"],\n },\n button: {\n default: fontWeightValues[\"regular\"],\n },\n heading: {\n primary: fontWeightValues[\"light\"],\n secondary: fontWeightValues[\"medium\"],\n tertiary: fontWeightValues[\"medium\"],\n callout: fontWeightValues[\"medium\"],\n },\n helper: {\n default: fontWeightValues[\"light\"],\n },\n label: {\n default: fontWeightValues[\"medium\"],\n },\n text: {\n default: fontWeightValues[\"light\"],\n caption: fontWeightValues[\"light\"],\n tag: fontWeightValues[\"regular\"],\n mini: fontWeightValues[\"regular\"],\n },\n },\n};\n\nexport default typography;\n","const containerStyles = {\n border: \"none\",\n width: \"100%\",\n};\nconst buttonStyles = {\n borderWidth: \"1px\",\n fontWeight: \"medium\",\n};\nconst panelStyles = {\n padding: \"s\",\n borderLeftWidth: \"1px\",\n borderRightWidth: \"1px\",\n borderBottomWidth: \"1px\",\n};\n\nconst Accordion = {\n parts: [\"container\", \"button\", \"panel\"],\n baseStyle: {\n container: containerStyles,\n button: buttonStyles,\n panel: panelStyles,\n },\n};\n\nexport default Accordion;\n","// Variant styling\nconst blogs = {\n bg: \"section.blogs.secondary\",\n color: \"ui.black\",\n a: {\n _hover: {\n color: \"ui.gray.xdark\",\n },\n },\n svg: {\n fill: \"ui.black\",\n },\n};\nconst booksAndMore = {\n bg: \"section.books-and-more.secondary\",\n};\nconst education = {\n bg: \"section.education.secondary\",\n};\nconst locations = {\n bg: \"section.locations.primary\",\n};\nconst research = {\n bg: \"section.research.secondary\",\n};\nconst whatsOn = {\n bg: \"section.whats-on.secondary\",\n};\n\nconst Breadcrumb = {\n baseStyle: {\n bg: \"ui.black\",\n color: \"ui.white\",\n fontSize: \"breadcrumbs.default\",\n fontWeight: \"breadcrumbs.default\",\n paddingBottom: \"xs\",\n paddingTop: \"xs\",\n ol: {\n alignItems: { base: \"center\", md: \"unset\" },\n display: { base: \"flex\", md: \"block\" },\n margin: \"auto\",\n maxWidth: \"1280px\",\n paddingLeft: \"s\",\n paddingRight: \"s\",\n },\n a: {\n _hover: {\n color: \"ui.gray.light-cool\",\n },\n },\n \"li:last-child\": {\n fontWeight: { base: \"breadcrumbs.default\", md: \"breadcrumbs.lastChild\" },\n \".chakra-breadcrumb__link\": {\n _hover: {\n cursor: \"default\",\n textDecoration: \"none\",\n },\n },\n \".icon\": {\n display: \"none\",\n },\n },\n \"li:not(:last-child)\": {\n display: { base: \"none\", md: \"inline-block\" },\n a: {\n marginRight: { base: \"xs\", md: \"0\" },\n },\n \".icon\": {\n display: { base: \"inline\", md: \"none\" },\n },\n \"span:not(.breadcrumb-label)\": {\n marginInlineEnd: \"xxs\",\n marginInlineStart: \"xxs\",\n },\n },\n \"li:nth-last-of-type(2)\": {\n display: \"inline-block\",\n span: {\n display: { base: \"none\", md: \"inline\" },\n },\n },\n },\n // Available variants:\n variants: {\n blogs,\n booksAndMore,\n education,\n locations,\n research,\n whatsOn,\n },\n};\n\nexport default Breadcrumb;\n","// Style object for base or default style\nconst baseStyle = {\n borderRadius: \"sm\",\n lineHeight: \"1.5\",\n display: \"flex\",\n cursor: \"pointer\",\n color: \"ui.white\",\n justifyContent: \"center\",\n maxHeight: \"2.5rem\",\n py: \"inset.narrow\",\n px: \"inset.default\",\n textDecoration: \"none\",\n wordWrap: \"normal\",\n fontWeight: \"button.default\",\n svg: {\n fill: \"currentColor\",\n marginTop: \"xxs\",\n },\n _hover: {\n bg: \"ui.link.secondary\",\n },\n _visited: {\n color: \"ui.white\",\n },\n _disabled: {\n bg: \"ui.gray.light-cool\",\n color: \"ui.gray.dark\",\n pointerEvents: \"none\",\n opacity: \"1\",\n },\n};\n// Styles for different visual variants:\n// primary, secondary, link, pill, iconOnly, callout, searchbar, noBrand\nconst primary = {\n bg: \"ui.link.primary\",\n minWidth: \"none\",\n height: \"none\",\n fontSize: \"button.default\",\n};\nconst secondary = {\n bg: \"ui.white\",\n border: \"1px solid\",\n borderColor: \"ui.gray.light-cool\",\n color: \"inherit\",\n fontSize: \"button.default\",\n _hover: {\n bg: \"ui.gray.xx-light-cool\",\n borderColor: \"ui.gray.medium\",\n },\n _disabled: {\n bg: \"ui.gray.x-light-cool\",\n },\n};\nconst link = {\n bg: \"transparent\",\n lineHeight: \"2.5\",\n color: \"ui.link.primary\",\n textDecoration: \"underline\",\n _disabled: {\n bg: \"transparent\",\n },\n _hover: {\n bg: \"transparent\",\n color: \"ui.link.secondary\",\n },\n};\nconst pill = {\n bg: \"ui.white\",\n border: \"1px solid\",\n borderColor: \"ui.gray.light-cool\",\n color: \"inherit\",\n borderRadius: \"pill\",\n py: \"inset.narrow\",\n px: \"inset.wide\",\n fontSize: \"button.default\",\n _hover: {\n bg: \"ui.gray.xx-light-cool\",\n borderColor: \"ui.gray.medium\",\n },\n _disabled: {\n bg: \"ui.gray.x-light-cool\",\n },\n};\nconst iconOnly = {\n bg: \"ui.white\",\n border: \"1px solid\",\n borderColor: \"ui.gray.light-cool\",\n color: \"inherit\",\n _hover: {\n bg: \"ui.gray.xx-light-cool\",\n borderColor: \"ui.gray.medium\",\n },\n paddingInlineStart: \"inset.narrow\",\n paddingInlineEnd: \"inset.narrow\",\n};\nconst callout = {\n bg: \"brand.primary\",\n fontSize: \"button.default\",\n _hover: {\n bg: \"brand.secondary\",\n },\n _active: {\n bg: \"brand.secondary\",\n },\n};\nconst noBrand = {\n ...primary,\n bg: \"ui.black\",\n color: \"ui.white\",\n _hover: {\n bg: \"ui.gray.xdark\",\n },\n};\n\nconst Button = {\n baseStyle,\n // Available variants:\n variants: {\n primary,\n secondary,\n link,\n pill,\n iconOnly,\n callout,\n noBrand,\n },\n // Default values\n defaultProps: {\n variant: \"primary\",\n },\n};\n\nexport default Button;\n","const ButtonGroup = {\n baseStyle: ({ buttonWidth }) => ({\n width: buttonWidth === \"default\" ? \"fit-content\" : \"100%\",\n button: {\n flexGrow: buttonWidth === \"default\" ? undefined : \"1\",\n },\n }),\n};\n\nexport default ButtonGroup;\n","interface CardBaseStyleProps {\n hasImage: boolean;\n imageIsAtEnd: boolean;\n isAlignedRightActions: boolean;\n isBordered: boolean;\n isCentered: boolean;\n layout: string;\n mainActionLink: boolean;\n}\ninterface BodyPaddingProps {\n hasImage: boolean;\n imageIsAtEnd: boolean;\n isBordered: boolean;\n isRow: boolean;\n}\ninterface CardImageBaseStyleProps {\n imageIsAtEnd: boolean;\n isCentered: boolean;\n size: keyof typeof imageSizes;\n layout: string;\n}\ninterface CardActionsBaseStyleProps {\n bottomBorder: boolean;\n isCentered: boolean;\n layout: string;\n topBorder: boolean;\n}\n\nconst imageSizes = {\n xxsmall: { flex: { base: \"0 0 100%\", md: \"0 0 64px\" }, width: \"100%\" },\n xsmall: { flex: { md: \"0 0 96px\" } },\n small: { flex: { md: \"0 0 165px\" } },\n medium: { flex: { md: \"0 0 225px\" } },\n large: { flex: { md: \"0 0 360px\" } },\n};\n// This is complicated and can be refactored later...\nconst getBodyPaddingStyles = ({\n hasImage,\n imageIsAtEnd,\n isBordered,\n isRow,\n}: BodyPaddingProps) => {\n let bodyPadding = null;\n if (isBordered) {\n bodyPadding = \"inset.default\";\n if (hasImage) {\n bodyPadding =\n \"0 var(--nypl-space-inset-default) var(--nypl-space-inset-default)\";\n }\n }\n if (isRow && isBordered) {\n bodyPadding = \"inset.default\";\n }\n if (isRow && isBordered && hasImage) {\n bodyPadding = {\n base: \"0 var(--nypl-space-inset-default) var(--nypl-space-inset-default)\",\n md: \"var(--nypl-space-inset-default) var(--nypl-space-inset-default) var(--nypl-space-inset-default) 0\",\n };\n if (imageIsAtEnd) {\n bodyPadding = {\n base: \"var(--nypl-space-inset-default) var(--nypl-space-inset-default) 0\",\n md: \"var(--nypl-space-inset-default) 0 var(--nypl-space-inset-default) var(--nypl-space-inset-default)\",\n };\n }\n }\n return bodyPadding;\n};\nconst Card = {\n parts: [\"actions\", \"body\", \"heading\"],\n baseStyle: ({\n hasImage,\n imageIsAtEnd,\n isAlignedRightActions,\n isBordered,\n isCentered,\n layout,\n mainActionLink,\n }: CardBaseStyleProps) => {\n const isRow = layout === \"row\";\n const layoutStyles = isRow\n ? {\n display: \"flex\",\n flexFlow: {\n base: \"column nowrap\",\n md: \"row\",\n },\n maxWidth: \"100%\",\n textAlign: \"left\",\n alignItems: isCentered ? \"center\" : null,\n }\n : {};\n const baseBorderStyles = isBordered\n ? {\n border: \"1px solid\",\n borderColor: \"ui.gray.medium\",\n }\n : {};\n const bodyPadding = getBodyPaddingStyles({\n isBordered,\n hasImage,\n imageIsAtEnd,\n isRow,\n });\n let bodyMargin = null;\n if (isCentered) {\n bodyMargin = \"auto\";\n if (isRow) {\n bodyMargin = \"0\";\n }\n }\n return {\n alignItems: \"flex-start\",\n display: \"flex\",\n flexFlow: \"column wrap\",\n textAlign: isCentered ? \"center\" : null,\n actions: {\n flexShrink: { base: isAlignedRightActions ? \"0\" : null, md: \"0\" },\n marginLeft: { base: \"0\", md: \"m\" },\n marginTop: { base: \"xs\", md: \"0\" },\n maxWidth: { base: \"100%\", md: \"180px\" },\n width: \"100%\",\n },\n body: {\n display: { md: \"block\" },\n flexBasis: { sm: isRow ? \"100%\" : null },\n flexFlow: { md: \"row nowrap\" },\n margin: bodyMargin,\n padding: bodyPadding,\n width: { base: \"100%\", md: \"auto\" },\n },\n heading: {\n marginBottom: \"xs\",\n a: mainActionLink ? { color: \"ui.black\" } : null,\n },\n ...baseBorderStyles,\n ...layoutStyles,\n };\n },\n};\n\nconst CardActions = {\n baseStyle: ({\n bottomBorder,\n isCentered,\n layout,\n topBorder,\n }: CardActionsBaseStyleProps) => {\n let justifyContent = null;\n // Only center in the column layout.\n if (layout === \"row\") {\n justifyContent = \"left\";\n } else if (isCentered) {\n justifyContent = \"center\";\n }\n\n const topBorderStyles = topBorder\n ? {\n borderTop: \"1px solid\",\n paddingTop: \"xs\",\n }\n : {};\n const bottomBorderStyles = bottomBorder\n ? {\n borderBottom: \"1px solid\",\n paddingBottom: \"xs\",\n }\n : {};\n return {\n marginBottom: \"xs\",\n columnGap: \"var(--nypl-space-xs)\",\n display: \"flex\",\n _last: {\n marginBottom: \"0\",\n },\n ...topBorderStyles,\n ...bottomBorderStyles,\n justifyContent,\n borderColor: \"ui.gray.medium\",\n };\n },\n};\n\nconst CardContent = {\n baseStyle: {\n marginBottom: \"xs\",\n _last: {\n marginBottom: \"0\",\n },\n },\n};\n\nconst CardImage = {\n baseStyle: ({\n imageIsAtEnd,\n isCentered,\n layout,\n size,\n }: CardImageBaseStyleProps) => {\n // These sizes are only for the \"row\" layout.\n const imageSize = size ? imageSizes[size] : {};\n const layoutStyles =\n layout === \"row\"\n ? {\n flex: { md: \"0 0 225px\" },\n maxWidth: { base: \"100%\", md: \"50%\" },\n textAlign: \"left\",\n alignItems: isCentered ? \"center\" : null,\n margin: {\n base: imageIsAtEnd ? \"var(--nypl-space-m) 0 0\" : null,\n md: imageIsAtEnd\n ? \"0 0 0 var(--nypl-space-m)\"\n : \"0 var(--nypl-space-m) 0 0\",\n },\n width: { base: \"100%\", md: null },\n marginBottom: [\"xs\", \"xs\"],\n ...imageSize,\n }\n : {\n marginBottom: \"xs\",\n width: \"100%\",\n };\n const imageIsAtEndStyles = imageIsAtEnd\n ? {\n marginBottom: \"0\",\n marginTop: \"s\",\n order: \"2\",\n }\n : {};\n\n return {\n ...imageIsAtEndStyles,\n ...layoutStyles,\n };\n },\n};\n\nexport default { Card, CardActions, CardContent, CardImage };\n","// @see https://github.com/chakra-ui/chakra-ui/blob/main/packages/theme/src/components/checkbox.ts\n// for available theme override options.\n\nimport {\n checkboxRadioLabelStyles,\n checkboxRadioControlSize,\n checkboxRadioHelperErrorTextStyle,\n} from \"./global\";\n\n// Style object for the Checkbox's visual icon.\nconst baseStyleIcon = {\n transitionProperty: \"transform\",\n transitionDuration: \"normal\",\n width: \"22px\",\n height: \"22px\",\n};\n\n// Style object for the Checkbox's \"control.\"\nconst baseStyleControl = {\n border: \"2px solid\",\n borderRadius: \"sm\",\n borderColor: \"ui.black\",\n color: \"ui.black\",\n outline: \"none\",\n transitionProperty: \"box-shadow\",\n transitionDuration: \"normal\",\n\n _checked: {\n bg: \"ui.white\",\n borderColor: \"ui.focus\",\n color: \"ui.focus\",\n\n _hover: {\n bg: \"ui.white\",\n },\n\n _disabled: {\n bg: \"ui.white\",\n borderColor: \"ui.disabled.primary\",\n svg: {\n color: \"ui.disabled.primary\",\n },\n },\n\n _indeterminate: {\n color: \"ui.focus\",\n borderColor: \"ui.focus\",\n },\n },\n\n _indeterminate: {\n color: \"ui.focus\",\n borderColor: \"ui.focus\",\n },\n\n _disabled: {\n bg: \"ui.white\",\n borderColor: \"ui.disabled.primary\",\n },\n\n _focus: {\n borderColor: \"ui.focus\",\n boxShadow: \"none\",\n outlineColor: \"ui.focus\",\n },\n\n _invalid: {\n borderColor: \"ui.error.primary\",\n color: \"ui.error.primary\",\n },\n};\n\n// Style object for the Checkbox's label\nconst baseStyleLabel = checkboxRadioLabelStyles;\n\n// Style object for the Checkbox's helper text\nconst baseStyleHelperErrorText = checkboxRadioHelperErrorTextStyle;\n\nconst baseStyle = {\n icon: baseStyleIcon,\n control: baseStyleControl,\n label: baseStyleLabel,\n helperErrorText: baseStyleHelperErrorText,\n};\n\n// Sticking to \"lg\" for the default size.\nconst sizes = {\n lg: {\n // Controls the width/height of the checkbox itself.\n control: {\n ...checkboxRadioControlSize,\n borderRadius: \"checkbox\",\n },\n // Controls the font-size of the label only.\n label: { fontSize: \"label.default\" },\n },\n};\n\nconst Checkbox = {\n parts: [\"helperErrorText\", \"icon\", \"control\", \"label\"],\n baseStyle,\n sizes,\n // Default values\n defaultProps: {\n size: \"lg\",\n colorScheme: \"white\",\n },\n};\n\nexport default Checkbox;\n","interface ComponentWrapperProps {\n hasChildren: boolean;\n}\n\nconst ComponentWrapper = {\n parts: [\"helperErrorText\"],\n baseStyle: ({ hasChildren }: ComponentWrapperProps) => ({\n helperErrorText: {\n marginTop: hasChildren ? null : \"0\",\n },\n }),\n};\n\nexport default ComponentWrapper;\n","import { checkboxRadioGroupStyles } from \"./global\";\n\nconst CheckboxGroup = {\n parts: [\"helperErrorText\", \"stack\"],\n baseStyle: ({ isFullWidth = false }) => ({\n ...checkboxRadioGroupStyles(isFullWidth),\n }),\n};\n\nexport default CheckboxGroup;\n","interface CustomImageBaseStyle {\n size: keyof typeof imageSizes;\n}\ninterface CustomImageWrapperBaseStyle {\n ratio: keyof typeof imageRatios;\n size: keyof typeof imageSizes;\n}\n\nconst imageWrap = {\n position: \"relative\",\n width: \"100%\",\n height: \"auto\",\n overflow: \"hidden\",\n};\nconst sideMarginsAuto = {\n marginLeft: \"auto\",\n marginRight: \"auto\",\n};\nconst imageSizes = {\n default: {\n maxWidth: \"100%\",\n },\n xxsmall: {\n ...sideMarginsAuto,\n maxWidth: \"64px\",\n },\n xsmall: {\n ...sideMarginsAuto,\n maxWidth: \"96px\",\n },\n small: {\n ...sideMarginsAuto,\n maxWidth: \"165px\",\n },\n medium: {\n ...sideMarginsAuto,\n maxWidth: \"225px\",\n },\n large: {\n ...sideMarginsAuto,\n maxWidth: \"360px\",\n },\n};\nconst imageRatios = {\n fourByThree: {\n ...imageWrap,\n paddingBottom: \"75%\",\n },\n oneByTwo: {\n ...imageWrap,\n paddingBottom: \"200%\",\n },\n original: {\n ...imageWrap,\n },\n sixteenByNine: {\n ...imageWrap,\n paddingBottom: \"56.25%\",\n },\n square: {\n ...imageWrap,\n paddingBottom: \"100%\",\n },\n threeByFour: {\n ...imageWrap,\n paddingBottom: \"133.33%\",\n },\n threeByTwo: {\n ...imageWrap,\n paddingBottom: \"66.66%\",\n },\n twoByOne: {\n ...imageWrap,\n paddingBottom: \"50%\",\n },\n};\nconst CustomImage = {\n parts: [\"captionWrappers\"],\n variants: {\n circle: {\n img: {\n borderRadius: \"50%\",\n },\n },\n },\n baseStyle: ({ size = \"default\" }: CustomImageBaseStyle) => ({\n figure: {\n margin: \"auto\",\n width: \"100%\",\n ...imageSizes[size],\n img: {\n marginBottom: \"xxs\",\n },\n },\n figcaption: {\n fontStyle: \"italic\",\n fontSize: \"text.tag\",\n },\n img: {\n display: \"block\",\n boxSizing: \"border-box\",\n objectFit: \"cover\",\n position: \"relative\",\n width: \"100%\",\n ...imageSizes[size],\n },\n captionWrappers: {\n marginTop: \"xxs\",\n },\n }),\n};\nconst CustomImageWrapper = {\n parts: [\"crop\"],\n baseStyle: ({\n ratio = \"original\",\n size = \"default\",\n }: CustomImageWrapperBaseStyle) => ({\n marginLeft: \"auto\",\n marginRight: \"auto\",\n width: \"100%\",\n ...imageSizes[size],\n crop: {\n ...imageRatios[ratio],\n },\n img: {\n height: \"100%\",\n left: \"0\",\n maxWidth: \"100%\",\n position: \"absolute\",\n top: \"0\",\n width: \"100%\",\n },\n }),\n};\n\nexport { CustomImage, CustomImageWrapper };\n","import {\n selectTextInputDisabledStyles,\n selectTextInputFocusStyles,\n} from \"./global\";\n\ninterface SelectBaseStyle {\n labelPosition: string;\n}\n\nconst select = {\n backgroundColor: \"ui.white\",\n borderRadius: \"sm\",\n borderColor: \"ui.gray.medium\",\n fontSize: \"text.caption\",\n paddingTop: \"inset.narrow\",\n paddingRight: \"inset.extrawide\",\n paddingBottom: \"inset.narrow\",\n paddingLeft: \"inset.default\",\n _hover: {\n borderColor: \"ui.gray.dark\",\n },\n _active: selectTextInputFocusStyles,\n _disabled: {\n ...selectTextInputDisabledStyles,\n },\n _focus: selectTextInputFocusStyles,\n _invalid: {\n border: \"1px solid\",\n borderColor: \"ui.error.primary\",\n boxShadow: \"none\",\n },\n};\n\nconst Select = {\n parts: [\"helperText\", \"inline\", \"select\"],\n baseStyle: ({ labelPosition }: SelectBaseStyle) => {\n return {\n // The backgroundColor set to \"ui.white\" hides the arrow SVG icon when\n // the component is focused. The background is added for dark mode and\n // so we need to add specific selector.\n \".chakra-select__icon-wrapper\": {\n zIndex: \"9999\",\n },\n inline: {\n display: { md: \"flex\" },\n gap: { md: \"var(--nypl-space-xs)\" },\n alignItems: { md: \"flex-end\" },\n },\n select: {\n ...select,\n flex: labelPosition === \"inline\" ? { md: \"1\" } : null,\n },\n };\n },\n variants: {\n searchbar: {\n select: {\n flex: \"1 1 20%\",\n borderRightColor: { md: \"transparent\" },\n borderRightRadius: { md: \"none\" },\n _hover: {\n borderRightColor: { md: \"transparent\" },\n },\n },\n },\n },\n defaultProps: {\n size: \"md\",\n },\n};\n\nexport default Select;\n","/**\n * Note: these styles are only used when the\n * DatePicker is in \"date range\" mode.\n */\nconst DatePicker = {\n parts: [\"subLabels\"],\n baseStyle: {\n subLabels: {\n label: {\n fontSize: \"label.secondary\",\n marginBottom: \"0\",\n },\n },\n },\n};\n\nexport default DatePicker;\n","import { labelLegendText } from \"./global\";\nimport { screenreaderOnly } from \"./globalMixins\";\n\ninterface FieldSetProps {\n isLegendHidden?: boolean;\n}\n\nconst Fieldset = {\n baseStyle: ({ isLegendHidden }: FieldSetProps) => {\n const screenreaderStyles = isLegendHidden ? screenreaderOnly : {};\n\n return {\n border: 0,\n padding: 0,\n legend: {\n ...labelLegendText,\n ...screenreaderStyles,\n },\n };\n },\n};\n\nexport default Fieldset;\n","export const baseLinkStyles = {\n color: \"ui.link.primary\",\n textDecoration: \"underline\",\n _hover: {\n color: \"ui.link.secondary\",\n },\n};\n\nconst variants = {\n link: {},\n disabled: {\n color: \"ui.gray.dark\",\n pointerEvents: \"none\",\n },\n moreLink: {\n alignItems: \"center\",\n display: \"inline-flex\",\n svg: {\n height: \"s\",\n width: \"s\",\n textDecoration: \"none\",\n fill: \"currentColor\",\n },\n _hover: {\n color: \"ui.link.secondary\",\n textDecoration: \"underline\",\n },\n },\n button: {\n width: \"100px\",\n borderRadius: \"sm\",\n lineHeight: \"1.5\",\n display: \"flex\",\n cursor: \"pointer\",\n color: \"ui.white\",\n justifyContent: \"center\",\n py: \"xs\",\n px: \"xs\",\n textDecoration: \"none\",\n fontWeight: \"button.default\",\n bg: \"ui.link.primary\",\n _hover: {\n color: \"ui.white\",\n bg: \"ui.link.secondary\",\n textDecoration: \"none\",\n },\n },\n};\nconst Link = {\n baseStyle: {\n ...baseLinkStyles,\n // This is needed for custom anchor elements or link components\n // that are passed as children to the `Link` component.\n a: {\n _hover: {\n color: \"ui.link.secondary\",\n },\n },\n },\n variants,\n};\n\nexport default Link;\n","import { baseLinkStyles } from \"./link\";\n\nconst margins = {\n marginTop: \"0\",\n marginLeft: \"0\",\n marginRight: \"0\",\n};\n\n// Heading Styles\nexport const headings = {\n h1: {\n fontSize: \"heading.primary\", // var(--nypl-fontSizes-4);\n fontWeight: \"heading.primary\",\n letterSpacing: \"0\",\n lineHeight: \"1.1\",\n ...margins,\n width: \"auto\",\n },\n h2: {\n fontSize: \"heading.secondary\", // var(--nypl-fontSizes-3);\n fontWeight: \"heading.secondary\",\n lineHeight: \"1.25\",\n ...margins,\n width: \"auto\",\n },\n h3: {\n fontSize: \"heading.tertiary\", // var(--nypl-fontSizes-2);\n fontWeight: \"heading.tertiary\",\n lineHeight: \"1.25\",\n ...margins,\n width: \"auto\",\n },\n h4: {\n fontSize: \"heading.callout\", // var(--nypl-fontSizes-1);\n fontWeight: \"heading.callout\",\n lineHeight: \"1.15\",\n ...margins,\n width: \"auto\",\n },\n fallback: {\n fontSize: \"1\", // var(--nypl-fontSizes-1);\n fontWeight: \"regular\",\n lineHeight: \"1.15\",\n ...margins,\n width: \"auto\",\n },\n};\n\n// Styles for different visual variants\nconst variants = {\n h1: headings.h1,\n h2: headings.h2,\n h3: headings.h3,\n h4: headings.h4,\n h5: headings.fallback,\n h6: headings.fallback,\n primary: headings.h1,\n secondary: headings.h2,\n tertiary: headings.h3,\n callout: headings.h4,\n};\n\nconst Heading = {\n baseStyle: ({ noSpace }) => ({\n // This is to help target custom anchor elements\n // passed as children to the Heading component.\n a: baseLinkStyles,\n marginBottom: noSpace ? \"0\" : \"s\",\n }),\n // Available variants:\n // h1, h2, h3, h4, h5, h6,\n // primary, secondary, tertiary, callout\n variants,\n defaultProps: {\n variant: \"secondary\",\n },\n};\n\nexport default Heading;\n","interface HelperErrorTextBaseStyle {\n isInvalid: boolean;\n}\n\nconst helperErrorText = {\n baseStyle: ({ isInvalid }: HelperErrorTextBaseStyle) => ({\n marginTop: \"xxs\",\n marginBottom: \"0\",\n fontSize: \"helper.default\",\n color: isInvalid ? \"ui.error.primary\" : \"ui.black\",\n }),\n};\n\nexport default helperErrorText;\n","import { wrapperStyles } from \"./global\";\n\n// Used for all \"secondary\" variants.\nconst secondaryBase = {\n overflowX: \"hidden\",\n content: {\n ...wrapperStyles,\n paddingRight: \"inset.default\",\n paddingLeft: \"inset.default\",\n display: \"flex\",\n flexFlow: {\n base: \"column nowrap\",\n md: \"row wrap\",\n },\n img: {\n flex: {\n base: \"1 1 100%\",\n md: \"0 0 250px\",\n },\n order: { md: \"3\" },\n height: \"150px\",\n minWidth: \"0\", // https://github.com/philipwalton/flexbugs/issues/41\n objectFit: \"cover\",\n width: \"100%\",\n },\n },\n bodyText: {\n paddingBottom: \"inset.default\",\n paddingTop: \"inset.default\",\n paddingRight: { md: \"inset.default\" },\n flex: { md: \"1 1 50%\" },\n order: { md: \"2\" },\n },\n};\n// Used for all \"secondary\" variants' heading component.\nconst secondaryHeadingBase = {\n marginBottom: \"0\",\n bg: \"ui.black\",\n color: \"ui.white\",\n flex: \"1 1 100%\",\n marginTop: \"0\",\n paddingBottom: \"xxs\",\n position: \"relative\",\n zIndex: \"0\",\n order: { md: \"1\" },\n _before: {\n bg: \"ui.black\",\n content: `\"\"`,\n height: \"100%\",\n left: \"-2000px\",\n position: \"absolute\",\n width: \"4000px\",\n zIndex: \"-1\",\n },\n};\n// Get all the styles for the specific Secondary variant but\n// update the background color.\nconst getSecondaryVariantStyles = (bgColor: string) => ({\n ...secondaryBase,\n heading: {\n ...secondaryHeadingBase,\n bg: bgColor,\n _before: {\n ...secondaryHeadingBase[\"_before\"],\n bg: bgColor,\n },\n },\n});\n// Variant styling\nconst primary = {\n alignItems: \"center\",\n display: \"flex\",\n flexFlow: {\n base: \"column nowrap\",\n md: \"row nowrap\",\n },\n justifyContent: \"center\",\n minHeight: \"350px\",\n content: {\n bg: \"ui.black\",\n color: \"ui.white\",\n flex: {\n base: \"0 0 100%\",\n md: \"0 0 60%\",\n },\n maxWidth: { md: \"960px\" },\n paddingTop: \"inset.extrawide\",\n paddingBottom: \"inset.extrawide\",\n paddingRight: \"inset.wide\",\n paddingLeft: \"inset.wide\",\n a: {\n color: \"inherit\",\n display: \"inline-block\",\n },\n heading: {\n marginBottom: \"0\",\n },\n bodyText: {\n marginBottom: \"0\",\n },\n },\n};\nconst secondary = {\n ...secondaryBase,\n heading: {\n ...secondaryHeadingBase,\n },\n};\nconst secondaryBooksAndMore = getSecondaryVariantStyles(\n \"section.books-and-more.primary\"\n);\nconst secondaryLocations = getSecondaryVariantStyles(\n \"section.locations.primary\"\n);\nconst secondaryResearch = getSecondaryVariantStyles(\"section.research.primary\");\nconst secondaryWhatsOn = getSecondaryVariantStyles(\"section.whats-on.primary\");\nconst tertiary = {\n bg: \"ui.gray.xdark\",\n content: {\n ...wrapperStyles,\n color: \"ui.white\",\n display: \"flex\",\n flexFlow: \"column nowrap\",\n padding: \"inset.default\",\n p: {\n marginBottom: \"0\",\n marginTop: \"s\",\n },\n },\n heading: {\n marginBottom: \"0\",\n _lastChild: {\n marginBottom: \"0\",\n },\n },\n p: {\n marginBottom: \"0\",\n },\n};\nconst campaign = {\n alignItems: \"center\",\n display: \"flex\",\n justifyContent: \"center\",\n marginBottom: [\"0\", \"0\", \"xxl\"],\n minHeight: \"300px\",\n overflow: \"visible\",\n padding: {\n base: \"inset.wide\",\n md: \"0\",\n },\n position: \"relative\",\n content: {\n alignItems: \"center\",\n bg: \"ui.black\",\n color: \"ui.white\",\n display: \"flex\",\n flexFlow: {\n base: \"column nowrap\",\n md: \"row nowrap\",\n },\n minHeight: \"320px\",\n flex: { md: \"0 0 90%\" },\n maxWidth: { md: \"1280px\" },\n position: { md: \"relative\" },\n top: { md: \"xxl\" },\n },\n a: {\n color: \"inherit\",\n display: \"inline-block\",\n },\n img: {\n flex: {\n base: \"1 1 100%\",\n md: \"0 0 50%\",\n },\n minWidth: \"0\", // https://github.com/philipwalton/flexbugs/issues/41\n objectFit: \"cover\",\n width: \"100%\",\n height: { md: \"320px\" },\n },\n interior: {\n flex: {\n base: \"0 0 100%\",\n md: \"0 0 50%\",\n },\n padding: \"inset.wide\",\n maxWidth: { md: \"960px\" },\n },\n};\nconst fiftyFifty = {\n content: {\n ...wrapperStyles,\n alignItems: \"center\",\n display: \"flex\",\n flexFlow: {\n base: \"column nowrap\",\n lg: \"row nowrap\",\n },\n paddingBottom: \"s\",\n paddingRight: \"s\",\n paddingLeft: \"s\",\n padding: {\n lg: \"unset\",\n },\n },\n img: {\n marginBottom: {\n base: \"s\",\n lg: \"unset\",\n },\n marginRight: {\n lg: \"s\",\n },\n maxWidth: {\n base: \"fit-content\",\n lg: \"50%\",\n },\n },\n};\nconst Hero = {\n baseStyle: {\n bg: \"ui.gray.x-light-cool\",\n },\n // Available variants:\n variants: {\n primary,\n secondary,\n secondaryBooksAndMore,\n secondaryLocations,\n secondaryResearch,\n secondaryWhatsOn,\n tertiary,\n campaign,\n fiftyFifty,\n },\n};\n\nexport default Hero;\n","interface HorizontalRuleBaseStyle {\n align: string;\n}\n\nconst HorizontalRule = {\n baseStyle: ({ align }: HorizontalRuleBaseStyle) => ({\n bg: \"ui.gray.light-cool\",\n border: \"0\",\n height: \"2px\",\n marginBottom: \"s\",\n marginTop: \"s\",\n marginLeft: align === \"left\" ? 0 : \"auto\",\n marginRight: align === \"right\" ? 0 : \"auto\",\n }),\n};\n\nexport default HorizontalRule;\n","const svgBase = {\n display: \"inline-block\",\n fill: \"currentColor\",\n width: \"auto\",\n height: \"100%\",\n};\nconst align = {\n none: {},\n left: { marginRight: \"xxs\" },\n right: { marginLeft: \"xxs\" },\n};\nconst iconRotation = {\n rotate180: {\n transform: \"rotate(180deg)\",\n },\n rotate270: {\n transform: \"rotate(270deg)\",\n },\n rotate0: {\n transform: \"rotate(0deg)\",\n },\n rotate90: {\n transform: \"rotate(90deg)\",\n },\n};\nconst size = {\n xxxlarge: {\n height: \"var(--nypl-space-xxl)\",\n width: \"var(--nypl-space-xxl)\",\n },\n xxlarge: {\n height: \"var(--nypl-space-xl)\",\n width: \"var(--nypl-space-xl)\",\n },\n xlarge: {\n height: \"var(--nypl-space-l)\",\n width: \"var(--nypl-space-l)\",\n },\n large: {\n height: \"var(--nypl-space-m)\",\n width: \"var(--nypl-space-m)\",\n },\n default: {\n width: \"100%\",\n },\n medium: {\n height: \"1.125rem\",\n width: \"1.125rem\",\n },\n small: {\n height: \"0.875rem\",\n width: \"0.875rem\",\n },\n};\ninterface IconBaseStyle {\n align: keyof typeof align;\n color: string;\n iconRotation: keyof typeof iconRotation;\n size: keyof typeof size;\n}\nconst Icon = {\n baseStyle: (props: IconBaseStyle) => {\n const allStyles = {\n ...svgBase,\n ...align[props.align],\n fill: props.color,\n ...iconRotation[props.iconRotation],\n ...size[props.size],\n };\n return {\n ...allStyles,\n // We still want to style any custom SVG element that was\n // passed to the `Icon` component.\n svg: {\n ...allStyles,\n },\n };\n },\n variants: {\n default: {},\n breadcrumbs: {\n fill: \"var(--nypl-colors-ui-white)\",\n display: { md: \"none\" },\n },\n },\n};\n\nexport default Icon;\n","import { labelLegendText } from \"./global\";\n\ninterface LabelBaseStyle {\n isInlined: boolean;\n}\n\nconst Label = {\n baseStyle: ({ isInlined }: LabelBaseStyle) => ({\n ...labelLegendText,\n flex: isInlined ? \"1\" : null,\n whiteSpace: isInlined ? \"nowrap\" : null,\n }),\n};\n\nexport default Label;\n","import { textMargin } from \"./global\";\n\ninterface ListBaseStyle {\n inline?: boolean;\n noStyling: boolean;\n}\n\nexport const baseListStyles = (inline = false, noStyling = false) => ({\n // Browser automatically applies margin, so by default we unset it.\n margin: noStyling ? \"0\" : \"unset\",\n listStyle: noStyling ? \"none\" : null,\n marginInlineStart: \"unset\",\n paddingLeft: noStyling ? \"0\" : \"l\",\n padding: noStyling ? \"0\" : null,\n display: inline ? \"flex\" : null,\n li: {\n marginRight: inline ? \"xs\" : null,\n listStyleType: inline ? \"none\" : null,\n _notFirst: {\n marginTop: inline ? null : \"xxs\",\n },\n },\n});\nexport const baseUnorderedStyles = (noStyling = false) => ({\n ...textMargin,\n listStyle: \"none\",\n li: {\n _before: {\n color: \"ui.gray.medium\",\n // \\2022 is the CSS Code/unicode for a bullet.\n content: noStyling ? \"unset\" : `\"\\\\2022\"`,\n // Needed to add space between the bullet and the text.\n display: \"inline-block\",\n fontWeight: \"bold\",\n fontSize: \"2\",\n lineHeight: \"0.9\",\n marginLeft: \"-1rem\",\n width: \"1rem\",\n },\n },\n});\nexport const baseSectionDefinitionStyles = {\n borderBottom: \"1px solid\",\n borderColor: \"ui.gray.light-cool\",\n paddingLeft: \"0\",\n h2: {\n borderTop: \"3px solid\",\n borderColor: \"section.research.primary\",\n margin: \"0\",\n padding: \"var(--nypl-space-xs) 0 0\",\n },\n};\nexport const baseDefinitionStyles = {\n ...baseSectionDefinitionStyles,\n dl: {\n display: \"grid\",\n gridTemplateColumns: { base: \"100%\", md: \"max(250px) 1fr\" },\n gridTemplateRows: \"1fr\",\n margin: \"var(--nypl-space-xs) 0 0\",\n },\n dt: {\n borderTop: \"1px solid\",\n borderColor: \"ui.gray.light-cool\",\n fontWeight: \"label.default\",\n paddingBottom: { base: \"0\", md: \"s\" },\n paddingTop: \"s\",\n paddingRight: { md: \"table.column\" },\n },\n dd: {\n margin: \"0\",\n paddingBottom: \"s\",\n borderTop: { base: \"none\", md: \"1px solid\" },\n borderColor: { md: \"ui.gray.light-cool\" },\n paddingTop: { md: \"s\" },\n },\n};\n\nconst List = {\n baseStyle: ({ inline, noStyling }: ListBaseStyle) =>\n baseListStyles(inline, noStyling),\n variants: {\n ul: ({ noStyling }: ListBaseStyle) => baseUnorderedStyles(noStyling),\n ol: textMargin,\n dl: baseDefinitionStyles,\n },\n};\n\nexport default List;\n","interface LogoBaseStyle {\n size: keyof typeof size;\n}\n\nconst svgBase = {\n display: \"inline-block\",\n height: \"auto\",\n width: \"100%\",\n};\nconst size = {\n default: {\n maxWidth: \"100%\",\n },\n xxsmall: {\n maxWidth: \"64px\",\n },\n xsmall: {\n maxWidth: \"96px\",\n },\n small: {\n maxWidth: \"165px\",\n },\n medium: {\n maxWidth: \"225px\",\n },\n large: {\n maxWidth: \"360px\",\n },\n xlarge: {\n maxWidth: \"360px\",\n },\n xxlarge: {\n height: \"var(--nypl-space-xl)\",\n width: \"var(--nypl-space-xl)\",\n },\n xxxlarge: {\n height: \"var(--nypl-space-xxl)\",\n width: \"var(--nypl-space-xxl)\",\n },\n};\nconst Logo = {\n baseStyle: (props: LogoBaseStyle) => {\n const allStyles = {\n ...svgBase,\n ...size[props.size],\n };\n return {\n ...allStyles,\n // We still want to style any custom SVG element that was\n // passed to the `Logo` component.\n svg: {\n ...allStyles,\n },\n };\n },\n};\n\nexport default Logo;\n","import { NotificationTypes } from \"../../components/Notification/Notification\";\n\ninterface NotificationBaseStyle {\n dismissible: boolean;\n isCentered: boolean;\n noMargin: boolean;\n notificationType: NotificationTypes;\n}\ninterface NotificationContentBaseStyle {\n alignText: boolean;\n icon: boolean;\n notificationType: NotificationTypes;\n}\ninterface NotificationHeadingBaseStyle {\n icon: boolean;\n isCentered: boolean;\n notificationType: NotificationTypes;\n}\n\nconst Notification = {\n parts: [\"container\", \"dismissibleButton\", \"icon\"],\n baseStyle: ({\n dismissible,\n isCentered,\n noMargin,\n notificationType,\n }: NotificationBaseStyle) => {\n let bg = \"ui.status.primary\";\n if (notificationType === \"announcement\" || notificationType === \"warning\") {\n bg = \"ui.gray.x-light-cool\";\n }\n return {\n bg,\n display: \"flex\",\n fontSize: \"text.caption\", // slightly smaller than the default size\n position: \"relative\",\n textAlign: isCentered ? \"center\" : null,\n borderRadius: noMargin ? \"0\" : \"4px\",\n margin: noMargin ? \"0\" : \"s\",\n container: {\n margin: \"auto\",\n maxWidth: \"var(--nypl-breakpoint-xl)\",\n padding: \"inset.default\",\n paddingRight: dismissible ? \"l\" : null,\n paddingLeft: isCentered && dismissible ? \"l\" : null,\n width: \"100%\",\n },\n dismissibleButton: {\n border: \"none\",\n bgColor: \"inherit\",\n alignItems: \"center\",\n color: \"ui.black\",\n display: \"flex\",\n height: \"32px\",\n width: \"32px\",\n minWidth: \"0\",\n position: \"absolute\",\n right: \"0\",\n top: \"0\",\n svg: {\n marginTop: \"0\",\n },\n _hover: {\n bg: \"inherit\",\n },\n },\n icon: {\n flexShrink: \"0\",\n marginRight: \"s\",\n },\n };\n },\n};\n\nconst NotificationContent = {\n parts: [\"content\"],\n baseStyle: ({\n alignText,\n icon,\n notificationType,\n }: NotificationContentBaseStyle) => ({\n display: \"flex\",\n justifyContent: \"center\",\n content: {\n color: notificationType === \"warning\" ? \"brand.primary\" : \"currentColor\",\n marginTop: icon ? \"xxxs\" : \"0\",\n paddingLeft: alignText\n ? \"calc(var(--nypl-space-m) + var(--nypl-space-s))\"\n : null,\n width: \"100%\",\n // Links should always be black and underlined.\n a: {\n color: \"ui.black\",\n _hover: {\n color: \"ui.black\",\n },\n },\n },\n }),\n};\n\nconst NotificationHeading = {\n parts: [\"heading\"],\n baseStyle: ({\n icon,\n isCentered,\n notificationType,\n }: NotificationHeadingBaseStyle) => {\n let color = \"ui.black\";\n if (notificationType === \"announcement\") {\n color = \"section.research.secondary\";\n } else if (notificationType === \"warning\") {\n color = \"brand.primary\";\n }\n return {\n display: \"flex\",\n marginBottom: \"xxs\",\n justifyContent: isCentered ? \"center\" : null,\n heading: {\n marginBottom: \"0\",\n marginTop: icon ? \"xxxs\" : \"0\",\n color,\n },\n };\n },\n};\n\nexport default {\n Notification,\n NotificationContent,\n NotificationHeading,\n};\n","const Pagination = {\n parts: [\"link\"],\n baseStyle: {\n alignItems: \"stretch\",\n display: \"flex\",\n width: \"100%\",\n link: {\n lineHeight: \"1.15\",\n textDecoration: \"none\",\n },\n ul: {\n marginBottom: \"0\",\n },\n },\n};\n\nexport default Pagination;\n","import { ProgressIndicatorSizes } from \"../../components/ProgressIndicator/ProgressIndicator\";\n\ninterface ProgressIndicatorBaseStyle {\n darkMode: boolean;\n size: ProgressIndicatorSizes;\n}\n\nconst ProgressIndicator = {\n parts: [\n \"circular\",\n \"circularLabel\",\n \"linear\",\n \"linearContainer\",\n \"linearPercentage\",\n ],\n baseStyle: ({ darkMode, size }: ProgressIndicatorBaseStyle) => {\n return {\n color: darkMode ? \"ui.white\" : \"ui.black\",\n circular: {\n // Note: we have to target the SVG HTMl elements in order\n // to override the default styles.\n svg: {\n height: size === \"default\" ? \"48px\" : \"24px\",\n width: size === \"default\" ? \"48px\" : \"24px\",\n display: \"block\",\n circle: {\n _first: {\n stroke: darkMode ? \"ui.gray.dark\" : \"ui.gray.light-cool\",\n },\n _last: {\n stroke: darkMode ? \"ui.white\" : \"ui.link.primary\",\n },\n },\n },\n },\n circularContainer: {\n alignItems: \"center\",\n display: \"flex\",\n flexDirection: \"column\",\n width: \"fit-content\",\n },\n linear: {\n // Hard to target this specific element without using\n // \"Progress\" as the key name in index.ts\n \"> div\": {\n bg: darkMode ? \"ui.white\" : \"ui.link.primary\",\n },\n flex: 25,\n bg: darkMode ? \"ui.gray.dark\" : \"ui.gray.light-cool\",\n height: {\n base: \"4px\",\n md: size === \"default\" ? \"8px\" : \"4px\",\n },\n },\n linearContainer: {\n display: \"flex\",\n alignItems: \"center\",\n },\n linearPercentage: {\n padding: \"0 var(--nypl-space-xs)\",\n flex: 1,\n },\n };\n },\n};\n\nexport default ProgressIndicator;\n","import {\n activeFocus,\n checkboxRadioLabelStyles,\n checkboxRadioControlSize,\n checkboxRadioHelperErrorTextStyle,\n} from \"./global\";\n\n// Style object for the Radio's \"control\" or visual icon.\nconst baseStyleControl = {\n verticalAlign: \"middle\",\n transitionProperty: \"box-shadow\",\n transitionDuration: \"normal\",\n border: \"2px solid\",\n borderRadius: \"round\",\n borderColor: \"ui.black\",\n color: \"ui.white\",\n outline: \"none\",\n _checked: {\n bg: \"ui.white\",\n borderColor: \"ui.focus\",\n color: \"ui.white\",\n _disabled: {\n borderColor: \"ui.disabled.primary\",\n bg: \"ui.white\",\n _before: {\n bg: \"ui.disabled.primary\",\n },\n },\n _invalid: {\n _hover: {\n borderColor: \"ui.error.primary\",\n },\n _before: {\n borderColor: \"ui.error.primary\",\n bg: \"ui.error.primary\",\n },\n },\n _hover: {\n bg: \"ui.white\",\n },\n _before: {\n content: `\"\"`,\n display: \"block\",\n w: \"3\",\n h: \"3\",\n borderRadius: \"round\",\n bg: \"ui.focus\",\n },\n },\n _disabled: {\n borderColor: \"ui.disabled.primary\",\n bg: \"ui.white\",\n },\n _focus: {\n ...activeFocus(),\n boxShadow: \"outline\",\n borderColor: \"ui.focus\",\n },\n _invalid: {\n borderColor: \"ui.error.primary\",\n },\n // TODO:\n // _indeterminate: {\n // borderColor: \"ui.gray.medium\",\n // bg: \"ui.white\",\n // },\n};\n\n// Style object for the Radio's label\nconst baseStyleLabel = checkboxRadioLabelStyles;\n\n// Style object for the Radio's helper text\nconst baseStyleHelperErrorText = checkboxRadioHelperErrorTextStyle;\n\nconst baseStyle = {\n // Chakra-inserted elements in the Chakra Radio component\n control: baseStyleControl,\n label: baseStyleLabel,\n // Custom element in the DS Radio component.\n helperErrorText: baseStyleHelperErrorText,\n};\n\n// Sticking to \"md\" for the default size.\nconst sizes = {\n md: {\n control: {\n ...checkboxRadioControlSize,\n },\n label: { fontSize: \"label.default\" },\n },\n};\n\nconst Radio = {\n parts: [\"control\", \"helperErrorText\", \"label\"],\n baseStyle,\n sizes,\n // Default values\n defaultProps: {\n size: \"md\",\n },\n};\n\nexport default Radio;\n","import { checkboxRadioGroupStyles } from \"./global\";\n\nconst RadioGroup = {\n parts: [\"helperErrorText\", \"stack\"],\n baseStyle: ({ isFullWidth = false }) => ({\n ...checkboxRadioGroupStyles(isFullWidth),\n }),\n};\n\nexport default RadioGroup;\n","const SearchBar = {\n parts: [\"select\"],\n baseStyle: {\n display: \"flex\",\n marginBottom: {\n base: \"xs\",\n md: \"auto\",\n },\n flexFlow: {\n base: \"column nowrap\",\n md: \"row nowrap\",\n },\n select: {\n marginBottom: \"0\",\n },\n },\n};\n\nexport default SearchBar;\n","import { keyframes } from \"@chakra-ui/system\";\n\ninterface SkeletonLoaderBaseStyle {\n imageAspectRatio: keyof typeof imagePaddingBottomStyles;\n isBordered: boolean;\n showImage?: boolean;\n}\n\nconst element = {\n borderRadius: \"2px\",\n boxSizing: \"border-box\",\n marginBottom: \"xs\",\n};\nconst borderRules = {\n border: \"1px solid\",\n borderColor: \"ui.gray.light-cool\",\n padding: \"s\",\n};\nconst imagePaddingBottomStyles = {\n landscape: \"50%\",\n portrait: \"133%\",\n square: \"100%\",\n};\nconst imageRowHeightStyles = {\n landscape: \"110px\",\n portrait: \"294px\",\n square: \"220px\",\n};\n// NYPL's skeleton loader component.\nconst SkeletonLoader = {\n parts: [\"section\", \"image\", \"container\", \"heading\", \"content\", \"button\"],\n baseStyle: ({ imageAspectRatio, isBordered }: SkeletonLoaderBaseStyle) => {\n const borderStyles = isBordered ? { ...borderRules } : {};\n\n return {\n margin: \"auto\",\n width: \"100%\",\n ...borderStyles,\n section: {\n marginBottom: \"s\",\n _last: {\n marginBottom: \"0\",\n },\n },\n image: {\n ...element,\n boxSizing: \"border-box\",\n flexShrink: \"0\",\n height: \"0\",\n overflow: \"hidden\",\n paddingBottom: imagePaddingBottomStyles[imageAspectRatio],\n position: \"relative\",\n width: \"100%\",\n },\n container: {\n marginTop: \"s\",\n width: \"100%\",\n },\n heading: {\n ...element,\n height: \"32px\",\n },\n content: {\n ...element,\n height: \"20px\",\n },\n button: {\n height: \"32px\",\n margin: \"auto\",\n maxWidth: \"160px\",\n width: \"100%\",\n },\n };\n },\n variants: {\n row: ({ imageAspectRatio, showImage }: SkeletonLoaderBaseStyle) => ({\n alignItems: \"flex-start\",\n display: { md: \"flex\" },\n image: {\n overflow: { md: \"visible\" },\n paddingBottom: { md: \"0\" },\n position: { md: \"relative\" },\n width: { md: \"220px\" },\n height: { md: imageRowHeightStyles[imageAspectRatio] },\n },\n container: {\n marginLeft: showImage ? { md: \"m\" } : null,\n marginTop: { md: \"0\" },\n },\n button: {\n margin: { md: \"0\" },\n },\n }),\n },\n};\n\n// Fade animation\nconst fade = () =>\n keyframes({\n from: { opacity: 0.9 },\n \"50%\": { opacity: 0.7 },\n to: { opacity: 0.9 },\n });\n// Overriding Chakra's Skeleton animation.\nconst Skeleton = {\n baseStyle: {\n borderRadius: \"2px\",\n background: \"ui.gray.light-cool\",\n animation: `${fade()} 1000ms cubic-bezier(0.25, -0.5, 1, 0) infinite`,\n },\n};\n\nexport { Skeleton, SkeletonLoader };\n","const SkipNavigation = {\n baseStyle: {\n ul: {\n margin: \"0\",\n },\n // Don't display links by default...\n a: {\n backgroundColor: \"ui.white\",\n height: \"1px\",\n left: \"-10000px\",\n overflow: \"hidden\",\n position: \"absolute\",\n top: \"auto\",\n width: \"1px\",\n // Only display when the user focuses on the links.\n _focus: {\n border: \"1px solid var(—nypl-colors-ui-gray-dark)\",\n height: \"auto\",\n left: \"2rem\",\n padding:\n \"var(--nypl-space-inset-extranarrow) var(--nypl-space-inset-narrow)\",\n top: \"3rem\",\n width: \"auto\",\n },\n },\n },\n};\n\nexport default SkipNavigation;\n","interface CustomSliderBaseStyle {\n isDisabled: boolean;\n isInvalid: boolean;\n showBoxes: boolean;\n showValues: boolean;\n}\n\n// Margins around the static display values.\nconst staticValues = {\n marginTop: \"xs\",\n marginBottom: \"xs\",\n marginRight: \"s\",\n marginLeft: \"0\",\n};\nconst CustomSlider = {\n parts: [\n \"container\",\n \"leftValue\",\n \"rightValue\",\n \"textInput\",\n \"sliderContainer\",\n \"filledTrack\",\n \"track\",\n \"thumb\",\n ],\n baseStyle: ({\n isDisabled,\n isInvalid,\n showBoxes,\n showValues,\n }: CustomSliderBaseStyle) => {\n let baseColor = \"ui.link.primary\";\n if (isInvalid) {\n baseColor = \"ui.error.primary\";\n } else if (isDisabled) {\n baseColor = \"ui.disabled.primary\";\n }\n\n return {\n container: {\n display: \"flex\",\n alignItems: \"center\",\n },\n leftValue: { ...staticValues, color: isDisabled ? \"ui.gray.dark\" : null },\n rightValue: {\n ...staticValues,\n marginLeft: \"s\",\n // If the text input boxes are shown, then there already is\n // a margin, so we can set this static value to \"0\".\n marginRight: showBoxes ? \"0\" : \"s\",\n color: isDisabled ? \"ui.gray.dark\" : null,\n },\n textInput: {\n // Allows for three or more digits present in the\n // min or max value text input.\n minWidth: \"65px\",\n color: isInvalid ? \"ui.error.primary\" : \"ui.black\",\n },\n // This is added to the container so that the slider thumbs don't\n // overflow past the container when the value boxes or min/max values\n // are not shown.\n sliderContainer: {\n marginLeft: !showValues ? \"xs\" : null,\n marginRight: !showBoxes && !showValues ? \"xs\" : null,\n },\n // Filled track doesn't have a _disabled or _invalid state...\n // so we manually do it through the props.\n filledTrack: {\n bgColor: baseColor,\n },\n track: {\n bgColor: \"ui.gray.light-cool\",\n _disabled: {\n bgColor: \"ui.disabled.primary\",\n },\n },\n thumb: {\n border: \"1px solid\",\n // Thumb doesn't have an _invalid state...\n // so we manually do it through the props.\n borderColor: baseColor,\n boxShadow: \"none\",\n _active: {\n transform: \"translateY(-50%) scale(1.0)\",\n },\n _disabled: {\n bgColor: \"ui.disabled.secondary\",\n borderColor: \"ui.disabled.primary\",\n },\n },\n };\n },\n};\n\nexport default CustomSlider;\n","const StatusBadge = {\n baseStyle: {\n borderRadius: \"base\",\n color: \"ui.black\",\n display: \"block\",\n fontSize: \"-1\", // slightly smaller than the default size\n fontStyle: \"italic\",\n py: \"inset.extranarrow\",\n px: \"inset.narrow\",\n textAlign: \"center\",\n width: \"fit-content\",\n },\n variants: {\n low: {\n bg: \"ui.gray.light-cool\",\n },\n medium: {\n bg: \"ui.status.primary\",\n },\n high: {\n bg: \"ui.status.secondary\",\n },\n },\n};\n\nexport default StatusBadge;\n","interface BaseStyleProps {\n columnHeadersTextColor?: string;\n showRowDividers?: boolean;\n useRowHeaders?: boolean;\n}\n\nexport const baseTHStyles = (\n showRowDividers = false,\n columnHeadersTextColor = \"\"\n) => ({\n border: showRowDividers ? undefined : \"none\",\n borderBottom: showRowDividers ? undefined : \"0px\",\n color: columnHeadersTextColor ? columnHeadersTextColor : \"ui.black\",\n fontSize: \"0\",\n fontWeight: \"bold\",\n letterSpacing: \"0\",\n paddingLeft: 0,\n paddingRight: \"m\",\n textTransform: \"capitalize\",\n _first: {\n paddingLeft: showRowDividers ? \"m\" : null,\n },\n _last: {\n paddingRight: showRowDividers ? \"m\" : \"0\",\n },\n});\nexport const baseTDStyles = (\n showRowDividers = false,\n useRowHeaders = false\n) => ({\n border: showRowDividers ? undefined : \"none\",\n borderBottom: showRowDividers ? undefined : \"0px\",\n letterSpacing: \"0\",\n paddingLeft: 0,\n paddingRight: \"m\",\n _first: {\n paddingLeft: showRowDividers && !useRowHeaders ? \"m\" : null,\n },\n _last: {\n paddingRight: showRowDividers ? \"m\" : \"0\",\n },\n});\nexport const baseStyle = ({\n columnHeadersTextColor,\n showRowDividers,\n useRowHeaders,\n}: BaseStyleProps) => ({\n // Headers `th` can be rendered as the first cell in every row through the\n // `useRowHeaders`. Whereas the header `th` in the `thead` can be rendered\n // with a custom color, the row header `th` in the `tbody` should always\n // have text color black.\n tbody: {\n th: {\n color: \"var(--nypl-colors-ui-black)\",\n },\n },\n th: baseTHStyles(showRowDividers, columnHeadersTextColor),\n td: baseTDStyles(showRowDividers, useRowHeaders),\n caption: {\n captionSide: \"top\",\n color: \"ui.black\",\n fontSize: \"heading.secondary\",\n fontWeight: \"heading.secondary\",\n marginBottom: \"s\",\n marginLeft: \"0\",\n marginRight: \"0\",\n marginTop: \"0\",\n padding: \"0\",\n textAlign: \"left\",\n },\n});\n\nconst CustomTable = {\n baseStyle,\n};\n\nexport default CustomTable;\n","import { baseTDStyles, baseTHStyles } from \"./customTable\";\nimport { textMargin } from \"./global\";\nimport { headings } from \"./heading\";\nimport { baseLinkStyles } from \"./link\";\nimport {\n baseDefinitionStyles,\n baseListStyles,\n baseSectionDefinitionStyles,\n baseUnorderedStyles,\n} from \"./list\";\n\ninterface StructuredContentBaseStyle {\n hasFigureImage: boolean;\n imageAspectRatio: string;\n imagePosition: string;\n}\n\nconst StructuredContent = {\n parts: [\"image\", \"imageFigure\", \"imageWrapper\"],\n baseStyle: ({\n hasFigureImage,\n imageAspectRatio,\n imagePosition,\n }: StructuredContentBaseStyle) => {\n const styles: { maxWidth?: string } = {};\n const wrapperStyles = {\n float: [\n \"none\",\n \"none\",\n imagePosition !== \"center\" ? imagePosition : undefined,\n ],\n marginLeft: [\n \"auto\",\n \"auto\",\n imagePosition === \"center\"\n ? null\n : imagePosition === \"left\"\n ? \"0\"\n : \"l\",\n ],\n marginRight: [\n \"auto\",\n \"auto\",\n imagePosition === \"center\"\n ? null\n : imagePosition === \"left\"\n ? \"m\"\n : \"0\",\n ],\n width: imagePosition !== \"center\" ? \"100%\" : undefined,\n ...styles,\n };\n if (imagePosition === \"center\") {\n styles.maxWidth = \"100%\";\n }\n return {\n imageFigure: {\n ...wrapperStyles,\n marginBottom: \"m\",\n },\n imageWrapper: {\n ...wrapperStyles,\n marginBottom: !hasFigureImage ? \"m\" : null,\n },\n image: {\n // To handle the case when the image does not have a container,\n // e.g. when there is no image caption or credit.\n float: [\n \"none\",\n \"none\",\n imagePosition !== \"center\" ? imagePosition : undefined,\n ],\n marginLeft: [\n \"auto\",\n \"auto\",\n imagePosition === \"right\" && imageAspectRatio === \"original\"\n ? \"m\"\n : undefined,\n ],\n marginRight: [\n \"auto\",\n \"auto\",\n imagePosition === \"left\" && imageAspectRatio === \"original\"\n ? \"m\"\n : undefined,\n ],\n marginBottom:\n !hasFigureImage || imageAspectRatio === \"original\" ? \"m\" : null,\n ...styles,\n },\n /** The following styles are meant to target HTML elements that are\n * not rendered from the Reservoir DS. Typically, these HTML elements\n * are added from an API response.\n */\n // This gives Chakra `Box` styles to divs inside the\n // main `StructuredContent` content area.\n \".structuredcontent-body > div\": {\n marginTop: \"var(--nypl-space-l)\",\n marginInlineEnd: \"var(--nypl-space-0)\",\n marginBottom: \"var(--nypl-space-0)\",\n marginInlineStart: \"var(--nypl-space-0)\",\n },\n a: baseLinkStyles,\n ul: {\n ...baseListStyles(),\n listStyle: \"none\",\n ...baseUnorderedStyles(),\n },\n ol: {\n ...baseListStyles(),\n ...textMargin,\n },\n // For section, h2 in the definition list.\n section: baseSectionDefinitionStyles,\n dl: baseDefinitionStyles.dl,\n dt: baseDefinitionStyles.dt,\n dd: baseDefinitionStyles.dd,\n table: {\n width: \"100%\",\n th: {\n // These styles, except for `baseTHStyles`, are set from\n // Chakra so they are copied explicitly.\n textAlign: \"start\",\n paddingInlineStart: \"var(--nypl-space-6)\",\n paddingInlineEnd: \"var(--nypl-space-6)\",\n paddingTop: \"var(--nypl-space-3)\",\n paddingBottom: \"var(--nypl-space-3)\",\n lineHeight: \"var(--nypl-lineHeights-4)\",\n ...baseTHStyles(),\n },\n td: {\n // These styles, except for `baseTDStyles`, are set from\n // Chakra so they are copied explicitly.\n textAlign: \"start\",\n paddingInlineStart: \"var(--nypl-space-6)\",\n paddingInlineEnd: \"var(--nypl-space-6)\",\n paddingTop: \"var(--nypl-space-4)\",\n paddingBottom: \"var(--nypl-space-4)\",\n lineHeight: \"var(--nypl-lineHeights-5)\",\n ...baseTDStyles(),\n },\n },\n // h1, h2, h3, h4, h5, h6\n ...headings,\n };\n },\n};\n\nexport default StructuredContent;\n","const tablist = {\n borderColor: \"ui.black\",\n};\nconst tab = {\n color: \"black !important\",\n paddingInlineStart: \"s\",\n paddingLeft: \"s\",\n background: \"transparent\",\n border: \"0\",\n borderBottom: \"1px solid\",\n borderColor: \"red\",\n height: { base: \"44px\" },\n marginRight: {\n base: \"0\",\n md: \"1px\",\n },\n paddingRight: {\n base: \"s\",\n md: \"l\",\n lg: \"xl\",\n },\n whiteSpace: \"nowrap\",\n _hover: {\n bg: \"ui.gray.x-light-cool\",\n borderTopRadius: \"sm\",\n borderBottom: \"1px solid\",\n borderBottomColor: \"ui.black\",\n },\n _selected: {\n fontWeight: \"bold\",\n bg: \"ui.gray.light-cool\",\n border: \"0\",\n borderTopRadius: \"sm\",\n borderBottom: \"3px solid\",\n borderBottomColor: \"ui.black\",\n paddingBottom: \"5px\",\n },\n _focus: {\n boxShadow: \"0\",\n },\n};\n// Only display the previous/next arrow buttons on mobile.\nconst buttonArrows = {\n border: \"0\",\n borderRadius: \"0\",\n display: {\n // After 38em/600px, don't display the arrow button anymore.\n md: \"none\",\n },\n height: \"44px\",\n width: \"44px !important\",\n top: \"8px\",\n marginLeft: \"4px\",\n marginRight: \"4px\",\n // Code from https://codesandbox.io/s/fxjeo for the mobile carousel\n pos: \"absolute\",\n transition: \"0.6s ease\",\n zIndex: \"9999\",\n};\nconst tablistWrapper = {\n display: \"flex\",\n alignItems: \"center\",\n borderBottom: {\n base: \"0\",\n md: \"1px solid black\",\n },\n height: { base: \"58px\", md: \"auto\" },\n margin: \"0\",\n overflowX: { base: \"auto\", md: \"visible\" },\n paddingBottom: { base: \"5px\", md: \"0\" },\n paddingLeft: { base: \"4px\", md: \"0\" },\n paddingRight: { base: \"4px\", md: \"0\" },\n paddingTop: { base: \"4px\", md: \"0\" },\n position: \"relative\",\n};\nconst tabpanels = {\n paddingTop: \"2px\",\n};\n\nconst carouselParent = {\n position: { base: \"absolute\", md: \"relative\" },\n left: { base: \"50px\", md: \"auto\" },\n paddingBottom: { base: \"5px\", md: \"0\" },\n paddingLeft: { base: \"4px\", md: \"0\" },\n paddingRight: \"0\",\n paddingTop: { base: \"4px\", md: \"0\" },\n right: { base: \"52px\", md: \"auto\" },\n top: { base: \"4px\", md: \"0\" },\n overflowX: { base: \"hidden\", md: \"visible\" },\n};\n\nconst CustomTabs = {\n // tablist, tab, and tabpanels are existing keys which are extended but\n // buttonArrows, tablistWrapper, and carouselParent are custom elements\n // in the `Tabs` component.\n parts: [\"buttonArrows\", \"tablistWrapper\", \"carouselParent\"],\n baseStyle: {\n tablist,\n tab,\n // Only display the previous/next arrow buttons on mobile.\n buttonArrows,\n // To better align the mobile arrow buttons with the tablist.\n tablistWrapper,\n tabpanels,\n carouselParent,\n },\n};\n\nexport default CustomTabs;\n","// From @mixin breakout:\n// Used for elements that should be edge-to-edge.\nconst breakout = {\n marginLeft: \"calc(-50vw + 50%)\",\n marginRight: \"calc(-50vw + 50%)\",\n};\n// From the `wrapper` SCSS mixin.\n// TODO: Eventually we may be able to put shared JS style objects\n// into a utils file for other mixins that are shared.\nconst wrapperStyles = {\n marginY: 0,\n marginX: \"auto\",\n maxWidth: \"1280px\",\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: \"s\",\n paddingLeft: \"s\",\n width: \"100%\",\n};\n\nconst Template = {\n baseStyle: {\n boxSizing: \"border-box\",\n color: \"ui.black\",\n // Users with non-overlay scrollbars have a small horizontal scrollbar from\n // our breakout mixin. Fix identified here: https://cloudfour.com/thinks/breaking-out-with-viewport-units-and-calc/#one-big-dumb-caveat\n overflowX: \"hidden\",\n \"*\": { boxSizing: \"inherit\" },\n \"*::after\": { boxSizing: \"inherit\" },\n \"*::before\": { boxSizing: \"inherit\" },\n },\n sizes: {},\n defaultProps: {},\n};\nconst TemplateHeader = {\n baseStyle: {\n marginBottom: \"page.hstack\", // --nypl-space-l\n },\n};\nconst TemplateBreakout = {\n baseStyle: {\n ...breakout,\n width: \"100vw\",\n marginBottom: \"page.hstack\", // --nypl-space-l\n },\n};\nconst TemplateContent = {\n baseStyle: {\n ...wrapperStyles,\n display: \"block\",\n marginBottom: \"page.hstack\", // --nypl-space-l\n },\n variants: {\n sidebar: {\n display: \"flex\",\n flexFlow: {\n base: \"column nowrap\",\n md: \"row wrap\",\n },\n },\n },\n};\nconst TemplateContentTop = {\n baseStyle: {\n flex: \"1 0 100%\",\n marginBottom: \"page.hstack\", // --nypl-space-l\n },\n};\nconst TemplateContentPrimary = {\n baseStyle: {\n flex: \"1 1\",\n marginBottom: \"page.hstack\", // --nypl-space-l\n },\n variants: {\n left: {\n display: \"flex\",\n flexFlow: \"column nowrap\",\n order: \"1\",\n marginRight: { md: 0 },\n minWidth: { md: 0 },\n },\n },\n};\nconst TemplateContentSidebar = {\n baseStyle: {\n flex: \"0 0 255px\",\n order: { md: \"page.vstack\" },\n marginBottom: \"page.hstack\", // --nypl-space-l\n },\n variants: {\n left: {\n marginRight: {\n base: 0,\n md: \"page.vstack\", // --nypl-space-xl\n },\n },\n right: {\n marginLeft: {\n base: 0,\n md: \"page.vstack\", // --nypl-space-xl\n },\n },\n },\n};\n\nexport default {\n Template,\n TemplateHeader,\n TemplateBreakout,\n TemplateContent,\n TemplateContentTop,\n TemplateContentPrimary,\n TemplateContentSidebar,\n};\n","interface TextBaseStyle {\n isBold: boolean;\n isItalic: boolean;\n noSpace: boolean;\n variant: string;\n}\n\nconst variants = {\n default: {},\n caption: {\n fontSize: \"text.caption\",\n },\n tag: {\n fontSize: \"text.tag\",\n },\n mini: {\n fontSize: \"text.mini\",\n },\n};\nconst Text = {\n baseStyle: ({ isBold, isItalic, noSpace, variant }: TextBaseStyle) => {\n const fontWeight = isBold\n ? variant === \"tag\" || variant === \"mini\"\n ? \"medium\"\n : \"bold\"\n : null;\n const fontStyle = isItalic ? \"italic\" : null;\n\n return {\n fontStyle: fontStyle,\n fontWeight: fontWeight,\n marginBottom: noSpace ? \"0 !important\" : null,\n };\n },\n variants,\n};\n\nexport default Text;\n","import {\n selectTextInputDisabledStyles,\n selectTextInputFocusStyles,\n} from \"./global\";\n\nconst input = {\n bgColor: \"ui.white\",\n border: \"1px solid\",\n borderColor: \"ui.gray.medium\",\n borderRadius: \"sm\",\n fontSize: \"text.caption\",\n py: \"inset.narrow\",\n px: \"inset.default\",\n _hover: {\n borderColor: \"ui.gray.dark\",\n },\n _disabled: {\n ...selectTextInputDisabledStyles,\n _placeholder: {\n color: \"ui.gray.medium\",\n },\n },\n _active: selectTextInputFocusStyles,\n _focus: selectTextInputFocusStyles,\n _placeholder: {\n color: \"ui.gray.dark\",\n fontStyle: \"italic\",\n lineHeight: \"21px\",\n },\n _invalid: {\n border: \"1px solid\",\n borderColor: \"ui.error.primary\",\n boxShadow: \"none\",\n },\n};\n\nconst TextInput = {\n parts: [\"input\", \"textarea\"],\n baseStyle: {\n input,\n textarea: {\n ...input,\n lineheight: \"1.5\",\n minHeight: \"xxl\",\n },\n },\n variants: {\n searchBar: {\n flex: \"1 1 80%\",\n input: {\n borderRightRadius: \"none\",\n },\n },\n searchBarSelect: {\n flex: \"1 1 80%\",\n input: {\n borderRadius: \"none\",\n borderTopLeftRadius: { base: \"sm\", md: \"none\" },\n borderTopRightRadius: { base: \"sm\", md: \"none\" },\n },\n },\n },\n};\n\nexport default TextInput;\n","import { cssVar } from \"@chakra-ui/theme-tools\";\n\nimport { ToggleSizes } from \"../../components/Toggle/Toggle\";\n\ninterface ToggleBaseStyle {\n isDisabled: boolean;\n size: ToggleSizes;\n}\n\nconst toggleBaseStyle = ({ isDisabled, size }: ToggleBaseStyle) => {\n const label = { alignItems: \"start\", display: \"flex\", width: \"fit-content\" };\n const helperErrorText = {\n marginLeft: size === \"default\" ? \"xxl\" : \"xl\",\n fontStyle: isDisabled ? \"italic\" : null,\n };\n return {\n label,\n helperErrorText,\n };\n};\nconst $width = cssVar(\"switch-track-width\");\nconst $height = cssVar(\"switch-track-height\");\n\nconst Switch = {\n baseStyle: ({ size }: { size: string }) => {\n return {\n alignItems: \"start\",\n opacity: 0.4,\n track: {\n border: \"1px solid\",\n borderColor: \"ui.gray.medium\",\n p: \"1px\",\n _checked: {\n bg: \"ui.link.primary\",\n borderColor: \"ui.link.primary\",\n opacity: 1,\n },\n _invalid: {\n bg: \"inherit\",\n borderColor: \"ui.error.primary\",\n \"> span\": {\n bg: \"ui.error.primary\",\n },\n },\n _disabled: {\n bg: \"ui.gray.medium\",\n borderColor: \"ui.gray.medium\",\n _checked: {\n opacity: 0.4,\n },\n },\n _focus: {\n outline: \"2px solid\",\n outlineColor: \"ui.focus\",\n outlineOffset: \"2px\",\n zIndex: \"9999\",\n },\n },\n label: {\n fontSize: \"label.default\",\n marginLeft: \"xs\",\n marginTop: size === \"lg\" ? \"xxxs\" : null,\n _disabled: {\n color: \"ui.gray.dark\",\n fontStyle: \"italic\",\n },\n },\n thumb: {\n _disabled: {\n bg: \"ui.error.primary\",\n },\n },\n };\n },\n sizes: {\n sm: {\n container: {\n // Chakra defaults for `sm`:\n // width: 1.375rem\n // height: 0.75rem\n [$width.variable]: \"2.25rem\",\n [$height.variable]: \"1rem\",\n },\n },\n lg: {\n container: {\n // Chakra defaults for `lg`:\n // width: 2.875rem\n // height: 1.5rem\n [$width.variable]: \"3.25rem\",\n [$height.variable]: \"1.5rem\",\n },\n },\n },\n defaultProps: {\n colorScheme: \"white\",\n },\n};\n\nconst Toggle = {\n parts: [\"helperErrorText\"],\n baseStyle: toggleBaseStyle,\n // Default values\n defaultProps: {\n size: \"lg\",\n },\n};\n\nexport default { Toggle, Switch };\n","const fourByThree = {\n inside: {\n paddingBottom: \"75%\",\n },\n};\n\nconst square = {\n inside: {\n paddingBottom: \"100%\",\n },\n};\n\nconst invalid = {\n backgroundColor: \"ui.gray.light-cool\",\n height: \"auto\",\n padding: \"s\",\n};\n\nconst VideoPlayer = {\n baseStyle: {\n inside: {\n height: \"0\",\n overflow: \"hidden\",\n paddingBottom: \"56.25%\",\n position: \"relative\",\n },\n iframe: {\n height: \"100%\",\n left: \"0\",\n margin: \"auto\",\n position: \"absolute\",\n top: \"0\",\n width: \"100%\",\n },\n helperText: {\n marginBottom: \"0\",\n marginTop: \"xs\",\n },\n },\n variants: {\n fourByThree,\n invalid,\n square,\n },\n};\n\nexport default VideoPlayer;\n","import { extendTheme } from \"@chakra-ui/react\";\n/** Global theme styles */\nimport global from \"./foundations/global\";\nimport breakpoints from \"./foundations/breakpoints\";\nimport colors from \"./foundations/colors\";\nimport radii from \"./foundations/radii\";\nimport shadows from \"./foundations/shadows\";\nimport { spacing } from \"./foundations/spacing\";\nimport typography from \"./foundations/typography\";\n/** Component styles */\nimport Accordion from \"./components/accordion\";\nimport Breadcrumb from \"./components/breadcrumb\";\nimport Button from \"./components/button\";\nimport ButtonGroup from \"./components/buttonGroup\";\nimport Card from \"./components/card\";\nimport Checkbox from \"./components/checkbox\";\nimport ComponentWrapper from \"./components/componentWrapper\";\nimport CheckboxGroup from \"./components/checkboxGroup\";\nimport { CustomImage, CustomImageWrapper } from \"./components/image\";\nimport CustomSelect from \"./components/select\";\nimport DatePicker from \"./components/datePicker\";\nimport Fieldset from \"./components/fieldset\";\nimport Heading from \"./components/heading\";\nimport HelperErrorText from \"./components/helperErrorText\";\nimport Hero from \"./components/hero\";\nimport HorizontalRule from \"./components/horizontalRule\";\nimport Icon from \"./components/icon\";\nimport Label from \"./components/label\";\nimport Link from \"./components/link\";\nimport List from \"./components/list\";\nimport Logo from \"./components/logo\";\nimport NotificationStyles from \"./components/notification\";\nimport Pagination from \"./components/pagination\";\nimport ProgressIndicator from \"./components/progressIndicator\";\nimport Radio from \"./components/radio\";\nimport RadioGroup from \"./components/radioGroup\";\nimport SearchBar from \"./components/searchBar\";\nimport { Skeleton, SkeletonLoader } from \"./components/skeletonLoader\";\nimport SkipNavigation from \"./components/skipNavigation\";\nimport CustomSlider from \"./components/slider\";\nimport StatusBadge from \"./components/statusBadge\";\nimport StructuredContent from \"./components/structuredContent\";\nimport Tabs from \"./components/tabs\";\nimport CustomTable from \"./components/customTable\";\nimport TemplateStyles from \"./components/template\";\nimport Text from \"./components/text\";\nimport TextInput from \"./components/textInput\";\nimport Toggle from \"./components/toggle\";\nimport VideoPlayer from \"./components/videoPlayer\";\n\n/**\n * See Chakra default theme for shape of theme object:\n * https://github.com/chakra-ui/chakra-ui/tree/main/packages/theme\n *\n * The following are using the default configuration from Chakra:\n * - z-indices\n * - radii\n * - blur\n * - shadows\n * - borders\n * - transitions\n *\n * Theme extensions exist for:\n * - breakpoints\n * - colors\n * - typography (font, font size, font weight)\n * - spacing\n */\nconst theme = extendTheme({\n styles: { global },\n breakpoints,\n colors,\n radii,\n shadows,\n space: spacing,\n ...typography,\n /**\n * Chakra documentation on component styles:\n * https://chakra-ui.com/docs/theming/component-style\n */\n components: {\n Accordion,\n Breadcrumb,\n Button,\n ButtonGroup,\n ...Card,\n Checkbox,\n CheckboxGroup,\n ComponentWrapper,\n CustomImage,\n CustomImageWrapper,\n CustomSelect,\n DatePicker,\n Fieldset,\n Heading,\n HelperErrorText,\n Hero,\n HorizontalRule,\n Icon,\n Label,\n Link,\n List,\n Logo,\n ...NotificationStyles,\n Pagination,\n ProgressIndicator,\n Radio,\n RadioGroup,\n SearchBar,\n Skeleton,\n SkeletonLoader,\n SkipNavigation,\n CustomSlider,\n StatusBadge,\n StructuredContent,\n Tabs,\n CustomTable,\n ...TemplateStyles,\n Text,\n TextInput,\n ...Toggle,\n VideoPlayer,\n },\n // Use `cssVarPrefix` to set the prefix used on the CSS vars produced by\n // Chakra. By default, Chakra prefixes its own CSS variables with `--chakra`.\n config: {\n cssVarPrefix: \"nypl\",\n },\n});\n\nexport default theme;\n","import React from \"react\";\nimport { ChakraProvider } from \"@chakra-ui/react\";\nimport theme from \"./index\";\n\nconst DSProvider = ({ children }: React.PropsWithChildren<{}>) => (\n <ChakraProvider theme={theme}>{children}</ChakraProvider>\n);\n\nexport default DSProvider;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Image, { ComponentImageProps } from \"../Image/Image\";\n\nexport type HeroTypes =\n | \"primary\"\n | \"secondary\"\n | \"secondaryBooksAndMore\"\n | \"secondaryLocations\"\n | \"secondaryResearch\"\n | \"secondaryWhatsOn\"\n | \"tertiary\"\n | \"campaign\"\n | \"fiftyFifty\";\n// Only used for internal purposes.\nexport const heroSecondaryTypes = [\n \"secondary\",\n \"secondaryBooksAndMore\",\n \"secondaryLocations\",\n \"secondaryResearch\",\n \"secondaryWhatsOn\",\n];\nexport interface HeroImageProps\n extends Pick<ComponentImageProps, \"alt\" | \"src\"> {}\nexport interface HeroProps {\n /** Optional hex color value used to override the default background\n * color for a given `Hero` variation.\n * Note: not all `Hero` variations utilize this prop. */\n backgroundColor?: string;\n /** Optional path to an image that will be used as a background image for the\n * `Hero` component.\n * Note: not all `Hero` variations utilize this prop. */\n backgroundImageSrc?: string;\n /** Optional hex color value used to override the default text color for a\n * given `Hero` variation.\n * Note: not all `Hero` variations utilize this prop. */\n foregroundColor?: string;\n /** Optional heading element. */\n heading?: JSX.Element;\n /** Used to control how the `Hero` component will be rendered. */\n heroType?: HeroTypes;\n /** Object used to create and render the `Image` component. Note that only\n * `src` and `alt` are the available attributes to pass. If `imageProps.alt`\n * is left blank, a warning will be logged to the console and will cause\n * accessibility issues. For `imageProps.src`, it will only work for the\n * \"secondary\", \"fiftyFifty\" and \"campaign\" `Hero` types; Note: `imageProps.src`\n * can only be used in conjunction with `backgroundImageSrc` for the \"campaign\"\n * `Hero` type. Note: not all `Hero` variations utilize this prop. */\n imageProps?: HeroImageProps;\n /** Optional details area that contains location data.\n * Note: not all `Hero` variations utilize this prop. */\n locationDetails?: JSX.Element;\n /** Optional string used for the subheader that displays\n * underneath the heading element. */\n subHeaderText?: string | JSX.Element;\n}\n\nexport const Hero = chakra(\n (props: React.PropsWithChildren<HeroProps>) => {\n const {\n backgroundColor,\n backgroundImageSrc,\n foregroundColor,\n heading,\n heroType,\n imageProps = {\n alt: \"\",\n src: \"\",\n },\n locationDetails,\n subHeaderText,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"Hero\", { variant: heroType });\n const headingStyles = styles.heading;\n // We want to add `Hero`-specific styling to the `Heading` component.\n const finalHeading =\n heading && React.cloneElement(heading, { __css: headingStyles });\n let backgroundImageStyle = {};\n let contentBoxStyling = {};\n\n if (imageProps.src && !imageProps.alt) {\n console.warn(\n `NYPL Reservoir Hero: The \"imageProps.src\" prop was passed but the \"imageProps.alt\" props was not. This will make the rendered image inaccessible.`\n );\n }\n\n if (heroType === \"primary\") {\n if (!backgroundImageSrc) {\n console.warn(\n \"NYPL Reservoir Hero: It is recommended to use the `backgroundImageSrc` \" +\n \"prop for the `'primary'` `heroType` variant.\"\n );\n }\n if (imageProps.alt && imageProps.src) {\n console.warn(\n \"NYPL Reservoir Hero: The `imageProps.src` and `imageProps.alt` props have been \" +\n \"passed, but the `'primary'` `heroType` variant will not use it.\"\n );\n }\n } else if (locationDetails) {\n console.warn(\n \"NYPL Reservoir Hero: The `locationDetails` prop should only be used \" +\n \"with the `'primary'` `heroType` variant.\"\n );\n }\n if (heroSecondaryTypes.includes(heroType) && backgroundImageSrc) {\n console.warn(\n \"NYPL Reservoir Hero: The `backgroundImageSrc` prop has been passed, \" +\n \"but the `'secondary'` `heroType` variant will not use it.\"\n );\n }\n if (heroType === \"tertiary\" && (backgroundImageSrc || imageProps.src)) {\n console.warn(\n \"NYPL Reservoir Hero: The `'tertiary'` `heroType` variant hero \" +\n \"will not use any of the image props.\"\n );\n }\n if (heroType === \"campaign\" && (!backgroundImageSrc || !imageProps.src)) {\n console.warn(\n \"NYPL Reservoir Hero: It is recommended to use both the \" +\n \"`backgroundImageSrc` and `imageProps.src` props for the \" +\n \"`'campaign'` `heroType` variant.\"\n );\n }\n if (heroType === \"fiftyFifty\" && backgroundImageSrc) {\n console.warn(\n \"NYPL Reservoir Hero: The `backgroundImageSrc` prop has been passed, \" +\n \"but the `'fiftyFifty'` `heroType` variant hero will not use it.\"\n );\n }\n\n if (heroType === \"primary\") {\n backgroundImageStyle = backgroundImageSrc\n ? { backgroundImage: `url(${backgroundImageSrc})` }\n : {};\n } else if (heroType === \"campaign\") {\n backgroundImageStyle = backgroundImageSrc\n ? { backgroundImage: `url(${backgroundImageSrc})` }\n : { backgroundColor };\n } else if (heroType === \"tertiary\" || heroType === \"fiftyFifty\") {\n backgroundImageStyle = { backgroundColor };\n }\n\n if (!heroSecondaryTypes.includes(heroType)) {\n contentBoxStyling = {\n color: foregroundColor,\n backgroundColor,\n };\n } else if (foregroundColor || backgroundColor) {\n console.warn(\n \"NYPL Reservoir Hero: The `foregroundColor` and/or `backgroundColor` \" +\n \"props have been passed, but the `'secondary'` `heroType` \" +\n \"variant will not use them.\"\n );\n }\n\n const childrenToRender =\n heroType === \"campaign\" ? (\n <>\n <Image alt={imageProps.alt} src={imageProps.src} />\n <Box __css={styles.interior}>\n {finalHeading}\n {subHeaderText}\n </Box>\n </>\n ) : (\n <>\n {heroType !== \"primary\" && heroType !== \"tertiary\" && (\n <Image alt={imageProps.alt} src={imageProps.src} />\n )}\n {finalHeading}\n {heroType === \"tertiary\" && subHeaderText ? (\n <p>{subHeaderText}</p>\n ) : (\n <Box __css={styles.bodyText}>{subHeaderText}</Box>\n )}\n </>\n );\n\n return (\n <Box\n data-testid=\"hero\"\n data-responsive-background-image\n style={backgroundImageStyle}\n __css={styles}\n {...rest}\n >\n <Box\n data-testid=\"hero-content\"\n style={contentBoxStyling}\n __css={styles.content}\n >\n {childrenToRender}\n </Box>\n </Box>\n );\n },\n { shouldForwardProp: () => true }\n);\n\nexport default Hero;\n","// HorizontalRule\nimport { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport interface HorizontalRuleProps {\n /** Optional alignment value to align the horizontal rule to one side or the\n * other when the width is less than 100%. If omitted, the horizontal rule\n * will have a default center alignment. */\n align?: \"left\" | \"right\";\n /** ClassName you can add in addition to `horizontal-rule` */\n className?: string;\n}\n\nexport const HorizontalRule = chakra((props: HorizontalRuleProps) => {\n const { align, className, ...rest } = props;\n const styles = useStyleConfig(\"HorizontalRule\", { align });\n\n const finalStyles = {\n ...styles,\n height: \"2px\",\n width: \"100%\",\n };\n\n return <Box as=\"hr\" className={className} __css={finalStyles} {...rest} />;\n});\n\nexport default HorizontalRule;\n","import { As, Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Heading from \"../Heading/Heading\";\n\nexport type ListTypes = \"ol\" | \"ul\" | \"dl\";\ninterface DescriptionProps {\n term: string;\n description: string | JSX.Element;\n}\nexport interface ListProps {\n /** ClassName you can add in addition to 'list' */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Display the list in a row. */\n inline?: boolean;\n /** Data to render if children are not passed. For `listTypes` orderd `\"ol\"`\n * and unordered `\"ul\"` `List` types, the data structure is an array of strings\n * to renders as `li` items. For descroption `\"dl\"` `List` types, the data\n * structure is an array of objects with `term` and `description` properties\n * to render `dt` and `dd` elements, respectively.\n */\n listItems?: (string | JSX.Element | DescriptionProps)[];\n /** Remove list styling. */\n noStyling?: boolean;\n /** An optional title that will appear over the list. This prop only applies\n * to Description Lists. */\n title?: string;\n /** The type of list: \"ol\", \"ul\", or \"dl\". \"ul\" by default. */\n type: ListTypes;\n}\n\n/**\n * A component that renders list item `li` elements or description item `dt`\n * and `dd` elements based on the `type` prop. Note that the `title` prop will\n * only display for the `Description` list type.\n */\nexport const List = chakra((props: React.PropsWithChildren<ListProps>) => {\n const {\n children,\n className,\n id,\n inline = false,\n listItems,\n noStyling = false,\n title,\n type = \"ul\",\n ...rest\n } = props;\n const styles = useStyleConfig(\"List\", { inline, noStyling, variant: type });\n let listElement = null;\n\n // Either li/dt/dd children elements must be passed or the `listItems`\n // prop must be used.\n if (children && listItems && listItems?.length > 0) {\n console.warn(\n \"NYPL Reservoir List: Pass in either `<li>`, `<dt>`, or `<dd>` \" +\n \"children or use the `listItems` data prop. Do not use both.\"\n );\n return null;\n }\n if (!children && !listItems) {\n console.warn(\n \"NYPL Reservoir List: Pass in either `<li>` children or pass data in \" +\n \"the `listItems` prop, not both.\"\n );\n return null;\n }\n\n /**\n * This returns either the `children` elements passed to the `List` component\n * first, otherwise it will check and render the data passed into the\n * `listItems` props based on the `ListType` type. If it is of type unordered\n * or ordered, it will return `li` elements. Otherwise, it will return a\n * combination of `dt` and `dd` elements for the description type.\n */\n const listChildrenElms = (listType: ListTypes) => {\n if (children) {\n return children;\n }\n if (!listItems) {\n return null;\n }\n if (listType === \"ol\" || listType === \"ul\") {\n return listItems.map((item, i) => <li key={i}>{item}</li>);\n } else if (listType === \"dl\") {\n return (listItems as DescriptionProps[]).map((item, i) => [\n <dt key={`${i}-term`}>{item.term}</dt>,\n <dd key={`${i}-des`}>{item.description}</dd>,\n ]);\n }\n return null;\n };\n /**\n * Checks for `li` elements and consoles a warning if the\n * children are different HTML elements.\n */\n const checkListChildrenError = (listType: ListTypes) => {\n React.Children.map(children as JSX.Element, (child: React.ReactElement) => {\n if (child && child?.type !== \"li\" && child?.props?.mdxType !== \"li\") {\n console.warn(\n `NYPL Reservoir List: Direct children of \\`List\\` (${listType}) must be \\`<li>\\`s.`\n );\n }\n });\n };\n /**\n * Checks for `dt` and `dd` elements and consoles a warning if the\n * children are different HTML elements.\n */\n const checkDescriptionChildrenError = () => {\n React.Children.map(children as JSX.Element, (child: React.ReactElement) => {\n if (\n child.type !== \"dt\" &&\n child.type !== \"dd\" &&\n child.type !== React.Fragment &&\n child.props.mdxType !== \"dt\" &&\n child.props.mdxType !== \"dd\" &&\n child.props.mdxType !== React.Fragment\n ) {\n console.warn(\n \"NYPL Reservoir List: Direct children of `List` (description) must \" +\n \"be `<dt>`s and `<dd>`s.\"\n );\n }\n });\n };\n\n if (type === \"ol\" || type === \"ul\") {\n checkListChildrenError(type);\n listElement = (\n <Box\n as={type as As}\n id={id}\n className={className}\n __css={styles}\n {...rest}\n >\n {listChildrenElms(type)}\n </Box>\n );\n } else if (type === \"dl\") {\n checkDescriptionChildrenError();\n listElement = (\n <Box as=\"section\" id={id} className={className} __css={styles} {...rest}>\n {title && <Heading id={`${id}-heading`}>{title}</Heading>}\n <dl>{listChildrenElms(type)}</dl>\n </Box>\n );\n }\n\n return listElement;\n});\n\nexport default List;\n","/* eslint-disable camelcase */\nimport appleAppStoreBlack from \"../../../icons/svg/logo-apple-app-store-black.svg\";\nimport appleAppStoreWhite from \"../../../icons/svg/logo-apple-app-store-white.svg\";\nimport bplBlack from \"../../../icons/svg/logo-bpl-black.svg\";\nimport bplWhite from \"../../../icons/svg/logo-bpl-white.svg\";\nimport cleverBadgeColor from \"../../../icons/svg/logo-clever-badge-color.svg\";\nimport cleverColor from \"../../../icons/svg/logo-clever-color.svg\";\nimport cleverWhite from \"../../../icons/svg/logo-clever-white.svg\";\nimport firstbookColor from \"../../../icons/svg/logo-firstbook-color.svg\";\nimport firstbookColorNegative from \"../../../icons/svg/logo-firstbook-color-negative.svg\";\nimport googlePlayBlack from \"../../../icons/svg/logo-google-play-black.svg\";\nimport lpaColor from \"../../../icons/svg/logo-lpa-color.svg\";\nimport lpaBlack from \"../../../icons/svg/logo-lpa-black.svg\";\nimport lpaWhite from \"../../../icons/svg/logo-lpa-white.svg\";\nimport mlnBlack from \"../../../icons/svg/logo-mln-black.svg\";\nimport mlnWhite from \"../../../icons/svg/logo-mln-white.svg\";\nimport nyplFullBlack from \"../../../icons/svg/logo-nypl-full-black.svg\";\nimport nyplFullWhite from \"../../../icons/svg/logo-nypl-full-white.svg\";\nimport nyplLionBlack from \"../../../icons/svg/logo-nypl-lion-black.svg\";\nimport nyplLionWhite from \"../../../icons/svg/logo-nypl-lion-white.svg\";\nimport openebooksColor from \"../../../icons/svg/logo-openebooks-color.svg\";\nimport openebooksNegative from \"../../../icons/svg/logo-openebooks-negative.svg\";\nimport openebooksWithTextColor from \"../../../icons/svg/logo-openebooks-with-text-color.svg\";\nimport openebooksWithTextNegative from \"../../../icons/svg/logo-openebooks-with-text-negative.svg\";\nimport qplAltBlack from \"../../../icons/svg/logo-qpl-alt-black.svg\";\nimport qplAltWhite from \"../../../icons/svg/logo-qpl-alt-white.svg\";\nimport qplBlack from \"../../../icons/svg/logo-qpl-black.svg\";\nimport qplColor from \"../../../icons/svg/logo-qpl-color.svg\";\nimport qplWhite from \"../../../icons/svg/logo-qpl-white.svg\";\nimport reservoirIconColor from \"../../../icons/svg/logo-reservoir-icon-color.svg\";\nimport reservoirVerticalColor from \"../../../icons/svg/logo-reservoir-vertical-color.svg\";\nimport schomburgBlack from \"../../../icons/svg/logo-schomburg-black.svg\";\nimport schomburgCircleBlack from \"../../../icons/svg/logo-schomburg-circle-black.svg\";\nimport schomburgCircleColor from \"../../../icons/svg/logo-schomburg-circle-color.svg\";\nimport schomburgCircleWhite from \"../../../icons/svg/logo-schomburg-circle-white.svg\";\nimport schomburgColor from \"../../../icons/svg/logo-schomburg-color.svg\";\nimport schomburgWhite from \"../../../icons/svg/logo-schomburg-white.svg\";\nimport simplyeBlack from \"../../../icons/svg/logo-simplye-black.svg\";\nimport simplyeWhite from \"../../../icons/svg/logo-simplye-white.svg\";\nimport simplyeColor from \"../../../icons/svg/logo-simplye-color.svg\";\nimport snflBlack from \"../../../icons/svg/logo-snfl-black.svg\";\nimport snflWhite from \"../../../icons/svg/logo-snfl-white.svg\";\nimport treasuresColor from \"../../../icons/svg/logo-treasures-color.svg\";\nimport treasuresColorNegative from \"../../../icons/svg/logo-treasures-color-negative.svg\";\n\nexport default {\n appleAppStoreBlack,\n appleAppStoreWhite,\n bplBlack,\n bplWhite,\n cleverBadgeColor,\n cleverColor,\n cleverWhite,\n firstbookColor,\n firstbookColorNegative,\n googlePlayBlack,\n lpaBlack,\n lpaColor,\n lpaWhite,\n mlnBlack,\n mlnWhite,\n nyplFullBlack,\n nyplFullWhite,\n nyplLionBlack,\n nyplLionWhite,\n openebooksColor,\n openebooksNegative,\n openebooksWithTextColor,\n openebooksWithTextNegative,\n qplAltBlack,\n qplAltWhite,\n qplBlack,\n qplColor,\n qplWhite,\n reservoirIconColor,\n reservoirVerticalColor,\n schomburgBlack,\n schomburgCircleBlack,\n schomburgCircleColor,\n schomburgCircleWhite,\n schomburgColor,\n schomburgWhite,\n simplyeBlack,\n simplyeWhite,\n simplyeColor,\n snflBlack,\n snflWhite,\n treasuresColor,\n treasuresColorNegative,\n};\n","import {\n Box,\n chakra,\n Icon as ChakraIcon,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport logoSvgs from \"./LogoSvgs\";\n\nexport type LogoNames =\n | \"appleAppStoreBlack\"\n | \"appleAppStoreWhite\"\n | \"bplBlack\"\n | \"bplWhite\"\n | \"cleverBadgeColor\"\n | \"cleverColor\"\n | \"cleverWhite\"\n | \"firstbookColor\"\n | \"firstbookColorNegative\"\n | \"googlePlayBlack\"\n | \"lpaBlack\"\n | \"lpaColor\"\n | \"lpaWhite\"\n | \"mlnBlack\"\n | \"mlnWhite\"\n | \"nyplFullBlack\"\n | \"nyplFullWhite\"\n | \"nyplLionBlack\"\n | \"nyplLionWhite\"\n | \"openebooksColor\"\n | \"openebooksNegative\"\n | \"openebooksWithTextColor\"\n | \"openebooksWithTextNegative\"\n | \"qplAltBlack\"\n | \"qplAltWhite\"\n | \"qplBlack\"\n | \"qplColor\"\n | \"qplWhite\"\n | \"reservoirIconColor\"\n | \"reservoirVerticalColor\"\n | \"schomburgBlack\"\n | \"schomburgCircleBlack\"\n | \"schomburgCircleColor\"\n | \"schomburgCircleWhite\"\n | \"schomburgColor\"\n | \"schomburgWhite\"\n | \"simplyeBlack\"\n | \"simplyeWhite\"\n | \"simplyeColor\"\n | \"snflBlack\"\n | \"snflWhite\"\n | \"treasuresColor\"\n | \"treasuresColorNegative\";\nexport type LogoSizes =\n | \"default\"\n | \"xxsmall\"\n | \"xsmall\"\n | \"small\"\n | \"medium\"\n | \"large\";\nexport interface LogoProps {\n /** Optional className that will be added to the parent element */\n className?: string;\n /** Logos designated as decorative will be ignored by screenreaders. False\n * by default. */\n decorative?: boolean;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** The name of the logo you want to use. */\n name?: LogoNames;\n /** Sets the logo size. */\n size?: LogoSizes;\n /** For accessibility purposes, the text passed in the `title` prop gets\n * rendered in a `title` element in the SVG. This descriptive text is not\n * visible but is needed for screenreaders to describe the graphic. */\n title?: string;\n}\n\n/**\n * The `Logo` component renders SVG-based logos and color variants that are\n * commonly used by the New York Public Library.\n */\nexport const Logo = chakra((props: React.PropsWithChildren<LogoProps>) => {\n const {\n children,\n className,\n decorative = false,\n id,\n name,\n size = \"medium\",\n title = `${name} logo`,\n ...rest\n } = props;\n const styles = useStyleConfig(\"Logo\", {\n size,\n });\n const logoProps = {\n \"aria-hidden\": decorative,\n className,\n id,\n role: \"img\",\n title,\n ...rest,\n };\n let childSVG = null;\n\n // Component prop validation\n if (name && children) {\n console.warn(\n \"NYPL Reservoir Logo: Pass either a `name` prop or an `svg` element \" +\n \"child. Do not pass both.\"\n );\n return null;\n } else if (!name && !children) {\n console.warn(\n \"NYPL Reservoir Logo: Pass a logo `name` prop or an SVG child to \" +\n \"`Logo` to ensure a logo appears.\"\n );\n return null;\n }\n\n // The user wants to render an existing logo. Load the logo and render it\n // as a component through Chakra's Icon component. Otherwise, we're going to\n // render the SVG child with NYPL-theme styling.\n if (name) {\n const SvgComponent: any = logoSvgs[name];\n return <ChakraIcon as={SvgComponent} {...logoProps} __css={styles} />;\n }\n\n // If no `name` prop was passed, we expect a child SVG element to be passed.\n // Apply logo props to the SVG child.\n if (\n (children as JSX.Element).type === \"svg\" ||\n (children as JSX.Element).props?.type === \"svg\" ||\n (children as JSX.Element).props?.mdxType === \"svg\"\n ) {\n childSVG = React.cloneElement(children as JSX.Element, {\n ...logoProps,\n });\n } else {\n console.warn(\n \"NYPL Reservoir Logo: An `svg` element must be passed to the `Logo` \" +\n \"component as its child.\"\n );\n }\n\n return <Box __css={styles}>{childSVG}</Box>;\n});\n\nexport default Logo;\n","import {\n chakra,\n Modal as ChakraModal,\n ModalOverlay,\n ModalContent,\n ModalHeader,\n ModalFooter,\n ModalBody,\n ModalCloseButton,\n useDisclosure,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Button from \"../Button/Button\";\nimport ButtonGroup from \"../ButtonGroup/ButtonGroup\";\nimport useWindowSize from \"../../hooks/useWindowSize\";\n\ninterface BaseModalProps {\n bodyContent?: string | JSX.Element;\n closeButtonLabel?: string;\n headingText?: string | JSX.Element;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n isOpen?: boolean;\n onClose?: () => void;\n}\n\nexport interface ModalProps {\n buttonText?: string;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n modalProps: BaseModalProps;\n}\n\nconst BaseModal = chakra(\n ({\n bodyContent,\n closeButtonLabel = \"Close\",\n headingText,\n id,\n isOpen,\n onClose,\n ...rest\n }: React.PropsWithChildren<BaseModalProps>) => {\n // Based on --nypl-breakpoint-medium\n const breakpointMedium = 600;\n const defaultSize = \"xl\";\n const fullSize = \"full\";\n const [size, setSize] = React.useState<string>(defaultSize);\n const windowDimensions = useWindowSize();\n React.useEffect(() => {\n if (windowDimensions.width <= breakpointMedium) {\n setSize(fullSize);\n } else {\n setSize(defaultSize);\n }\n }, [windowDimensions.width]);\n\n return (\n <ChakraModal\n id={id}\n isOpen={isOpen}\n onClose={onClose}\n scrollBehavior=\"inside\"\n size={size}\n {...rest}\n >\n <ModalOverlay />\n <ModalContent>\n <ModalHeader>{headingText}</ModalHeader>\n <ModalCloseButton />\n <ModalBody>{bodyContent}</ModalBody>\n\n <ModalFooter>\n <ButtonGroup>\n <Button id=\"modal-close-btn\" onClick={onClose}>\n {closeButtonLabel}\n </Button>\n </ButtonGroup>\n </ModalFooter>\n </ModalContent>\n </ChakraModal>\n );\n }\n);\n\n/**\n * The `ModalTrigger` component renders a button that you click to open the\n * internal `Modal` component. Note that props to update the internal `Modal`\n * component are passed through to the `modalProps` prop.\n */\nexport const ModalTrigger = chakra(\n ({\n buttonText,\n id,\n modalProps,\n ...rest\n }: React.PropsWithChildren<ModalProps>) => {\n const { isOpen, onOpen, onClose } = useDisclosure();\n const finalOnCloseHandler = () => {\n modalProps.onClose && modalProps.onClose();\n onClose();\n };\n return (\n <>\n <Button id=\"modal-open-btn\" onClick={onOpen}>\n {buttonText}\n </Button>\n\n <BaseModal\n bodyContent={modalProps.bodyContent}\n closeButtonLabel={modalProps.closeButtonLabel}\n headingText={modalProps.headingText}\n id={id}\n isOpen={isOpen}\n onClose={finalOnCloseHandler}\n {...rest}\n />\n </>\n );\n }\n);\n\n/**\n * This hook function can be used to render the `Modal` component with a custom\n * open button(s) and optional custom close button(s). You must render your own\n * button and pass the appropriate `onOpen` and ` handler for the modal to open.\n */\nexport function useModal() {\n const { isOpen, onClose, onOpen } = useDisclosure();\n const Modal = chakra(\n ({\n bodyContent,\n closeButtonLabel,\n headingText,\n id,\n ...rest\n }: React.PropsWithChildren<BaseModalProps>) => {\n return (\n <BaseModal\n bodyContent={bodyContent}\n closeButtonLabel={closeButtonLabel}\n headingText={headingText}\n id={id}\n isOpen={isOpen}\n onClose={onClose}\n {...rest}\n />\n );\n }\n );\n\n return { onClose, onOpen, Modal };\n}\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport React, { useState } from \"react\";\n\nimport Button from \"../Button/Button\";\nimport Heading from \"../Heading/Heading\";\nimport Icon, { IconColors, IconNames, IconSizes } from \"../Icons/Icon\";\n\nexport type NotificationTypes = \"standard\" | \"announcement\" | \"warning\";\ninterface BaseProps {\n /** Optional prop to control text alignment in `NotificationContent` */\n alignText?: boolean;\n /** Optional custom `Icon` that will override the default `Icon`. */\n icon?: JSX.Element;\n /** ID that other components can cross reference for accessibility purposes. */\n id?: string;\n /** Optional prop to control horizontal alignment of the `Notification` content */\n isCentered?: boolean;\n /** Optional prop to control the coloring of the `Notification` text and the\n * visibility of an applicable icon. */\n notificationType?: NotificationTypes;\n}\n\n// Used for `NotificationHeading` and `Notification`\ntype BasePropsWithoutAlignText = Omit<BaseProps, \"alignText\">;\n// Used for `NotificationContent`\ntype BasePropsWithoutIsCentered = Omit<BaseProps, \"isCentered\">;\n\nexport interface NotificationProps extends BasePropsWithoutAlignText {\n /** Label used to describe the `Notification`'s aside HTML element. */\n ariaLabel?: string;\n /** Additional `className` to add. */\n className?: string;\n /** Optional prop to control whether a `Notification` can be dismissed\n * (closed) by a user. */\n dismissible?: boolean;\n /** Optional custom `Icon` that will override the default `Icon`. */\n icon?: JSX.Element;\n /** Optional prop to control the margin around the `Notification` component. */\n noMargin?: boolean;\n /** Content to be rendered in a `NotificationContent` component. */\n notificationContent: string | JSX.Element;\n /** Content to be rendered in a `NotificationHeading` component. */\n notificationHeading?: string;\n /** Prop to display the `Notification` icon. Defaults to `true`. */\n showIcon?: boolean;\n}\n\n/**\n * NotificationHeading child-component.\n */\nexport const NotificationHeading = chakra(\n (props: React.PropsWithChildren<BasePropsWithoutAlignText>) => {\n const { children, icon, id, isCentered, notificationType, ...rest } = props;\n const styles = useMultiStyleConfig(\"NotificationHeading\", {\n icon,\n isCentered,\n notificationType,\n });\n return (\n <Box as=\"header\" __css={styles} {...rest}>\n {icon}\n <Heading id={`${id}-heading`} level=\"four\" __css={styles.heading}>\n {children}\n </Heading>\n </Box>\n );\n }\n);\n\n/**\n * NotificationContent child-component.\n */\nexport const NotificationContent = chakra(\n (props: React.PropsWithChildren<BasePropsWithoutIsCentered>) => {\n const { alignText, children, icon, notificationType, ...rest } = props;\n const styles = useMultiStyleConfig(\"NotificationContent\", {\n alignText,\n icon,\n notificationType,\n });\n return (\n <Box __css={styles} {...rest}>\n {icon}\n <Box __css={styles.content}>{children}</Box>\n </Box>\n );\n }\n);\n\n/**\n * Component used to present users with three different levels of notifications:\n * standard, announcement, and warning.\n */\nexport const Notification = chakra((props: NotificationProps) => {\n const {\n ariaLabel,\n className,\n dismissible = false,\n icon,\n id,\n isCentered = false,\n noMargin = false,\n notificationContent,\n notificationHeading,\n notificationType = \"standard\",\n showIcon = true,\n ...rest\n } = props;\n const [isOpen, setIsOpen] = useState(true);\n const handleClose = () => setIsOpen(false);\n const styles = useMultiStyleConfig(\"Notification\", {\n dismissible,\n isCentered,\n noMargin,\n notificationType,\n });\n const iconElement = () => {\n const baseIconProps = {\n size: \"large\" as IconSizes,\n __css: styles.icon,\n };\n // If the icon should not display, return undefined.\n if (!showIcon) {\n return undefined;\n }\n // If a custom icon is passed, add specific `Notification` styles.\n if (icon)\n return React.cloneElement(icon, {\n id: `${id}-custom-notification-icon`,\n ...baseIconProps,\n });\n interface IconProps {\n color: IconColors;\n name: IconNames;\n title: string;\n }\n const iconProps = {\n announcement: {\n color: \"section.research.secondary\",\n name: \"speakerNotes\",\n title: \"Notification announcement icon\",\n } as IconProps,\n standard: {\n color: \"ui.black\",\n name: \"alertNotificationImportant\",\n title: \"Notification standard icon\",\n } as IconProps,\n warning: {\n color: \"brand.primary\",\n name: \"errorFilled\",\n title: \"Notification warning icon\",\n } as IconProps,\n };\n return (\n <Icon\n id={`${id}-notification-icon`}\n {...iconProps[notificationType]}\n {...baseIconProps}\n />\n );\n };\n const dismissibleButton = dismissible && (\n <Button\n aria-label=\"Close the notification\"\n buttonType=\"link\"\n id={`${id}-notification-dismissible-button`}\n onClick={handleClose}\n __css={styles.dismissibleButton}\n >\n <Icon\n id={`${id}-dismissible-notification-icon`}\n name=\"close\"\n size=\"large\"\n title=\"Notification close icon\"\n />\n </Button>\n );\n const iconElem = iconElement();\n const childHeading = notificationHeading && (\n <NotificationHeading\n icon={iconElem}\n id={id}\n isCentered={isCentered}\n notificationType={notificationType}\n >\n {notificationHeading}\n </NotificationHeading>\n );\n // Specific alignment styles for the content.\n const alignText = !!(childHeading && showIcon && (!!icon || !isCentered));\n const childContent = (\n <NotificationContent\n alignText={alignText}\n icon={!childHeading ? iconElem : undefined}\n notificationType={notificationType}\n >\n {notificationContent}\n </NotificationContent>\n );\n\n // If the `Notification` is closed, don't render anything.\n if (!isOpen) {\n return null;\n }\n return (\n <Box\n aria-label={ariaLabel}\n as=\"aside\"\n className={className}\n data-type={notificationType}\n id={id}\n __css={styles}\n {...rest}\n >\n <Box __css={styles.container}>\n {childHeading}\n {childContent}\n </Box>\n {dismissibleButton}\n </Box>\n );\n});\n\nexport default Notification;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport React, { useState, useRef } from \"react\";\n\nimport Link from \"../Link/Link\";\nimport List from \"../List/List\";\nimport { range } from \"../../utils/utils\";\n\nexport interface PaginationProps {\n /** Additional className. */\n className?: string;\n /** The currentPage can be used to programatically force the selected page to change\n * without the user explicitly requesting it – for example, if the user should be\n * brought back to the first page of a set of results after a new search. */\n currentPage?: number;\n /** The callback function that takes a page number and returns a string\n * to use for a link's `href` attribute. This is used when the current\n * page should refresh when navigating. */\n getPageHref?: undefined | ((pageNumber: number) => string);\n /** ID that other components can cross reference for accessibility purposes. */\n id?: string;\n /** The initially selected page (default value is 1). */\n initialPage?: number;\n /** The callback function called when an item is selected and the current\n * page should not refresh. */\n onPageChange?: (selected: number) => void;\n /** The total number of pages. */\n pageCount: number;\n}\n\n/**\n * A component that provides a navigational list of page items.\n */\nexport const Pagination = chakra((props: PaginationProps) => {\n const {\n className,\n currentPage,\n getPageHref,\n id,\n initialPage = 1,\n onPageChange,\n pageCount,\n ...rest\n } = props;\n const refCurrentPage = useRef(currentPage);\n const [selectedPage, setSelectedPage] = useState<number>(initialPage);\n const styles = useMultiStyleConfig(\"Pagination\", {});\n const previousPageNumber = selectedPage - 1;\n const nextPageNumber = selectedPage + 1;\n\n // If the parent passes down a new currentPage, and an onPageChange\n // function exists, then set the internal state – selectedPage –\n // to the new currentPage and update the refCurrentPage with that value.\n React.useEffect(() => {\n if (onPageChange && currentPage && currentPage !== refCurrentPage.current) {\n setSelectedPage(currentPage);\n refCurrentPage.current = currentPage;\n }\n }, [currentPage, onPageChange]);\n\n // If there are 0 or 1 page, the pagination should not show.\n if (pageCount <= 1) {\n return null;\n }\n if (getPageHref && onPageChange) {\n console.warn(\n \"NYPL Reservoir Pagination: Props for both `getPageHref` and \" +\n \"`onPageChange` are passed. The component will default to using \" +\n \"`getPageHref`.\"\n );\n }\n\n if (getPageHref && currentPage) {\n console.warn(\n \"NYPL Reservoir Pagination: The `currentPage` prop does not work with \" +\n \"the `getPageHref` prop. Use `currentPage` with `onPageChange` instead.\"\n );\n }\n\n // If `getPageHref` was passed, then links should go to a new page.\n const changeUrls =\n typeof getPageHref !== \"undefined\" && typeof getPageHref === \"function\";\n /**\n * This function is only called when clicking on a link should\n * not update the URL or refresh the page.\n */\n const handlePageClick = (e: Event, clickedPage: number) => {\n e.preventDefault && e.preventDefault();\n if (selectedPage === clickedPage) return;\n setSelectedPage(clickedPage);\n onPageChange && onPageChange(clickedPage);\n };\n // Select the previous page.\n const previousPage = (e: Event) => {\n if (selectedPage > 1) {\n handlePageClick(e, previousPageNumber);\n }\n };\n // Select the next page.\n const nextPage = (e: Event) => {\n if (selectedPage < pageCount) {\n handlePageClick(e, nextPageNumber);\n }\n };\n /**\n * All `Link` components have similar attributes but we need to differentiate\n * between the \"previous\", \"next\", and regular number links.\n * 1. If `getPageHref` is passed, this means that the page refreshes and the\n * URL changes. In this case, the parent component returns the `href` URL\n * and the `onClick` callback is undefined.\n * 2. Otherwise, we stay on the same page by setting the `href` attribute to\n * \"#\" and call the `onPageChange` prop through the `onClick` callback.\n */\n const getLinkElement = (\n type: \"items\" | \"previous\" | \"next\",\n item?: number\n ) => {\n const isSelectedPage = selectedPage === item;\n // The current page link has different styles.\n const currentStyles = isSelectedPage\n ? {\n color: \"ui.black\",\n pointerEvent: \"none\",\n }\n : {};\n const allAttrs = {\n items: {\n href: changeUrls ? getPageHref(item as number) : \"#\",\n attributes: {\n \"aria-label\": `Page ${item}`,\n \"aria-current\": isSelectedPage ? \"page\" : null,\n onClick: changeUrls\n ? undefined\n : (e: Event) => handlePageClick(e, item as number),\n },\n text: item,\n },\n previous: {\n href: changeUrls ? getPageHref(previousPageNumber) : \"#\",\n attributes: {\n \"aria-label\": \"Previous page\",\n onClick: changeUrls ? undefined : previousPage,\n },\n text: \"Previous\",\n },\n next: {\n href: changeUrls ? getPageHref(nextPageNumber) : \"#\",\n attributes: {\n \"aria-label\": \"Next page\",\n onClick: changeUrls ? undefined : nextPage,\n },\n text: \"Next\",\n },\n };\n const linkAttrs = allAttrs[type];\n return (\n <Link\n href={linkAttrs.href}\n id={`${id}-${linkAttrs.text}`}\n {...linkAttrs.attributes}\n __css={{\n ...styles.link,\n ...currentStyles,\n }}\n >\n {linkAttrs.text}\n </Link>\n );\n };\n\n /**\n * This function returns an array of `li` elements with numbers based on the\n * total pages that `Pagination` should display. When there are many pages to\n * display, ellipsis are shown to signify that the intermediate page numbers\n * are hidden.\n * For a small number of pages, the array will be simple.\n * For a large number of pages, the resulting array will be in the shape of:\n * [\n * 1, this always displays\n * 2 or an ellipsis,\n * a range of numbers in the middle of the total count,\n * pageCount - 1 or an ellipsis,\n * pageCount, the total number of pages\n * ]\n */\n const getPaginationNumbers = (selected: number) => {\n // Where should the middle range of numbers start at?\n const middleRangeStart = Math.max(\n // Start at three if the current page is near the beginning.\n 3,\n Math.min(\n // If the current page is in the middle, start the range\n // one number before the current page.\n selected - 1,\n // If the current page is near the end, show the last five items.\n pageCount - 4\n )\n );\n // Where should the middle range of numbers end at?\n const middleRangeEnd = Math.min(\n // If the current page is near the end, end the range\n // two place before the last page number.\n pageCount - 2,\n Math.max(\n // If the current page is in the middle, end the range\n // one number after the current page.\n selected + 1,\n // If the current page is near the end, show the first five items.\n 5\n )\n );\n const itemList =\n pageCount < 4\n ? // Get a short array with 2 or 3 items: [1, 2] or [1, 2, 3]\n Array.from({ length: pageCount }, (_, i) => i + 1)\n : // Otherwise, create the longer array of items.\n [\n // Always display the first page.\n 1,\n // The second item will be 2 or an ellipse.\n middleRangeStart > 3 ? \"ellipse-start\" : 2,\n // The middle range of page numbers to display.\n // Add +1 to the end since range() doesn't include the last number.\n ...range(middleRangeStart, middleRangeEnd + 1),\n // The next to last item will be the next to last\n // number or an ellipse.\n middleRangeEnd < pageCount - 2 ? \"ellipse-end\" : pageCount - 1,\n // Always display the last page.\n pageCount,\n ];\n // If it's a number, render an `li` element with a link page item,\n // otherwise return the `li` with the ellipse for a break.\n const pageLiItems = itemList.map((item) => {\n const itemElement =\n typeof item === \"number\" ? getLinkElement(\"items\", item) : \"...\";\n return <li key={item}>{itemElement}</li>;\n });\n\n return pageLiItems;\n };\n\n // Don't display the previous link when you're on the first page.\n const previousLiLink = selectedPage !== 1 && (\n <li key=\"previous\">{getLinkElement(\"previous\")}</li>\n );\n // Don't display the next link when you're on the last page.\n const nextLiLink = selectedPage !== pageCount && (\n <li key=\"next\">{getLinkElement(\"next\")}</li>\n );\n\n return (\n <Box\n as=\"nav\"\n id={id}\n aria-label=\"Pagination\"\n role=\"navigation\"\n className={className}\n __css={styles}\n {...rest}\n >\n <List type=\"ul\" inline noStyling id={`${id}-list`}>\n {previousLiLink}\n {getPaginationNumbers(selectedPage)}\n {nextLiLink}\n </List>\n </Box>\n );\n});\n\nexport default Pagination;\n","import {\n Box,\n chakra,\n CircularProgress as ChakraCircularProgress,\n CircularProgressLabel as ChakraCircularProgressLabel,\n Progress as ChakraProgress,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport React from \"react\";\n\nimport Label from \"../Label/Label\";\n\nexport type ProgressIndicatorSizes = \"default\" | \"small\";\nexport type ProgressIndicatorTypes = \"circular\" | \"linear\";\nexport interface ProgressIndicatorProps {\n /** Flag to render the component in a dark background. */\n darkMode?: boolean;\n /** ID that other components can cross reference for accessibility purposes. */\n id: string;\n /** Whether the `ProgressIndicator` should be linear or circular. */\n indicatorType?: ProgressIndicatorTypes;\n /** Whether the progress animation should display because the `value` prop is\n * not known. When this is set to `true`, the `value` prop will be ignored. */\n isIndeterminate?: boolean;\n /** The text to display in an HTML `label` element. */\n labelText: string;\n /** Visually show or hide the label text. When set to `false`, then the label\n * text will be added to the parent component as its `aria-label` attribute. */\n showLabel?: boolean;\n /** The size of the linear or circular progress. */\n size?: ProgressIndicatorSizes;\n /** A number between 0 to 100 that defines the progress' value. */\n value?: number;\n}\n\n/**\n * A component that displays a progress status for any task that takes a long\n * time to complete or consists of multiple steps. Examples include downloading,\n * uploading, or processing.\n */\nexport const ProgressIndicator = chakra((props: ProgressIndicatorProps) => {\n const {\n darkMode = false,\n id,\n indicatorType = \"linear\",\n isIndeterminate = false,\n labelText,\n showLabel = true,\n size = \"default\",\n value = 0,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"ProgressIndicator\", {\n darkMode,\n size,\n });\n let finalValue = value;\n if (!id) {\n console.warn(\n \"NYPL Reservoir Progress Indicator: This component's required `id` prop was not passed.\"\n );\n }\n if (finalValue < 0 || finalValue > 100) {\n console.warn(\n \"NYPL Reservoir ProgressIndicator: An invalid value was passed for the\" +\n \" `value` prop, so 0 will be used. A valid value should be a number\" +\n \" between 0 and 100.\"\n );\n finalValue = 0;\n }\n const progressProps = {\n id,\n // If the label is visually shown, associate it with the progress indicator.\n // Otherwise, the `aria-label` will be added.\n \"aria-label\": showLabel ? undefined : labelText,\n \"aria-labelledby\": showLabel ? `${id}-label` : undefined,\n // If `isIndeterminate` is true, then it overrides the `value` prop.\n isIndeterminate: isIndeterminate || undefined,\n value: isIndeterminate ? undefined : finalValue,\n };\n const progressComponent = (indicatorType: ProgressIndicatorTypes) => {\n // Only display the percentage text for the default size, not in the\n // indeterminate state, and when `showLabel` is true.\n if (indicatorType === \"circular\") {\n // For the small size, since the label won't be visible, we need to add\n // it to the parent component's `aria-label` attribute.\n if (size === \"small\") {\n progressProps[\"aria-label\"] = labelText;\n }\n return (\n <Box __css={styles.circularContainer}>\n <ChakraCircularProgress {...progressProps} sx={styles.circular}>\n {showLabel && !isIndeterminate && size !== \"small\" && (\n <ChakraCircularProgressLabel>\n {finalValue}%\n </ChakraCircularProgressLabel>\n )}\n </ChakraCircularProgress>\n {showLabel && size !== \"small\" && (\n <Label id={`${id}-label`} htmlFor={id}>\n {labelText}\n </Label>\n )}\n </Box>\n );\n }\n // The Linear progress indicator is the default.\n return (\n <>\n {showLabel && (\n <Label id={`${id}-label`} htmlFor={id}>\n {labelText}\n </Label>\n )}\n <Box __css={styles.linearContainer}>\n <ChakraProgress {...progressProps} sx={styles.linear} />\n {showLabel && !isIndeterminate && (\n <Box __css={styles.linearPercentage}>{finalValue}%</Box>\n )}\n </Box>\n </>\n );\n };\n\n return (\n <Box __css={styles} {...rest}>\n {progressComponent(indicatorType)}\n </Box>\n );\n});\n\nexport default ProgressIndicator;\n","import {\n chakra,\n Radio as ChakraRadio,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport { getAriaAttrs } from \"../../utils/utils\";\n\nexport interface RadioProps {\n /** Additional class name. */\n className?: string;\n /** Optional string to populate the HelperErrorText for the standard state. */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the HelperErrorText for the error state\n * when `isInvalid` is true.\n */\n invalidText?: HelperErrorTextType;\n /** When using the Radio as a \"controlled\" form element, you can specify the\n * `Radio`'s checked state using this prop. You must also pass an onChange prop.\n * Learn more about controlled and uncontrolled form fields: https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */\n isChecked?: boolean;\n /** Adds the 'disabled' and `aria-disabled` attributes to the input when true.\n * This also makes the text italic and color scheme gray. */\n isDisabled?: boolean;\n /** Adds the 'aria-invalid' attribute to the input when true. This also makes\n * the color theme \"NYPL error\" red for the button and text. */\n isInvalid?: boolean;\n /** Adds the 'required' attribute to the input when true. */\n isRequired?: boolean;\n /** The radio button's label. This will serve as the text content for the\n * `<label>` element if `showlabel` is true, or an \"aria-label\" if `showLabel`\n * is false. */\n labelText: string | JSX.Element;\n /** Used to reference the input element in forms. */\n name?: string;\n /** Should be passed along with `isChecked` for controlled components. */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the radio's label onscreen or hide it. Refer\n * to the `labelText` property for more information. */\n showLabel?: boolean;\n /** Populates the value of the input. */\n value?: string;\n}\n\nexport const Radio = chakra(\n React.forwardRef<HTMLInputElement, RadioProps>((props, ref?) => {\n const {\n className,\n helperText,\n id,\n invalidText,\n isChecked,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n name,\n onChange,\n showHelperInvalidText = true,\n showLabel = true,\n value,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"Radio\", {});\n const footnote = isInvalid ? invalidText : helperText;\n const ariaAttributes = getAriaAttrs({\n footnote,\n id,\n labelText,\n name: \"Radio\",\n showLabel,\n });\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Radio: This component's required `id` prop was not passed.\"\n );\n }\n\n return (\n <ComponentWrapper\n helperText={helperText}\n helperTextStyles={styles.helperErrorText}\n id={id}\n invalidText={invalidText}\n isInvalid={isInvalid}\n showHelperInvalidText={showHelperInvalidText}\n {...rest}\n >\n <ChakraRadio\n className={className}\n id={id}\n isChecked={isChecked}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n name={name}\n onChange={onChange}\n ref={ref}\n value={value}\n alignItems=\"flex-start\"\n __css={styles}\n {...ariaAttributes}\n >\n {showLabel && labelText}\n </ChakraRadio>\n </ComponentWrapper>\n );\n })\n);\n\nexport default Radio;\n","import {\n chakra,\n RadioGroup as ChakraRadioGroup,\n Stack,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Fieldset from \"../Fieldset/Fieldset\";\nimport HelperErrorText, {\n HelperErrorTextType,\n} from \"../HelperErrorText/HelperErrorText\";\nimport { spacing } from \"../../theme/foundations/spacing\";\nimport Radio from \"../Radio/Radio\";\nimport { LayoutTypes } from \"../../helpers/types\";\n\nexport interface RadioGroupProps {\n /** Additional class name. */\n className?: string;\n /** Populates the initial value of the input */\n defaultValue?: string;\n /** Optional string to populate the HelperErrorText for standard state */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the HelperErrorText for error state */\n invalidText?: HelperErrorTextType;\n /** Adds the 'disabled' prop to the input when true. */\n isDisabled?: boolean;\n /** Set's the `Radio`s' wrapper to be full width. */\n isFullWidth?: boolean;\n /** Adds the 'aria-invalid' attribute to the input and\n * sets the error state when true. */\n isInvalid?: boolean;\n /** Adds the 'required' attribute to the input when true. */\n isRequired?: boolean;\n /** The radio group label displayed in a `legend` element if `showlabel` is\n * true, or an \"aria-label\" if `showLabel` is false. */\n labelText: string;\n /** Renders the Radio buttons in a row or column (default). */\n layout?: LayoutTypes;\n /** The `name` prop indicates the form group for all the Radio children. */\n name: string;\n /** The action to perform on the `<input>`'s onChange function */\n onChange?: (value: string) => void;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the group's legend onscreen or hide it. Refer\n * to the `labelText` property for more information. */\n showLabel?: boolean;\n /** Whether or not to display the \"(Required)\" text in the label text.\n * True by default. */\n showRequiredLabel?: boolean;\n}\n\nconst noop = () => {};\n\n/**\n * RadioGroup is a wrapper for DS `Radio` components that renders as a fieldset\n * HTML element along with optional helper text. The `name` prop is essential\n * for this form group element and is not needed for individual DS `Radio`\n * components when `RadioGroup` is used.\n */\nexport const RadioGroup = chakra(\n React.forwardRef<HTMLInputElement, React.PropsWithChildren<RadioGroupProps>>(\n (props, ref?) => {\n const {\n children,\n className = \"\",\n defaultValue,\n helperText,\n id,\n invalidText,\n isDisabled = false,\n isFullWidth = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n layout = \"column\",\n name,\n onChange,\n showHelperInvalidText = true,\n showLabel = true,\n showRequiredLabel = true,\n ...rest\n } = props;\n const [value, setValue] = React.useState(defaultValue);\n const footnote: HelperErrorTextType = isInvalid\n ? invalidText\n : helperText;\n const spacingProp = layout === \"column\" ? spacing.s : spacing.l;\n const newChildren: JSX.Element[] = [];\n // Get the Chakra-based styles for the custom elements in this component.\n const styles = useMultiStyleConfig(\"RadioGroup\", { isFullWidth });\n // Props for the `ChakraRadioGroup` component.\n const radioGroupProps = {\n \"aria-label\": !showLabel ? labelText : undefined,\n name,\n onChange: (selected: string) => {\n setValue(selected);\n onChange && onChange(selected);\n },\n ref,\n value,\n };\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir RadioGroup: This component's required `id` prop was not passed.\"\n );\n }\n\n // Go through the Radio children and update them as needed.\n React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement, key) => {\n if (child?.type !== Radio) {\n // Special case for Storybook MDX documentation.\n if (child.props?.mdxType && child.props?.mdxType === \"Radio\") {\n noop();\n } else {\n console.warn(\n \"NYPL Reservoir RadioGroup: Only `Radio` components are allowed \" +\n \"inside the `RadioGroup` component.\"\n );\n }\n }\n\n if (child !== undefined && child !== null) {\n const newProps = {\n key,\n isDisabled,\n isInvalid,\n isRequired,\n };\n newChildren.push(React.cloneElement(child, newProps));\n }\n }\n );\n\n return (\n <Fieldset\n className={className}\n id={`radio-group-${id}`}\n isLegendHidden={!showLabel}\n isRequired={isRequired}\n legendText={labelText}\n showRequiredLabel={showRequiredLabel}\n {...rest}\n __css={styles}\n >\n <ChakraRadioGroup {...radioGroupProps}>\n <Stack direction={[layout]} spacing={spacingProp}>\n {newChildren}\n </Stack>\n </ChakraRadioGroup>\n {footnote && showHelperInvalidText && (\n <HelperErrorText\n id={`${id}-helperErrorText`}\n isInvalid={isInvalid}\n text={footnote}\n __css={styles.helperErrorText}\n />\n )}\n </Fieldset>\n );\n }\n )\n);\n\nexport default RadioGroup;\n","import {\n Box,\n chakra,\n Select as ChakraSelect,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport React, { useEffect, useState, useRef } from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport Icon from \"../Icons/Icon\";\nimport Label from \"../Label/Label\";\nimport { getAriaAttrs } from \"../../utils/utils\";\n\nexport type SelectTypes = \"default\" | \"searchbar\";\nexport type LabelPositions = \"default\" | \"inline\";\nexport interface SelectProps {\n /** A class name for the `div` parent element. */\n className?: string;\n /** Optional string to populate the `HelperErrorText` for the standard state. */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the `HelperErrorText` for the error state\n * when `isInvalid` is true. */\n invalidText?: HelperErrorTextType;\n /** Adds the `disabled` and `aria-disabled` attributes to the select when true */\n isDisabled?: boolean;\n /** Adds the `aria-invalid` attribute to the select when true. This also makes\n * the color theme \"NYPL error\" red for the select and text. */\n isInvalid?: boolean;\n /** Adds the `required` and `aria-required` attributes to the input when true. */\n isRequired?: boolean;\n /** Optional value to render the label inline, rather than the default (on top)\n * of the select element. */\n labelPosition?: LabelPositions;\n /** Provides text for a `Label` component if `showLabel` is set to `true`;\n * populates an `aria-label` attribute on the select input if `showLabel` is\n * set to `false`. */\n labelText: string;\n /** Used to reference the select element in forms. */\n name: string;\n /** The callback function to get the selected value.\n * Should be passed along with `value` for controlled components. */\n onChange?: (event: React.FormEvent) => void;\n /** Placeholder text in the select element. */\n placeholder?: string;\n /** The variant to display. */\n selectType?: SelectTypes;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the select's label onscreen or hide it. Refer\n * to the `labelText` property for more information. */\n showLabel?: boolean;\n /** Whether or not to display the \"(Required)\" text in the label text.\n * True by default. */\n showRequiredLabel?: boolean;\n /** The value of the selected option.\n * Should be passed along with `onChange` for controlled components. */\n value?: string;\n}\n\n/**\n * Component that renders Chakra's `Select` component along with an accessible\n * `Label` and optional `HelperErrorText` component.\n */\nexport const Select = chakra(\n React.forwardRef<HTMLSelectElement, React.PropsWithChildren<SelectProps>>(\n (props: React.PropsWithChildren<SelectProps>, ref?) => {\n const {\n children,\n className,\n helperText,\n id,\n invalidText,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n labelPosition = \"default\",\n labelText,\n name,\n onChange,\n placeholder,\n selectType = \"default\",\n showHelperInvalidText = true,\n showLabel = true,\n showRequiredLabel = true,\n value = \"\",\n ...rest\n } = props;\n const [labelWidth, setLabelWidth] = useState<number>(0);\n const labelRef = useRef<HTMLDivElement>(null);\n const styles = useMultiStyleConfig(\"CustomSelect\", {\n variant: selectType,\n labelPosition,\n });\n const finalInvalidText = invalidText\n ? invalidText\n : \"There is an error related to this field.\";\n const footnote = isInvalid ? finalInvalidText : helperText;\n const ariaAttributes = getAriaAttrs({\n footnote,\n id,\n labelText,\n name: \"Select\",\n showLabel,\n });\n // To control the `Select` component, both `onChange` and `value`\n // must be passed.\n const controlledProps = onChange ? { onChange, value } : {};\n\n // The number of pixels between the label and select elements\n // when the labelPosition is inline (equivalent to --nypl-space-xs).\n const labelSelectGap = 8;\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Select: This component's required `id` prop was not passed.\"\n );\n }\n\n useEffect(() => {\n if (labelPosition === \"inline\") {\n if (labelRef.current) {\n const width = labelRef.current.clientWidth + labelSelectGap;\n setLabelWidth(width);\n }\n } else {\n setLabelWidth(0);\n }\n }, [labelPosition]);\n\n return (\n <ComponentWrapper\n className={className}\n helperText={helperText}\n helperTextStyles={{\n marginLeft: { sm: \"auto\", md: `${labelWidth}px` },\n }}\n id={id}\n invalidText={finalInvalidText}\n isInvalid={isInvalid}\n showHelperInvalidText={showHelperInvalidText}\n __css={styles}\n {...rest}\n >\n <Box __css={labelPosition === \"inline\" && styles.inline}>\n {showLabel && (\n <Box ref={labelRef}>\n <Label\n htmlFor={id}\n id={`${id}-label`}\n isInlined\n isRequired={showRequiredLabel && isRequired}\n >\n {labelText}\n </Label>\n </Box>\n )}\n <ChakraSelect\n id={id}\n variant=\"outline\"\n isRequired={isRequired}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n name={name}\n placeholder={placeholder}\n ref={ref}\n {...controlledProps}\n {...ariaAttributes}\n icon={<Icon id={`${id}-icon`} name=\"arrow\" size=\"medium\" />}\n __css={styles.select}\n >\n {children}\n </ChakraSelect>\n </Box>\n </ComponentWrapper>\n );\n }\n )\n);\n\nexport default Select;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Button from \"../Button/Button\";\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport Icon from \"../Icons/Icon\";\nimport Select from \"../Select/Select\";\nimport TextInput from \"../TextInput/TextInput\";\n\ninterface BaseProps {\n labelText: string;\n name: string;\n onChange?: (\n event:\n | React.ChangeEvent<HTMLInputElement>\n | React.ChangeEvent<HTMLTextAreaElement>\n ) => void;\n value?: string;\n}\n// Internal interfaces that are used only for `SearchBar` props.\nexport interface SelectProps extends BaseProps {\n optionsData: string[];\n onChange?: (event: React.FormEvent) => void;\n}\nexport interface TextInputProps extends BaseProps {\n placeholder?: string;\n}\n\nexport interface SearchBarProps {\n /** Adds 'action' property to the `form` element. */\n action?: string;\n /** The onClick callback function for the `Button` component. */\n buttonOnClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;\n /** A class name for the `form` element. */\n className?: string;\n /** Optional string for the SearchBar's description above the component. */\n descriptionText?: string;\n /** Optional string for the SearchBar's heading text above the component. */\n headingText?: string;\n /** The text to display below the form in a `HelperErrorText` component. */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the `HelperErrorText` for the error state\n * when `isInvalid` is true. */\n invalidText?: HelperErrorTextType;\n /** Sets children form components in the disabled state. */\n isDisabled?: boolean;\n /** Sets children form components in the error state. */\n isInvalid?: boolean;\n /** Sets children form components in the required state. */\n isRequired?: boolean;\n /** Populates the `aria-label` attribute on the form element. */\n labelText: string;\n /** Adds 'method' property to the `form` element. */\n method?: string;\n /** Sets the `Button` variant type to `noBrand` when true;\n * false by default which sets the type to `primary`. */\n noBrandButtonType?: boolean;\n /** Handler function when the form is submitted. */\n onSubmit: (event: React.FormEvent) => void;\n /** Required props to render a `Select` element. */\n selectProps?: SelectProps | undefined;\n /** Custom input element to render instead of a `TextInput` element. */\n textInputElement?: JSX.Element;\n /** Required props to render a `TextInput` element. */\n textInputProps?: TextInputProps | undefined;\n}\n\n/**\n * Renders a wrapper `form` element to be used with `Select` (optional),\n * `Input`, and `Button` components together.\n */\nexport const SearchBar = chakra((props: SearchBarProps) => {\n const {\n action,\n buttonOnClick,\n className,\n descriptionText,\n headingText,\n helperText,\n id,\n invalidText,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n method,\n noBrandButtonType = false,\n onSubmit,\n selectProps,\n textInputElement,\n textInputProps,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"SearchBar\", {});\n const stateProps = {\n helperText: \"\",\n isDisabled,\n isInvalid,\n isRequired,\n showHelperInvalidText: false,\n showLabel: false,\n };\n const footnote = isInvalid ? invalidText : helperText;\n const finalAriaLabel = footnote ? `${labelText} - ${footnote}` : labelText;\n const inputPlaceholder = textInputProps?.placeholder || \"Search terms\";\n const textInputPlaceholder = `${inputPlaceholder} ${\n isRequired ? \"(Required)\" : \"\"\n }`;\n const buttonType = noBrandButtonType ? \"noBrand\" : \"primary\";\n const searchBarButtonStyles = {\n borderLeftRadius: \"none\",\n borderRightRadius: { base: \"none\", md: \"sm\" },\n lineHeight: \"1.70\",\n marginBottom: \"auto\",\n };\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir SearchBar: This component's required `id` prop was not passed.\"\n );\n }\n // Render the `Select` component.\n const selectElem = selectProps && (\n <Select\n id={`searchbar-select-${id}`}\n labelText={selectProps?.labelText}\n name={selectProps?.name}\n onChange={selectProps?.onChange}\n selectType=\"searchbar\"\n value={selectProps?.value}\n __css={styles.select}\n {...stateProps}\n >\n {selectProps?.optionsData.map((option) => (\n <option key={option} value={option}>\n {option}\n </option>\n ))}\n </Select>\n );\n // Render the `TextInput` component.\n const textInputNative = textInputProps && (\n <TextInput\n id={`searchbar-textinput-${id}`}\n labelText={textInputProps?.labelText}\n name={textInputProps?.name}\n onChange={textInputProps?.onChange}\n placeholder={textInputPlaceholder}\n textInputType={selectElem ? \"searchBarSelect\" : \"searchBar\"}\n type=\"text\"\n value={textInputProps?.value}\n {...stateProps}\n />\n );\n // Render the `Button` component.\n const buttonElem = (\n <Button\n buttonType={buttonType}\n id={`searchbar-button-${id}`}\n isDisabled={isDisabled}\n onClick={buttonOnClick}\n type=\"submit\"\n __css={searchBarButtonStyles}\n >\n <Icon\n align=\"left\"\n id={`searchbar-icon-${id}`}\n name=\"search\"\n size=\"small\"\n />\n Search\n </Button>\n );\n // If a custom input element was passed, use that element\n // instead of the DS `TextInput` component.\n const textInputElem = textInputElement || textInputNative;\n\n return (\n <ComponentWrapper\n descriptionText={descriptionText}\n headingText={headingText}\n helperText={helperText}\n id={id}\n invalidText={invalidText}\n isInvalid={isInvalid}\n {...rest}\n >\n <Box\n as=\"form\"\n id={`searchbar-form-${id}`}\n className={className}\n role=\"search\"\n aria-label={finalAriaLabel}\n onSubmit={onSubmit}\n method={method}\n action={action}\n __css={styles}\n >\n {selectElem}\n {textInputElem}\n {buttonElem}\n </Box>\n </ComponentWrapper>\n );\n});\n\nexport default SearchBar;\n","import {\n Box,\n chakra,\n Skeleton as ChakraSkeleton,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport { LayoutTypes } from \"../../helpers/types\";\n\nexport type SkeletonLoaderImageRatios = \"landscape\" | \"portrait\" | \"square\";\n\nexport interface SkeletonLoaderProps {\n /** Additional class name for the Skeleton component. */\n className?: string;\n /** Optional numeric value to control the number of lines for content\n * placeholder; default value is `3`. */\n contentSize?: number;\n /** Optional numeric value to control the number of lines for heading\n * placeholder; default value is `1`. */\n headingSize?: number;\n /** Optional value to control the aspect ratio of the image placeholder;\n * default value is `\"square\"`. */\n imageAspectRatio?: SkeletonLoaderImageRatios;\n /** Optional boolean value to control visibility of border around skeleton loader. */\n isBordered?: boolean;\n /** Optional value to control the position of the image placeholder;\n * default value is `\"column\"`. */\n layout?: LayoutTypes;\n /** Optional boolean value to control visibility of button placeholder. */\n showButton?: boolean;\n /** Optional boolean value to control visibility of content placeholder. */\n showContent?: boolean;\n /** Optional boolean value to control visibility of heading placeholder. */\n showHeading?: boolean;\n /** Optional boolean value to control visibility of image placeholder. */\n showImage?: boolean;\n /** Optional width value. This value should be entered with the same\n * formatting as a CSS width attribute (ex. `50%`, `640px`, `20rem`).\n * If omitted, the skeleton loader will have a default width of 100%. */\n width?: string;\n}\n\n/**\n * The `SkeletonLoader` component renders a placeholder to be used while\n * dynamic content is loading.\n */\nexport const SkeletonLoader = chakra(\n (props: React.PropsWithChildren<SkeletonLoaderProps>) => {\n const {\n className,\n contentSize = 3,\n headingSize = 1,\n imageAspectRatio = \"square\",\n isBordered = false,\n layout = \"column\",\n showButton = false,\n showContent = true,\n showHeading = true,\n showImage = true,\n width,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"SkeletonLoader\", {\n isBordered,\n imageAspectRatio,\n showImage,\n variant: layout,\n });\n\n /**\n * Generates the Chakra skeleton loader `size` number of times for the\n * \"heading\" and \"content\" areas defined by the `type` argument. The last\n * element will have width of `lastWidth`.\n */\n const getSkeletonElements = (type: string, size = 1, lastWidth = \"80%\") => {\n return new Array(size).fill(null).map((_, i) => {\n const width = i === size - 1 ? lastWidth : \"100%\";\n const marginBottomValue =\n i === size - 1 && type === \"content\" ? \"0\" : undefined;\n return (\n <ChakraSkeleton key={`${type}-${i}`} width={width}>\n <Box\n __css={styles[type]}\n style={{ marginBottom: marginBottomValue }}\n />\n </ChakraSkeleton>\n );\n });\n };\n\n return (\n <Box className={className} __css={styles} style={{ width }} {...rest}>\n {showImage && (\n <ChakraSkeleton>\n <Box __css={{ ...styles.element, ...styles.image }} />\n </ChakraSkeleton>\n )}\n <Box className={layout} __css={styles.container}>\n {showHeading && (\n <Box __css={styles.section}>\n {getSkeletonElements(\"heading\", headingSize, \"80%\")}\n </Box>\n )}\n {showContent && (\n <Box __css={styles.section}>\n {getSkeletonElements(\"content\", contentSize, \"30%\")}\n </Box>\n )}\n {showButton && (\n <Box __css={{ ...styles.section, ...styles.button }}>\n <ChakraSkeleton borderRadius=\"16px\">\n <Box __css={styles.button} />\n </ChakraSkeleton>\n </Box>\n )}\n </Box>\n </Box>\n );\n }\n);\n\nexport default SkeletonLoader;\n","import { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Link from \"../Link/Link\";\nimport List from \"../List/List\";\n\ninterface SkipNavigationProps {\n /** Additional CSS class name to render in the `nav` element. */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** The anchor target for the main skip link. The default is \"#mainContent\". */\n target?: string;\n}\n\n/**\n * SkipNavigation is a component that is used to provide a navigational list of\n * links. The first link is used to skip to the main content of the page using\n * the `#mainContent` id, and the second link points to accessibility information\n * on NYPL.org. These links are visually hidden but can be read by screenreaders.\n */\nexport const SkipNavigation = chakra(\n (props: React.PropsWithChildren<SkipNavigationProps>) => {\n const { className, id, target = \"#mainContent\", ...rest } = props;\n const styles = useStyleConfig(\"SkipNavigation\");\n\n return (\n <Box\n as=\"nav\"\n aria-label=\"Skip Navigation\"\n className={className}\n id={id}\n __css={styles}\n {...rest}\n >\n <List inline noStyling type=\"ul\">\n <li>\n <Link href={target}>Skip to Main Content</Link>\n </li>\n <li>\n <Link href=\"https://www.nypl.org/accessibility\">\n Click to learn about accessibility at the Library\n </Link>\n </li>\n </List>\n </Box>\n );\n }\n);\n\nexport default SkipNavigation;\n","import {\n Box,\n chakra,\n RangeSlider as ChakraRangeSlider,\n RangeSliderTrack as ChakraRangeSliderTrack,\n RangeSliderFilledTrack as ChakraRangeSliderFilledTrack,\n RangeSliderThumb as ChakraRangeSliderThumb,\n Slider as ChakraSlider,\n SliderTrack as ChakraSliderTrack,\n SliderFilledTrack as ChakraSliderFilledTrack,\n SliderThumb as ChakraSliderThumb,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport Label from \"../Label/Label\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport TextInput, { TextInputTypes } from \"../TextInput/TextInput\";\n\nexport interface SliderProps {\n /** Additional class name for the Slider component. */\n className?: string;\n /** The initial value for the single `Slider` or an array of two number\n * values for the `isRangeSlider` case.\n */\n defaultValue?: number | number[];\n /** Optional string to populate the HelperErrorText for standard state */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes. */\n id: string;\n /** Optional string to populate the `HelperErrorText` for the error state\n * when `isInvalid` is true. */\n invalidText?: HelperErrorTextType;\n /** Adds the 'disabled' state to the slider and text input(s) when true. */\n isDisabled?: boolean;\n /** Adds the 'invalid' state to the slider and text input(s) when true. */\n isInvalid?: boolean;\n /** Offers the ability to render a slider with one value or\n * a range slider with two values. */\n isRangeSlider?: boolean;\n /** Adds the 'required' attribute to the input(s) when true. */\n isRequired?: boolean;\n /** The `Slider`'s label. In the default single slider, this will be linked to\n * the only `TextInput` component. In the range slider, this will be linked to\n * the first `TextInput` component. If `showLabel` is false, then this value\n * will be set in the `Slider`'s `aria-label` attribute. */\n labelText: string;\n /** Maximum value allowed. */\n max?: number;\n /** Minimum value allowed. */\n min?: number;\n /** The name prop indicates into which form this component belongs to. */\n name?: string;\n /** Callback function that gets the value(s) selected. */\n onChange?: (val: number | number[]) => void;\n /** Offers the ability to hide the `TextInput` boxes. */\n showBoxes?: boolean;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the label onscreen or hide it. Refer\n * to the `labelText` property for more information. */\n showLabel?: boolean;\n /** Whether or not to display the \"(Required)\" text in the label text.\n * True by default. */\n showRequiredLabel?: boolean;\n /** Offers the ability to hide the static min/max values. */\n showValues?: boolean;\n /** The amount to increase or decrease when using the slider thumb(s). */\n step?: number;\n}\n\n/**\n * The `Slider` component renders a singular value slider or a range slider\n * with a min and max value. The value(s) can be updated through the slider\n * thumb(s) or through the text input(s) elements.\n */\nexport const Slider = chakra((props: React.PropsWithChildren<SliderProps>) => {\n const {\n className,\n defaultValue = 0,\n helperText,\n id,\n invalidText,\n isDisabled = false,\n isInvalid = false,\n isRangeSlider = false,\n isRequired = false,\n labelText,\n max = 100,\n min = 0,\n name,\n onChange,\n showBoxes = true,\n showHelperInvalidText = true,\n showLabel = true,\n showRequiredLabel = true,\n showValues = true,\n step = 1,\n ...rest\n } = props;\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Slider: This component's required `id` prop was not passed.\"\n );\n }\n // For the RangeSlider, if the defaultValue is not an array, then we set\n // the defaultValue to an array with the min and max values.\n const rangeSliderDefault =\n typeof defaultValue === \"number\" ? [min, max] : defaultValue;\n // We need to set the default value correctly for both types of sliders.\n const finalDevaultValue = isRangeSlider ? rangeSliderDefault : defaultValue;\n const [currentValue, setCurrentValue] =\n React.useState<typeof defaultValue>(finalDevaultValue);\n let finalIsInvalid = isInvalid;\n // In the Range Slider, if the first value is bigger than the second value,\n // then set the invalid state.\n if (isRangeSlider && currentValue[0] > currentValue[1]) {\n finalIsInvalid = true;\n }\n // const footnote = finalIsInvalid ? invalidText : helperText;\n const styles = useMultiStyleConfig(\"CustomSlider\", {\n isDisabled,\n isInvalid: finalIsInvalid,\n showBoxes,\n showValues,\n });\n // Props that the `Slider` and `RangeSlider` Chakra\n // components both use.\n const sliderSharedProps = {\n // Don't focus on the thumbs for every small change.\n focusThumbOnChange: false,\n id,\n isDisabled,\n max,\n min,\n name,\n onChange: (val) => {\n setCurrentValue(val);\n onChange && onChange(val);\n },\n step,\n // Additional margins so slider thumbs don't overflow past the\n // edge when the value boxes or min/max values are hidden.\n sx: styles.sliderContainer,\n };\n // Props that the two `TextInput` components use.\n const textInputSharedProps = {\n isDisabled,\n isInvalid: finalIsInvalid,\n isRequired,\n max,\n min,\n // Never show the label or helper text for the `TextInput` component.\n showHelperInvalidText: false,\n showLabel: false,\n step,\n type: \"number\" as TextInputTypes,\n };\n /**\n * This returns either the \"start\" or \"end\" `TextInput` component. Note that\n * the \"end\" `TextInput` component is always rendered but the \"start\" is\n * only used for the `isRangeSlider` case.\n */\n const getTextInput = (type: \"start\" | \"end\") => {\n const inputProps = {\n start: {\n // We only want the value for this box in the `isRangeSlider` case.\n value: isRangeSlider ? currentValue[0].toString() : \"\",\n onChange: (val) => {\n // If the value is empty, set it to 0.\n let nextValue = parseInt(val.target.value, 10)\n ? parseInt(val.target.value, 10)\n : 0;\n // Only update the first value in the range.\n const newValue = [nextValue, currentValue[1]];\n setCurrentValue(newValue);\n // If the text input was updated directly,\n // send the data back to the user.\n onChange && onChange(newValue);\n },\n ...textInputSharedProps,\n },\n end: {\n // This text input *always* shows. In the default case, we only\n // keep track of one value. For the `isRangeSlider` case, we keep\n // track of an array but only want the second value.\n value: isRangeSlider\n ? currentValue[1].toString()\n : currentValue.toString(),\n onChange: (val) => {\n // If the value is empty, set it to 0.\n let nextValue = parseInt(val.target.value, 10)\n ? parseInt(val.target.value, 10)\n : 0;\n // If the value entered is bigger than the max value,\n // then set it to the max value.\n if (nextValue > max) {\n nextValue = max;\n }\n // Only update the second value in the `isRangeSlider` case,\n // or the single value in the default case.\n const newValue = isRangeSlider\n ? [currentValue[0], nextValue]\n : nextValue;\n setCurrentValue(newValue);\n // If the text input was updated directly,\n // send the data back to the user.\n onChange && onChange(newValue);\n },\n ...textInputSharedProps,\n },\n };\n const updatedLabel = !isRangeSlider\n ? labelText\n : `${labelText} - ${type} value`;\n return (\n <TextInput\n id={`${id}-textInput-${type}`}\n labelText={updatedLabel}\n __css={{\n ...styles.textInput,\n // Specific margins for each text input to\n // push the elements inside.\n marginRight: type === \"start\" ? \"s\" : null,\n marginLeft: type === \"end\" ? \"s\" : null,\n }}\n {...inputProps[type]}\n />\n );\n };\n /**\n * Returns a Chakra `Slider` or `RangeSlider` component based on the\n * `isRangeSlider` prop from the DS `Slider` component.\n */\n const getSliderType = () => {\n return isRangeSlider ? (\n <ChakraRangeSlider\n // Both slider thumbs need values and should be in an array.\n aria-label={\n !showLabel\n ? [`${labelText} - start value`, `${labelText} - end value`]\n : undefined\n }\n // Both slider thumbs need values and should be in an array,\n // even if it's the same label.\n aria-labelledby={showLabel ? [`${id}-label`, `${id}-label`] : undefined}\n value={currentValue as number[]}\n // Make the thumbs larger.\n size=\"lg\"\n {...sliderSharedProps}\n >\n <ChakraRangeSliderTrack sx={styles.track}>\n <ChakraRangeSliderFilledTrack sx={styles.filledTrack} />\n </ChakraRangeSliderTrack>\n <ChakraRangeSliderThumb index={0} sx={styles.thumb} />\n <ChakraRangeSliderThumb index={1} sx={styles.thumb} />\n </ChakraRangeSlider>\n ) : (\n <ChakraSlider\n aria-label={!showLabel ? labelText : undefined}\n aria-labelledby={`${id}-label`}\n value={currentValue as number}\n // Make the thumb larger.\n size=\"lg\"\n {...sliderSharedProps}\n >\n <ChakraSliderTrack sx={styles.track}>\n <ChakraSliderFilledTrack sx={styles.filledTrack} />\n </ChakraSliderTrack>\n <ChakraSliderThumb sx={styles.thumb} />\n </ChakraSlider>\n );\n };\n\n return (\n <ComponentWrapper\n className={className}\n helperText={helperText}\n id={id}\n invalidText={invalidText}\n isInvalid={finalIsInvalid}\n showHelperInvalidText={showHelperInvalidText}\n __css={styles}\n {...rest}\n >\n {showLabel && (\n <Label\n id={`${id}-label`}\n // We can't target the slider thumbs since those are divs and we\n // should link the label somewhere. So either target the first\n // input box in a `RangeSlider` or the only input box in a `Slider`.\n // When the input fields are not visible, remove this attribute.\n htmlFor={\n showBoxes\n ? `${id}-textInput-${isRangeSlider ? \"start\" : \"end\"}`\n : \"\"\n }\n isRequired={showRequiredLabel && isRequired}\n >\n {labelText}\n </Label>\n )}\n\n <Box __css={styles.container}>\n {/* Only show the start input box for the `isRangeSlider` case. */}\n {showBoxes && isRangeSlider && getTextInput(\"start\")}\n\n {showValues && <Box __css={styles.leftValue}>{min}</Box>}\n\n {getSliderType()}\n\n {showValues && <Box __css={styles.rightValue}>{max}</Box>}\n\n {showBoxes && getTextInput(\"end\")}\n </Box>\n </ComponentWrapper>\n );\n});\n\nexport default Slider;\n","import { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport type StatusBadgeTypes = \"low\" | \"medium\" | \"high\";\nexport interface StatusBadgeProps {\n /** Additional class for the component */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Level of the status badge. Defaults to `\"low\"`. */\n level?: StatusBadgeTypes;\n}\n\n/**\n * The `StatusBadge` component is used to display a visual badge for three\n * different status levels.\n */\nexport const StatusBadge = chakra(\n (props: React.PropsWithChildren<StatusBadgeProps>) => {\n const { children, className, id, level = \"low\", ...rest } = props;\n const styles = useStyleConfig(\"StatusBadge\", { variant: level });\n\n if (!children) {\n console.warn(\"NYPL Reservoir StatusBadge: No children were passed.\");\n }\n\n return (\n <Box id={id} className={className} __css={styles} {...rest}>\n {children}\n </Box>\n );\n }\n);\n\nexport default StatusBadge;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Heading from \"../Heading/Heading\";\nimport Image, { ComponentImageProps, ImageProps } from \"../Image/Image\";\n\nexport type StructuredContentImagePosition = \"left\" | \"right\" | \"center\";\n\ninterface StructuredContentImageProps extends ComponentImageProps {\n /** Optional value to control the positioning of the internal `Image` component.\n * Defaults to `\"left\"`. */\n position?: StructuredContentImagePosition;\n}\n\nexport interface StructuredContentProps {\n /** Optional value to set the text for the callout heading text. */\n calloutText?: string;\n /** Additional class name for the `StructuredContent` component. */\n className?: string;\n /** Optional value to set the text for the main heading text. */\n headingText?: string;\n /** ID that other components can cross reference for accessibility purposes. */\n id?: string;\n /** Object used to create and render the `Image` component. */\n imageProps?: StructuredContentImageProps;\n /** Required value to set the text for the body content. */\n bodyContent: string | JSX.Element;\n}\n\n/**\n * Internal component used in the `StructuredContent` component\n * that renders the DS `Image` component.\n */\nconst StructuredContentImage = chakra((props: ImageProps) => {\n const {\n additionalFigureStyles,\n additionalImageStyles,\n additionalWrapperStyles,\n alt,\n aspectRatio,\n caption,\n component,\n credit,\n size,\n src,\n } = props;\n return (\n <Image\n additionalFigureStyles={additionalFigureStyles}\n additionalImageStyles={additionalImageStyles}\n additionalWrapperStyles={additionalWrapperStyles}\n alt={alt}\n component={component}\n aspectRatio={aspectRatio}\n size={size}\n caption={caption}\n credit={credit}\n src={src}\n />\n );\n});\n\n/**\n * The `StructuredContent` component that displays a heading, callout content,\n * an image, and body content. All are optional except for body content.\n */\nexport const StructuredContent = chakra(\n (props: React.PropsWithChildren<StructuredContentProps>) => {\n const {\n calloutText,\n className,\n headingText,\n id,\n imageProps = {\n alt: \"\",\n aspectRatio: \"square\",\n caption: undefined,\n component: undefined,\n credit: undefined,\n position: \"left\",\n size: \"medium\",\n src: \"\",\n },\n bodyContent,\n ...rest\n } = props;\n const hasImage = imageProps.src || imageProps.component;\n const hasFigureImage = imageProps.caption || imageProps.credit;\n const styles = useMultiStyleConfig(\"StructuredContent\", {\n hasFigureImage,\n imageAspectRatio: imageProps.aspectRatio,\n imagePosition: imageProps.position,\n });\n const finalBodyContent =\n typeof bodyContent === \"string\" ? (\n <div\n className=\"structuredcontent-body\"\n dangerouslySetInnerHTML={{ __html: bodyContent }}\n />\n ) : (\n <Box className=\"structuredcontent-body\">{bodyContent}</Box>\n );\n\n if (hasImage && !imageProps.alt) {\n console.warn(\n \"NYPL Reservoir StructuredContent: The `imageProps.alt` prop is required \" +\n \"when using an image.\"\n );\n }\n\n return (\n <Box id={id} className={className} __css={styles} {...rest}>\n {headingText && <Heading id={`${id}-heading`}>{headingText}</Heading>}\n {calloutText && (\n <Heading id={`${id}-callout`} level=\"three\" size=\"callout\">\n {calloutText}\n </Heading>\n )}\n {hasImage && (\n <StructuredContentImage\n additionalFigureStyles={styles.imageFigure}\n additionalImageStyles={styles.image}\n additionalWrapperStyles={styles.imageWrapper}\n alt={imageProps.alt}\n component={imageProps.component}\n aspectRatio={imageProps.aspectRatio}\n caption={imageProps.caption}\n credit={imageProps.credit}\n size={imageProps.size}\n src={imageProps.src ? imageProps.src : undefined}\n />\n )}\n {finalBodyContent}\n </Box>\n );\n }\n);\n\nexport default StructuredContent;\n","import React from \"react\";\n\n/**\n * Custom hook that controls the sliding function for the carousel wrapper.\n * This returns functions to use for the \"previous\" and \"next\" buttons as well\n * as a CSS style object that should be use to transition between slides. There\n * is also a function to programmatically slide to the first slide.\n * Inspired by: https://codesandbox.io/s/fxjeo\n */\nexport const useCarouselStyles = (slidesCount = 0, slideWidth = 100) => {\n const [currentSlide, setCurrentSlide] = React.useState(0);\n // This wraps around to the last slide if this is invoked while the\n // first slide is active.\n const prevSlide = () => {\n setCurrentSlide((slide) => (slide === 0 ? slidesCount - 1 : slide - 1));\n };\n // This wraps around to the first slide if this is invoked while the\n // last slide is active.\n const nextSlide = () => {\n setCurrentSlide((slide) => (slide === slidesCount - 1 ? 0 : slide + 1));\n };\n const goToStart = () => {\n setCurrentSlide(0);\n };\n // Updates the left margin for the carousel so the elements can\n // slide inside the container.\n const carouselStyle = {\n transition: \"all .5s\",\n marginLeft: `-${currentSlide * slideWidth}%`,\n };\n\n return { prevSlide, nextSlide, carouselStyle, goToStart };\n};\n\nexport default useCarouselStyles;\n","import {\n Box,\n chakra,\n Tab,\n TabList,\n TabPanels,\n TabPanel,\n Tabs as ChakraTabs,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Button from \"../Button/Button\";\nimport Icon from \"../Icons/Icon\";\nimport useCarouselStyles from \"../../hooks/useCarouselStyles\";\nimport useWindowSize from \"../../hooks/useWindowSize\";\n\n// Internal interface used for rendering `Tabs` tab and panel\n// elements, either from data or from children.\ninterface TabPanelProps {\n tabs: React.ReactNode[] | React.ReactNode;\n panels: React.ReactNode[] | React.ReactNode;\n}\n// The general shape of the data object for each Tab.\nexport interface TabsDataProps {\n label: string;\n content: string | React.ReactNode;\n}\n\nexport interface TabsProps {\n /** The index of the tab to display for controlled situations. */\n defaultIndex?: number;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** The callback function invoked on every tab change event. */\n onChange?: (index: number) => any;\n /** Array of data to display */\n tabsData?: TabsDataProps[];\n /** Render a hash in the url for each tab. Only available when data is\n * passed through the `data` props. */\n useHash?: boolean;\n}\n\n/**\n * An internal function used to update the hash in the URL.\n * This function is only used when `useHash` is `true`.\n */\nconst onClickHash = (tabHash: string) => {\n window.location.hash = tabHash;\n};\n\n/**\n * This returns an object with `Tab` and `TabPanel` components to rendered in\n * `TabList` and `TabPanels` components respectively.\n */\nconst getElementsFromData = (\n data: TabsDataProps[],\n useHash: boolean\n): TabPanelProps => {\n const tabs: React.ReactNode[] = [];\n const panels: React.ReactNode[] = [];\n\n if (!data?.length) {\n return { tabs: [], panels: [] };\n }\n\n if (data?.length > 6) {\n console.warn(\n \"NYPL Reservoir Tabs: it is recommended to use no more than six tabs. If \" +\n \"more than six tabs are needed, consider other navigational patterns.\"\n );\n }\n data.forEach((tab, index) => {\n let tempPanel;\n // For URL hash enabled tabs, we need to add a custom `onClick` to handle the URL hash.\n const tempTab = (\n <Tab\n fontSize={[\"0\", null, \"1\"]}\n key={index}\n onClick={useHash ? () => onClickHash(`tab${index + 1}`) : undefined}\n >\n {tab.label}\n </Tab>\n );\n if (typeof tab.content === \"string\") {\n tempPanel = (\n <TabPanel\n dangerouslySetInnerHTML={{ __html: tab.content }}\n key={index}\n />\n );\n } else {\n tempPanel = <TabPanel key={index}>{tab.content}</TabPanel>;\n }\n\n tabs.push(tempTab);\n panels.push(tempPanel);\n });\n\n return {\n tabs: [<TabList key=\"list\">{tabs}</TabList>],\n panels: [<TabPanels key=\"panels\">{panels}</TabPanels>],\n };\n};\n\n/**\n * This returns an object with `TabList` and `TabPanels` components to help format\n * the DOM when building up the `Tabs` component using child component.\n */\nconst getElementsFromChildren = (children): TabPanelProps => {\n const tabs: React.ReactNode[] = [];\n const panels: React.ReactNode[] = [];\n\n if (!children?.length) {\n return { tabs: [], panels: [] };\n }\n\n children.forEach((child: JSX.Element) => {\n if (child.type === TabList || child.props.mdxType === \"TabList\") {\n tabs.push(child);\n\n const childTabs = React.Children.count(child.props.children);\n if (childTabs > 6) {\n console.warn(\n \"NYPL Reservoir Tabs: It is recommended to use no more than six tabs. \" +\n \"If more than six tabs are needed, consider other navigational patterns.\"\n );\n }\n }\n\n if (child.type === TabPanels || child.props.mdxType === \"TabPanels\") {\n panels.push(child);\n }\n });\n\n return { tabs, panels };\n};\n\n/**\n * Renders Chakra's `Tab` component with specific variants, props,\n * and controlled styling.\n */\nexport const Tabs = chakra((props: React.PropsWithChildren<TabsProps>) => {\n const {\n children,\n defaultIndex = 0,\n id,\n onChange,\n tabsData,\n useHash = false,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"Tabs\", {});\n // Just an estimate of the tab width for the mobile carousel.\n const initTabWidth = 65;\n // An estimate for the tab width for larger device widths.\n const mediumTabWidth = 40;\n const [tabWidth, setTabWidth] = React.useState(initTabWidth);\n const windowDimensions = useWindowSize();\n const { tabs, panels }: any = tabsData\n ? getElementsFromData(tabsData, useHash)\n : getElementsFromChildren(children);\n\n if (tabs.length === 0 || panels.length === 0) {\n console.warn(\n \"NYPL Reservoir Tabs: Pass data in the `contentData` props or as children.\"\n );\n }\n\n // `tabs` is an array for the children component approach but an object for\n // the `tabsData` prop approach. We need to get the right props key value\n // to set the carousel's length.\n const tabProps = tabs[0] ? tabs[0]?.props : (tabs as any).props;\n const { prevSlide, nextSlide, carouselStyle, goToStart } = useCarouselStyles(\n tabProps?.children?.length,\n tabWidth\n );\n React.useEffect(() => {\n if (windowDimensions.width > 320) {\n setTabWidth(mediumTabWidth);\n } else {\n setTabWidth(initTabWidth);\n }\n // If we are on larger viewports, reset the carousel so all tabs display.\n if (windowDimensions.width > 600) {\n goToStart();\n }\n }, [goToStart, windowDimensions.width]);\n const previousButton = (\n <Button\n aria-label=\"Previous\"\n id={`tabs-previous-${id}`}\n onClick={prevSlide}\n __css={{\n ...styles.buttonArrows,\n left: \"0\",\n }}\n >\n <Icon\n iconRotation=\"rotate90\"\n id={`tabs-previous-icon-${id}`}\n name=\"arrow\"\n size=\"small\"\n />\n </Button>\n );\n const nextButton = (\n <Button\n aria-label=\"Next\"\n id={`tabs-next-${id}`}\n onClick={nextSlide}\n __css={{\n ...styles.buttonArrows,\n right: \"0\",\n }}\n >\n <Icon\n iconRotation=\"rotate270\"\n id={`tabs-next-icon-${id}`}\n name=\"arrow\"\n size=\"small\"\n />\n </Button>\n );\n\n if (children && tabsData?.length) {\n console.warn(\n \"NYPL Reservoir Tabs: Only pass children or data in the `contentData` \" +\n \"prop. Do not pass both.\"\n );\n }\n\n return (\n <ChakraTabs\n defaultIndex={defaultIndex}\n id={id}\n // The following lazy loads each panel whenever it is needed.\n isLazy\n onChange={onChange}\n variant=\"enclosed\"\n {...rest}\n >\n <Box\n __css={styles.tablistWrapper}\n sx={{\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n }}\n >\n {previousButton}\n <Box __css={styles.carouselParent}>\n <Box {...carouselStyle}>{tabs}</Box>\n </Box>\n {nextButton}\n </Box>\n {panels}\n </ChakraTabs>\n );\n});\n\n// Tabs is also exported above so the props can display in Storybook.\nexport { TabList, Tab, TabPanels, TabPanel };\nexport default Tabs;\n","import { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport SkipNavigation from \"../SkipNavigation/SkipNavigation\";\n\nexport interface TemplateProps {}\nexport interface TemplateHeaderProps {\n /** Flag to render an HTML header element. True by default. */\n renderHeaderElement?: boolean;\n}\nexport interface TemplateFooterProps {\n /** Flag to render an HTML footer element. True by default. */\n renderFooterElement?: boolean;\n}\nexport interface TemplateSidebarProps {\n /** Renders the `TemplateContentSidebar` component either on the left or\n * right side of the `TemplateContentPrimary` component. */\n sidebar?: \"none\" | \"left\" | \"right\";\n}\nexport interface TemplateContentProps extends TemplateSidebarProps {\n /** ID used for the `main` HTML element. Defaults to \"mainContent\". Useful\n * anchor for the application skip navigation. */\n id?: string;\n}\n\nexport interface TemplateAppContainerProps\n extends TemplateFooterProps,\n TemplateHeaderProps,\n TemplateSidebarProps {\n /** DOM that will be rendered before the rest of the components in\n * `TemplateAppContainer` and immediately before the `TemplateHeader` component. */\n aboveHeader?: React.ReactElement;\n /** DOM that will be rendered in the `TemplateBreakout` component section. */\n breakout?: React.ReactElement;\n /** ID used for the `main` HTML element. Defaults to \"mainContent\". Useful\n * anchor for the application skip navigation. */\n contentId?: string;\n /** DOM that will be rendered in the `TemplateContentPrimary` component section. */\n contentPrimary?: React.ReactElement;\n /** DOM that will be rendered in the `TemplateContentSidebar` component section. */\n contentSidebar?: React.ReactElement;\n /** DOM that will be rendered in the `TemplateContentTop` component section. */\n contentTop?: React.ReactElement;\n /** DOM that will be rendered in the `TemplateFooter` component section. */\n footer?: React.ReactElement;\n /** DOM that will be rendered in the `TemplateHeader` component section. */\n header?: React.ReactElement;\n /** Render the `SkipNavigation` component or not. False by default. */\n renderSkipNavigation?: boolean;\n}\n\n/**\n * The main top-level parent component that wraps all template-related\n * components.\n */\nconst Template = chakra((props: React.PropsWithChildren<TemplateProps>) => {\n const styles = useStyleConfig(\"Template\", {});\n return (\n <Box __css={styles} {...props}>\n {props.children}\n </Box>\n );\n});\n\n/**\n * This optional component renders its children from edge-to-edge and should\n * be used for alerts or notifications that are typically site-wide. This must\n * be rendered immediately before the `TemplateHeader` component. This is meant\n * for components that render an `aside` HTML element or HTML element with the\n * `role=\"complementary\"` attribute. These elements should *not* be rendered\n * in the `header` HTML section since that's an accessibility violation.\n */\nconst TemplateAboveHeader = (props: React.PropsWithChildren<TemplateProps>) => {\n const styles = useStyleConfig(\"TemplateBreakout\", {});\n return <Box __css={styles}>{props.children}</Box>;\n};\n\n/**\n * This optional component should be the first child of the `Template`\n * component. This is rendered as an HTML `<header>` element. If an HTML\n * `<header>` element is already passed in a custom component as the children,\n * set `renderFooterElement` to `false`. Otherwise, the parent wrapper will\n * render an HTML `<header>` element.\n */\nconst TemplateHeader = ({\n children,\n renderHeaderElement = true,\n}: React.PropsWithChildren<TemplateHeaderProps>) => {\n const styles = useStyleConfig(\"TemplateHeader\", {});\n let headerElement = <Box __css={styles}>{children}</Box>;\n\n // The user wants to render the `header` HTML element.\n if (renderHeaderElement) {\n // But if they passed in a component that renders an HTML `<header>`,\n // then log a warning.\n React.Children.map(children as JSX.Element, (child: React.ReactElement) => {\n if (child?.type === \"header\" || child?.props?.mdxType === \"header\") {\n console.warn(\n \"NYPL Reservoir TemplateHeader: An HTML `header` element was passed \" +\n \"in. Set `renderHeaderElement` to `false` to avoid nested HTML \" +\n \"`header` elements.\"\n );\n }\n });\n headerElement = (\n <Box as=\"header\" __css={styles}>\n {children}\n </Box>\n );\n }\n return headerElement;\n};\n\n/**\n * This optional component should be used inside the `TemplateHeader` component.\n * This is meant to render its children from edge to edge and is most useful\n * for the `Breadcrumbs` and `Hero` components, and other banner-like components.\n */\nconst TemplateBreakout = (props: React.PropsWithChildren<TemplateProps>) => {\n const styles = useStyleConfig(\"TemplateBreakout\", {});\n return <Box __css={styles}>{props.children}</Box>;\n};\n\n/**\n * This component is most useful to render content on the page. This renders an\n * HTML `<main>` element with an id of \"mainContent\". The \"mainContent\" id should\n * be used as the consuming application's skip navigation link. The `TemplateContent`\n * component also takes a `sidebar` prop with optional \"left\" or \"right\" values.\n * This will set the correct *styling* needed for the `TemplateContentPrimary`\n * and `TemplateContentSidebar` components. Note that `TemplateContentPrimary`\n * and `TemplateContentSidebar` must be ordered correctly as children elements\n * for the appropriate styles to take effect.\n */\nconst TemplateContent = (\n props: React.PropsWithChildren<TemplateContentProps>\n) => {\n const { children, id = \"mainContent\", sidebar = \"none\" } = props;\n const styles = useStyleConfig(\"TemplateContent\", {\n variant: sidebar !== \"none\" ? \"sidebar\" : null,\n });\n // Manually pass in the `sidebar` prop to the `TemplateContentPrimary` and\n // `TemplateContentSidebar` components.\n const newChildren = React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement) => {\n let newChild = child;\n if (\n (child && child?.type === TemplateContentPrimary) ||\n (child?.props && child.props?.mdxType === \"TemplateContentPrimary\") ||\n child?.type === TemplateContentSidebar ||\n (child?.props && child.props?.mdxType === \"TemplateContentSidebar\")\n ) {\n newChild = React.cloneElement(child, { sidebar });\n }\n\n return newChild;\n }\n );\n\n return (\n <Box as=\"main\" id={id} __css={styles}>\n {newChildren}\n </Box>\n );\n};\n\n/**\n * This optional component must be used inside the `TemplateContent` component.\n * This renders content in the main width of the container and will always render\n * above the primary component and the sidebar component (if any).\n */\nconst TemplateContentTop = (props: React.PropsWithChildren<TemplateProps>) => {\n const styles = useStyleConfig(\"TemplateContentTop\", {});\n return <Box __css={styles}>{props.children}</Box>;\n};\n\n/**\n * This component is used to render content in a column when there must be a\n * sidebar component on either its left or right side. It must go inside the\n * `TemplateContent` component. An optional `sidebar` prop value of \"left\" or\n * \"right\" can be passed to render the correct CSS styles. If the `sidebar`\n * prop is used in the `TemplateContent` component, there is no need to pass\n * the `sidebar` prop to this component -- `TemplateContent` will handle it.\n */\nconst TemplateContentPrimary = (\n props: React.PropsWithChildren<TemplateContentProps>\n) => {\n const { sidebar } = props;\n const styles = useStyleConfig(\"TemplateContentPrimary\", {\n variant: sidebar,\n });\n return <Box __css={styles}>{props.children}</Box>;\n};\n\n/**\n * This component is used to render content in a sidebar column. It must go\n * inside the `TemplateContent` component and must be paired with the\n * `TemplateContentPrimary` component. If this is a left sidebar, it needs to be\n * rendered before the `TemplateContentPrimary` component. If this is a right\n * sidebar, it needs to be rendered after the `TemplateContentPrimary` component.\n * An optional `sidebar` prop value of \"left\" or \"right\" can be passed to render\n * the correct CSS styles. If the `sidebar` prop is used in the `TemplateContent`\n * component, there is no need to pass the `sidebar` prop to this component --\n * `TemplateContent` will handle it.\n */\nconst TemplateContentSidebar = (\n props: React.PropsWithChildren<TemplateContentProps>\n) => {\n const { sidebar } = props;\n const styles = useStyleConfig(\"TemplateContentSidebar\", {\n variant: sidebar,\n });\n return <Box __css={styles}>{props.children}</Box>;\n};\n\n/**\n * This optional component should be the last child of the `Template`\n * component. This is rendered as an HTML `<footer>` element and spans the full\n * width of the page. If an HTML `<footer>` element is already passed in a\n * custom component, set `renderFooterElement` to `false`.\n */\nconst TemplateFooter = ({\n children,\n renderFooterElement = true,\n}: React.PropsWithChildren<TemplateFooterProps>) => {\n let footerElement = <>{children}</>;\n\n // The user wants to render the `footer` HTML element.\n if (renderFooterElement) {\n // But give a warning if one was passed.\n React.Children.map(children as JSX.Element, (child: React.ReactElement) => {\n if (child?.type === \"footer\" || child?.props?.mdxType === \"footer\") {\n console.warn(\n \"NYPL Reservoir TemplateFooter: An HTML `footer` element was passed \" +\n \"in. Set `renderFooterElement` to `false` to avoid nested HTML \" +\n \"`footer` elements.\"\n );\n }\n });\n footerElement = <Box as=\"footer\">{children}</Box>;\n }\n return footerElement;\n};\n\n/**\n * This single component can be used instead of all the individual template\n * components. Instead of importing and rendering the needed \"template\"\n * components, each section is passed as a prop to the section where it should\n * be rendered. For example, if you want to render content in the\n * `TemplateContentPrimary` section, then pass it as a prop to `contentPrimary`.\n */\nexport const TemplateAppContainer = chakra(\n (props: React.PropsWithChildren<TemplateAppContainerProps>) => {\n const {\n aboveHeader,\n breakout,\n contentId = \"mainContent\",\n contentPrimary,\n contentSidebar,\n contentTop,\n footer,\n header,\n sidebar = \"none\",\n renderFooterElement = true,\n renderHeaderElement = true,\n renderSkipNavigation = false,\n ...rest\n } = props;\n const aboveHeaderElem = aboveHeader && (\n <TemplateAboveHeader>{aboveHeader}</TemplateAboveHeader>\n );\n const breakoutElem = breakout && (\n <TemplateBreakout>{breakout}</TemplateBreakout>\n );\n const contentTopElem = contentTop && (\n <TemplateContentTop>{contentTop}</TemplateContentTop>\n );\n const contentPrimaryElem = contentPrimary && (\n <TemplateContentPrimary>{contentPrimary}</TemplateContentPrimary>\n );\n const contentSidebarElem = contentSidebar && (\n <TemplateContentSidebar>{contentSidebar}</TemplateContentSidebar>\n );\n return (\n <Template {...rest}>\n {renderSkipNavigation ? <SkipNavigation /> : null}\n {aboveHeaderElem}\n {(header || breakoutElem) && (\n <TemplateHeader renderHeaderElement={renderHeaderElement}>\n {header}\n {breakoutElem}\n </TemplateHeader>\n )}\n {/* Note that setting `sidebar` as a prop here affects the\n TemplateContentSidebar and TemplateContentPrimary components. */}\n <TemplateContent id={contentId} sidebar={sidebar}>\n {contentTopElem}\n\n {sidebar === \"left\" && contentSidebarElem}\n\n {contentPrimaryElem}\n\n {sidebar === \"right\" && contentSidebarElem}\n </TemplateContent>\n {footer && (\n <TemplateFooter renderFooterElement={renderFooterElement}>\n {footer}\n </TemplateFooter>\n )}\n </Template>\n );\n }\n);\n\nexport {\n Template,\n TemplateAboveHeader,\n TemplateHeader,\n TemplateBreakout,\n TemplateContent,\n TemplateContentTop,\n TemplateContentPrimary,\n TemplateContentSidebar,\n TemplateFooter,\n};\nexport default TemplateAppContainer;\n","import {\n Box,\n chakra,\n Switch,\n useMultiStyleConfig,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport { getAriaAttrs } from \"../../utils/utils\";\n\nexport type ToggleSizes = \"default\" | \"small\";\nexport interface ToggleProps {\n /** Used for uncontrolled scenarios. Sets the state of the Toggle when the page first loads.\n * If true, the toggle will be initially set to the \"on\" position. */\n defaultChecked?: boolean;\n /** Optional string to populate the HelperErrorText for standard state */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the HelperErrorText for the error state\n * when `isInvalid` is true. */\n invalidText?: HelperErrorTextType;\n /** When using the Toggle as a \"controlled\" form element, you can specify\n * the Toggle's checked state using this prop.\n * Learn more about controlled and uncontrolled form fields:\n * https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */\n isChecked?: boolean;\n /** Adds the 'disabled' and `aria-disabled` attributes to the input when true.\n * This also makes the text italic and color scheme gray. */\n isDisabled?: boolean;\n /** Adds the 'aria-invalid' attribute to the input when true. */\n isInvalid?: boolean;\n /** Adds the 'required' attribute to the input when true. */\n isRequired?: boolean;\n /** The toggle's label. This will serve as the text content for the `<label>` element */\n labelText: string;\n /** The name prop indicates the `Toggle`'s form element name. If none is\n * specified, 'default' will be used. */\n name?: string;\n /** The action to perform on the `<input>`'s onChange function */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /** The size of the Toggle. Defaults to \"large\". */\n size?: ToggleSizes;\n}\n\nexport const onChangeDefault = () => {\n return;\n};\n\n/**\n * Component that renders Chakra's `Switch` component along with NYPL defaults.\n */\nexport const Toggle = chakra(\n React.forwardRef<HTMLInputElement, ToggleProps>((props, ref?) => {\n const {\n defaultChecked = false,\n helperText,\n id,\n invalidText,\n isChecked,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n name,\n onChange = onChangeDefault,\n size = \"default\",\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"Toggle\", { isDisabled, size });\n const switchStyles = useStyleConfig(\"Switch\", { size });\n const footnote = isInvalid ? invalidText : helperText;\n const ariaAttributes = getAriaAttrs({\n footnote,\n id,\n labelText,\n name: \"Toggle\",\n showLabel: true,\n });\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Toggle: This component's required `id` prop was not passed.\"\n );\n }\n\n return (\n <ComponentWrapper\n helperText={helperText}\n helperTextStyles={styles.helperErrorText}\n id={id}\n invalidText={invalidText}\n isInvalid={isInvalid}\n {...rest}\n >\n <Box __css={styles}>\n <Switch\n id={id}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n name={name || \"default\"}\n ref={ref}\n size={size === \"default\" ? \"lg\" : \"sm\"}\n lineHeight=\"1.5\"\n {...(isChecked !== undefined\n ? {\n isChecked,\n onChange,\n }\n : {\n defaultChecked,\n })}\n {...ariaAttributes}\n __css={switchStyles}\n >\n {labelText}\n </Switch>\n </Box>\n </ComponentWrapper>\n );\n })\n);\n\nexport default Toggle;\n","import { useTheme } from \"@chakra-ui/react\";\n\n/**\n * A custom hook that returns the Chakra-based NYPL theme object. This must be\n * used inside a component that is wrapped in the `DSProvider` component, so\n * that the theme object can be available to use.\n */\nfunction useNYPLTheme() {\n const theme = useTheme();\n if (!theme || Object.keys(theme).length === 0) {\n console.warn(\n \"NYPL Reservoir useNYPLTheme: hook must be used inside of `<DSProvider />`.\"\n );\n return {};\n }\n\n // Chakra provides a lot of their own styles but\n // only NYPL styles should be exported.\n return {\n // base, sm, md, lg, xl, 2xl\n breakpoints: theme.breakpoints,\n colors: {\n // primary, secondary\n brand: theme.colors.brand,\n // blogs, books-and-more, education, locations,\n // research, research-library, whats-on\n section: theme.colors.section,\n transparent: theme.colors.transparent,\n // black, disabled, error, focus, gray, link,\n // status, success, test, warning, white\n ui: theme.colors.ui,\n },\n fontSizes: {\n \"-3\": theme.fontSizes[\"-3\"],\n \"-2\": theme.fontSizes[\"-2\"],\n \"-1\": theme.fontSizes[\"-1\"],\n \"0\": theme.fontSizes[\"0\"],\n \"1\": theme.fontSizes[\"1\"],\n \"2\": theme.fontSizes[\"2\"],\n \"3\": theme.fontSizes[\"3\"],\n \"4\": theme.fontSizes[\"4\"],\n // default\n breadcrumbs: theme.fontSizes.breadcrumbs,\n // default\n button: theme.fontSizes.button,\n // primary, secondary, tertiary, callout\n heading: theme.fontSizes.heading,\n // default\n helper: theme.fontSizes.helper,\n // default, secondary\n label: theme.fontSizes.label,\n // default, caption, tag, mini\n text: theme.fontSizes.text,\n },\n fontWeights: {\n light: theme.fontWeights.light,\n regular: theme.fontWeights.regular,\n medium: theme.fontWeights.medium,\n bold: theme.fontWeights.bold,\n // default, lastChild\n breadcrumbs: theme.fontWeights.breadcrumbs,\n // default\n button: theme.fontWeights.button,\n // primary, secondary, tertiary, callout\n heading: theme.fontWeights.heading,\n // default\n helper: theme.fontWeights.helper,\n // default\n label: theme.fontWeights.label,\n // default, caption, tag, mini\n text: theme.fontWeights.text,\n },\n fonts: {\n body: theme.fonts.body,\n heading: theme.fonts.heading,\n },\n radii: theme.radii,\n space: {\n xxs: theme.space.xxs,\n xs: theme.space.xs,\n s: theme.space.s,\n m: theme.space.m,\n l: theme.space.l,\n xl: theme.space.xl,\n xxl: theme.space.xxl,\n xxxl: theme.space.xxxl,\n },\n };\n}\n\nexport default useNYPLTheme;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\n\nexport type VideoPlayerTypes = \"vimeo\" | \"youtube\";\nexport type VideoPlayerAspectRatios =\n | \"fourByThree\"\n | \"sixteenByNine\"\n | \"square\";\nexport interface VideoPlayerProps {\n /** Optional aspect ratio prop to control the sizing of the video player; if\n * omitted, the video player defaults to `sixteen-by-nine` */\n aspectRatio?: VideoPlayerAspectRatios;\n /** Optional className you can add in addition to `video-player` */\n className?: string;\n /** Optional string to set the text for a video description */\n descriptionText?: string;\n /** Optional string to set a code snippet provided by YouTube or Vimeo; the\n * `videoPlayer` component will accept the `embedCode` prop or the `videoId`\n * and `videoType` props */\n embedCode?: string;\n /** Optional string to set the text for a `Heading` component */\n headingText?: string;\n /** Optional string to set the text for a `HelperErrorText` component */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Optional title to be added to the `<iframe>` element for improved\n * accessibility; this title should describe in a few words the content of\n * the video; if omitted, a generic title will be added; if a `title`\n * attribute is already present in the `embedCode` prop, this prop will be\n * ignored */\n iframeTitle?: string;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Required YouTube or Vimeo video ID. This value can be pulled from a\n * video's YouTube or Vimeo URL. */\n videoId?: string;\n /** Required. Used to specify which video service is being used. */\n videoType?: VideoPlayerTypes;\n}\n\nexport const VideoPlayer = chakra(\n (props: React.PropsWithChildren<VideoPlayerProps>) => {\n const {\n aspectRatio,\n className,\n descriptionText,\n embedCode,\n headingText,\n helperText,\n id,\n iframeTitle,\n showHelperInvalidText = true,\n videoId,\n videoType,\n ...rest\n } = props;\n\n const iframeTitleFinal =\n videoType === \"vimeo\"\n ? iframeTitle || \"Vimeo video player\"\n : iframeTitle || \"YouTube video player\";\n\n const videoSrc =\n videoType === \"vimeo\"\n ? `https://player.vimeo.com/video/${videoId}?autoplay=0&loop=0`\n : `https://www.youtube.com/embed/${videoId}?disablekb=1&autoplay=0&fs=1&modestbranding=0`;\n\n const iFrameTitleEmbedCode = iframeTitle\n ? `${iframeTitle}`\n : `Video player`;\n\n const embedCodeFinal =\n embedCode &&\n embedCode.includes(\"<iframe\") &&\n !embedCode.includes(\"title=\")\n ? embedCode.replace(\n `<iframe `,\n `<iframe title=\"${iFrameTitleEmbedCode}\" `\n )\n : embedCode;\n\n const errorMessage =\n \"<strong>Error:</strong> This video player has not been configured \" +\n \"properly. Please contact the site administrator.\";\n\n let isInvalid = false;\n if (!embedCodeFinal && !videoType && !videoId) {\n console.warn(\n \"NYPL Reservoir VideoPlayer: Pass in either the `embedCode` prop or \" +\n \"both the `videoType` and `videoId` props; none were passed.\"\n );\n isInvalid = true;\n } else if (!embedCodeFinal && !videoType) {\n console.warn(\n \"NYPL Reservoir VideoPlayer: The `videoType` prop is also required. \" +\n \"Only the `videoId` prop was set.\"\n );\n isInvalid = true;\n } else if (!embedCodeFinal && !videoId) {\n console.warn(\n \"NYPL Reservoir VideoPlayer: The `videoId` prop is also required. \" +\n \"Only the `videoType` prop was set.\"\n );\n isInvalid = true;\n } else if (embedCodeFinal && (videoType || videoId)) {\n console.warn(\n \"NYPL Reservoir VideoPlayer: Pass in either the `embedCode` prop or \" +\n \"both the `videoType` and `videoId` props; all were set.\"\n );\n isInvalid = true;\n }\n\n if (\n videoId &&\n (videoId.includes(\"://\") ||\n videoId.includes(\"http\") ||\n videoId.includes(\".\") ||\n videoId.includes(\"youtube\") ||\n videoId.includes(\"vimeo\"))\n ) {\n console.warn(\n \"NYPL Reservoir VideoPlayer: The `videoId` prop is not configured properly.\"\n );\n isInvalid = true;\n }\n\n if (\n embedCodeFinal &&\n ((!embedCodeFinal.includes(\"vimeo.com\") &&\n !embedCodeFinal.includes(\"youtube.com\")) ||\n !embedCodeFinal.includes(\"<iframe\") ||\n !embedCodeFinal.includes(\"</iframe\"))\n ) {\n console.warn(\n \"NYPL Reservoir VideoPlayer: The `embedCode` prop is not configured properly.\"\n );\n isInvalid = true;\n }\n\n const variant = isInvalid ? \"invalid\" : aspectRatio;\n const styles = useMultiStyleConfig(\"VideoPlayer\", { variant });\n\n const embedElement = embedCodeFinal ? (\n <span dangerouslySetInnerHTML={{ __html: embedCodeFinal }} />\n ) : (\n <Box\n as=\"iframe\"\n src={videoSrc}\n title={iframeTitleFinal}\n frameBorder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture\"\n allowFullScreen\n __css={styles.iframe}\n />\n );\n\n return (\n <Box\n className={className}\n data-testid=\"video-player-component\"\n id={id}\n __css={styles}\n {...rest}\n >\n {isInvalid ? (\n <span dangerouslySetInnerHTML={{ __html: errorMessage }} />\n ) : (\n <ComponentWrapper\n headingText={headingText ? headingText : undefined}\n descriptionText={descriptionText ? descriptionText : undefined}\n helperText={\n helperText && showHelperInvalidText ? helperText : undefined\n }\n id={`${id}-componentWrapper`}\n >\n <Box __css={styles.inside}>{embedElement}</Box>\n </ComponentWrapper>\n )}\n </Box>\n );\n }\n);\n\nexport default VideoPlayer;\n","import {\n chakra,\n Table as ChakraTable,\n TableCaption as ChakraTableCaption,\n Tbody as ChakraTbody,\n Thead as ChakraTHead,\n Td as ChakraTd,\n Th as ChakraTh,\n Tr as ChakraTr,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\ninterface CustomColors {\n backgroundColor?: string;\n color?: string;\n}\nexport interface TableProps {\n /** Additional class name for the `Table` component. */\n className?: string;\n /** Array of string values used to populate the `Table` column headers. */\n columnHeaders?: string[];\n /** Hex value to set the background color of the column headers. */\n columnHeadersBackgroundColor?: string;\n /** Hex value to set the text color of the column headers. */\n columnHeadersTextColor?: string;\n /** ID that other components can cross reference for accessibility purposes. */\n id?: string;\n /** If true, a border will be displayed between each row in the `Table`\n * component. The default value is false. */\n showRowDividers?: boolean;\n /** Two-dimensional array used to populate the table rows. */\n tableData: (string | JSX.Element)[][];\n /** Displays `Table` title element. */\n titleText?: string;\n /** If true, the first cell of each row in the `Table` component will be\n * visually styled as a header. The default value is false */\n useRowHeaders?: boolean;\n}\n\n/**\n * Basic `Table` component used to organize and display tabular data in\n * rows and columns.\n */\nexport const Table = chakra((props: React.PropsWithChildren<TableProps>) => {\n const {\n className,\n columnHeaders = [],\n columnHeadersBackgroundColor,\n columnHeadersTextColor,\n id,\n showRowDividers = false,\n tableData,\n titleText,\n useRowHeaders = false,\n ...rest\n } = props;\n const customColors: CustomColors = {};\n\n columnHeadersBackgroundColor &&\n (customColors[\"backgroundColor\"] = columnHeadersBackgroundColor);\n columnHeadersTextColor && (customColors[\"color\"] = columnHeadersTextColor);\n\n const styles = useMultiStyleConfig(\"CustomTable\", {\n columnHeadersTextColor,\n showRowDividers,\n useRowHeaders,\n });\n\n const tableCaption = titleText && (\n <ChakraTableCaption>{titleText}</ChakraTableCaption>\n );\n\n const columnHeadersElems = columnHeaders?.length > 0 && (\n <ChakraTHead>\n <ChakraTr>\n {columnHeaders.map((child, key) => (\n <ChakraTh key={key} scope=\"col\" sx={customColors}>\n {child}\n </ChakraTh>\n ))}\n </ChakraTr>\n </ChakraTHead>\n );\n\n /**\n * This renders a normal `tbody` DOM element structure if the `tableData`\n * passed is a two-dimensional array. This is to render the appropriate\n * row and column structure for a table.\n */\n const tableBodyElems = () => {\n if (\n !Array.isArray(tableData) ||\n tableData.length <= 0 ||\n tableData[0].constructor !== Array\n ) {\n console.warn(\n \"NYPL Reservoir Table: Data in the `tableData` prop must be a two dimensional array.\"\n );\n return null;\n }\n\n for (let i = 1; i < tableData.length; i++) {\n if (tableData[0].length !== tableData[i].length) {\n console.warn(\n \"NYPL Reservoir Table: The number of columns in each row of the data table are not identical. \" +\n \"The `Table` component may not render properly.\"\n );\n break;\n }\n }\n\n return (\n <ChakraTbody>\n {tableData.map((row, index) => (\n <ChakraTr key={index}>\n {row.map((column, key) =>\n key === 0 && useRowHeaders ? (\n <ChakraTh scope=\"row\" key={key}>\n {column}\n </ChakraTh>\n ) : (\n <ChakraTd key={key}>{column}</ChakraTd>\n )\n )}\n </ChakraTr>\n ))}\n </ChakraTbody>\n );\n };\n\n for (let j = 0; j < tableData.length; j++) {\n if (columnHeaders.length !== tableData[j].length) {\n console.warn(\n \"NYPL Reservoir Table: The number of column headers in the `columnHeaders` prop is not equal \" +\n \"to the number of columns in the data table. \" +\n \"The `Table` component may not render properly.\"\n );\n break;\n }\n }\n\n return (\n <ChakraTable id={id} sx={styles} className={className} {...rest}>\n {tableCaption}\n {columnHeadersElems}\n {tableBodyElems()}\n </ChakraTable>\n );\n});\n\nexport default Table;\n"],"names":["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","Icon","chakra","props","align","children","className","color","decorative","iconRotation","id","name","size","title","type","rest","styles","useStyleConfig","variant","iconProps","role","childSVG","console","warn","SvgComponent","iconSvgs","React","ChakraIcon","as","__css","mdxType","Box","shouldForwardProp","getIcon","isExpanded","index","iconName","getElementsFromData","data","colorMap","warning","error","multipleFontSize","length","multiplePadding","map","content","panel","AccordionPanel","key","dangerouslySetInnerHTML","__html","AccordionItem","bgColorByAccordionType","accordionType","AccordionButton","padding","bg","_expanded","_hover","borderColor","flex","fontSize","textAlign","label","Accordion","accordionData","isDefaultOpen","openFirstAccordion","undefined","ChakraAccordion","defaultIndex","allowMultiple","breadcrumbsID","breadcrumbItems","breadcrumbData","BreadcrumbItem","isCurrentPage","BreadcrumbLink","href","url","text","Breadcrumbs","breadcrumbsData","breadcrumbsType","Error","ChakraBreadcrumb","Button","buttonType","isDisabled","mouseDown","onClick","btnCallback","onMouseDown","childCount","hasIcon","child","ChakraButton","useWindowSize","useState","width","height","windowSize","setWindowSize","useEffect","handler","window","innerWidth","innerHeight","addEventListener","removeEventListener","ButtonGroup","buttonWidth","layout","newChildren","breakpointMedium","finalLayout","setFinalLayout","finalButtonWidth","setFinalButtonWidth","windowDimensions","disabledProps","push","Stack","direction","spacing","sx","getWithDirectionIcon","linkId","iconAlign","icon","iconId","getExternalIcon","Link","ref","linkProps","style","rel","target","count","childrenToClone","childProps","getMappedLevel","level","levelMap","one","two","three","four","five","six","Heading","noSpace","urlClass","finalLevel","asHeading","contentToRender","ChakraHeading","ImageWrapper","additionalWrapperStyles","aspectRatio","useMultiStyleConfig","ratio","crop","Image","additionalFigureStyles","additionalImageStyles","alt","caption","component","credit","imageType","src","useImageWrapper","imageComponent","img","finalImage","figure","figcaption","captionWrappers","CardImage","isAtEnd","isCentered","imageIsAtEnd","CardHeading","CardContent","CardActions","bottomBorder","topBorder","CardLinkBox","mainActionLink","ChakraLinkBox","CardLinkOverlay","ChakraLinkOverlay","Card","backgroundColor","foregroundColor","imageProps","isAlignedRightActions","isBordered","hasImage","finalImageSize","setFinalImageSize","finalImageAspectRatio","customColors","cardContents","cardRightContents","cardHeadingCount","isCardActions","elem","heading","body","actions","HelperErrorText","ariaAtomic","ariaLive","isInvalid","announceAriaLive","Text","isBold","isItalic","ChakraText","ComponentWrapper","descriptionText","headingText","helperText","helperTextStyles","invalidText","showHelperInvalidText","hasChildren","footnote","helperErrorText","range","start","stop","step","Array","Math","ceil","fill","x","y","getAriaAttrs","labelText","showLabel","ariaAttributes","CheckboxIcon","viewBox","d","Checkbox","isChecked","isIndeterminate","isRequired","onChange","value","ChakraCheckbox","defaultIsChecked","alignItems","Fieldset","isLegendHidden","legendText","showRequiredLabel","chakraSpacingTokens","px","reservoirSpacingValues","xxxs","xxs","xs","s","m","l","xl","xxl","xxxl","reservoirSpacingTokens","input","group","button","hstack","vstack","inset","extranarrow","extrawide","narrow","wide","grid","page","table","column","row","CheckboxGroup","defaultValue","isFullWidth","spacingProp","checkboxProps","i","newProps","ChakraCheckboxGroup","SimpleGrid","columns","gap","responsiveCols","base","md","lg","ChakraSimpleGrid","FormRow","alteredChildren","FormField","Form","action","method","onSubmit","attributes","Label","htmlFor","isInlined","TextInputFormats","email","hidden","password","tel","textarea","TextInput","max","maxLength","min","onFocus","placeholder","textInputType","isTextArea","isHidden","finalInvalidText","fieldOutput","options","example","ChakraInput","ChakraTextarea","CustomTextInput","forwardRef","dsRef","DatePickerWrapper","isDateRange","DateRangeRow","DatePicker","dateFormat","dateType","helperTextFrom","helperTextTo","initialDate","initialDateTo","maxDate","minDate","nameFrom","nameTo","refTo","finalStyles","initStartDate","Date","initEndDate","initFullDate","startDate","endDate","fullDate","setFullDate","onChangeDefault","date","yearsToDisplay","baseDatePickerAttrs","popperClassName","popperPlacement","popperModifiers","offset","baseCustomTextInputAttrs","subLabels","startDatePickerAttrs","endDatePickerAttrs","endDatePickerElement","startLabelText","endCustomTextInputAttrs","selectsStart","selectsEnd","ReactDatePicker","customInput","selected","startDatePickerElement","screenreaderOnly","clip","overflow","position","wordWrap","wrapperStyles","marginY","marginX","maxWidth","paddingTop","paddingBottom","paddingRight","paddingLeft","activeFocus","darkMode","boxShadow","outline","outlineOffset","outlineColor","zIndex","checkboxRadioLabelStyles","userSelect","fontWeight","marginBottom","marginLeft","_disabled","opacity","fontStyle","_invalid","checkboxRadioControlSize","h","w","checkboxRadioHelperErrorTextStyle","checkboxRadioGroupStyles","marginTop","labelLegendText","display","span","selectTextInputDisabledStyles","selectTextInputFocusStyles","textMargin","margin","global","boxSizing","fontFamily","lineHeight","overflowX","a","svg","_focus","p","ul","ol","createBreakpoints","sm","grayLightCool","grayxxLightCool","grayMedium","brandPrimary","brandSecondary","brandObj","primary","secondary","colors","transparent","ui","black","white","disabled","focus","link","status","success","test","gray","xdark","dark","medium","brand","section","blogs","education","locations","research","lpa","schomburg","schwartzman","red","orange","yellow","green","blue","radii","checkbox","pill","round","shadows","fontSizeValues","fontWeightValues","light","regular","bold","typography","fonts","fontSizes","breadcrumbs","tertiary","callout","helper","tag","mini","fontWeights","lastChild","containerStyles","border","buttonStyles","borderWidth","panelStyles","borderLeftWidth","borderRightWidth","borderBottomWidth","parts","baseStyle","container","booksAndMore","whatsOn","Breadcrumb","cursor","textDecoration","marginRight","marginInlineEnd","marginInlineStart","variants","borderRadius","justifyContent","maxHeight","py","_visited","pointerEvents","minWidth","iconOnly","paddingInlineStart","paddingInlineEnd","_active","noBrand","defaultProps","flexGrow","imageSizes","xxsmall","xsmall","small","large","getBodyPaddingStyles","isRow","bodyPadding","layoutStyles","flexFlow","baseBorderStyles","bodyMargin","flexShrink","flexBasis","topBorderStyles","borderTop","bottomBorderStyles","borderBottom","columnGap","_last","imageSize","imageIsAtEndStyles","order","baseStyleIcon","transitionProperty","transitionDuration","baseStyleControl","_checked","_indeterminate","baseStyleLabel","baseStyleHelperErrorText","control","sizes","colorScheme","imageWrap","sideMarginsAuto","imageRatios","fourByThree","oneByTwo","original","sixteenByNine","square","threeByFour","threeByTwo","twoByOne","CustomImage","circle","objectFit","CustomImageWrapper","left","top","select","Select","labelPosition","inline","searchbar","borderRightColor","borderRightRadius","screenreaderStyles","legend","baseLinkStyles","moreLink","margins","headings","h1","letterSpacing","h2","h3","h4","fallback","h5","h6","secondaryBase","bodyText","secondaryHeadingBase","_before","getSecondaryVariantStyles","bgColor","minHeight","secondaryBooksAndMore","secondaryLocations","secondaryResearch","secondaryWhatsOn","_lastChild","campaign","interior","fiftyFifty","Hero","HorizontalRule","svgBase","none","right","rotate180","transform","rotate270","rotate0","rotate90","xxxlarge","xxlarge","xlarge","allStyles","whiteSpace","baseListStyles","noStyling","listStyle","li","listStyleType","_notFirst","baseUnorderedStyles","baseSectionDefinitionStyles","baseDefinitionStyles","dl","gridTemplateColumns","gridTemplateRows","dt","dd","List","Logo","Notification","dismissible","noMargin","notificationType","dismissibleButton","NotificationContent","alignText","NotificationHeading","Pagination","ProgressIndicator","circular","_first","stroke","circularContainer","flexDirection","linear","linearContainer","linearPercentage","verticalAlign","Radio","RadioGroup","SearchBar","element","borderRules","imagePaddingBottomStyles","landscape","portrait","imageRowHeightStyles","SkeletonLoader","imageAspectRatio","borderStyles","image","showImage","fade","keyframes","from","to","Skeleton","background","animation","SkipNavigation","staticValues","CustomSlider","showBoxes","showValues","baseColor","leftValue","rightValue","textInput","sliderContainer","filledTrack","track","thumb","StatusBadge","low","high","baseTHStyles","showRowDividers","columnHeadersTextColor","textTransform","baseTDStyles","useRowHeaders","tbody","th","td","captionSide","CustomTable","StructuredContent","hasFigureImage","imagePosition","imageFigure","imageWrapper","tablist","tab","borderTopRadius","borderBottomColor","_selected","buttonArrows","pos","transition","tablistWrapper","tabpanels","carouselParent","CustomTabs","breakout","Template","TemplateHeader","TemplateBreakout","TemplateContent","sidebar","TemplateContentTop","TemplateContentPrimary","TemplateContentSidebar","_placeholder","lineheight","searchBar","searchBarSelect","borderTopLeftRadius","borderTopRightRadius","toggleBaseStyle","$width","cssVar","$height","Switch","variable","Toggle","inside","invalid","VideoPlayer","iframe","theme","extendTheme","breakpoints","space","components","CustomSelect","NotificationStyles","Tabs","TemplateStyles","config","cssVarPrefix","DSProvider","ChakraProvider","heroSecondaryTypes","backgroundImageSrc","heroType","locationDetails","subHeaderText","headingStyles","finalHeading","backgroundImageStyle","contentBoxStyling","includes","backgroundImage","childrenToRender","listItems","listElement","listChildrenElms","listType","item","term","description","checkListChildrenError","checkDescriptionChildrenError","appleAppStoreBlack","appleAppStoreWhite","bplBlack","bplWhite","cleverBadgeColor","cleverColor","cleverWhite","firstbookColor","firstbookColorNegative","googlePlayBlack","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","logoProps","logoSvgs","BaseModal","bodyContent","closeButtonLabel","isOpen","onClose","defaultSize","fullSize","setSize","ChakraModal","scrollBehavior","ModalOverlay","ModalContent","ModalHeader","ModalCloseButton","ModalBody","ModalFooter","ModalTrigger","buttonText","modalProps","useDisclosure","onOpen","finalOnCloseHandler","useModal","Modal","ariaLabel","notificationContent","notificationHeading","showIcon","setIsOpen","handleClose","iconElement","baseIconProps","cloneElement","announcement","standard","iconElem","childHeading","childContent","currentPage","getPageHref","initialPage","onPageChange","pageCount","refCurrentPage","useRef","selectedPage","setSelectedPage","previousPageNumber","nextPageNumber","current","changeUrls","handlePageClick","e","clickedPage","preventDefault","previousPage","nextPage","getLinkElement","isSelectedPage","currentStyles","pointerEvent","allAttrs","items","previous","next","linkAttrs","getPaginationNumbers","middleRangeStart","middleRangeEnd","itemList","_","pageLiItems","itemElement","previousLiLink","nextLiLink","indicatorType","finalValue","progressProps","progressComponent","ChakraCircularProgress","ChakraCircularProgressLabel","ChakraProgress","ChakraRadio","setValue","radioGroupProps","ChakraRadioGroup","selectType","labelWidth","setLabelWidth","labelRef","controlledProps","labelSelectGap","clientWidth","ChakraSelect","buttonOnClick","noBrandButtonType","selectProps","textInputElement","textInputProps","stateProps","finalAriaLabel","inputPlaceholder","textInputPlaceholder","searchBarButtonStyles","borderLeftRadius","selectElem","optionsData","option","textInputNative","buttonElem","textInputElem","contentSize","headingSize","showButton","showContent","showHeading","getSkeletonElements","lastWidth","marginBottomValue","ChakraSkeleton","Slider","isRangeSlider","rangeSliderDefault","finalDevaultValue","currentValue","setCurrentValue","finalIsInvalid","sliderSharedProps","focusThumbOnChange","val","textInputSharedProps","getTextInput","inputProps","toString","nextValue","parseInt","newValue","end","updatedLabel","getSliderType","ChakraRangeSlider","ChakraRangeSliderTrack","ChakraRangeSliderFilledTrack","ChakraRangeSliderThumb","ChakraSlider","ChakraSliderTrack","ChakraSliderFilledTrack","ChakraSliderThumb","StructuredContentImage","calloutText","finalBodyContent","useCarouselStyles","slidesCount","slideWidth","currentSlide","setCurrentSlide","prevSlide","slide","nextSlide","goToStart","carouselStyle","onClickHash","tabHash","location","hash","useHash","tabs","panels","forEach","tempPanel","tempTab","Tab","TabPanel","TabList","TabPanels","getElementsFromChildren","childTabs","tabsData","initTabWidth","mediumTabWidth","tabWidth","setTabWidth","tabProps","previousButton","nextButton","ChakraTabs","isLazy","TemplateAboveHeader","renderHeaderElement","headerElement","newChild","TemplateFooter","renderFooterElement","footerElement","TemplateAppContainer","aboveHeader","contentId","contentPrimary","contentSidebar","contentTop","footer","header","renderSkipNavigation","aboveHeaderElem","breakoutElem","contentTopElem","contentPrimaryElem","contentSidebarElem","defaultChecked","switchStyles","useNYPLTheme","useTheme","Object","keys","embedCode","iframeTitle","videoId","videoType","iframeTitleFinal","videoSrc","iFrameTitleEmbedCode","embedCodeFinal","replace","errorMessage","embedElement","frameBorder","allow","allowFullScreen","Table","columnHeaders","columnHeadersBackgroundColor","tableData","titleText","tableCaption","ChakraTableCaption","columnHeadersElems","ChakraTHead","ChakraTr","ChakraTh","scope","tableBodyElems","isArray","constructor","ChakraTbody","ChakraTd","j","ChakraTable"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AI6xB,CAAC,GAAG,CAAb,EAAgBA,CAAC,GAAGd,SAAS,CAACpgC,MAA9B,EAAsCkhC,CAAC,EAAvC,EAA2C;IACzC,IAAIhB,aAAa,CAAClgC,MAAd,KAAyBogC,SAAS,CAACc,CAAD,CAAT,CAAalhC,MAA1C,EAAkD;MAChDrB,OAAO,CAACC,IAAR,CACE,iGACE,8CADF,GAEE,gDAHJ;MAKA;;;;EAIJ,OACEG,aAAA,CAACoiC,OAAD;IAAapjC,EAAE,EAAEA;IAAIoH,EAAE,EAAE9G;IAAQV,SAAS,EAAEA;KAAeS,KAA3D,EACGkiC,YADH,EAEGE,kBAFH,EAGGK,cAAc,EAHjB,CADF;AAOD,CAzG0B,CAApB;;;;"}
1
+ {"version":3,"file":"design-system-react-components.esm.js","sources":["../src/components/Icons/IconSvgs.tsx","../src/components/Icons/Icon.tsx","../src/components/Accordion/Accordion.tsx","../src/components/Breadcrumbs/Breadcrumbs.tsx","../src/components/Button/Button.tsx","../src/hooks/useNYPLBreakpoints.ts","../src/components/ButtonGroup/ButtonGroup.tsx","../src/components/Link/Link.tsx","../src/components/Heading/Heading.tsx","../src/components/Image/Image.tsx","../src/components/Card/Card.tsx","../src/components/HelperErrorText/HelperErrorText.tsx","../src/components/Text/Text.tsx","../src/components/ComponentWrapper/ComponentWrapper.tsx","../src/utils/utils.ts","../src/components/Checkbox/Checkbox.tsx","../src/components/Fieldset/Fieldset.tsx","../src/theme/foundations/spacing.ts","../src/components/CheckboxGroup/CheckboxGroup.tsx","../src/components/Grid/SimpleGrid.tsx","../src/components/Form/Form.tsx","../src/components/Label/Label.tsx","../src/components/TextInput/TextInput.tsx","../src/components/DatePicker/DatePicker.tsx","../src/theme/components/globalMixins.ts","../src/theme/components/global.ts","../src/theme/foundations/global.ts","../src/theme/foundations/breakpoints.ts","../src/theme/foundations/colors.ts","../src/theme/foundations/radii.ts","../src/theme/foundations/shadows.ts","../src/theme/foundations/typography.ts","../src/theme/components/accordion.ts","../src/theme/components/breadcrumb.ts","../src/theme/components/button.ts","../src/theme/components/buttonGroup.ts","../src/theme/components/card.ts","../src/theme/components/checkbox.ts","../src/theme/components/componentWrapper.ts","../src/theme/components/checkboxGroup.ts","../src/theme/components/image.ts","../src/theme/components/select.ts","../src/theme/components/datePicker.ts","../src/theme/components/fieldset.ts","../src/theme/components/link.ts","../src/theme/components/heading.ts","../src/theme/components/helperErrorText.ts","../src/theme/components/hero.ts","../src/theme/components/horizontalRule.ts","../src/theme/components/icon.ts","../src/theme/components/label.ts","../src/theme/components/list.ts","../src/theme/components/logo.ts","../src/theme/components/notification.ts","../src/theme/components/pagination.ts","../src/theme/components/progressIndicator.ts","../src/theme/components/radio.ts","../src/theme/components/radioGroup.ts","../src/theme/components/searchBar.ts","../src/theme/components/skeletonLoader.ts","../src/theme/components/skipNavigation.ts","../src/theme/components/slider.ts","../src/theme/components/statusBadge.ts","../src/theme/components/customTable.ts","../src/theme/components/structuredContent.ts","../src/theme/components/tabs.ts","../src/theme/components/template.ts","../src/theme/components/text.ts","../src/theme/components/textInput.ts","../src/theme/components/toggle.ts","../src/theme/components/videoPlayer.ts","../src/theme/index.ts","../src/theme/provider.tsx","../src/components/Hero/Hero.tsx","../src/components/HorizontalRule/HorizontalRule.tsx","../src/components/List/List.tsx","../src/components/Logo/LogoSvgs.tsx","../src/components/Logo/Logo.tsx","../src/components/Modal/Modal.tsx","../src/components/Notification/Notification.tsx","../src/components/Pagination/Pagination.tsx","../src/components/ProgressIndicator/ProgressIndicator.tsx","../src/components/Radio/Radio.tsx","../src/components/RadioGroup/RadioGroup.tsx","../src/components/Select/Select.tsx","../src/components/SearchBar/SearchBar.tsx","../src/components/SkeletonLoader/SkeletonLoader.tsx","../src/components/SkipNavigation/SkipNavigation.tsx","../src/components/Slider/Slider.tsx","../src/components/StatusBadge/StatusBadge.tsx","../src/components/StructuredContent/StructuredContent.tsx","../src/hooks/useCarouselStyles.ts","../src/components/Tabs/Tabs.tsx","../src/components/Template/Template.tsx","../src/components/Toggle/Toggle.tsx","../src/hooks/useNYPLTheme.ts","../src/hooks/useWindowSize.ts","../src/components/VideoPlayer/VideoPlayer.tsx","../src/components/Table/Table.tsx"],"sourcesContent":["/* eslint-disable camelcase */\nimport accessibilityFull from \"../../../icons/svg/accessibility-full.svg\";\nimport accessibilityPartial from \"../../../icons/svg/accessibility-partial.svg\";\nimport actionCheckCircle from \"../../../icons/svg/action-check-circle.svg\";\nimport actionExit from \"../../../icons/svg/action-exit.svg\";\nimport actionHelpDefault from \"../../../icons/svg/action-help-default.svg\";\nimport actionHelpOutline from \"../../../icons/svg/action-help-outline.svg\";\nimport actionLaunch from \"../../../icons/svg/action-launch.svg\";\nimport actionPower from \"../../../icons/svg/action-power.svg\";\nimport actionSettings from \"../../../icons/svg/action-settings.svg\";\nimport alertNotificationImportant from \"../../../icons/svg/alert-notification-important.svg\";\nimport arrow from \"../../../icons/svg/arrow.svg\";\nimport building from \"../../../icons/svg/building.svg\";\nimport check from \"../../../icons/svg/check.svg\";\nimport clock from \"../../../icons/svg/clock.svg\";\nimport close from \"../../../icons/svg/close.svg\";\nimport download from \"../../../icons/svg/download.svg\";\nimport errorFilled from \"../../../icons/svg/error-filled.svg\";\nimport errorOutline from \"../../../icons/svg/error-outline.svg\";\nimport fileTypeAudio from \"../../../icons/svg/file-type-audio.svg\";\nimport fileTypeDoc from \"../../../icons/svg/file-type-doc.svg\";\nimport fileTypeGenericDoc from \"../../../icons/svg/file-type-generic-doc.svg\";\nimport fileTypeImage from \"../../../icons/svg/file-type-image.svg\";\nimport fileTypePdf from \"../../../icons/svg/file-type-pdf.svg\";\nimport fileTypeSpreadsheet from \"../../../icons/svg/file-type-spreadsheet.svg\";\nimport fileTypeVideo from \"../../../icons/svg/file-type-video.svg\";\nimport headset from \"../../../icons/svg/headset.svg\";\nimport locator from \"../../../icons/svg/locator.svg\";\nimport minus from \"../../../icons/svg/minus.svg\";\nimport plus from \"../../../icons/svg/plus.svg\";\nimport search from \"../../../icons/svg/search.svg\";\nimport socialFacebook from \"../../../icons/svg/social-facebook.svg\";\nimport socialInstagram from \"../../../icons/svg/social-instagram.svg\";\nimport socialTumblr from \"../../../icons/svg/social-tumblr.svg\";\nimport socialTwitter from \"../../../icons/svg/social-twitter.svg\";\nimport socialYoutube from \"../../../icons/svg/social-youtube.svg\";\nimport speakerNotes from \"../../../icons/svg/speaker-notes.svg\";\nimport utilityAccountFilled from \"../../../icons/svg/utility-account-filled.svg\";\nimport utilityAccountUnfilled from \"../../../icons/svg/utility-account-unfilled.svg\";\nimport utilityHamburger from \"../../../icons/svg/utility-hamburger.svg\";\nimport utilitySearch from \"../../../icons/svg/search.svg\";\n\nexport default {\n accessibilityFull,\n accessibilityPartial,\n actionCheckCircle,\n actionExit,\n actionHelpDefault,\n actionHelpOutline,\n actionLaunch,\n actionPower,\n actionSettings,\n alertNotificationImportant,\n arrow,\n building,\n check,\n clock,\n close,\n download,\n errorFilled,\n errorOutline,\n fileTypeAudio,\n fileTypeDoc,\n fileTypeGenericDoc,\n fileTypeImage,\n fileTypePdf,\n fileTypeSpreadsheet,\n fileTypeVideo,\n headset,\n locator,\n minus,\n plus,\n search,\n socialFacebook,\n socialInstagram,\n socialTumblr,\n socialTwitter,\n socialYoutube,\n speakerNotes,\n utilityAccountFilled,\n utilityAccountUnfilled,\n utilityHamburger,\n utilitySearch,\n};\n","import {\n Icon as ChakraIcon,\n Box,\n chakra,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport iconSvgs from \"./IconSvgs\";\n\nexport type IconAlign = \"left\" | \"right\" | \"none\";\nexport type IconColors =\n | \"ui.black\"\n | \"ui.white\"\n | \"brand.primary\"\n | \"brand.secondary\"\n | \"section.blogs.primary\"\n | \"section.blogs.secondary\"\n | \"section.books-and-more.primary\"\n | \"section.books-and-more.secondary\"\n | \"section.education.primary\"\n | \"section.education.secondary\"\n | \"section.locations.primary\"\n | \"section.locations.secondary\"\n | \"section.research.primary\"\n | \"section.research.secondary\"\n | \"section.research-library.lpa\"\n | \"section.research-library.schomburg\"\n | \"section.research-library.schwartzman\"\n | \"section.whats-on.primary\"\n | \"section.whats-on.secondary\";\nexport type IconNames =\n | \"accessibilityFull\"\n | \"accessibilityPartial\"\n | \"actionCheckCircle\"\n | \"actionExit\"\n | \"actionHelpDefault\"\n | \"actionHelpOutline\"\n | \"actionLaunch\"\n | \"actionPower\"\n | \"actionSettings\"\n | \"alertNotificationImportant\"\n | \"arrow\"\n | \"building\"\n | \"check\"\n | \"clock\"\n | \"close\"\n | \"download\"\n | \"errorFilled\"\n | \"errorOutline\"\n | \"fileTypeAudio\"\n | \"fileTypeDoc\"\n | \"fileTypeGenericDoc\"\n | \"fileTypeImage\"\n | \"fileTypePdf\"\n | \"fileTypeSpreadsheet\"\n | \"fileTypeVideo\"\n | \"headset\"\n | \"locator\"\n | \"minus\"\n | \"plus\"\n | \"search\"\n | \"socialFacebook\"\n | \"socialInstagram\"\n | \"socialTumblr\"\n | \"socialTwitter\"\n | \"socialYoutube\"\n | \"speakerNotes\"\n | \"utilityAccountFilled\"\n | \"utilityAccountUnfilled\"\n | \"utilityHamburger\"\n | \"utilitySearch\";\nexport type IconRotationTypes =\n | \"rotate0\"\n | \"rotate90\"\n | \"rotate180\"\n | \"rotate270\";\nexport type IconSizes =\n | \"default\"\n | \"small\"\n | \"medium\"\n | \"large\"\n | \"xlarge\"\n | \"xxlarge\"\n | \"xxxlarge\";\nexport type IconTypes = \"default\" | \"breadcrumbs\";\n\nexport interface IconProps {\n /** Aligns the icon. */\n align?: IconAlign;\n /** Optional className that will be added to the parent element */\n className?: string;\n /** Overrides default icon color (black). */\n color?: IconColors;\n /** Icons designated as decorative will be ignored by screenreaders. True\n * by default. */\n decorative?: boolean;\n /** Rotates the icon clockwise in increments of 90deg */\n iconRotation?: IconRotationTypes;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** The name of the icon you want to use. */\n name?: IconNames;\n /** Sets the icon size. */\n size?: IconSizes;\n /** For accessibility purposes, the text passed in the `title` prop gets\n * rendered in a `title` element in the SVG. This descriptive text is not\n * visible but is needed for screenreaders to describe the graphic. */\n title?: string;\n /** FOR INTERNAL DS USE ONLY: the icon variant to display. */\n type?: IconTypes;\n}\n\n/**\n * Renders SVG-based icons.\n */\nexport const Icon = chakra(\n (props: React.PropsWithChildren<IconProps>) => {\n const {\n align = \"none\",\n children,\n className,\n color = \"ui.black\",\n decorative = true,\n iconRotation = \"rotate0\",\n id,\n name,\n size = \"default\",\n title = `${name} icon`,\n type = \"default\",\n ...rest\n } = props;\n const styles = useStyleConfig(\"Icon\", {\n align,\n color,\n iconRotation,\n size,\n variant: type,\n });\n const iconProps = {\n \"aria-hidden\": decorative,\n className,\n id,\n role: \"img\",\n title,\n ...rest,\n };\n let childSVG = null;\n\n // Component prop validation\n if (name && children) {\n console.warn(\n \"NYPL Reservoir Icon: Pass in either a `name` prop or an `svg` element \" +\n \"child. Do not pass both.\"\n );\n return null;\n } else if (!name && !children) {\n console.warn(\n \"NYPL Reservoir Icon: Pass an icon `name` prop or an SVG child to \" +\n \"ensure an icon appears.\"\n );\n return null;\n }\n\n // The user wants to render an existing icon. Load the icon and render it\n // as a component through Chakra's Icon component. Otherwise, we're going to\n // render the SVG child with NYPL-theme styling.\n if (name) {\n const SvgComponent: any = iconSvgs[name];\n return <ChakraIcon as={SvgComponent} {...iconProps} __css={styles} />;\n }\n\n // If no `name` prop was passed, we expect a child SVG element to be passed.\n // Apply icon props to the SVG child.\n if (\n (children as JSX.Element).type === \"svg\" ||\n (children as JSX.Element).props?.type === \"svg\" ||\n (children as JSX.Element).props?.mdxType === \"svg\"\n ) {\n childSVG = React.cloneElement(children as JSX.Element, {\n ...iconProps,\n });\n } else {\n console.warn(\n \"NYPL Reservoir Icon: An `svg` element must be passed to the `Icon` \" +\n \"component as its child.\"\n );\n }\n\n return <Box __css={styles}>{childSVG}</Box>;\n },\n // Pass all custom props to Chakra and override, e.g. we want the\n // DS color value set and not color strings.\n { shouldForwardProp: () => true }\n);\n\nexport default Icon;\n","import {\n Accordion as ChakraAccordion,\n AccordionButton,\n AccordionItem,\n AccordionPanel,\n Box,\n chakra,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Icon from \"../Icons/Icon\";\n\nexport type AccordionTypes = \"default\" | \"warning\" | \"error\";\nexport interface AccordionDataProps {\n accordionType?: AccordionTypes;\n label: string;\n panel: string | React.ReactNode;\n}\nexport interface AccordionProps {\n /** Array of data to display, and an optional accordionType */\n accordionData: AccordionDataProps[];\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Whether the accordion is open by default only on its initial rendering */\n isDefaultOpen?: boolean;\n}\n\n/**\n * Get the minus or plus icon depending on whether the accordion\n * is open or closed.\n */\nconst getIcon = (isExpanded = false, index: number, id: string) => {\n const iconName = isExpanded ? \"minus\" : \"plus\";\n return (\n <Icon id={`accordion-${id}-icon-${index}`} name={iconName} size=\"small\" />\n );\n};\n\n/**\n * Returns `AccordionItems` for every accordion object in the data\n * array. This automatically creates the `AccordionButton` and `AccordionPanel`\n * combination that is required for the Chakra `Accordion` component.\n */\nconst getElementsFromData = (data: AccordionDataProps[] = [], id: string) => {\n const colorMap = {\n default: \"ui.white\",\n warning: \"ui.status.primary\",\n error: \"ui.status.secondary\",\n };\n // For FAQ-style multiple accordions, the button should be bigger.\n // Otherwise, use the default.\n const multipleFontSize = data?.length > 1 ? \"text.default\" : \"text.caption\";\n const multiplePadding = data?.length > 1 ? \"s\" : \"xs s\";\n\n return data.map((content, index) => {\n // This is done to support both string and DOM element input.\n const panel =\n typeof content.panel === \"string\" ? (\n <AccordionPanel\n id={`${id}-panel-${index}`}\n key={index}\n dangerouslySetInnerHTML={{ __html: content.panel }}\n />\n ) : (\n <AccordionPanel id={`${id}-panel-${index}`} key={index}>\n {content.panel}\n </AccordionPanel>\n );\n\n return (\n <AccordionItem id={`${id}-item-${index}`} key={index}>\n {/* Get the current state to render the correct icon. */}\n {({ isExpanded }) => {\n const bgColorByAccordionType = colorMap[content.accordionType];\n return (\n <>\n <AccordionButton\n id={`${id}-button-${index}`}\n borderColor=\"ui.gray.medium\"\n padding={multiplePadding}\n bg={\n !content.accordionType\n ? colorMap.default\n : bgColorByAccordionType\n }\n _expanded={{\n bg:\n !content.accordionType ||\n content.accordionType === \"default\"\n ? \"ui.gray.light-cool\"\n : bgColorByAccordionType,\n }}\n _hover={{\n bg:\n !content.accordionType ||\n content.accordionType === \"default\"\n ? \"transparent\"\n : bgColorByAccordionType,\n borderColor: \"ui.gray.dark\",\n }}\n >\n <Box\n as=\"span\"\n flex=\"1\"\n fontSize={multipleFontSize}\n textAlign=\"left\"\n >\n {content.label}\n </Box>\n {getIcon(isExpanded, index, id)}\n </AccordionButton>\n {panel}\n </>\n );\n }}\n </AccordionItem>\n );\n });\n};\n\n/**\n * Accordion component that shows content on toggle. Can be used to display\n * multiple accordion items together.\n */\nexport const Accordion = chakra((props: AccordionProps) => {\n const { accordionData, id, isDefaultOpen = false, ...rest } = props;\n\n // Pass `0` to open the first accordion in the 0-index based array.\n const openFirstAccordion = isDefaultOpen ? [0] : undefined;\n\n return (\n <ChakraAccordion\n id={id}\n defaultIndex={openFirstAccordion}\n allowMultiple\n {...rest}\n >\n {getElementsFromData(accordionData, id)}\n </ChakraAccordion>\n );\n});\n\nexport default Accordion;\n","import {\n Breadcrumb as ChakraBreadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n chakra,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Icon from \"../Icons/Icon\";\n\nexport type BreadcrumbsTypes =\n | \"blogs\"\n | \"booksAndMore\"\n | \"education\"\n | \"locations\"\n | \"research\"\n | \"whatsOn\";\nexport interface BreadcrumbsDataProps {\n url: string;\n text: string | React.ReactNode;\n}\n\nexport interface BreadcrumbProps {\n /** Breadcrumb links as an array */\n breadcrumbsData: BreadcrumbsDataProps[];\n /** Used to control how the `Hero` component will be rendered. */\n breadcrumbsType?: BreadcrumbsTypes;\n /** className you can add in addition to 'input' */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n}\n\nconst getElementsFromData = (\n data: BreadcrumbsDataProps[],\n breadcrumbsID?: string\n) => {\n if (!data?.length) {\n return {};\n }\n\n const breadcrumbItems = data.map((breadcrumbData, index) => (\n <BreadcrumbItem\n key={index}\n isCurrentPage={index === data.length - 1 ? true : false}\n >\n <BreadcrumbLink href={breadcrumbData.url}>\n {index === data.length - 2 && (\n <Icon\n name=\"arrow\"\n size=\"small\"\n iconRotation=\"rotate90\"\n id={`${breadcrumbsID}__backarrow`}\n className=\"breadcrumbs-icon\"\n type=\"breadcrumbs\"\n />\n )}\n <span className=\"breadcrumb-label\">{breadcrumbData.text}</span>\n </BreadcrumbLink>\n </BreadcrumbItem>\n ));\n\n return breadcrumbItems;\n};\n\nexport const Breadcrumbs = chakra((props: BreadcrumbProps) => {\n const {\n breadcrumbsData,\n breadcrumbsType = \"whatsOn\",\n className,\n id,\n ...rest\n } = props;\n\n if (!breadcrumbsData || breadcrumbsData.length === 0) {\n throw new Error(\n \"NYPL Reservoir Breadcrumbs: No data was passed to the `breadcrumbsData` prop.\"\n );\n }\n\n const styles = useStyleConfig(\"Breadcrumb\", { variant: breadcrumbsType });\n const breadcrumbItems = getElementsFromData(breadcrumbsData, id);\n\n return (\n <ChakraBreadcrumb\n aria-label=\"Breadcrumb\"\n className={className}\n id={id}\n __css={styles}\n {...rest}\n >\n {breadcrumbItems}\n </ChakraBreadcrumb>\n );\n});\n\nexport default Breadcrumbs;\n","import {\n Button as ChakraButton,\n chakra,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Icon from \"../Icons/Icon\";\n\nexport type ButtonElementType = \"submit\" | \"button\" | \"reset\";\nexport type ButtonTypes =\n | \"primary\"\n | \"secondary\"\n | \"callout\"\n | \"pill\"\n | \"link\"\n | \"noBrand\";\n\ninterface ButtonProps {\n /** The button variation to render based on the `ButtonTypes` type.*/\n buttonType?: ButtonTypes;\n /** Additional className to use. */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes. */\n id: string;\n /** Adds 'disabled' property to the button. */\n isDisabled?: boolean;\n /** Trigger the Button's action through the `mouseDown` event handler instead\n * of `onClick`. `false` by default. */\n mouseDown?: boolean;\n /** The action to perform on the `<button>`'s onClick function. */\n onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;\n /** The HTML button type attribute. */\n type?: ButtonElementType;\n}\n\n/**\n * Renders a simple `button` element with custom variant styles.\n */\nexport const Button = chakra((props: React.PropsWithChildren<ButtonProps>) => {\n const {\n buttonType = \"primary\",\n children,\n className = \"\",\n id,\n isDisabled = false,\n mouseDown = false,\n onClick,\n type = \"button\",\n ...rest\n } = props;\n const btnCallback = mouseDown ? { onMouseDown: onClick } : { onClick };\n let childCount = 0;\n let hasIcon = false;\n let variant: string | ButtonTypes = buttonType;\n let styles = {};\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Button: This component's required `id` prop was not passed.\"\n );\n }\n\n React.Children.map(children as JSX.Element, (child: React.ReactElement) => {\n childCount++;\n if (child !== undefined && child !== null) {\n if (child.type === Icon || child?.props?.mdxType === \"Icon\") {\n hasIcon = true;\n }\n }\n });\n\n if (childCount === 1 && hasIcon) {\n variant = \"iconOnly\";\n }\n\n styles = useStyleConfig(\"Button\", { variant });\n\n return (\n <ChakraButton\n id={id}\n data-testid=\"button\"\n className={className}\n type={type}\n isDisabled={isDisabled}\n {...btnCallback}\n __css={styles}\n {...rest}\n >\n {children}\n </ChakraButton>\n );\n});\n\nexport default Button;\n","import { useMediaQuery } from \"@chakra-ui/react\";\n\n/**\n * This hook is used to determine if the current screen size is larger than\n * the specific NYPL breakpoint values. The returned value is an object with\n * boolean values for each breakpoint.\n */\nconst useNYPLBreakpoints = () => {\n const [\n isLargerThanSmall,\n isLargerThanMedium,\n isLargerThanLarge,\n isLargerThanXLarge,\n ] = useMediaQuery([\n \"(min-width: 320px)\",\n \"(min-width: 600px)\",\n \"(min-width: 960px)\",\n \"(min-width: 1280px)\",\n ]);\n\n return {\n isLargerThanSmall,\n isLargerThanMedium,\n // NYPL uses the medium 600px breakpoint to determine if the screen is\n // in the mobile view. This is the recommended boolean value to use.\n isLargerThanMobile: isLargerThanMedium,\n isLargerThanLarge,\n isLargerThanXLarge,\n };\n};\n\nexport default useNYPLBreakpoints;\n","import { chakra, Stack, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Button from \"../Button/Button\";\nimport { LayoutTypes } from \"../../helpers/types\";\nimport useNYPLBreakpoints from \"../../hooks/useNYPLBreakpoints\";\n\nexport type ButtonGroupWidths = \"default\" | \"full\";\n\ninterface ButtonGroupProps {\n /** Sets the width to \"default\" (for \"fit-content\") or \"full\". */\n buttonWidth?: ButtonGroupWidths;\n /** Additional className to use. */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes. */\n id?: string;\n /** Set's the disabled state to all the internal `Button` components. */\n isDisabled?: boolean;\n /** Renders the layout of `Button` components in a row or column. */\n layout?: LayoutTypes;\n}\n\nconst noop = () => {};\n\n/**\n * A simple wrapper to group `Button` components together. The layout can be set\n * to row or column and the width of internal `Button` components can be set to\n * the parent's full width or the `Button`'s content width\n */\nexport const ButtonGroup = chakra(\n (props: React.PropsWithChildren<ButtonGroupProps>) => {\n const {\n buttonWidth = \"default\",\n children,\n className = \"\",\n id,\n isDisabled = false,\n layout = \"row\",\n ...rest\n } = props;\n const newChildren: JSX.Element[] = [];\n const { isLargerThanMobile } = useNYPLBreakpoints();\n const finalLayout = isLargerThanMobile ? layout : \"column\";\n const finalButtonWidth = isLargerThanMobile ? buttonWidth : \"full\";\n const styles = useStyleConfig(\"ButtonGroup\", {\n buttonWidth: finalButtonWidth,\n });\n\n React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement, key: number) => {\n if (child.type !== Button) {\n // Special case for Storybook MDX documentation.\n if (child.props.mdxType && child.props.mdxType === \"Button\") {\n noop();\n } else {\n console.warn(\n \"NYPL Reservoir ButtonGroup: Only Button components can be children of ButtonGroup.\"\n );\n return;\n }\n }\n const disabledProps = isDisabled ? { isDisabled } : {};\n newChildren.push(React.cloneElement(child, { key, ...disabledProps }));\n }\n );\n\n return (\n <Stack\n id={id}\n className={className}\n direction={finalLayout}\n // Always set the spacing to \"8px\".\n spacing=\"xs\"\n sx={styles}\n {...rest}\n >\n {newChildren}\n </Stack>\n );\n }\n);\n\nexport default ButtonGroup;\n","import { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Icon from \"../Icons/Icon\";\n\nexport type LinkTypes =\n | \"action\"\n | \"backwards\"\n | \"button\"\n | \"default\"\n | \"external\"\n | \"forwards\";\nexport interface LinkProps {\n /** Any child node passed to the component. */\n children: React.ReactNode;\n /** Additional class name to render in the `Link` component. */\n className?: string;\n /** The `href` attribute for the anchor element. */\n href?: string;\n /** ID used for accessibility purposes. */\n id?: string;\n /** Controls the link visuals: action, button, backwards, forwards, or default. */\n type?: LinkTypes;\n}\n\n/**\n * Renders the `Link` children components with a direction arrow icon based\n * on the `\"backwards\"` or `\"forwards\"` `linkType` value.\n */\nfunction getWithDirectionIcon(\n children: JSX.Element,\n type: LinkTypes,\n linkId: string\n) {\n let iconRotation;\n let iconAlign;\n let icon = null;\n\n // An icon needs a position in order for it to be created and\n // rendered in the link.\n if (type === \"backwards\") {\n iconRotation = \"rotate90\";\n iconAlign = \"left\";\n } else if (type === \"forwards\") {\n iconRotation = \"rotate270\";\n iconAlign = \"right\";\n }\n\n const iconId = `${linkId}-icon`;\n\n icon = (\n <Icon\n align={iconAlign}\n className=\"more-link\"\n iconRotation={iconRotation}\n id={iconId}\n name=\"arrow\"\n size=\"medium\"\n />\n );\n\n return (\n <>\n {type === \"backwards\" && icon}\n {children}\n {type === \"forwards\" && icon}\n </>\n );\n}\n\nfunction getExternalIcon(children: JSX.Element, linkId: string) {\n const iconId = `${linkId}-icon`;\n const icon = (\n <Icon\n align={\"right\"}\n className=\"more-link\"\n id={iconId}\n name=\"actionLaunch\"\n size=\"medium\"\n />\n );\n\n return (\n <>\n {children}\n {icon}\n </>\n );\n}\n\n/**\n * A component that uses an `href` prop or a child anchor element, to create\n * an anchor element with added styling and conventions.\n */\nexport const Link = chakra(\n React.forwardRef<HTMLAnchorElement, LinkProps>((props, ref: any) => {\n const { children, className, href, id, type = \"default\", ...rest } = props;\n\n // Merge the necessary props alongside any extra props for the\n // anchor element.\n const linkProps = {\n id,\n href,\n ...rest,\n };\n // The \"default\" type.\n let variant = \"link\";\n\n if (typeof children === \"string\" && !href) {\n throw new Error(\"`Link` needs the `href` prop.\");\n }\n\n if (\n type === \"action\" ||\n type === \"forwards\" ||\n type === \"backwards\" ||\n type === \"external\"\n ) {\n variant = \"moreLink\";\n } else if (type === \"button\") {\n variant = \"button\";\n }\n const style = useStyleConfig(\"Link\", { variant });\n const rel = type === \"external\" ? \"nofollow\" : null;\n const target = type === \"external\" ? \"_blank\" : null;\n // Render with specific direction arrows if the type is\n // Forwards or Backwards. Or render with the launch icon\n // if the type is External. Otherwise, do not add an icon.\n const newChildren =\n ((type === \"forwards\" || type === \"backwards\") &&\n getWithDirectionIcon(children as JSX.Element, type, id)) ||\n (type === \"external\" && getExternalIcon(children as JSX.Element, id)) ||\n children;\n\n if (!href) {\n // React Types error makes this fail:\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/32832\n // let children = React.Children.only(children);\n if (React.Children.count(children) > 1) {\n throw new Error(\"Please pass only one child into `Link`.\");\n }\n const childrenToClone: any = children[0] ? children[0] : children;\n const childProps = childrenToClone.props;\n return (\n <Box as=\"span\" __css={style}>\n {React.cloneElement(\n childrenToClone,\n {\n className,\n ...linkProps,\n ...childProps,\n ref,\n rel,\n target,\n },\n [childrenToClone.props.children]\n )}\n </Box>\n );\n } else {\n return (\n <Box\n as=\"a\"\n className={className}\n ref={ref}\n rel={rel}\n target={target}\n {...linkProps}\n __css={style}\n >\n {newChildren}\n </Box>\n );\n }\n })\n);\n\nexport default Link;\n","import {\n chakra,\n Heading as ChakraHeading,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Link from \"../Link/Link\";\n\nexport type HeadingSizes = \"primary\" | \"secondary\" | \"tertiary\" | \"callout\";\nexport type HeadingLevels = \"one\" | \"two\" | \"three\" | \"four\" | \"five\" | \"six\";\nexport interface HeadingProps {\n /** Optional className that appears in addition to `heading` */\n className?: string;\n /** Optional ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Optional prop used to show capitalized text */\n isCapitalized?: boolean;\n /** Optional prop used to show upper case text */\n isUppercase?: boolean;\n /** Optional prop used to show lower case text */\n isLowercase?: boolean;\n /** Optional number 1-6 used to create the `<h*>` tag; if prop is not passed,\n * `Heading` will default to `<h2>` */\n level?: HeadingLevels;\n /** Optional size used to override the default styles of the semantic HTM\n * `<h>` elements */\n size?: HeadingSizes;\n /** Optional prop used to remove default spacing */\n noSpace?: boolean;\n /** Inner text of the `<h*>` element */\n text?: string;\n /** Optional URL that header points to; when `url` prop is passed to\n * `Heading`, a child `<a>` element is created and the heading text becomes\n * an active link */\n url?: string;\n /** Optional className for the URL when the `url` prop is passed */\n urlClass?: string;\n}\n\n/** Map the word heading level to the number heading level. The default is 2. */\nconst getMappedLevel = (level = \"two\") => {\n const levelMap = {\n one: 1,\n two: 2,\n three: 3,\n four: 4,\n five: 5,\n six: 6,\n };\n return levelMap[level] || 2;\n};\n\nexport const Heading = chakra(\n (props: React.PropsWithChildren<HeadingProps>) => {\n const {\n className,\n id,\n isCapitalized,\n isUppercase,\n isLowercase,\n level = \"two\",\n noSpace,\n size,\n text,\n url,\n urlClass,\n ...rest\n } = props;\n const finalLevel = getMappedLevel(level);\n const variant = size ? size : `h${finalLevel}`;\n const styles = useStyleConfig(\"Heading\", {\n variant,\n isCapitalized,\n isUppercase,\n isLowercase,\n noSpace,\n });\n // Combine native base styles with any additional styles.\n // This is used in the `Hero` and `Notification` components.\n const asHeading: any = `h${finalLevel}`;\n\n if (!props.children && !text) {\n throw new Error(\n \"NYPL Reservoir Heading: No children or value was passed to the `text` prop.\"\n );\n }\n\n if (React.Children.count(props.children) > 1) {\n // Catching the error because React's error isn't as helpful.\n throw new Error(\n \"NYPL Reservoir Heading: Only pass one child into Heading.\"\n );\n }\n\n let textCase = 0;\n if (isCapitalized) {\n textCase++;\n }\n if (isUppercase) {\n textCase++;\n }\n if (isLowercase) {\n textCase++;\n }\n\n if (textCase > 1) {\n console.warn(\n \"NYPL Reservoir Heading: Multiple text case props have been passed \" +\n \"and the component will not render properly.\"\n );\n }\n\n const contentToRender = props.children ? props.children : text;\n const content = url ? (\n <Link className={urlClass} href={url} id={`${id}-link`}>\n {contentToRender}\n </Link>\n ) : (\n contentToRender\n );\n\n return (\n <ChakraHeading\n as={asHeading}\n className={className}\n id={id}\n sx={styles}\n {...rest}\n >\n {content}\n </ChakraHeading>\n );\n }\n);\n\nexport default Heading;\n","import useNativeLazyLoading from \"@charlietango/use-native-lazy-loading\";\nimport { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\nimport { useInView } from \"react-intersection-observer\";\n\nexport type ImageRatios =\n | \"fourByThree\"\n | \"oneByTwo\"\n | \"original\"\n | \"sixteenByNine\"\n | \"square\"\n | \"threeByFour\"\n | \"threeByTwo\"\n | \"twoByOne\";\nexport type ImageSizes =\n | \"default\"\n | \"xxsmall\"\n | \"xsmall\"\n | \"small\"\n | \"medium\"\n | \"large\";\nexport type ImageTypes = \"default\" | \"circle\";\n// Used for components that have an `imageProps` prop.\nexport interface ComponentImageProps {\n /** String value used to populate the `alt` attribute of the internal `Image`\n * component's `img` element. @NOTE if an image is used, this value must be passed. */\n alt?: string;\n /** Optional value to control the aspect ratio of the internal `Image` component.\n * Defaults to `ImageRatios.Square`. */\n aspectRatio?: ImageRatios;\n /** Optional value to render as a caption for the internal `Image` component. */\n caption?: string;\n /** Optional DOM element to use instead of the DS `Image` component. */\n component?: JSX.Element;\n /** Optional value to render as a credit for the internal `Image` component. */\n credit?: string;\n /** Optional value to control the size of the internal `Image` component.\n * Defaults to `ImageSizes.Default`. */\n size?: ImageSizes;\n /** Optional value that contains the path to an image. If omitted, the internal\n * DS `Image` component will not render. */\n src?: string;\n}\n\ninterface ImageWrapperProps {\n /** Optionally pass in additional Chakra-based styles. */\n additionalWrapperStyles?: { [key: string]: any };\n /** ClassName you can add in addition to 'image' */\n className?: string;\n /** Optional value to control the aspect ratio of the card image; default\n * value is `\"original\"` */\n aspectRatio?: ImageRatios;\n /** Optional value to control the size of the image */\n size?: ImageSizes;\n}\n\nexport interface ImageProps extends ImageWrapperProps {\n /** Optionally pass in additional Chakra-based styles only for the figure. */\n additionalFigureStyles?: { [key: string]: any };\n /** Optionally pass in additional Chakra-based styles only for the image. */\n additionalImageStyles?: { [key: string]: any };\n /** Alternate text description of the image */\n alt?: string;\n /** Adding will wrap the image in a <figure> */\n caption?: string;\n /** Custom image component */\n component?: JSX.Element | null;\n /** Adding will wrap the image in a <figure> */\n credit?: string;\n /** Optional value for the image type */\n imageType?: ImageTypes;\n /** The src attribute is required, and contains the path to the image you want to embed. */\n src?: string;\n}\n\nconst ImageWrapper = chakra(\n (props: React.PropsWithChildren<ImageWrapperProps>) => {\n const {\n additionalWrapperStyles = {},\n className = \"\",\n children,\n aspectRatio = \"original\",\n size = \"default\",\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"CustomImageWrapper\", {\n ratio: aspectRatio,\n size,\n });\n return (\n <Box\n className={`the-wrap ${className}`}\n __css={{ ...styles, ...additionalWrapperStyles }}\n {...rest}\n >\n <Box className=\"the-crop\" __css={styles.crop}>\n {children}\n </Box>\n </Box>\n );\n }\n);\n\nexport const Image = chakra((props: ImageProps) => {\n const {\n additionalFigureStyles = {},\n additionalImageStyles = {},\n additionalWrapperStyles = {},\n alt,\n aspectRatio = \"original\",\n caption,\n className = \"\",\n component,\n credit,\n imageType = \"default\",\n size = \"default\",\n src,\n ...rest\n } = props;\n // Check if the native browser lazy loading is supported.\n const supportsLazyLoading = useNativeLazyLoading();\n // If it is (mostly Chromium-based browsers), then skip creating\n // the IntersectionObserver object.\n const [ref, inView] = useInView({\n triggerOnce: true,\n skip: supportsLazyLoading,\n });\n const useImageWrapper = aspectRatio !== \"original\";\n const styles = useMultiStyleConfig(\"CustomImage\", {\n variant: imageType,\n size,\n });\n let imageComponent: JSX.Element | null = null;\n let srcProp = {};\n\n if (alt && alt.length > 300) {\n throw new Error(\n \"NYPL Reservoir Image: Alt text must be less than 300 characters.\"\n );\n }\n\n // For lazying loading images, the initial `src` value is empty. Once\n // the image is loaded, the `src` prop is set and passed to the image\n // element so that it can load. This also lets it load with a gray\n // background placeholder.\n if (inView || supportsLazyLoading) {\n srcProp = { src };\n }\n\n imageComponent = component ? (\n component\n ) : (\n <Box\n as=\"img\"\n alt={alt}\n loading=\"lazy\"\n {...srcProp}\n __css={{ ...styles.img, ...additionalImageStyles }}\n />\n );\n const finalImage = useImageWrapper ? (\n <ImageWrapper\n additionalWrapperStyles={additionalWrapperStyles}\n aspectRatio={aspectRatio}\n className={className}\n size={size}\n {...(caption || credit ? {} : rest)}\n >\n {imageComponent}\n </ImageWrapper>\n ) : (\n imageComponent\n );\n\n return (\n <Box ref={ref}>\n {caption || credit ? (\n <Box\n as=\"figure\"\n __css={{ ...styles.figure, ...additionalFigureStyles }}\n {...rest}\n >\n {finalImage}\n <Box as=\"figcaption\" __css={styles.figcaption}>\n {caption && <Box __css={styles.captionWrappers}>{caption}</Box>}\n {credit && <Box __css={styles.captionWrappers}>{credit}</Box>}\n </Box>\n </Box>\n ) : (\n finalImage\n )}\n </Box>\n );\n});\n\nexport default Image;\n","import {\n Box,\n chakra,\n LinkBox as ChakraLinkBox,\n LinkOverlay as ChakraLinkOverlay,\n useMultiStyleConfig,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport { LayoutTypes } from \"../../helpers/types\";\nimport Heading from \"../Heading/Heading\";\nimport Image, { ComponentImageProps, ImageProps } from \"../Image/Image\";\n\ninterface CustomColorProps {\n backgroundColor?: string;\n color?: string;\n}\n\ninterface CardBaseProps {\n /** Optional value to control the alignment of the text and elements. */\n isCentered?: boolean;\n /** Optional value to render the layout in a row or column.\n * Default is `\"column\"`. */\n layout?: LayoutTypes;\n}\n\ninterface CardWrapperProps {\n /** Optional CSS class name to add. */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes. */\n id?: string;\n /** Main link to use when the full `Card` component should be clickable. */\n mainActionLink?: string;\n /** Additional object for styling the `Card`'s `div` wrapper. */\n styles?: any;\n}\n\n// Used internally only for the `imageProps` prop for the `Card` component.\ninterface CardImageProps extends ComponentImageProps {\n /** Optional boolean value to control the position of the `CardImage`. */\n isAtEnd?: boolean;\n}\n\ninterface CardActionsProps extends CardBaseProps {\n /** Optional boolean value to control visibility of border on the bottom edge\n * of the card actions element */\n bottomBorder?: boolean;\n /** Optional boolean value to control visibility of border on the top edge of\n * the card actions element */\n topBorder?: boolean;\n}\n\n/** Used only internally for the `CardImage` component. */\ninterface CardImageComponentProps extends CardBaseProps, ImageProps {\n /** Optional boolean value to control the position of the `CardImage`. */\n isAtEnd?: boolean;\n}\n\nexport interface CardProps extends CardBaseProps, CardWrapperProps {\n /** Optional hex color value used to set the card background color. */\n backgroundColor?: string;\n /** Optional hex color value used to override the default text color. */\n foregroundColor?: string;\n /** Optional boolean value to control the visibility of a border around\n * the card. */\n isBordered?: boolean;\n /** Object used to create and render the `Image` component. */\n imageProps?: CardImageProps;\n /** Set CardActions to the right content side. This only works in\n * the row layout. */\n isAlignedRightActions?: boolean;\n}\n\n/**\n * The CardImage component is used internally in the `Card` component. It\n * renders an `Image` component but with overriding styles specific to the\n * `Card` component.\n */\nfunction CardImage(\n props: React.ComponentProps<\"img\"> & CardImageComponentProps\n) {\n const {\n alt,\n aspectRatio,\n caption,\n component,\n credit,\n isAtEnd,\n isCentered,\n layout,\n size,\n src,\n } = props;\n // Additional styles to add to the `Image` component.\n const styles = useStyleConfig(\"CardImage\", {\n imageIsAtEnd: isAtEnd,\n isCentered,\n layout,\n size,\n });\n return (\n <Box __css={styles}>\n <Image\n alt={alt}\n caption={caption}\n component={component}\n credit={credit}\n aspectRatio={aspectRatio}\n size={size}\n src={src}\n />\n </Box>\n );\n}\n\n// CardHeading child-component\nexport const CardHeading = chakra(Heading);\n\n// CardContent child-component\nexport const CardContent = chakra((props: React.PropsWithChildren<{}>) => {\n const { children, ...rest } = props;\n const styles = useStyleConfig(\"CardContent\");\n return children ? (\n <Box __css={styles} {...rest}>\n {children}\n </Box>\n ) : null;\n});\n\n// CardActions child-component\nexport const CardActions = chakra(\n (props: React.PropsWithChildren<CardActionsProps>) => {\n const { bottomBorder, children, isCentered, layout, topBorder, ...rest } =\n props;\n const styles = useStyleConfig(\"CardActions\", {\n bottomBorder,\n isCentered,\n layout,\n topBorder,\n });\n\n return children ? (\n <Box __css={styles} {...rest}>\n {children}\n </Box>\n ) : null;\n }\n);\n\n/**\n * If `mainActionLink` is passed, then this adds Chakra's `LinkBox` wrapper\n * component to the entire `Card` component. This works together with the\n * `CardLinkOverlay` component to provide a clickable overlay.\n */\nconst CardWrapper = chakra(\n ({\n className,\n children,\n id,\n mainActionLink,\n styles,\n ...rest\n }: React.PropsWithChildren<CardWrapperProps>) =>\n mainActionLink ? (\n <ChakraLinkBox id={id} className={className} sx={styles} {...rest}>\n {children}\n </ChakraLinkBox>\n ) : (\n <Box id={id} className={className} __css={styles} {...rest}>\n {children}\n </Box>\n )\n);\n\n/**\n * If `mainActionLink` is passed, then this adds Chakra's `LinkOverlay` around\n * text that should be linked, in this case the `CardHeading` text. This works\n * together with the `CardWrapper` component to provide a clickable overlay to\n * the `Card` component while still allowing links in the `CardActions` to be\n * clickable.\n */\nfunction CardLinkOverlay({\n children,\n mainActionLink,\n}: React.PropsWithChildren<CardWrapperProps>) {\n return mainActionLink ? (\n <ChakraLinkOverlay href={mainActionLink}>{children}</ChakraLinkOverlay>\n ) : (\n <>{children}</>\n );\n}\n\nexport const Card = chakra((props: React.PropsWithChildren<CardProps>) => {\n const {\n backgroundColor,\n children,\n className,\n foregroundColor,\n id,\n imageProps = {\n alt: \"\",\n aspectRatio: \"square\",\n caption: undefined,\n component: undefined,\n credit: undefined,\n isAtEnd: false,\n size: \"default\",\n src: \"\",\n },\n isAlignedRightActions = false,\n isBordered,\n isCentered = false,\n layout = \"column\",\n mainActionLink,\n ...rest\n } = props;\n const hasImage = imageProps.src || imageProps.component;\n const finalImageAspectRatio = imageProps.component\n ? \"original\"\n : imageProps.aspectRatio;\n const customColors: CustomColorProps = {};\n const cardContents: JSX.Element[] = [];\n const cardRightContents: JSX.Element[] = [];\n let cardHeadingCount = 0;\n\n if (imageProps.component && imageProps.aspectRatio) {\n console.warn(\n \"NYPL Reservoir Card: Both the `imageProps.component` and `imageProps.aspectRatio` \" +\n \"props were set but `imageProps.aspectRatio` will be ignored in favor \" +\n \"of the aspect ratio on `imageProps.component` prop.\"\n );\n }\n\n backgroundColor && (customColors[\"backgroundColor\"] = backgroundColor);\n foregroundColor && (customColors[\"color\"] = foregroundColor);\n\n const styles = useMultiStyleConfig(\"Card\", {\n hasImage,\n imageIsAtEnd: imageProps.isAtEnd,\n isAlignedRightActions,\n isBordered,\n isCentered,\n layout,\n mainActionLink,\n });\n\n React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement, key) => {\n const isCardActions =\n child.type === CardActions || child.props.mdxType === \"CardActions\";\n if (child.type === CardHeading || child.props.mdxType === \"CardHeading\") {\n // If the child is a `CardHeading` component, then we add the\n // `CardLinkOverlay` inside of the `Heading` component and wrap its text.\n // This allows other links in the `CardActions` to be clickable. This is\n // only done for the first `CardHeading` component but does not affect\n // the full-click feature.\n const newChildren =\n cardHeadingCount === 0 ? (\n <CardLinkOverlay mainActionLink={mainActionLink}>\n {child.props.children}\n </CardLinkOverlay>\n ) : (\n child.props.children\n );\n const elem = React.cloneElement(child, {\n key,\n // Override the child text with the potential `CardLinkOverlay`.\n children: newChildren,\n layout,\n __css: styles.heading,\n });\n cardContents.push(elem);\n cardHeadingCount++;\n } else if (\n child.type === CardContent ||\n child.props.mdxType === \"CardContent\"\n ) {\n const elem = React.cloneElement(child, { key });\n cardContents.push(elem);\n } else if (isCardActions) {\n const elem = React.cloneElement(child, { key, isCentered, layout });\n\n // Only allow `CardActions` to align to the right of the main\n // `CardContent` component when in the row layout.\n if (isAlignedRightActions && layout === \"row\") {\n cardRightContents.push(elem);\n } else {\n cardContents.push(elem);\n }\n }\n }\n );\n\n return (\n <CardWrapper\n id={id}\n className={className}\n mainActionLink={mainActionLink}\n styles={{\n ...styles,\n ...customColors,\n }}\n {...rest}\n >\n {hasImage && (\n <CardImage\n alt={imageProps.alt}\n aspectRatio={finalImageAspectRatio}\n caption={imageProps.caption}\n component={imageProps.component}\n credit={imageProps.credit}\n isAtEnd={imageProps.isAtEnd}\n layout={layout}\n size={imageProps.size}\n src={imageProps.src ? imageProps.src : undefined}\n />\n )}\n <Box className=\"card-body\" __css={styles.body}>\n {cardContents}\n </Box>\n {cardRightContents.length ? (\n <Box\n className=\"card-right\"\n __css={{ ...styles.body, ...styles.actions }}\n >\n {cardRightContents}\n </Box>\n ) : null}\n </CardWrapper>\n );\n});\n\nexport default Card;\n","import { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport type AriaLiveValues = \"assertive\" | \"off\" | \"polite\";\nexport type HelperErrorTextType = string | JSX.Element;\n\ninterface HelperErrorTextProps {\n /** Aria attribute. When true, assistive technologies will\n * read the entire DOM element. When false, only changes (additionals or\n * removals) will be read. True by default. */\n ariaAtomic?: boolean;\n /** Aria attribute used in the invalid state to read error text by default.\n * This indicates the priority of the text and when it should be presented to\n * users using screen readers; \"off\" indicates that the content should not be\n * presented, \"polite\" that it will be announced at the next available time\n * slot, and \"assertive\" that it should be announced immediately. This is set\n * to \"off\" by default and to \"polite\" by when `isInvalid` is true. */\n ariaLive?: AriaLiveValues;\n /** Additional className to add. */\n className?: string;\n /** Unique ID for accessibility purposes. */\n id?: string;\n /** Toggles between helper and invalid styling. */\n isInvalid?: boolean;\n /** The text to display. */\n text: HelperErrorTextType;\n}\n\n/**\n * Helper or error text for forms components.\n */\nexport const HelperErrorText = chakra(\n ({\n ariaAtomic = true,\n ariaLive = \"polite\",\n className = \"\",\n id,\n isInvalid = false,\n text,\n ...rest\n }: HelperErrorTextProps) => {\n // Only announce the text in the invalid state.\n const announceAriaLive = isInvalid;\n const styles = useStyleConfig(\"HelperErrorText\", { isInvalid });\n const props = {\n \"aria-atomic\": ariaAtomic,\n \"aria-live\": announceAriaLive ? ariaLive : \"off\",\n className,\n \"data-isinvalid\": isInvalid,\n id,\n __css: styles,\n ...rest,\n };\n return typeof text === \"string\" ? (\n <Box {...props} dangerouslySetInnerHTML={{ __html: text }} />\n ) : (\n <Box {...props}>{text}</Box>\n );\n }\n);\n\nexport default HelperErrorText;\n","import { Text as ChakraText, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport type TextSizes = \"default\" | \"caption\" | \"tag\" | \"mini\";\n\nexport interface TextProps {\n /** Additional class name to render in the `Text` component. */\n className?: string;\n /** Optional prop used to show bolded text */\n isBold?: boolean;\n /** Optional prop used to show itlicized text */\n isItalic?: boolean;\n /** Optional prop used to show capitalized text */\n isCapitalized?: boolean;\n /** Optional prop used to show upper case text */\n isUppercase?: boolean;\n /** Optional prop used to show lower case text */\n isLowercase?: boolean;\n /** Optional prop used to remove default spacing */\n noSpace?: boolean;\n /** Optional prop to control the text styling */\n size?: TextSizes;\n}\n\nexport const Text = chakra((props: React.PropsWithChildren<TextProps>) => {\n const {\n children,\n className = \"\",\n isBold,\n isItalic,\n isCapitalized,\n isUppercase,\n isLowercase,\n noSpace,\n size = \"default\",\n ...rest\n } = props;\n const styles = useStyleConfig(\"Text\", {\n variant: size,\n isBold,\n isItalic,\n isCapitalized,\n isUppercase,\n isLowercase,\n noSpace,\n });\n\n if (!children) {\n console.warn(\n \"NYPL Reservoir Text: No children were passed and the `Text` component \" +\n \"will not render correctly.\"\n );\n }\n\n let textCase = 0;\n if (isCapitalized) {\n textCase++;\n }\n if (isUppercase) {\n textCase++;\n }\n if (isLowercase) {\n textCase++;\n }\n\n if (textCase > 1) {\n console.warn(\n \"NYPL Reservoir Text: Multiple text case props have been passed \" +\n \"and the component will not render properly.\"\n );\n }\n\n return (\n <ChakraText className={className} sx={styles} {...rest}>\n {children}\n </ChakraText>\n );\n});\n\nexport default Text;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Heading from \"../Heading/Heading\";\nimport HelperErrorText, {\n HelperErrorTextType,\n} from \"../HelperErrorText/HelperErrorText\";\nimport Text from \"../Text/Text\";\nexport interface ComponentWrapperProps {\n /** The UI elements that will be wrapped by this component */\n children: React.ReactNode;\n /** A class name for the `div` parent element. */\n className?: string;\n /** Optional string to set the text for the component's description */\n descriptionText?: string;\n /** Optional string to set the text for a `Heading` component */\n headingText?: string;\n /** Optional string to set the text for a `HelperErrorText` component */\n helperText?: HelperErrorTextType;\n /** Styles that target the helper text. */\n helperTextStyles?: { [key: string]: any };\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Optional string to populate the `HelperErrorText` for the error state\n * when `isInvalid` is true. */\n invalidText?: HelperErrorTextType;\n /** Sets invalid text in the error state. */\n isInvalid?: boolean;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n}\n\nexport const ComponentWrapper = chakra(\n (props: React.PropsWithChildren<ComponentWrapperProps>) => {\n const {\n children,\n className,\n descriptionText,\n headingText,\n helperText,\n helperTextStyles = {},\n id,\n invalidText,\n isInvalid = false,\n showHelperInvalidText = true,\n ...rest\n } = props;\n const hasChildren = !!children;\n const styles = useMultiStyleConfig(\"ComponentWrapper\", { hasChildren });\n const footnote = isInvalid ? invalidText : helperText;\n\n // Note: Typescript warns when there are no children passed and\n // doesn't compile. This is meant to log in non-Typescript apps.\n if (!hasChildren) {\n console.warn(\"NYPL Reservoir ComponentWrapper: No children were passed.\");\n }\n\n return (\n <Box className={className} id={`${id}-wrapper`} __css={styles} {...rest}>\n {headingText && <Heading id={`${id}-heading`} text={headingText} />}\n {descriptionText && <Text>{descriptionText}</Text>}\n {children}\n {footnote && showHelperInvalidText && (\n <HelperErrorText\n id={`${id}-helperText`}\n isInvalid={isInvalid}\n text={footnote}\n __css={{ ...styles.helperErrorText, ...helperTextStyles }}\n />\n )}\n </Box>\n );\n }\n);\n\nexport default ComponentWrapper;\n","import { HelperErrorTextType } from \"../components/HelperErrorText/HelperErrorText\";\nimport { AriaAttributes } from \"./interfaces\";\n\n// Utility functions to use throughout the codebase\n\n/**\n * range\n * Get an array of values from `start` to `stop` - 1 with an optional\n * `step` between values.\n */\nexport const range = (start: number, stop: number, step = 1): number[] => {\n if (!start) {\n return [];\n }\n\n return Array(Math.ceil((stop - start) / step))\n .fill(start)\n .map((x, y) => x + y * step);\n};\n\n/**\n * Given a pagination's pageCount, this will return (1) a page number,\n * derived from the current URL, and (2) a function that, when passed to\n * Pagination component, makes the URL change and refreshes the page.\n * @NOTE this is only used for Storybook documentation.\n */\nexport const getStorybookHrefProps = (pageCount: number) => {\n // This uses the `addon-queryparams` Storybook addon.\n const urlParams = new URLSearchParams(document.location.search);\n const pageParam = urlParams.get(\"page\");\n\n const getPageNumber = (page: number, pageCount: number) => {\n return page > 0 && page <= pageCount ? page : 1;\n };\n const computedCurrentPage =\n pageParam &&\n Number(pageParam) &&\n getPageNumber(Number(pageParam), pageCount);\n const location = window.location;\n // Passing this function into `Pagination` makes the URL to change\n // and refreshes the page.\n const getPageHref = (selectedPage: number) => {\n return `${location.href}&page=${selectedPage}`;\n };\n\n return { computedCurrentPage, getPageHref };\n};\n\ninterface GetAriaAttrsProps {\n footnote: HelperErrorTextType;\n id: string;\n labelText: HelperErrorTextType;\n name: string;\n showLabel: boolean;\n}\n/**\n * Get aria-* attributes for input components. This sets the `aria-label` and\n * `aria-describedby` attributes, based on the label and footnote values.\n */\nexport const getAriaAttrs = ({\n footnote,\n id,\n labelText,\n name,\n showLabel,\n}: GetAriaAttrsProps): AriaAttributes => {\n let ariaAttributes: AriaAttributes = {};\n\n if (!showLabel) {\n if (typeof labelText !== \"string\") {\n console.warn(\n `NYPL Reservoir ${name}: \\`labelText\\` must be a string when \\`showLabel\\` is false.`\n );\n }\n ariaAttributes[\"aria-label\"] =\n labelText && footnote\n ? `${labelText} - ${footnote}`\n : (labelText as string);\n } else if (footnote) {\n ariaAttributes[\"aria-describedby\"] = `${id}-helperText`;\n }\n\n return ariaAttributes;\n};\n","import {\n chakra,\n Checkbox as ChakraCheckbox,\n Icon,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport { getAriaAttrs } from \"../../utils/utils\";\n\ninterface CheckboxIconProps {\n /** When using the Checkbox as a \"controlled\" form element, you can specify\n * the Checkbox's checked state using this prop.\n * Learn more about controlled and uncontrolled form fields:\n * https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */\n isChecked?: boolean;\n /** Adds the indeterminate state to the `Checkbox`. */\n isIndeterminate?: boolean;\n}\n\nexport interface CheckboxProps extends CheckboxIconProps {\n /** className you can add in addition to 'input' */\n className?: string;\n /** Optional string to populate the HelperErrorText for standard state */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the HelperErrorText for the error state\n * when `isInvalid` is true. */\n invalidText?: HelperErrorTextType;\n /** Adds the 'disabled' and `aria-disabled` attributes to the input when true.\n * This also makes the text italic and color scheme gray. */\n isDisabled?: boolean;\n /** Adds the 'aria-invalid' attribute to the input when true. This also makes\n * the color theme \"NYPL error\" red for the button and text. */\n isInvalid?: boolean;\n /** Adds the 'required' attribute to the input when true. */\n isRequired?: boolean;\n /** The checkbox's label. This will serve as the text content for a `<label>`\n * element if `showlabel` is true, or an \"aria-label\" if `showLabel` is false. */\n labelText: string | JSX.Element;\n /** The name prop indicates into which group of checkboxes this checkbox\n * belongs. If none is specified, 'default' will be used */\n name?: string;\n /** The action to perform on the `<input>`'s onChange function */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the checkbox's label onscreen or hide it.\n * Refer to the `labelText` property for more information. */\n showLabel?: boolean;\n /** Populates the value of the input */\n value?: string;\n}\n\nfunction CheckboxIcon(props: CheckboxIconProps) {\n // We don't need the `isIndeterminate` or `isChecked` props but it\n // causes rendering issues on the SVG element, so we remove them\n // before passing all the props to the `Icon` component.\n const { isIndeterminate, isChecked, ...rest } = props;\n\n return (\n <Icon viewBox=\"0 0 24 24\" {...rest}>\n <path\n fill=\"currentColor\"\n d=\"M8.795 15.875l-4.17-4.17-1.42 1.41 5.59 5.59 12-12-1.41-1.41-10.59 10.58z\"\n />\n </Icon>\n );\n}\n\nexport const Checkbox = chakra(\n React.forwardRef<HTMLInputElement, CheckboxProps>((props, ref?) => {\n const {\n className,\n invalidText,\n helperText,\n id,\n isChecked,\n isDisabled = false,\n isIndeterminate = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n name,\n onChange,\n showHelperInvalidText = true,\n showLabel = true,\n value,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"Checkbox\", {});\n const footnote = isInvalid ? invalidText : helperText;\n // Use Chakra's default indeterminate icon.\n const icon = !isIndeterminate ? <CheckboxIcon /> : undefined;\n const ariaAttributes = getAriaAttrs({\n footnote,\n id,\n labelText,\n name: \"Checkbox\",\n showLabel,\n });\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Checkbox: This component's required `id` prop was not passed.\"\n );\n }\n\n return (\n <ComponentWrapper\n helperText={helperText}\n helperTextStyles={styles.helperErrorText}\n id={id}\n invalidText={invalidText}\n isInvalid={isInvalid}\n showHelperInvalidText={showHelperInvalidText}\n {...rest}\n >\n <ChakraCheckbox\n className={className}\n icon={icon}\n id={id}\n isDisabled={isDisabled}\n isIndeterminate={isIndeterminate}\n isInvalid={isInvalid}\n isRequired={isRequired}\n name={name || \"default\"}\n ref={ref}\n value={value}\n {...(isChecked !== undefined\n ? {\n isChecked,\n onChange,\n }\n : {\n defaultIsChecked: false,\n })}\n alignItems=\"flex-start\"\n __css={styles}\n {...ariaAttributes}\n >\n {showLabel && labelText}\n </ChakraCheckbox>\n </ComponentWrapper>\n );\n })\n);\n\nexport default Checkbox;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport React from \"react\";\n\ninterface FieldsetProps {\n /** Additional class name to add. */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Flag to show or hide the text in the `legend` element. False by default. */\n isLegendHidden?: boolean;\n /** Flag to render \"Required\" in the `legend`. True by default. */\n isRequired?: boolean;\n /** Text to display in the `legend` element. */\n legendText?: string;\n /** Whether or not to display the \"(Required)\" text in the `legend` text.\n * True by default. */\n showRequiredLabel?: boolean;\n}\n\n/**\n * A wrapper component that renders a `fieldset` element along with a `legend`\n * element as its first child. Commonly used to wrap form components.\n */\nexport const Fieldset = chakra(\n ({\n children,\n className,\n id,\n isLegendHidden = false,\n isRequired = false,\n legendText,\n showRequiredLabel = true,\n ...rest\n }: React.PropsWithChildren<FieldsetProps>) => {\n const styles = useMultiStyleConfig(\"Fieldset\", { isLegendHidden });\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Fieldset: This component's required `id` prop was not passed.\"\n );\n }\n\n return (\n <Box as=\"fieldset\" id={id} __css={styles} className={className} {...rest}>\n <legend>\n {legendText}\n {showRequiredLabel && isRequired && <span> (Required)</span>}\n </legend>\n {children}\n </Box>\n );\n }\n);\n\nexport default Fieldset;\n","/**\n * Chakra spacing values are based on:\n * root size of 16px or 1rem\n * 1 spacing unit is 4px or 0.25rem\n *\n * Chakra's mental model: If you need a spacing of 40px, divide it by 4.\n * That'll give you 10. Then use it in your component.\n *\n * The DS uses nine CSS variables/values found in \"src/styles/03-space/_space.css\":\n * --nypl-space-xxxs = 2px or 0.125rem\n * --nypl-space-xxs = 4px or 0.25rem\n * --nypl-space-xs = 8px or 0.5rem\n * --nypl-space-s = 16px or 1rem\n * --nypl-space-m = 24px or 1.5rem\n * --nypl-space-l = 32px or 2rem\n * --nypl-space-xl = 48px or 3rem\n * --nypl-space-xxl = 64px or 4rem\n * --nypl-space-xxxl = 96px or 6rem\n *\n * @note Even though all the following values are available through Chakra,\n * we recommend to only use the spacing values that map to the DS values\n * declared above.\n *\n * Chakra Number Value | Chakra Name value | DS Variable\n * ------------------- | ----------------- | -----------------\n * 0.5 | xxxs | --nypl-space-xxxs\n * 1 | xxs | --nypl-space-xxs\n * 2 | xs | --nypl-space-xs\n * 4 | s | --nypl-space-s\n * 6 | m | --nypl-space-m\n * 8 | l | --nypl-space-l\n * 12 | xl | --nypl-space-xl\n * 16 | xxl | --nypl-space-xxl\n * 24 | xxxl | --nypl-space-xxxl\n */\nconst chakraSpacingTokens = {\n px: \"1px\",\n 0: \"0\",\n 0.5: \"0.125rem\",\n 1: \"0.25rem\",\n 1.5: \"0.375rem\",\n 2: \"0.5rem\",\n 2.5: \"0.625rem\",\n 3: \"0.75rem\",\n 3.5: \"0.875rem\",\n 4: \"1rem\",\n 5: \"1.25rem\",\n 6: \"1.5rem\",\n 7: \"1.75rem\",\n 8: \"2rem\",\n 9: \"2.25rem\",\n 10: \"2.5rem\",\n 12: \"3rem\",\n 14: \"3.5rem\",\n 16: \"4rem\",\n 20: \"5rem\",\n 24: \"6rem\",\n 28: \"7rem\",\n 32: \"8rem\",\n 36: \"9rem\",\n 40: \"10rem\",\n 44: \"11rem\",\n 48: \"12rem\",\n 52: \"13rem\",\n 56: \"14rem\",\n 60: \"15rem\",\n 64: \"16rem\",\n 72: \"18rem\",\n 80: \"20rem\",\n 96: \"24rem\",\n};\nconst reservoirSpacingValues = {\n xxxs: \"0.125rem\", // 2px\n xxs: \"0.25rem\", // 4px\n xs: \"0.5rem\", // 8px\n s: \"1rem\", // 16px\n m: \"1.5rem\", // 24px\n l: \"2rem\", // 32px\n xl: \"3rem\", // 48px\n xxl: \"4rem\", // 64px\n xxxl: \"6rem\", // 96px\n};\nconst reservoirSpacingTokens = {\n // Reservoir generic tokens\n xxxs: reservoirSpacingValues[\"xxxs\"],\n xxs: reservoirSpacingValues[\"xxs\"],\n xs: reservoirSpacingValues[\"xs\"],\n s: reservoirSpacingValues[\"s\"],\n m: reservoirSpacingValues[\"m\"],\n l: reservoirSpacingValues[\"l\"],\n xl: reservoirSpacingValues[\"xl\"],\n xxl: reservoirSpacingValues[\"xxl\"],\n xxxl: reservoirSpacingValues[\"xxxl\"],\n // Reservoir semantic tokens\n input: {\n group: {\n button: {\n hstack: reservoirSpacingValues[\"xs\"],\n vstack: reservoirSpacingValues[\"xs\"],\n },\n default: {\n hstack: reservoirSpacingValues[\"l\"],\n vstack: reservoirSpacingValues[\"s\"],\n },\n },\n },\n inset: {\n default: reservoirSpacingValues[\"s\"],\n extranarrow: reservoirSpacingValues[\"xxs\"],\n extrawide: reservoirSpacingValues[\"xl\"],\n narrow: reservoirSpacingValues[\"xs\"],\n wide: reservoirSpacingValues[\"l\"],\n },\n grid: {\n default: reservoirSpacingValues[\"l\"],\n xxs: reservoirSpacingValues[\"xxs\"],\n xs: reservoirSpacingValues[\"xs\"],\n s: reservoirSpacingValues[\"s\"],\n m: reservoirSpacingValues[\"m\"],\n l: reservoirSpacingValues[\"l\"],\n xl: reservoirSpacingValues[\"xl\"],\n xxl: reservoirSpacingValues[\"xxl\"],\n },\n page: {\n hstack: reservoirSpacingValues[\"l\"],\n vstack: reservoirSpacingValues[\"l\"],\n },\n table: {\n column: reservoirSpacingValues[\"m\"],\n row: reservoirSpacingValues[\"l\"],\n },\n};\nexport const spacing = {\n ...chakraSpacingTokens,\n ...reservoirSpacingTokens,\n};\n","import {\n chakra,\n CheckboxGroup as ChakraCheckboxGroup,\n Stack,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Checkbox from \"../Checkbox/Checkbox\";\nimport Fieldset from \"../Fieldset/Fieldset\";\nimport HelperErrorText, {\n HelperErrorTextType,\n} from \"../HelperErrorText/HelperErrorText\";\nimport { LayoutTypes } from \"../../helpers/types\";\nimport { spacing } from \"../../theme/foundations/spacing\";\n\nexport interface CheckboxGroupProps {\n /** Any child node passed to the component. */\n children: React.ReactNode;\n /** Populates the initial value of the input */\n defaultValue?: string[];\n /** Optional string to populate the HelperErrorText for standard state */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the HelperErrorText for error state */\n invalidText?: HelperErrorTextType;\n /** Adds the 'disabled' prop to the input when true. */\n isDisabled?: boolean;\n /** Set's the `Checkbox`s' wrapper to be full width. */\n isFullWidth?: boolean;\n /** A`dds the 'aria-invalid' attribute to the input and\n * sets the error state when true. */\n isInvalid?: boolean;\n /** Adds the 'required' attribute to the input when true. */\n isRequired?: boolean;\n /** The checkbox group label displayed in a `legend` element if `showlabel` is\n * true, or an \"aria-label\" if `showLabel` is false. */\n labelText: string;\n /** Renders the checkbox buttons in a row or column (default). */\n layout?: LayoutTypes;\n /** The `name` prop indicates the form group for all the `Checkbox` children. */\n name: string;\n /** The action to perform on the `<input>`'s onChange function */\n onChange?: (value: string[]) => void;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the group's legend onscreen or hide it. Refer\n * to the `labelText` property for more information. */\n showLabel?: boolean;\n /** Whether or not to display the \"(Required)\" text in the label text.\n * True by default. */\n showRequiredLabel?: boolean;\n}\n\nconst noop = () => {};\n\n/**\n * Wrapper component to wrap `Checkbox` components. Can be displayed in a\n * column or in a row. The `CheckboxGroup` component renders all the necessary\n * wrapping and associated text elements, but the checkbox input elements\n * _need_ to be child `Checkbox` components from the NYPL Design System.\n */\nexport const CheckboxGroup = chakra(\n React.forwardRef<HTMLInputElement, CheckboxGroupProps>((props, ref?) => {\n const {\n children,\n defaultValue = [],\n helperText,\n id,\n invalidText,\n isDisabled = false,\n isFullWidth = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n layout = \"column\",\n name,\n onChange,\n showHelperInvalidText = true,\n showLabel = true,\n showRequiredLabel = true,\n ...rest\n } = props;\n const footnote = isInvalid ? invalidText : helperText;\n const newChildren: JSX.Element[] = [];\n const spacingProp =\n layout === \"column\"\n ? spacing.input.group.default.vstack\n : spacing.input.group.default.hstack;\n const checkboxProps =\n defaultValue && onChange\n ? {\n defaultValue,\n onChange,\n }\n : {};\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir CheckboxGroup: This component's required `id` prop was not passed.\"\n );\n }\n\n // Go through the Checkbox children and update them as needed.\n React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement, i) => {\n if (child.type !== Checkbox) {\n // Special case for Storybook MDX documentation.\n if (child.props.mdxType && child.props.mdxType === \"Checkbox\") {\n noop();\n } else {\n console.warn(\n \"NYPL Reservoir CheckboxGroup: Only `Checkbox` components are \" +\n \"allowed as children.\"\n );\n }\n }\n\n if (child !== undefined && child !== null) {\n const newProps = {\n key: i,\n id: `${id}-${i}`,\n name,\n isDisabled,\n isInvalid,\n isRequired,\n };\n newChildren.push(React.cloneElement(child, newProps));\n }\n }\n );\n\n // Get the Chakra-based styles for the custom elements in this component.\n const styles = useMultiStyleConfig(\"CheckboxGroup\", { isFullWidth });\n\n return (\n <Fieldset\n id={`${id}-checkbox-group`}\n isLegendHidden={!showLabel}\n isRequired={isRequired}\n legendText={labelText}\n showRequiredLabel={showRequiredLabel}\n {...rest}\n __css={styles}\n >\n <ChakraCheckboxGroup {...checkboxProps}>\n <Stack\n id={id}\n data-testid=\"checkbox-group\"\n direction={[layout]}\n spacing={spacingProp}\n ref={ref}\n aria-label={!showLabel ? labelText : undefined}\n >\n {newChildren}\n </Stack>\n </ChakraCheckboxGroup>\n {footnote && showHelperInvalidText && (\n <HelperErrorText\n id={`${id}-helperErrorText`}\n isInvalid={isInvalid}\n text={footnote}\n __css={styles.helperErrorText}\n />\n )}\n </Fieldset>\n );\n })\n);\n\nexport default CheckboxGroup;\n","import { chakra, SimpleGrid as ChakraSimpleGrid } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport type GridGaps =\n | \"grid.xxs\"\n | \"grid.xs\"\n | \"grid.s\"\n | \"grid.m\"\n | \"grid.l\"\n | \"grid.xl\"\n | \"grid.xxl\";\nexport interface SimpleGridProps {\n /** Additional class name. */\n className?: string;\n /** Optional numeric value to override the default column count; the default\n * column count is 3. */\n columns?: number;\n /** Optional gap size; if omitted, the default `large` (2rem / 32px) spacing\n * will be used; `IMPORTANT: for standard grid layouts, this prop should\n * not be used.` */\n gap?: GridGaps;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n}\n\nexport const SimpleGrid = chakra(\n (props: React.PropsWithChildren<SimpleGridProps>) => {\n const { children, columns, className, gap = \"grid.l\", id, ...rest } = props;\n\n const responsiveCols = columns\n ? { base: 1, md: columns }\n : { base: 1, md: 2, lg: 3 };\n\n return (\n <ChakraSimpleGrid\n columns={responsiveCols}\n gap={gap}\n id={id}\n className={className}\n {...rest}\n >\n {children}\n </ChakraSimpleGrid>\n );\n },\n { shouldForwardProp: () => true }\n);\n\nexport default SimpleGrid;\n","import { chakra } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport SimpleGrid, { GridGaps } from \"../Grid/SimpleGrid\";\n\ninterface FormBaseProps {\n /** className to be applied to FormRow, FormField, and Form */\n className?: string;\n /** Optional spacing size; if omitted, the default `large` (2rem / 32px)\n * spacing will be used; ```IMPORTANT: for general form layout, this prop\n * should not be used``` */\n gap?: GridGaps;\n /** ID that other components can cross reference (internal use) */\n id: string;\n}\n\nexport interface FormChildProps extends Partial<FormBaseProps> {}\n\nexport interface FormProps extends FormBaseProps {\n /** Optional form `action` attribute */\n action?: string;\n /** Optional form `method` attribute */\n method?: \"get\" | \"post\";\n /** Function to call for the `onSubmit` form event. */\n onSubmit?: (e: React.FormEvent<HTMLFormElement>) => void;\n}\n\n/** FormRow child-component */\nexport const FormRow = chakra(\n (props: React.PropsWithChildren<FormChildProps>) => {\n const { children, className, gap, id, ...rest } = props;\n const count = React.Children.count(children);\n const alteredChildren = React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement, i) => {\n if (!child) return null;\n if (child.type === FormField || child.props.mdxType === \"FormField\") {\n return React.cloneElement(child, { id: `${id}-grandchild${i}` });\n }\n console.warn(\n \"NYPL Reservoir FormRow: Children must be `FormField` components.\"\n );\n return null;\n }\n );\n return (\n <SimpleGrid\n columns={count}\n className={className}\n gap={gap}\n id={id}\n {...rest}\n >\n {alteredChildren}\n </SimpleGrid>\n );\n }\n);\n\n/** FormField child-component */\nexport const FormField = chakra(\n (props: React.PropsWithChildren<FormChildProps>) => {\n const { children, className, gap, id, ...rest } = props;\n return (\n <SimpleGrid columns={1} className={className} gap={gap} id={id} {...rest}>\n {children}\n </SimpleGrid>\n );\n }\n);\n\n/** Main Form component */\nexport const Form = chakra(\n (props: React.PropsWithChildren<FormProps>) => {\n const {\n action,\n children,\n className,\n gap = \"grid.l\",\n id,\n method,\n onSubmit,\n ...rest\n } = props;\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Form: This component's required `id` prop was not passed.\"\n );\n }\n\n const attributes: Partial<FormProps> = {};\n action && (attributes[\"action\"] = action);\n\n method &&\n (method === \"get\" || method === \"post\") &&\n (attributes[\"method\"] = method);\n\n const alteredChildren = React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement, i) => {\n return React.cloneElement(child, { gap, id: `${id}-child${i}` });\n }\n );\n\n return (\n <form\n aria-label=\"form\"\n className={className}\n id={id}\n onSubmit={onSubmit}\n {...attributes}\n {...rest}\n >\n <SimpleGrid columns={1} gap={gap} id={`${id}-parent`}>\n {alteredChildren}\n </SimpleGrid>\n </form>\n );\n },\n { shouldForwardProp: () => true }\n);\n\nexport default Form;\n","import { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\ninterface LabelProps {\n /** Additional CSS class name to render in the `label` element. */\n className?: string;\n /** The id of the html element that this `Label` is describing. */\n htmlFor: string;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Controls whether the label should be inline with the input it goes with.\n * This prop should only be used internally. */\n isInlined?: boolean;\n /** Controls whether the \"(Required)\" text should be displayed alongside the\n * label's text. False by default. */\n isRequired?: boolean;\n}\n\n/**\n * A label for form inputs. It should never be used alone.\n */\nexport const Label = chakra((props: React.PropsWithChildren<LabelProps>) => {\n const {\n children,\n className,\n htmlFor,\n id,\n isInlined = false,\n isRequired = false,\n ...rest\n } = props;\n const styles = useStyleConfig(\"Label\", { isInlined });\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Label: This component's required `id` prop was not passed.\"\n );\n }\n\n return (\n <Box\n as=\"label\"\n id={id}\n className={className}\n htmlFor={htmlFor}\n __css={styles}\n {...rest}\n >\n {children}\n {isRequired && <span> (Required)</span>}\n </Box>\n );\n});\n\nexport default Label;\n","import {\n chakra,\n Input as ChakraInput,\n Textarea as ChakraTextarea,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport Label from \"../Label/Label\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport { getAriaAttrs } from \"../../utils/utils\";\n\n// HTML Input types as defined by MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input\nexport type TextInputTypes =\n | \"email\"\n | \"hidden\"\n | \"number\"\n | \"password\"\n | \"text\"\n | \"textarea\"\n | \"tel\"\n | \"url\";\n\n// Only used internally.\nexport const TextInputFormats = {\n email: \"jdoe@domain.com\",\n hidden: \"\",\n password: \"\",\n text: \"\",\n tel: \"(123) 123-1234\",\n textarea: \"\",\n url: \"https://domain.com\",\n};\n\n// Only used internally in `TextInput` and `SearchBar`.\nexport type TextInputVariants = \"default\" | \"searchBar\" | \"searchBarSelect\";\n\nexport interface InputProps {\n /** A class name for the TextInput parent div. */\n className?: string;\n /** The starting value of the input field. */\n defaultValue?: string;\n /** Populates the HelperErrorText for the standard state */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Populates the HelperErrorText for the error state */\n invalidText?: HelperErrorTextType;\n /** Adds the `disabled` and `aria-disabled` prop to the input when true */\n isDisabled?: boolean;\n /** Adds errored styling to the input/textarea and helper text elements */\n isInvalid?: boolean;\n /** Will add `required` and `aria-required` props to the input/textarea elements */\n isRequired?: boolean;\n /** Provides text for a `Label` component if `showLabel` is set to true;\n * populates an `aria-label` attribute if `showLabel` is set to false. */\n labelText: string;\n /** The max number for a `number` TextInput type. */\n max?: number;\n /** The max length of the input field. This prop is for all input types\n * except for the `number` type. */\n maxLength?: number;\n /** The min number for a `number` TextInput type. */\n min?: number;\n /** Used to reference the input element in forms. */\n name?: string;\n /** The action to perform on the `input`/`textarea`'s onChange function */\n onChange?: (\n event:\n | React.ChangeEvent<HTMLInputElement>\n | React.ChangeEvent<HTMLTextAreaElement>\n ) => void;\n /** The action to perform on the `input`/`textarea`'s onClick function */\n onClick?: (event: React.MouseEvent<HTMLInputElement, MouseEvent>) => void;\n /** The action to perform on the `input`/`textarea`'s onFocus function */\n onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;\n /** Populates the placeholder for the input/textarea elements */\n placeholder?: string;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the label onscreen or hide it. Refer to the\n * `labelText` property for more information. */\n showLabel?: boolean;\n /** Whether or not to display the \"(Required)\" text in the label text.\n * True by default. */\n showRequiredLabel?: boolean;\n /** The amount to increase or decrease when using the number type. */\n step?: number;\n /** FOR INTERNAL DS USE ONLY: the input variant to display. */\n textInputType?: TextInputVariants;\n /** HTML Input types as defined by MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input */\n type?: TextInputTypes;\n /** Populates the value of the input/textarea elements */\n value?: string;\n}\n\n/**\n * The type used for `ref`s. We want to extend both `input` and `textarea`\n * since both are available to create through `TextInput`.\n */\nexport type TextInputRefType = HTMLInputElement & HTMLTextAreaElement;\n\n/**\n * Renders either an `input` element with a specified type or a `textarea`\n * element. All types will render an accessible `Label` component and an\n * optional `HelperErrorText` component.\n */\nexport const TextInput = chakra(\n React.forwardRef<TextInputRefType, InputProps>(\n (props, ref: React.Ref<TextInputRefType>) => {\n const {\n className,\n defaultValue,\n helperText,\n id,\n invalidText,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n max,\n maxLength,\n min,\n name,\n onChange,\n onClick,\n onFocus,\n placeholder,\n showHelperInvalidText = true,\n showLabel = true,\n showRequiredLabel = true,\n step = 1,\n textInputType = \"default\",\n type = \"text\",\n value,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"TextInput\", {\n variant: textInputType,\n });\n const isTextArea = type === \"textarea\";\n const isHidden = type === \"hidden\";\n const finalInvalidText = invalidText\n ? invalidText\n : \"There is an error related to this field.\";\n let footnote: HelperErrorTextType = isInvalid\n ? finalInvalidText\n : helperText;\n const ariaAttributes = getAriaAttrs({\n footnote,\n id,\n labelText,\n name: \"TextInput\",\n showLabel,\n });\n let finalIsInvalid = isInvalid;\n let fieldOutput;\n let options;\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir TextInput: This component's required `id` prop was not passed.\"\n );\n }\n\n if (type === \"number\" && max && min && min > max) {\n finalIsInvalid = true;\n console.warn(\n \"NYPL Reservoir TextInput: The `min` prop is greater than the `max` prop.\"\n );\n }\n\n if (type === \"tel\" || type === \"url\" || type === \"email\") {\n const example = TextInputFormats[type] || \"\";\n footnote = (\n <>\n Ex: {example}\n <br />\n {footnote}\n </>\n );\n }\n\n // When the type is \"hidden\", the input element needs fewer attributes.\n options = isHidden\n ? { id, \"aria-hidden\": isHidden, name, onChange, ref }\n : {\n \"aria-required\": isRequired,\n defaultValue,\n id,\n isDisabled,\n isRequired,\n isInvalid: finalIsInvalid,\n max,\n maxLength,\n min,\n name,\n onChange,\n onClick,\n onFocus,\n placeholder,\n ref,\n // The `step` attribute is useful for the number type.\n step: type === \"number\" ? step : null,\n ...ariaAttributes,\n ...rest,\n };\n // For `input` and `textarea`, all attributes are the same but `input`\n // also needs `type` and `value` to render correctly.\n if (!isTextArea) {\n options = { type, value, ...options } as any;\n fieldOutput = <ChakraInput {...options} __css={styles.input} />;\n } else {\n fieldOutput = (\n <ChakraTextarea {...options} __css={styles.textarea}>\n {value}\n </ChakraTextarea>\n );\n }\n\n return (\n <ComponentWrapper\n className={className}\n helperText={!finalIsInvalid ? footnote : helperText}\n id={id}\n invalidText={finalInvalidText}\n isInvalid={finalIsInvalid}\n showHelperInvalidText={showHelperInvalidText && !isHidden}\n __css={styles}\n {...rest}\n >\n {labelText && showLabel && !isHidden && (\n <Label\n htmlFor={id}\n id={`${id}-label`}\n isRequired={showRequiredLabel && isRequired}\n >\n {labelText}\n </Label>\n )}\n {fieldOutput}\n </ComponentWrapper>\n );\n }\n )\n);\n\nexport default TextInput;\n","import { chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport React, { useState, forwardRef } from \"react\";\nimport ReactDatePicker from \"react-datepicker\";\n\nimport Fieldset from \"../Fieldset/Fieldset\";\nimport { FormRow, FormField } from \"../Form/Form\";\nimport HelperErrorText, {\n HelperErrorTextType,\n} from \"../HelperErrorText/HelperErrorText\";\nimport TextInput, {\n InputProps,\n TextInputRefType,\n} from \"../TextInput/TextInput\";\n\ninterface ReactDatePickerAttrs {\n popperClassName: string;\n popperPlacement: string;\n popperModifiers: any[];\n minDate: Date | null;\n maxDate: Date | null;\n dateFormat: string;\n showMonthYearPicker?: boolean;\n showYearPicker?: boolean;\n yearItemNumber?: number;\n}\nexport type DatePickerTypes = \"full\" | \"month\" | \"year\";\n\n// The object shape for the DatePicker's start and end date state values.\nexport interface FullDateType {\n /** Date object that gets returned for the onChange\n * function only for date ranges. */\n endDate?: Date;\n /** Date object that gets returned for the onChange function. */\n startDate: Date;\n}\n\n// Used for the input fields' parent wrapper. Internal use only.\ninterface DateRangeRowProps {\n /** ID that other components can cross reference for accessibility purposes. */\n id: string;\n /** Whether to render a single date input or two for a range of two dates. */\n isDateRange?: boolean;\n}\n\n// Interface used by the `div` or `fieldset` parent wrapper element.\n// Internal use only.\ninterface DatePickerWrapperProps extends DateRangeRowProps {\n /** Additional className. */\n className?: string;\n /** Adds the 'required' property to the input element(s). */\n isRequired?: boolean;\n /** Passed to the `TextInput` component to render a label associated with an input field. */\n labelText: string;\n /** Offers the ability to show the label onscreen or hide it. */\n showLabel?: boolean;\n /** Whether or not to display the \"(Required)\" text in the label text.\n * True by default. */\n showRequiredLabel?: boolean;\n}\n\n// Interface used by the internal DS `TextInput` component as a custom\n// component for the ReactDatePicker plugin component. Internal use only.\ninterface CustomTextInputProps extends Partial<InputProps> {\n /** The ReactDatePicker plugin manipulates the ref value so we declare our\n * own for some cases. */\n dsRef?: React.Ref<TextInputRefType>;\n /** The ReactDatePicker plugin has its own `required` prop so we use this to\n * pass the value from the parent `DatePicker` component. */\n isRequired?: boolean;\n /** Event handler used by the ReactDatePicker plugin to open the popup calendar. */\n onClick?: (data: any) => any;\n /** Data value used by the ReactDatePicker plugin and the custom TextInput component. */\n value?: string;\n}\n\n// Main interface for the exported DS DatePicker component.\nexport interface DatePickerProps extends DatePickerWrapperProps {\n /** The date format to display. Defaults to \"yyyy-MM-dd\".\n * Must be in ISO-8601 format. */\n dateFormat?: string;\n /** DatePicker date types that can be rendered. */\n dateType?: DatePickerTypes;\n /** Populates the `HelperErrorText` component in this component. */\n helperText?: HelperErrorTextType;\n /** Populates the `HelperErrorText` component in the \"From\" `TextInput` component. */\n helperTextFrom?: string;\n /** Populates the `HelperErrorText` component in the \"To\" `TextInput` component. */\n helperTextTo?: string;\n /** The initial date value. This must be in the mm/dd/yyyy format. */\n initialDate?: string;\n /** The initialTo date value used for date ranges.\n * This must be in the mm/dd/yyyy format. */\n initialDateTo?: string;\n /** Populates the `HelperErrorText` error state for both \"From\"\n * and \"To\" input components. */\n invalidText?: HelperErrorTextType;\n /** Adds the 'disabled' property to the input element(s). */\n isDisabled?: boolean;\n /** Adds 'isInvalid' styling. */\n isInvalid?: boolean;\n /** Adds the 'required' property to the input element(s). */\n isRequired?: boolean;\n /** The maximum date value that applies to both input fields.\n * This must be in the mm/dd/yyyy format. */\n maxDate?: string;\n /** The minimum date value that applies to both input fields.\n * This must be in the mm/dd/yyyy format. */\n minDate?: string;\n /** Value name for the single input field or the \"From\" input field in a date range. */\n nameFrom?: string;\n /** Value name for the \"To\" input field */\n nameTo?: string;\n /** The action to perform on the `input`'s onChange function for both fields.\n * This will return the data in an object with `startDate` and `endDate` keys.\n */\n onChange?: (data: FullDateType) => void;\n /** An additional explicit React ref passed for a date range's \"To\"\n * input field. Note that the \"From\" input takes the initial \"ref\" value. */\n refTo?: React.Ref<TextInputRefType>;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n}\n\n/**\n * A Design System `TextInput` component that is used as the custom input\n * element for the `react-datepicker` plugin. This uses `forwardRef` because,\n * internally, the `react-datepicker` plugin needs to keep track of the input data.\n * @note This is only used internally for this file.\n * @note we don't declare an `onClick` prop but the `react-datepicker` plugin\n * takes care of that. That is used and needed to open/close the popup calendar.\n */\nconst CustomTextInput = forwardRef<TextInputRefType, CustomTextInputProps>(\n (\n {\n dsRef,\n helperText,\n id,\n invalidText,\n isDisabled,\n isInvalid,\n isRequired,\n labelText,\n name,\n onChange,\n onClick,\n showLabel,\n showHelperInvalidText,\n showRequiredLabel,\n value,\n ...rest\n },\n ref: React.Ref<TextInputRefType>\n ) => {\n // The `react-datepicker` passes `disabled=false` to its custom\n // input element. We don't need it, so remove it.\n delete (rest as any).disabled;\n\n return (\n <TextInput\n helperText={helperText}\n id={id}\n invalidText={invalidText}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n labelText={labelText}\n name={name}\n onChange={onChange}\n onClick={onClick}\n showHelperInvalidText={showHelperInvalidText}\n showLabel={showLabel}\n showRequiredLabel={showRequiredLabel}\n value={value}\n // Use either the specific prop-based or the `forwardRef` value.\n // `react-datepicker` manipulates the `ref` value so when we\n // want a specific ref, use the `dsRef` prop.\n ref={dsRef || ref}\n {...rest}\n />\n );\n }\n);\n\n/**\n * This is the wrapper component that is rendered as the parent for the input\n * element(s). For a single date input field, we need to render a \"div\", while\n * for a date range we render a \"fieldset\".\n * @note This is only used internally for this file.\n */\nconst DatePickerWrapper: React.FC<DatePickerWrapperProps> = chakra(\n ({\n children,\n className,\n id,\n isDateRange,\n isRequired,\n labelText,\n showLabel,\n showRequiredLabel,\n ...rest\n }) => (\n <FormField id={`${id}-form-field`} {...rest}>\n {isDateRange ? (\n <Fieldset\n className={className}\n id={id}\n isLegendHidden={!showLabel}\n isRequired={isRequired}\n legendText={labelText}\n showRequiredLabel={showRequiredLabel}\n >\n {children}\n </Fieldset>\n ) : (\n children\n )}\n </FormField>\n ),\n { shouldForwardProp: () => true }\n);\n\n/**\n * This is the wrapper component that conditionally renders the input fields\n * in a `FormRow` only for date range options. This is used for a better visual\n * layout for the two side-by-side date input fields.\n * @note This is only used internally for this file.\n */\nconst DateRangeRow: React.FC<DateRangeRowProps> = ({\n id,\n isDateRange,\n children,\n}) =>\n isDateRange ? (\n <FormRow id={`${id}-form-row`} gap=\"grid.xs\">\n {children}\n </FormRow>\n ) : (\n <>{children}</>\n );\n\n/**\n * Returns a single date input field or two date input fields for a date range.\n */\nexport const DatePicker = chakra(\n React.forwardRef<TextInputRefType, DatePickerProps>((props, ref?) => {\n const {\n className,\n dateFormat = \"yyyy-MM-dd\",\n dateType = \"full\",\n helperText,\n helperTextFrom,\n helperTextTo,\n id,\n initialDate,\n initialDateTo,\n invalidText,\n isDateRange = false,\n isDisabled,\n isInvalid,\n isRequired,\n labelText = \"From\",\n maxDate,\n minDate,\n nameFrom,\n nameTo,\n onChange,\n refTo,\n showHelperInvalidText = true,\n showLabel = true,\n showRequiredLabel = true,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"DatePicker\", {});\n const finalStyles = isDateRange ? styles : {};\n const initStartDate = initialDate ? new Date(initialDate) : new Date();\n const initEndDate = initialDateTo ? new Date(initialDateTo) : new Date();\n let initFullDate: FullDateType = { startDate: initStartDate };\n // Only include the `endDate` key for date ranges.\n if (isDateRange) {\n initFullDate = { ...initFullDate, endDate: initEndDate };\n }\n const [fullDate, setFullDate] = useState<FullDateType>(initFullDate);\n // This updates the internal state for the start and end date values,\n // and also calls the `onChange` prop if it was passed to return the\n // date value to the parent.\n const onChangeDefault = (date: Date, value: string) => {\n setFullDate({ ...fullDate, [value]: date });\n onChange && onChange({ ...fullDate, [value]: date });\n };\n // How many years to display in the \"year\" option.\n const yearsToDisplay = 12;\n // Both `ReactDatePicker` components share some props.\n let baseDatePickerAttrs: ReactDatePickerAttrs = {\n popperClassName: \"date-picker-calendar\",\n popperPlacement: \"bottom-start\",\n popperModifiers: [\n {\n name: \"offset\",\n options: {\n offset: [0, -8],\n },\n },\n ],\n minDate: minDate ? new Date(minDate) : null,\n maxDate: maxDate ? new Date(maxDate) : null,\n dateFormat,\n };\n // Both custom `TextInput` components share some props.\n let baseCustomTextInputAttrs = {\n isRequired,\n // In the date range type, don't display the \"(Required)\" text in\n // individual input labels. It'll display in the legend element.\n showRequiredLabel: isDateRange ? false : showRequiredLabel,\n // Always display the labels for the input fields when\n // the DatePicker component is a date range type.\n showLabel: isDateRange ? true : showLabel,\n isDisabled,\n isInvalid,\n helperText: isDateRange ? helperTextFrom : helperText,\n showHelperInvalidText,\n invalidText,\n __css: finalStyles.subLabels,\n };\n // These are attribute objects for the `react-datepicker` package component.\n let startDatePickerAttrs = {};\n let endDatePickerAttrs = {};\n // This sets set only for date ranges for the \"To\" input field.\n let endDatePickerElement = null;\n // This changes to \"From\" when `isDateRange` is true.\n let startLabelText = labelText;\n\n // Update the appropriate props for the selected date type to render.\n if (dateType === \"month\") {\n baseDatePickerAttrs[\"showMonthYearPicker\"] = true;\n baseDatePickerAttrs.dateFormat = \"MM-yyyy\";\n } else if (dateType === \"year\") {\n baseDatePickerAttrs[\"showYearPicker\"] = true;\n baseDatePickerAttrs[\"yearItemNumber\"] = yearsToDisplay;\n baseDatePickerAttrs.dateFormat = \"yyyy\";\n }\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir DatePicker: This component's required `id` prop was not passed.\"\n );\n }\n\n if ((ref && !nameFrom) || (refTo && !nameTo)) {\n console.warn(\n \"NYPL Reservoir DatePicker: A `ref` or `refTo` prop was passed but \" +\n \"not the equivalent `nameFrom` or `nameTo` prop.\"\n );\n }\n if (onChange && (ref || refTo || nameFrom || nameTo)) {\n console.warn(\n \"NYPL Reservoir DatePicker: A `ref`, `refTo`, `nameFrom`, or `nameTo` \" +\n \"prop was passed and an `onChange` prop as well. Use whichever is best \" +\n \"for your app but not both.\"\n );\n }\n\n // Set the \"From\" DatePicker values here based on the base props. If a date\n // range is selected, additional props get added automatically.\n startDatePickerAttrs = { ...baseDatePickerAttrs };\n\n // A date range is selected. We must now update the props for the\n // \"start\"/\"from\" input component and render an \"end\"/\"To\" input component.\n if (isDateRange) {\n const endCustomTextInputAttrs = {\n ...baseCustomTextInputAttrs,\n helperText: helperTextTo,\n };\n // These props are used to follow the pattern recommended by\n // the react-datepicker plugin.\n startDatePickerAttrs = {\n ...startDatePickerAttrs,\n selectsStart: true,\n startDate: fullDate.startDate,\n endDate: fullDate.endDate,\n };\n endDatePickerAttrs = {\n ...baseDatePickerAttrs,\n selectsEnd: true,\n minDate: fullDate.startDate,\n startDate: fullDate.startDate,\n endDate: fullDate.endDate,\n };\n startLabelText = \"From\";\n endDatePickerElement = (\n <ReactDatePicker\n customInput={\n <CustomTextInput\n dsRef={refTo}\n labelText=\"To\"\n {...endCustomTextInputAttrs}\n />\n }\n id={`${id}-end`}\n name={nameTo}\n onChange={(date: Date) => onChangeDefault(date, \"endDate\")}\n selected={fullDate.endDate}\n {...endDatePickerAttrs}\n />\n );\n }\n const startDatePickerElement = (\n <ReactDatePicker\n customInput={\n <CustomTextInput\n dsRef={ref}\n labelText={startLabelText}\n {...baseCustomTextInputAttrs}\n />\n }\n id={`${id}-start`}\n name={nameFrom}\n onChange={(date: Date) => onChangeDefault(date, \"startDate\")}\n selected={fullDate.startDate}\n {...startDatePickerAttrs}\n />\n );\n\n return (\n <DatePickerWrapper\n id={id}\n isDateRange={isDateRange}\n showLabel={showLabel}\n labelText={labelText}\n className={className}\n isRequired={isRequired}\n showRequiredLabel={showRequiredLabel}\n {...rest}\n >\n <DateRangeRow id={id} isDateRange={isDateRange}>\n <FormField id={`${id}-start-form`}>\n {startDatePickerElement}\n </FormField>\n\n {endDatePickerElement && (\n <FormField id={`${id}-end-form`}>{endDatePickerElement}</FormField>\n )}\n </DateRangeRow>\n {helperText && isDateRange && showHelperInvalidText && (\n <HelperErrorText\n id={`${id}-helper-text`}\n isInvalid={false}\n text={helperText}\n />\n )}\n </DatePickerWrapper>\n );\n }),\n { shouldForwardProp: () => true }\n);\n\nexport default DatePicker;\n","/**\n * These objects are also SCSS mixins but are now JS objects in the\n * context of css-in-js and the custom NYPL-theme.\n */\nconst screenreaderOnly = {\n clip: \"rect(1px, 1px, 1px, 1px)\",\n height: \"1px\",\n overflow: \"hidden\",\n position: \"absolute !important\",\n width: \"1px\",\n wordWrap: \"normal\",\n};\nconst wrapperStyles = {\n marginY: \"0\",\n marginX: \"auto\",\n maxWidth: \"1280px\",\n paddingTop: \"0\",\n paddingBottom: \"0\",\n paddingRight: \"0\",\n paddingLeft: \"0\",\n width: \"100%\",\n};\n\nexport { screenreaderOnly, wrapperStyles };\n","/** Export \"mixin\" styles. */\nexport { screenreaderOnly, wrapperStyles } from \"./globalMixins\";\n\n/** Reusable component styles. */\n\n// Used in `Select` and `TextInput`.\nconst activeFocus = (darkMode = false) => ({\n boxShadow: \"none\",\n outline: \"2px solid\",\n outlineOffset: \"2px\",\n outlineColor: darkMode ? \"ui.white\" : \"ui.focus\",\n zIndex: \"9999\",\n});\n// Used in `Checkbox` and `Radio`.\nconst checkboxRadioLabelStyles = {\n userSelect: \"none\",\n fontWeight: \"text.default\",\n marginBottom: \"0\",\n marginLeft: \"xs\",\n width: \"100%\",\n _disabled: {\n color: \"ui.gray.dark\",\n opacity: 1,\n fontStyle: \"italic\",\n },\n _invalid: {\n color: \"ui.error.primary\",\n },\n};\n// Custom values not in the spacing theme.\n// Used in `Checkbox` and `Radio`.\nconst checkboxRadioControlSize = {\n h: \"1.375rem\",\n w: \"1.375rem\",\n};\n// Used in `Checkbox` and `Radio`.\nconst checkboxRadioHelperErrorTextStyle = {\n marginLeft: \"30px\", // calc(22px + var(--nypl-space-xs))\n _disabled: {\n color: \"ui.gray.dark\",\n fontStyle: \"italic\",\n },\n};\nconst checkboxRadioGroupStyles = (isFullWidth = false) => ({\n helperErrorText: {\n marginTop: \"xs\",\n },\n label: {\n width: isFullWidth ? \"100%\" : \"fit-content\",\n },\n});\n// Default sizes used throughout the codebase.\nconst defaultElementSizes = {\n mobileFieldHeight: \"44px\",\n};\n// Used in `Label` and `Fieldset`.\nconst labelLegendText = {\n display: \"inline-block\",\n fontSize: \"label.default\",\n fontWeight: \"label.default\",\n marginBottom: \"xs\",\n width: \"100%\",\n span: {\n fontWeight: \"regular\",\n },\n};\n// Used for the disabled state of Select and TextInput\nconst selectTextInputDisabledStyles = {\n bg: \"ui.disabled.secondary\",\n borderColor: \"ui.disabled.primary\",\n color: \"ui.gray.dark\",\n opacity: \"1\",\n};\n// Used for the focus state of Select and TextInput\nconst selectTextInputFocusStyles = {\n ...activeFocus(),\n borderColor: \"ui.focus\",\n};\n// Used for p, ul, and ol\nconst textMargin = {\n margin: \"0\",\n marginBottom: \"s\",\n};\n\nexport {\n activeFocus,\n checkboxRadioControlSize,\n checkboxRadioGroupStyles,\n checkboxRadioHelperErrorTextStyle,\n checkboxRadioLabelStyles,\n defaultElementSizes,\n labelLegendText,\n selectTextInputDisabledStyles,\n selectTextInputFocusStyles,\n textMargin,\n};\n","import { activeFocus } from \"../components/global\";\nimport { textMargin } from \"../components/global\";\n\n/**\n * These rules affect all the global elements on the `body` element of the\n * page when the `DSProvider` component is used.\n */\nconst global = {\n // styles for the `body` element\n body: {\n boxSizing: \"border-box\",\n bg: \"ui.white\",\n color: \"ui.black\",\n fontFamily: \"body\",\n fontSize: \"text.default\",\n fontWeight: \"text.default\",\n lineHeight: \"1.5\",\n overflowX: \"hidden\",\n },\n // styles for the `a` element\n a: {\n color: \"ui.link.primary\",\n },\n svg: {\n display: \"inline\",\n },\n \"button, select, input, textarea\": {\n \"&:not([disabled])\": {\n _focus: activeFocus(),\n },\n },\n \"iframe, [href], [tabindex], [contentEditable='true']\": {\n _focus: activeFocus(),\n },\n p: textMargin,\n ul: textMargin,\n ol: textMargin,\n \"*, *::before, &::after\": {\n boxSizing: \"inherit\",\n },\n};\n\nexport default global;\n","import { createBreakpoints } from \"@chakra-ui/theme-tools\";\n\n/**\n * Breakpoints from \"src/styles/base/_01-breakpoints.scss\"\n * How to use Chakra responsive styles: https://chakra-ui.com/docs/features/responsive-styles\n *\n * Chakra Value | DS Variable | EM/PX value\n * ------------------------------------------------------\n * sm | --nypl-breakpoint-small | 20em/320px\n * md | --nypl-breakpoint-medium | 38em/600px\n * lg | --nypl-breakpoint-large | 60em/960px\n * xl | --nypl-breakpoint-xl | 80em/1280px\n * 2xl | N/A | 96em/1536px\n *\n * @Note Chakra provides a 2xl option while the DS does not. We don't\n * recommend using this value until further notice.\n */\nexport default createBreakpoints({\n sm: \"20em\",\n md: \"38em\",\n lg: \"60em\",\n xl: \"80em\",\n \"2xl\": \"96em\",\n});\n","import { Colors } from \"@chakra-ui/react\";\n\n/**\n * All colors can be found in Storybook:\n * https://nypl.github.io/nypl-design-system/reservoir/v1/?path=/docs/style-guide-colors--page\n *\n * All UI colors can be found in Figma:\n * https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Main?node-id=47083%3A27674\n *\n * All Brand colors can be found in Figma:\n * https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Main?node-id=15454%3A47007\n *\n * At the end of this file, there are objects that extend Chakra's default\n * color shade palette for individual colors. WE DO NOT RECOMMEND to use them\n * and only recommend to use the colors defined by the Design System such as the\n * following \"ui\", \"brand\", and \"section\" colors below.\n */\n\n// Reusable variables:\nconst grayLightCool = \"#E9E9E9\";\nconst grayxxLightCool = \"#FAFAFA\";\nconst grayMedium = \"#BDBDBD\";\nconst brandPrimary = \"#C60917\";\nconst brandSecondary = \"#760000\";\nconst brandObj = {\n primary: brandPrimary,\n secondary: brandSecondary,\n};\n\nconst colors: Colors = {\n transparent: \"transparent\",\n\n // ui fills\n ui: {\n black: \"#000\",\n white: \"#fff\",\n /// State and link utilities\n disabled: {\n primary: grayLightCool,\n secondary: grayxxLightCool,\n },\n error: {\n primary: \"#97272C\",\n secondary: \"#6F0106\",\n },\n focus: \"#4181F1\",\n link: {\n primary: \"#0576D3\",\n secondary: \"#004B98\",\n },\n status: {\n primary: \"#F9E08E\",\n secondary: \"#FBE7E1\",\n },\n success: {\n primary: \"#077719\",\n secondary: \"#095212\",\n },\n test: \"#FF6347\",\n warning: {\n primary: \"#F0974E\",\n secondary: \"#EC7B1F\",\n },\n // Grayscale\n gray: {\n \"xx-dark\": \"#212121\",\n \"x-dark\": \"#424242\",\n xdark: \"#424242\", // this should be deprecated in lieu of the `x-dark` object above\n dark: \"#616161\",\n medium: grayMedium,\n \"light-cool\": grayLightCool,\n \"light-warm\": \"#EFEDEB\",\n \"x-light-cool\": \"#F5F5F5\",\n \"x-light-warm\": \"#F8F8F7\",\n \"xx-light-cool\": grayxxLightCool,\n },\n },\n\n /** Brand fills are the NYPL primary and secondary colors. */\n brand: brandObj,\n\n /** Brand fills for sections on NYPL pages. */\n section: {\n /** Blogs is used for the Blogs section. */\n blogs: {\n primary: grayLightCool,\n secondary: grayMedium,\n },\n\n /** Books and More is used for the Catalog, Staff Picks, Recommendations,\n * New Arrivals, and E-Book Central. */\n \"books-and-more\": brandObj,\n\n /** Education is used for the Education section front and associated\n * sub-sections. */\n education: {\n primary: \"#1D62E6\",\n secondary: \"#2540A4\",\n },\n\n /** Locations is used for Location Finder and all branch pages with\n * the exceptions of some research libraries. */\n locations: brandObj,\n\n /** Research is used for the Research Catalog and SCC. */\n research: {\n primary: \"#00838a\",\n secondary: \"#006166\",\n },\n\n /** Research libraries with specific brand colors to adhere to. */\n \"research-library\": {\n lpa: \"#005d53\",\n schomburg: \"#a03e31\",\n schwartzman: brandSecondary,\n },\n\n /** What's On is used for Exhibitions & Events. */\n \"whats-on\": {\n primary: \"#242424\",\n secondary: \"#000000\",\n },\n },\n\n /**\n * The following color scales are useful for color edge cases where a\n * distinct named ui or brand color doesn't quite work. These are used by\n * Chakra and have been generated through https://themera.vercel.app/.\n * While these colors are available, WE DO NOT RECOMMEND using them. Stick\n * with the utility colors declared above.\n * @Note If you do need to use a color variant, please contant the DS team.\n */\n\n /** based on ui.gray.medium = #DBDBDB */\n gray: {\n 50: \"#F2F2F2\",\n 100: \"#DBDBDB\",\n 200: \"#C4C4C4\",\n 300: \"#ADADAD\",\n 400: \"#969696\",\n 500: \"#808080\",\n 600: \"#666666\",\n 700: \"#4D4D4D\",\n 800: \"#333333\",\n 900: \"#1A1A1A\",\n },\n /** based on ui.brand.primary = #C60917 */\n red: {\n 50: \"#FEE7E8\",\n 100: \"#FCBBC0\",\n 200: \"#FA8F97\",\n 300: \"#F8636E\",\n 400: \"#F63745\",\n 500: \"#F40B1C\",\n 600: \"#C30917\",\n 700: \"#920711\",\n 800: \"#62040B\",\n 900: \"#310206\",\n },\n /** based on ui.warning.secondary = #F0974E */\n orange: {\n 50: \"#FDF1E7\",\n 100: \"#F9D8BD\",\n 200: \"#F6BF93\",\n 300: \"#F2A769\",\n 400: \"#EF8E3E\",\n 500: \"#EB7514\",\n 600: \"#BC5E10\",\n 700: \"#8D460C\",\n 800: \"#5E2F08\",\n 900: \"#2F1704\",\n },\n /** based on ui.status.primary = #F9E08E */\n yellow: {\n 50: \"#FEF8E7\",\n 100: \"#FBECBB\",\n 200: \"#F9E090\",\n 300: \"#F7D464\",\n 400: \"#F4C938\",\n 500: \"#F2BD0D\",\n 600: \"#C2970A\",\n 700: \"#917108\",\n 800: \"#614B05\",\n 900: \"#302603\",\n },\n /** based on ui.success.primary = #077719 */\n green: {\n 50: \"#E7FEEB\",\n 100: \"#BCFBC6\",\n 200: \"#90F8A1\",\n 300: \"#65F67C\",\n 400: \"#3AF357\",\n 500: \"#0EF133\",\n 600: \"#0BC128\",\n 700: \"#08911E\",\n 800: \"#066014\",\n 900: \"#03300A\",\n },\n /** based on ui.link.primary = #0576D3 */\n blue: {\n 50: \"#E6F3FE\",\n 100: \"#B9DFFD\",\n 200: \"#8CCAFC\",\n 300: \"#60B5FB\",\n 400: \"#33A0FA\",\n 500: \"#068BF9\",\n 600: \"#056FC7\",\n 700: \"#045495\",\n 800: \"#023864\",\n 900: \"#011C32\",\n },\n};\n\nexport default colors;\n","const radii = {\n checkbox: \"3px\",\n pill: \"20px\",\n round: \"100%\",\n};\n\nexport default radii;\n","const shadows = {\n outline: \"none\",\n};\n\nexport default shadows;\n","import { Dict } from \"../types\";\n\ntype Typography = {\n fonts: Dict;\n fontSizes: Dict;\n fontWeights: Dict;\n};\n\nconst fontSizeValues = {\n \"-3\": \"0.625rem\",\n \"-2\": \"0.75rem\",\n \"-1\": \"0.875rem\",\n \"0\": \"1rem\",\n \"1\": \"1.125rem\",\n \"2\": \"1.375rem\",\n \"3\": \"1.75rem\",\n \"4\": \"2.25rem\",\n};\n\nconst fontWeightValues = {\n light: 300,\n regular: 400,\n medium: 500,\n bold: 700,\n};\n\nconst typography: Typography = {\n // Values from \"src/styles/02-typography/_typeface.css\"\n fonts: {\n body: \"-apple-system, BlinkMacSystemFont, system-ui, sans-serif\",\n heading: \"-apple-system, BlinkMacSystemFont, system-ui, sans-serif\",\n },\n // Values from \"src/styles/02-typography/_type-scale.css\"\n fontSizes: {\n // generic tokens\n \"-3\": fontSizeValues[\"-3\"],\n \"-2\": fontSizeValues[\"-2\"],\n \"-1\": fontSizeValues[\"-1\"],\n \"0\": fontSizeValues[\"0\"],\n \"1\": fontSizeValues[\"1\"],\n \"2\": fontSizeValues[\"2\"],\n \"3\": fontSizeValues[\"3\"],\n \"4\": fontSizeValues[\"4\"],\n // semantic tokens\n breadcrumbs: {\n default: fontSizeValues[\"-1\"],\n },\n button: {\n default: fontSizeValues[\"-1\"],\n },\n heading: {\n primary: fontSizeValues[\"4\"],\n secondary: fontSizeValues[\"3\"],\n tertiary: fontSizeValues[\"2\"],\n callout: fontSizeValues[\"1\"],\n },\n helper: {\n default: fontSizeValues[\"-2\"],\n },\n label: {\n default: fontSizeValues[\"-1\"],\n secondary: fontSizeValues[\"-2\"],\n },\n text: {\n default: fontSizeValues[\"0\"],\n caption: fontSizeValues[\"-1\"],\n tag: fontSizeValues[\"-2\"],\n mini: fontSizeValues[\"-3\"],\n },\n },\n // Values from \"src/styles/02-typography/_type-weight.css\"\n fontWeights: {\n // generic tokens\n light: fontWeightValues[\"light\"],\n regular: fontWeightValues[\"regular\"],\n medium: fontWeightValues[\"medium\"],\n bold: fontWeightValues[\"bold\"],\n // semantic tokens\n breadcrumbs: {\n default: fontWeightValues[\"regular\"],\n lastChild: fontWeightValues[\"bold\"],\n },\n button: {\n default: fontWeightValues[\"regular\"],\n },\n heading: {\n primary: fontWeightValues[\"light\"],\n secondary: fontWeightValues[\"medium\"],\n tertiary: fontWeightValues[\"medium\"],\n callout: fontWeightValues[\"medium\"],\n },\n helper: {\n default: fontWeightValues[\"light\"],\n },\n label: {\n default: fontWeightValues[\"medium\"],\n secondary: fontWeightValues[\"regular\"],\n },\n text: {\n default: fontWeightValues[\"light\"],\n caption: fontWeightValues[\"light\"],\n tag: fontWeightValues[\"regular\"],\n mini: fontWeightValues[\"regular\"],\n },\n },\n};\n\nexport default typography;\n","const containerStyles = {\n border: \"none\",\n width: \"100%\",\n};\nconst buttonStyles = {\n borderWidth: \"1px\",\n fontWeight: \"medium\",\n};\nconst panelStyles = {\n padding: \"s\",\n borderLeftWidth: \"1px\",\n borderRightWidth: \"1px\",\n borderBottomWidth: \"1px\",\n};\n\nconst Accordion = {\n parts: [\"container\", \"button\", \"panel\"],\n baseStyle: {\n container: containerStyles,\n button: buttonStyles,\n panel: panelStyles,\n },\n};\n\nexport default Accordion;\n","// Variant styling\nconst blogs = {\n bg: \"section.blogs.secondary\",\n color: \"ui.black\",\n a: {\n _hover: {\n color: \"ui.gray.x-dark\",\n },\n },\n svg: {\n fill: \"ui.black\",\n },\n};\nconst booksAndMore = {\n bg: \"section.books-and-more.secondary\",\n};\nconst education = {\n bg: \"section.education.secondary\",\n};\nconst locations = {\n bg: \"section.locations.primary\",\n};\nconst research = {\n bg: \"section.research.secondary\",\n};\nconst whatsOn = {\n bg: \"section.whats-on.secondary\",\n};\n\nconst Breadcrumb = {\n baseStyle: {\n bg: \"ui.black\",\n color: \"ui.white\",\n fontSize: \"breadcrumbs.default\",\n fontWeight: \"breadcrumbs.default\",\n paddingBottom: \"xs\",\n paddingTop: \"xs\",\n ol: {\n alignItems: { base: \"center\", md: \"unset\" },\n display: { base: \"flex\", md: \"block\" },\n margin: \"auto\",\n maxWidth: \"1280px\",\n paddingLeft: \"s\",\n paddingRight: \"s\",\n },\n a: {\n _hover: {\n color: \"ui.gray.light-cool\",\n },\n },\n \"li:last-child\": {\n fontWeight: { base: \"breadcrumbs.default\", md: \"breadcrumbs.lastChild\" },\n \".chakra-breadcrumb__link\": {\n _hover: {\n cursor: \"default\",\n textDecoration: \"none\",\n },\n },\n \".icon\": {\n display: \"none\",\n },\n },\n \"li:not(:last-child)\": {\n display: { base: \"none\", md: \"inline-block\" },\n a: {\n marginRight: { base: \"xs\", md: \"0\" },\n },\n \".icon\": {\n display: { base: \"inline\", md: \"none\" },\n },\n \"span:not(.breadcrumb-label)\": {\n marginInlineEnd: \"xxs\",\n marginInlineStart: \"xxs\",\n },\n },\n \"li:nth-last-of-type(2)\": {\n display: \"inline-block\",\n span: {\n display: { base: \"none\", md: \"inline\" },\n },\n },\n },\n // Available variants:\n variants: {\n blogs,\n booksAndMore,\n education,\n locations,\n research,\n whatsOn,\n },\n};\n\nexport default Breadcrumb;\n","import { defaultElementSizes } from \"./global\";\n\n// Style object for base or default style\nconst baseStyle = {\n alignItems: \"center\",\n borderRadius: \"sm\",\n display: \"flex\",\n cursor: \"pointer\",\n color: \"ui.white\",\n height: \"10\",\n justifyContent: \"center\",\n lineHeight: \"1.5\",\n maxHeight: \"2.5rem\",\n minHeight: { base: defaultElementSizes.mobileFieldHeight, md: \"auto\" },\n py: \"inset.narrow\",\n px: \"inset.default\",\n textDecoration: \"none\",\n wordWrap: \"normal\",\n fontWeight: \"button.default\",\n svg: {\n fill: \"currentColor\",\n },\n _hover: {\n bg: \"ui.link.secondary\",\n },\n _visited: {\n color: \"ui.white\",\n },\n _disabled: {\n bg: \"ui.gray.light-cool\",\n color: \"ui.gray.dark\",\n pointerEvents: \"none\",\n opacity: \"1\",\n },\n};\n// Styles for different visual variants:\n// primary, secondary, link, pill, iconOnly, callout, searchbar, noBrand\nconst primary = {\n bg: \"ui.link.primary\",\n minWidth: \"none\",\n height: \"none\",\n fontSize: \"button.default\",\n};\nconst secondary = {\n bg: \"ui.white\",\n border: \"1px solid\",\n borderColor: \"ui.gray.light-cool\",\n color: \"inherit\",\n fontSize: \"button.default\",\n _hover: {\n bg: \"ui.gray.xx-light-cool\",\n borderColor: \"ui.gray.medium\",\n },\n _disabled: {\n bg: \"ui.gray.x-light-cool\",\n },\n};\nconst link = {\n bg: \"transparent\",\n lineHeight: \"2.5\",\n color: \"ui.link.primary\",\n textDecoration: \"underline\",\n _disabled: {\n bg: \"transparent\",\n },\n _hover: {\n bg: \"transparent\",\n color: \"ui.link.secondary\",\n },\n};\nconst pill = {\n bg: \"ui.white\",\n border: \"1px solid\",\n borderColor: \"ui.gray.light-cool\",\n color: \"inherit\",\n borderRadius: \"pill\",\n py: \"inset.narrow\",\n px: \"inset.wide\",\n fontSize: \"button.default\",\n _hover: {\n bg: \"ui.gray.xx-light-cool\",\n borderColor: \"ui.gray.medium\",\n },\n _disabled: {\n bg: \"ui.gray.x-light-cool\",\n },\n};\nconst iconOnly = {\n bg: \"ui.white\",\n border: \"1px solid\",\n borderColor: \"ui.gray.light-cool\",\n color: \"inherit\",\n _hover: {\n bg: \"ui.gray.xx-light-cool\",\n borderColor: \"ui.gray.medium\",\n },\n paddingInlineStart: \"inset.narrow\",\n paddingInlineEnd: \"inset.narrow\",\n};\nconst callout = {\n bg: \"brand.primary\",\n fontSize: \"button.default\",\n _hover: {\n bg: \"brand.secondary\",\n },\n _active: {\n bg: \"brand.secondary\",\n },\n};\nconst noBrand = {\n ...primary,\n bg: \"ui.black\",\n color: \"ui.white\",\n _hover: {\n bg: \"ui.gray.x-dark\",\n },\n};\n\nconst Button = {\n baseStyle,\n // Available variants:\n variants: {\n primary,\n secondary,\n link,\n pill,\n iconOnly,\n callout,\n noBrand,\n },\n // Default values\n defaultProps: {\n variant: \"primary\",\n },\n};\n\nexport default Button;\n","const ButtonGroup = {\n baseStyle: ({ buttonWidth }) => ({\n width: buttonWidth === \"default\" ? \"fit-content\" : \"100%\",\n button: {\n flexGrow: buttonWidth === \"default\" ? undefined : \"1\",\n },\n }),\n};\n\nexport default ButtonGroup;\n","interface CardBaseStyleProps {\n hasImage: boolean;\n imageIsAtEnd: boolean;\n isAlignedRightActions: boolean;\n isBordered: boolean;\n isCentered: boolean;\n layout: string;\n mainActionLink: boolean;\n}\ninterface BodyPaddingProps {\n hasImage: boolean;\n imageIsAtEnd: boolean;\n isBordered: boolean;\n isRow: boolean;\n}\ninterface CardImageBaseStyleProps {\n imageIsAtEnd: boolean;\n isCentered: boolean;\n size: keyof typeof imageSizes;\n layout: string;\n}\ninterface CardActionsBaseStyleProps {\n bottomBorder: boolean;\n isCentered: boolean;\n layout: string;\n topBorder: boolean;\n}\n\nconst imageSizes = {\n xxsmall: { flex: { base: \"0 0 100%\", md: \"0 0 64px\" }, width: \"100%\" },\n xsmall: { flex: { md: \"0 0 96px\" } },\n small: { flex: { md: \"0 0 165px\" } },\n medium: { flex: { md: \"0 0 225px\" } },\n large: { flex: { md: \"0 0 360px\" } },\n};\n// This is complicated and can be refactored later...\nconst getBodyPaddingStyles = ({\n hasImage,\n imageIsAtEnd,\n isBordered,\n isRow,\n}: BodyPaddingProps) => {\n let bodyPadding = null;\n if (isBordered) {\n bodyPadding = \"inset.default\";\n if (hasImage) {\n bodyPadding =\n \"0 var(--nypl-space-inset-default) var(--nypl-space-inset-default)\";\n }\n }\n if (isRow && isBordered) {\n bodyPadding = \"inset.default\";\n }\n if (isRow && isBordered && hasImage) {\n bodyPadding = {\n base: \"0 var(--nypl-space-inset-default) var(--nypl-space-inset-default)\",\n md: \"var(--nypl-space-inset-default) var(--nypl-space-inset-default) var(--nypl-space-inset-default) 0\",\n };\n if (imageIsAtEnd) {\n bodyPadding = {\n base: \"var(--nypl-space-inset-default) var(--nypl-space-inset-default) 0\",\n md: \"var(--nypl-space-inset-default) 0 var(--nypl-space-inset-default) var(--nypl-space-inset-default)\",\n };\n }\n }\n return bodyPadding;\n};\nconst Card = {\n parts: [\"actions\", \"body\", \"heading\"],\n baseStyle: ({\n hasImage,\n imageIsAtEnd,\n isAlignedRightActions,\n isBordered,\n isCentered,\n layout,\n mainActionLink,\n }: CardBaseStyleProps) => {\n const isRow = layout === \"row\";\n const layoutStyles = isRow\n ? {\n display: \"flex\",\n flexFlow: {\n base: \"column nowrap\",\n md: \"row\",\n },\n maxWidth: \"100%\",\n textAlign: \"left\",\n alignItems: isCentered ? \"center\" : null,\n }\n : {};\n const baseBorderStyles = isBordered\n ? {\n border: \"1px solid\",\n borderColor: \"ui.gray.medium\",\n }\n : {};\n const bodyPadding = getBodyPaddingStyles({\n isBordered,\n hasImage,\n imageIsAtEnd,\n isRow,\n });\n let bodyMargin = null;\n if (isCentered) {\n bodyMargin = \"auto\";\n if (isRow) {\n bodyMargin = \"0\";\n }\n }\n return {\n alignItems: \"flex-start\",\n display: \"flex\",\n flexFlow: \"column wrap\",\n textAlign: isCentered ? \"center\" : null,\n actions: {\n flexShrink: { base: isAlignedRightActions ? \"0\" : null, md: \"0\" },\n marginLeft: { base: \"0\", md: \"m\" },\n marginTop: { base: \"xs\", md: \"0\" },\n maxWidth: { base: \"100%\", md: \"180px\" },\n width: \"100%\",\n },\n body: {\n display: { md: \"block\" },\n flexBasis: { sm: isRow ? \"100%\" : null },\n flexFlow: { md: \"row nowrap\" },\n margin: bodyMargin,\n padding: bodyPadding,\n width: { base: \"100%\", md: \"auto\" },\n },\n heading: {\n marginBottom: \"xs\",\n a: mainActionLink ? { color: \"ui.black\" } : null,\n },\n ...baseBorderStyles,\n ...layoutStyles,\n };\n },\n};\n\nconst CardActions = {\n baseStyle: ({\n bottomBorder,\n isCentered,\n layout,\n topBorder,\n }: CardActionsBaseStyleProps) => {\n let justifyContent = null;\n // Only center in the column layout.\n if (layout === \"row\") {\n justifyContent = \"left\";\n } else if (isCentered) {\n justifyContent = \"center\";\n }\n\n const topBorderStyles = topBorder\n ? {\n borderTop: \"1px solid\",\n paddingTop: \"xs\",\n }\n : {};\n const bottomBorderStyles = bottomBorder\n ? {\n borderBottom: \"1px solid\",\n paddingBottom: \"xs\",\n }\n : {};\n return {\n marginBottom: \"xs\",\n columnGap: \"var(--nypl-space-xs)\",\n display: \"flex\",\n _last: {\n marginBottom: \"0\",\n },\n ...topBorderStyles,\n ...bottomBorderStyles,\n justifyContent,\n borderColor: \"ui.gray.medium\",\n };\n },\n};\n\nconst CardContent = {\n baseStyle: {\n marginBottom: \"xs\",\n _last: {\n marginBottom: \"0\",\n },\n },\n};\n\nconst CardImage = {\n baseStyle: ({\n imageIsAtEnd,\n isCentered,\n layout,\n size,\n }: CardImageBaseStyleProps) => {\n // These sizes are only for the \"row\" layout.\n const imageSize = size ? imageSizes[size] : {};\n const layoutStyles =\n layout === \"row\"\n ? {\n flex: { md: \"0 0 225px\" },\n maxWidth: { base: \"100%\", md: \"50%\" },\n textAlign: \"left\",\n alignItems: isCentered ? \"center\" : null,\n margin: {\n base: imageIsAtEnd ? \"var(--nypl-space-m) 0 0\" : null,\n md: imageIsAtEnd\n ? \"0 0 0 var(--nypl-space-m)\"\n : \"0 var(--nypl-space-m) 0 0\",\n },\n width: { base: \"100%\", md: null },\n marginBottom: [\"xs\", \"xs\"],\n ...imageSize,\n }\n : {\n marginBottom: \"xs\",\n width: \"100%\",\n };\n const imageIsAtEndStyles = imageIsAtEnd\n ? {\n marginBottom: \"0\",\n marginTop: \"s\",\n order: \"2\",\n }\n : {};\n\n return {\n ...imageIsAtEndStyles,\n ...layoutStyles,\n };\n },\n};\n\nexport default { Card, CardActions, CardContent, CardImage };\n","// @see https://github.com/chakra-ui/chakra-ui/blob/main/packages/theme/src/components/checkbox.ts\n// for available theme override options.\n\nimport {\n checkboxRadioLabelStyles,\n checkboxRadioControlSize,\n checkboxRadioHelperErrorTextStyle,\n} from \"./global\";\n\n// Style object for the Checkbox's visual icon.\nconst baseStyleIcon = {\n transitionProperty: \"transform\",\n transitionDuration: \"normal\",\n width: \"22px\",\n height: \"22px\",\n};\n\n// Style object for the Checkbox's \"control.\"\nconst baseStyleControl = {\n border: \"2px solid\",\n borderRadius: \"sm\",\n borderColor: \"ui.black\",\n backgroundColor: \"ui.white\",\n color: \"ui.black\",\n outline: \"none\",\n transitionProperty: \"box-shadow\",\n transitionDuration: \"normal\",\n\n _checked: {\n bg: \"ui.white\",\n borderColor: \"ui.focus\",\n color: \"ui.focus\",\n\n _hover: {\n bg: \"ui.white\",\n },\n\n _disabled: {\n bg: \"ui.white\",\n borderColor: \"ui.disabled.primary\",\n svg: {\n color: \"ui.disabled.primary\",\n },\n },\n\n _indeterminate: {\n color: \"ui.focus\",\n borderColor: \"ui.focus\",\n },\n },\n\n _indeterminate: {\n color: \"ui.focus\",\n borderColor: \"ui.focus\",\n },\n\n _disabled: {\n bg: \"ui.white\",\n borderColor: \"ui.disabled.primary\",\n },\n\n _focus: {\n borderColor: \"ui.focus\",\n boxShadow: \"none\",\n outlineColor: \"ui.focus\",\n },\n\n _invalid: {\n borderColor: \"ui.error.primary\",\n color: \"ui.error.primary\",\n },\n};\n\n// Style object for the Checkbox's label\nconst baseStyleLabel = checkboxRadioLabelStyles;\n\n// Style object for the Checkbox's helper text\nconst baseStyleHelperErrorText = checkboxRadioHelperErrorTextStyle;\n\nconst baseStyle = {\n icon: baseStyleIcon,\n control: baseStyleControl,\n label: baseStyleLabel,\n helperErrorText: baseStyleHelperErrorText,\n};\n\n// Sticking to \"lg\" for the default size.\nconst sizes = {\n lg: {\n // Controls the width/height of the checkbox itself.\n control: {\n ...checkboxRadioControlSize,\n borderRadius: \"checkbox\",\n },\n // Controls the font-size of the label only.\n label: { fontSize: \"label.default\" },\n },\n};\n\nconst Checkbox = {\n parts: [\"helperErrorText\", \"icon\", \"control\", \"label\"],\n baseStyle,\n sizes,\n // Default values\n defaultProps: {\n size: \"lg\",\n colorScheme: \"white\",\n },\n};\n\nexport default Checkbox;\n","interface ComponentWrapperProps {\n hasChildren: boolean;\n}\n\nconst ComponentWrapper = {\n parts: [\"helperErrorText\"],\n baseStyle: ({ hasChildren }: ComponentWrapperProps) => ({\n helperErrorText: {\n marginTop: hasChildren ? null : \"0\",\n },\n }),\n};\n\nexport default ComponentWrapper;\n","import { checkboxRadioGroupStyles } from \"./global\";\n\nconst CheckboxGroup = {\n parts: [\"helperErrorText\", \"stack\"],\n baseStyle: ({ isFullWidth = false }) => ({\n ...checkboxRadioGroupStyles(isFullWidth),\n }),\n};\n\nexport default CheckboxGroup;\n","interface CustomImageBaseStyle {\n size: keyof typeof imageSizes;\n}\ninterface CustomImageWrapperBaseStyle {\n ratio: keyof typeof imageRatios;\n size: keyof typeof imageSizes;\n}\n\nconst imageWrap = {\n position: \"relative\",\n width: \"100%\",\n height: \"auto\",\n overflow: \"hidden\",\n};\nconst sideMarginsAuto = {\n marginLeft: \"auto\",\n marginRight: \"auto\",\n};\nconst imageSizes = {\n default: {\n maxWidth: \"100%\",\n },\n xxsmall: {\n ...sideMarginsAuto,\n maxWidth: \"64px\",\n },\n xsmall: {\n ...sideMarginsAuto,\n maxWidth: \"96px\",\n },\n small: {\n ...sideMarginsAuto,\n maxWidth: \"165px\",\n },\n medium: {\n ...sideMarginsAuto,\n maxWidth: \"225px\",\n },\n large: {\n ...sideMarginsAuto,\n maxWidth: \"360px\",\n },\n};\nconst imageRatios = {\n fourByThree: {\n ...imageWrap,\n paddingBottom: \"75%\",\n },\n oneByTwo: {\n ...imageWrap,\n paddingBottom: \"200%\",\n },\n original: {\n ...imageWrap,\n },\n sixteenByNine: {\n ...imageWrap,\n paddingBottom: \"56.25%\",\n },\n square: {\n ...imageWrap,\n paddingBottom: \"100%\",\n },\n threeByFour: {\n ...imageWrap,\n paddingBottom: \"133.33%\",\n },\n threeByTwo: {\n ...imageWrap,\n paddingBottom: \"66.66%\",\n },\n twoByOne: {\n ...imageWrap,\n paddingBottom: \"50%\",\n },\n};\nconst CustomImage = {\n parts: [\"captionWrappers\"],\n variants: {\n circle: {\n img: {\n borderRadius: \"50%\",\n },\n },\n },\n baseStyle: ({ size = \"default\" }: CustomImageBaseStyle) => ({\n figure: {\n margin: \"auto\",\n width: \"100%\",\n ...imageSizes[size],\n img: {\n backgroundColor: \"ui.gray.x-light-cool\",\n marginBottom: \"xxs\",\n },\n },\n figcaption: {\n fontStyle: \"italic\",\n fontSize: \"text.tag\",\n },\n img: {\n display: \"block\",\n backgroundColor: \"ui.gray.x-light-cool\",\n boxSizing: \"border-box\",\n objectFit: \"cover\",\n position: \"relative\",\n width: \"100%\",\n ...imageSizes[size],\n },\n captionWrappers: {\n marginTop: \"xxs\",\n },\n }),\n};\nconst CustomImageWrapper = {\n parts: [\"crop\"],\n baseStyle: ({\n ratio = \"original\",\n size = \"default\",\n }: CustomImageWrapperBaseStyle) => ({\n marginLeft: \"auto\",\n marginRight: \"auto\",\n width: \"100%\",\n ...imageSizes[size],\n crop: {\n ...imageRatios[ratio],\n },\n img: {\n backgroundColor: \"ui.gray.x-light-cool\",\n height: \"100%\",\n left: \"0\",\n maxWidth: \"100%\",\n position: \"absolute\",\n top: \"0\",\n width: \"100%\",\n },\n }),\n};\n\nexport { CustomImage, CustomImageWrapper };\n","import {\n defaultElementSizes,\n selectTextInputDisabledStyles,\n selectTextInputFocusStyles,\n} from \"./global\";\n\ninterface SelectBaseStyle {\n labelPosition: string;\n}\n\nconst select = {\n backgroundColor: \"ui.white\",\n borderRadius: \"sm\",\n borderColor: \"ui.gray.medium\",\n fontSize: \"text.caption\",\n minHeight: { base: defaultElementSizes.mobileFieldHeight, md: \"auto\" },\n paddingTop: \"inset.narrow\",\n paddingRight: \"inset.extrawide\",\n paddingBottom: \"inset.narrow\",\n paddingLeft: \"inset.default\",\n _hover: {\n borderColor: \"ui.gray.dark\",\n },\n _active: selectTextInputFocusStyles,\n _disabled: {\n ...selectTextInputDisabledStyles,\n },\n _focus: selectTextInputFocusStyles,\n _invalid: {\n border: \"1px solid\",\n borderColor: \"ui.error.primary\",\n boxShadow: \"none\",\n },\n};\n\nconst Select = {\n parts: [\"helperText\", \"inline\", \"select\"],\n baseStyle: ({ labelPosition }: SelectBaseStyle) => {\n return {\n // The backgroundColor set to \"ui.white\" hides the arrow SVG icon when\n // the component is focused. The background is added for dark mode and\n // so we need to add specific selector.\n \".chakra-select__icon-wrapper\": {\n zIndex: \"9999\",\n },\n inline: {\n display: { md: \"flex\" },\n gap: { md: \"var(--nypl-space-xs)\" },\n alignItems: { md: \"flex-end\" },\n },\n select: {\n ...select,\n flex: labelPosition === \"inline\" ? { md: \"1\" } : null,\n },\n };\n },\n variants: {\n searchbar: {\n select: {\n flex: \"1 1 20%\",\n borderRightColor: { md: \"transparent\" },\n borderRightRadius: { md: \"none\" },\n },\n },\n },\n defaultProps: {\n size: \"md\",\n },\n};\n\nexport default Select;\n","/**\n * Note: these styles are only used when the\n * DatePicker is in \"date range\" mode.\n */\nconst DatePicker = {\n parts: [\"subLabels\"],\n baseStyle: {\n subLabels: {\n label: {\n fontSize: \"label.secondary\",\n fontWeight: \"label.secondary\",\n marginBottom: \"0\",\n },\n },\n },\n};\n\nexport default DatePicker;\n","import { labelLegendText } from \"./global\";\nimport { screenreaderOnly } from \"./globalMixins\";\n\ninterface FieldSetProps {\n isLegendHidden?: boolean;\n}\n\nconst Fieldset = {\n baseStyle: ({ isLegendHidden }: FieldSetProps) => {\n const screenreaderStyles = isLegendHidden ? screenreaderOnly : {};\n\n return {\n border: 0,\n padding: 0,\n legend: {\n ...labelLegendText,\n ...screenreaderStyles,\n },\n };\n },\n};\n\nexport default Fieldset;\n","export const baseLinkStyles = {\n color: \"ui.link.primary\",\n textDecoration: \"underline\",\n _hover: {\n color: \"ui.link.secondary\",\n },\n};\n\nconst variants = {\n link: {},\n disabled: {\n color: \"ui.gray.dark\",\n pointerEvents: \"none\",\n },\n moreLink: {\n alignItems: \"center\",\n display: \"inline-flex\",\n svg: {\n height: \"s\",\n width: \"s\",\n textDecoration: \"none\",\n fill: \"currentColor\",\n },\n _hover: {\n color: \"ui.link.secondary\",\n textDecoration: \"underline\",\n },\n },\n button: {\n width: \"100px\",\n borderRadius: \"sm\",\n lineHeight: \"1.5\",\n display: \"flex\",\n cursor: \"pointer\",\n color: \"ui.white\",\n justifyContent: \"center\",\n py: \"xs\",\n px: \"xs\",\n textDecoration: \"none\",\n fontWeight: \"button.default\",\n bg: \"ui.link.primary\",\n _hover: {\n color: \"ui.white\",\n bg: \"ui.link.secondary\",\n textDecoration: \"none\",\n },\n },\n};\nconst Link = {\n baseStyle: {\n ...baseLinkStyles,\n // This is needed for custom anchor elements or link components\n // that are passed as children to the `Link` component.\n a: {\n _hover: {\n color: \"ui.link.secondary\",\n },\n },\n },\n variants,\n};\n\nexport default Link;\n","import { baseLinkStyles } from \"./link\";\n\nconst margins = {\n marginTop: \"0\",\n marginLeft: \"0\",\n marginRight: \"0\",\n};\n\n// Heading Styles\nexport const headings = {\n h1: {\n fontSize: \"heading.primary\", // var(--nypl-fontSizes-4);\n fontWeight: \"heading.primary\",\n letterSpacing: \"0\",\n lineHeight: \"1.1\",\n ...margins,\n width: \"auto\",\n },\n h2: {\n fontSize: \"heading.secondary\", // var(--nypl-fontSizes-3);\n fontWeight: \"heading.secondary\",\n lineHeight: \"1.25\",\n ...margins,\n width: \"auto\",\n },\n h3: {\n fontSize: \"heading.tertiary\", // var(--nypl-fontSizes-2);\n fontWeight: \"heading.tertiary\",\n lineHeight: \"1.25\",\n ...margins,\n width: \"auto\",\n },\n h4: {\n fontSize: \"heading.callout\", // var(--nypl-fontSizes-1);\n fontWeight: \"heading.callout\",\n lineHeight: \"1.15\",\n ...margins,\n width: \"auto\",\n },\n fallback: {\n fontSize: \"1\", // var(--nypl-fontSizes-1);\n fontWeight: \"regular\",\n lineHeight: \"1.15\",\n ...margins,\n width: \"auto\",\n },\n};\n\n// Styles for different visual variants\nconst variants = {\n h1: headings.h1,\n h2: headings.h2,\n h3: headings.h3,\n h4: headings.h4,\n h5: headings.fallback,\n h6: headings.fallback,\n primary: headings.h1,\n secondary: headings.h2,\n tertiary: headings.h3,\n callout: headings.h4,\n};\n\nconst Heading = {\n baseStyle: ({ isCapitalized, isUppercase, isLowercase, noSpace }) => ({\n // This is to help target custom anchor elements\n // passed as children to the Heading component.\n a: baseLinkStyles,\n marginBottom: noSpace ? \"0\" : \"s\",\n textTransform: isCapitalized\n ? \"capitalize\"\n : isUppercase\n ? \"uppercase\"\n : isLowercase\n ? \"lowercase\"\n : null,\n }),\n // Available variants:\n // h1, h2, h3, h4, h5, h6,\n // primary, secondary, tertiary, callout\n variants,\n defaultProps: {\n variant: \"secondary\",\n },\n};\n\nexport default Heading;\n","interface HelperErrorTextBaseStyle {\n isInvalid: boolean;\n}\n\nconst helperErrorText = {\n baseStyle: ({ isInvalid }: HelperErrorTextBaseStyle) => ({\n marginTop: \"xxs\",\n marginBottom: \"0\",\n fontSize: \"helper.default\",\n color: isInvalid ? \"ui.error.primary\" : \"ui.black\",\n }),\n};\n\nexport default helperErrorText;\n","import { wrapperStyles } from \"./global\";\n\n// Used for all \"secondary\" variants.\nconst secondaryBase = {\n overflowX: \"hidden\",\n content: {\n ...wrapperStyles,\n paddingRight: \"inset.default\",\n paddingLeft: \"inset.default\",\n display: \"flex\",\n flexFlow: {\n base: \"column nowrap\",\n md: \"row wrap\",\n },\n img: {\n flex: {\n base: \"1 1 100%\",\n md: \"0 0 250px\",\n },\n order: { md: \"3\" },\n height: \"150px\",\n minWidth: \"0\", // https://github.com/philipwalton/flexbugs/issues/41\n objectFit: \"cover\",\n width: \"100%\",\n },\n },\n bodyText: {\n paddingBottom: \"inset.default\",\n paddingTop: \"inset.default\",\n paddingRight: { md: \"inset.default\" },\n flex: { md: \"1 1 50%\" },\n order: { md: \"2\" },\n },\n};\n// Used for all \"secondary\" variants' heading component.\nconst secondaryHeadingBase = {\n marginBottom: \"0\",\n bg: \"ui.black\",\n color: \"ui.white\",\n flex: \"1 1 100%\",\n marginTop: \"0\",\n paddingBottom: \"xxs\",\n position: \"relative\",\n zIndex: \"0\",\n order: { md: \"1\" },\n _before: {\n bg: \"ui.black\",\n content: `\"\"`,\n height: \"100%\",\n left: \"-2000px\",\n position: \"absolute\",\n width: \"4000px\",\n zIndex: \"-1\",\n },\n};\n// Get all the styles for the specific Secondary variant but\n// update the background color.\nconst getSecondaryVariantStyles = (bgColor: string) => ({\n ...secondaryBase,\n heading: {\n ...secondaryHeadingBase,\n bg: bgColor,\n _before: {\n ...secondaryHeadingBase[\"_before\"],\n bg: bgColor,\n },\n },\n});\n// Variant styling\nconst primary = {\n alignItems: \"center\",\n display: \"flex\",\n flexFlow: {\n base: \"column nowrap\",\n md: \"row nowrap\",\n },\n justifyContent: \"center\",\n minHeight: \"350px\",\n content: {\n bg: \"ui.black\",\n color: \"ui.white\",\n flex: {\n base: \"0 0 100%\",\n md: \"0 0 60%\",\n },\n maxWidth: { md: \"960px\" },\n paddingTop: \"inset.extrawide\",\n paddingBottom: \"inset.extrawide\",\n paddingRight: \"inset.wide\",\n paddingLeft: \"inset.wide\",\n a: {\n color: \"inherit\",\n display: \"inline-block\",\n },\n heading: {\n marginBottom: \"0\",\n },\n bodyText: {\n marginBottom: \"0\",\n },\n },\n};\nconst secondary = {\n ...secondaryBase,\n heading: {\n ...secondaryHeadingBase,\n },\n};\nconst secondaryBooksAndMore = getSecondaryVariantStyles(\n \"section.books-and-more.primary\"\n);\nconst secondaryLocations = getSecondaryVariantStyles(\n \"section.locations.primary\"\n);\nconst secondaryResearch = getSecondaryVariantStyles(\"section.research.primary\");\nconst secondaryWhatsOn = getSecondaryVariantStyles(\"section.whats-on.primary\");\nconst tertiary = {\n bg: \"ui.gray.x-dark\",\n content: {\n ...wrapperStyles,\n color: \"ui.white\",\n display: \"flex\",\n flexFlow: \"column nowrap\",\n padding: \"inset.default\",\n p: {\n marginBottom: \"0\",\n marginTop: \"s\",\n },\n },\n heading: {\n marginBottom: \"0\",\n _lastChild: {\n marginBottom: \"0\",\n },\n },\n p: {\n marginBottom: \"0\",\n },\n};\nconst campaign = {\n alignItems: \"center\",\n display: \"flex\",\n justifyContent: \"center\",\n marginBottom: [\"0\", \"0\", \"xxl\"],\n minHeight: \"300px\",\n overflow: \"visible\",\n padding: {\n base: \"inset.wide\",\n md: \"0\",\n },\n position: \"relative\",\n content: {\n alignItems: \"center\",\n bg: \"ui.black\",\n color: \"ui.white\",\n display: \"flex\",\n flexFlow: {\n base: \"column nowrap\",\n md: \"row nowrap\",\n },\n minHeight: \"320px\",\n flex: { md: \"0 0 90%\" },\n maxWidth: { md: \"1280px\" },\n position: { md: \"relative\" },\n top: { md: \"xxl\" },\n },\n a: {\n color: \"inherit\",\n display: \"inline-block\",\n },\n img: {\n flex: {\n base: \"1 1 100%\",\n md: \"0 0 50%\",\n },\n minWidth: \"0\", // https://github.com/philipwalton/flexbugs/issues/41\n objectFit: \"cover\",\n width: \"100%\",\n height: { md: \"320px\" },\n },\n interior: {\n flex: {\n base: \"0 0 100%\",\n md: \"0 0 50%\",\n },\n padding: \"inset.wide\",\n maxWidth: { md: \"960px\" },\n },\n};\nconst fiftyFifty = {\n content: {\n ...wrapperStyles,\n alignItems: \"center\",\n display: \"flex\",\n flexFlow: {\n base: \"column nowrap\",\n lg: \"row nowrap\",\n },\n paddingBottom: \"s\",\n paddingRight: \"s\",\n paddingLeft: \"s\",\n padding: {\n lg: \"unset\",\n },\n },\n img: {\n marginBottom: {\n base: \"s\",\n lg: \"unset\",\n },\n marginRight: {\n lg: \"s\",\n },\n maxWidth: {\n base: \"fit-content\",\n lg: \"50%\",\n },\n },\n};\nconst Hero = {\n baseStyle: {\n bg: \"ui.gray.x-light-cool\",\n },\n // Available variants:\n variants: {\n primary,\n secondary,\n secondaryBooksAndMore,\n secondaryLocations,\n secondaryResearch,\n secondaryWhatsOn,\n tertiary,\n campaign,\n fiftyFifty,\n },\n};\n\nexport default Hero;\n","interface HorizontalRuleBaseStyle {\n align: string;\n}\n\nconst HorizontalRule = {\n baseStyle: ({ align }: HorizontalRuleBaseStyle) => ({\n bg: \"ui.gray.light-cool\",\n border: \"0\",\n height: \"2px\",\n marginBottom: \"s\",\n marginTop: \"s\",\n marginLeft: align === \"left\" ? 0 : \"auto\",\n marginRight: align === \"right\" ? 0 : \"auto\",\n }),\n};\n\nexport default HorizontalRule;\n","const svgBase = {\n display: \"inline-block\",\n fill: \"currentColor\",\n width: \"auto\",\n height: \"100%\",\n};\nconst align = {\n none: {},\n left: { marginRight: \"xxs\" },\n right: { marginLeft: \"xxs\" },\n};\nconst iconRotation = {\n rotate180: {\n transform: \"rotate(180deg)\",\n },\n rotate270: {\n transform: \"rotate(270deg)\",\n },\n rotate0: {\n transform: \"rotate(0deg)\",\n },\n rotate90: {\n transform: \"rotate(90deg)\",\n },\n};\nconst size = {\n xxxlarge: {\n height: \"var(--nypl-space-xxl)\",\n width: \"var(--nypl-space-xxl)\",\n },\n xxlarge: {\n height: \"var(--nypl-space-xl)\",\n width: \"var(--nypl-space-xl)\",\n },\n xlarge: {\n height: \"var(--nypl-space-l)\",\n width: \"var(--nypl-space-l)\",\n },\n large: {\n height: \"var(--nypl-space-m)\",\n width: \"var(--nypl-space-m)\",\n },\n default: {\n width: \"100%\",\n },\n medium: {\n height: \"1.125rem\",\n width: \"1.125rem\",\n },\n small: {\n height: \"0.875rem\",\n width: \"0.875rem\",\n },\n};\ninterface IconBaseStyle {\n align: keyof typeof align;\n color: string;\n iconRotation: keyof typeof iconRotation;\n size: keyof typeof size;\n}\nconst Icon = {\n baseStyle: (props: IconBaseStyle) => {\n const allStyles = {\n ...svgBase,\n ...align[props.align],\n fill: props.color,\n ...iconRotation[props.iconRotation],\n ...size[props.size],\n };\n return {\n ...allStyles,\n // We still want to style any custom SVG element that was\n // passed to the `Icon` component.\n svg: {\n ...allStyles,\n },\n };\n },\n variants: {\n default: {},\n breadcrumbs: {\n fill: \"var(--nypl-colors-ui-white)\",\n display: { md: \"none\" },\n },\n },\n};\n\nexport default Icon;\n","import { labelLegendText } from \"./global\";\n\ninterface LabelBaseStyle {\n isInlined: boolean;\n}\n\nconst Label = {\n baseStyle: ({ isInlined }: LabelBaseStyle) => ({\n ...labelLegendText,\n flex: isInlined ? \"1\" : null,\n whiteSpace: isInlined ? \"nowrap\" : null,\n }),\n};\n\nexport default Label;\n","import { textMargin } from \"./global\";\n\ninterface ListBaseStyle {\n inline?: boolean;\n noStyling: boolean;\n}\n\nexport const baseListStyles = (inline = false, noStyling = false) => ({\n // Browser automatically applies margin, so by default we unset it.\n margin: noStyling ? \"0\" : \"unset\",\n listStyle: noStyling ? \"none\" : null,\n marginInlineStart: \"unset\",\n paddingLeft: noStyling ? \"0\" : \"l\",\n padding: noStyling ? \"0\" : null,\n display: inline ? \"flex\" : null,\n li: {\n marginRight: inline ? \"xs\" : null,\n listStyleType: inline ? \"none\" : null,\n _notFirst: {\n marginTop: inline ? null : \"xxs\",\n },\n },\n});\nexport const baseUnorderedStyles = (noStyling = false) => ({\n ...textMargin,\n listStyle: \"none\",\n li: {\n _before: {\n color: \"ui.gray.medium\",\n // \\2022 is the CSS Code/unicode for a bullet.\n content: noStyling ? \"unset\" : `\"\\\\2022\"`,\n // Needed to add space between the bullet and the text.\n display: \"inline-block\",\n fontWeight: \"bold\",\n fontSize: \"2\",\n lineHeight: \"0.9\",\n marginLeft: \"-1rem\",\n width: \"1rem\",\n },\n },\n});\nexport const baseSectionDefinitionStyles = {\n borderBottom: \"1px solid\",\n borderColor: \"ui.gray.light-cool\",\n paddingLeft: \"0\",\n h2: {\n borderTop: \"3px solid\",\n borderColor: \"section.research.primary\",\n margin: \"0\",\n padding: \"var(--nypl-space-xs) 0 0\",\n },\n};\nexport const baseDefinitionStyles = {\n ...baseSectionDefinitionStyles,\n dl: {\n display: \"grid\",\n gridTemplateColumns: { base: \"100%\", md: \"max(250px) 1fr\" },\n gridTemplateRows: \"1fr\",\n margin: \"var(--nypl-space-xs) 0 0\",\n },\n dt: {\n borderTop: \"1px solid\",\n borderColor: \"ui.gray.light-cool\",\n fontWeight: \"label.default\",\n paddingBottom: { base: \"0\", md: \"s\" },\n paddingTop: \"s\",\n paddingRight: { md: \"table.column\" },\n },\n dd: {\n margin: \"0\",\n paddingBottom: \"s\",\n borderTop: { base: \"none\", md: \"1px solid\" },\n borderColor: { md: \"ui.gray.light-cool\" },\n paddingTop: { md: \"s\" },\n },\n};\n\nconst List = {\n baseStyle: ({ inline, noStyling }: ListBaseStyle) =>\n baseListStyles(inline, noStyling),\n variants: {\n ul: ({ noStyling }: ListBaseStyle) => baseUnorderedStyles(noStyling),\n ol: textMargin,\n dl: baseDefinitionStyles,\n },\n};\n\nexport default List;\n","interface LogoBaseStyle {\n size: keyof typeof size;\n}\n\nconst svgBase = {\n display: \"inline-block\",\n height: \"auto\",\n width: \"100%\",\n};\nconst size = {\n default: {\n maxWidth: \"100%\",\n },\n xxsmall: {\n maxWidth: \"64px\",\n },\n xsmall: {\n maxWidth: \"96px\",\n },\n small: {\n maxWidth: \"165px\",\n },\n medium: {\n maxWidth: \"225px\",\n },\n large: {\n maxWidth: \"360px\",\n },\n xlarge: {\n maxWidth: \"360px\",\n },\n xxlarge: {\n height: \"var(--nypl-space-xl)\",\n width: \"var(--nypl-space-xl)\",\n },\n xxxlarge: {\n height: \"var(--nypl-space-xxl)\",\n width: \"var(--nypl-space-xxl)\",\n },\n};\nconst Logo = {\n baseStyle: (props: LogoBaseStyle) => {\n const allStyles = {\n ...svgBase,\n ...size[props.size],\n };\n return {\n ...allStyles,\n // We still want to style any custom SVG element that was\n // passed to the `Logo` component.\n svg: {\n ...allStyles,\n },\n };\n },\n};\n\nexport default Logo;\n","import { NotificationTypes } from \"../../components/Notification/Notification\";\n\ninterface NotificationBaseStyle {\n dismissible: boolean;\n isCentered: boolean;\n noMargin: boolean;\n notificationType: NotificationTypes;\n}\ninterface NotificationContentBaseStyle {\n alignText: boolean;\n icon: boolean;\n notificationType: NotificationTypes;\n}\ninterface NotificationHeadingBaseStyle {\n icon: boolean;\n isCentered: boolean;\n notificationType: NotificationTypes;\n}\n\nconst Notification = {\n parts: [\"container\", \"dismissibleButton\", \"icon\"],\n baseStyle: ({\n dismissible,\n isCentered,\n noMargin,\n notificationType,\n }: NotificationBaseStyle) => {\n let bg = \"ui.status.primary\";\n if (notificationType === \"announcement\" || notificationType === \"warning\") {\n bg = \"ui.gray.x-light-cool\";\n }\n return {\n bg,\n display: \"flex\",\n fontSize: \"text.caption\", // slightly smaller than the default size\n position: \"relative\",\n textAlign: isCentered ? \"center\" : null,\n borderRadius: noMargin ? \"0\" : \"4px\",\n margin: noMargin ? \"0\" : \"s\",\n container: {\n margin: \"auto\",\n maxWidth: \"var(--nypl-breakpoint-xl)\",\n padding: \"inset.default\",\n paddingRight: dismissible ? \"l\" : null,\n paddingLeft: isCentered && dismissible ? \"l\" : null,\n width: \"100%\",\n },\n dismissibleButton: {\n border: \"none\",\n bgColor: \"inherit\",\n alignItems: \"center\",\n color: \"ui.black\",\n display: \"flex\",\n height: \"32px\",\n width: \"32px\",\n minWidth: \"0\",\n position: \"absolute\",\n right: \"0\",\n top: \"0\",\n svg: {\n marginTop: \"0\",\n },\n _hover: {\n bg: \"inherit\",\n },\n },\n icon: {\n flexShrink: \"0\",\n marginRight: \"s\",\n },\n };\n },\n};\n\nconst NotificationContent = {\n parts: [\"content\"],\n baseStyle: ({\n alignText,\n icon,\n notificationType,\n }: NotificationContentBaseStyle) => ({\n display: \"flex\",\n justifyContent: \"center\",\n content: {\n color: notificationType === \"warning\" ? \"brand.primary\" : \"currentColor\",\n marginTop: icon ? \"xxxs\" : \"0\",\n paddingLeft: alignText\n ? \"calc(var(--nypl-space-m) + var(--nypl-space-s))\"\n : null,\n width: \"100%\",\n // Links should always be black and underlined.\n a: {\n color: \"ui.black\",\n _hover: {\n color: \"ui.black\",\n },\n },\n },\n }),\n};\n\nconst NotificationHeading = {\n parts: [\"heading\"],\n baseStyle: ({\n icon,\n isCentered,\n notificationType,\n }: NotificationHeadingBaseStyle) => {\n let color = \"ui.black\";\n if (notificationType === \"announcement\") {\n color = \"section.research.secondary\";\n } else if (notificationType === \"warning\") {\n color = \"brand.primary\";\n }\n return {\n display: \"flex\",\n marginBottom: \"xxs\",\n justifyContent: isCentered ? \"center\" : null,\n heading: {\n marginBottom: \"0\",\n marginTop: icon ? \"xxxs\" : \"0\",\n color,\n },\n };\n },\n};\n\nexport default {\n Notification,\n NotificationContent,\n NotificationHeading,\n};\n","const Pagination = {\n parts: [\"link\"],\n baseStyle: {\n alignItems: \"stretch\",\n display: \"flex\",\n width: \"100%\",\n link: {\n lineHeight: \"1.15\",\n textDecoration: \"none\",\n },\n ul: {\n marginBottom: \"0\",\n },\n },\n};\n\nexport default Pagination;\n","import { ProgressIndicatorSizes } from \"../../components/ProgressIndicator/ProgressIndicator\";\n\ninterface ProgressIndicatorBaseStyle {\n darkMode: boolean;\n size: ProgressIndicatorSizes;\n}\n\nconst ProgressIndicator = {\n parts: [\n \"circular\",\n \"circularLabel\",\n \"linear\",\n \"linearContainer\",\n \"linearPercentage\",\n ],\n baseStyle: ({ darkMode, size }: ProgressIndicatorBaseStyle) => {\n return {\n color: darkMode ? \"ui.white\" : \"ui.black\",\n circular: {\n // Note: we have to target the SVG HTMl elements in order\n // to override the default styles.\n svg: {\n height: size === \"default\" ? \"48px\" : \"24px\",\n width: size === \"default\" ? \"48px\" : \"24px\",\n display: \"block\",\n circle: {\n _first: {\n stroke: darkMode ? \"ui.gray.dark\" : \"ui.gray.light-cool\",\n },\n _last: {\n stroke: darkMode ? \"ui.white\" : \"ui.link.primary\",\n },\n },\n },\n },\n circularContainer: {\n alignItems: \"center\",\n display: \"flex\",\n flexDirection: \"column\",\n width: \"fit-content\",\n },\n linear: {\n // Hard to target this specific element without using\n // \"Progress\" as the key name in index.ts\n \"> div\": {\n bg: darkMode ? \"ui.white\" : \"ui.link.primary\",\n },\n flex: 25,\n bg: darkMode ? \"ui.gray.dark\" : \"ui.gray.light-cool\",\n height: {\n base: \"4px\",\n md: size === \"default\" ? \"8px\" : \"4px\",\n },\n },\n linearContainer: {\n display: \"flex\",\n alignItems: \"center\",\n },\n linearPercentage: {\n padding: \"0 var(--nypl-space-xs)\",\n flex: 1,\n },\n };\n },\n};\n\nexport default ProgressIndicator;\n","import {\n activeFocus,\n checkboxRadioLabelStyles,\n checkboxRadioControlSize,\n checkboxRadioHelperErrorTextStyle,\n screenreaderOnly,\n} from \"./global\";\n\n// Style object for the Radio's \"control\" or visual icon.\nconst baseStyleControl = {\n verticalAlign: \"middle\",\n transitionProperty: \"box-shadow\",\n transitionDuration: \"normal\",\n border: \"2px solid\",\n borderRadius: \"round\",\n borderColor: \"ui.black\",\n backgroundColor: \"ui.white\",\n color: \"ui.white\",\n outline: \"none\",\n _checked: {\n bg: \"ui.white\",\n borderColor: \"ui.focus\",\n color: \"ui.white\",\n _disabled: {\n borderColor: \"ui.disabled.primary\",\n bg: \"ui.white\",\n _before: {\n bg: \"ui.disabled.primary\",\n },\n },\n _invalid: {\n _hover: {\n borderColor: \"ui.error.primary\",\n },\n _before: {\n borderColor: \"ui.error.primary\",\n bg: \"ui.error.primary\",\n },\n },\n _hover: {\n bg: \"ui.white\",\n },\n _before: {\n content: `\"\"`,\n display: \"block\",\n w: \"3\",\n h: \"3\",\n borderRadius: \"round\",\n bg: \"ui.focus\",\n },\n },\n _disabled: {\n borderColor: \"ui.disabled.primary\",\n bg: \"ui.white\",\n },\n _focus: {\n ...activeFocus(),\n boxShadow: \"outline\",\n borderColor: \"ui.focus\",\n },\n _invalid: {\n borderColor: \"ui.error.primary\",\n },\n // TODO:\n // _indeterminate: {\n // borderColor: \"ui.gray.medium\",\n // bg: \"ui.white\",\n // },\n};\n\n// Style object for the Radio's label\nconst baseStyleLabel = checkboxRadioLabelStyles;\n\n// Style object for the Radio's helper text\nconst baseStyleHelperErrorText = checkboxRadioHelperErrorTextStyle;\n\nconst baseStyle = {\n // Chakra-inserted elements in the Chakra Radio component\n control: baseStyleControl,\n label: baseStyleLabel,\n // Custom element in the DS Radio component.\n helperErrorText: baseStyleHelperErrorText,\n hiddenLabel: screenreaderOnly,\n};\n\n// Sticking to \"md\" for the default size.\nconst sizes = {\n md: {\n control: {\n ...checkboxRadioControlSize,\n },\n label: { fontSize: \"label.default\" },\n },\n};\n\nconst Radio = {\n parts: [\"control\", \"helperErrorText\", \"hiddenLabel\", \"label\"],\n baseStyle,\n sizes,\n // Default values\n defaultProps: {\n size: \"md\",\n },\n};\n\nexport default Radio;\n","import { checkboxRadioGroupStyles } from \"./global\";\n\nconst RadioGroup = {\n parts: [\"helperErrorText\", \"stack\"],\n baseStyle: ({ isFullWidth = false }) => ({\n ...checkboxRadioGroupStyles(isFullWidth),\n }),\n};\n\nexport default RadioGroup;\n","const SearchBar = {\n parts: [\"select\"],\n baseStyle: {\n display: \"flex\",\n marginBottom: {\n base: \"xs\",\n md: \"auto\",\n },\n flexFlow: {\n base: \"column nowrap\",\n md: \"row nowrap\",\n },\n select: {\n flexShrink: \"0\",\n marginBottom: \"0\",\n maxWidth: { base: undefined, md: \"255px\" },\n textOverflow: \"ellipsis\",\n },\n },\n};\n\nexport default SearchBar;\n","import { keyframes } from \"@chakra-ui/system\";\n\ninterface SkeletonLoaderBaseStyle {\n imageAspectRatio: keyof typeof imagePaddingBottomStyles;\n isBordered: boolean;\n showImage?: boolean;\n}\n\nconst element = {\n borderRadius: \"2px\",\n boxSizing: \"border-box\",\n marginBottom: \"xs\",\n};\nconst borderRules = {\n border: \"1px solid\",\n borderColor: \"ui.gray.light-cool\",\n padding: \"s\",\n};\nconst imagePaddingBottomStyles = {\n landscape: \"50%\",\n portrait: \"133%\",\n square: \"100%\",\n};\nconst imageRowHeightStyles = {\n landscape: \"110px\",\n portrait: \"294px\",\n square: \"220px\",\n};\n// NYPL's skeleton loader component.\nconst SkeletonLoader = {\n parts: [\"section\", \"image\", \"container\", \"heading\", \"content\", \"button\"],\n baseStyle: ({ imageAspectRatio, isBordered }: SkeletonLoaderBaseStyle) => {\n const borderStyles = isBordered ? { ...borderRules } : {};\n\n return {\n margin: \"auto\",\n width: \"100%\",\n ...borderStyles,\n section: {\n marginBottom: \"s\",\n _last: {\n marginBottom: \"0\",\n },\n },\n image: {\n ...element,\n boxSizing: \"border-box\",\n flexShrink: \"0\",\n height: \"0\",\n overflow: \"hidden\",\n paddingBottom: imagePaddingBottomStyles[imageAspectRatio],\n position: \"relative\",\n width: \"100%\",\n },\n container: {\n marginTop: \"s\",\n width: \"100%\",\n },\n heading: {\n ...element,\n height: \"32px\",\n },\n content: {\n ...element,\n height: \"20px\",\n },\n button: {\n height: \"32px\",\n margin: \"auto\",\n maxWidth: \"160px\",\n width: \"100%\",\n },\n };\n },\n variants: {\n row: ({ imageAspectRatio, showImage }: SkeletonLoaderBaseStyle) => ({\n alignItems: \"flex-start\",\n display: { md: \"flex\" },\n image: {\n overflow: { md: \"visible\" },\n paddingBottom: { md: \"0\" },\n position: { md: \"relative\" },\n width: { md: \"220px\" },\n height: { md: imageRowHeightStyles[imageAspectRatio] },\n },\n container: {\n marginLeft: showImage ? { md: \"m\" } : null,\n marginTop: { md: \"0\" },\n },\n button: {\n margin: { md: \"0\" },\n },\n }),\n },\n};\n\n// Fade animation\nconst fade = () =>\n keyframes({\n from: { opacity: 0.9 },\n \"50%\": { opacity: 0.7 },\n to: { opacity: 0.9 },\n });\n// Overriding Chakra's Skeleton animation.\nconst Skeleton = {\n baseStyle: {\n borderRadius: \"2px\",\n background: \"ui.gray.light-cool\",\n animation: `${fade()} 1000ms cubic-bezier(0.25, -0.5, 1, 0) infinite`,\n },\n};\n\nexport { Skeleton, SkeletonLoader };\n","const SkipNavigation = {\n baseStyle: {\n ul: {\n margin: \"0\",\n },\n // Don't display links by default...\n a: {\n backgroundColor: \"ui.white\",\n height: \"1px\",\n left: \"-10000px\",\n overflow: \"hidden\",\n position: \"absolute\",\n top: \"auto\",\n width: \"1px\",\n // Only display when the user focuses on the links.\n _focus: {\n border: \"1px solid var(—nypl-colors-ui-gray-dark)\",\n height: \"auto\",\n left: \"2rem\",\n padding:\n \"var(--nypl-space-inset-extranarrow) var(--nypl-space-inset-narrow)\",\n top: \"3rem\",\n width: \"auto\",\n },\n },\n },\n};\n\nexport default SkipNavigation;\n","interface CustomSliderBaseStyle {\n isDisabled: boolean;\n isInvalid: boolean;\n showBoxes: boolean;\n showValues: boolean;\n}\n\n// Margins around the static display values.\nconst staticValues = {\n marginTop: \"xs\",\n marginBottom: \"xs\",\n marginRight: \"s\",\n marginLeft: \"0\",\n};\nconst CustomSlider = {\n parts: [\n \"container\",\n \"leftValue\",\n \"rightValue\",\n \"textInput\",\n \"sliderContainer\",\n \"filledTrack\",\n \"track\",\n \"thumb\",\n ],\n baseStyle: ({\n isDisabled,\n isInvalid,\n showBoxes,\n showValues,\n }: CustomSliderBaseStyle) => {\n let baseColor = \"ui.link.primary\";\n if (isInvalid) {\n baseColor = \"ui.error.primary\";\n } else if (isDisabled) {\n baseColor = \"ui.disabled.primary\";\n }\n\n return {\n container: {\n display: \"flex\",\n alignItems: \"center\",\n },\n leftValue: { ...staticValues, color: isDisabled ? \"ui.gray.dark\" : null },\n rightValue: {\n ...staticValues,\n marginLeft: \"s\",\n // If the text input boxes are shown, then there already is\n // a margin, so we can set this static value to \"0\".\n marginRight: showBoxes ? \"0\" : \"s\",\n color: isDisabled ? \"ui.gray.dark\" : null,\n },\n textInput: {\n // Allows for three or more digits present in the\n // min or max value text input.\n minWidth: \"65px\",\n color: isInvalid ? \"ui.error.primary\" : \"ui.black\",\n },\n // This is added to the container so that the slider thumbs don't\n // overflow past the container when the value boxes or min/max values\n // are not shown.\n sliderContainer: {\n marginLeft: !showValues ? \"xs\" : null,\n marginRight: !showBoxes && !showValues ? \"xs\" : null,\n },\n // Filled track doesn't have a _disabled or _invalid state...\n // so we manually do it through the props.\n filledTrack: {\n bgColor: baseColor,\n },\n track: {\n bgColor: \"ui.gray.light-cool\",\n _disabled: {\n bgColor: \"ui.disabled.primary\",\n },\n },\n thumb: {\n border: \"1px solid\",\n // Thumb doesn't have an _invalid state...\n // so we manually do it through the props.\n borderColor: baseColor,\n boxShadow: \"none\",\n _active: {\n transform: \"translateY(-50%) scale(1.0)\",\n },\n _disabled: {\n bgColor: \"ui.disabled.secondary\",\n borderColor: \"ui.disabled.primary\",\n },\n },\n };\n },\n};\n\nexport default CustomSlider;\n","const StatusBadge = {\n baseStyle: {\n borderRadius: \"base\",\n color: \"ui.black\",\n display: \"block\",\n fontSize: \"-1\", // slightly smaller than the default size\n fontStyle: \"italic\",\n py: \"inset.extranarrow\",\n px: \"inset.narrow\",\n textAlign: \"center\",\n width: \"fit-content\",\n },\n variants: {\n low: {\n bg: \"ui.gray.light-cool\",\n },\n medium: {\n bg: \"ui.status.primary\",\n },\n high: {\n bg: \"ui.status.secondary\",\n },\n },\n};\n\nexport default StatusBadge;\n","interface BaseStyleProps {\n columnHeadersBackgroundColor?: string;\n columnHeadersTextColor?: string;\n showRowDividers?: boolean;\n useRowHeaders?: boolean;\n}\n\nconst cellBorderColorStyles = {\n base: \"ui.gray.light-cool\",\n md: \"ui.gray.medium\",\n};\n\nexport const baseTRStyles = (\n columnHeadersBackgroundColor = \"\",\n showRowDividers = false,\n useRowHeaders = false\n) => ({\n borderBottom: { base: \"2px solid\", md: 0 },\n borderColor: \"ui.gray.medium\",\n display: { base: \"block\", md: \"table-row\" },\n paddingBottom:\n showRowDividers || columnHeadersBackgroundColor\n ? 0\n : { base: \"s\", md: \"0\" },\n paddingTop:\n showRowDividers || columnHeadersBackgroundColor || useRowHeaders\n ? 0\n : { base: \"s\", md: \"0\" },\n _first: {\n borderTop: { base: \"2px solid\", md: \"0\" },\n borderColor: \"ui.gray.medium\",\n },\n});\nexport const baseCellStyles = (\n columnHeadersBackgroundColor = \"\",\n columnHeadersTextColor = \"\",\n showRowDividers = false,\n useRowHeaders = false\n) => ({\n border: showRowDividers ? undefined : \"none\",\n borderBottom: showRowDividers ? \"1px solid\" : \"0\",\n borderColor: cellBorderColorStyles,\n display: { base: \"flex\", md: \"table-cell\" },\n fontSize: { base: \"text.caption\", lg: \"text.default\" },\n gap: \"s\",\n letterSpacing: \"0\",\n lineHeight: 1.5,\n paddingBottom: { base: \"0\", md: \"s\" },\n paddingLeft: 0,\n paddingRight: { base: \"0\", md: \"m\" },\n paddingTop: { base: \"0\", md: \"s\" },\n _first: {\n paddingLeft: showRowDividers ? { base: \"0\", md: \"m\" } : null,\n borderBottom: showRowDividers\n ? {\n base: \"1px solid var(--nypl-colors-ui-light-cool)\",\n md: \"1px solid var(--nypl-colors-ui-gray-medium)\",\n }\n : \"none\",\n },\n _last: {\n paddingRight: showRowDividers ? { base: \"0\", md: \"m\" } : null,\n borderBottom: showRowDividers ? \"1px solid\" : \"none\",\n borderColor: cellBorderColorStyles,\n },\n \"> span\": {\n flexBasis: \"50%\",\n paddingBottom: { base: \"s\", md: \"0\" },\n paddingRight: showRowDividers ? \"s\" : \"0\",\n paddingTop: { base: \"s\", md: \"0\" },\n _first: {\n bg: columnHeadersBackgroundColor\n ? columnHeadersBackgroundColor\n : undefined,\n color: columnHeadersTextColor ? columnHeadersTextColor : \"ui.black\",\n fontWeight: \"medium\",\n paddingLeft:\n columnHeadersBackgroundColor || showRowDividers || useRowHeaders\n ? \"s\"\n : undefined,\n },\n },\n});\nexport const baseTHStyles = (\n columnHeadersBackgroundColor = \"\",\n columnHeadersTextColor = \"\",\n showRowDividers = false,\n useRowHeaders = false\n) => ({\n ...baseCellStyles(\n columnHeadersBackgroundColor,\n columnHeadersTextColor,\n showRowDividers,\n useRowHeaders\n ),\n color: columnHeadersTextColor ? columnHeadersTextColor : \"ui.black\",\n fontWeight: \"medium\",\n textTransform: \"capitalize\",\n _first: {\n paddingLeft:\n showRowDividers || columnHeadersBackgroundColor\n ? { base: \"0\", md: \"m\" }\n : { base: \"0\", md: undefined },\n },\n});\nexport const baseTDStyles = (\n columnHeadersBackgroundColor = \"\",\n columnHeadersTextColor = \"\",\n showRowDividers = false,\n useRowHeaders = false\n) => ({\n ...baseCellStyles(\n columnHeadersBackgroundColor,\n columnHeadersTextColor,\n showRowDividers,\n useRowHeaders\n ),\n _first: {\n paddingLeft:\n showRowDividers && !useRowHeaders\n ? { base: \"0\", md: \"m\" }\n : columnHeadersBackgroundColor && !useRowHeaders\n ? { base: \"0\", md: \"m\" }\n : { base: \"0\", md: undefined },\n },\n _last: {\n borderBottom: showRowDividers\n ? { base: 0, md: \"1px solid\" }\n : { base: 0, md: undefined },\n borderColor: cellBorderColorStyles,\n },\n});\nexport const baseStyle = ({\n columnHeadersBackgroundColor,\n columnHeadersTextColor,\n showRowDividers,\n useRowHeaders,\n}: BaseStyleProps) => ({\n // Headers `th` can be rendered as the first cell in every row through the\n // `useRowHeaders`. Whereas the header `th` in the `thead` can be rendered\n // with a custom color, the row header `th` in the `tbody` should always\n // have text color black.\n tbody: {\n th: {\n color: \"var(--nypl-colors-ui-black)\",\n backgroundColor: useRowHeaders\n ? { base: \"ui.gray.x-light-cool\", md: \"unset\" }\n : undefined,\n },\n },\n thead: {\n display: { base: \"none\", md: \"table-header-group\" },\n },\n tr: baseTRStyles(\n columnHeadersBackgroundColor,\n showRowDividers,\n useRowHeaders\n ),\n th: baseTHStyles(\n columnHeadersBackgroundColor,\n columnHeadersTextColor,\n showRowDividers,\n useRowHeaders\n ),\n td: baseTDStyles(\n columnHeadersBackgroundColor,\n columnHeadersTextColor,\n showRowDividers,\n useRowHeaders\n ),\n caption: {\n captionSide: \"top\",\n color: \"ui.black\",\n fontSize: \"heading.secondary\",\n fontWeight: \"heading.secondary\",\n marginBottom: \"s\",\n marginLeft: \"0\",\n marginRight: \"0\",\n marginTop: \"0\",\n padding: \"0\",\n textAlign: \"left\",\n },\n});\n\nconst CustomTable = {\n baseStyle,\n};\n\nexport default CustomTable;\n","import { baseTDStyles, baseTHStyles } from \"./customTable\";\nimport { textMargin } from \"./global\";\nimport { headings } from \"./heading\";\nimport { baseLinkStyles } from \"./link\";\nimport {\n baseDefinitionStyles,\n baseListStyles,\n baseSectionDefinitionStyles,\n baseUnorderedStyles,\n} from \"./list\";\n\ninterface StructuredContentBaseStyle {\n hasFigureImage: boolean;\n imageAspectRatio: string;\n imagePosition: string;\n}\n\nconst StructuredContent = {\n parts: [\"image\", \"imageFigure\", \"imageWrapper\"],\n baseStyle: ({\n hasFigureImage,\n imageAspectRatio,\n imagePosition,\n }: StructuredContentBaseStyle) => {\n const styles: { maxWidth?: string } = {};\n const wrapperStyles = {\n float: [\n \"none\",\n \"none\",\n imagePosition !== \"center\" ? imagePosition : undefined,\n ],\n marginLeft: [\n \"auto\",\n \"auto\",\n imagePosition === \"center\"\n ? null\n : imagePosition === \"left\"\n ? \"0\"\n : \"l\",\n ],\n marginRight: [\n \"auto\",\n \"auto\",\n imagePosition === \"center\"\n ? null\n : imagePosition === \"left\"\n ? \"m\"\n : \"0\",\n ],\n width: imagePosition !== \"center\" ? \"100%\" : undefined,\n ...styles,\n };\n if (imagePosition === \"center\") {\n styles.maxWidth = \"100%\";\n }\n return {\n imageFigure: {\n ...wrapperStyles,\n marginBottom: \"m\",\n },\n imageWrapper: {\n ...wrapperStyles,\n marginBottom: !hasFigureImage ? \"m\" : null,\n },\n image: {\n // To handle the case when the image does not have a container,\n // e.g. when there is no image caption or credit.\n float: [\n \"none\",\n \"none\",\n imagePosition !== \"center\" ? imagePosition : undefined,\n ],\n marginLeft: [\n \"auto\",\n \"auto\",\n imagePosition === \"right\" && imageAspectRatio === \"original\"\n ? \"m\"\n : undefined,\n ],\n marginRight: [\n \"auto\",\n \"auto\",\n imagePosition === \"left\" && imageAspectRatio === \"original\"\n ? \"m\"\n : undefined,\n ],\n marginBottom:\n !hasFigureImage || imageAspectRatio === \"original\" ? \"m\" : null,\n ...styles,\n },\n /** The following styles are meant to target HTML elements that are\n * not rendered from the Reservoir DS. Typically, these HTML elements\n * are added from an API response.\n */\n // This gives Chakra `Box` styles to divs inside the\n // main `StructuredContent` content area.\n \".structuredcontent-body > div\": {\n marginTop: \"var(--nypl-space-l)\",\n marginInlineEnd: \"var(--nypl-space-0)\",\n marginBottom: \"var(--nypl-space-0)\",\n marginInlineStart: \"var(--nypl-space-0)\",\n },\n a: baseLinkStyles,\n ul: {\n ...baseListStyles(),\n listStyle: \"none\",\n ...baseUnorderedStyles(),\n },\n ol: {\n ...baseListStyles(),\n ...textMargin,\n },\n // For section, h2 in the definition list.\n section: baseSectionDefinitionStyles,\n dl: baseDefinitionStyles.dl,\n dt: baseDefinitionStyles.dt,\n dd: baseDefinitionStyles.dd,\n table: {\n width: \"100%\",\n th: {\n // These styles, except for `baseTHStyles`, are set from\n // Chakra so they are copied explicitly.\n textAlign: \"start\",\n paddingInlineStart: \"var(--nypl-space-6)\",\n paddingInlineEnd: \"var(--nypl-space-6)\",\n paddingTop: \"var(--nypl-space-3)\",\n paddingBottom: \"var(--nypl-space-3)\",\n lineHeight: \"var(--nypl-lineHeights-4)\",\n ...baseTHStyles(),\n },\n td: {\n // These styles, except for `baseTDStyles`, are set from\n // Chakra so they are copied explicitly.\n textAlign: \"start\",\n paddingInlineStart: \"var(--nypl-space-6)\",\n paddingInlineEnd: \"var(--nypl-space-6)\",\n paddingTop: \"var(--nypl-space-4)\",\n paddingBottom: \"var(--nypl-space-4)\",\n lineHeight: \"var(--nypl-lineHeights-5)\",\n ...baseTDStyles(),\n },\n },\n // h1, h2, h3, h4, h5, h6\n ...headings,\n };\n },\n};\n\nexport default StructuredContent;\n","const tablist = {\n borderColor: \"ui.black\",\n};\nconst tab = {\n color: \"black !important\",\n paddingInlineStart: \"s\",\n paddingLeft: \"s\",\n background: \"transparent\",\n border: \"0\",\n borderBottom: \"1px solid\",\n borderColor: \"red\",\n height: { base: \"44px\" },\n marginRight: {\n base: \"0\",\n md: \"1px\",\n },\n paddingRight: {\n base: \"s\",\n md: \"l\",\n lg: \"xl\",\n },\n whiteSpace: \"nowrap\",\n _hover: {\n bg: \"ui.gray.x-light-cool\",\n borderTopRadius: \"sm\",\n borderBottom: \"1px solid\",\n borderBottomColor: \"ui.black\",\n },\n _selected: {\n fontWeight: \"bold\",\n bg: \"ui.gray.light-cool\",\n border: \"0\",\n borderTopRadius: \"sm\",\n borderBottom: \"3px solid\",\n borderBottomColor: \"ui.black\",\n paddingBottom: \"5px\",\n },\n _focus: {\n boxShadow: \"0\",\n },\n};\n// Only display the previous/next arrow buttons on mobile.\nconst buttonArrows = {\n border: \"0\",\n borderRadius: \"0\",\n display: {\n // After 38em/600px, don't display the arrow button anymore.\n md: \"none\",\n },\n height: \"44px\",\n width: \"44px !important\",\n top: \"8px\",\n marginLeft: \"4px\",\n marginRight: \"4px\",\n // Code from https://codesandbox.io/s/fxjeo for the mobile carousel\n pos: \"absolute\",\n transition: \"0.6s ease\",\n zIndex: \"9999\",\n};\nconst tablistWrapper = {\n display: \"flex\",\n alignItems: \"center\",\n borderBottom: {\n base: \"0\",\n md: \"1px solid black\",\n },\n height: { base: \"58px\", md: \"auto\" },\n margin: \"0\",\n overflowX: { base: \"auto\", md: \"visible\" },\n paddingBottom: { base: \"5px\", md: \"0\" },\n paddingLeft: { base: \"4px\", md: \"0\" },\n paddingRight: { base: \"4px\", md: \"0\" },\n paddingTop: { base: \"4px\", md: \"0\" },\n position: \"relative\",\n};\nconst tabpanels = {\n paddingTop: \"2px\",\n};\n\nconst carouselParent = {\n position: { base: \"absolute\", md: \"relative\" },\n left: { base: \"50px\", md: \"auto\" },\n paddingBottom: { base: \"5px\", md: \"0\" },\n paddingLeft: { base: \"4px\", md: \"0\" },\n paddingRight: \"0\",\n paddingTop: { base: \"4px\", md: \"0\" },\n right: { base: \"52px\", md: \"auto\" },\n top: { base: \"4px\", md: \"0\" },\n overflowX: { base: \"hidden\", md: \"visible\" },\n};\n\nconst CustomTabs = {\n // tablist, tab, and tabpanels are existing keys which are extended but\n // buttonArrows, tablistWrapper, and carouselParent are custom elements\n // in the `Tabs` component.\n parts: [\"buttonArrows\", \"tablistWrapper\", \"carouselParent\"],\n baseStyle: {\n tablist,\n tab,\n // Only display the previous/next arrow buttons on mobile.\n buttonArrows,\n // To better align the mobile arrow buttons with the tablist.\n tablistWrapper,\n tabpanels,\n carouselParent,\n },\n};\n\nexport default CustomTabs;\n","// From @mixin breakout:\n// Used for elements that should be edge-to-edge.\nconst breakout = {\n marginLeft: \"calc(-50vw + 50%)\",\n marginRight: \"calc(-50vw + 50%)\",\n};\n// From the `wrapper` SCSS mixin.\n// TODO: Eventually we may be able to put shared JS style objects\n// into a utils file for other mixins that are shared.\nconst wrapperStyles = {\n marginY: 0,\n marginX: \"auto\",\n maxWidth: \"1280px\",\n paddingTop: 0,\n paddingBottom: 0,\n paddingRight: \"s\",\n paddingLeft: \"s\",\n width: \"100%\",\n};\n\nconst Template = {\n baseStyle: {\n boxSizing: \"border-box\",\n color: \"ui.black\",\n // Users with non-overlay scrollbars have a small horizontal scrollbar from\n // our breakout mixin. Fix identified here: https://cloudfour.com/thinks/breaking-out-with-viewport-units-and-calc/#one-big-dumb-caveat\n overflowX: \"hidden\",\n \"*\": { boxSizing: \"inherit\" },\n \"*::after\": { boxSizing: \"inherit\" },\n \"*::before\": { boxSizing: \"inherit\" },\n },\n sizes: {},\n defaultProps: {},\n};\nconst TemplateHeader = {\n baseStyle: {\n marginBottom: \"page.hstack\", // --nypl-space-l\n },\n};\nconst TemplateBreakout = {\n baseStyle: {\n ...breakout,\n width: \"100vw\",\n marginBottom: \"page.hstack\", // --nypl-space-l\n },\n};\nconst TemplateContent = {\n baseStyle: {\n ...wrapperStyles,\n display: \"block\",\n marginBottom: \"page.hstack\", // --nypl-space-l\n },\n variants: {\n sidebar: {\n display: \"flex\",\n flexFlow: {\n base: \"column nowrap\",\n md: \"row wrap\",\n },\n },\n },\n};\nconst TemplateContentTop = {\n baseStyle: {\n flex: \"1 0 100%\",\n marginBottom: \"page.hstack\", // --nypl-space-l\n },\n};\nconst TemplateContentPrimary = {\n baseStyle: {\n flex: \"1 1\",\n marginBottom: \"page.hstack\", // --nypl-space-l\n },\n variants: {\n left: {\n display: \"flex\",\n flexFlow: \"column nowrap\",\n order: \"1\",\n marginRight: { md: 0 },\n minWidth: { md: 0 },\n },\n },\n};\nconst TemplateContentSidebar = {\n baseStyle: {\n flex: { base: \"0 0 auto\", md: \"0 0 255px\" },\n order: { md: \"page.vstack\" },\n marginBottom: \"page.hstack\", // --nypl-space-l\n },\n variants: {\n left: {\n marginRight: {\n base: 0,\n md: \"page.vstack\", // --nypl-space-xl\n },\n },\n right: {\n marginLeft: {\n base: 0,\n md: \"page.vstack\", // --nypl-space-xl\n },\n },\n },\n};\n\nexport default {\n Template,\n TemplateHeader,\n TemplateBreakout,\n TemplateContent,\n TemplateContentTop,\n TemplateContentPrimary,\n TemplateContentSidebar,\n};\n","interface TextBaseStyle {\n isBold: boolean;\n isItalic: boolean;\n isCapitalized: boolean;\n isUppercase: boolean;\n isLowercase: boolean;\n noSpace: boolean;\n variant: string;\n}\n\nconst variants = {\n default: {},\n caption: {\n fontSize: \"text.caption\",\n },\n tag: {\n fontSize: \"text.tag\",\n },\n mini: {\n fontSize: \"text.mini\",\n },\n};\nconst Text = {\n baseStyle: ({\n isBold,\n isItalic,\n isCapitalized,\n isUppercase,\n isLowercase,\n noSpace,\n variant,\n }: TextBaseStyle) => {\n const fontWeight = isBold\n ? variant === \"tag\" || variant === \"mini\"\n ? \"medium\"\n : \"bold\"\n : null;\n const fontStyle = isItalic ? \"italic\" : null;\n const textTransform = isCapitalized\n ? \"capitalize\"\n : isUppercase\n ? \"uppercase\"\n : isLowercase\n ? \"lowercase\"\n : null;\n\n return {\n fontStyle: fontStyle,\n fontWeight: fontWeight,\n textTransform: textTransform,\n marginBottom: noSpace ? \"0 !important\" : null,\n };\n },\n variants,\n};\n\nexport default Text;\n","import {\n defaultElementSizes,\n selectTextInputDisabledStyles,\n selectTextInputFocusStyles,\n} from \"./global\";\n\nconst input = {\n bgColor: \"ui.white\",\n border: \"1px solid\",\n borderColor: \"ui.gray.medium\",\n borderRadius: \"sm\",\n fontSize: \"text.caption\",\n minHeight: { base: defaultElementSizes.mobileFieldHeight, md: \"auto\" },\n py: \"inset.narrow\",\n px: \"inset.default\",\n _hover: {\n borderColor: \"ui.gray.dark\",\n },\n _disabled: {\n ...selectTextInputDisabledStyles,\n _placeholder: {\n color: \"ui.gray.medium\",\n },\n },\n _active: selectTextInputFocusStyles,\n _focus: selectTextInputFocusStyles,\n _placeholder: {\n color: \"ui.gray.dark\",\n fontStyle: \"italic\",\n lineHeight: \"21px\",\n },\n _invalid: {\n border: \"1px solid\",\n borderColor: \"ui.error.primary\",\n boxShadow: \"none\",\n },\n};\n\nconst TextInput = {\n parts: [\"input\", \"textarea\"],\n baseStyle: {\n input,\n textarea: {\n ...input,\n lineheight: \"1.5\",\n minHeight: \"xxl\",\n },\n },\n variants: {\n searchBar: {\n flex: \"1 1 80%\",\n input: {\n borderRightRadius: \"none\",\n },\n },\n searchBarSelect: {\n flex: \"1 1 80%\",\n input: {\n borderRadius: \"none\",\n borderTopLeftRadius: { base: \"sm\", md: \"none\" },\n borderTopRightRadius: { base: \"sm\", md: \"none\" },\n },\n },\n },\n};\n\nexport default TextInput;\n","import { cssVar } from \"@chakra-ui/theme-tools\";\n\nimport { ToggleSizes } from \"../../components/Toggle/Toggle\";\n\ninterface ToggleBaseStyle {\n isDisabled: boolean;\n size: ToggleSizes;\n}\n\nconst toggleBaseStyle = ({ isDisabled, size }: ToggleBaseStyle) => {\n const label = { alignItems: \"start\", display: \"flex\", width: \"fit-content\" };\n const helperErrorText = {\n marginLeft: size === \"default\" ? \"xxl\" : \"xl\",\n fontStyle: isDisabled ? \"italic\" : null,\n };\n return {\n label,\n helperErrorText,\n };\n};\nconst $width = cssVar(\"switch-track-width\");\nconst $height = cssVar(\"switch-track-height\");\n\nconst Switch = {\n baseStyle: ({ size }: { size: string }) => {\n return {\n alignItems: \"start\",\n opacity: 0.4,\n track: {\n backgroundColor: \"ui.gray.medium\",\n border: \"1px solid\",\n borderColor: \"ui.gray.medium\",\n p: \"1px\",\n _checked: {\n bg: \"ui.link.primary\",\n borderColor: \"ui.link.primary\",\n opacity: 1,\n },\n _invalid: {\n bg: \"inherit\",\n borderColor: \"ui.error.primary\",\n \"> span\": {\n bg: \"ui.error.primary\",\n },\n },\n _disabled: {\n bg: \"ui.gray.medium\",\n borderColor: \"ui.gray.medium\",\n _checked: {\n opacity: 0.4,\n },\n },\n _focus: {\n outline: \"2px solid\",\n outlineColor: \"ui.focus\",\n outlineOffset: \"2px\",\n zIndex: \"9999\",\n },\n },\n label: {\n fontSize: \"label.default\",\n marginLeft: \"xs\",\n marginTop: size === \"lg\" ? \"xxxs\" : null,\n _disabled: {\n color: \"ui.gray.dark\",\n fontStyle: \"italic\",\n },\n },\n thumb: {\n _disabled: {\n bg: \"ui.error.primary\",\n },\n },\n };\n },\n sizes: {\n sm: {\n container: {\n // Chakra defaults for `sm`:\n // width: 1.375rem\n // height: 0.75rem\n [$width.variable]: \"2.25rem\",\n [$height.variable]: \"1rem\",\n },\n },\n lg: {\n container: {\n // Chakra defaults for `lg`:\n // width: 2.875rem\n // height: 1.5rem\n [$width.variable]: \"3.25rem\",\n [$height.variable]: \"1.5rem\",\n },\n },\n },\n defaultProps: {\n colorScheme: \"white\",\n },\n};\n\nconst Toggle = {\n parts: [\"helperErrorText\"],\n baseStyle: toggleBaseStyle,\n // Default values\n defaultProps: {\n size: \"lg\",\n },\n};\n\nexport default { Toggle, Switch };\n","const fourByThree = {\n inside: {\n paddingBottom: \"75%\",\n },\n};\n\nconst square = {\n inside: {\n paddingBottom: \"100%\",\n },\n};\n\nconst invalid = {\n backgroundColor: \"ui.gray.light-cool\",\n height: \"auto\",\n padding: \"s\",\n};\n\nconst VideoPlayer = {\n baseStyle: {\n inside: {\n height: \"0\",\n overflow: \"hidden\",\n paddingBottom: \"56.25%\",\n position: \"relative\",\n },\n iframe: {\n height: \"100%\",\n left: \"0\",\n margin: \"auto\",\n position: \"absolute\",\n top: \"0\",\n width: \"100%\",\n },\n helperText: {\n marginBottom: \"0\",\n marginTop: \"xs\",\n },\n },\n variants: {\n fourByThree,\n invalid,\n square,\n },\n};\n\nexport default VideoPlayer;\n","import { extendTheme } from \"@chakra-ui/react\";\n/** Global theme styles */\nimport global from \"./foundations/global\";\nimport breakpoints from \"./foundations/breakpoints\";\nimport colors from \"./foundations/colors\";\nimport radii from \"./foundations/radii\";\nimport shadows from \"./foundations/shadows\";\nimport { spacing } from \"./foundations/spacing\";\nimport typography from \"./foundations/typography\";\n/** Component styles */\nimport Accordion from \"./components/accordion\";\nimport Breadcrumb from \"./components/breadcrumb\";\nimport Button from \"./components/button\";\nimport ButtonGroup from \"./components/buttonGroup\";\nimport Card from \"./components/card\";\nimport Checkbox from \"./components/checkbox\";\nimport ComponentWrapper from \"./components/componentWrapper\";\nimport CheckboxGroup from \"./components/checkboxGroup\";\nimport { CustomImage, CustomImageWrapper } from \"./components/image\";\nimport CustomSelect from \"./components/select\";\nimport DatePicker from \"./components/datePicker\";\nimport Fieldset from \"./components/fieldset\";\nimport Heading from \"./components/heading\";\nimport HelperErrorText from \"./components/helperErrorText\";\nimport Hero from \"./components/hero\";\nimport HorizontalRule from \"./components/horizontalRule\";\nimport Icon from \"./components/icon\";\nimport Label from \"./components/label\";\nimport Link from \"./components/link\";\nimport List from \"./components/list\";\nimport Logo from \"./components/logo\";\nimport NotificationStyles from \"./components/notification\";\nimport Pagination from \"./components/pagination\";\nimport ProgressIndicator from \"./components/progressIndicator\";\nimport Radio from \"./components/radio\";\nimport RadioGroup from \"./components/radioGroup\";\nimport SearchBar from \"./components/searchBar\";\nimport { Skeleton, SkeletonLoader } from \"./components/skeletonLoader\";\nimport SkipNavigation from \"./components/skipNavigation\";\nimport CustomSlider from \"./components/slider\";\nimport StatusBadge from \"./components/statusBadge\";\nimport StructuredContent from \"./components/structuredContent\";\nimport Tabs from \"./components/tabs\";\nimport CustomTable from \"./components/customTable\";\nimport TemplateStyles from \"./components/template\";\nimport Text from \"./components/text\";\nimport TextInput from \"./components/textInput\";\nimport Toggle from \"./components/toggle\";\nimport VideoPlayer from \"./components/videoPlayer\";\n\n/**\n * See Chakra default theme for shape of theme object:\n * https://github.com/chakra-ui/chakra-ui/tree/main/packages/theme\n *\n * The following are using the default configuration from Chakra:\n * - z-indices\n * - radii\n * - blur\n * - shadows\n * - borders\n * - transitions\n *\n * Theme extensions exist for:\n * - breakpoints\n * - colors\n * - typography (font, font size, font weight)\n * - spacing\n */\nconst theme = extendTheme({\n styles: { global },\n breakpoints,\n colors,\n radii,\n shadows,\n space: spacing,\n ...typography,\n /**\n * Chakra documentation on component styles:\n * https://chakra-ui.com/docs/theming/component-style\n */\n components: {\n Accordion,\n Breadcrumb,\n Button,\n ButtonGroup,\n ...Card,\n Checkbox,\n CheckboxGroup,\n ComponentWrapper,\n CustomImage,\n CustomImageWrapper,\n CustomSelect,\n DatePicker,\n Fieldset,\n Heading,\n HelperErrorText,\n Hero,\n HorizontalRule,\n Icon,\n Label,\n Link,\n List,\n Logo,\n ...NotificationStyles,\n Pagination,\n ProgressIndicator,\n Radio,\n RadioGroup,\n SearchBar,\n Skeleton,\n SkeletonLoader,\n SkipNavigation,\n CustomSlider,\n StatusBadge,\n StructuredContent,\n Tabs,\n CustomTable,\n ...TemplateStyles,\n Text,\n TextInput,\n ...Toggle,\n VideoPlayer,\n },\n config: {\n // Use `cssVarPrefix` to set the prefix used on the CSS vars produced by\n // Chakra. By default, Chakra prefixes its own CSS variables with `--chakra`.\n cssVarPrefix: \"nypl\",\n // Start off in the \"light\" mode.\n initialColorMode: \"light\",\n // Don't use the user's system preference. Once the Reservoir\n // has better dark mode variants for its components, this\n // value can be set to true.\n useSystemColorMode: false,\n },\n});\n\nexport default theme;\n","import React from \"react\";\nimport { ChakraProvider, ChakraProviderProps } from \"@chakra-ui/react\";\nimport theme from \"./index\";\n\nconst DSProvider = ({\n children,\n colorModeManager,\n}: React.PropsWithChildren<ChakraProviderProps>) => (\n <ChakraProvider colorModeManager={colorModeManager} theme={theme}>\n {children}\n </ChakraProvider>\n);\n\nexport default DSProvider;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Image, { ComponentImageProps } from \"../Image/Image\";\n\nexport type HeroTypes =\n | \"primary\"\n | \"secondary\"\n | \"secondaryBooksAndMore\"\n | \"secondaryLocations\"\n | \"secondaryResearch\"\n | \"secondaryWhatsOn\"\n | \"tertiary\"\n | \"campaign\"\n | \"fiftyFifty\";\n// Only used for internal purposes.\nexport const heroSecondaryTypes = [\n \"secondary\",\n \"secondaryBooksAndMore\",\n \"secondaryLocations\",\n \"secondaryResearch\",\n \"secondaryWhatsOn\",\n];\nexport interface HeroImageProps\n extends Pick<ComponentImageProps, \"alt\" | \"src\"> {}\nexport interface HeroProps {\n /** Optional hex color value used to override the default background\n * color for a given `Hero` variation.\n * Note: not all `Hero` variations utilize this prop. */\n backgroundColor?: string;\n /** Optional path to an image that will be used as a background image for the\n * `Hero` component.\n * Note: not all `Hero` variations utilize this prop. */\n backgroundImageSrc?: string;\n /** Optional hex color value used to override the default text color for a\n * given `Hero` variation.\n * Note: not all `Hero` variations utilize this prop. */\n foregroundColor?: string;\n /** Optional heading element. */\n heading?: JSX.Element;\n /** Used to control how the `Hero` component will be rendered. */\n heroType?: HeroTypes;\n /** Object used to create and render the `Image` component. Note that only\n * `src` and `alt` are the available attributes to pass. If `imageProps.alt`\n * is left blank, a warning will be logged to the console and will cause\n * accessibility issues. For `imageProps.src`, it will only work for the\n * \"secondary\", \"fiftyFifty\" and \"campaign\" `Hero` types; Note: `imageProps.src`\n * can only be used in conjunction with `backgroundImageSrc` for the \"campaign\"\n * `Hero` type. Note: not all `Hero` variations utilize this prop. */\n imageProps?: HeroImageProps;\n /** Optional details area that contains location data.\n * Note: not all `Hero` variations utilize this prop. */\n locationDetails?: JSX.Element;\n /** Optional string used for the subheader that displays\n * underneath the heading element. */\n subHeaderText?: string | JSX.Element;\n}\n\nexport const Hero = chakra(\n (props: React.PropsWithChildren<HeroProps>) => {\n const {\n backgroundColor,\n backgroundImageSrc,\n foregroundColor,\n heading,\n heroType,\n imageProps = {\n alt: \"\",\n src: \"\",\n },\n locationDetails,\n subHeaderText,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"Hero\", { variant: heroType });\n const headingStyles = styles.heading;\n // We want to add `Hero`-specific styling to the `Heading` component.\n const finalHeading =\n heading && React.cloneElement(heading, { __css: headingStyles });\n let backgroundImageStyle = {};\n let contentBoxStyling = {};\n\n if (imageProps.src && !imageProps.alt) {\n console.warn(\n `NYPL Reservoir Hero: The \"imageProps.src\" prop was passed but the \"imageProps.alt\" props was not. This will make the rendered image inaccessible.`\n );\n }\n\n if (heroType === \"primary\") {\n if (!backgroundImageSrc) {\n console.warn(\n \"NYPL Reservoir Hero: It is recommended to use the `backgroundImageSrc` \" +\n \"prop for the `'primary'` `heroType` variant.\"\n );\n }\n if (imageProps.alt && imageProps.src) {\n console.warn(\n \"NYPL Reservoir Hero: The `imageProps.src` and `imageProps.alt` props have been \" +\n \"passed, but the `'primary'` `heroType` variant will not use it.\"\n );\n }\n } else if (locationDetails) {\n console.warn(\n \"NYPL Reservoir Hero: The `locationDetails` prop should only be used \" +\n \"with the `'primary'` `heroType` variant.\"\n );\n }\n if (heroSecondaryTypes.includes(heroType) && backgroundImageSrc) {\n console.warn(\n \"NYPL Reservoir Hero: The `backgroundImageSrc` prop has been passed, \" +\n \"but the `'secondary'` `heroType` variant will not use it.\"\n );\n }\n if (heroType === \"tertiary\" && (backgroundImageSrc || imageProps.src)) {\n console.warn(\n \"NYPL Reservoir Hero: The `'tertiary'` `heroType` variant hero \" +\n \"will not use any of the image props.\"\n );\n }\n if (heroType === \"campaign\" && (!backgroundImageSrc || !imageProps.src)) {\n console.warn(\n \"NYPL Reservoir Hero: It is recommended to use both the \" +\n \"`backgroundImageSrc` and `imageProps.src` props for the \" +\n \"`'campaign'` `heroType` variant.\"\n );\n }\n if (heroType === \"fiftyFifty\" && backgroundImageSrc) {\n console.warn(\n \"NYPL Reservoir Hero: The `backgroundImageSrc` prop has been passed, \" +\n \"but the `'fiftyFifty'` `heroType` variant hero will not use it.\"\n );\n }\n\n if (heroType === \"primary\") {\n backgroundImageStyle = backgroundImageSrc\n ? { backgroundImage: `url(${backgroundImageSrc})` }\n : {};\n } else if (heroType === \"campaign\") {\n backgroundImageStyle = backgroundImageSrc\n ? { backgroundImage: `url(${backgroundImageSrc})` }\n : { backgroundColor };\n } else if (heroType === \"tertiary\" || heroType === \"fiftyFifty\") {\n backgroundImageStyle = { backgroundColor };\n }\n\n if (!heroSecondaryTypes.includes(heroType)) {\n contentBoxStyling = {\n color: foregroundColor,\n backgroundColor,\n };\n } else if (foregroundColor || backgroundColor) {\n console.warn(\n \"NYPL Reservoir Hero: The `foregroundColor` and/or `backgroundColor` \" +\n \"props have been passed, but the `'secondary'` `heroType` \" +\n \"variant will not use them.\"\n );\n }\n\n const childrenToRender =\n heroType === \"campaign\" ? (\n <>\n <Image alt={imageProps.alt} src={imageProps.src} />\n <Box __css={styles.interior}>\n {finalHeading}\n {subHeaderText}\n </Box>\n </>\n ) : (\n <>\n {heroType !== \"primary\" && heroType !== \"tertiary\" && (\n <Image alt={imageProps.alt} src={imageProps.src} />\n )}\n {finalHeading}\n {heroType === \"tertiary\" && subHeaderText ? (\n <p>{subHeaderText}</p>\n ) : (\n <Box __css={styles.bodyText}>{subHeaderText}</Box>\n )}\n </>\n );\n\n return (\n <Box\n data-testid=\"hero\"\n data-responsive-background-image\n style={backgroundImageStyle}\n __css={styles}\n {...rest}\n >\n <Box\n data-testid=\"hero-content\"\n style={contentBoxStyling}\n __css={styles.content}\n >\n {childrenToRender}\n </Box>\n </Box>\n );\n },\n { shouldForwardProp: () => true }\n);\n\nexport default Hero;\n","// HorizontalRule\nimport { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport interface HorizontalRuleProps {\n /** Optional alignment value to align the horizontal rule to one side or the\n * other when the width is less than 100%. If omitted, the horizontal rule\n * will have a default center alignment. */\n align?: \"left\" | \"right\";\n /** ClassName you can add in addition to `horizontal-rule` */\n className?: string;\n}\n\nexport const HorizontalRule = chakra((props: HorizontalRuleProps) => {\n const { align, className, ...rest } = props;\n const styles = useStyleConfig(\"HorizontalRule\", { align });\n\n const finalStyles = {\n ...styles,\n height: \"2px\",\n width: \"100%\",\n };\n\n return <Box as=\"hr\" className={className} __css={finalStyles} {...rest} />;\n});\n\nexport default HorizontalRule;\n","import { As, Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Heading from \"../Heading/Heading\";\n\nexport type ListTypes = \"ol\" | \"ul\" | \"dl\";\ninterface DescriptionProps {\n term: string;\n description: string | JSX.Element;\n}\nexport interface ListProps {\n /** ClassName you can add in addition to 'list' */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Display the list in a row. */\n inline?: boolean;\n /** Data to render if children are not passed. For `listTypes` orderd `\"ol\"`\n * and unordered `\"ul\"` `List` types, the data structure is an array of strings\n * to renders as `li` items. For descroption `\"dl\"` `List` types, the data\n * structure is an array of objects with `term` and `description` properties\n * to render `dt` and `dd` elements, respectively.\n */\n listItems?: (string | JSX.Element | DescriptionProps)[];\n /** Remove list styling. */\n noStyling?: boolean;\n /** An optional title that will appear over the list. This prop only applies\n * to Description Lists. */\n title?: string;\n /** The type of list: \"ol\", \"ul\", or \"dl\". \"ul\" by default. */\n type: ListTypes;\n}\n\n/**\n * A component that renders list item `li` elements or description item `dt`\n * and `dd` elements based on the `type` prop. Note that the `title` prop will\n * only display for the `Description` list type.\n */\nexport const List = chakra((props: React.PropsWithChildren<ListProps>) => {\n const {\n children,\n className,\n id,\n inline = false,\n listItems,\n noStyling = false,\n title,\n type = \"ul\",\n ...rest\n } = props;\n const styles = useStyleConfig(\"List\", { inline, noStyling, variant: type });\n let listElement = null;\n\n // Either li/dt/dd children elements must be passed or the `listItems`\n // prop must be used.\n if (children && listItems && listItems?.length > 0) {\n console.warn(\n \"NYPL Reservoir List: Pass in either `<li>`, `<dt>`, or `<dd>` \" +\n \"children or use the `listItems` data prop. Do not use both.\"\n );\n return null;\n }\n if (!children && !listItems) {\n console.warn(\n \"NYPL Reservoir List: Pass in either `<li>` children or pass data in \" +\n \"the `listItems` prop, not both.\"\n );\n return null;\n }\n\n /**\n * This returns either the `children` elements passed to the `List` component\n * first, otherwise it will check and render the data passed into the\n * `listItems` props based on the `ListType` type. If it is of type unordered\n * or ordered, it will return `li` elements. Otherwise, it will return a\n * combination of `dt` and `dd` elements for the description type.\n */\n const listChildrenElms = (listType: ListTypes) => {\n if (children) {\n return children;\n }\n if (!listItems) {\n return null;\n }\n if (listType === \"ol\" || listType === \"ul\") {\n return listItems.map((item, i) => <li key={i}>{item}</li>);\n } else if (listType === \"dl\") {\n return (listItems as DescriptionProps[]).map((item, i) => [\n <dt key={`${i}-term`}>{item.term}</dt>,\n <dd key={`${i}-des`}>{item.description}</dd>,\n ]);\n }\n return null;\n };\n /**\n * Checks for `li` elements and consoles a warning if the\n * children are different HTML elements.\n */\n const checkListChildrenError = (listType: ListTypes) => {\n React.Children.map(children as JSX.Element, (child: React.ReactElement) => {\n if (child && child?.type !== \"li\" && child?.props?.mdxType !== \"li\") {\n console.warn(\n `NYPL Reservoir List: Direct children of \\`List\\` (${listType}) must be \\`<li>\\`s.`\n );\n }\n });\n };\n /**\n * Checks for `dt` and `dd` elements and consoles a warning if the\n * children are different HTML elements.\n */\n const checkDescriptionChildrenError = () => {\n React.Children.map(children as JSX.Element, (child: React.ReactElement) => {\n if (\n child.type !== \"dt\" &&\n child.type !== \"dd\" &&\n child.type !== React.Fragment &&\n child.props.mdxType !== \"dt\" &&\n child.props.mdxType !== \"dd\" &&\n child.props.mdxType !== React.Fragment\n ) {\n console.warn(\n \"NYPL Reservoir List: Direct children of `List` (description) must \" +\n \"be `<dt>`s and `<dd>`s.\"\n );\n }\n });\n };\n\n if (type === \"ol\" || type === \"ul\") {\n checkListChildrenError(type);\n listElement = (\n <Box\n as={type as As}\n id={id}\n className={className}\n __css={styles}\n {...rest}\n >\n {listChildrenElms(type)}\n </Box>\n );\n } else if (type === \"dl\") {\n checkDescriptionChildrenError();\n listElement = (\n <Box as=\"section\" id={id} className={className} __css={styles} {...rest}>\n {title && <Heading id={`${id}-heading`}>{title}</Heading>}\n <dl>{listChildrenElms(type)}</dl>\n </Box>\n );\n }\n\n return listElement;\n});\n\nexport default List;\n","/* eslint-disable camelcase */\nimport appleAppStoreBlack from \"../../../icons/svg/logo-apple-app-store-black.svg\";\nimport appleAppStoreWhite from \"../../../icons/svg/logo-apple-app-store-white.svg\";\nimport bplBlack from \"../../../icons/svg/logo-bpl-black.svg\";\nimport bplWhite from \"../../../icons/svg/logo-bpl-white.svg\";\nimport cleverBadgeColor from \"../../../icons/svg/logo-clever-badge-color.svg\";\nimport cleverColor from \"../../../icons/svg/logo-clever-color.svg\";\nimport cleverWhite from \"../../../icons/svg/logo-clever-white.svg\";\nimport firstbookColor from \"../../../icons/svg/logo-firstbook-color.svg\";\nimport firstbookColorNegative from \"../../../icons/svg/logo-firstbook-color-negative.svg\";\nimport googlePlayBlack from \"../../../icons/svg/logo-google-play-black.svg\";\nimport lpaColor from \"../../../icons/svg/logo-lpa-color.svg\";\nimport lpaBlack from \"../../../icons/svg/logo-lpa-black.svg\";\nimport lpaWhite from \"../../../icons/svg/logo-lpa-white.svg\";\nimport mlnBlack from \"../../../icons/svg/logo-mln-black.svg\";\nimport mlnColor from \"../../../icons/svg/logo-mln-color.svg\";\nimport mlnWhite from \"../../../icons/svg/logo-mln-white.svg\";\nimport nyplFullBlack from \"../../../icons/svg/logo-nypl-full-black.svg\";\nimport nyplFullWhite from \"../../../icons/svg/logo-nypl-full-white.svg\";\nimport nyplLionBlack from \"../../../icons/svg/logo-nypl-lion-black.svg\";\nimport nyplLionWhite from \"../../../icons/svg/logo-nypl-lion-white.svg\";\nimport nyplTextBlack from \"../../../icons/svg/logo-nypl-text-black.svg\";\nimport nyplTextWhite from \"../../../icons/svg/logo-nypl-text-white.svg\";\nimport openebooksColor from \"../../../icons/svg/logo-openebooks-color.svg\";\nimport openebooksNegative from \"../../../icons/svg/logo-openebooks-negative.svg\";\nimport openebooksWithTextColor from \"../../../icons/svg/logo-openebooks-with-text-color.svg\";\nimport openebooksWithTextNegative from \"../../../icons/svg/logo-openebooks-with-text-negative.svg\";\nimport qplAltBlack from \"../../../icons/svg/logo-qpl-alt-black.svg\";\nimport qplAltWhite from \"../../../icons/svg/logo-qpl-alt-white.svg\";\nimport qplBlack from \"../../../icons/svg/logo-qpl-black.svg\";\nimport qplColor from \"../../../icons/svg/logo-qpl-color.svg\";\nimport qplWhite from \"../../../icons/svg/logo-qpl-white.svg\";\nimport reservoirIconColor from \"../../../icons/svg/logo-reservoir-icon-color.svg\";\nimport reservoirVerticalColor from \"../../../icons/svg/logo-reservoir-vertical-color.svg\";\nimport schomburgBlack from \"../../../icons/svg/logo-schomburg-black.svg\";\nimport schomburgCircleBlack from \"../../../icons/svg/logo-schomburg-circle-black.svg\";\nimport schomburgCircleColor from \"../../../icons/svg/logo-schomburg-circle-color.svg\";\nimport schomburgCircleWhite from \"../../../icons/svg/logo-schomburg-circle-white.svg\";\nimport schomburgColor from \"../../../icons/svg/logo-schomburg-color.svg\";\nimport schomburgWhite from \"../../../icons/svg/logo-schomburg-white.svg\";\nimport simplyeBlack from \"../../../icons/svg/logo-simplye-black.svg\";\nimport simplyeWhite from \"../../../icons/svg/logo-simplye-white.svg\";\nimport simplyeColor from \"../../../icons/svg/logo-simplye-color.svg\";\nimport snflBlack from \"../../../icons/svg/logo-snfl-black.svg\";\nimport snflWhite from \"../../../icons/svg/logo-snfl-white.svg\";\nimport treasuresColor from \"../../../icons/svg/logo-treasures-color.svg\";\nimport treasuresColorNegative from \"../../../icons/svg/logo-treasures-color-negative.svg\";\n\nexport default {\n appleAppStoreBlack,\n appleAppStoreWhite,\n bplBlack,\n bplWhite,\n cleverBadgeColor,\n cleverColor,\n cleverWhite,\n firstbookColor,\n firstbookColorNegative,\n googlePlayBlack,\n lpaBlack,\n lpaColor,\n lpaWhite,\n mlnBlack,\n mlnColor,\n mlnWhite,\n nyplFullBlack,\n nyplFullWhite,\n nyplLionBlack,\n nyplLionWhite,\n nyplTextBlack,\n nyplTextWhite,\n openebooksColor,\n openebooksNegative,\n openebooksWithTextColor,\n openebooksWithTextNegative,\n qplAltBlack,\n qplAltWhite,\n qplBlack,\n qplColor,\n qplWhite,\n reservoirIconColor,\n reservoirVerticalColor,\n schomburgBlack,\n schomburgCircleBlack,\n schomburgCircleColor,\n schomburgCircleWhite,\n schomburgColor,\n schomburgWhite,\n simplyeBlack,\n simplyeWhite,\n simplyeColor,\n snflBlack,\n snflWhite,\n treasuresColor,\n treasuresColorNegative,\n};\n","import {\n Box,\n chakra,\n Icon as ChakraIcon,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport logoSvgs from \"./LogoSvgs\";\n\nexport type LogoNames =\n | \"appleAppStoreBlack\"\n | \"appleAppStoreWhite\"\n | \"bplBlack\"\n | \"bplWhite\"\n | \"cleverBadgeColor\"\n | \"cleverColor\"\n | \"cleverWhite\"\n | \"firstbookColor\"\n | \"firstbookColorNegative\"\n | \"googlePlayBlack\"\n | \"lpaBlack\"\n | \"lpaColor\"\n | \"lpaWhite\"\n | \"mlnBlack\"\n | \"mlnColor\"\n | \"mlnWhite\"\n | \"nyplFullBlack\"\n | \"nyplFullWhite\"\n | \"nyplLionBlack\"\n | \"nyplLionWhite\"\n | \"nyplTextBlack\"\n | \"nyplTextWhite\"\n | \"openebooksColor\"\n | \"openebooksNegative\"\n | \"openebooksWithTextColor\"\n | \"openebooksWithTextNegative\"\n | \"qplAltBlack\"\n | \"qplAltWhite\"\n | \"qplBlack\"\n | \"qplColor\"\n | \"qplWhite\"\n | \"reservoirIconColor\"\n | \"reservoirVerticalColor\"\n | \"schomburgBlack\"\n | \"schomburgCircleBlack\"\n | \"schomburgCircleColor\"\n | \"schomburgCircleWhite\"\n | \"schomburgColor\"\n | \"schomburgWhite\"\n | \"simplyeBlack\"\n | \"simplyeWhite\"\n | \"simplyeColor\"\n | \"snflBlack\"\n | \"snflWhite\"\n | \"treasuresColor\"\n | \"treasuresColorNegative\";\nexport type LogoSizes =\n | \"default\"\n | \"xxsmall\"\n | \"xsmall\"\n | \"small\"\n | \"medium\"\n | \"large\";\nexport interface LogoProps {\n /** Optional className that will be added to the parent element */\n className?: string;\n /** Logos designated as decorative will be ignored by screenreaders. False\n * by default. */\n decorative?: boolean;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** The name of the logo you want to use. */\n name?: LogoNames;\n /** Sets the logo size. */\n size?: LogoSizes;\n /** For accessibility purposes, the text passed in the `title` prop gets\n * rendered in a `title` element in the SVG. This descriptive text is not\n * visible but is needed for screenreaders to describe the graphic. */\n title?: string;\n}\n\n/**\n * The `Logo` component renders SVG-based logos and color variants that are\n * commonly used by the New York Public Library.\n */\nexport const Logo = chakra((props: React.PropsWithChildren<LogoProps>) => {\n const {\n children,\n className,\n decorative = false,\n id,\n name,\n size = \"medium\",\n title = `${name} logo`,\n ...rest\n } = props;\n const styles = useStyleConfig(\"Logo\", {\n size,\n });\n const logoProps = {\n \"aria-hidden\": decorative,\n className,\n id,\n role: \"img\",\n title,\n ...rest,\n };\n let childSVG = null;\n\n // Component prop validation\n if (name && children) {\n console.warn(\n \"NYPL Reservoir Logo: Pass either a `name` prop or an `svg` element \" +\n \"child. Do not pass both.\"\n );\n return null;\n } else if (!name && !children) {\n console.warn(\n \"NYPL Reservoir Logo: Pass a logo `name` prop or an SVG child to \" +\n \"`Logo` to ensure a logo appears.\"\n );\n return null;\n }\n\n // The user wants to render an existing logo. Load the logo and render it\n // as a component through Chakra's Icon component. Otherwise, we're going to\n // render the SVG child with NYPL-theme styling.\n if (name) {\n const SvgComponent: any = logoSvgs[name];\n return <ChakraIcon as={SvgComponent} {...logoProps} __css={styles} />;\n }\n\n // If no `name` prop was passed, we expect a child SVG element to be passed.\n // Apply logo props to the SVG child.\n if (\n (children as JSX.Element).type === \"svg\" ||\n (children as JSX.Element).props?.type === \"svg\" ||\n (children as JSX.Element).props?.mdxType === \"svg\"\n ) {\n childSVG = React.cloneElement(children as JSX.Element, {\n ...logoProps,\n });\n } else {\n console.warn(\n \"NYPL Reservoir Logo: An `svg` element must be passed to the `Logo` \" +\n \"component as its child.\"\n );\n }\n\n return <Box __css={styles}>{childSVG}</Box>;\n});\n\nexport default Logo;\n","import {\n chakra,\n Modal as ChakraModal,\n ModalOverlay,\n ModalContent,\n ModalHeader,\n ModalFooter,\n ModalBody,\n ModalCloseButton,\n useDisclosure,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Button from \"../Button/Button\";\nimport ButtonGroup from \"../ButtonGroup/ButtonGroup\";\nimport useNYPLBreakpoints from \"../../hooks/useNYPLBreakpoints\";\n\ninterface BaseModalProps {\n bodyContent?: string | JSX.Element;\n closeButtonLabel?: string;\n headingText?: string | JSX.Element;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n isOpen?: boolean;\n onClose?: () => void;\n}\n\nexport interface ModalProps {\n buttonText?: string;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n modalProps: BaseModalProps;\n}\n\nconst BaseModal = chakra(\n ({\n bodyContent,\n closeButtonLabel = \"Close\",\n headingText,\n id,\n isOpen,\n onClose,\n ...rest\n }: React.PropsWithChildren<BaseModalProps>) => {\n const xlarge = \"xl\";\n const fullSize = \"full\";\n const { isLargerThanMobile } = useNYPLBreakpoints();\n // For larger screens, set the size to xl, otherwise set it to full.\n const size = isLargerThanMobile ? xlarge : fullSize;\n\n return (\n <ChakraModal\n id={id}\n isOpen={isOpen}\n onClose={onClose}\n scrollBehavior=\"inside\"\n size={size}\n {...rest}\n >\n <ModalOverlay />\n <ModalContent>\n <ModalHeader>{headingText}</ModalHeader>\n <ModalCloseButton />\n <ModalBody>{bodyContent}</ModalBody>\n\n <ModalFooter>\n <ButtonGroup>\n <Button id=\"modal-close-btn\" onClick={onClose}>\n {closeButtonLabel}\n </Button>\n </ButtonGroup>\n </ModalFooter>\n </ModalContent>\n </ChakraModal>\n );\n }\n);\n\n/**\n * The `ModalTrigger` component renders a button that you click to open the\n * internal `Modal` component. Note that props to update the internal `Modal`\n * component are passed through to the `modalProps` prop.\n */\nexport const ModalTrigger = chakra(\n ({\n buttonText,\n id,\n modalProps,\n ...rest\n }: React.PropsWithChildren<ModalProps>) => {\n const { isOpen, onOpen, onClose } = useDisclosure();\n const finalOnCloseHandler = () => {\n modalProps.onClose && modalProps.onClose();\n onClose();\n };\n return (\n <>\n <Button id=\"modal-open-btn\" onClick={onOpen}>\n {buttonText}\n </Button>\n\n <BaseModal\n bodyContent={modalProps.bodyContent}\n closeButtonLabel={modalProps.closeButtonLabel}\n headingText={modalProps.headingText}\n id={id}\n isOpen={isOpen}\n onClose={finalOnCloseHandler}\n {...rest}\n />\n </>\n );\n }\n);\n\n/**\n * This hook function can be used to render the `Modal` component with a custom\n * open button(s) and optional custom close button(s). You must render your own\n * button and pass the appropriate `onOpen` and ` handler for the modal to open.\n */\nexport function useModal() {\n const { isOpen, onClose, onOpen } = useDisclosure();\n const Modal = chakra(\n ({\n bodyContent,\n closeButtonLabel,\n headingText,\n id,\n ...rest\n }: React.PropsWithChildren<BaseModalProps>) => {\n return (\n <BaseModal\n bodyContent={bodyContent}\n closeButtonLabel={closeButtonLabel}\n headingText={headingText}\n id={id}\n isOpen={isOpen}\n onClose={onClose}\n {...rest}\n />\n );\n }\n );\n\n return { onClose, onOpen, Modal };\n}\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport React, { useState } from \"react\";\n\nimport Button from \"../Button/Button\";\nimport Heading from \"../Heading/Heading\";\nimport Icon, { IconColors, IconNames, IconSizes } from \"../Icons/Icon\";\n\nexport type NotificationTypes = \"standard\" | \"announcement\" | \"warning\";\ninterface BaseProps {\n /** Optional prop to control text alignment in `NotificationContent` */\n alignText?: boolean;\n /** Optional custom `Icon` that will override the default `Icon`. */\n icon?: JSX.Element;\n /** ID that other components can cross reference for accessibility purposes. */\n id?: string;\n /** Optional prop to control horizontal alignment of the `Notification` content */\n isCentered?: boolean;\n /** Optional prop to control the coloring of the `Notification` text and the\n * visibility of an applicable icon. */\n notificationType?: NotificationTypes;\n}\n\n// Used for `NotificationHeading` and `Notification`\ntype BasePropsWithoutAlignText = Omit<BaseProps, \"alignText\">;\n// Used for `NotificationContent`\ntype BasePropsWithoutIsCentered = Omit<BaseProps, \"isCentered\">;\n\nexport interface NotificationProps extends BasePropsWithoutAlignText {\n /** Label used to describe the `Notification`'s aside HTML element. */\n ariaLabel?: string;\n /** Additional `className` to add. */\n className?: string;\n /** Optional prop to control whether a `Notification` can be dismissed\n * (closed) by a user. */\n dismissible?: boolean;\n /** Optional custom `Icon` that will override the default `Icon`. */\n icon?: JSX.Element;\n /** Optional prop to control the margin around the `Notification` component. */\n noMargin?: boolean;\n /** Content to be rendered in a `NotificationContent` component. */\n notificationContent: string | JSX.Element;\n /** Content to be rendered in a `NotificationHeading` component. */\n notificationHeading?: string;\n /** Prop to display the `Notification` icon. Defaults to `true`. */\n showIcon?: boolean;\n}\n\n/**\n * NotificationHeading child-component.\n */\nexport const NotificationHeading = chakra(\n (props: React.PropsWithChildren<BasePropsWithoutAlignText>) => {\n const { children, icon, id, isCentered, notificationType, ...rest } = props;\n const styles = useMultiStyleConfig(\"NotificationHeading\", {\n icon,\n isCentered,\n notificationType,\n });\n return (\n <Box as=\"header\" __css={styles} {...rest}>\n {icon}\n <Heading id={`${id}-heading`} level=\"four\" __css={styles.heading}>\n {children}\n </Heading>\n </Box>\n );\n }\n);\n\n/**\n * NotificationContent child-component.\n */\nexport const NotificationContent = chakra(\n (props: React.PropsWithChildren<BasePropsWithoutIsCentered>) => {\n const { alignText, children, icon, notificationType, ...rest } = props;\n const styles = useMultiStyleConfig(\"NotificationContent\", {\n alignText,\n icon,\n notificationType,\n });\n return (\n <Box __css={styles} {...rest}>\n {icon}\n <Box __css={styles.content}>{children}</Box>\n </Box>\n );\n }\n);\n\n/**\n * Component used to present users with three different levels of notifications:\n * standard, announcement, and warning.\n */\nexport const Notification = chakra((props: NotificationProps) => {\n const {\n ariaLabel,\n className,\n dismissible = false,\n icon,\n id,\n isCentered = false,\n noMargin = false,\n notificationContent,\n notificationHeading,\n notificationType = \"standard\",\n showIcon = true,\n ...rest\n } = props;\n const [isOpen, setIsOpen] = useState(true);\n const handleClose = () => setIsOpen(false);\n const styles = useMultiStyleConfig(\"Notification\", {\n dismissible,\n isCentered,\n noMargin,\n notificationType,\n });\n const iconElement = () => {\n const baseIconProps = {\n size: \"large\" as IconSizes,\n __css: styles.icon,\n };\n // If the icon should not display, return undefined.\n if (!showIcon) {\n return undefined;\n }\n // If a custom icon is passed, add specific `Notification` styles.\n if (icon)\n return React.cloneElement(icon, {\n id: `${id}-custom-notification-icon`,\n ...baseIconProps,\n });\n interface IconProps {\n color: IconColors;\n name: IconNames;\n title: string;\n }\n const iconProps = {\n announcement: {\n color: \"section.research.secondary\",\n name: \"speakerNotes\",\n title: \"Notification announcement icon\",\n } as IconProps,\n standard: {\n color: \"ui.black\",\n name: \"alertNotificationImportant\",\n title: \"Notification standard icon\",\n } as IconProps,\n warning: {\n color: \"brand.primary\",\n name: \"errorFilled\",\n title: \"Notification warning icon\",\n } as IconProps,\n };\n return (\n <Icon\n id={`${id}-notification-icon`}\n {...iconProps[notificationType]}\n {...baseIconProps}\n />\n );\n };\n const dismissibleButton = dismissible && (\n <Button\n aria-label=\"Close the notification\"\n buttonType=\"link\"\n id={`${id}-notification-dismissible-button`}\n onClick={handleClose}\n __css={styles.dismissibleButton}\n >\n <Icon\n id={`${id}-dismissible-notification-icon`}\n name=\"close\"\n size=\"large\"\n title=\"Notification close icon\"\n />\n </Button>\n );\n const iconElem = iconElement();\n const childHeading = notificationHeading && (\n <NotificationHeading\n icon={iconElem}\n id={id}\n isCentered={isCentered}\n notificationType={notificationType}\n >\n {notificationHeading}\n </NotificationHeading>\n );\n // Specific alignment styles for the content.\n const alignText = !!(childHeading && showIcon && (!!icon || !isCentered));\n const childContent = (\n <NotificationContent\n alignText={alignText}\n icon={!childHeading ? iconElem : undefined}\n notificationType={notificationType}\n >\n {notificationContent}\n </NotificationContent>\n );\n\n // If the `Notification` is closed, don't render anything.\n if (!isOpen) {\n return null;\n }\n return (\n <Box\n aria-label={ariaLabel}\n as=\"aside\"\n className={className}\n data-type={notificationType}\n id={id}\n __css={styles}\n {...rest}\n >\n <Box __css={styles.container}>\n {childHeading}\n {childContent}\n </Box>\n {dismissibleButton}\n </Box>\n );\n});\n\nexport default Notification;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport React, { useState, useRef } from \"react\";\n\nimport Link from \"../Link/Link\";\nimport List from \"../List/List\";\nimport { range } from \"../../utils/utils\";\n\nexport interface PaginationProps {\n /** Additional className. */\n className?: string;\n /** The currentPage can be used to programatically force the selected page to change\n * without the user explicitly requesting it – for example, if the user should be\n * brought back to the first page of a set of results after a new search. */\n currentPage?: number;\n /** The callback function that takes a page number and returns a string\n * to use for a link's `href` attribute. This is used when the current\n * page should refresh when navigating. */\n getPageHref?: undefined | ((pageNumber: number) => string);\n /** ID that other components can cross reference for accessibility purposes. */\n id?: string;\n /** The initially selected page (default value is 1). */\n initialPage?: number;\n /** The callback function called when an item is selected and the current\n * page should not refresh. */\n onPageChange?: (selected: number) => void;\n /** The total number of pages. */\n pageCount: number;\n}\n\n/**\n * A component that provides a navigational list of page items.\n */\nexport const Pagination = chakra((props: PaginationProps) => {\n const {\n className,\n currentPage,\n getPageHref,\n id,\n initialPage = 1,\n onPageChange,\n pageCount,\n ...rest\n } = props;\n const refCurrentPage = useRef(currentPage);\n const [selectedPage, setSelectedPage] = useState<number>(initialPage);\n const styles = useMultiStyleConfig(\"Pagination\", {});\n const previousPageNumber = selectedPage - 1;\n const nextPageNumber = selectedPage + 1;\n\n // If the parent passes down a new currentPage, and an onPageChange\n // function exists, then set the internal state – selectedPage –\n // to the new currentPage and update the refCurrentPage with that value.\n React.useEffect(() => {\n if (onPageChange && currentPage && currentPage !== refCurrentPage.current) {\n setSelectedPage(currentPage);\n refCurrentPage.current = currentPage;\n }\n }, [currentPage, onPageChange]);\n\n // If there are 0 or 1 page, the pagination should not show.\n if (pageCount <= 1) {\n return null;\n }\n if (getPageHref && onPageChange) {\n console.warn(\n \"NYPL Reservoir Pagination: Props for both `getPageHref` and \" +\n \"`onPageChange` are passed. The component will default to using \" +\n \"`getPageHref`.\"\n );\n }\n\n if (getPageHref && currentPage) {\n console.warn(\n \"NYPL Reservoir Pagination: The `currentPage` prop does not work with \" +\n \"the `getPageHref` prop. Use `currentPage` with `onPageChange` instead.\"\n );\n }\n\n // If `getPageHref` was passed, then links should go to a new page.\n const changeUrls =\n typeof getPageHref !== \"undefined\" && typeof getPageHref === \"function\";\n /**\n * This function is only called when clicking on a link should\n * not update the URL or refresh the page.\n */\n const handlePageClick = (e: Event, clickedPage: number) => {\n e.preventDefault && e.preventDefault();\n if (selectedPage === clickedPage) return;\n setSelectedPage(clickedPage);\n onPageChange && onPageChange(clickedPage);\n };\n // Select the previous page.\n const previousPage = (e: Event) => {\n if (selectedPage > 1) {\n handlePageClick(e, previousPageNumber);\n }\n };\n // Select the next page.\n const nextPage = (e: Event) => {\n if (selectedPage < pageCount) {\n handlePageClick(e, nextPageNumber);\n }\n };\n /**\n * All `Link` components have similar attributes but we need to differentiate\n * between the \"previous\", \"next\", and regular number links.\n * 1. If `getPageHref` is passed, this means that the page refreshes and the\n * URL changes. In this case, the parent component returns the `href` URL\n * and the `onClick` callback is undefined.\n * 2. Otherwise, we stay on the same page by setting the `href` attribute to\n * \"#\" and call the `onPageChange` prop through the `onClick` callback.\n */\n const getLinkElement = (\n type: \"items\" | \"previous\" | \"next\",\n item?: number\n ) => {\n const isSelectedPage = selectedPage === item;\n // The current page link has different styles.\n const currentStyles = isSelectedPage\n ? {\n color: \"ui.black\",\n pointerEvent: \"none\",\n }\n : {};\n const allAttrs = {\n items: {\n href: changeUrls ? getPageHref(item as number) : \"#\",\n attributes: {\n \"aria-label\": `Page ${item}`,\n \"aria-current\": isSelectedPage ? \"page\" : null,\n onClick: changeUrls\n ? undefined\n : (e: Event) => handlePageClick(e, item as number),\n },\n text: item,\n },\n previous: {\n href: changeUrls ? getPageHref(previousPageNumber) : \"#\",\n attributes: {\n \"aria-label\": \"Previous page\",\n onClick: changeUrls ? undefined : previousPage,\n },\n text: \"Previous\",\n },\n next: {\n href: changeUrls ? getPageHref(nextPageNumber) : \"#\",\n attributes: {\n \"aria-label\": \"Next page\",\n onClick: changeUrls ? undefined : nextPage,\n },\n text: \"Next\",\n },\n };\n const linkAttrs = allAttrs[type];\n return (\n <Link\n href={linkAttrs.href}\n id={`${id}-${linkAttrs.text}`}\n {...linkAttrs.attributes}\n __css={{\n ...styles.link,\n ...currentStyles,\n }}\n >\n {linkAttrs.text}\n </Link>\n );\n };\n\n /**\n * This function returns an array of `li` elements with numbers based on the\n * total pages that `Pagination` should display. When there are many pages to\n * display, ellipsis are shown to signify that the intermediate page numbers\n * are hidden.\n * For a small number of pages, the array will be simple.\n * For a large number of pages, the resulting array will be in the shape of:\n * [\n * 1, this always displays\n * 2 or an ellipsis,\n * a range of numbers in the middle of the total count,\n * pageCount - 1 or an ellipsis,\n * pageCount, the total number of pages\n * ]\n */\n const getPaginationNumbers = (selected: number) => {\n // Where should the middle range of numbers start at?\n const middleRangeStart = Math.max(\n // Start at three if the current page is near the beginning.\n 3,\n Math.min(\n // If the current page is in the middle, start the range\n // one number before the current page.\n selected - 1,\n // If the current page is near the end, show the last five items.\n pageCount - 4\n )\n );\n // Where should the middle range of numbers end at?\n const middleRangeEnd = Math.min(\n // If the current page is near the end, end the range\n // two place before the last page number.\n pageCount - 2,\n Math.max(\n // If the current page is in the middle, end the range\n // one number after the current page.\n selected + 1,\n // If the current page is near the end, show the first five items.\n 5\n )\n );\n const itemList =\n pageCount < 4\n ? // Get a short array with 2 or 3 items: [1, 2] or [1, 2, 3]\n Array.from({ length: pageCount }, (_, i) => i + 1)\n : // Otherwise, create the longer array of items.\n [\n // Always display the first page.\n 1,\n // The second item will be 2 or an ellipse.\n middleRangeStart > 3 ? \"ellipse-start\" : 2,\n // The middle range of page numbers to display.\n // Add +1 to the end since range() doesn't include the last number.\n ...range(middleRangeStart, middleRangeEnd + 1),\n // The next to last item will be the next to last\n // number or an ellipse.\n middleRangeEnd < pageCount - 2 ? \"ellipse-end\" : pageCount - 1,\n // Always display the last page.\n pageCount,\n ];\n // If it's a number, render an `li` element with a link page item,\n // otherwise return the `li` with the ellipse for a break.\n const pageLiItems = itemList.map((item) => {\n const itemElement =\n typeof item === \"number\" ? getLinkElement(\"items\", item) : \"...\";\n return <li key={item}>{itemElement}</li>;\n });\n\n return pageLiItems;\n };\n\n // Don't display the previous link when you're on the first page.\n const previousLiLink = selectedPage !== 1 && (\n <li key=\"previous\">{getLinkElement(\"previous\")}</li>\n );\n // Don't display the next link when you're on the last page.\n const nextLiLink = selectedPage !== pageCount && (\n <li key=\"next\">{getLinkElement(\"next\")}</li>\n );\n\n return (\n <Box\n as=\"nav\"\n id={id}\n aria-label=\"Pagination\"\n role=\"navigation\"\n className={className}\n __css={styles}\n {...rest}\n >\n <List type=\"ul\" inline noStyling id={`${id}-list`}>\n {previousLiLink}\n {getPaginationNumbers(selectedPage)}\n {nextLiLink}\n </List>\n </Box>\n );\n});\n\nexport default Pagination;\n","import {\n Box,\n chakra,\n CircularProgress as ChakraCircularProgress,\n CircularProgressLabel as ChakraCircularProgressLabel,\n Progress as ChakraProgress,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport React from \"react\";\n\nimport Label from \"../Label/Label\";\n\nexport type ProgressIndicatorSizes = \"default\" | \"small\";\nexport type ProgressIndicatorTypes = \"circular\" | \"linear\";\nexport interface ProgressIndicatorProps {\n /** Flag to render the component in a dark background. */\n darkMode?: boolean;\n /** ID that other components can cross reference for accessibility purposes. */\n id: string;\n /** Whether the `ProgressIndicator` should be linear or circular. */\n indicatorType?: ProgressIndicatorTypes;\n /** Whether the progress animation should display because the `value` prop is\n * not known. When this is set to `true`, the `value` prop will be ignored. */\n isIndeterminate?: boolean;\n /** The text to display in an HTML `label` element. */\n labelText: string;\n /** Visually show or hide the label text. When set to `false`, then the label\n * text will be added to the parent component as its `aria-label` attribute. */\n showLabel?: boolean;\n /** The size of the linear or circular progress. */\n size?: ProgressIndicatorSizes;\n /** A number between 0 to 100 that defines the progress' value. */\n value?: number;\n}\n\n/**\n * A component that displays a progress status for any task that takes a long\n * time to complete or consists of multiple steps. Examples include downloading,\n * uploading, or processing.\n */\nexport const ProgressIndicator = chakra((props: ProgressIndicatorProps) => {\n const {\n darkMode = false,\n id,\n indicatorType = \"linear\",\n isIndeterminate = false,\n labelText,\n showLabel = true,\n size = \"default\",\n value = 0,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"ProgressIndicator\", {\n darkMode,\n size,\n });\n let finalValue = value;\n if (!id) {\n console.warn(\n \"NYPL Reservoir Progress Indicator: This component's required `id` prop was not passed.\"\n );\n }\n if (finalValue < 0 || finalValue > 100) {\n console.warn(\n \"NYPL Reservoir ProgressIndicator: An invalid value was passed for the\" +\n \" `value` prop, so 0 will be used. A valid value should be a number\" +\n \" between 0 and 100.\"\n );\n finalValue = 0;\n }\n const progressProps = {\n id,\n // If the label is visually shown, associate it with the progress indicator.\n // Otherwise, the `aria-label` will be added.\n \"aria-label\": showLabel ? undefined : labelText,\n \"aria-labelledby\": showLabel ? `${id}-label` : undefined,\n // If `isIndeterminate` is true, then it overrides the `value` prop.\n isIndeterminate: isIndeterminate || undefined,\n value: isIndeterminate ? undefined : finalValue,\n };\n const progressComponent = (indicatorType: ProgressIndicatorTypes) => {\n // Only display the percentage text for the default size, not in the\n // indeterminate state, and when `showLabel` is true.\n if (indicatorType === \"circular\") {\n // For the small size, since the label won't be visible, we need to add\n // it to the parent component's `aria-label` attribute.\n if (size === \"small\") {\n progressProps[\"aria-label\"] = labelText;\n }\n return (\n <Box __css={styles.circularContainer}>\n <ChakraCircularProgress {...progressProps} sx={styles.circular}>\n {showLabel && !isIndeterminate && size !== \"small\" && (\n <ChakraCircularProgressLabel>\n {finalValue}%\n </ChakraCircularProgressLabel>\n )}\n </ChakraCircularProgress>\n {showLabel && size !== \"small\" && (\n <Label id={`${id}-label`} htmlFor={id}>\n {labelText}\n </Label>\n )}\n </Box>\n );\n }\n // The Linear progress indicator is the default.\n return (\n <>\n {showLabel && (\n <Label id={`${id}-label`} htmlFor={id}>\n {labelText}\n </Label>\n )}\n <Box __css={styles.linearContainer}>\n <ChakraProgress {...progressProps} sx={styles.linear} />\n {showLabel && !isIndeterminate && (\n <Box __css={styles.linearPercentage}>{finalValue}%</Box>\n )}\n </Box>\n </>\n );\n };\n\n return (\n <Box __css={styles} {...rest}>\n {progressComponent(indicatorType)}\n </Box>\n );\n});\n\nexport default ProgressIndicator;\n","import {\n Box,\n chakra,\n Radio as ChakraRadio,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport { getAriaAttrs } from \"../../utils/utils\";\n\nexport interface RadioProps {\n /** Additional class name. */\n className?: string;\n /** Optional string to populate the HelperErrorText for the standard state. */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the HelperErrorText for the error state\n * when `isInvalid` is true.\n */\n invalidText?: HelperErrorTextType;\n /** When using the Radio as a \"controlled\" form element, you can specify the\n * `Radio`'s checked state using this prop. You must also pass an onChange prop.\n * Learn more about controlled and uncontrolled form fields: https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */\n isChecked?: boolean;\n /** Adds the 'disabled' and `aria-disabled` attributes to the input when true.\n * This also makes the text italic and color scheme gray. */\n isDisabled?: boolean;\n /** Adds the 'aria-invalid' attribute to the input when true. This also makes\n * the color theme \"NYPL error\" red for the button and text. */\n isInvalid?: boolean;\n /** Adds the 'required' attribute to the input when true. */\n isRequired?: boolean;\n /** The radio button's label. This will serve as the text content for the\n * `<label>` element if `showlabel` is true, or an \"aria-label\" if `showLabel`\n * is false. */\n labelText: string | JSX.Element;\n /** Used to reference the input element in forms. */\n name?: string;\n /** Should be passed along with `isChecked` for controlled components. */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the radio's label onscreen or hide it. Refer\n * to the `labelText` property for more information. */\n showLabel?: boolean;\n /** Populates the value of the input. */\n value?: string;\n}\n\nexport const Radio = chakra(\n React.forwardRef<HTMLInputElement, RadioProps>((props, ref?) => {\n const {\n className,\n helperText,\n id,\n invalidText,\n isChecked,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n name,\n onChange,\n showHelperInvalidText = true,\n showLabel = true,\n value,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"Radio\", { showLabel });\n const footnote = isInvalid ? invalidText : helperText;\n const ariaAttributes = getAriaAttrs({\n footnote,\n id,\n labelText,\n name: \"Radio\",\n showLabel,\n });\n // We can't use the aria-label because of how Chakra renders its\n // Radio component. Instead, we'll visually hide the label.\n delete ariaAttributes[\"aria-label\"];\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Radio: This component's required `id` prop was not passed.\"\n );\n }\n\n return (\n <ComponentWrapper\n helperText={helperText}\n helperTextStyles={styles.helperErrorText}\n id={id}\n invalidText={invalidText}\n isInvalid={isInvalid}\n showHelperInvalidText={showHelperInvalidText}\n {...rest}\n >\n <ChakraRadio\n className={className}\n id={id}\n isChecked={isChecked}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n name={name}\n onChange={onChange}\n ref={ref}\n value={value}\n alignItems=\"flex-start\"\n __css={styles}\n {...ariaAttributes}\n >\n <Box as=\"span\" __css={showLabel ? {} : styles.hiddenLabel}>\n {labelText}\n </Box>\n </ChakraRadio>\n </ComponentWrapper>\n );\n })\n);\n\nexport default Radio;\n","import {\n chakra,\n RadioGroup as ChakraRadioGroup,\n Stack,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Fieldset from \"../Fieldset/Fieldset\";\nimport HelperErrorText, {\n HelperErrorTextType,\n} from \"../HelperErrorText/HelperErrorText\";\nimport { spacing } from \"../../theme/foundations/spacing\";\nimport Radio from \"../Radio/Radio\";\nimport { LayoutTypes } from \"../../helpers/types\";\n\nexport interface RadioGroupProps {\n /** Additional class name. */\n className?: string;\n /** Populates the initial value of the input */\n defaultValue?: string;\n /** Optional string to populate the HelperErrorText for standard state */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the HelperErrorText for error state */\n invalidText?: HelperErrorTextType;\n /** Adds the 'disabled' prop to the input when true. */\n isDisabled?: boolean;\n /** Set's the `Radio`s' wrapper to be full width. */\n isFullWidth?: boolean;\n /** Adds the 'aria-invalid' attribute to the input and\n * sets the error state when true. */\n isInvalid?: boolean;\n /** Adds the 'required' attribute to the input when true. */\n isRequired?: boolean;\n /** The radio group label displayed in a `legend` element if `showlabel` is\n * true, or an \"aria-label\" if `showLabel` is false. */\n labelText: string;\n /** Renders the Radio buttons in a row or column (default). */\n layout?: LayoutTypes;\n /** The `name` prop indicates the form group for all the Radio children. */\n name: string;\n /** The action to perform on the `<input>`'s onChange function */\n onChange?: (value: string) => void;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the group's legend onscreen or hide it. Refer\n * to the `labelText` property for more information. */\n showLabel?: boolean;\n /** Whether or not to display the \"(Required)\" text in the label text.\n * True by default. */\n showRequiredLabel?: boolean;\n}\n\nconst noop = () => {};\n\n/**\n * RadioGroup is a wrapper for DS `Radio` components that renders as a fieldset\n * HTML element along with optional helper text. The `name` prop is essential\n * for this form group element and is not needed for individual DS `Radio`\n * components when `RadioGroup` is used.\n */\nexport const RadioGroup = chakra(\n React.forwardRef<HTMLInputElement, React.PropsWithChildren<RadioGroupProps>>(\n (props, ref?) => {\n const {\n children,\n className = \"\",\n defaultValue,\n helperText,\n id,\n invalidText,\n isDisabled = false,\n isFullWidth = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n layout = \"column\",\n name,\n onChange,\n showHelperInvalidText = true,\n showLabel = true,\n showRequiredLabel = true,\n ...rest\n } = props;\n const [value, setValue] = React.useState(defaultValue);\n const footnote: HelperErrorTextType = isInvalid\n ? invalidText\n : helperText;\n const spacingProp = layout === \"column\" ? spacing.s : spacing.l;\n const newChildren: JSX.Element[] = [];\n // Get the Chakra-based styles for the custom elements in this component.\n const styles = useMultiStyleConfig(\"RadioGroup\", { isFullWidth });\n // Props for the `ChakraRadioGroup` component.\n const radioGroupProps = {\n \"aria-label\": !showLabel ? labelText : undefined,\n name,\n onChange: (selected: string) => {\n setValue(selected);\n onChange && onChange(selected);\n },\n ref,\n value,\n };\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir RadioGroup: This component's required `id` prop was not passed.\"\n );\n }\n\n // Go through the Radio children and update them as needed.\n React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement, key) => {\n if (child?.type !== Radio) {\n // Special case for Storybook MDX documentation.\n if (child.props?.mdxType && child.props?.mdxType === \"Radio\") {\n noop();\n } else {\n console.warn(\n \"NYPL Reservoir RadioGroup: Only `Radio` components are allowed \" +\n \"inside the `RadioGroup` component.\"\n );\n }\n }\n\n if (child !== undefined && child !== null) {\n const newProps = {\n key,\n isDisabled,\n isInvalid,\n isRequired,\n };\n newChildren.push(React.cloneElement(child, newProps));\n }\n }\n );\n\n return (\n <Fieldset\n className={className}\n id={`radio-group-${id}`}\n isLegendHidden={!showLabel}\n isRequired={isRequired}\n legendText={labelText}\n showRequiredLabel={showRequiredLabel}\n {...rest}\n __css={styles}\n >\n <ChakraRadioGroup {...radioGroupProps}>\n <Stack direction={[layout]} spacing={spacingProp}>\n {newChildren}\n </Stack>\n </ChakraRadioGroup>\n {footnote && showHelperInvalidText && (\n <HelperErrorText\n id={`${id}-helperErrorText`}\n isInvalid={isInvalid}\n text={footnote}\n __css={styles.helperErrorText}\n />\n )}\n </Fieldset>\n );\n }\n )\n);\n\nexport default RadioGroup;\n","import {\n Box,\n chakra,\n Select as ChakraSelect,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport React, { useEffect, useState, useRef } from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport Icon from \"../Icons/Icon\";\nimport Label from \"../Label/Label\";\nimport { getAriaAttrs } from \"../../utils/utils\";\n\nexport type SelectTypes = \"default\" | \"searchbar\";\nexport type LabelPositions = \"default\" | \"inline\";\nexport interface SelectProps {\n /** A class name for the `div` parent element. */\n className?: string;\n /** Optional string to populate the `HelperErrorText` for the standard state. */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the `HelperErrorText` for the error state\n * when `isInvalid` is true. */\n invalidText?: HelperErrorTextType;\n /** Adds the `disabled` and `aria-disabled` attributes to the select when true */\n isDisabled?: boolean;\n /** Adds the `aria-invalid` attribute to the select when true. This also makes\n * the color theme \"NYPL error\" red for the select and text. */\n isInvalid?: boolean;\n /** Adds the `required` and `aria-required` attributes to the input when true. */\n isRequired?: boolean;\n /** Optional value to render the label inline, rather than the default (on top)\n * of the select element. */\n labelPosition?: LabelPositions;\n /** Provides text for a `Label` component if `showLabel` is set to `true`;\n * populates an `aria-label` attribute on the select input if `showLabel` is\n * set to `false`. */\n labelText: string;\n /** Used to reference the select element in forms. */\n name: string;\n /** The callback function to get the selected value.\n * Should be passed along with `value` for controlled components. */\n onChange?: (event: React.FormEvent) => void;\n /** Placeholder text in the select element. */\n placeholder?: string;\n /** The variant to display. */\n selectType?: SelectTypes;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the select's label onscreen or hide it. Refer\n * to the `labelText` property for more information. */\n showLabel?: boolean;\n /** Whether or not to display the \"(Required)\" text in the label text.\n * True by default. */\n showRequiredLabel?: boolean;\n /** The value of the selected option.\n * Should be passed along with `onChange` for controlled components. */\n value?: string;\n}\n\n/**\n * Component that renders Chakra's `Select` component along with an accessible\n * `Label` and optional `HelperErrorText` component.\n */\nexport const Select = chakra(\n React.forwardRef<HTMLSelectElement, React.PropsWithChildren<SelectProps>>(\n (props: React.PropsWithChildren<SelectProps>, ref?) => {\n const {\n children,\n className,\n helperText,\n id,\n invalidText,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n labelPosition = \"default\",\n labelText,\n name,\n onChange,\n placeholder,\n selectType = \"default\",\n showHelperInvalidText = true,\n showLabel = true,\n showRequiredLabel = true,\n value = \"\",\n ...rest\n } = props;\n const [labelWidth, setLabelWidth] = useState<number>(0);\n const labelRef = useRef<HTMLDivElement>(null);\n const styles = useMultiStyleConfig(\"CustomSelect\", {\n variant: selectType,\n labelPosition,\n });\n const finalInvalidText = invalidText\n ? invalidText\n : \"There is an error related to this field.\";\n const footnote = isInvalid ? finalInvalidText : helperText;\n const ariaAttributes = getAriaAttrs({\n footnote,\n id,\n labelText,\n name: \"Select\",\n showLabel,\n });\n // To control the `Select` component, both `onChange` and `value`\n // must be passed.\n const controlledProps = onChange ? { onChange, value } : {};\n\n // The number of pixels between the label and select elements\n // when the labelPosition is inline (equivalent to --nypl-space-xs).\n const labelSelectGap = 8;\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Select: This component's required `id` prop was not passed.\"\n );\n }\n\n useEffect(() => {\n if (labelPosition === \"inline\") {\n if (labelRef.current) {\n const width = labelRef.current.clientWidth + labelSelectGap;\n setLabelWidth(width);\n }\n } else {\n setLabelWidth(0);\n }\n }, [labelPosition]);\n\n return (\n <ComponentWrapper\n className={className}\n helperText={helperText}\n helperTextStyles={{\n marginLeft: { sm: \"auto\", md: `${labelWidth}px` },\n }}\n id={id}\n invalidText={finalInvalidText}\n isInvalid={isInvalid}\n showHelperInvalidText={showHelperInvalidText}\n __css={styles}\n {...rest}\n >\n <Box __css={labelPosition === \"inline\" && styles.inline}>\n {showLabel && (\n <Box ref={labelRef}>\n <Label\n htmlFor={id}\n id={`${id}-label`}\n isInlined\n isRequired={showRequiredLabel && isRequired}\n >\n {labelText}\n </Label>\n </Box>\n )}\n <ChakraSelect\n id={id}\n variant=\"outline\"\n isRequired={isRequired}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n name={name}\n placeholder={placeholder}\n ref={ref}\n {...controlledProps}\n {...ariaAttributes}\n icon={<Icon id={`${id}-icon`} name=\"arrow\" size=\"medium\" />}\n __css={styles.select}\n >\n {children}\n </ChakraSelect>\n </Box>\n </ComponentWrapper>\n );\n }\n )\n);\n\nexport default Select;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Button from \"../Button/Button\";\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport Icon from \"../Icons/Icon\";\nimport Select from \"../Select/Select\";\nimport TextInput from \"../TextInput/TextInput\";\n\ninterface BaseProps {\n labelText: string;\n name: string;\n onChange?: (\n event:\n | React.ChangeEvent<HTMLInputElement>\n | React.ChangeEvent<HTMLTextAreaElement>\n ) => void;\n value?: string;\n}\n// Internal interfaces that are used only for `SearchBar` props.\nexport interface SelectProps extends BaseProps {\n optionsData: string[];\n onChange?: (event: React.FormEvent) => void;\n}\nexport interface TextInputProps extends BaseProps {\n placeholder?: string;\n}\n\nexport interface SearchBarProps {\n /** Adds 'action' property to the `form` element. */\n action?: string;\n /** The onClick callback function for the `Button` component. */\n buttonOnClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;\n /** A class name for the `form` element. */\n className?: string;\n /** Optional string for the SearchBar's description above the component. */\n descriptionText?: string;\n /** Optional string for the SearchBar's heading text above the component. */\n headingText?: string;\n /** The text to display below the form in a `HelperErrorText` component. */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the `HelperErrorText` for the error state\n * when `isInvalid` is true. */\n invalidText?: HelperErrorTextType;\n /** Sets children form components in the disabled state. */\n isDisabled?: boolean;\n /** Sets children form components in the error state. */\n isInvalid?: boolean;\n /** Sets children form components in the required state. */\n isRequired?: boolean;\n /** Populates the `aria-label` attribute on the form element. */\n labelText: string;\n /** Adds 'method' property to the `form` element. */\n method?: string;\n /** Sets the `Button` variant type to `noBrand` when true;\n * false by default which sets the type to `primary`. */\n noBrandButtonType?: boolean;\n /** Handler function when the form is submitted. */\n onSubmit: (event: React.FormEvent) => void;\n /** Required props to render a `Select` element. */\n selectProps?: SelectProps | undefined;\n /** Custom input element to render instead of a `TextInput` element. */\n textInputElement?: JSX.Element;\n /** Required props to render a `TextInput` element. */\n textInputProps?: TextInputProps | undefined;\n}\n\n/**\n * Renders a wrapper `form` element to be used with `Select` (optional),\n * `Input`, and `Button` components together.\n */\nexport const SearchBar = chakra((props: SearchBarProps) => {\n const {\n action,\n buttonOnClick,\n className,\n descriptionText,\n headingText,\n helperText,\n id,\n invalidText,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n method,\n noBrandButtonType = false,\n onSubmit,\n selectProps,\n textInputElement,\n textInputProps,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"SearchBar\", {});\n const stateProps = {\n helperText: \"\",\n isDisabled,\n isInvalid,\n isRequired,\n showHelperInvalidText: false,\n showLabel: false,\n };\n const footnote = isInvalid ? invalidText : helperText;\n const finalAriaLabel = footnote ? `${labelText} - ${footnote}` : labelText;\n const inputPlaceholder = textInputProps?.placeholder || \"Search terms\";\n const textInputPlaceholder = `${inputPlaceholder} ${\n isRequired ? \"(Required)\" : \"\"\n }`;\n const buttonType = noBrandButtonType ? \"noBrand\" : \"primary\";\n const searchBarButtonStyles = {\n borderLeftRadius: \"none\",\n borderRightRadius: { base: \"none\", md: \"sm\" },\n lineHeight: \"1.70\",\n marginBottom: \"auto\",\n };\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir SearchBar: This component's required `id` prop was not passed.\"\n );\n }\n // Render the `Select` component.\n const selectElem = selectProps && (\n <Select\n id={`searchbar-select-${id}`}\n labelText={selectProps?.labelText}\n name={selectProps?.name}\n onChange={selectProps?.onChange}\n selectType=\"searchbar\"\n value={selectProps?.value}\n __css={styles.select}\n {...stateProps}\n >\n {selectProps?.optionsData.map((option) => (\n <option key={option} value={option}>\n {option}\n </option>\n ))}\n </Select>\n );\n // Render the `TextInput` component.\n const textInputNative = textInputProps && (\n <TextInput\n id={`searchbar-textinput-${id}`}\n labelText={textInputProps?.labelText}\n name={textInputProps?.name}\n onChange={textInputProps?.onChange}\n placeholder={textInputPlaceholder}\n textInputType={selectElem ? \"searchBarSelect\" : \"searchBar\"}\n type=\"text\"\n value={textInputProps?.value}\n {...stateProps}\n />\n );\n // Render the `Button` component.\n const buttonElem = (\n <Button\n buttonType={buttonType}\n id={`searchbar-button-${id}`}\n isDisabled={isDisabled}\n onClick={buttonOnClick}\n type=\"submit\"\n __css={searchBarButtonStyles}\n >\n <Icon\n align=\"left\"\n id={`searchbar-icon-${id}`}\n name=\"search\"\n size=\"small\"\n />\n Search\n </Button>\n );\n // If a custom input element was passed, use that element\n // instead of the DS `TextInput` component.\n const textInputElem = textInputElement || textInputNative;\n\n return (\n <ComponentWrapper\n descriptionText={descriptionText}\n headingText={headingText}\n helperText={helperText}\n id={id}\n invalidText={invalidText}\n isInvalid={isInvalid}\n {...rest}\n >\n <Box\n as=\"form\"\n id={`searchbar-form-${id}`}\n className={className}\n role=\"search\"\n aria-label={finalAriaLabel}\n onSubmit={onSubmit}\n method={method}\n action={action}\n __css={styles}\n >\n {selectElem}\n {textInputElem}\n {buttonElem}\n </Box>\n </ComponentWrapper>\n );\n});\n\nexport default SearchBar;\n","import {\n Box,\n chakra,\n Skeleton as ChakraSkeleton,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport { LayoutTypes } from \"../../helpers/types\";\n\nexport type SkeletonLoaderImageRatios = \"landscape\" | \"portrait\" | \"square\";\n\nexport interface SkeletonLoaderProps {\n /** Additional class name for the Skeleton component. */\n className?: string;\n /** Optional numeric value to control the number of lines for content\n * placeholder; default value is `3`. */\n contentSize?: number;\n /** Optional numeric value to control the number of lines for heading\n * placeholder; default value is `1`. */\n headingSize?: number;\n /** Optional value to control the aspect ratio of the image placeholder;\n * default value is `\"square\"`. */\n imageAspectRatio?: SkeletonLoaderImageRatios;\n /** Optional boolean value to control visibility of border around skeleton loader. */\n isBordered?: boolean;\n /** Optional value to control the position of the image placeholder;\n * default value is `\"column\"`. */\n layout?: LayoutTypes;\n /** Optional boolean value to control visibility of button placeholder. */\n showButton?: boolean;\n /** Optional boolean value to control visibility of content placeholder. */\n showContent?: boolean;\n /** Optional boolean value to control visibility of heading placeholder. */\n showHeading?: boolean;\n /** Optional boolean value to control visibility of image placeholder. */\n showImage?: boolean;\n /** Optional width value. This value should be entered with the same\n * formatting as a CSS width attribute (ex. `50%`, `640px`, `20rem`).\n * If omitted, the skeleton loader will have a default width of 100%. */\n width?: string;\n}\n\n/**\n * The `SkeletonLoader` component renders a placeholder to be used while\n * dynamic content is loading.\n */\nexport const SkeletonLoader = chakra(\n (props: React.PropsWithChildren<SkeletonLoaderProps>) => {\n const {\n className,\n contentSize = 3,\n headingSize = 1,\n imageAspectRatio = \"square\",\n isBordered = false,\n layout = \"column\",\n showButton = false,\n showContent = true,\n showHeading = true,\n showImage = true,\n width,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"SkeletonLoader\", {\n isBordered,\n imageAspectRatio,\n showImage,\n variant: layout,\n });\n\n /**\n * Generates the Chakra skeleton loader `size` number of times for the\n * \"heading\" and \"content\" areas defined by the `type` argument. The last\n * element will have width of `lastWidth`.\n */\n const getSkeletonElements = (type: string, size = 1, lastWidth = \"80%\") => {\n return new Array(size).fill(null).map((_, i) => {\n const width = i === size - 1 ? lastWidth : \"100%\";\n const marginBottomValue =\n i === size - 1 && type === \"content\" ? \"0\" : undefined;\n return (\n <ChakraSkeleton key={`${type}-${i}`} width={width}>\n <Box\n __css={styles[type]}\n style={{ marginBottom: marginBottomValue }}\n />\n </ChakraSkeleton>\n );\n });\n };\n\n return (\n <Box className={className} __css={styles} style={{ width }} {...rest}>\n {showImage && (\n <ChakraSkeleton>\n <Box __css={{ ...styles.element, ...styles.image }} />\n </ChakraSkeleton>\n )}\n <Box className={layout} __css={styles.container}>\n {showHeading && (\n <Box __css={styles.section}>\n {getSkeletonElements(\"heading\", headingSize, \"80%\")}\n </Box>\n )}\n {showContent && (\n <Box __css={styles.section}>\n {getSkeletonElements(\"content\", contentSize, \"30%\")}\n </Box>\n )}\n {showButton && (\n <Box __css={{ ...styles.section, ...styles.button }}>\n <ChakraSkeleton borderRadius=\"16px\">\n <Box __css={styles.button} />\n </ChakraSkeleton>\n </Box>\n )}\n </Box>\n </Box>\n );\n }\n);\n\nexport default SkeletonLoader;\n","import { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Link from \"../Link/Link\";\nimport List from \"../List/List\";\n\ninterface SkipNavigationProps {\n /** Additional CSS class name to render in the `nav` element. */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** The anchor target for the main skip link. The default is \"#mainContent\". */\n target?: string;\n}\n\n/**\n * SkipNavigation is a component that is used to provide a navigational list of\n * links. The first link is used to skip to the main content of the page using\n * the `#mainContent` id, and the second link points to accessibility information\n * on NYPL.org. These links are visually hidden but can be read by screenreaders.\n */\nexport const SkipNavigation = chakra(\n (props: React.PropsWithChildren<SkipNavigationProps>) => {\n const { className, id, target = \"#mainContent\", ...rest } = props;\n const styles = useStyleConfig(\"SkipNavigation\");\n\n return (\n <Box\n as=\"nav\"\n aria-label=\"Skip Navigation\"\n className={className}\n id={id}\n __css={styles}\n {...rest}\n >\n <List inline noStyling type=\"ul\">\n <li>\n <Link href={target}>Skip to Main Content</Link>\n </li>\n <li>\n <Link href=\"https://www.nypl.org/accessibility\">\n Click to learn about accessibility at the Library\n </Link>\n </li>\n </List>\n </Box>\n );\n }\n);\n\nexport default SkipNavigation;\n","import {\n Box,\n chakra,\n RangeSlider as ChakraRangeSlider,\n RangeSliderFilledTrack as ChakraRangeSliderFilledTrack,\n RangeSliderThumb as ChakraRangeSliderThumb,\n RangeSliderTrack as ChakraRangeSliderTrack,\n Slider as ChakraSlider,\n SliderFilledTrack as ChakraSliderFilledTrack,\n SliderThumb as ChakraSliderThumb,\n SliderTrack as ChakraSliderTrack,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport Label from \"../Label/Label\";\nimport TextInput, { TextInputTypes } from \"../TextInput/TextInput\";\n\nexport interface SliderProps {\n /** Additional class name for the Slider component. */\n className?: string;\n /** The initial value for the single `Slider` or an array of two number\n * values for the `isRangeSlider` case. */\n defaultValue?: number | number[];\n /** Optional string to populate the HelperErrorText for standard state */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes. */\n id: string;\n /** Optional string to populate the `HelperErrorText` for the error state\n * when `isInvalid` is true. */\n invalidText?: HelperErrorTextType;\n /** Adds the 'disabled' state to the slider and text input(s) when true. */\n isDisabled?: boolean;\n /** Adds the 'invalid' state to the slider and text input(s) when true. */\n isInvalid?: boolean;\n /** Offers the ability to render a slider with one value or\n * a range slider with two values. */\n isRangeSlider?: boolean;\n /** Adds the 'required' attribute to the input(s) when true. */\n isRequired?: boolean;\n /** The `Slider`'s label. In the default single slider, this will be linked to\n * the only `TextInput` component. In the range slider, this will be linked to\n * the first `TextInput` component. If `showLabel` is false, then this value\n * will be set in the `Slider`'s `aria-label` attribute. */\n labelText: string;\n /** Maximum value allowed. */\n max?: number;\n /** Minimum value allowed. */\n min?: number;\n /** The name prop indicates into which form this component belongs to. */\n name?: string;\n /** Callback function that gets the value(s) selected. */\n onChange?: (val: number | number[]) => void;\n /** Offers the ability to hide the `TextInput` boxes. */\n showBoxes?: boolean;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Offers the ability to show the label onscreen or hide it. Refer\n * to the `labelText` property for more information. */\n showLabel?: boolean;\n /** Whether or not to display the \"(Required)\" text in the label text.\n * True by default. */\n showRequiredLabel?: boolean;\n /** Offers the ability to hide the static min/max values. */\n showValues?: boolean;\n /** The amount to increase or decrease when using the slider thumb(s). */\n step?: number;\n}\n\n/**\n * The `Slider` component renders a singular value slider or a range slider\n * with a min and max value. The value(s) can be updated through the slider\n * thumb(s) or through the text input(s) elements.\n */\nexport const Slider = chakra((props: React.PropsWithChildren<SliderProps>) => {\n const {\n className,\n defaultValue = 0,\n helperText,\n id,\n invalidText,\n isDisabled = false,\n isInvalid = false,\n isRangeSlider = false,\n isRequired = false,\n labelText,\n max = 100,\n min = 0,\n name,\n onChange,\n showBoxes = true,\n showHelperInvalidText = true,\n showLabel = true,\n showRequiredLabel = true,\n showValues = true,\n step = 1,\n ...rest\n } = props;\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Slider: This component's required `id` prop was not passed.\"\n );\n }\n // For the RangeSlider, if the defaultValue is not an array, then we set\n // the defaultValue to an array with the min and max values.\n const rangeSliderDefault =\n typeof defaultValue === \"number\" ? [min, max] : defaultValue;\n // We need to set the default value correctly for both types of sliders.\n const finalDevaultValue = isRangeSlider ? rangeSliderDefault : defaultValue;\n const [currentValue, setCurrentValue] =\n React.useState<typeof defaultValue>(finalDevaultValue);\n let finalIsInvalid = isInvalid;\n // In the Range Slider, if the first value is bigger than the second value,\n // then set the invalid state.\n if (isRangeSlider && currentValue[0] > currentValue[1]) {\n finalIsInvalid = true;\n console.warn(\n \"NYPL Reservoir Slider: The RangeSlider's first value is greater than the second value.\"\n );\n }\n if (min > max) {\n finalIsInvalid = true;\n console.warn(\n \"NYPL Reservoir Slider: The `min` prop is greater than the `max` prop.\"\n );\n }\n const styles = useMultiStyleConfig(\"CustomSlider\", {\n isDisabled,\n isInvalid: finalIsInvalid,\n showBoxes,\n showValues,\n });\n // Props that the `Slider` and `RangeSlider` Chakra\n // components both use.\n const sliderSharedProps = {\n // Don't focus on the thumbs for every small change.\n focusThumbOnChange: false,\n id,\n isDisabled,\n max,\n min,\n name,\n onChange: (val) => {\n setCurrentValue(val);\n onChange && onChange(val);\n },\n step,\n // Additional margins so slider thumbs don't overflow past the\n // edge when the value boxes or min/max values are hidden.\n sx: styles.sliderContainer,\n };\n // Props that the two `TextInput` components use.\n const textInputSharedProps = {\n isDisabled,\n isInvalid: finalIsInvalid,\n isRequired,\n max,\n min,\n // Never show the label or helper text for the `TextInput` component.\n showHelperInvalidText: false,\n showLabel: false,\n step,\n type: \"number\" as TextInputTypes,\n };\n /**\n * This returns either the \"start\" or \"end\" `TextInput` component. Note that\n * the \"end\" `TextInput` component is always rendered but the \"start\" is\n * only used for the `isRangeSlider` case.\n */\n const getTextInput = (type: \"start\" | \"end\") => {\n const inputProps = {\n start: {\n // We only want the value for this box in the `isRangeSlider` case.\n value: isRangeSlider ? currentValue[0].toString() : \"\",\n onChange: (val) => {\n // If the value is empty, set it to 0.\n let nextValue = parseInt(val.target.value, 10)\n ? parseInt(val.target.value, 10)\n : 0;\n // Only update the first value in the range.\n const newValue = [nextValue, currentValue[1]];\n setCurrentValue(newValue);\n // If the text input was updated directly,\n // send the data back to the user.\n onChange && onChange(newValue);\n },\n ...textInputSharedProps,\n },\n end: {\n // This text input *always* shows. In the default case, we only\n // keep track of one value. For the `isRangeSlider` case, we keep\n // track of an array but only want the second value.\n value: isRangeSlider\n ? currentValue[1].toString()\n : currentValue.toString(),\n onChange: (val) => {\n // If the value is empty, set it to 0.\n let nextValue = parseInt(val.target.value, 10)\n ? parseInt(val.target.value, 10)\n : 0;\n // If the value entered is bigger than the max value,\n // then set it to the max value.\n if (nextValue > max) {\n nextValue = max;\n }\n // Only update the second value in the `isRangeSlider` case,\n // or the single value in the default case.\n const newValue = isRangeSlider\n ? [currentValue[0], nextValue]\n : nextValue;\n setCurrentValue(newValue);\n // If the text input was updated directly,\n // send the data back to the user.\n onChange && onChange(newValue);\n },\n ...textInputSharedProps,\n },\n };\n const updatedLabel = !isRangeSlider\n ? labelText\n : `${labelText} - ${type} value`;\n return (\n <TextInput\n id={`${id}-textInput-${type}`}\n labelText={updatedLabel}\n __css={{\n ...styles.textInput,\n // Specific margins for each text input to\n // push the elements inside.\n marginRight: type === \"start\" ? \"s\" : null,\n marginLeft: type === \"end\" ? \"s\" : null,\n }}\n {...inputProps[type]}\n />\n );\n };\n /**\n * Returns a Chakra `Slider` or `RangeSlider` component based on the\n * `isRangeSlider` prop from the DS `Slider` component.\n */\n const getSliderType = () => {\n return isRangeSlider ? (\n <ChakraRangeSlider\n // Both slider thumbs need values and should be in an array.\n aria-label={\n !showLabel\n ? [`${labelText} - start value`, `${labelText} - end value`]\n : undefined\n }\n // Both slider thumbs need values and should be in an array,\n // even if it's the same label.\n aria-labelledby={showLabel ? [`${id}-label`, `${id}-label`] : undefined}\n value={currentValue as number[]}\n // Make the thumbs larger.\n size=\"lg\"\n {...sliderSharedProps}\n >\n <ChakraRangeSliderTrack sx={styles.track}>\n <ChakraRangeSliderFilledTrack sx={styles.filledTrack} />\n </ChakraRangeSliderTrack>\n <ChakraRangeSliderThumb index={0} sx={styles.thumb} />\n <ChakraRangeSliderThumb index={1} sx={styles.thumb} />\n </ChakraRangeSlider>\n ) : (\n <ChakraSlider\n aria-label={!showLabel ? labelText : undefined}\n aria-labelledby={`${id}-label`}\n value={currentValue as number}\n // Make the thumb larger.\n size=\"lg\"\n {...sliderSharedProps}\n >\n <ChakraSliderTrack sx={styles.track}>\n <ChakraSliderFilledTrack sx={styles.filledTrack} />\n </ChakraSliderTrack>\n <ChakraSliderThumb sx={styles.thumb} />\n </ChakraSlider>\n );\n };\n\n return (\n <ComponentWrapper\n className={className}\n helperText={helperText}\n id={id}\n invalidText={invalidText}\n isInvalid={finalIsInvalid}\n showHelperInvalidText={showHelperInvalidText}\n __css={styles}\n {...rest}\n >\n {showLabel && (\n <Label\n id={`${id}-label`}\n // We can't target the slider thumbs since those are divs and we\n // should link the label somewhere. So either target the first\n // input box in a `RangeSlider` or the only input box in a `Slider`.\n // When the input fields are not visible, remove this attribute.\n htmlFor={\n showBoxes\n ? `${id}-textInput-${isRangeSlider ? \"start\" : \"end\"}`\n : \"\"\n }\n isRequired={showRequiredLabel && isRequired}\n >\n {labelText}\n </Label>\n )}\n\n <Box __css={styles.container}>\n {/* Only show the start input box for the `isRangeSlider` case. */}\n {showBoxes && isRangeSlider && getTextInput(\"start\")}\n\n {showValues && <Box __css={styles.leftValue}>{min}</Box>}\n\n {getSliderType()}\n\n {showValues && <Box __css={styles.rightValue}>{max}</Box>}\n\n {showBoxes && getTextInput(\"end\")}\n </Box>\n </ComponentWrapper>\n );\n});\n\nexport default Slider;\n","import { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nexport type StatusBadgeTypes = \"low\" | \"medium\" | \"high\";\nexport interface StatusBadgeProps {\n /** Additional class for the component */\n className?: string;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Level of the status badge. Defaults to `\"low\"`. */\n level?: StatusBadgeTypes;\n}\n\n/**\n * The `StatusBadge` component is used to display a visual badge for three\n * different status levels.\n */\nexport const StatusBadge = chakra(\n (props: React.PropsWithChildren<StatusBadgeProps>) => {\n const { children, className, id, level = \"low\", ...rest } = props;\n const styles = useStyleConfig(\"StatusBadge\", { variant: level });\n\n if (!children) {\n console.warn(\"NYPL Reservoir StatusBadge: No children were passed.\");\n }\n\n return (\n <Box id={id} className={className} __css={styles} {...rest}>\n {children}\n </Box>\n );\n }\n);\n\nexport default StatusBadge;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Heading from \"../Heading/Heading\";\nimport Image, { ComponentImageProps, ImageProps } from \"../Image/Image\";\n\nexport type StructuredContentImagePosition = \"left\" | \"right\" | \"center\";\n\ninterface StructuredContentImageProps extends ComponentImageProps {\n /** Optional value to control the positioning of the internal `Image` component.\n * Defaults to `\"left\"`. */\n position?: StructuredContentImagePosition;\n}\n\nexport interface StructuredContentProps {\n /** Optional value to set the text for the callout heading text. */\n calloutText?: string;\n /** Additional class name for the `StructuredContent` component. */\n className?: string;\n /** Optional value to set the text for the main heading text. */\n headingText?: string;\n /** ID that other components can cross reference for accessibility purposes. */\n id?: string;\n /** Object used to create and render the `Image` component. */\n imageProps?: StructuredContentImageProps;\n /** Required value to set the text for the body content. */\n bodyContent: string | JSX.Element;\n}\n\n/**\n * Internal component used in the `StructuredContent` component\n * that renders the DS `Image` component.\n */\nconst StructuredContentImage = chakra((props: ImageProps) => {\n const {\n additionalFigureStyles,\n additionalImageStyles,\n additionalWrapperStyles,\n alt,\n aspectRatio,\n caption,\n component,\n credit,\n size,\n src,\n } = props;\n return (\n <Image\n additionalFigureStyles={additionalFigureStyles}\n additionalImageStyles={additionalImageStyles}\n additionalWrapperStyles={additionalWrapperStyles}\n alt={alt}\n component={component}\n aspectRatio={aspectRatio}\n size={size}\n caption={caption}\n credit={credit}\n src={src}\n />\n );\n});\n\n/**\n * The `StructuredContent` component that displays a heading, callout content,\n * an image, and body content. All are optional except for body content.\n */\nexport const StructuredContent = chakra(\n (props: React.PropsWithChildren<StructuredContentProps>) => {\n const {\n calloutText,\n className,\n headingText,\n id,\n imageProps = {\n alt: \"\",\n aspectRatio: \"square\",\n caption: undefined,\n component: undefined,\n credit: undefined,\n position: \"left\",\n size: \"medium\",\n src: \"\",\n },\n bodyContent,\n ...rest\n } = props;\n const hasImage = imageProps.src || imageProps.component;\n const hasFigureImage = imageProps.caption || imageProps.credit;\n const styles = useMultiStyleConfig(\"StructuredContent\", {\n hasFigureImage,\n imageAspectRatio: imageProps.aspectRatio,\n imagePosition: imageProps.position,\n });\n const finalBodyContent =\n typeof bodyContent === \"string\" ? (\n <div\n className=\"structuredcontent-body\"\n dangerouslySetInnerHTML={{ __html: bodyContent }}\n />\n ) : (\n <Box className=\"structuredcontent-body\">{bodyContent}</Box>\n );\n\n if (hasImage && !imageProps.alt) {\n console.warn(\n \"NYPL Reservoir StructuredContent: The `imageProps.alt` prop is required \" +\n \"when using an image.\"\n );\n }\n\n return (\n <Box id={id} className={className} __css={styles} {...rest}>\n {headingText && <Heading id={`${id}-heading`}>{headingText}</Heading>}\n {calloutText && (\n <Heading id={`${id}-callout`} level=\"three\" size=\"callout\">\n {calloutText}\n </Heading>\n )}\n {hasImage && (\n <StructuredContentImage\n additionalFigureStyles={styles.imageFigure}\n additionalImageStyles={styles.image}\n additionalWrapperStyles={styles.imageWrapper}\n alt={imageProps.alt}\n component={imageProps.component}\n aspectRatio={imageProps.aspectRatio}\n caption={imageProps.caption}\n credit={imageProps.credit}\n size={imageProps.size}\n src={imageProps.src ? imageProps.src : undefined}\n />\n )}\n {finalBodyContent}\n </Box>\n );\n }\n);\n\nexport default StructuredContent;\n","import React from \"react\";\n\n/**\n * Custom hook that controls the sliding function for the carousel wrapper.\n * This returns functions to use for the \"previous\" and \"next\" buttons as well\n * as a CSS style object that should be use to transition between slides. There\n * is also a function to programmatically slide to the first slide.\n * Inspired by: https://codesandbox.io/s/fxjeo\n */\nexport const useCarouselStyles = (slidesCount = 0, slideWidth = 100) => {\n const [currentSlide, setCurrentSlide] = React.useState(0);\n // This wraps around to the last slide if this is invoked while the\n // first slide is active.\n const prevSlide = () => {\n setCurrentSlide((slide) => (slide === 0 ? slidesCount - 1 : slide - 1));\n };\n // This wraps around to the first slide if this is invoked while the\n // last slide is active.\n const nextSlide = () => {\n setCurrentSlide((slide) => (slide === slidesCount - 1 ? 0 : slide + 1));\n };\n const goToStart = () => {\n setCurrentSlide(0);\n };\n // Updates the left margin for the carousel so the elements can\n // slide inside the container.\n const carouselStyle = {\n transition: \"all .5s\",\n marginLeft: `-${currentSlide * slideWidth}%`,\n };\n\n return { prevSlide, nextSlide, carouselStyle, goToStart };\n};\n\nexport default useCarouselStyles;\n","import {\n Box,\n chakra,\n Tab,\n TabList,\n TabPanels,\n TabPanel,\n Tabs as ChakraTabs,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport Button from \"../Button/Button\";\nimport Icon from \"../Icons/Icon\";\nimport useCarouselStyles from \"../../hooks/useCarouselStyles\";\nimport useNYPLBreakpoints from \"../../hooks/useNYPLBreakpoints\";\n\n// Internal interface used for rendering `Tabs` tab and panel\n// elements, either from data or from children.\ninterface TabPanelProps {\n tabs: React.ReactNode[] | React.ReactNode;\n panels: React.ReactNode[] | React.ReactNode;\n}\n// The general shape of the data object for each Tab.\nexport interface TabsDataProps {\n label: string;\n content: string | React.ReactNode;\n}\n\nexport interface TabsProps {\n /** The index of the tab to display for controlled situations. */\n defaultIndex?: number;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** The callback function invoked on every tab change event. */\n onChange?: (index: number) => any;\n /** Array of data to display */\n tabsData?: TabsDataProps[];\n /** Render a hash in the url for each tab. Only available when data is\n * passed through the `data` props. */\n useHash?: boolean;\n}\n\n/**\n * An internal function used to update the hash in the URL.\n * This function is only used when `useHash` is `true`.\n */\nconst onClickHash = (tabHash: string) => {\n window.location.hash = tabHash;\n};\n\n/**\n * This returns an object with `Tab` and `TabPanel` components to rendered in\n * `TabList` and `TabPanels` components respectively.\n */\nconst getElementsFromData = (\n data: TabsDataProps[],\n useHash: boolean\n): TabPanelProps => {\n const tabs: React.ReactNode[] = [];\n const panels: React.ReactNode[] = [];\n\n if (!data?.length) {\n return { tabs: [], panels: [] };\n }\n\n if (data?.length > 6) {\n console.warn(\n \"NYPL Reservoir Tabs: it is recommended to use no more than six tabs. If \" +\n \"more than six tabs are needed, consider other navigational patterns.\"\n );\n }\n data.forEach((tab, index) => {\n let tempPanel;\n // For URL hash enabled tabs, we need to add a custom `onClick` to handle the URL hash.\n const tempTab = (\n <Tab\n fontSize={[\"0\", null, \"1\"]}\n key={index}\n onClick={useHash ? () => onClickHash(`tab${index + 1}`) : undefined}\n >\n {tab.label}\n </Tab>\n );\n if (typeof tab.content === \"string\") {\n tempPanel = (\n <TabPanel\n dangerouslySetInnerHTML={{ __html: tab.content }}\n key={index}\n />\n );\n } else {\n tempPanel = <TabPanel key={index}>{tab.content}</TabPanel>;\n }\n\n tabs.push(tempTab);\n panels.push(tempPanel);\n });\n\n return {\n tabs: [<TabList key=\"list\">{tabs}</TabList>],\n panels: [<TabPanels key=\"panels\">{panels}</TabPanels>],\n };\n};\n\n/**\n * This returns an object with `TabList` and `TabPanels` components to help format\n * the DOM when building up the `Tabs` component using child component.\n */\nconst getElementsFromChildren = (children): TabPanelProps => {\n const tabs: React.ReactNode[] = [];\n const panels: React.ReactNode[] = [];\n\n if (!children?.length) {\n return { tabs: [], panels: [] };\n }\n\n children.forEach((child: JSX.Element) => {\n if (child.type === TabList || child.props.mdxType === \"TabList\") {\n tabs.push(child);\n\n const childTabs = React.Children.count(child.props.children);\n if (childTabs > 6) {\n console.warn(\n \"NYPL Reservoir Tabs: It is recommended to use no more than six tabs. \" +\n \"If more than six tabs are needed, consider other navigational patterns.\"\n );\n }\n }\n\n if (child.type === TabPanels || child.props.mdxType === \"TabPanels\") {\n panels.push(child);\n }\n });\n\n return { tabs, panels };\n};\n\n/**\n * Renders Chakra's `Tab` component with specific variants, props,\n * and controlled styling.\n */\nexport const Tabs = chakra((props: React.PropsWithChildren<TabsProps>) => {\n const {\n children,\n defaultIndex = 0,\n id,\n onChange,\n tabsData,\n useHash = false,\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"Tabs\", {});\n // Just an estimate of the tab width for the mobile carousel.\n const initTabWidth = 65;\n // An estimate for the tab width for larger device widths.\n const mediumTabWidth = 40;\n const { isLargerThanSmall, isLargerThanMobile } = useNYPLBreakpoints();\n const tabWidth = isLargerThanSmall ? initTabWidth : mediumTabWidth;\n\n const { tabs, panels }: any = tabsData\n ? getElementsFromData(tabsData, useHash)\n : getElementsFromChildren(children);\n\n if (tabs.length === 0 || panels.length === 0) {\n console.warn(\n \"NYPL Reservoir Tabs: Pass data in the `contentData` props or as children.\"\n );\n }\n\n // `tabs` is an array for the children component approach but an object for\n // the `tabsData` prop approach. We need to get the right props key value\n // to set the carousel's length.\n const tabProps = tabs[0] ? tabs[0]?.props : (tabs as any).props;\n const { prevSlide, nextSlide, carouselStyle, goToStart } = useCarouselStyles(\n tabProps?.children?.length,\n tabWidth\n );\n\n React.useEffect(() => {\n // If we are on larger viewports, reset the carousel so all tabs display.\n if (isLargerThanMobile) {\n goToStart();\n }\n }, [goToStart, isLargerThanMobile]);\n\n const previousButton = (\n <Button\n aria-label=\"Previous\"\n id={`tabs-previous-${id}`}\n onClick={prevSlide}\n __css={{\n ...styles.buttonArrows,\n left: \"0\",\n }}\n >\n <Icon\n iconRotation=\"rotate90\"\n id={`tabs-previous-icon-${id}`}\n name=\"arrow\"\n size=\"small\"\n />\n </Button>\n );\n const nextButton = (\n <Button\n aria-label=\"Next\"\n id={`tabs-next-${id}`}\n onClick={nextSlide}\n __css={{\n ...styles.buttonArrows,\n right: \"0\",\n }}\n >\n <Icon\n iconRotation=\"rotate270\"\n id={`tabs-next-icon-${id}`}\n name=\"arrow\"\n size=\"small\"\n />\n </Button>\n );\n\n if (children && tabsData?.length) {\n console.warn(\n \"NYPL Reservoir Tabs: Only pass children or data in the `contentData` \" +\n \"prop. Do not pass both.\"\n );\n }\n\n return (\n <ChakraTabs\n defaultIndex={defaultIndex}\n id={id}\n // The following lazy loads each panel whenever it is needed.\n isLazy\n onChange={onChange}\n variant=\"enclosed\"\n {...rest}\n >\n <Box\n __css={styles.tablistWrapper}\n sx={{\n \"&::-webkit-scrollbar\": {\n display: \"none\",\n },\n }}\n >\n {previousButton}\n <Box __css={styles.carouselParent}>\n <Box {...carouselStyle}>{tabs}</Box>\n </Box>\n {nextButton}\n </Box>\n {panels}\n </ChakraTabs>\n );\n});\n\n// Tabs is also exported above so the props can display in Storybook.\nexport { TabList, Tab, TabPanels, TabPanel };\nexport default Tabs;\n","import { Box, chakra, useStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport SkipNavigation from \"../SkipNavigation/SkipNavigation\";\n\nexport interface TemplateProps {}\nexport interface TemplateHeaderProps {\n /** Flag to render an HTML header element. True by default. */\n renderHeaderElement?: boolean;\n}\nexport interface TemplateFooterProps {\n /** Flag to render an HTML footer element. True by default. */\n renderFooterElement?: boolean;\n}\nexport interface TemplateSidebarProps {\n /** Renders the `TemplateContentSidebar` component either on the left or\n * right side of the `TemplateContentPrimary` component. */\n sidebar?: \"none\" | \"left\" | \"right\";\n}\nexport interface TemplateContentProps extends TemplateSidebarProps {\n /** ID used for the `main` HTML element. Defaults to \"mainContent\". Useful\n * anchor for the application skip navigation. */\n id?: string;\n}\n\nexport interface TemplateAppContainerProps\n extends TemplateFooterProps,\n TemplateHeaderProps,\n TemplateSidebarProps {\n /** DOM that will be rendered before the rest of the components in\n * `TemplateAppContainer` and immediately before the `TemplateHeader` component. */\n aboveHeader?: React.ReactElement;\n /** DOM that will be rendered in the `TemplateBreakout` component section. */\n breakout?: React.ReactElement;\n /** ID used for the `main` HTML element. Defaults to \"mainContent\". Useful\n * anchor for the application skip navigation. */\n contentId?: string;\n /** DOM that will be rendered in the `TemplateContentPrimary` component section. */\n contentPrimary?: React.ReactElement;\n /** DOM that will be rendered in the `TemplateContentSidebar` component section. */\n contentSidebar?: React.ReactElement;\n /** DOM that will be rendered in the `TemplateContentTop` component section. */\n contentTop?: React.ReactElement;\n /** DOM that will be rendered in the `TemplateFooter` component section. */\n footer?: React.ReactElement;\n /** DOM that will be rendered in the `TemplateHeader` component section. */\n header?: React.ReactElement;\n /** Render the `SkipNavigation` component or not. False by default. */\n renderSkipNavigation?: boolean;\n}\n\n/**\n * The main top-level parent component that wraps all template-related\n * components.\n */\nconst Template = chakra((props: React.PropsWithChildren<TemplateProps>) => {\n const styles = useStyleConfig(\"Template\", {});\n return (\n <Box __css={styles} {...props}>\n {props.children}\n </Box>\n );\n});\n\n/**\n * This optional component renders its children from edge-to-edge and should\n * be used for alerts or notifications that are typically site-wide. This must\n * be rendered immediately before the `TemplateHeader` component. This is meant\n * for components that render an `aside` HTML element or HTML element with the\n * `role=\"complementary\"` attribute. These elements should *not* be rendered\n * in the `header` HTML section since that's an accessibility violation.\n */\nconst TemplateAboveHeader = (props: React.PropsWithChildren<TemplateProps>) => {\n const styles = useStyleConfig(\"TemplateBreakout\", {});\n return <Box __css={styles}>{props.children}</Box>;\n};\n\n/**\n * This optional component should be the first child of the `Template`\n * component. This is rendered as an HTML `<header>` element. If an HTML\n * `<header>` element is already passed in a custom component as the children,\n * set `renderFooterElement` to `false`. Otherwise, the parent wrapper will\n * render an HTML `<header>` element.\n */\nconst TemplateHeader = ({\n children,\n renderHeaderElement = true,\n}: React.PropsWithChildren<TemplateHeaderProps>) => {\n const styles = useStyleConfig(\"TemplateHeader\", {});\n let headerElement = <Box __css={styles}>{children}</Box>;\n\n // The user wants to render the `header` HTML element.\n if (renderHeaderElement) {\n // But if they passed in a component that renders an HTML `<header>`,\n // then log a warning.\n React.Children.map(children as JSX.Element, (child: React.ReactElement) => {\n if (child?.type === \"header\" || child?.props?.mdxType === \"header\") {\n console.warn(\n \"NYPL Reservoir TemplateHeader: An HTML `header` element was passed \" +\n \"in. Set `renderHeaderElement` to `false` to avoid nested HTML \" +\n \"`header` elements.\"\n );\n }\n });\n headerElement = (\n <Box as=\"header\" __css={styles}>\n {children}\n </Box>\n );\n }\n return headerElement;\n};\n\n/**\n * This optional component should be used inside the `TemplateHeader` component.\n * This is meant to render its children from edge to edge and is most useful\n * for the `Breadcrumbs` and `Hero` components, and other banner-like components.\n */\nconst TemplateBreakout = (props: React.PropsWithChildren<TemplateProps>) => {\n const styles = useStyleConfig(\"TemplateBreakout\", {});\n return <Box __css={styles}>{props.children}</Box>;\n};\n\n/**\n * This component is most useful to render content on the page. This renders an\n * HTML `<main>` element with an id of \"mainContent\". The \"mainContent\" id should\n * be used as the consuming application's skip navigation link. The `TemplateContent`\n * component also takes a `sidebar` prop with optional \"left\" or \"right\" values.\n * This will set the correct *styling* needed for the `TemplateContentPrimary`\n * and `TemplateContentSidebar` components. Note that `TemplateContentPrimary`\n * and `TemplateContentSidebar` must be ordered correctly as children elements\n * for the appropriate styles to take effect.\n */\nconst TemplateContent = (\n props: React.PropsWithChildren<TemplateContentProps>\n) => {\n const { children, id = \"mainContent\", sidebar = \"none\" } = props;\n const styles = useStyleConfig(\"TemplateContent\", {\n variant: sidebar !== \"none\" ? \"sidebar\" : null,\n });\n // Manually pass in the `sidebar` prop to the `TemplateContentPrimary` and\n // `TemplateContentSidebar` components.\n const newChildren = React.Children.map(\n children as JSX.Element,\n (child: React.ReactElement) => {\n let newChild = child;\n if (\n (child && child?.type === TemplateContentPrimary) ||\n (child?.props && child.props?.mdxType === \"TemplateContentPrimary\") ||\n child?.type === TemplateContentSidebar ||\n (child?.props && child.props?.mdxType === \"TemplateContentSidebar\")\n ) {\n newChild = React.cloneElement(child, { sidebar });\n }\n\n return newChild;\n }\n );\n\n return (\n <Box as=\"main\" id={id} __css={styles}>\n {newChildren}\n </Box>\n );\n};\n\n/**\n * This optional component must be used inside the `TemplateContent` component.\n * This renders content in the main width of the container and will always render\n * above the primary component and the sidebar component (if any).\n */\nconst TemplateContentTop = (props: React.PropsWithChildren<TemplateProps>) => {\n const styles = useStyleConfig(\"TemplateContentTop\", {});\n return <Box __css={styles}>{props.children}</Box>;\n};\n\n/**\n * This component is used to render content in a column when there must be a\n * sidebar component on either its left or right side. It must go inside the\n * `TemplateContent` component. An optional `sidebar` prop value of \"left\" or\n * \"right\" can be passed to render the correct CSS styles. If the `sidebar`\n * prop is used in the `TemplateContent` component, there is no need to pass\n * the `sidebar` prop to this component -- `TemplateContent` will handle it.\n */\nconst TemplateContentPrimary = (\n props: React.PropsWithChildren<TemplateContentProps>\n) => {\n const { sidebar } = props;\n const styles = useStyleConfig(\"TemplateContentPrimary\", {\n variant: sidebar,\n });\n return <Box __css={styles}>{props.children}</Box>;\n};\n\n/**\n * This component is used to render content in a sidebar column. It must go\n * inside the `TemplateContent` component and must be paired with the\n * `TemplateContentPrimary` component. If this is a left sidebar, it needs to be\n * rendered before the `TemplateContentPrimary` component. If this is a right\n * sidebar, it needs to be rendered after the `TemplateContentPrimary` component.\n * An optional `sidebar` prop value of \"left\" or \"right\" can be passed to render\n * the correct CSS styles. If the `sidebar` prop is used in the `TemplateContent`\n * component, there is no need to pass the `sidebar` prop to this component --\n * `TemplateContent` will handle it.\n */\nconst TemplateContentSidebar = (\n props: React.PropsWithChildren<TemplateContentProps>\n) => {\n const { sidebar } = props;\n const styles = useStyleConfig(\"TemplateContentSidebar\", {\n variant: sidebar,\n });\n return <Box __css={styles}>{props.children}</Box>;\n};\n\n/**\n * This optional component should be the last child of the `Template`\n * component. This is rendered as an HTML `<footer>` element and spans the full\n * width of the page. If an HTML `<footer>` element is already passed in a\n * custom component, set `renderFooterElement` to `false`.\n */\nconst TemplateFooter = ({\n children,\n renderFooterElement = true,\n}: React.PropsWithChildren<TemplateFooterProps>) => {\n let footerElement = <>{children}</>;\n\n // The user wants to render the `footer` HTML element.\n if (renderFooterElement) {\n // But give a warning if one was passed.\n React.Children.map(children as JSX.Element, (child: React.ReactElement) => {\n if (child?.type === \"footer\" || child?.props?.mdxType === \"footer\") {\n console.warn(\n \"NYPL Reservoir TemplateFooter: An HTML `footer` element was passed \" +\n \"in. Set `renderFooterElement` to `false` to avoid nested HTML \" +\n \"`footer` elements.\"\n );\n }\n });\n footerElement = <Box as=\"footer\">{children}</Box>;\n }\n return footerElement;\n};\n\n/**\n * This single component can be used instead of all the individual template\n * components. Instead of importing and rendering the needed \"template\"\n * components, each section is passed as a prop to the section where it should\n * be rendered. For example, if you want to render content in the\n * `TemplateContentPrimary` section, then pass it as a prop to `contentPrimary`.\n */\nexport const TemplateAppContainer = chakra(\n (props: React.PropsWithChildren<TemplateAppContainerProps>) => {\n const {\n aboveHeader,\n breakout,\n contentId = \"mainContent\",\n contentPrimary,\n contentSidebar,\n contentTop,\n footer,\n header,\n sidebar = \"none\",\n renderFooterElement = true,\n renderHeaderElement = true,\n renderSkipNavigation = false,\n ...rest\n } = props;\n const aboveHeaderElem = aboveHeader && (\n <TemplateAboveHeader>{aboveHeader}</TemplateAboveHeader>\n );\n const breakoutElem = breakout && (\n <TemplateBreakout>{breakout}</TemplateBreakout>\n );\n const contentTopElem = contentTop && (\n <TemplateContentTop>{contentTop}</TemplateContentTop>\n );\n const contentPrimaryElem = contentPrimary && (\n <TemplateContentPrimary>{contentPrimary}</TemplateContentPrimary>\n );\n const contentSidebarElem = contentSidebar && (\n <TemplateContentSidebar>{contentSidebar}</TemplateContentSidebar>\n );\n return (\n <Template {...rest}>\n {renderSkipNavigation ? <SkipNavigation /> : null}\n {aboveHeaderElem}\n {(header || breakoutElem) && (\n <TemplateHeader renderHeaderElement={renderHeaderElement}>\n {header}\n {breakoutElem}\n </TemplateHeader>\n )}\n {/* Note that setting `sidebar` as a prop here affects the\n TemplateContentSidebar and TemplateContentPrimary components. */}\n <TemplateContent id={contentId} sidebar={sidebar}>\n {contentTopElem}\n\n {sidebar === \"left\" && contentSidebarElem}\n\n {contentPrimaryElem}\n\n {sidebar === \"right\" && contentSidebarElem}\n </TemplateContent>\n {footer && (\n <TemplateFooter renderFooterElement={renderFooterElement}>\n {footer}\n </TemplateFooter>\n )}\n </Template>\n );\n }\n);\n\nexport {\n Template,\n TemplateAboveHeader,\n TemplateHeader,\n TemplateBreakout,\n TemplateContent,\n TemplateContentTop,\n TemplateContentPrimary,\n TemplateContentSidebar,\n TemplateFooter,\n};\nexport default TemplateAppContainer;\n","import {\n Box,\n chakra,\n Switch,\n useMultiStyleConfig,\n useStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\nimport { getAriaAttrs } from \"../../utils/utils\";\n\nexport type ToggleSizes = \"default\" | \"small\";\nexport interface ToggleProps {\n /** Used for uncontrolled scenarios. Sets the state of the Toggle when the page first loads.\n * If true, the toggle will be initially set to the \"on\" position. */\n defaultChecked?: boolean;\n /** Optional string to populate the HelperErrorText for standard state */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id: string;\n /** Optional string to populate the HelperErrorText for the error state\n * when `isInvalid` is true. */\n invalidText?: HelperErrorTextType;\n /** When using the Toggle as a \"controlled\" form element, you can specify\n * the Toggle's checked state using this prop.\n * Learn more about controlled and uncontrolled form fields:\n * https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */\n isChecked?: boolean;\n /** Adds the 'disabled' and `aria-disabled` attributes to the input when true.\n * This also makes the text italic and color scheme gray. */\n isDisabled?: boolean;\n /** Adds the 'aria-invalid' attribute to the input when true. */\n isInvalid?: boolean;\n /** Adds the 'required' attribute to the input when true. */\n isRequired?: boolean;\n /** The toggle's label. This will serve as the text content for the `<label>` element */\n labelText: string;\n /** The name prop indicates the `Toggle`'s form element name. If none is\n * specified, 'default' will be used. */\n name?: string;\n /** The action to perform on the `<input>`'s onChange function */\n onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;\n /** The size of the Toggle. Defaults to \"large\". */\n size?: ToggleSizes;\n}\n\nexport const onChangeDefault = () => {\n return;\n};\n\n/**\n * Component that renders Chakra's `Switch` component along with NYPL defaults.\n */\nexport const Toggle = chakra(\n React.forwardRef<HTMLInputElement, ToggleProps>((props, ref?) => {\n const {\n defaultChecked = false,\n helperText,\n id,\n invalidText,\n isChecked,\n isDisabled = false,\n isInvalid = false,\n isRequired = false,\n labelText,\n name,\n onChange = onChangeDefault,\n size = \"default\",\n ...rest\n } = props;\n const styles = useMultiStyleConfig(\"Toggle\", { isDisabled, size });\n const switchStyles = useStyleConfig(\"Switch\", { size });\n const footnote = isInvalid ? invalidText : helperText;\n const ariaAttributes = getAriaAttrs({\n footnote,\n id,\n labelText,\n name: \"Toggle\",\n showLabel: true,\n });\n\n if (!id) {\n console.warn(\n \"NYPL Reservoir Toggle: This component's required `id` prop was not passed.\"\n );\n }\n\n return (\n <ComponentWrapper\n helperText={helperText}\n helperTextStyles={styles.helperErrorText}\n id={id}\n invalidText={invalidText}\n isInvalid={isInvalid}\n {...rest}\n >\n <Box __css={styles}>\n <Switch\n id={id}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n isRequired={isRequired}\n name={name || \"default\"}\n ref={ref}\n size={size === \"default\" ? \"lg\" : \"sm\"}\n lineHeight=\"1.5\"\n {...(isChecked !== undefined\n ? {\n isChecked,\n onChange,\n }\n : {\n defaultChecked,\n })}\n {...ariaAttributes}\n __css={switchStyles}\n >\n {labelText}\n </Switch>\n </Box>\n </ComponentWrapper>\n );\n })\n);\n\nexport default Toggle;\n","import { useTheme } from \"@chakra-ui/react\";\n\n/**\n * A custom hook that returns the Chakra-based NYPL theme object. This must be\n * used inside a component that is wrapped in the `DSProvider` component, so\n * that the theme object can be available to use.\n */\nfunction useNYPLTheme() {\n const theme = useTheme();\n if (!theme || Object.keys(theme).length === 0) {\n console.warn(\n \"NYPL Reservoir useNYPLTheme: hook must be used inside of `<DSProvider />`.\"\n );\n return {};\n }\n\n // Chakra provides a lot of their own styles but\n // only NYPL styles should be exported.\n return {\n // base, sm, md, lg, xl, 2xl\n breakpoints: theme.breakpoints,\n colors: {\n // primary, secondary\n brand: theme.colors.brand,\n // blogs, books-and-more, education, locations,\n // research, research-library, whats-on\n section: theme.colors.section,\n transparent: theme.colors.transparent,\n // black, disabled, error, focus, gray, link,\n // status, success, test, warning, white\n ui: theme.colors.ui,\n },\n fontSizes: {\n \"-3\": theme.fontSizes[\"-3\"],\n \"-2\": theme.fontSizes[\"-2\"],\n \"-1\": theme.fontSizes[\"-1\"],\n \"0\": theme.fontSizes[\"0\"],\n \"1\": theme.fontSizes[\"1\"],\n \"2\": theme.fontSizes[\"2\"],\n \"3\": theme.fontSizes[\"3\"],\n \"4\": theme.fontSizes[\"4\"],\n // default\n breadcrumbs: theme.fontSizes.breadcrumbs,\n // default\n button: theme.fontSizes.button,\n // primary, secondary, tertiary, callout\n heading: theme.fontSizes.heading,\n // default\n helper: theme.fontSizes.helper,\n // default, secondary\n label: theme.fontSizes.label,\n // default, caption, tag, mini\n text: theme.fontSizes.text,\n },\n fontWeights: {\n light: theme.fontWeights.light,\n regular: theme.fontWeights.regular,\n medium: theme.fontWeights.medium,\n bold: theme.fontWeights.bold,\n // default, lastChild\n breadcrumbs: theme.fontWeights.breadcrumbs,\n // default\n button: theme.fontWeights.button,\n // primary, secondary, tertiary, callout\n heading: theme.fontWeights.heading,\n // default\n helper: theme.fontWeights.helper,\n // default\n label: theme.fontWeights.label,\n // default, caption, tag, mini\n text: theme.fontWeights.text,\n },\n fonts: {\n body: theme.fonts.body,\n heading: theme.fonts.heading,\n },\n radii: theme.radii,\n space: {\n xxs: theme.space.xxs,\n xs: theme.space.xs,\n s: theme.space.s,\n m: theme.space.m,\n l: theme.space.l,\n xl: theme.space.xl,\n xxl: theme.space.xxl,\n xxxl: theme.space.xxxl,\n },\n };\n}\n\nexport default useNYPLTheme;\n","import React from \"react\";\n\ninterface WindowSize {\n width: number;\n height: number;\n}\n\n/**\n * React hook used to get the window size on device resizing.\n * Based on https://usehooks-typescript.com/react-hook/use-window-size\n */\nfunction useWindowSize(): WindowSize {\n const [windowSize, setWindowSize] = React.useState<WindowSize>({\n width: 0,\n height: 0,\n });\n\n React.useEffect(() => {\n const handler = () => {\n setWindowSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n };\n\n // Set size at the first client-side load\n handler();\n\n window.addEventListener(\"resize\", handler);\n\n // Remove event listener on cleanup\n return () => {\n window.removeEventListener(\"resize\", handler);\n };\n }, []);\n\n return windowSize;\n}\n\nexport default useWindowSize;\n","import { Box, chakra, useMultiStyleConfig } from \"@chakra-ui/react\";\nimport * as React from \"react\";\n\nimport ComponentWrapper from \"../ComponentWrapper/ComponentWrapper\";\nimport { HelperErrorTextType } from \"../HelperErrorText/HelperErrorText\";\n\nexport type VideoPlayerTypes = \"vimeo\" | \"youtube\";\nexport type VideoPlayerAspectRatios =\n | \"fourByThree\"\n | \"sixteenByNine\"\n | \"square\";\nexport interface VideoPlayerProps {\n /** Optional aspect ratio prop to control the sizing of the video player; if\n * omitted, the video player defaults to `sixteen-by-nine` */\n aspectRatio?: VideoPlayerAspectRatios;\n /** Optional className you can add in addition to `video-player` */\n className?: string;\n /** Optional string to set the text for a video description */\n descriptionText?: string;\n /** Optional string to set a code snippet provided by YouTube or Vimeo; the\n * `videoPlayer` component will accept the `embedCode` prop or the `videoId`\n * and `videoType` props */\n embedCode?: string;\n /** Optional string to set the text for a `Heading` component */\n headingText?: string;\n /** Optional string to set the text for a `HelperErrorText` component */\n helperText?: HelperErrorTextType;\n /** ID that other components can cross reference for accessibility purposes */\n id?: string;\n /** Optional title to be added to the `<iframe>` element for improved\n * accessibility; this title should describe in a few words the content of\n * the video; if omitted, a generic title will be added; if a `title`\n * attribute is already present in the `embedCode` prop, this prop will be\n * ignored */\n iframeTitle?: string;\n /** Offers the ability to hide the helper/invalid text. */\n showHelperInvalidText?: boolean;\n /** Required YouTube or Vimeo video ID. This value can be pulled from a\n * video's YouTube or Vimeo URL. */\n videoId?: string;\n /** Required. Used to specify which video service is being used. */\n videoType?: VideoPlayerTypes;\n}\n\nexport const VideoPlayer = chakra(\n (props: React.PropsWithChildren<VideoPlayerProps>) => {\n const {\n aspectRatio,\n className,\n descriptionText,\n embedCode,\n headingText,\n helperText,\n id,\n iframeTitle,\n showHelperInvalidText = true,\n videoId,\n videoType,\n ...rest\n } = props;\n\n const iframeTitleFinal =\n videoType === \"vimeo\"\n ? iframeTitle || \"Vimeo video player\"\n : iframeTitle || \"YouTube video player\";\n\n const videoSrc =\n videoType === \"vimeo\"\n ? `https://player.vimeo.com/video/${videoId}?autoplay=0&loop=0`\n : `https://www.youtube.com/embed/${videoId}?disablekb=1&autoplay=0&fs=1&modestbranding=0`;\n\n const iFrameTitleEmbedCode = iframeTitle\n ? `${iframeTitle}`\n : `Video player`;\n\n const embedCodeFinal =\n embedCode &&\n embedCode.includes(\"<iframe\") &&\n !embedCode.includes(\"title=\")\n ? embedCode.replace(\n `<iframe `,\n `<iframe title=\"${iFrameTitleEmbedCode}\" `\n )\n : embedCode;\n\n const errorMessage =\n \"<strong>Error:</strong> This video player has not been configured \" +\n \"properly. Please contact the site administrator.\";\n\n let isInvalid = false;\n if (!embedCodeFinal && !videoType && !videoId) {\n console.warn(\n \"NYPL Reservoir VideoPlayer: Pass in either the `embedCode` prop or \" +\n \"both the `videoType` and `videoId` props; none were passed.\"\n );\n isInvalid = true;\n } else if (!embedCodeFinal && !videoType) {\n console.warn(\n \"NYPL Reservoir VideoPlayer: The `videoType` prop is also required. \" +\n \"Only the `videoId` prop was set.\"\n );\n isInvalid = true;\n } else if (!embedCodeFinal && !videoId) {\n console.warn(\n \"NYPL Reservoir VideoPlayer: The `videoId` prop is also required. \" +\n \"Only the `videoType` prop was set.\"\n );\n isInvalid = true;\n } else if (embedCodeFinal && (videoType || videoId)) {\n console.warn(\n \"NYPL Reservoir VideoPlayer: Pass in either the `embedCode` prop or \" +\n \"both the `videoType` and `videoId` props; all were set.\"\n );\n isInvalid = true;\n }\n\n if (\n videoId &&\n (videoId.includes(\"://\") ||\n videoId.includes(\"http\") ||\n videoId.includes(\".\") ||\n videoId.includes(\"youtube\") ||\n videoId.includes(\"vimeo\"))\n ) {\n console.warn(\n \"NYPL Reservoir VideoPlayer: The `videoId` prop is not configured properly.\"\n );\n isInvalid = true;\n }\n\n if (\n embedCodeFinal &&\n ((!embedCodeFinal.includes(\"vimeo.com\") &&\n !embedCodeFinal.includes(\"youtube.com\")) ||\n !embedCodeFinal.includes(\"<iframe\") ||\n !embedCodeFinal.includes(\"</iframe\"))\n ) {\n console.warn(\n \"NYPL Reservoir VideoPlayer: The `embedCode` prop is not configured properly.\"\n );\n isInvalid = true;\n }\n\n const variant = isInvalid ? \"invalid\" : aspectRatio;\n const styles = useMultiStyleConfig(\"VideoPlayer\", { variant });\n\n const embedElement = embedCodeFinal ? (\n <span dangerouslySetInnerHTML={{ __html: embedCodeFinal }} />\n ) : (\n <Box\n as=\"iframe\"\n src={videoSrc}\n title={iframeTitleFinal}\n frameBorder=\"0\"\n allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; fullscreen; gyroscope; picture-in-picture\"\n allowFullScreen\n __css={styles.iframe}\n />\n );\n\n return (\n <Box\n className={className}\n data-testid=\"video-player-component\"\n id={id}\n __css={styles}\n {...rest}\n >\n {isInvalid ? (\n <span dangerouslySetInnerHTML={{ __html: errorMessage }} />\n ) : (\n <ComponentWrapper\n headingText={headingText ? headingText : undefined}\n descriptionText={descriptionText ? descriptionText : undefined}\n helperText={\n helperText && showHelperInvalidText ? helperText : undefined\n }\n id={`${id}-componentWrapper`}\n >\n <Box __css={styles.inside}>{embedElement}</Box>\n </ComponentWrapper>\n )}\n </Box>\n );\n }\n);\n\nexport default VideoPlayer;\n","import {\n chakra,\n Table as ChakraTable,\n TableCaption as ChakraTableCaption,\n Tbody as ChakraTbody,\n Thead as ChakraTHead,\n Td as ChakraTd,\n Th as ChakraTh,\n Tr as ChakraTr,\n useMultiStyleConfig,\n} from \"@chakra-ui/react\";\nimport * as React from \"react\";\nimport useWindowSize from \"../../hooks/useWindowSize\";\n\ninterface CustomColors {\n backgroundColor?: string;\n color?: string;\n}\nexport interface TableProps {\n /** Additional class name for the `Table` component. */\n className?: string;\n /** Array of string values used to populate the `Table` column headers.\n * For improved accessibility, column headers are required. */\n columnHeaders: string[];\n /** Hex value to set the background color of the column headers. */\n columnHeadersBackgroundColor?: string;\n /** Hex value to set the text color of the column headers. */\n columnHeadersTextColor?: string;\n /** ID that other components can cross reference for accessibility purposes. */\n id?: string;\n /** If true, a border will be displayed between each row in the `Table`\n * component. The default value is false. */\n showRowDividers?: boolean;\n /** Two-dimensional array used to populate the table rows. */\n tableData: (string | JSX.Element)[][];\n /** Displays `Table` title element. */\n titleText?: string;\n /** If true, the first cell of each row in the `Table` component will be\n * visually styled as a header. The default value is false */\n useRowHeaders?: boolean;\n}\n\n/**\n * Basic `Table` component used to organize and display tabular data in\n * rows and columns.\n */\nexport const Table = chakra((props: React.PropsWithChildren<TableProps>) => {\n const {\n className,\n columnHeaders = [],\n columnHeadersBackgroundColor,\n columnHeadersTextColor,\n id,\n showRowDividers = false,\n tableData,\n titleText,\n useRowHeaders = false,\n ...rest\n } = props;\n const customColors: CustomColors = {};\n\n columnHeadersBackgroundColor &&\n (customColors[\"backgroundColor\"] = columnHeadersBackgroundColor);\n columnHeadersTextColor && (customColors[\"color\"] = columnHeadersTextColor);\n\n const styles = useMultiStyleConfig(\"CustomTable\", {\n columnHeadersBackgroundColor,\n columnHeadersTextColor,\n showRowDividers,\n useRowHeaders,\n });\n\n // Based on --nypl-breakpoint-medium\n const breakpointMedium = 600;\n const windowDimensions = useWindowSize();\n\n const tableCaption = titleText && (\n <ChakraTableCaption>{titleText}</ChakraTableCaption>\n );\n\n const columnHeadersElems =\n columnHeaders.length > 0 ? (\n <ChakraTHead>\n <ChakraTr>\n {columnHeaders.map((child, key) => (\n <ChakraTh key={key} scope=\"col\" sx={customColors}>\n {child}\n </ChakraTh>\n ))}\n </ChakraTr>\n </ChakraTHead>\n ) : (\n console.warn(\n \"NYPL Reservoir Table: Column headers have not been set. For improved accessibility, \" +\n \"column headers are required.\"\n )\n );\n\n /**\n * This renders a normal `tbody` DOM element structure if the `tableData`\n * passed is a two-dimensional array. This is to render the appropriate\n * row and column structure for a table.\n */\n const tableBodyElems = () => {\n if (\n !Array.isArray(tableData) ||\n tableData.length <= 0 ||\n tableData[0].constructor !== Array\n ) {\n console.warn(\n \"NYPL Reservoir Table: Data in the `tableData` prop must be a two dimensional array.\"\n );\n return null;\n }\n\n for (let i = 1; i < tableData.length; i++) {\n if (tableData[0].length !== tableData[i].length) {\n console.warn(\n \"NYPL Reservoir Table: The number of columns in each row of the data table are not identical. \" +\n \"The `Table` component may not render properly.\"\n );\n break;\n }\n }\n\n const cellContent = (key: number, column: string | JSX.Element) => {\n return windowDimensions.width <= breakpointMedium ? (\n <>\n <span>{columnHeaders[key]}</span>\n <span>{column}</span>\n </>\n ) : (\n column\n );\n };\n\n return (\n <ChakraTbody>\n {tableData.map((row, index) => (\n <ChakraTr key={index}>\n {row.map((column, key) =>\n key === 0 && useRowHeaders ? (\n <ChakraTh scope=\"row\" key={key}>\n {cellContent(key, column)}\n </ChakraTh>\n ) : (\n <ChakraTd key={key}>{cellContent(key, column)}</ChakraTd>\n )\n )}\n </ChakraTr>\n ))}\n </ChakraTbody>\n );\n };\n\n for (let j = 0; j < tableData.length; j++) {\n if (columnHeaders.length && columnHeaders.length !== tableData[j].length) {\n console.warn(\n \"NYPL Reservoir Table: The number of column headers in the `columnHeaders` prop is not equal \" +\n \"to the number of columns in the data table. \" +\n \"The `Table` component may not render properly.\"\n );\n break;\n }\n }\n\n return (\n <ChakraTable id={id} sx={styles} className={className} {...rest}>\n {tableCaption}\n {columnHeadersElems}\n {tableBodyElems()}\n </ChakraTable>\n );\n});\n\nexport default Table;\n"],"names":["accessibilityFull","accessibilityPartial","actionCheckCircle","actionExit","actionHelpDefault","actionHelpOutline","actionLaunch","actionPower","actionSettings","alertNotificationImportant","arrow","building","check","clock","close","download","errorFilled","errorOutline","fileTypeAudio","fileTypeDoc","fileTypeGenericDoc","fileTypeImage","fileTypePdf","fileTypeSpreadsheet","fileTypeVideo","headset","locator","minus","plus","search","socialFacebook","socialInstagram","socialTumblr","socialTwitter","socialYoutube","speakerNotes","utilityAccountFilled","utilityAccountUnfilled","utilityHamburger","utilitySearch","Icon","chakra","props","align","children","className","color","decorative","iconRotation","id","name","size","title","type","rest","styles","useStyleConfig","variant","iconProps","role","childSVG","console","warn","SvgComponent","iconSvgs","React","ChakraIcon","as","__css","mdxType","Box","shouldForwardProp","getIcon","isExpanded","index","iconName","getElementsFromData","data","colorMap","warning","error","multipleFontSize","length","multiplePadding","map","content","panel","AccordionPanel","key","dangerouslySetInnerHTML","__html","AccordionItem","bgColorByAccordionType","accordionType","AccordionButton","borderColor","padding","bg","_expanded","_hover","flex","fontSize","textAlign","label","Accordion","accordionData","isDefaultOpen","openFirstAccordion","undefined","ChakraAccordion","defaultIndex","allowMultiple","breadcrumbsID","breadcrumbItems","breadcrumbData","BreadcrumbItem","isCurrentPage","BreadcrumbLink","href","url","text","Breadcrumbs","breadcrumbsData","breadcrumbsType","Error","ChakraBreadcrumb","Button","buttonType","isDisabled","mouseDown","onClick","btnCallback","onMouseDown","childCount","hasIcon","child","ChakraButton","useNYPLBreakpoints","useMediaQuery","isLargerThanSmall","isLargerThanMedium","isLargerThanLarge","isLargerThanXLarge","isLargerThanMobile","ButtonGroup","buttonWidth","layout","newChildren","finalLayout","finalButtonWidth","disabledProps","push","Stack","direction","spacing","sx","getWithDirectionIcon","linkId","iconAlign","icon","iconId","getExternalIcon","Link","ref","linkProps","style","rel","target","count","childrenToClone","childProps","getMappedLevel","level","levelMap","one","two","three","four","five","six","Heading","isCapitalized","isUppercase","isLowercase","noSpace","urlClass","finalLevel","asHeading","textCase","contentToRender","ChakraHeading","ImageWrapper","additionalWrapperStyles","aspectRatio","useMultiStyleConfig","ratio","crop","Image","additionalFigureStyles","additionalImageStyles","alt","caption","component","credit","imageType","src","supportsLazyLoading","useNativeLazyLoading","useInView","triggerOnce","skip","inView","useImageWrapper","imageComponent","srcProp","loading","img","finalImage","figure","figcaption","captionWrappers","CardImage","isAtEnd","isCentered","imageIsAtEnd","CardHeading","CardContent","CardActions","bottomBorder","topBorder","CardWrapper","mainActionLink","ChakraLinkBox","CardLinkOverlay","ChakraLinkOverlay","Card","backgroundColor","foregroundColor","imageProps","isAlignedRightActions","isBordered","hasImage","finalImageAspectRatio","customColors","cardContents","cardRightContents","cardHeadingCount","isCardActions","elem","heading","body","actions","HelperErrorText","ariaAtomic","ariaLive","isInvalid","announceAriaLive","Text","isBold","isItalic","ChakraText","ComponentWrapper","descriptionText","headingText","helperText","helperTextStyles","invalidText","showHelperInvalidText","hasChildren","footnote","helperErrorText","range","start","stop","step","Array","Math","ceil","fill","x","y","getAriaAttrs","labelText","showLabel","ariaAttributes","CheckboxIcon","viewBox","d","Checkbox","isChecked","isIndeterminate","isRequired","onChange","value","ChakraCheckbox","defaultIsChecked","alignItems","Fieldset","isLegendHidden","legendText","showRequiredLabel","chakraSpacingTokens","px","reservoirSpacingValues","xxxs","xxs","xs","s","m","l","xl","xxl","xxxl","reservoirSpacingTokens","input","group","button","hstack","vstack","inset","extranarrow","extrawide","narrow","wide","grid","page","table","column","row","CheckboxGroup","defaultValue","isFullWidth","spacingProp","checkboxProps","i","newProps","ChakraCheckboxGroup","SimpleGrid","columns","gap","responsiveCols","base","md","lg","ChakraSimpleGrid","FormRow","alteredChildren","FormField","Form","action","method","onSubmit","attributes","Label","htmlFor","isInlined","TextInputFormats","email","hidden","password","tel","textarea","TextInput","max","maxLength","min","onFocus","placeholder","textInputType","isTextArea","isHidden","finalInvalidText","finalIsInvalid","fieldOutput","options","example","ChakraInput","ChakraTextarea","CustomTextInput","forwardRef","dsRef","disabled","DatePickerWrapper","isDateRange","DateRangeRow","DatePicker","dateFormat","dateType","helperTextFrom","helperTextTo","initialDate","initialDateTo","maxDate","minDate","nameFrom","nameTo","refTo","finalStyles","initStartDate","Date","initEndDate","initFullDate","startDate","endDate","useState","fullDate","setFullDate","onChangeDefault","date","yearsToDisplay","baseDatePickerAttrs","popperClassName","popperPlacement","popperModifiers","offset","baseCustomTextInputAttrs","subLabels","startDatePickerAttrs","endDatePickerAttrs","endDatePickerElement","startLabelText","endCustomTextInputAttrs","selectsStart","selectsEnd","ReactDatePicker","customInput","selected","startDatePickerElement","screenreaderOnly","clip","height","overflow","position","width","wordWrap","wrapperStyles","marginY","marginX","maxWidth","paddingTop","paddingBottom","paddingRight","paddingLeft","activeFocus","darkMode","boxShadow","outline","outlineOffset","outlineColor","zIndex","checkboxRadioLabelStyles","userSelect","fontWeight","marginBottom","marginLeft","_disabled","opacity","fontStyle","_invalid","checkboxRadioControlSize","h","w","checkboxRadioHelperErrorTextStyle","checkboxRadioGroupStyles","marginTop","defaultElementSizes","mobileFieldHeight","labelLegendText","display","span","selectTextInputDisabledStyles","selectTextInputFocusStyles","textMargin","margin","global","boxSizing","fontFamily","lineHeight","overflowX","a","svg","_focus","p","ul","ol","createBreakpoints","sm","grayLightCool","grayxxLightCool","grayMedium","brandPrimary","brandSecondary","brandObj","primary","secondary","colors","transparent","ui","black","white","focus","link","status","success","test","gray","xdark","dark","medium","brand","section","blogs","education","locations","research","lpa","schomburg","schwartzman","red","orange","yellow","green","blue","radii","checkbox","pill","round","shadows","fontSizeValues","fontWeightValues","light","regular","bold","typography","fonts","fontSizes","breadcrumbs","tertiary","callout","helper","tag","mini","fontWeights","lastChild","containerStyles","border","buttonStyles","borderWidth","panelStyles","borderLeftWidth","borderRightWidth","borderBottomWidth","parts","baseStyle","container","booksAndMore","whatsOn","Breadcrumb","cursor","textDecoration","marginRight","marginInlineEnd","marginInlineStart","variants","borderRadius","justifyContent","maxHeight","minHeight","py","_visited","pointerEvents","minWidth","iconOnly","paddingInlineStart","paddingInlineEnd","_active","noBrand","defaultProps","flexGrow","imageSizes","xxsmall","xsmall","small","large","getBodyPaddingStyles","isRow","bodyPadding","layoutStyles","flexFlow","baseBorderStyles","bodyMargin","flexShrink","flexBasis","topBorderStyles","borderTop","bottomBorderStyles","borderBottom","columnGap","_last","imageSize","imageIsAtEndStyles","order","baseStyleIcon","transitionProperty","transitionDuration","baseStyleControl","_checked","_indeterminate","baseStyleLabel","baseStyleHelperErrorText","control","sizes","colorScheme","imageWrap","sideMarginsAuto","imageRatios","fourByThree","oneByTwo","original","sixteenByNine","square","threeByFour","threeByTwo","twoByOne","CustomImage","circle","objectFit","CustomImageWrapper","left","top","select","Select","labelPosition","inline","searchbar","borderRightColor","borderRightRadius","screenreaderStyles","legend","baseLinkStyles","moreLink","margins","headings","h1","letterSpacing","h2","h3","h4","fallback","h5","h6","textTransform","secondaryBase","bodyText","secondaryHeadingBase","_before","getSecondaryVariantStyles","bgColor","secondaryBooksAndMore","secondaryLocations","secondaryResearch","secondaryWhatsOn","_lastChild","campaign","interior","fiftyFifty","Hero","HorizontalRule","svgBase","none","right","rotate180","transform","rotate270","rotate0","rotate90","xxxlarge","xxlarge","xlarge","allStyles","whiteSpace","baseListStyles","noStyling","listStyle","li","listStyleType","_notFirst","baseUnorderedStyles","baseSectionDefinitionStyles","baseDefinitionStyles","dl","gridTemplateColumns","gridTemplateRows","dt","dd","List","Logo","Notification","dismissible","noMargin","notificationType","dismissibleButton","NotificationContent","alignText","NotificationHeading","Pagination","ProgressIndicator","circular","_first","stroke","circularContainer","flexDirection","linear","linearContainer","linearPercentage","verticalAlign","hiddenLabel","Radio","RadioGroup","SearchBar","textOverflow","element","borderRules","imagePaddingBottomStyles","landscape","portrait","imageRowHeightStyles","SkeletonLoader","imageAspectRatio","borderStyles","image","showImage","fade","keyframes","from","to","Skeleton","background","animation","SkipNavigation","staticValues","CustomSlider","showBoxes","showValues","baseColor","leftValue","rightValue","textInput","sliderContainer","filledTrack","track","thumb","StatusBadge","low","high","cellBorderColorStyles","baseTRStyles","columnHeadersBackgroundColor","showRowDividers","useRowHeaders","baseCellStyles","columnHeadersTextColor","baseTHStyles","baseTDStyles","tbody","th","thead","tr","td","captionSide","CustomTable","StructuredContent","hasFigureImage","imagePosition","imageFigure","imageWrapper","tablist","tab","borderTopRadius","borderBottomColor","_selected","buttonArrows","pos","transition","tablistWrapper","tabpanels","carouselParent","CustomTabs","breakout","Template","TemplateHeader","TemplateBreakout","TemplateContent","sidebar","TemplateContentTop","TemplateContentPrimary","TemplateContentSidebar","_placeholder","lineheight","searchBar","searchBarSelect","borderTopLeftRadius","borderTopRightRadius","toggleBaseStyle","$width","cssVar","$height","Switch","variable","Toggle","inside","invalid","VideoPlayer","iframe","theme","extendTheme","breakpoints","space","components","CustomSelect","NotificationStyles","Tabs","TemplateStyles","config","cssVarPrefix","initialColorMode","useSystemColorMode","DSProvider","colorModeManager","ChakraProvider","heroSecondaryTypes","backgroundImageSrc","heroType","locationDetails","subHeaderText","headingStyles","finalHeading","backgroundImageStyle","contentBoxStyling","includes","backgroundImage","childrenToRender","listItems","listElement","listChildrenElms","listType","item","term","description","checkListChildrenError","checkDescriptionChildrenError","appleAppStoreBlack","appleAppStoreWhite","bplBlack","bplWhite","cleverBadgeColor","cleverColor","cleverWhite","firstbookColor","firstbookColorNegative","googlePlayBlack","lpaBlack","lpaColor","lpaWhite","mlnBlack","mlnColor","mlnWhite","nyplFullBlack","nyplFullWhite","nyplLionBlack","nyplLionWhite","nyplTextBlack","nyplTextWhite","openebooksColor","openebooksNegative","openebooksWithTextColor","openebooksWithTextNegative","qplAltBlack","qplAltWhite","qplBlack","qplColor","qplWhite","reservoirIconColor","reservoirVerticalColor","schomburgBlack","schomburgCircleBlack","schomburgCircleColor","schomburgCircleWhite","schomburgColor","schomburgWhite","simplyeBlack","simplyeWhite","simplyeColor","snflBlack","snflWhite","treasuresColor","treasuresColorNegative","logoProps","logoSvgs","BaseModal","bodyContent","closeButtonLabel","isOpen","onClose","fullSize","ChakraModal","scrollBehavior","ModalOverlay","ModalContent","ModalHeader","ModalCloseButton","ModalBody","ModalFooter","ModalTrigger","buttonText","modalProps","useDisclosure","onOpen","finalOnCloseHandler","useModal","Modal","ariaLabel","notificationContent","notificationHeading","showIcon","setIsOpen","handleClose","iconElement","baseIconProps","cloneElement","announcement","standard","iconElem","childHeading","childContent","currentPage","getPageHref","initialPage","onPageChange","pageCount","refCurrentPage","useRef","selectedPage","setSelectedPage","previousPageNumber","nextPageNumber","useEffect","current","changeUrls","handlePageClick","e","clickedPage","preventDefault","previousPage","nextPage","getLinkElement","isSelectedPage","currentStyles","pointerEvent","allAttrs","items","previous","next","linkAttrs","getPaginationNumbers","middleRangeStart","middleRangeEnd","itemList","_","pageLiItems","itemElement","previousLiLink","nextLiLink","indicatorType","finalValue","progressProps","progressComponent","ChakraCircularProgress","ChakraCircularProgressLabel","ChakraProgress","ChakraRadio","setValue","radioGroupProps","ChakraRadioGroup","selectType","labelWidth","setLabelWidth","labelRef","controlledProps","labelSelectGap","clientWidth","ChakraSelect","buttonOnClick","noBrandButtonType","selectProps","textInputElement","textInputProps","stateProps","finalAriaLabel","inputPlaceholder","textInputPlaceholder","searchBarButtonStyles","borderLeftRadius","selectElem","optionsData","option","textInputNative","buttonElem","textInputElem","contentSize","headingSize","showButton","showContent","showHeading","getSkeletonElements","lastWidth","marginBottomValue","ChakraSkeleton","Slider","isRangeSlider","rangeSliderDefault","finalDevaultValue","currentValue","setCurrentValue","sliderSharedProps","focusThumbOnChange","val","textInputSharedProps","getTextInput","inputProps","toString","nextValue","parseInt","newValue","end","updatedLabel","getSliderType","ChakraRangeSlider","ChakraRangeSliderTrack","ChakraRangeSliderFilledTrack","ChakraRangeSliderThumb","ChakraSlider","ChakraSliderTrack","ChakraSliderFilledTrack","ChakraSliderThumb","StructuredContentImage","calloutText","finalBodyContent","useCarouselStyles","slidesCount","slideWidth","currentSlide","setCurrentSlide","prevSlide","slide","nextSlide","goToStart","carouselStyle","onClickHash","tabHash","window","location","hash","useHash","tabs","panels","forEach","tempPanel","tempTab","Tab","TabPanel","TabList","TabPanels","getElementsFromChildren","childTabs","tabsData","initTabWidth","mediumTabWidth","tabWidth","tabProps","previousButton","nextButton","ChakraTabs","isLazy","TemplateAboveHeader","renderHeaderElement","headerElement","newChild","TemplateFooter","renderFooterElement","footerElement","TemplateAppContainer","aboveHeader","contentId","contentPrimary","contentSidebar","contentTop","footer","header","renderSkipNavigation","aboveHeaderElem","breakoutElem","contentTopElem","contentPrimaryElem","contentSidebarElem","defaultChecked","switchStyles","useNYPLTheme","useTheme","Object","keys","useWindowSize","windowSize","setWindowSize","handler","innerWidth","innerHeight","addEventListener","removeEventListener","embedCode","iframeTitle","videoId","videoType","iframeTitleFinal","videoSrc","iFrameTitleEmbedCode","embedCodeFinal","replace","errorMessage","embedElement","frameBorder","allow","allowFullScreen","Table","columnHeaders","tableData","titleText","breakpointMedium","windowDimensions","tableCaption","ChakraTableCaption","columnHeadersElems","ChakraTHead","ChakraTr","ChakraTh","scope","tableBodyElems","isArray","constructor","cellContent","ChakraTbody","ChakraTd","j","ChakraTable"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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