@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,65 +1,65 @@
1
- import React from "react";
2
- import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
- export interface SliderProps {
4
- /** Additional class name for the Slider component. */
5
- className?: string;
6
- /** The initial value for the single `Slider` or an array of two number
7
- * values for the `isRangeSlider` case. */
8
- defaultValue?: number | number[];
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
- /** Adds the 'disabled' state to the slider and text input(s) when true. */
17
- isDisabled?: boolean;
18
- /** Adds the 'invalid' state to the slider and text input(s) when true. */
19
- isInvalid?: boolean;
20
- /** Offers the ability to render a slider with one value or
21
- * a range slider with two values. */
22
- isRangeSlider?: boolean;
23
- /** Adds the 'required' attribute to the input(s) when true. */
24
- isRequired?: boolean;
25
- /** The `Slider`'s label. In the default single slider, this will be linked to
26
- * the only `TextInput` component. In the range slider, this will be linked to
27
- * the first `TextInput` component. If `showLabel` is false, then this value
28
- * will be set in the `Slider`'s `aria-label` attribute. */
29
- labelText: string;
30
- /** Maximum value allowed. */
31
- max?: number;
32
- /** Minimum value allowed. */
33
- min?: number;
34
- /** The name prop indicates into which form this component belongs to. */
35
- name?: string;
36
- /** Callback function that gets the value(s) selected. */
37
- onChange?: (val: number | number[]) => void;
38
- /** Callback function when the user is done selecting a new value. */
39
- onChangeEnd?: (val: number | number[]) => void;
40
- /** Offers the ability to hide the `TextInput` boxes. */
41
- showBoxes?: boolean;
42
- /** Offers the ability to hide the helper/invalid text. */
43
- showHelperInvalidText?: boolean;
44
- /** Offers the ability to show the label onscreen or hide it. Refer
45
- * to the `labelText` property for more information. */
46
- showLabel?: boolean;
47
- /** Whether or not to display the "(Required)" text in the label text.
48
- * True by default. */
49
- showRequiredLabel?: boolean;
50
- /** Offers the ability to hide the static min/max values. */
51
- showValues?: boolean;
52
- /** The amount to increase or decrease when using the slider thumb(s). */
53
- step?: number;
54
- /** The value(s) to programmatically update the Slider or RangeSlider. */
55
- value?: number | number[];
56
- }
57
- /**
58
- * The `Slider` component renders a singular value slider or a range slider
59
- * with a min and max value. The value(s) can be updated through the slider
60
- * thumb(s) or through the text input(s) elements.
61
- */
62
- export declare const Slider: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SliderProps & {
63
- children?: React.ReactNode;
64
- } & React.RefAttributes<HTMLDivElement>>, {}>;
65
- export default Slider;
1
+ import React from "react";
2
+ import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
3
+ export interface SliderProps {
4
+ /** Additional class name for the Slider component. */
5
+ className?: string;
6
+ /** The initial value for the single `Slider` or an array of two number
7
+ * values for the `isRangeSlider` case. */
8
+ defaultValue?: number | number[];
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
+ /** Adds the 'disabled' state to the slider and text input(s) when true. */
17
+ isDisabled?: boolean;
18
+ /** Adds the 'invalid' state to the slider and text input(s) when true. */
19
+ isInvalid?: boolean;
20
+ /** Offers the ability to render a slider with one value or
21
+ * a range slider with two values. */
22
+ isRangeSlider?: boolean;
23
+ /** Adds the 'required' attribute to the input(s) when true. */
24
+ isRequired?: boolean;
25
+ /** The `Slider`'s label. In the default single slider, this will be linked to
26
+ * the only `TextInput` component. In the range slider, this will be linked to
27
+ * the first `TextInput` component. If `showLabel` is false, then this value
28
+ * will be set in the `Slider`'s `aria-label` attribute. */
29
+ labelText: string;
30
+ /** Maximum value allowed. */
31
+ max?: number;
32
+ /** Minimum value allowed. */
33
+ min?: number;
34
+ /** The name prop indicates into which form this component belongs to. */
35
+ name?: string;
36
+ /** Callback function that gets the value(s) selected. */
37
+ onChange?: (val: number | number[]) => void;
38
+ /** Callback function when the user is done selecting a new value. */
39
+ onChangeEnd?: (val: number | number[]) => void;
40
+ /** Offers the ability to hide the `TextInput` boxes. */
41
+ showBoxes?: boolean;
42
+ /** Offers the ability to hide the helper/invalid text. */
43
+ showHelperInvalidText?: boolean;
44
+ /** Offers the ability to show the label onscreen or hide it. Refer
45
+ * to the `labelText` property for more information. */
46
+ showLabel?: boolean;
47
+ /** Whether or not to display the "(Required)" text in the label text.
48
+ * True by default. */
49
+ showRequiredLabel?: boolean;
50
+ /** Offers the ability to hide the static min/max values. */
51
+ showValues?: boolean;
52
+ /** The amount to increase or decrease when using the slider thumb(s). */
53
+ step?: number;
54
+ /** The value(s) to programmatically update the Slider or RangeSlider. */
55
+ value?: number | number[];
56
+ }
57
+ /**
58
+ * The `Slider` component renders a singular value slider or a range slider
59
+ * with a min and max value. The value(s) can be updated through the slider
60
+ * thumb(s) or through the text input(s) elements.
61
+ */
62
+ export declare const Slider: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SliderProps & {
63
+ children?: React.ReactNode;
64
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
65
+ export default Slider;
@@ -1,18 +1,18 @@
1
- import React from "react";
2
- export declare type StatusBadgeTypes = "low" | "medium" | "high";
3
- export interface StatusBadgeProps {
4
- /** Additional class for the component */
5
- className?: string;
6
- /** ID that other components can cross reference for accessibility purposes */
7
- id?: string;
8
- /** Level of the status badge. Defaults to `"low"`. */
9
- level?: StatusBadgeTypes;
10
- }
11
- /**
12
- * The `StatusBadge` component is used to display a visual badge for three
13
- * different status levels.
14
- */
15
- export declare const StatusBadge: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<StatusBadgeProps & {
16
- children?: React.ReactNode;
17
- } & React.RefAttributes<HTMLDivElement>>, {}>;
18
- export default StatusBadge;
1
+ import React from "react";
2
+ export type StatusBadgeTypes = "low" | "medium" | "high";
3
+ export interface StatusBadgeProps {
4
+ /** Additional class for the component */
5
+ className?: string;
6
+ /** ID that other components can cross reference for accessibility purposes */
7
+ id?: string;
8
+ /** Level of the status badge. Defaults to `"low"`. */
9
+ level?: StatusBadgeTypes;
10
+ }
11
+ /**
12
+ * The `StatusBadge` component is used to display a visual badge for three
13
+ * different status levels.
14
+ */
15
+ export declare const StatusBadge: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<StatusBadgeProps & {
16
+ children?: React.ReactNode;
17
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
18
+ export default StatusBadge;
@@ -1,30 +1,30 @@
1
- import React from "react";
2
- import { ComponentImageProps } from "../Image/Image";
3
- export declare type StructuredContentImagePosition = "left" | "right" | "center";
4
- interface StructuredContentImageProps extends ComponentImageProps {
5
- /** Optional value to control the positioning of the internal `Image` component.
6
- * Defaults to `"left"`. */
7
- position?: StructuredContentImagePosition;
8
- }
9
- export interface StructuredContentProps {
10
- /** Optional value to set the text for the callout heading text. */
11
- calloutText?: string;
12
- /** Additional class name for the `StructuredContent` component. */
13
- className?: string;
14
- /** Optional value to set the text for the main heading text. */
15
- headingText?: string;
16
- /** ID that other components can cross reference for accessibility purposes. */
17
- id?: string;
18
- /** Object used to create and render the `Image` component. */
19
- imageProps?: StructuredContentImageProps;
20
- /** Required value to set the text for the body content. */
21
- bodyContent: string | JSX.Element;
22
- }
23
- /**
24
- * The `StructuredContent` component that displays a heading, callout content,
25
- * an image, and body content. All are optional except for body content.
26
- */
27
- export declare const StructuredContent: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<StructuredContentProps & {
28
- children?: React.ReactNode;
29
- } & React.RefAttributes<HTMLDivElement>>, {}>;
30
- export default StructuredContent;
1
+ import React from "react";
2
+ import { ComponentImageProps } from "../Image/Image";
3
+ export type StructuredContentImagePosition = "left" | "right" | "center";
4
+ interface StructuredContentImageProps extends ComponentImageProps {
5
+ /** Optional value to control the positioning of the internal `Image` component.
6
+ * Defaults to `"left"`. */
7
+ position?: StructuredContentImagePosition;
8
+ }
9
+ export interface StructuredContentProps {
10
+ /** Optional value to set the text for the callout heading text. */
11
+ calloutText?: string;
12
+ /** Additional class name for the `StructuredContent` component. */
13
+ className?: string;
14
+ /** Optional value to set the text for the main heading text. */
15
+ headingText?: string;
16
+ /** ID that other components can cross reference for accessibility purposes. */
17
+ id?: string;
18
+ /** Object used to create and render the `Image` component. */
19
+ imageProps?: StructuredContentImageProps;
20
+ /** Required value to set the text for the body content. */
21
+ bodyContent: string | JSX.Element;
22
+ }
23
+ /**
24
+ * The `StructuredContent` component that displays a heading, callout content,
25
+ * an image, and body content. All are optional except for body content.
26
+ */
27
+ export declare const StructuredContent: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<StructuredContentProps & {
28
+ children?: React.ReactNode;
29
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
30
+ export default StructuredContent;
@@ -1,46 +1,46 @@
1
- import * as React from "react";
2
- export interface DataTableProps {
3
- /** Contrast and WCAG compliance data related to the color ui.bg.page when
4
- * used with the current color. */
5
- dataBgPageColor: string[];
6
- /** Contrast and WCAG compliance data related to the color ui.bg.default when
7
- * used with the current color. */
8
- dataBgDefaultColor: string[];
9
- /** Contrast and WCAG compliance data related to the color dark.ui.bg.page when
10
- * used with the current color. */
11
- dataDarkBgPageColor: string[];
12
- /** Contrast and WCAG compliance data related to the color dark.ui.bg.default when
13
- * used with the current color. */
14
- dataDarkBgDefaultColor: string[];
15
- /** Contrast and WCAG compliance data related to the color black when used
16
- * with the current color. */
17
- dataBlackColor: string[];
18
- /** Contrast and WCAG compliance data related to the NYPL Brand primary color
19
- * when used with the current color. */
20
- dataBrandPrimaryColor: string[];
21
- /** Contrast and WCAG compliance data related to the default color for basic
22
- * text elements when used with the current color. */
23
- dataDarkBodyColor?: string[];
24
- /** Contrast and WCAG compliance data related to the NYPL Brand secondary color
25
- * when used with the current color. */
26
- dataBrandSecondaryColor: string[];
27
- /** Contrast and WCAG compliance data related to the default color for
28
- * heading elements when used with the current color. */
29
- dataDarkHeadingColor?: string[];
30
- /** Contrast and WCAG compliance data related to the color white when used
31
- * with the current color. */
32
- dataWhiteColor: string[];
33
- /** The color to use for text in the color card. */
34
- textColor: string;
35
- }
36
- export interface ColorCardProps extends DataTableProps {
37
- /** The backgroundColor of the color card. */
38
- backgroundColor: string;
39
- /** The name of a color's javascript theme object. */
40
- colorName: string;
41
- /** The name of the color that the current color is based on. */
42
- colorSource: string;
43
- }
44
- export declare const DataTable: (props: React.PropsWithChildren<DataTableProps>) => JSX.Element;
45
- export declare const ColorCard: (props: React.PropsWithChildren<ColorCardProps>) => JSX.Element;
46
- export default ColorCard;
1
+ import * as React from "react";
2
+ export interface DataTableProps {
3
+ /** Contrast and WCAG compliance data related to the color ui.bg.page when
4
+ * used with the current color. */
5
+ dataBgPageColor: string[];
6
+ /** Contrast and WCAG compliance data related to the color ui.bg.default when
7
+ * used with the current color. */
8
+ dataBgDefaultColor: string[];
9
+ /** Contrast and WCAG compliance data related to the color dark.ui.bg.page when
10
+ * used with the current color. */
11
+ dataDarkBgPageColor: string[];
12
+ /** Contrast and WCAG compliance data related to the color dark.ui.bg.default when
13
+ * used with the current color. */
14
+ dataDarkBgDefaultColor: string[];
15
+ /** Contrast and WCAG compliance data related to the color black when used
16
+ * with the current color. */
17
+ dataBlackColor: string[];
18
+ /** Contrast and WCAG compliance data related to the NYPL Brand primary color
19
+ * when used with the current color. */
20
+ dataBrandPrimaryColor: string[];
21
+ /** Contrast and WCAG compliance data related to the default color for basic
22
+ * text elements when used with the current color. */
23
+ dataDarkBodyColor?: string[];
24
+ /** Contrast and WCAG compliance data related to the NYPL Brand secondary color
25
+ * when used with the current color. */
26
+ dataBrandSecondaryColor: string[];
27
+ /** Contrast and WCAG compliance data related to the default color for
28
+ * heading elements when used with the current color. */
29
+ dataDarkHeadingColor?: string[];
30
+ /** Contrast and WCAG compliance data related to the color white when used
31
+ * with the current color. */
32
+ dataWhiteColor: string[];
33
+ /** The color to use for text in the color card. */
34
+ textColor: string;
35
+ }
36
+ export interface ColorCardProps extends DataTableProps {
37
+ /** The backgroundColor of the color card. */
38
+ backgroundColor: string;
39
+ /** The name of a color's javascript theme object. */
40
+ colorName: string;
41
+ /** The name of the color that the current color is based on. */
42
+ colorSource: string;
43
+ }
44
+ export declare const DataTable: (props: React.PropsWithChildren<DataTableProps>) => JSX.Element;
45
+ export declare const ColorCard: (props: React.PropsWithChildren<ColorCardProps>) => JSX.Element;
46
+ export default ColorCard;
@@ -1,25 +1,25 @@
1
- import React from "react";
2
- import { TextSizes } from "../Text/Text";
3
- export interface StyledListProps {
4
- /** Any child node passed to the component. */
5
- children?: React.ReactNode;
6
- /** A class name for the StyledList parent div. */
7
- className?: string;
8
- /** ID that other components can cross reference for accessibility purposes. */
9
- id?: string;
10
- /** Data to render if `li` children elements are not passed. It must be an
11
- * array of strings or JSX elements. */
12
- listItems?: (string | JSX.Element)[];
13
- /** The style used to render the StyledList component. For its initial release,
14
- * there is only one variant style which is the default, "capped". */
15
- style?: "capped";
16
- /** The font size of the `li` elements. */
17
- textSize?: TextSizes;
18
- }
19
- /**
20
- * The `StyledList` component renders an HTML list with styles that do not
21
- * adhere to traditional numbered and bulleted list styles. Unlike
22
- * the `List` component, `StyledList` only renders an unordered list.
23
- */
24
- export declare const StyledList: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<StyledListProps & React.RefAttributes<HTMLDivElement & HTMLUListElement>>, {}>;
25
- export default StyledList;
1
+ import React from "react";
2
+ import { TextSizes } from "../Text/Text";
3
+ export interface StyledListProps {
4
+ /** Any child node passed to the component. */
5
+ children?: React.ReactNode;
6
+ /** A class name for the StyledList parent div. */
7
+ className?: string;
8
+ /** ID that other components can cross reference for accessibility purposes. */
9
+ id?: string;
10
+ /** Data to render if `li` children elements are not passed. It must be an
11
+ * array of strings or JSX elements. */
12
+ listItems?: (string | JSX.Element)[];
13
+ /** The style used to render the StyledList component. For its initial release,
14
+ * there is only one variant style which is the default, "capped". */
15
+ style?: "capped";
16
+ /** The font size of the `li` elements. */
17
+ textSize?: TextSizes;
18
+ }
19
+ /**
20
+ * The `StyledList` component renders an HTML list with styles that do not
21
+ * adhere to traditional numbered and bulleted list styles. Unlike
22
+ * the `List` component, `StyledList` only renders an unordered list.
23
+ */
24
+ export declare const StyledList: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<StyledListProps & React.RefAttributes<HTMLDivElement & HTMLUListElement>>, {}>;
25
+ export default StyledList;
@@ -1,32 +1,32 @@
1
- import React from "react";
2
- export interface TableProps {
3
- /** Additional class name for the `Table` component. */
4
- className?: string;
5
- /** Array of string values used to populate the `Table` column headers.
6
- * For improved accessibility, column headers are required. */
7
- columnHeaders: string[];
8
- /** Hex value to set the background color of the column headers. */
9
- columnHeadersBackgroundColor?: string;
10
- /** Hex value to set the text color of the column headers. */
11
- columnHeadersTextColor?: string;
12
- /** ID that other components can cross reference for accessibility purposes. */
13
- id?: string;
14
- /** If true, a border will be displayed between each row in the `Table`
15
- * component. The default value is false. */
16
- showRowDividers?: boolean;
17
- /** Two-dimensional array used to populate the table rows. */
18
- tableData: (string | JSX.Element)[][];
19
- /** Displays `Table` title element. */
20
- titleText?: string;
21
- /** If true, the first cell of each row in the `Table` component will be
22
- * visually styled as a header. The default value is false */
23
- useRowHeaders?: boolean;
24
- }
25
- /**
26
- * Basic `Table` component used to organize and display tabular data in
27
- * rows and columns.
28
- */
29
- export declare const Table: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TableProps & {
30
- children?: React.ReactNode;
31
- } & React.RefAttributes<HTMLTableElement>>, {}>;
32
- export default Table;
1
+ import React from "react";
2
+ export interface TableProps {
3
+ /** Additional class name for the `Table` component. */
4
+ className?: string;
5
+ /** Array of string values used to populate the `Table` column headers.
6
+ * For improved accessibility, column headers are required. */
7
+ columnHeaders: string[];
8
+ /** Hex value to set the background color of the column headers. */
9
+ columnHeadersBackgroundColor?: string;
10
+ /** Hex value to set the text color of the column headers. */
11
+ columnHeadersTextColor?: string;
12
+ /** ID that other components can cross reference for accessibility purposes. */
13
+ id?: string;
14
+ /** If true, a border will be displayed between each row in the `Table`
15
+ * component. The default value is false. */
16
+ showRowDividers?: boolean;
17
+ /** Two-dimensional array used to populate the table rows. */
18
+ tableData: (string | JSX.Element)[][];
19
+ /** Displays `Table` title element. */
20
+ titleText?: string;
21
+ /** If true, the first cell of each row in the `Table` component will be
22
+ * visually styled as a header. The default value is false */
23
+ useRowHeaders?: boolean;
24
+ }
25
+ /**
26
+ * Basic `Table` component used to organize and display tabular data in
27
+ * rows and columns.
28
+ */
29
+ export declare const Table: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TableProps & {
30
+ children?: React.ReactNode;
31
+ } & React.RefAttributes<HTMLTableElement>>, {}>;
32
+ export default Table;
@@ -1,28 +1,28 @@
1
- import { Tab, TabList, TabPanels, TabPanel } from "@chakra-ui/react";
2
- import React from "react";
3
- export interface TabsDataProps {
4
- label: string;
5
- content: string | React.ReactNode;
6
- }
7
- export interface TabsProps {
8
- /** The index of the tab to display for controlled situations. */
9
- defaultIndex?: number;
10
- /** ID that other components can cross reference for accessibility purposes */
11
- id?: string;
12
- /** The callback function invoked on every tab change event. */
13
- onChange?: (index: number) => any;
14
- /** Array of data to display */
15
- tabsData?: TabsDataProps[];
16
- /** Render a hash in the url for each tab. Only available when data is
17
- * passed through the `data` props. */
18
- useHash?: boolean;
19
- }
20
- /**
21
- * Renders Chakra's `Tab` component with specific variants, props,
22
- * and controlled styling.
23
- */
24
- export declare const Tabs: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TabsProps & {
25
- children?: React.ReactNode;
26
- } & React.RefAttributes<HTMLDivElement>>, {}>;
27
- export { TabList, Tab, TabPanels, TabPanel };
28
- export default Tabs;
1
+ import { Tab, TabList, TabPanels, TabPanel } from "@chakra-ui/react";
2
+ import React from "react";
3
+ export interface TabsDataProps {
4
+ label: string;
5
+ content: string | React.ReactNode;
6
+ }
7
+ export interface TabsProps {
8
+ /** The index of the tab to display for controlled situations. */
9
+ defaultIndex?: number;
10
+ /** ID that other components can cross reference for accessibility purposes */
11
+ id?: string;
12
+ /** The callback function invoked on every tab change event. */
13
+ onChange?: (index: number) => any;
14
+ /** Array of data to display */
15
+ tabsData?: TabsDataProps[];
16
+ /** Render a hash in the url for each tab. Only available when data is
17
+ * passed through the `data` props. */
18
+ useHash?: boolean;
19
+ }
20
+ /**
21
+ * Renders Chakra's `Tab` component with specific variants, props,
22
+ * and controlled styling.
23
+ */
24
+ export declare const Tabs: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<TabsProps & {
25
+ children?: React.ReactNode;
26
+ } & React.RefAttributes<HTMLDivElement>>, {}>;
27
+ export { TabList, Tab, TabPanels, TabPanel };
28
+ export default Tabs;
@@ -1,32 +1,33 @@
1
- import React from "react";
2
- import { TagSetExploreProps } from "./TagSetExplore";
3
- import { TagSetFilterProps } from "./TagSetFilter";
4
- export interface BaseTagSetProps {
5
- /** Additional class for the component. */
6
- className?: string;
7
- }
8
- export declare type TagSetTypeProps = TagSetFilterProps | TagSetExploreProps;
9
- export declare type TagSetProps = BaseTagSetProps & TagSetTypeProps;
10
- export declare function isFilterType(type: TagSetProps["type"]): type is "filter";
11
- /**
12
- * This helper component wrapper renders a DS `Tooltip` component if the text is
13
- * long or a React fragment. This assumes that the `label` prop is a rather
14
- * simple single root JSX element, such as `<Link ...>....</Link>`.
15
- */
16
- export declare const TooltipWrapper: ({ label, children, }: React.PropsWithChildren<{
17
- label: any;
18
- }>) => JSX.Element;
19
- /**
20
- * The `TagSet` component renders a group of individual tags which have two
21
- * variants: "explore" and "filter". The "explore" tags are meant to be used for
22
- * exploratory linkable elements, whereas the "filter" tags are used to display
23
- * the filter values that were selected through another UI. Only "filter" tags
24
- * can be dismissible.
25
- *
26
- * The width of a single tag will never be greater than 200px. If necessary, a
27
- * tag’s label text will be truncated to keep a tag’s width at or below 200px.
28
- * The full label text will be automatically revealed when the tag is hovered
29
- * with a DS `Tooltip` component.
30
- */
31
- export declare const TagSet: import("@chakra-ui/react").ChakraComponent<React.ElementType<TagSetProps>, TagSetProps>;
32
- export default TagSet;
1
+ import { As } from "@chakra-ui/react";
2
+ import React from "react";
3
+ import { TagSetExploreProps } from "./TagSetExplore";
4
+ import { TagSetFilterProps } from "./TagSetFilter";
5
+ export interface BaseTagSetProps {
6
+ /** Additional class for the component. */
7
+ className?: string;
8
+ }
9
+ export type TagSetTypeProps = TagSetFilterProps | TagSetExploreProps;
10
+ export type TagSetProps = BaseTagSetProps & TagSetTypeProps;
11
+ export declare function isFilterType(type: TagSetProps["type"]): type is "filter";
12
+ /**
13
+ * This helper component wrapper renders a DS `Tooltip` component if the text is
14
+ * long or a React fragment. This assumes that the `label` prop is a rather
15
+ * simple single root JSX element, such as `<Link ...>....</Link>`.
16
+ */
17
+ export declare const TooltipWrapper: ({ label, children, }: React.PropsWithChildren<{
18
+ label: any;
19
+ }>) => JSX.Element;
20
+ /**
21
+ * The `TagSet` component renders a group of individual tags which have two
22
+ * variants: "explore" and "filter". The "explore" tags are meant to be used for
23
+ * exploratory linkable elements, whereas the "filter" tags are used to display
24
+ * the filter values that were selected through another UI. Only "filter" tags
25
+ * can be dismissible.
26
+ *
27
+ * The width of a single tag will never be greater than 200px. If necessary, a
28
+ * tag’s label text will be truncated to keep a tag’s width at or below 200px.
29
+ * The full label text will be automatically revealed when the tag is hovered
30
+ * with a DS `Tooltip` component.
31
+ */
32
+ export declare const TagSet: import("@chakra-ui/react").ChakraComponent<As<TagSetProps>, TagSetProps>;
33
+ export default TagSet;
@@ -1,27 +1,27 @@
1
- /// <reference types="react" />
2
- import { IconNames } from "../Icons/Icon";
3
- export interface TagSetExploreDataProps {
4
- /** The name of the SVG `Icon` to render before the tag label. */
5
- iconName?: IconNames;
6
- /** The content to display; should be a link-type component. */
7
- label: JSX.Element;
8
- }
9
- export interface TagSetExploreProps {
10
- /** ID that other components can cross reference for accessibility purposes. */
11
- id?: string;
12
- /** Whether the tags should be removable. */
13
- isDismissible?: never;
14
- /** The function to perform when a tag is clicked when `isDismissible` is true. */
15
- onClick?: never;
16
- /** The array of data to display as tags. */
17
- tagSetData: TagSetExploreDataProps[];
18
- /** The `TagSet` variant to render; "filter" by default. */
19
- type: "explore";
20
- }
21
- /**
22
- * The "explore" `TagSet` variant will always display the tags passed as data.
23
- * The `label` property in the `tagSetData` prop should be set to a link-type
24
- * JSX component for linking to specific content.
25
- */
26
- export declare const TagSetExplore: import("@chakra-ui/react").ChakraComponent<(props: TagSetExploreProps) => JSX.Element, {}>;
27
- export default TagSetExplore;
1
+ /// <reference types="react" />
2
+ import { IconNames } from "../Icons/Icon";
3
+ export interface TagSetExploreDataProps {
4
+ /** The name of the SVG `Icon` to render before the tag label. */
5
+ iconName?: IconNames;
6
+ /** The content to display; should be a link-type component. */
7
+ label: JSX.Element;
8
+ }
9
+ export interface TagSetExploreProps {
10
+ /** ID that other components can cross reference for accessibility purposes. */
11
+ id?: string;
12
+ /** Whether the tags should be removable. */
13
+ isDismissible?: never;
14
+ /** The function to perform when a tag is clicked when `isDismissible` is true. */
15
+ onClick?: never;
16
+ /** The array of data to display as tags. */
17
+ tagSetData: TagSetExploreDataProps[];
18
+ /** The `TagSet` variant to render; "filter" by default. */
19
+ type: "explore";
20
+ }
21
+ /**
22
+ * The "explore" `TagSet` variant will always display the tags passed as data.
23
+ * The `label` property in the `tagSetData` prop should be set to a link-type
24
+ * JSX component for linking to specific content.
25
+ */
26
+ export declare const TagSetExplore: import("@chakra-ui/react").ChakraComponent<(props: TagSetExploreProps) => JSX.Element, {}>;
27
+ export default TagSetExplore;