@nypl/design-system-react-components 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/README.md +466 -17
  2. package/dist/design-system-react-components.cjs +528 -0
  3. package/dist/design-system-react-components.js +37569 -0
  4. package/dist/src/components/Accordion/Accordion.d.ts +29 -0
  5. package/dist/src/components/AlphabetFilter/AlphabetFilter.d.ts +23 -0
  6. package/dist/src/components/AudioPlayer/AudioPlayer.d.ts +43 -0
  7. package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +24 -0
  8. package/dist/src/components/Button/Button.d.ts +35 -0
  9. package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +25 -0
  10. package/dist/src/components/Card/Card.d.ts +55 -0
  11. package/dist/src/components/Checkbox/Checkbox.d.ts +47 -0
  12. package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +51 -0
  13. package/dist/src/components/ComponentWrapper/ComponentWrapper.d.ts +31 -0
  14. package/dist/src/components/DatePicker/DatePicker.d.ts +82 -0
  15. package/dist/src/components/FeedbackBox/FeedbackBox.d.ts +64 -0
  16. package/dist/src/components/FeedbackBox/useFeedbackBoxReducer.d.ts +19 -0
  17. package/dist/src/components/Fieldset/Fieldset.d.ts +24 -0
  18. package/dist/src/components/Form/Form.d.ts +31 -0
  19. package/dist/src/components/Grid/SimpleGrid.d.ts +20 -0
  20. package/dist/src/components/Heading/Heading.d.ts +42 -0
  21. package/dist/src/components/HelperErrorText/HelperErrorText.d.ts +34 -0
  22. package/dist/src/components/Hero/Hero.d.ts +49 -0
  23. package/dist/src/components/HorizontalRule/HorizontalRule.d.ts +11 -0
  24. package/dist/src/components/Icons/Icon.d.ts +41 -0
  25. package/dist/src/components/Icons/IconSvgs.d.ts +196 -0
  26. package/dist/src/components/Icons/iconVariables.d.ts +6 -0
  27. package/dist/src/components/Image/Image.d.ts +68 -0
  28. package/dist/src/components/Label/Label.d.ts +25 -0
  29. package/dist/src/components/Link/Link.d.ts +32 -0
  30. package/dist/src/components/List/List.d.ts +43 -0
  31. package/dist/src/components/Logo/Logo.d.ts +29 -0
  32. package/dist/src/components/Logo/LogoSvgs.d.ts +166 -0
  33. package/dist/src/components/Logo/logoVariables.d.ts +2 -0
  34. package/dist/src/components/Modal/Modal.d.ts +35 -0
  35. package/dist/src/components/Notification/Notification.d.ts +52 -0
  36. package/dist/src/components/Pagination/Pagination.d.ts +27 -0
  37. package/dist/src/components/ProgressIndicator/ProgressIndicator.d.ts +32 -0
  38. package/dist/src/components/Radio/Radio.d.ts +43 -0
  39. package/dist/src/components/RadioGroup/RadioGroup.d.ts +51 -0
  40. package/dist/src/components/SearchBar/SearchBar.d.ts +58 -0
  41. package/dist/src/components/Select/Select.d.ts +59 -0
  42. package/dist/src/components/SkeletonLoader/SkeletonLoader.d.ts +42 -0
  43. package/dist/src/components/SkipNavigation/SkipNavigation.d.ts +19 -0
  44. package/dist/src/components/Slider/Slider.d.ts +65 -0
  45. package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +42 -0
  46. package/dist/src/components/SocialMediaLinks/SocialMediaLinksUtils.d.ts +7 -0
  47. package/dist/src/components/StatusBadge/StatusBadge.d.ts +19 -0
  48. package/dist/src/components/StructuredContent/StructuredContent.d.ts +30 -0
  49. package/dist/src/components/StyleGuide/ColorCard.d.ts +348 -0
  50. package/dist/src/components/StyledList/StyledList.d.ts +26 -0
  51. package/dist/src/components/Table/Table.d.ts +32 -0
  52. package/dist/src/components/Tabs/Tabs.d.ts +28 -0
  53. package/dist/src/components/TagSet/TagSet.d.ts +24 -0
  54. package/dist/src/components/TagSet/TagSetExplore.d.ts +28 -0
  55. package/dist/src/components/TagSet/TagSetFilter.d.ts +25 -0
  56. package/dist/src/components/TagSet/TooltipWrapper.d.ts +9 -0
  57. package/dist/src/components/Template/Template.d.ts +140 -0
  58. package/dist/src/components/Text/Text.d.ts +27 -0
  59. package/dist/src/components/TextInput/TextInput.d.ts +89 -0
  60. package/dist/src/components/Toggle/Toggle.d.ts +43 -0
  61. package/dist/src/components/Tooltip/Tooltip.d.ts +17 -0
  62. package/dist/src/components/VideoPlayer/VideoPlayer.d.ts +42 -0
  63. package/dist/src/helpers/types.d.ts +2 -0
  64. package/dist/src/hooks/useCarouselStyles.d.ts +17 -0
  65. package/dist/src/hooks/useCloseDropDown.d.ts +7 -0
  66. package/dist/src/hooks/useNYPLBreakpoints.d.ts +13 -0
  67. package/dist/src/hooks/useNYPLTheme.d.ts +75 -0
  68. package/dist/src/hooks/useStateWithDependencies.d.ts +5 -0
  69. package/dist/src/hooks/useWindowSize.d.ts +10 -0
  70. package/dist/src/index.d.ts +83 -0
  71. package/dist/src/theme/components/accordion.d.ts +34 -0
  72. package/dist/src/theme/components/alphabetFilter.d.ts +40 -0
  73. package/dist/src/theme/components/audioPlayer.d.ts +16 -0
  74. package/dist/src/theme/components/breadcrumb.d.ts +158 -0
  75. package/dist/src/theme/components/button.d.ts +152 -0
  76. package/dist/src/theme/components/buttonGroup.d.ts +11 -0
  77. package/dist/src/theme/components/card.d.ts +485 -0
  78. package/dist/src/theme/components/checkbox.d.ts +178 -0
  79. package/dist/src/theme/components/checkboxGroup.d.ts +14 -0
  80. package/dist/src/theme/components/componentWrapper.d.ts +12 -0
  81. package/dist/src/theme/components/customTable.d.ts +739 -0
  82. package/dist/src/theme/components/datePicker.d.ts +17 -0
  83. package/dist/src/theme/components/feedbackBox.d.ts +100 -0
  84. package/dist/src/theme/components/fieldset.d.ts +24 -0
  85. package/dist/src/theme/components/filterBar.d.ts +46 -0
  86. package/dist/src/theme/components/global.d.ts +141 -0
  87. package/dist/src/theme/components/globalMixins.d.ts +40 -0
  88. package/dist/src/theme/components/heading.d.ts +372 -0
  89. package/dist/src/theme/components/helperErrorText.d.ts +18 -0
  90. package/dist/src/theme/components/hero.d.ts +639 -0
  91. package/dist/src/theme/components/horizontalRule.d.ts +18 -0
  92. package/dist/src/theme/components/icon.d.ts +62251 -0
  93. package/dist/src/theme/components/image.d.ts +754 -0
  94. package/dist/src/theme/components/label.d.ts +22 -0
  95. package/dist/src/theme/components/link.d.ts +152 -0
  96. package/dist/src/theme/components/list.d.ts +230 -0
  97. package/dist/src/theme/components/logo.d.ts +477 -0
  98. package/dist/src/theme/components/modal.d.ts +27 -0
  99. package/dist/src/theme/components/multiSelect.d.ts +29 -0
  100. package/dist/src/theme/components/multiSelectMenuButton.d.ts +99 -0
  101. package/dist/src/theme/components/notification.d.ts +137 -0
  102. package/dist/src/theme/components/pagination.d.ts +19 -0
  103. package/dist/src/theme/components/progressIndicator.d.ts +69 -0
  104. package/dist/src/theme/components/radio.d.ts +202 -0
  105. package/dist/src/theme/components/radioGroup.d.ts +14 -0
  106. package/dist/src/theme/components/searchBar.d.ts +34 -0
  107. package/dist/src/theme/components/select.d.ts +126 -0
  108. package/dist/src/theme/components/skeletonLoader.d.ts +105 -0
  109. package/dist/src/theme/components/skipNavigation.d.ts +28 -0
  110. package/dist/src/theme/components/slider.d.ts +78 -0
  111. package/dist/src/theme/components/socialmedialinks.d.ts +192 -0
  112. package/dist/src/theme/components/statusBadge.d.ts +37 -0
  113. package/dist/src/theme/components/structuredContent.d.ts +454 -0
  114. package/dist/src/theme/components/styledList.d.ts +51 -0
  115. package/dist/src/theme/components/tabs.d.ts +172 -0
  116. package/dist/src/theme/components/tagSet.d.ts +154 -0
  117. package/dist/src/theme/components/template.d.ts +98 -0
  118. package/dist/src/theme/components/text.d.ts +59 -0
  119. package/dist/src/theme/components/textInput.d.ts +360 -0
  120. package/dist/src/theme/components/toggle.d.ts +129 -0
  121. package/dist/src/theme/components/tooltip.d.ts +21 -0
  122. package/dist/src/theme/components/videoPlayer.d.ts +47 -0
  123. package/dist/src/theme/foundations/breakpoints.d.ts +23 -0
  124. package/dist/src/theme/foundations/colors.d.ts +3 -0
  125. package/dist/src/theme/foundations/global.d.ts +68 -0
  126. package/dist/src/theme/foundations/radii.d.ts +11 -0
  127. package/dist/src/theme/foundations/shadows.d.ts +4 -0
  128. package/dist/src/theme/foundations/spacing.d.ts +96 -0
  129. package/dist/src/theme/foundations/typography.d.ts +8 -0
  130. package/dist/src/theme/index.d.ts +20 -0
  131. package/dist/src/theme/internalChakraProvider.d.ts +67 -0
  132. package/dist/src/theme/provider.d.ts +4 -0
  133. package/dist/src/theme/types.d.ts +1 -0
  134. package/dist/src/utils/colorUtils.d.ts +5 -0
  135. package/dist/src/utils/interfaces.d.ts +5 -0
  136. package/dist/src/utils/utils.d.ts +41 -0
  137. package/dist/styles.css +1 -0
  138. package/package.json +129 -24
  139. package/CHANGELOG.md +0 -139
  140. package/dist/design-system-react-components.min.js +0 -23
  141. package/dist/design-system-react-components.min.js.map +0 -1
  142. package/lib/components/00-base/Container/Container.d.ts +0 -6
  143. package/lib/components/00-base/Container/Container.js +0 -19
  144. package/lib/components/00-base/Container/Modal.d.ts +0 -12
  145. package/lib/components/00-base/Container/Modal.js +0 -29
  146. package/lib/components/00-base/Container/Modal.stories.d.ts +0 -7
  147. package/lib/components/00-base/Container/Modal.stories.js +0 -20
  148. package/lib/components/00-base/Placeholder.d.ts +0 -10
  149. package/lib/components/00-base/Placeholder.js +0 -23
  150. package/lib/components/00-base/SectionName.d.ts +0 -4
  151. package/lib/components/00-base/SectionName.js +0 -16
  152. package/lib/components/01-atoms/Button/Button.d.ts +0 -52
  153. package/lib/components/01-atoms/Button/Button.js +0 -76
  154. package/lib/components/01-atoms/Button/Button.stories.d.ts +0 -14
  155. package/lib/components/01-atoms/Button/Button.stories.js +0 -33
  156. package/lib/components/01-atoms/Button/ButtonTypes.d.ts +0 -10
  157. package/lib/components/01-atoms/Button/ButtonTypes.js +0 -14
  158. package/lib/components/01-atoms/Forms/Checkbox.d.ts +0 -21
  159. package/lib/components/01-atoms/Forms/Checkbox.js +0 -27
  160. package/lib/components/01-atoms/Forms/Checkbox.stories.d.ts +0 -7
  161. package/lib/components/01-atoms/Forms/Checkbox.stories.js +0 -23
  162. package/lib/components/01-atoms/Forms/DateRangeForm.d.ts +0 -31
  163. package/lib/components/01-atoms/Forms/DateRangeForm.js +0 -27
  164. package/lib/components/01-atoms/Forms/DateRangeForm.stories.d.ts +0 -9
  165. package/lib/components/01-atoms/Forms/DateRangeForm.stories.js +0 -23
  166. package/lib/components/01-atoms/Forms/FormDropdown.d.ts +0 -22
  167. package/lib/components/01-atoms/Forms/FormDropdown.js +0 -64
  168. package/lib/components/01-atoms/Forms/FormDropdown.stories.d.ts +0 -8
  169. package/lib/components/01-atoms/Forms/FormDropdown.stories.js +0 -22
  170. package/lib/components/01-atoms/Forms/HelperErrorText.d.ts +0 -26
  171. package/lib/components/01-atoms/Forms/HelperErrorText.js +0 -29
  172. package/lib/components/01-atoms/Forms/HelperErrorText.stories.d.ts +0 -9
  173. package/lib/components/01-atoms/Forms/HelperErrorText.stories.js +0 -23
  174. package/lib/components/01-atoms/Forms/Input.d.ts +0 -47
  175. package/lib/components/01-atoms/Forms/Input.js +0 -39
  176. package/lib/components/01-atoms/Forms/Input.stories.d.ts +0 -10
  177. package/lib/components/01-atoms/Forms/Input.stories.js +0 -22
  178. package/lib/components/01-atoms/Forms/Label.d.ts +0 -19
  179. package/lib/components/01-atoms/Forms/Label.js +0 -22
  180. package/lib/components/01-atoms/Forms/Label.stories.d.ts +0 -7
  181. package/lib/components/01-atoms/Forms/Label.stories.js +0 -20
  182. package/lib/components/01-atoms/Forms/TextField.d.ts +0 -26
  183. package/lib/components/01-atoms/Forms/TextField.js +0 -36
  184. package/lib/components/01-atoms/Forms/TextField.stories.d.ts +0 -7
  185. package/lib/components/01-atoms/Forms/TextField.stories.js +0 -20
  186. package/lib/components/01-atoms/Images/Icons/Icon.d.ts +0 -14
  187. package/lib/components/01-atoms/Images/Icons/Icon.js +0 -38
  188. package/lib/components/01-atoms/Images/Image/Image.d.ts +0 -8
  189. package/lib/components/01-atoms/Images/Image/Image.js +0 -32
  190. package/lib/components/01-atoms/Images/Image/Image.stories.d.ts +0 -8
  191. package/lib/components/01-atoms/Images/Image/Image.stories.js +0 -24
  192. package/lib/components/01-atoms/Links/BasicLink.d.ts +0 -15
  193. package/lib/components/01-atoms/Links/BasicLink.js +0 -50
  194. package/lib/components/01-atoms/Links/BasicLink.stories.d.ts +0 -8
  195. package/lib/components/01-atoms/Links/BasicLink.stories.js +0 -21
  196. package/lib/components/01-atoms/Links/IconLink.d.ts +0 -13
  197. package/lib/components/01-atoms/Links/IconLink.js +0 -44
  198. package/lib/components/01-atoms/Links/IconLink.stories.d.ts +0 -10
  199. package/lib/components/01-atoms/Links/IconLink.stories.js +0 -24
  200. package/lib/components/01-atoms/Links/Link.d.ts +0 -13
  201. package/lib/components/01-atoms/Links/Link.js +0 -51
  202. package/lib/components/01-atoms/Links/UnderlineLink.d.ts +0 -11
  203. package/lib/components/01-atoms/Links/UnderlineLink.js +0 -29
  204. package/lib/components/01-atoms/Links/UnderlineLink.stories.d.ts +0 -8
  205. package/lib/components/01-atoms/Links/UnderlineLink.stories.js +0 -21
  206. package/lib/components/01-atoms/Text/Headings/Heading.d.ts +0 -16
  207. package/lib/components/01-atoms/Text/Headings/Heading.js +0 -40
  208. package/lib/components/01-atoms/Text/Headings/Heading.stories.d.ts +0 -12
  209. package/lib/components/01-atoms/Text/Headings/Heading.stories.js +0 -35
  210. package/lib/components/01-atoms/Text/Headings/RNSectionTitle.d.ts +0 -2
  211. package/lib/components/01-atoms/Text/Headings/RNSectionTitle.js +0 -18
  212. package/lib/components/01-atoms/Text/Headings/RNSectionTitle.stories.d.ts +0 -7
  213. package/lib/components/01-atoms/Text/Headings/RNSectionTitle.stories.js +0 -24
  214. package/lib/components/01-atoms/Text/Text/BodyText.d.ts +0 -12
  215. package/lib/components/01-atoms/Text/Text/BodyText.js +0 -73
  216. package/lib/components/01-atoms/Text/Text/BodyText.stories.d.ts +0 -14
  217. package/lib/components/01-atoms/Text/Text/BodyText.stories.js +0 -54
  218. package/lib/components/02-molecules/Cards/EditionCard.d.ts +0 -31
  219. package/lib/components/02-molecules/Cards/EditionCard.js +0 -51
  220. package/lib/components/02-molecules/Cards/EditionCard.stories.d.ts +0 -13
  221. package/lib/components/02-molecules/Cards/EditionCard.stories.js +0 -26
  222. package/lib/components/02-molecules/Cards/SearchResultItem.d.ts +0 -17
  223. package/lib/components/02-molecules/Cards/SearchResultItem.js +0 -40
  224. package/lib/components/02-molecules/Cards/SearchResultItem.stories.d.ts +0 -8
  225. package/lib/components/02-molecules/Cards/SearchResultItem.stories.js +0 -31
  226. package/lib/components/02-molecules/Dropdown/Dropdown.d.ts +0 -21
  227. package/lib/components/02-molecules/Dropdown/Dropdown.js +0 -55
  228. package/lib/components/02-molecules/Dropdown/Dropdown.stories.d.ts +0 -14
  229. package/lib/components/02-molecules/Dropdown/Dropdown.stories.js +0 -33
  230. package/lib/components/02-molecules/Headings/SectionTitle.d.ts +0 -17
  231. package/lib/components/02-molecules/Headings/SectionTitle.js +0 -42
  232. package/lib/components/02-molecules/Headings/SectionTitle.stories.d.ts +0 -8
  233. package/lib/components/02-molecules/Headings/SectionTitle.stories.js +0 -20
  234. package/lib/components/02-molecules/Menus/Breadcrumbs/Breadcrumbs.d.ts +0 -14
  235. package/lib/components/02-molecules/Menus/Breadcrumbs/Breadcrumbs.js +0 -51
  236. package/lib/components/02-molecules/Menus/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -8
  237. package/lib/components/02-molecules/Menus/Breadcrumbs/Breadcrumbs.stories.js +0 -30
  238. package/lib/components/02-molecules/Menus/Pagination/Pagination.d.ts +0 -11
  239. package/lib/components/02-molecules/Menus/Pagination/Pagination.js +0 -57
  240. package/lib/components/02-molecules/Menus/Pagination/Pagination.stories.d.ts +0 -7
  241. package/lib/components/02-molecules/Menus/Pagination/Pagination.stories.js +0 -20
  242. package/lib/components/02-molecules/SearchBar/SearchBar.d.ts +0 -26
  243. package/lib/components/02-molecules/SearchBar/SearchBar.js +0 -69
  244. package/lib/components/02-molecules/SearchBar/SearchBar.stories.d.ts +0 -11
  245. package/lib/components/02-molecules/SearchBar/SearchBar.stories.js +0 -24
  246. package/lib/components/03-organisms/Accordion/Accordion.d.ts +0 -19
  247. package/lib/components/03-organisms/Accordion/Accordion.js +0 -41
  248. package/lib/components/03-organisms/Accordion/Accordion.stories.d.ts +0 -7
  249. package/lib/components/03-organisms/Accordion/Accordion.stories.js +0 -30
  250. package/lib/components/03-organisms/Headers/HeaderImgRight.d.ts +0 -12
  251. package/lib/components/03-organisms/Headers/HeaderImgRight.js +0 -32
  252. package/lib/components/03-organisms/Headers/HeaderImgRight.stories.d.ts +0 -7
  253. package/lib/components/03-organisms/Headers/HeaderImgRight.stories.js +0 -19
  254. package/lib/components/03-organisms/Headers/RNHeaderWithSearch.d.ts +0 -19
  255. package/lib/components/03-organisms/Headers/RNHeaderWithSearch.js +0 -27
  256. package/lib/components/03-organisms/Headers/RNHeaderWithSearch.stories.d.ts +0 -7
  257. package/lib/components/03-organisms/Headers/RNHeaderWithSearch.stories.js +0 -26
  258. package/lib/components/03-organisms/Hero/Hero.d.ts +0 -31
  259. package/lib/components/03-organisms/Hero/Hero.js +0 -62
  260. package/lib/components/03-organisms/Hero/Hero.stories.d.ts +0 -11
  261. package/lib/components/03-organisms/Hero/Hero.stories.js +0 -35
  262. package/lib/components/03-organisms/Hero/HeroTypes.d.ts +0 -6
  263. package/lib/components/03-organisms/Hero/HeroTypes.js +0 -9
  264. package/lib/components/03-organisms/List/UnorderedList.d.ts +0 -18
  265. package/lib/components/03-organisms/List/UnorderedList.js +0 -28
  266. package/lib/components/03-organisms/List/UnorderedList.stories.d.ts +0 -11
  267. package/lib/components/03-organisms/List/UnorderedList.stories.js +0 -73
  268. package/lib/components/03-organisms/SearchPromo/SearchPromo.d.ts +0 -22
  269. package/lib/components/03-organisms/SearchPromo/SearchPromo.js +0 -30
  270. package/lib/components/03-organisms/SearchPromo/SearchPromo.stories.d.ts +0 -8
  271. package/lib/components/03-organisms/SearchPromo/SearchPromo.stories.js +0 -28
  272. package/lib/helpers/hoc/WithOneChild.d.ts +0 -8
  273. package/lib/helpers/hoc/WithOneChild.js +0 -63
  274. package/lib/index.d.ts +0 -24
  275. package/lib/index.js +0 -51
  276. package/lib/utils/bem.d.ts +0 -1
  277. package/lib/utils/bem.js +0 -35
  278. package/tsd.d.ts +0 -4
  279. package/webpack.prod.js +0 -38
@@ -0,0 +1,29 @@
1
+ import React from "react";
2
+ export type AccordionTypes = "default" | "warning" | "error";
3
+ export interface AccordionDataProps {
4
+ accordionType?: AccordionTypes;
5
+ label: string;
6
+ panel: string | React.ReactNode;
7
+ }
8
+ export interface AccordionProps {
9
+ /** Array of data to display, and an optional accordionType */
10
+ accordionData: AccordionDataProps[];
11
+ /** ID that other components can cross reference for accessibility purposes */
12
+ id?: string;
13
+ /** Whether the accordion is open by default only on its initial rendering */
14
+ isDefaultOpen?: boolean;
15
+ /** Whether the contents of the Accordion should always be rendered.
16
+ * Useful for form-components. `false` by default. */
17
+ isAlwaysRendered?: boolean;
18
+ /** Sets max height of accordion panel. This value should be entered with the
19
+ * formatting of a CSS height attribute (ex. 100px, 8rem). If height of content
20
+ * within accordion panel is greater than height set by panelMaxHeight, a
21
+ * scrollbar will appear for accordion panel. */
22
+ panelMaxHeight?: string;
23
+ }
24
+ /**
25
+ * Accordion component that shows content on toggle. Can be used to display
26
+ * multiple accordion items together.
27
+ */
28
+ export declare const Accordion: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<AccordionProps & React.RefAttributes<HTMLDivElement>>, {}>;
29
+ export default Accordion;
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+ export interface AlphabetFilterProps {
3
+ /** Array of letters to specify which `Button` components should be set in an `enabled`
4
+ * state. By default, all buttons are `enabled`. */
5
+ activeLetters?: string[];
6
+ /** A class name for the AlphabetFilter parent div. */
7
+ className?: string;
8
+ /** The currentLetter can be used to programatically set the selected letter without the
9
+ * user explicitly requesting it. */
10
+ currentLetter?: string;
11
+ /** Value used to set the text for a `Text` component that will be displayed above the letter buttons. */
12
+ descriptionText?: string | JSX.Element;
13
+ /** Value used to set the text for a `Heading` component. */
14
+ headingText?: string;
15
+ /** ID that other components can cross reference for accessibility purposes. */
16
+ id?: string;
17
+ /** Adds the `disabled` prop to the AlphabetFilter when true. */
18
+ isDisabled?: boolean;
19
+ /** The callback function called when a letter button or the Show All button is clicked. */
20
+ onClick: (filterValue: string) => void;
21
+ }
22
+ export declare const AlphabetFilter: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<AlphabetFilterProps & React.RefAttributes<HTMLDivElement>>, {}>;
23
+ export default AlphabetFilter;
@@ -0,0 +1,43 @@
1
+ import React from "react";
2
+ declare const thirdPartyServices: readonly ["libsyn", "soundcloud", "spotify"];
3
+ export type ThirdPartyAudioType = typeof thirdPartyServices[number];
4
+ export type AudioType = ThirdPartyAudioType | "file";
5
+ export interface AudioPlayerProps {
6
+ /** Required string used to specify the type of audio playback. */
7
+ audioType: AudioType;
8
+ /** Optional className you can add in addition to `audio-player`. */
9
+ className?: string;
10
+ /** Optional string to set the text for the audio player description. */
11
+ descriptionText?: string;
12
+ /** Optional string to set a code snippet provided by Libsyn, SoundCloud or Spotify; the
13
+ * `AudioPlayer` component will accept the `embedCode` prop or the `filePath` prop.
14
+ */
15
+ embedCode?: string;
16
+ /** Optional string to set the audio file, the path can be relative or absolute
17
+ * referring to a locally hosted file, or a fully qualified URL pointing to a locally hosted file
18
+ * or to another domain altogether.
19
+ * TODO: This prop won't be used until a future version.
20
+ */
21
+ /** Optional string to set the text for a `Heading` component. */
22
+ headingText?: string;
23
+ /** Optional string to set the text for a `HelperErrorText` component. */
24
+ helperText?: string;
25
+ /** ID that other components can cross reference for accessibility purposes. */
26
+ id?: string;
27
+ /** Optional title to added to the `<iframe>` element for improved accessibility. If omitted, a
28
+ * generic title will be added.
29
+ */
30
+ iframeTitle?: string;
31
+ }
32
+ /**
33
+ * Renders an audio player from 3rd party services such as Libsyn, SoundCloud, and Spotify.
34
+ */
35
+ export declare const AudioPlayer: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<AudioPlayerProps & {
36
+ children?: React.ReactNode;
37
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
38
+ /**
39
+ * Parse the embedCode string to a DOM object for proper formatted HTML element.
40
+ * We are only interested in the iframe element.
41
+ */
42
+ export declare function parseIframeEmbedCode(embedCode: string | undefined): HTMLIFrameElement | undefined;
43
+ export default AudioPlayer;
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ export declare const breadcrumbTypeArray: readonly ["blogs", "booksAndMore", "brand", "connect", "education", "locations", "research", "whatsOn"];
3
+ export type BreadcrumbsTypes = typeof breadcrumbTypeArray[number];
4
+ export interface BreadcrumbsDataProps {
5
+ url: string;
6
+ text: string | React.ReactNode;
7
+ }
8
+ export interface BreadcrumbProps {
9
+ /** Breadcrumb links as an array */
10
+ breadcrumbsData: BreadcrumbsDataProps[];
11
+ /** Used to control how the `Hero` component will be rendered. */
12
+ breadcrumbsType?: BreadcrumbsTypes;
13
+ /** className you can add in addition to 'input' */
14
+ className?: string;
15
+ /** ID that other components can cross reference for accessibility purposes */
16
+ id?: string;
17
+ }
18
+ /**
19
+ * The `Breadcrumbs` component is a navigation element that provides a
20
+ * breadcrumb path that reflects the site structure and allows a user to
21
+ * navigate to any page available in the breadcrumb hierarchy.
22
+ */
23
+ export declare const Breadcrumbs: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLDivElement>>, {}>;
24
+ export default Breadcrumbs;
@@ -0,0 +1,35 @@
1
+ import React from "react";
2
+ export declare const buttonElementTypeArray: readonly ["submit", "button", "reset"];
3
+ export declare const buttonSizesArray: readonly ["small", "medium", "large"];
4
+ export declare const buttonTypesArray: readonly ["primary", "secondary", "text", "callout", "pill", "noBrand", "link"];
5
+ export type ButtonElementType = typeof buttonElementTypeArray[number];
6
+ export type ButtonSizes = typeof buttonSizesArray[number];
7
+ export type ButtonTypes = typeof buttonTypesArray[number];
8
+ interface ButtonProps {
9
+ /** The button variation to render based on the `ButtonTypes` type.*/
10
+ buttonType?: ButtonTypes;
11
+ /** Additional className to use. */
12
+ className?: string;
13
+ /** ID that other components can cross reference for accessibility purposes. */
14
+ id: string;
15
+ /** Adds 'disabled' property to the button. */
16
+ isDisabled?: boolean;
17
+ /** Trigger the Button's action through the `mouseDown` event handler instead
18
+ * of `onClick`. `false` by default. */
19
+ mouseDown?: boolean;
20
+ /** The action to perform on the `<button>`'s onClick function. */
21
+ onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
22
+ /** Visibly hidden text that will only be read by screenreaders. */
23
+ screenreaderOnlyText?: string;
24
+ /** The size of the `Button`. */
25
+ size?: ButtonSizes;
26
+ /** The HTML button type attribute. */
27
+ type?: ButtonElementType;
28
+ }
29
+ /**
30
+ * Renders a simple `button` element with custom variant styles.
31
+ */
32
+ export declare const Button: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ButtonProps & {
33
+ children?: React.ReactNode;
34
+ } & React.RefAttributes<HTMLButtonElement>>, {}>;
35
+ export default Button;
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import { LayoutTypes } from "../../helpers/types";
3
+ export declare const buttonGroupWidthsArray: readonly ["default", "full"];
4
+ export type ButtonGroupWidths = typeof buttonGroupWidthsArray[number];
5
+ interface ButtonGroupProps {
6
+ /** Sets the width to "default" (for "fit-content") or "full". */
7
+ buttonWidth?: ButtonGroupWidths;
8
+ /** Additional className to use. */
9
+ className?: string;
10
+ /** ID that other components can cross reference for accessibility purposes. */
11
+ id?: string;
12
+ /** Set's the disabled state to all the internal `Button` components. */
13
+ isDisabled?: boolean;
14
+ /** Renders the layout of `Button` components in a row or column. */
15
+ layout?: LayoutTypes;
16
+ }
17
+ /**
18
+ * A simple wrapper to group `Button` components together. The layout can be set
19
+ * to row or column and the width of internal `Button` components can be set to
20
+ * the parent's full width or the `Button`'s content width
21
+ */
22
+ export declare const ButtonGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ButtonGroupProps & {
23
+ children?: React.ReactNode;
24
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
25
+ export default ButtonGroup;
@@ -0,0 +1,55 @@
1
+ import React from "react";
2
+ import { LayoutTypes } from "../../helpers/types";
3
+ import { ComponentImageProps } from "../Image/Image";
4
+ interface CardBaseProps {
5
+ /** Optional value to control the alignment of the text and elements. */
6
+ isCentered?: boolean;
7
+ /** Optional value to render the layout in a row or column.
8
+ * Default is `"column"`. */
9
+ layout?: LayoutTypes;
10
+ }
11
+ interface CardWrapperProps {
12
+ /** Optional CSS class name to add. */
13
+ className?: string;
14
+ /** ID that other components can cross reference for accessibility purposes. */
15
+ id?: string;
16
+ /** Main link to use when the full `Card` component should be clickable. */
17
+ mainActionLink?: string;
18
+ /** Additional object for styling the `Card`'s `div` wrapper. */
19
+ styles?: any;
20
+ }
21
+ interface CardImageProps extends ComponentImageProps {
22
+ /** Optional boolean value to control the position of the `CardImage`. */
23
+ isAtEnd?: boolean;
24
+ }
25
+ interface CardActionsProps extends CardBaseProps {
26
+ /** Optional boolean value to control visibility of border on the bottom edge
27
+ * of the card actions element */
28
+ bottomBorder?: boolean;
29
+ /** Optional boolean value to control visibility of border on the top edge of
30
+ * the card actions element */
31
+ topBorder?: boolean;
32
+ }
33
+ export interface CardProps extends CardBaseProps, CardWrapperProps {
34
+ /** Optional hex color value used to set the card background color. */
35
+ backgroundColor?: string;
36
+ /** Optional hex color value used to override the default text color. */
37
+ foregroundColor?: string;
38
+ /** Optional boolean value to control the visibility of a border around
39
+ * the card. */
40
+ isBordered?: boolean;
41
+ /** Object used to create and render the `Image` component. */
42
+ imageProps?: CardImageProps;
43
+ /** Set CardActions to the right content side. This only works in
44
+ * the row layout. */
45
+ isAlignedRightActions?: boolean;
46
+ }
47
+ export declare const CardHeading: import("@chakra-ui/react").ChakraComponent<import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<import("../Heading/Heading").HeadingProps & {
48
+ children?: React.ReactNode;
49
+ } & React.RefAttributes<HTMLHeadingElement>>, {}>, {}>;
50
+ export declare const CardContent: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<{}>) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
51
+ export declare const CardActions: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<CardActionsProps>) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
52
+ export declare const Card: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<CardProps & {
53
+ children?: React.ReactNode;
54
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
55
+ export default Card;
@@ -0,0 +1,47 @@
1
+ import React from "react";
2
+ import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
+ interface CheckboxIconProps {
4
+ /** When using the Checkbox as a "controlled" form element, you can specify
5
+ * the Checkbox's checked state using this prop.
6
+ * Learn more about controlled and uncontrolled form fields:
7
+ * https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */
8
+ isChecked?: boolean;
9
+ /** Adds the indeterminate state to the `Checkbox`. */
10
+ isIndeterminate?: boolean;
11
+ }
12
+ export interface CheckboxProps extends CheckboxIconProps {
13
+ /** className you can add in addition to 'input' */
14
+ className?: string;
15
+ /** Optional string to populate the HelperErrorText for standard state */
16
+ helperText?: HelperErrorTextType;
17
+ /** ID that other components can cross reference for accessibility purposes */
18
+ id: string;
19
+ /** Optional string to populate the HelperErrorText for the error state
20
+ * when `isInvalid` is true. */
21
+ invalidText?: HelperErrorTextType;
22
+ /** Adds the 'disabled' and `aria-disabled` attributes to the input when true.
23
+ * This also makes the text italic and color scheme gray. */
24
+ isDisabled?: boolean;
25
+ /** Adds the 'aria-invalid' attribute to the input when true. This also makes
26
+ * the color theme "NYPL error" red for the button and text. */
27
+ isInvalid?: boolean;
28
+ /** Adds the 'required' attribute to the input when true. */
29
+ isRequired?: boolean;
30
+ /** The checkbox's label. This will serve as the text content for a `<label>`
31
+ * element if `showlabel` is true, or an "aria-label" if `showLabel` is false. */
32
+ labelText: string | JSX.Element;
33
+ /** The name prop indicates into which group of checkboxes this checkbox
34
+ * belongs. If none is specified, 'default' will be used */
35
+ name?: string;
36
+ /** The action to perform on the `<input>`'s onChange function */
37
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
38
+ /** Offers the ability to hide the helper/invalid text. */
39
+ showHelperInvalidText?: boolean;
40
+ /** Offers the ability to show the checkbox's label onscreen or hide it.
41
+ * Refer to the `labelText` property for more information. */
42
+ showLabel?: boolean;
43
+ /** Populates the value of the input */
44
+ value?: string;
45
+ }
46
+ export declare const Checkbox: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>, {}>;
47
+ export default Checkbox;
@@ -0,0 +1,51 @@
1
+ import React from "react";
2
+ import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
+ import { LayoutTypes } from "../../helpers/types";
4
+ export interface CheckboxGroupProps {
5
+ /** Any child node passed to the component. */
6
+ children: React.ReactNode;
7
+ /** Populates the initial value of the input */
8
+ defaultValue?: string[];
9
+ /** Optional string to populate the HelperErrorText for standard state */
10
+ helperText?: HelperErrorTextType;
11
+ /** ID that other components can cross reference for accessibility purposes */
12
+ id: string;
13
+ /** Optional string to populate the HelperErrorText for error state */
14
+ invalidText?: HelperErrorTextType;
15
+ /** Adds the 'disabled' prop to the input when true. */
16
+ isDisabled?: boolean;
17
+ /** Set's the `Checkbox`s' wrapper to be full width. */
18
+ isFullWidth?: boolean;
19
+ /** A`dds the 'aria-invalid' attribute to the input and
20
+ * sets the error state when true. */
21
+ isInvalid?: boolean;
22
+ /** Adds the 'required' attribute to the input when true. */
23
+ isRequired?: boolean;
24
+ /** The checkbox group label displayed in a `legend` element if `showlabel` is
25
+ * true, or an "aria-label" if `showLabel` is false. */
26
+ labelText: string;
27
+ /** Renders the checkbox buttons in a row or column (default). */
28
+ layout?: LayoutTypes;
29
+ /** The `name` prop indicates the form group for all the `Checkbox` children. */
30
+ name: string;
31
+ /** The action to perform on the `<input>`'s onChange function */
32
+ onChange?: (value: string[]) => void;
33
+ /** Offers the ability to hide the helper/invalid text. */
34
+ showHelperInvalidText?: boolean;
35
+ /** Offers the ability to show the group's legend onscreen or hide it. Refer
36
+ * to the `labelText` property for more information. */
37
+ showLabel?: boolean;
38
+ /** Whether or not to display the "(Required)" text in the label text.
39
+ * True by default. */
40
+ showRequiredLabel?: boolean;
41
+ /** The values to programmatically update the selected `Checkbox`es. */
42
+ value?: string[];
43
+ }
44
+ /**
45
+ * Wrapper component to wrap `Checkbox` components. Can be displayed in a
46
+ * column or in a row. The `CheckboxGroup` component renders all the necessary
47
+ * wrapping and associated text elements, but the checkbox input elements
48
+ * _need_ to be child `Checkbox` components from the NYPL Design System.
49
+ */
50
+ export declare const CheckboxGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>, {}>;
51
+ export default CheckboxGroup;
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
+ export interface ComponentWrapperProps {
4
+ /** The UI elements that will be wrapped by this component */
5
+ children: React.ReactNode;
6
+ /** A class name for the `div` parent element. */
7
+ className?: string;
8
+ /** Optional string to set the text for the component's description */
9
+ descriptionText?: string | JSX.Element;
10
+ /** Optional string to set the text for a `Heading` component */
11
+ headingText?: string;
12
+ /** Optional string to set the text for a `HelperErrorText` component */
13
+ helperText?: HelperErrorTextType;
14
+ /** Styles that target the helper text. */
15
+ helperTextStyles?: {
16
+ [key: string]: any;
17
+ };
18
+ /** ID that other components can cross reference for accessibility purposes */
19
+ id?: string;
20
+ /** Optional string to populate the `HelperErrorText` for the error state
21
+ * when `isInvalid` is true. */
22
+ invalidText?: HelperErrorTextType;
23
+ /** Sets invalid text in the error state. */
24
+ isInvalid?: boolean;
25
+ /** Offers the ability to hide the helper/invalid text. */
26
+ showHelperInvalidText?: boolean;
27
+ }
28
+ export declare const ComponentWrapper: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ComponentWrapperProps & {
29
+ children?: React.ReactNode;
30
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
31
+ export default ComponentWrapper;
@@ -0,0 +1,82 @@
1
+ import React from "react";
2
+ import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
+ import { TextInputRefType } from "../TextInput/TextInput";
4
+ export declare const datePickerTypesArray: readonly ["full", "month", "year"];
5
+ export type DatePickerTypes = typeof datePickerTypesArray[number];
6
+ export interface FullDateType {
7
+ /** Date object that gets returned for the onChange
8
+ * function only for date ranges. */
9
+ endDate?: Date;
10
+ /** Date object that gets returned for the onChange function. */
11
+ startDate: Date;
12
+ }
13
+ interface DateRangeRowProps {
14
+ /** ID that other components can cross reference for accessibility purposes. */
15
+ id: string;
16
+ /** Whether to render a single date input or two for a range of two dates. */
17
+ isDateRange?: boolean;
18
+ }
19
+ interface DatePickerWrapperProps extends DateRangeRowProps {
20
+ /** Additional className. */
21
+ className?: string;
22
+ /** Adds the 'required' property to the input element(s). */
23
+ isRequired?: boolean;
24
+ /** Passed to the `TextInput` component to render a label associated with an input field. */
25
+ labelText: string;
26
+ /** Offers the ability to show the label onscreen or hide it. */
27
+ showLabel?: boolean;
28
+ /** Whether or not to display the "(Required)" text in the label text.
29
+ * True by default. */
30
+ showRequiredLabel?: boolean;
31
+ }
32
+ export interface DatePickerProps extends DatePickerWrapperProps {
33
+ /** The date format to display. Defaults to "yyyy-MM-dd".
34
+ * Must be in ISO-8601 format. */
35
+ dateFormat?: string;
36
+ /** DatePicker date types that can be rendered. */
37
+ dateType?: DatePickerTypes;
38
+ /** Populates the `HelperErrorText` component in this component. */
39
+ helperText?: HelperErrorTextType;
40
+ /** Populates the `HelperErrorText` component in the "From" `TextInput` component. */
41
+ helperTextFrom?: string;
42
+ /** Populates the `HelperErrorText` component in the "To" `TextInput` component. */
43
+ helperTextTo?: string;
44
+ /** The initial date value. This must be in the mm/dd/yyyy format. */
45
+ initialDate?: string;
46
+ /** The initialTo date value used for date ranges.
47
+ * This must be in the mm/dd/yyyy format. */
48
+ initialDateTo?: string;
49
+ /** Populates the `HelperErrorText` error state for both "From"
50
+ * and "To" input components. */
51
+ invalidText?: HelperErrorTextType;
52
+ /** Adds the 'disabled' property to the input element(s). */
53
+ isDisabled?: boolean;
54
+ /** Adds 'isInvalid' styling. */
55
+ isInvalid?: boolean;
56
+ /** Adds the 'required' property to the input element(s). */
57
+ isRequired?: boolean;
58
+ /** The maximum date value that applies to both input fields.
59
+ * This must be in the mm/dd/yyyy format. */
60
+ maxDate?: string;
61
+ /** The minimum date value that applies to both input fields.
62
+ * This must be in the mm/dd/yyyy format. */
63
+ minDate?: string;
64
+ /** Value name for the single input field or the "From" input field in a date range. */
65
+ nameFrom?: string;
66
+ /** Value name for the "To" input field */
67
+ nameTo?: string;
68
+ /** The action to perform on the `input`'s onChange function for both fields.
69
+ * This will return the data in an object with `startDate` and `endDate` keys.
70
+ */
71
+ onChange?: (data: FullDateType) => void;
72
+ /** An additional explicit React ref passed for a date range's "To"
73
+ * input field. Note that the "From" input takes the initial "ref" value. */
74
+ refTo?: React.Ref<TextInputRefType>;
75
+ /** Offers the ability to hide the helper/invalid text. */
76
+ showHelperInvalidText?: boolean;
77
+ }
78
+ /**
79
+ * Returns a single date input field or two date input fields for a date range.
80
+ */
81
+ export declare const DatePicker: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<DatePickerProps & React.RefAttributes<TextInputRefType>>, {}>;
82
+ export default DatePicker;
@@ -0,0 +1,64 @@
1
+ import React from "react";
2
+ export declare const feedbackBoxViewTypeArray: readonly ["form", "confirmation", "error"];
3
+ export type FeedbackBoxViewType = typeof feedbackBoxViewTypeArray[number];
4
+ interface FeedbackBoxProps {
5
+ /** Additional class name to add. */
6
+ className?: string;
7
+ /** Used to add additional information to the default confirmation message in
8
+ * the confirmation view. */
9
+ confirmationText?: string | JSX.Element;
10
+ /** Used to add description text above the form input fields in
11
+ * the initial/form view. */
12
+ descriptionText?: string | JSX.Element;
13
+ /** A data object containing key/value pairs that will be added to the form
14
+ * field submitted data. */
15
+ hiddenFields?: any;
16
+ /** ID that other components can cross reference for accessibility purposes */
17
+ id?: string;
18
+ /** Toggles the invalid state for the comment field. */
19
+ isInvalidComment?: boolean;
20
+ /** Toggles the invalid state for the email field. */
21
+ isInvalidEmail?: boolean;
22
+ /** Only used for internal purposes. */
23
+ isOpen?: boolean;
24
+ /** Used to add a notification above the description in the
25
+ * initial/form view.*/
26
+ notificationText?: string | JSX.Element;
27
+ /** Only used for internal purposes. */
28
+ onClose?: any;
29
+ /** Only used for internal purposes. */
30
+ onOpen?: any;
31
+ /** Callback function that will be invoked when the form is submitted.
32
+ * The returned data object contains key/value pairs including the
33
+ * values from the `hiddenFields` prop.
34
+ */
35
+ onSubmit: (values: {
36
+ [key: string]: string;
37
+ }) => any;
38
+ /** Toggles the category radio group field. */
39
+ showCategoryField?: boolean;
40
+ /** Toggles the email input field. When set to `true`, an additional
41
+ * confirmation message will be rendered. */
42
+ showEmailField?: boolean;
43
+ /** Used to populate the label on the open button and the `Drawer`'s
44
+ * header title. */
45
+ title: string;
46
+ /** Used to specify what screen should be displayed. */
47
+ view?: FeedbackBoxViewType;
48
+ }
49
+ /**
50
+ * The `FeedbackBox` component renders a fixed-positioned button on the bottom
51
+ * right corner of a page that opens a Chakra `Drawer` popup component. Inside
52
+ * of the popup, a form is rendered with fields that allows users to provide
53
+ * feedback. The `FeedbackBox` component does *not* call any API with the
54
+ * submitted data; that feature is the responsibility of the consuming
55
+ * application.
56
+ */
57
+ export declare const FeedbackBox: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<FeedbackBoxProps & React.RefAttributes<any>>, {}>;
58
+ export declare function useFeedbackBox(): {
59
+ isOpen: boolean;
60
+ onClose: () => void;
61
+ onOpen: () => void;
62
+ FeedbackBox: import("@chakra-ui/react").ChakraComponent<(props: any) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
63
+ };
64
+ export default FeedbackBox;
@@ -0,0 +1,19 @@
1
+ interface FeedbackBoxState {
2
+ category?: string;
3
+ comment: string;
4
+ email?: string;
5
+ }
6
+ /**
7
+ * DS internal helper reducer hook to manage internal state for the FeedbackBox
8
+ * component. Note: this custom hook is not tested directly as it's an
9
+ * implementation detail of the FeedbackBox component, following the guidance
10
+ * of RTL: https://testing-library.com/docs/example-react-hooks-useReducer
11
+ */
12
+ declare function useFeedbackBoxReducer(): {
13
+ state: FeedbackBoxState;
14
+ setCategory: (category: string) => void;
15
+ setComment: (comment: string) => void;
16
+ setEmail: (email: string) => void;
17
+ clearValues: () => void;
18
+ };
19
+ export default useFeedbackBoxReducer;
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ interface FieldsetProps {
3
+ /** Additional class name to add. */
4
+ className?: string;
5
+ /** ID that other components can cross reference for accessibility purposes */
6
+ id: string;
7
+ /** Flag to show or hide the text in the `legend` element. False by default. */
8
+ isLegendHidden?: boolean;
9
+ /** Flag to render "Required" in the `legend`. True by default. */
10
+ isRequired?: boolean;
11
+ /** Text to display in the `legend` element. */
12
+ legendText?: string;
13
+ /** Whether or not to display the "(Required)" text in the `legend` text.
14
+ * True by default. */
15
+ showRequiredLabel?: boolean;
16
+ }
17
+ /**
18
+ * A wrapper component that renders a `fieldset` element along with a `legend`
19
+ * element as its first child. Commonly used to wrap form components.
20
+ */
21
+ export declare const Fieldset: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<FieldsetProps & {
22
+ children?: React.ReactNode;
23
+ } & React.RefAttributes<HTMLDivElement & HTMLFieldSetElement>>, {}>;
24
+ export default Fieldset;
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ import { GridGaps } from "../Grid/SimpleGrid";
3
+ interface FormBaseProps {
4
+ /** className to be applied to FormRow, FormField, and Form */
5
+ className?: string;
6
+ /** Optional spacing size; if omitted, the default `large` (2rem / 32px)
7
+ * spacing will be used; ```IMPORTANT: for general form layout, this prop
8
+ * should not be used``` */
9
+ gap?: GridGaps;
10
+ /** ID that other components can cross reference (internal use) */
11
+ id: string;
12
+ }
13
+ export interface FormChildProps extends Partial<FormBaseProps> {
14
+ }
15
+ export interface FormProps extends FormBaseProps {
16
+ /** Optional form `action` attribute */
17
+ action?: string;
18
+ /** Optional form `method` attribute */
19
+ method?: "get" | "post";
20
+ /** Function to call for the `onSubmit` form event. */
21
+ onSubmit?: (e: React.FormEvent<any>) => void;
22
+ }
23
+ /** FormRow child-component */
24
+ export declare const FormRow: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<FormChildProps>) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
25
+ /** FormField child-component */
26
+ export declare const FormField: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<FormChildProps>) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
27
+ /** Main Form component */
28
+ export declare const Form: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<FormProps & {
29
+ children?: React.ReactNode;
30
+ } & React.RefAttributes<HTMLDivElement & HTMLFormElement>>, {}>;
31
+ export default Form;
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ export declare const gridGapsArray: readonly ["grid.xxs", "grid.xs", "grid.s", "grid.m", "grid.l", "grid.xl", "grid.xxl"];
3
+ export type GridGaps = typeof gridGapsArray[number];
4
+ export interface SimpleGridProps {
5
+ /** Additional class name. */
6
+ className?: string;
7
+ /** Optional numeric value to override the default column count; the default
8
+ * column count is 3. */
9
+ columns?: number;
10
+ /** Optional gap size; if omitted, the default `large` (2rem / 32px) spacing
11
+ * will be used; `IMPORTANT: for standard grid layouts, this prop should
12
+ * not be used.` */
13
+ gap?: GridGaps;
14
+ /** ID that other components can cross reference for accessibility purposes */
15
+ id?: string;
16
+ }
17
+ export declare const SimpleGrid: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SimpleGridProps & {
18
+ children?: React.ReactNode;
19
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
20
+ export default SimpleGrid;