@nypl/design-system-react-components 1.5.1 → 1.6.0-vite-rc

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 (201) hide show
  1. package/README.md +39 -39
  2. package/dist/design-system-react-components.cjs +279 -0
  3. package/dist/design-system-react-components.js +42759 -0
  4. package/dist/{components → src/components}/Accordion/Accordion.d.ts +29 -29
  5. package/dist/{components → src/components}/AlphabetFilter/AlphabetFilter.d.ts +23 -23
  6. package/dist/{components → src/components}/AudioPlayer/AudioPlayer.d.ts +43 -43
  7. package/dist/{components → src/components}/Breadcrumbs/Breadcrumbs.d.ts +18 -18
  8. package/dist/{components → src/components}/Button/Button.d.ts +30 -30
  9. package/dist/{components → src/components}/ButtonGroup/ButtonGroup.d.ts +24 -24
  10. package/dist/{components → src/components}/Card/Card.d.ts +55 -55
  11. package/dist/{components → src/components}/Checkbox/Checkbox.d.ts +47 -47
  12. package/dist/{components → src/components}/CheckboxGroup/CheckboxGroup.d.ts +51 -51
  13. package/dist/{components → src/components}/ComponentWrapper/ComponentWrapper.d.ts +31 -31
  14. package/dist/{components → src/components}/DatePicker/DatePicker.d.ts +81 -81
  15. package/dist/{components → src/components}/FeedbackBox/FeedbackBox.d.ts +63 -63
  16. package/dist/{components → src/components}/FeedbackBox/useFeedbackBoxReducer.d.ts +19 -19
  17. package/dist/{components → src/components}/Fieldset/Fieldset.d.ts +24 -24
  18. package/dist/{components → src/components}/FilterBar/FilterBar.d.ts +61 -111
  19. package/dist/{components → src/components}/Footer/Footer.d.ts +14 -14
  20. package/dist/{components → src/components}/Footer/footerLinks.d.ts +12 -12
  21. package/dist/{components → src/components}/Form/Form.d.ts +31 -31
  22. package/dist/{components → src/components}/Grid/SimpleGrid.d.ts +19 -19
  23. package/dist/{components → src/components}/Header/Header.d.ts +22 -22
  24. package/dist/{components → src/components}/Header/components/HeaderLogin.d.ts +12 -12
  25. package/dist/{components → src/components}/Header/components/HeaderLoginButton.d.ts +11 -11
  26. package/dist/{components → src/components}/Header/components/HeaderLowerNav.d.ts +7 -7
  27. package/dist/{components → src/components}/Header/components/HeaderMobileIconNav.d.ts +7 -7
  28. package/dist/{components → src/components}/Header/components/HeaderMobileNav.d.ts +7 -7
  29. package/dist/{components → src/components}/Header/components/HeaderMobileNavButton.d.ts +7 -7
  30. package/dist/{components → src/components}/Header/components/HeaderSearchButton.d.ts +10 -10
  31. package/dist/{components → src/components}/Header/components/HeaderSearchForm.d.ts +11 -11
  32. package/dist/{components → src/components}/Header/components/HeaderSitewideAlerts.d.ts +8 -8
  33. package/dist/{components → src/components}/Header/components/HeaderUpperNav.d.ts +8 -8
  34. package/dist/{components → src/components}/Header/context/headerContext.d.ts +13 -13
  35. package/dist/{components → src/components}/Header/utils/googleAnalyticsUtils.d.ts +16 -16
  36. package/dist/{components → src/components}/Header/utils/headerUtils.d.ts +94 -94
  37. package/dist/{components → src/components}/Heading/Heading.d.ts +35 -35
  38. package/dist/{components → src/components}/HelperErrorText/HelperErrorText.d.ts +34 -34
  39. package/dist/{components → src/components}/Hero/Hero.d.ts +42 -42
  40. package/dist/{components → src/components}/HorizontalRule/HorizontalRule.d.ts +11 -11
  41. package/dist/{components → src/components}/Icons/Icon.d.ts +41 -41
  42. package/dist/{components → src/components}/Icons/IconColors.d.ts +3 -3
  43. package/dist/{components → src/components}/Icons/IconNames.d.ts +3 -3
  44. package/dist/{components → src/components}/Icons/IconSvgs.d.ts +56 -56
  45. package/dist/{components → src/components}/Image/Image.d.ts +65 -65
  46. package/dist/{components → src/components}/Label/Label.d.ts +25 -25
  47. package/dist/{components → src/components}/Link/Link.d.ts +21 -21
  48. package/dist/{components → src/components}/List/List.d.ts +42 -42
  49. package/dist/{components → src/components}/Logo/Logo.d.ts +28 -28
  50. package/dist/{components → src/components}/Logo/LogoSvgs.d.ts +54 -52
  51. package/dist/{components → src/components}/Modal/Modal.d.ts +35 -35
  52. package/dist/{components → src/components}/MultiSelect/MultiSelect.d.ts +60 -78
  53. package/dist/{components → src/components}/MultiSelect/MultiSelectDialog.d.ts +8 -8
  54. package/dist/{components → src/components}/MultiSelect/MultiSelectListbox.d.ts +9 -9
  55. package/dist/{components → src/components}/MultiSelect/MultiSelectMenuButton.d.ts +27 -27
  56. package/dist/{components → src/components}/MultiSelectGroup/MultiSelectGroup.d.ts +26 -26
  57. package/dist/{components → src/components}/Notification/Notification.d.ts +51 -51
  58. package/dist/{components → src/components}/Pagination/Pagination.d.ts +27 -27
  59. package/dist/{components → src/components}/ProgressIndicator/ProgressIndicator.d.ts +30 -30
  60. package/dist/{components → src/components}/Radio/Radio.d.ts +43 -43
  61. package/dist/{components → src/components}/RadioGroup/RadioGroup.d.ts +51 -51
  62. package/dist/{components → src/components}/SearchBar/SearchBar.d.ts +58 -58
  63. package/dist/{components → src/components}/Select/Select.d.ts +57 -57
  64. package/dist/{components → src/components}/SkeletonLoader/SkeletonLoader.d.ts +41 -41
  65. package/dist/{components → src/components}/SkipNavigation/SkipNavigation.d.ts +19 -19
  66. package/dist/{components → src/components}/Slider/Slider.d.ts +65 -65
  67. package/dist/{components → src/components}/StatusBadge/StatusBadge.d.ts +18 -18
  68. package/dist/{components → src/components}/StructuredContent/StructuredContent.d.ts +30 -30
  69. package/dist/{components → src/components}/StyleGuide/ColorCard.d.ts +46 -46
  70. package/dist/{components → src/components}/StyledList/StyledList.d.ts +25 -25
  71. package/dist/{components → src/components}/Table/Table.d.ts +32 -32
  72. package/dist/{components → src/components}/Tabs/Tabs.d.ts +28 -28
  73. package/dist/{components → src/components}/TagSet/TagSet.d.ts +33 -32
  74. package/dist/{components → src/components}/TagSet/TagSetExplore.d.ts +27 -27
  75. package/dist/{components → src/components}/TagSet/TagSetFilter.d.ts +26 -26
  76. package/dist/{components → src/components}/Template/Template.d.ts +140 -140
  77. package/dist/{components → src/components}/Text/Text.d.ts +24 -24
  78. package/dist/{components → src/components}/TextInput/TextInput.d.ts +88 -88
  79. package/dist/{components → src/components}/Toggle/Toggle.d.ts +42 -42
  80. package/dist/{components → src/components}/Tooltip/Tooltip.d.ts +17 -17
  81. package/dist/{components → src/components}/VideoPlayer/VideoPlayer.d.ts +40 -40
  82. package/dist/src/helpers/types.d.ts +1 -0
  83. package/dist/{hooks → src/hooks}/useCarouselStyles.d.ts +17 -17
  84. package/dist/{hooks → src/hooks}/useCloseDropDown.d.ts +7 -6
  85. package/dist/{hooks → src/hooks}/useFilterBar.d.ts +21 -21
  86. package/dist/{hooks → src/hooks}/useMultiSelect.d.ts +15 -15
  87. package/dist/{hooks → src/hooks}/useNYPLBreakpoints.d.ts +13 -13
  88. package/dist/{hooks → src/hooks}/useNYPLTheme.d.ts +67 -67
  89. package/dist/{hooks → src/hooks}/useStateWithDependencies.d.ts +5 -5
  90. package/dist/{hooks → src/hooks}/useWindowSize.d.ts +10 -10
  91. package/dist/src/index.d.ts +90 -0
  92. package/dist/{theme → src/theme}/components/accordion.d.ts +34 -34
  93. package/dist/{theme → src/theme}/components/alphabetFilter.d.ts +33 -33
  94. package/dist/{theme → src/theme}/components/audioPlayer.d.ts +16 -16
  95. package/dist/{theme → src/theme}/components/breadcrumb.d.ts +151 -138
  96. package/dist/{theme → src/theme}/components/button.d.ts +113 -113
  97. package/dist/{theme → src/theme}/components/buttonGroup.d.ts +11 -11
  98. package/dist/{theme → src/theme}/components/card.d.ts +421 -421
  99. package/dist/{theme → src/theme}/components/checkbox.d.ts +178 -178
  100. package/dist/{theme → src/theme}/components/checkboxGroup.d.ts +14 -14
  101. package/dist/{theme → src/theme}/components/componentWrapper.d.ts +12 -12
  102. package/dist/{theme → src/theme}/components/customTable.d.ts +733 -733
  103. package/dist/{theme → src/theme}/components/datePicker.d.ts +17 -17
  104. package/dist/{theme → src/theme}/components/feedbackBox.d.ts +92 -85
  105. package/dist/{theme → src/theme}/components/fieldset.d.ts +23 -23
  106. package/dist/{theme → src/theme}/components/filterBar.d.ts +46 -46
  107. package/dist/{theme → src/theme}/components/footer.d.ts +244 -241
  108. package/dist/{theme → src/theme}/components/global.d.ts +140 -140
  109. package/dist/{theme → src/theme}/components/globalMixins.d.ts +40 -40
  110. package/dist/{theme → src/theme}/components/header/header.d.ts +72 -72
  111. package/dist/{theme → src/theme}/components/header/headerLogin.d.ts +327 -327
  112. package/dist/{theme → src/theme}/components/header/headerLoginButton.d.ts +69 -69
  113. package/dist/{theme → src/theme}/components/header/headerLowerNav.d.ts +70 -70
  114. package/dist/{theme → src/theme}/components/header/headerMobileIconNav.d.ts +28 -28
  115. package/dist/{theme → src/theme}/components/header/headerMobileNav.d.ts +86 -86
  116. package/dist/{theme → src/theme}/components/header/headerMobileNavButton.d.ts +34 -34
  117. package/dist/{theme → src/theme}/components/header/headerSearchButton.d.ts +83 -83
  118. package/dist/{theme → src/theme}/components/header/headerSearchForm.d.ts +183 -183
  119. package/dist/{theme → src/theme}/components/header/headerSitewideAlerts.d.ts +42 -42
  120. package/dist/{theme → src/theme}/components/header/headerUpperNav.d.ts +72 -72
  121. package/dist/{theme → src/theme}/components/heading.d.ts +173 -173
  122. package/dist/{theme → src/theme}/components/helperErrorText.d.ts +15 -15
  123. package/dist/{theme → src/theme}/components/hero.d.ts +628 -628
  124. package/dist/{theme → src/theme}/components/horizontalRule.d.ts +18 -18
  125. package/dist/{theme → src/theme}/components/icon.d.ts +62251 -62251
  126. package/dist/{theme → src/theme}/components/image.d.ts +662 -662
  127. package/dist/{theme → src/theme}/components/label.d.ts +21 -21
  128. package/dist/{theme → src/theme}/components/link.d.ts +106 -106
  129. package/dist/{theme → src/theme}/components/list.d.ts +228 -228
  130. package/dist/{theme → src/theme}/components/logo.d.ts +477 -477
  131. package/dist/{theme → src/theme}/components/modal.d.ts +21 -21
  132. package/dist/{theme → src/theme}/components/multiSelect.d.ts +29 -29
  133. package/dist/{theme → src/theme}/components/multiSelectMenuButton.d.ts +95 -95
  134. package/dist/{theme → src/theme}/components/notification.d.ts +136 -136
  135. package/dist/{theme → src/theme}/components/pagination.d.ts +16 -16
  136. package/dist/{theme → src/theme}/components/progressIndicator.d.ts +68 -68
  137. package/dist/{theme → src/theme}/components/radio.d.ts +202 -202
  138. package/dist/{theme → src/theme}/components/radioGroup.d.ts +14 -14
  139. package/dist/{theme → src/theme}/components/searchBar.d.ts +34 -34
  140. package/dist/{theme → src/theme}/components/select.d.ts +125 -125
  141. package/dist/{theme → src/theme}/components/skeletonLoader.d.ts +105 -105
  142. package/dist/{theme → src/theme}/components/skipNavigation.d.ts +28 -28
  143. package/dist/{theme → src/theme}/components/slider.d.ts +78 -78
  144. package/dist/{theme → src/theme}/components/statusBadge.d.ts +37 -37
  145. package/dist/{theme → src/theme}/components/structuredContent.d.ts +385 -385
  146. package/dist/{theme → src/theme}/components/styledList.d.ts +51 -51
  147. package/dist/{theme → src/theme}/components/tabs.d.ts +172 -172
  148. package/dist/{theme → src/theme}/components/tagSet.d.ts +154 -154
  149. package/dist/{theme → src/theme}/components/template.d.ts +86 -86
  150. package/dist/{theme → src/theme}/components/text.d.ts +30 -30
  151. package/dist/{theme → src/theme}/components/textInput.d.ts +349 -349
  152. package/dist/{theme → src/theme}/components/toggle.d.ts +129 -129
  153. package/dist/{theme → src/theme}/components/tooltip.d.ts +19 -19
  154. package/dist/{theme → src/theme}/components/videoPlayer.d.ts +47 -47
  155. package/dist/{theme → src/theme}/foundations/breakpoints.d.ts +23 -23
  156. package/dist/{theme → src/theme}/foundations/colors.d.ts +3 -3
  157. package/dist/{theme → src/theme}/foundations/global.d.ts +68 -68
  158. package/dist/{theme → src/theme}/foundations/radii.d.ts +11 -11
  159. package/dist/{theme → src/theme}/foundations/shadows.d.ts +4 -4
  160. package/dist/{theme → src/theme}/foundations/spacing.d.ts +96 -96
  161. package/dist/{theme → src/theme}/foundations/typography.d.ts +8 -8
  162. package/dist/{theme → src/theme}/index.d.ts +20 -20
  163. package/dist/{theme → src/theme}/provider.d.ts +4 -4
  164. package/dist/src/theme/types.d.ts +1 -0
  165. package/dist/{utils → src/utils}/interfaces.d.ts +5 -5
  166. package/dist/{utils → src/utils}/utils.d.ts +39 -39
  167. package/dist/style.css +1 -0
  168. package/package.json +52 -61
  169. package/CHANGELOG.md +0 -1861
  170. package/dist/__tests__/fileMock.d.ts +0 -4
  171. package/dist/__tests__/mediaMatchMock.d.ts +0 -79
  172. package/dist/__tests__/setup.d.ts +0 -2
  173. package/dist/__tests__/utils/utils.test.d.ts +0 -1
  174. package/dist/components/Autosuggest/Autosuggest.stories.d.ts +0 -4
  175. package/dist/components/FilterBar/FilterBar.stories.d.ts +0 -7
  176. package/dist/components/Header/utils/authApiMockResponse.d.ts +0 -49
  177. package/dist/components/Header/utils/encoreCatalogLogOutTimer.d.ts +0 -4
  178. package/dist/components/Header/utils/encoreCatalogLogOutTimer.test.d.ts +0 -1
  179. package/dist/components/Header/utils/googleAnalyticsUtils.test.d.ts +0 -1
  180. package/dist/components/Header/utils/headerUtils.test.d.ts +0 -1
  181. package/dist/components/Header/utils/sitewideAlertsMocks.d.ts +0 -98
  182. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +0 -4
  183. package/dist/components/MultiSelectGroup/MultiSelectGroup.stories.d.ts +0 -4
  184. package/dist/components/Placeholder/Placeholder.d.ts +0 -10
  185. package/dist/design-system-react-components.cjs.development.js +0 -17917
  186. package/dist/design-system-react-components.cjs.development.js.map +0 -1
  187. package/dist/design-system-react-components.cjs.production.min.js +0 -2
  188. package/dist/design-system-react-components.cjs.production.min.js.map +0 -1
  189. package/dist/design-system-react-components.esm.js +0 -17716
  190. package/dist/design-system-react-components.esm.js.map +0 -1
  191. package/dist/helpers/types.d.ts +0 -1
  192. package/dist/hooks/__tests__/useCarouselStyles.test.d.ts +0 -1
  193. package/dist/hooks/__tests__/useFilterBar.test.d.ts +0 -1
  194. package/dist/hooks/__tests__/useMultiSelect.test.d.ts +0 -1
  195. package/dist/hooks/__tests__/useNYPLBreakpoints.test.d.ts +0 -1
  196. package/dist/index.d.ts +0 -65
  197. package/dist/index.js +0 -8
  198. package/dist/resources.scss +0 -382
  199. package/dist/styles.css +0 -4
  200. package/dist/theme/types.d.ts +0 -1
  201. package/dist/utils/componentCategories.d.ts +0 -1
@@ -1,29 +1,29 @@
1
- import React from "react";
2
- export declare 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;
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;
@@ -1,23 +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;
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;
@@ -1,43 +1,43 @@
1
- import React from "react";
2
- declare const thirdPartyServices: readonly ["libsyn", "soundcloud", "spotify"];
3
- export declare type ThirdPartyAudioType = typeof thirdPartyServices[number];
4
- export declare 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;
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;
@@ -1,18 +1,18 @@
1
- import React from "react";
2
- export declare type BreadcrumbsTypes = "blogs" | "booksAndMore" | "brand" | "education" | "locations" | "research" | "whatsOn";
3
- export interface BreadcrumbsDataProps {
4
- url: string;
5
- text: string | React.ReactNode;
6
- }
7
- export interface BreadcrumbProps {
8
- /** Breadcrumb links as an array */
9
- breadcrumbsData: BreadcrumbsDataProps[];
10
- /** Used to control how the `Hero` component will be rendered. */
11
- breadcrumbsType?: BreadcrumbsTypes;
12
- /** className you can add in addition to 'input' */
13
- className?: string;
14
- /** ID that other components can cross reference for accessibility purposes */
15
- id?: string;
16
- }
17
- export declare const Breadcrumbs: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLDivElement>>, {}>;
18
- export default Breadcrumbs;
1
+ import React from "react";
2
+ export type BreadcrumbsTypes = "blogs" | "booksAndMore" | "brand" | "education" | "locations" | "research" | "whatsOn";
3
+ export interface BreadcrumbsDataProps {
4
+ url: string;
5
+ text: string | React.ReactNode;
6
+ }
7
+ export interface BreadcrumbProps {
8
+ /** Breadcrumb links as an array */
9
+ breadcrumbsData: BreadcrumbsDataProps[];
10
+ /** Used to control how the `Hero` component will be rendered. */
11
+ breadcrumbsType?: BreadcrumbsTypes;
12
+ /** className you can add in addition to 'input' */
13
+ className?: string;
14
+ /** ID that other components can cross reference for accessibility purposes */
15
+ id?: string;
16
+ }
17
+ export declare const Breadcrumbs: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<BreadcrumbProps & React.RefAttributes<HTMLDivElement>>, {}>;
18
+ export default Breadcrumbs;
@@ -1,30 +1,30 @@
1
- import React from "react";
2
- export declare type ButtonElementType = "submit" | "button" | "reset";
3
- export declare type ButtonSizes = "small" | "medium" | "large";
4
- export declare type ButtonTypes = "primary" | "secondary" | "text" | "callout" | "pill" | "noBrand" | "link";
5
- interface ButtonProps {
6
- /** The button variation to render based on the `ButtonTypes` type.*/
7
- buttonType?: ButtonTypes;
8
- /** Additional className to use. */
9
- className?: string;
10
- /** ID that other components can cross reference for accessibility purposes. */
11
- id: string;
12
- /** Adds 'disabled' property to the button. */
13
- isDisabled?: boolean;
14
- /** Trigger the Button's action through the `mouseDown` event handler instead
15
- * of `onClick`. `false` by default. */
16
- mouseDown?: boolean;
17
- /** The action to perform on the `<button>`'s onClick function. */
18
- onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
19
- /** The size of the `Button`. */
20
- size?: ButtonSizes;
21
- /** The HTML button type attribute. */
22
- type?: ButtonElementType;
23
- }
24
- /**
25
- * Renders a simple `button` element with custom variant styles.
26
- */
27
- export declare const Button: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ButtonProps & {
28
- children?: React.ReactNode;
29
- } & React.RefAttributes<HTMLButtonElement>>, {}>;
30
- export default Button;
1
+ import React from "react";
2
+ export type ButtonElementType = "submit" | "button" | "reset";
3
+ export type ButtonSizes = "small" | "medium" | "large";
4
+ export type ButtonTypes = "primary" | "secondary" | "text" | "callout" | "pill" | "noBrand" | "link";
5
+ interface ButtonProps {
6
+ /** The button variation to render based on the `ButtonTypes` type.*/
7
+ buttonType?: ButtonTypes;
8
+ /** Additional className to use. */
9
+ className?: string;
10
+ /** ID that other components can cross reference for accessibility purposes. */
11
+ id: string;
12
+ /** Adds 'disabled' property to the button. */
13
+ isDisabled?: boolean;
14
+ /** Trigger the Button's action through the `mouseDown` event handler instead
15
+ * of `onClick`. `false` by default. */
16
+ mouseDown?: boolean;
17
+ /** The action to perform on the `<button>`'s onClick function. */
18
+ onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
19
+ /** The size of the `Button`. */
20
+ size?: ButtonSizes;
21
+ /** The HTML button type attribute. */
22
+ type?: ButtonElementType;
23
+ }
24
+ /**
25
+ * Renders a simple `button` element with custom variant styles.
26
+ */
27
+ export declare const Button: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ButtonProps & {
28
+ children?: React.ReactNode;
29
+ } & React.RefAttributes<HTMLButtonElement>>, {}>;
30
+ export default Button;
@@ -1,24 +1,24 @@
1
- import React from "react";
2
- import { LayoutTypes } from "../../helpers/types";
3
- export declare type ButtonGroupWidths = "default" | "full";
4
- interface ButtonGroupProps {
5
- /** Sets the width to "default" (for "fit-content") or "full". */
6
- buttonWidth?: ButtonGroupWidths;
7
- /** Additional className to use. */
8
- className?: string;
9
- /** ID that other components can cross reference for accessibility purposes. */
10
- id?: string;
11
- /** Set's the disabled state to all the internal `Button` components. */
12
- isDisabled?: boolean;
13
- /** Renders the layout of `Button` components in a row or column. */
14
- layout?: LayoutTypes;
15
- }
16
- /**
17
- * A simple wrapper to group `Button` components together. The layout can be set
18
- * to row or column and the width of internal `Button` components can be set to
19
- * the parent's full width or the `Button`'s content width
20
- */
21
- export declare const ButtonGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ButtonGroupProps & {
22
- children?: React.ReactNode;
23
- } & React.RefAttributes<HTMLDivElement>>, {}>;
24
- export default ButtonGroup;
1
+ import React from "react";
2
+ import { LayoutTypes } from "../../helpers/types";
3
+ export type ButtonGroupWidths = "default" | "full";
4
+ interface ButtonGroupProps {
5
+ /** Sets the width to "default" (for "fit-content") or "full". */
6
+ buttonWidth?: ButtonGroupWidths;
7
+ /** Additional className to use. */
8
+ className?: string;
9
+ /** ID that other components can cross reference for accessibility purposes. */
10
+ id?: string;
11
+ /** Set's the disabled state to all the internal `Button` components. */
12
+ isDisabled?: boolean;
13
+ /** Renders the layout of `Button` components in a row or column. */
14
+ layout?: LayoutTypes;
15
+ }
16
+ /**
17
+ * A simple wrapper to group `Button` components together. The layout can be set
18
+ * to row or column and the width of internal `Button` components can be set to
19
+ * the parent's full width or the `Button`'s content width
20
+ */
21
+ export declare const ButtonGroup: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ButtonGroupProps & {
22
+ children?: React.ReactNode;
23
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
24
+ export default ButtonGroup;
@@ -1,55 +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<{}>) => JSX.Element, {}>;
51
- export declare const CardActions: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<CardActionsProps>) => 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;
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<{}>) => JSX.Element, {}>;
51
+ export declare const CardActions: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<CardActionsProps>) => 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;
@@ -1,47 +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;
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;