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

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 (205) hide show
  1. package/README.md +24 -40
  2. package/dist/design-system-react-components.cjs +304 -0
  3. package/dist/design-system-react-components.js +42142 -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 +24 -18
  8. package/dist/{components → src/components}/Button/Button.d.ts +33 -30
  9. package/dist/{components → src/components}/ButtonGroup/ButtonGroup.d.ts +25 -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 +82 -81
  15. package/dist/{components → src/components}/FeedbackBox/FeedbackBox.d.ts +64 -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 +20 -19
  23. package/dist/{components → src/components}/Header/Header.d.ts +21 -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 +10 -11
  26. package/dist/{components → src/components}/Header/components/HeaderLowerNav.d.ts +6 -7
  27. package/dist/{components → src/components}/Header/components/HeaderMobileIconNav.d.ts +6 -7
  28. package/dist/{components → src/components}/Header/components/HeaderMobileNav.d.ts +6 -7
  29. package/dist/{components → src/components}/Header/components/HeaderMobileNavButton.d.ts +6 -7
  30. package/dist/{components → src/components}/Header/components/HeaderSearchButton.d.ts +9 -10
  31. package/dist/{components → src/components}/Header/components/HeaderSearchForm.d.ts +10 -11
  32. package/dist/{components → src/components}/Header/components/HeaderSitewideAlerts.d.ts +7 -8
  33. package/dist/{components → src/components}/Header/components/HeaderUpperNav.d.ts +7 -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 +37 -35
  38. package/dist/{components → src/components}/HelperErrorText/HelperErrorText.d.ts +34 -34
  39. package/dist/{components → src/components}/Hero/Hero.d.ts +43 -42
  40. package/dist/{components → src/components}/HorizontalRule/HorizontalRule.d.ts +11 -11
  41. package/dist/{components → src/components}/Icons/Icon.d.ts +40 -41
  42. package/dist/src/components/Icons/IconSvgs.d.ts +163 -0
  43. package/dist/src/components/Icons/iconVariables.d.ts +6 -0
  44. package/dist/{components → src/components}/Image/Image.d.ts +68 -65
  45. package/dist/{components → src/components}/Label/Label.d.ts +25 -25
  46. package/dist/{components → src/components}/Link/Link.d.ts +22 -21
  47. package/dist/{components → src/components}/List/List.d.ts +42 -42
  48. package/dist/{components → src/components}/Logo/Logo.d.ts +28 -28
  49. package/dist/src/components/Logo/LogoSvgs.d.ts +157 -0
  50. package/dist/{components → src/components}/Modal/Modal.d.ts +35 -35
  51. package/dist/{components → src/components}/MultiSelect/MultiSelect.d.ts +61 -78
  52. package/dist/{components → src/components}/MultiSelect/MultiSelectDialog.d.ts +8 -8
  53. package/dist/{components → src/components}/MultiSelect/MultiSelectListbox.d.ts +9 -9
  54. package/dist/{components → src/components}/MultiSelect/MultiSelectMenuButton.d.ts +27 -27
  55. package/dist/{components → src/components}/MultiSelectGroup/MultiSelectGroup.d.ts +28 -26
  56. package/dist/{components → src/components}/Notification/Notification.d.ts +52 -51
  57. package/dist/{components → src/components}/Pagination/Pagination.d.ts +27 -27
  58. package/dist/{components → src/components}/ProgressIndicator/ProgressIndicator.d.ts +32 -30
  59. package/dist/{components → src/components}/Radio/Radio.d.ts +43 -43
  60. package/dist/{components → src/components}/RadioGroup/RadioGroup.d.ts +51 -51
  61. package/dist/{components → src/components}/SearchBar/SearchBar.d.ts +58 -58
  62. package/dist/{components → src/components}/Select/Select.d.ts +59 -57
  63. package/dist/{components → src/components}/SkeletonLoader/SkeletonLoader.d.ts +42 -41
  64. package/dist/{components → src/components}/SkipNavigation/SkipNavigation.d.ts +19 -19
  65. package/dist/{components → src/components}/Slider/Slider.d.ts +65 -65
  66. package/dist/{components → src/components}/StatusBadge/StatusBadge.d.ts +19 -18
  67. package/dist/{components → src/components}/StructuredContent/StructuredContent.d.ts +30 -30
  68. package/dist/src/components/StyleGuide/ColorCard.d.ts +342 -0
  69. package/dist/{components → src/components}/StyledList/StyledList.d.ts +25 -25
  70. package/dist/{components → src/components}/Table/Table.d.ts +32 -32
  71. package/dist/{components → src/components}/Tabs/Tabs.d.ts +28 -28
  72. package/dist/{components → src/components}/TagSet/TagSet.d.ts +24 -32
  73. package/dist/{components → src/components}/TagSet/TagSetExplore.d.ts +28 -27
  74. package/dist/{components → src/components}/TagSet/TagSetFilter.d.ts +25 -26
  75. package/dist/src/components/TagSet/TooltipWrapper.d.ts +9 -0
  76. package/dist/{components → src/components}/Template/Template.d.ts +140 -140
  77. package/dist/{components → src/components}/Text/Text.d.ts +25 -24
  78. package/dist/{components → src/components}/TextInput/TextInput.d.ts +89 -88
  79. package/dist/{components → src/components}/Toggle/Toggle.d.ts +43 -42
  80. package/dist/{components → src/components}/Tooltip/Tooltip.d.ts +17 -17
  81. package/dist/{components → src/components}/VideoPlayer/VideoPlayer.d.ts +42 -40
  82. package/dist/src/helpers/types.d.ts +2 -0
  83. package/dist/{hooks → src/hooks}/useCarouselStyles.d.ts +17 -17
  84. package/dist/{hooks → src/hooks}/useCloseDropDown.d.ts +7 -7
  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 +91 -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 +138 -151
  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 -92
  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 -244
  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 -126
  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 -355
  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/src/utils/colorUtils.d.ts +5 -0
  166. package/dist/{utils → src/utils}/interfaces.d.ts +5 -5
  167. package/dist/{utils → src/utils}/utils.d.ts +39 -39
  168. package/dist/styles.css +1 -4
  169. package/package.json +62 -69
  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/Icons/IconColors.d.ts +0 -3
  183. package/dist/components/Icons/IconNames.d.ts +0 -3
  184. package/dist/components/Icons/IconSvgs.d.ts +0 -58
  185. package/dist/components/Logo/LogoSvgs.d.ts +0 -54
  186. package/dist/components/MultiSelect/MultiSelect.stories.d.ts +0 -4
  187. package/dist/components/MultiSelectGroup/MultiSelectGroup.stories.d.ts +0 -4
  188. package/dist/components/Placeholder/Placeholder.d.ts +0 -10
  189. package/dist/components/StyleGuide/ColorCard.d.ts +0 -46
  190. package/dist/design-system-react-components.cjs.development.js +0 -18076
  191. package/dist/design-system-react-components.cjs.development.js.map +0 -1
  192. package/dist/design-system-react-components.cjs.production.min.js +0 -2
  193. package/dist/design-system-react-components.cjs.production.min.js.map +0 -1
  194. package/dist/design-system-react-components.esm.js +0 -17874
  195. package/dist/design-system-react-components.esm.js.map +0 -1
  196. package/dist/helpers/types.d.ts +0 -1
  197. package/dist/hooks/__tests__/useCarouselStyles.test.d.ts +0 -1
  198. package/dist/hooks/__tests__/useFilterBar.test.d.ts +0 -1
  199. package/dist/hooks/__tests__/useMultiSelect.test.d.ts +0 -1
  200. package/dist/hooks/__tests__/useNYPLBreakpoints.test.d.ts +0 -1
  201. package/dist/index.d.ts +0 -66
  202. package/dist/index.js +0 -8
  203. package/dist/resources.scss +0 -382
  204. package/dist/theme/types.d.ts +0 -1
  205. package/dist/utils/componentCategories.d.ts +0 -1
@@ -1,42 +1,43 @@
1
- import React from "react";
2
- import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
- export declare type ToggleSizes = "default" | "small";
4
- export interface ToggleProps {
5
- /** Used for uncontrolled scenarios. Sets the state of the Toggle when the page first loads.
6
- * If true, the toggle will be initially set to the "on" position. */
7
- defaultChecked?: boolean;
8
- /** Optional string to populate the HelperErrorText for standard state */
9
- helperText?: HelperErrorTextType;
10
- /** ID that other components can cross reference for accessibility purposes */
11
- id: string;
12
- /** Optional string to populate the HelperErrorText for the error state
13
- * when `isInvalid` is true. */
14
- invalidText?: HelperErrorTextType;
15
- /** When using the Toggle as a "controlled" form element, you can specify
16
- * the Toggle's checked state using this prop.
17
- * Learn more about controlled and uncontrolled form fields:
18
- * https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */
19
- isChecked?: boolean;
20
- /** Adds the 'disabled' and `aria-disabled` attributes to the input when true.
21
- * This also makes the text italic and color scheme gray. */
22
- isDisabled?: boolean;
23
- /** Adds the 'aria-invalid' attribute to the input when true. */
24
- isInvalid?: boolean;
25
- /** Adds the 'required' attribute to the input when true. */
26
- isRequired?: boolean;
27
- /** The toggle's label. This will serve as the text content for the `<label>` element */
28
- labelText: string;
29
- /** The name prop indicates the `Toggle`'s form element name. If none is
30
- * specified, 'default' will be used. */
31
- name?: string;
32
- /** The action to perform on the `<input>`'s onChange function */
33
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
34
- /** The size of the Toggle. Defaults to "large". */
35
- size?: ToggleSizes;
36
- }
37
- export declare const onChangeDefault: () => void;
38
- /**
39
- * Component that renders Chakra's `Switch` component along with NYPL defaults.
40
- */
41
- export declare const Toggle: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLInputElement>>, {}>;
42
- export default Toggle;
1
+ import React from "react";
2
+ import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
+ export declare const toggleSizesArray: readonly ["default", "small"];
4
+ export type ToggleSizes = typeof toggleSizesArray[number];
5
+ export interface ToggleProps {
6
+ /** Used for uncontrolled scenarios. Sets the state of the Toggle when the page first loads.
7
+ * If true, the toggle will be initially set to the "on" position. */
8
+ defaultChecked?: boolean;
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 the error state
14
+ * when `isInvalid` is true. */
15
+ invalidText?: HelperErrorTextType;
16
+ /** When using the Toggle as a "controlled" form element, you can specify
17
+ * the Toggle's checked state using this prop.
18
+ * Learn more about controlled and uncontrolled form fields:
19
+ * https://goshakkk.name/controlled-vs-uncontrolled-inputs-react/ */
20
+ isChecked?: boolean;
21
+ /** Adds the 'disabled' and `aria-disabled` attributes to the input when true.
22
+ * This also makes the text italic and color scheme gray. */
23
+ isDisabled?: boolean;
24
+ /** Adds the 'aria-invalid' attribute to the input when true. */
25
+ isInvalid?: boolean;
26
+ /** Adds the 'required' attribute to the input when true. */
27
+ isRequired?: boolean;
28
+ /** The toggle's label. This will serve as the text content for the `<label>` element */
29
+ labelText: string;
30
+ /** The name prop indicates the `Toggle`'s form element name. If none is
31
+ * specified, 'default' will be used. */
32
+ name?: string;
33
+ /** The action to perform on the `<input>`'s onChange function */
34
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
35
+ /** The size of the Toggle. Defaults to "large". */
36
+ size?: ToggleSizes;
37
+ }
38
+ export declare const onChangeDefault: () => void;
39
+ /**
40
+ * Component that renders Chakra's `Switch` component along with NYPL defaults.
41
+ */
42
+ export declare const Toggle: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<ToggleProps & React.RefAttributes<HTMLInputElement>>, {}>;
43
+ export default Toggle;
@@ -1,17 +1,17 @@
1
- import React from "react";
2
- export interface TooltipProps {
3
- /** Any child node passed to the component. */
4
- children: React.ReactNode;
5
- /** Value used to populate the tooltip content. */
6
- content: string | number | React.ReactNode;
7
- /** A class name for the Tooltip parent div. */
8
- className?: string;
9
- /** ID that other components can cross reference for accessibility purposes. */
10
- id?: string;
11
- /** Adds the `disabled` prop to the Tooltip when true. */
12
- isDisabled?: boolean;
13
- /** Wraps the children of the tooltip in `ComponentWrapper` with `tabIndex=0` when true. */
14
- shouldWrapChildren?: boolean;
15
- }
16
- export declare const Tooltip: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>, {}>;
17
- export default Tooltip;
1
+ import React from "react";
2
+ export interface TooltipProps {
3
+ /** Any child node passed to the component. */
4
+ children: React.ReactNode;
5
+ /** Value used to populate the tooltip content. */
6
+ content: string | number | React.ReactNode;
7
+ /** A class name for the Tooltip parent div. */
8
+ className?: string;
9
+ /** ID that other components can cross reference for accessibility purposes. */
10
+ id?: string;
11
+ /** Adds the `disabled` prop to the Tooltip when true. */
12
+ isDisabled?: boolean;
13
+ /** Wraps the children of the tooltip in `ComponentWrapper` with `tabIndex=0` when true. */
14
+ shouldWrapChildren?: boolean;
15
+ }
16
+ export declare const Tooltip: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>, {}>;
17
+ export default Tooltip;
@@ -1,40 +1,42 @@
1
- import React from "react";
2
- import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
- export declare type VideoPlayerTypes = "vimeo" | "youtube";
4
- export declare type VideoPlayerAspectRatios = "fourByThree" | "sixteenByNine" | "square";
5
- export interface VideoPlayerProps {
6
- /** Optional aspect ratio prop to control the sizing of the video player; if
7
- * omitted, the video player defaults to `sixteen-by-nine` */
8
- aspectRatio?: VideoPlayerAspectRatios;
9
- /** Optional className you can add in addition to `video-player` */
10
- className?: string;
11
- /** Optional string to set the text for a video description */
12
- descriptionText?: string;
13
- /** Optional string to set a code snippet provided by YouTube or Vimeo; the
14
- * `videoPlayer` component will accept the `embedCode` prop or the `videoId`
15
- * and `videoType` props */
16
- embedCode?: string;
17
- /** Optional string to set the text for a `Heading` component */
18
- headingText?: string;
19
- /** Optional string to set the text for a `HelperErrorText` component */
20
- helperText?: HelperErrorTextType;
21
- /** ID that other components can cross reference for accessibility purposes */
22
- id?: string;
23
- /** Optional title to be added to the `<iframe>` element for improved
24
- * accessibility; this title should describe in a few words the content of
25
- * the video; if omitted, a generic title will be added; if a `title`
26
- * attribute is already present in the `embedCode` prop, this prop will be
27
- * ignored */
28
- iframeTitle?: string;
29
- /** Offers the ability to hide the helper/invalid text. */
30
- showHelperInvalidText?: boolean;
31
- /** Required YouTube or Vimeo video ID. This value can be pulled from a
32
- * video's YouTube or Vimeo URL. */
33
- videoId?: string;
34
- /** Required. Used to specify which video service is being used. */
35
- videoType?: VideoPlayerTypes;
36
- }
37
- export declare const VideoPlayer: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<VideoPlayerProps & {
38
- children?: React.ReactNode;
39
- } & React.RefAttributes<HTMLDivElement>>, {}>;
40
- export default VideoPlayer;
1
+ import React from "react";
2
+ import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
+ export declare const VideoPlayerAspectRatiosArray: readonly ["fourByThree", "sixteenByNine", "square"];
4
+ export declare const VideoPlayerTypesArray: readonly ["vimeo", "youtube"];
5
+ export type VideoPlayerAspectRatios = typeof VideoPlayerAspectRatiosArray[number];
6
+ export type VideoPlayerTypes = typeof VideoPlayerTypesArray[number];
7
+ export interface VideoPlayerProps {
8
+ /** Optional aspect ratio prop to control the sizing of the video player; if
9
+ * omitted, the video player defaults to `sixteen-by-nine` */
10
+ aspectRatio?: VideoPlayerAspectRatios;
11
+ /** Optional className you can add in addition to `video-player` */
12
+ className?: string;
13
+ /** Optional string to set the text for a video description */
14
+ descriptionText?: string;
15
+ /** Optional string to set a code snippet provided by YouTube or Vimeo; the
16
+ * `videoPlayer` component will accept the `embedCode` prop or the `videoId`
17
+ * and `videoType` props */
18
+ embedCode?: string;
19
+ /** Optional string to set the text for a `Heading` component */
20
+ headingText?: string;
21
+ /** Optional string to set the text for a `HelperErrorText` component */
22
+ helperText?: HelperErrorTextType;
23
+ /** ID that other components can cross reference for accessibility purposes */
24
+ id?: string;
25
+ /** Optional title to be added to the `<iframe>` element for improved
26
+ * accessibility; this title should describe in a few words the content of
27
+ * the video; if omitted, a generic title will be added; if a `title`
28
+ * attribute is already present in the `embedCode` prop, this prop will be
29
+ * ignored */
30
+ iframeTitle?: string;
31
+ /** Offers the ability to hide the helper/invalid text. */
32
+ showHelperInvalidText?: boolean;
33
+ /** Required YouTube or Vimeo video ID. This value can be pulled from a
34
+ * video's YouTube or Vimeo URL. */
35
+ videoId?: string;
36
+ /** Required. Used to specify which video service is being used. */
37
+ videoType?: VideoPlayerTypes;
38
+ }
39
+ export declare const VideoPlayer: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<VideoPlayerProps & {
40
+ children?: React.ReactNode;
41
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
42
+ export default VideoPlayer;
@@ -0,0 +1,2 @@
1
+ export declare const layoutTypesArray: readonly ["column", "row"];
2
+ export type LayoutTypes = typeof layoutTypesArray[number];
@@ -1,17 +1,17 @@
1
- /**
2
- * Custom hook that controls the sliding function for the carousel wrapper.
3
- * This returns functions to use for the "previous" and "next" buttons as well
4
- * as a CSS style object that should be use to transition between slides. There
5
- * is also a function to programmatically slide to the first slide.
6
- * Inspired by: https://codesandbox.io/s/fxjeo
7
- */
8
- export declare const useCarouselStyles: (slidesCount?: number, slideWidth?: number) => {
9
- prevSlide: () => void;
10
- nextSlide: () => void;
11
- carouselStyle: {
12
- transition: string;
13
- marginStart: string;
14
- };
15
- goToStart: () => void;
16
- };
17
- export default useCarouselStyles;
1
+ /**
2
+ * Custom hook that controls the sliding function for the carousel wrapper.
3
+ * This returns functions to use for the "previous" and "next" buttons as well
4
+ * as a CSS style object that should be use to transition between slides. There
5
+ * is also a function to programmatically slide to the first slide.
6
+ * Inspired by: https://codesandbox.io/s/fxjeo
7
+ */
8
+ export declare const useCarouselStyles: (slidesCount?: number, slideWidth?: number) => {
9
+ prevSlide: () => void;
10
+ nextSlide: () => void;
11
+ carouselStyle: {
12
+ transition: string;
13
+ marginStart: string;
14
+ };
15
+ goToStart: () => void;
16
+ };
17
+ export default useCarouselStyles;
@@ -1,7 +1,7 @@
1
- /**
2
- * Close dropdowns when clicking outside of them or by pressing
3
- * the escape key. It expects an action callback that will set
4
- * the dropdown state to false (close).
5
- */
6
- declare const useCloseDropDown: (actionCb: (val: boolean) => void, ref: React.RefObject<HTMLDivElement>) => void;
7
- export default useCloseDropDown;
1
+ /**
2
+ * Close dropdowns when clicking outside of them or by pressing
3
+ * the escape key. It expects an action callback that will set
4
+ * the dropdown state to false (close).
5
+ */
6
+ declare const useCloseDropDown: (actionCb: (val: boolean) => void, ref: React.RefObject<HTMLDivElement>) => void;
7
+ export default useCloseDropDown;
@@ -1,21 +1,21 @@
1
- import { SelectedItems } from "./../components/MultiSelect/MultiSelect";
2
- /**
3
- * The `useFilterBar` hook returns an object containing all the functions and state needed to control a FilterBar component and its child components.
4
- * The returned object includes the functions `onChange`, `onMixedStateChange`, `onClear` and `onClearAll` for handling any changes to the selectedItems object,
5
- * a `setSelectedItems` function that allows to set an initial selectedItems state
6
- * and the current state of the selection: `selectedItems`.
7
- * In addition it returns all props to handle a filter module overlay for the mobile view: a boolean value representing the current module state: `isModalOpen`,
8
- * an `onToggle` function to change the module state or alternatively `onOpen` and `onClose` functions.
9
- */
10
- export default function useFilterBar(initialState?: SelectedItems): {
11
- selectedItems: {} | SelectedItems;
12
- setSelectedItems: (newState: SelectedItems) => void;
13
- isModalOpen: boolean;
14
- onOpen: () => void;
15
- onClose: () => void;
16
- onToggle: () => void;
17
- onChange: (itemId: string, multiSelectId: string) => void;
18
- onMixedStateChange: (parentId: string, multiSelectId: string, items: import("../components/MultiSelect/MultiSelect").MultiSelectItem[]) => void;
19
- onClear: (multiSelectId: string) => void;
20
- onClearAll: () => void;
21
- };
1
+ import { SelectedItems } from "./../components/MultiSelect/MultiSelect";
2
+ /**
3
+ * The `useFilterBar` hook returns an object containing all the functions and state needed to control a FilterBar component and its child components.
4
+ * The returned object includes the functions `onChange`, `onMixedStateChange`, `onClear` and `onClearAll` for handling any changes to the selectedItems object,
5
+ * a `setSelectedItems` function that allows to set an initial selectedItems state
6
+ * and the current state of the selection: `selectedItems`.
7
+ * In addition it returns all props to handle a filter module overlay for the mobile view: a boolean value representing the current module state: `isModalOpen`,
8
+ * an `onToggle` function to change the module state or alternatively `onOpen` and `onClose` functions.
9
+ */
10
+ export default function useFilterBar(initialState?: SelectedItems): {
11
+ selectedItems: {} | SelectedItems;
12
+ setSelectedItems: (newState: SelectedItems) => void;
13
+ isModalOpen: boolean;
14
+ onOpen: () => void;
15
+ onClose: () => void;
16
+ onToggle: () => void;
17
+ onChange: (itemId: string, multiSelectId: string) => void;
18
+ onMixedStateChange: (parentId: string, multiSelectId: string, items: import("./../components/MultiSelect/MultiSelect").MultiSelectItem[]) => void;
19
+ onClear: (multiSelectId: string) => void;
20
+ onClearAll: () => void;
21
+ };
@@ -1,15 +1,15 @@
1
- import { MultiSelectItem, SelectedItems } from "../components/MultiSelect/MultiSelect";
2
- /**
3
- * The useMultiSelect hook returns an object containing all the functions and state needed to handle the selectedItems of a `MultiSelect` component.
4
- * It can be used in conjunction with one single `MultiSelect` component as well as a group of `MultiSelect`s in the `MultiSelectGroup` component.
5
- * The returned object includes the functions onChange, onClear, onMixedStateChange for handling any changes to the selection of items
6
- * and the current state of the selection: selectedItems.
7
- */
8
- export default function useMultiSelect(initialState?: SelectedItems): {
9
- selectedItems: {} | SelectedItems;
10
- setSelectedItems: (newState: SelectedItems) => void;
11
- onChange: (itemId: string, multiSelectId: string) => void;
12
- onMixedStateChange: (parentId: string, multiSelectId: string, items: MultiSelectItem[]) => void;
13
- onClear: (multiSelectId: string) => void;
14
- onClearAll: () => void;
15
- };
1
+ import { MultiSelectItem, SelectedItems } from "../components/MultiSelect/MultiSelect";
2
+ /**
3
+ * The useMultiSelect hook returns an object containing all the functions and state needed to handle the selectedItems of a `MultiSelect` component.
4
+ * It can be used in conjunction with one single `MultiSelect` component as well as a group of `MultiSelect`s in the `MultiSelectGroup` component.
5
+ * The returned object includes the functions onChange, onClear, onMixedStateChange for handling any changes to the selection of items
6
+ * and the current state of the selection: selectedItems.
7
+ */
8
+ export default function useMultiSelect(initialState?: SelectedItems): {
9
+ selectedItems: {} | SelectedItems;
10
+ setSelectedItems: (newState: SelectedItems) => void;
11
+ onChange: (itemId: string, multiSelectId: string) => void;
12
+ onMixedStateChange: (parentId: string, multiSelectId: string, items: MultiSelectItem[]) => void;
13
+ onClear: (multiSelectId: string) => void;
14
+ onClearAll: () => void;
15
+ };
@@ -1,13 +1,13 @@
1
- /**
2
- * This hook is used to determine if the current screen size is larger than
3
- * the specific NYPL breakpoint values. The returned value is an object with
4
- * boolean values for each breakpoint.
5
- */
6
- declare const useNYPLBreakpoints: () => {
7
- isLargerThanSmall: any;
8
- isLargerThanMedium: any;
9
- isLargerThanMobile: any;
10
- isLargerThanLarge: any;
11
- isLargerThanXLarge: any;
12
- };
13
- export default useNYPLBreakpoints;
1
+ /**
2
+ * This hook is used to determine if the current screen size is larger than
3
+ * the specific NYPL breakpoint values. The returned value is an object with
4
+ * boolean values for each breakpoint.
5
+ */
6
+ declare const useNYPLBreakpoints: () => {
7
+ isLargerThanSmall: any;
8
+ isLargerThanMedium: any;
9
+ isLargerThanMobile: any;
10
+ isLargerThanLarge: any;
11
+ isLargerThanXLarge: any;
12
+ };
13
+ export default useNYPLBreakpoints;
@@ -1,67 +1,67 @@
1
- /**
2
- * A custom hook that returns the Chakra-based NYPL theme object. This must be
3
- * used inside a component that is wrapped in the `DSProvider` component, so
4
- * that the theme object can be available to use.
5
- */
6
- declare function useNYPLTheme(): {
7
- breakpoints?: undefined;
8
- colors?: undefined;
9
- fontSizes?: undefined;
10
- fontWeights?: undefined;
11
- fonts?: undefined;
12
- radii?: undefined;
13
- space?: undefined;
14
- } | {
15
- breakpoints: any;
16
- colors: {
17
- brand: any;
18
- dark: any;
19
- section: any;
20
- transparent: any;
21
- ui: any;
22
- };
23
- fontSizes: {
24
- "-3": any;
25
- "-2": any;
26
- "-1": any;
27
- 0: any;
28
- 1: any;
29
- 2: any;
30
- 3: any;
31
- 4: any;
32
- breadcrumbs: any;
33
- button: any;
34
- heading: any;
35
- helper: any;
36
- label: any;
37
- text: any;
38
- };
39
- fontWeights: {
40
- light: any;
41
- regular: any;
42
- medium: any;
43
- bold: any;
44
- breadcrumbs: any;
45
- button: any;
46
- heading: any;
47
- helper: any;
48
- label: any;
49
- text: any;
50
- };
51
- fonts: {
52
- body: any;
53
- heading: any;
54
- };
55
- radii: any;
56
- space: {
57
- xxs: any;
58
- xs: any;
59
- s: any;
60
- m: any;
61
- l: any;
62
- xl: any;
63
- xxl: any;
64
- xxxl: any;
65
- };
66
- };
67
- export default useNYPLTheme;
1
+ /**
2
+ * A custom hook that returns the Chakra-based NYPL theme object. This must be
3
+ * used inside a component that is wrapped in the `DSProvider` component, so
4
+ * that the theme object can be available to use.
5
+ */
6
+ declare function useNYPLTheme(): {
7
+ breakpoints?: undefined;
8
+ colors?: undefined;
9
+ fontSizes?: undefined;
10
+ fontWeights?: undefined;
11
+ fonts?: undefined;
12
+ radii?: undefined;
13
+ space?: undefined;
14
+ } | {
15
+ breakpoints: any;
16
+ colors: {
17
+ brand: any;
18
+ dark: any;
19
+ section: any;
20
+ transparent: any;
21
+ ui: any;
22
+ };
23
+ fontSizes: {
24
+ "-3": any;
25
+ "-2": any;
26
+ "-1": any;
27
+ "0": any;
28
+ "1": any;
29
+ "2": any;
30
+ "3": any;
31
+ "4": any;
32
+ breadcrumbs: any;
33
+ button: any;
34
+ heading: any;
35
+ helper: any;
36
+ label: any;
37
+ text: any;
38
+ };
39
+ fontWeights: {
40
+ light: any;
41
+ regular: any;
42
+ medium: any;
43
+ bold: any;
44
+ breadcrumbs: any;
45
+ button: any;
46
+ heading: any;
47
+ helper: any;
48
+ label: any;
49
+ text: any;
50
+ };
51
+ fonts: {
52
+ body: any;
53
+ heading: any;
54
+ };
55
+ radii: any;
56
+ space: {
57
+ xxs: any;
58
+ xs: any;
59
+ s: any;
60
+ m: any;
61
+ l: any;
62
+ xl: any;
63
+ xxl: any;
64
+ xxxl: any;
65
+ };
66
+ };
67
+ export default useNYPLTheme;
@@ -1,5 +1,5 @@
1
- /**
2
- * DS internal helper hook to use state with prop dependencies.
3
- */
4
- declare function useStateWithDependencies(initialValue: any): typeof initialValue;
5
- export default useStateWithDependencies;
1
+ /**
2
+ * DS internal helper hook to use state with prop dependencies.
3
+ */
4
+ declare function useStateWithDependencies(initialValue: any): typeof initialValue;
5
+ export default useStateWithDependencies;
@@ -1,10 +1,10 @@
1
- interface WindowSize {
2
- width: number;
3
- height: number;
4
- }
5
- /**
6
- * React hook used to get the window size on device resizing.
7
- * Based on https://usehooks-typescript.com/react-hook/use-window-size
8
- */
9
- declare function useWindowSize(): WindowSize;
10
- export default useWindowSize;
1
+ interface WindowSize {
2
+ width: number;
3
+ height: number;
4
+ }
5
+ /**
6
+ * React hook used to get the window size on device resizing.
7
+ * Based on https://usehooks-typescript.com/react-hook/use-window-size
8
+ */
9
+ declare function useWindowSize(): WindowSize;
10
+ export default useWindowSize;