@nypl/design-system-react-components 4.0.0-remove-matchMedia-test → 4.0.1-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.
- package/README.md +125 -201
- package/dist/design-system-react-components.cjs +58 -58
- package/dist/design-system-react-components.js +17467 -18102
- package/dist/readme/componentheader.png +0 -0
- package/dist/src/components/Accordion/Accordion.d.ts +7 -9
- package/dist/src/components/AlphabetFilter/AlphabetFilter.d.ts +2 -6
- package/dist/src/components/AudioPlayer/AudioPlayer.d.ts +4 -13
- package/dist/src/components/Banner/Banner.d.ts +9 -16
- package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +7 -11
- package/dist/src/components/Button/Button.d.ts +10 -17
- package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +2 -6
- package/dist/src/components/ButtonGroup/ButtonGroupContext.d.ts +3 -0
- package/dist/src/components/Card/Card.d.ts +3 -7
- package/dist/src/components/Checkbox/Checkbox.d.ts +3 -12
- package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +4 -8
- package/dist/src/components/CheckboxGroup/CheckboxGroupContext.d.ts +10 -0
- package/dist/src/components/ComponentWrapper/ComponentWrapper.d.ts +2 -7
- package/dist/src/components/DatePicker/DatePicker.d.ts +4 -8
- package/dist/src/components/FeaturedContent/FeaturedContent.d.ts +3 -7
- package/dist/src/components/FeedbackBox/FeedbackBox.d.ts +2 -6
- package/dist/src/components/Fieldset/Fieldset.d.ts +2 -6
- package/dist/src/components/FilterBarInline/FilterBarInline.d.ts +2 -6
- package/dist/src/components/FilterBarPopup/FilterBarPopup.d.ts +2 -6
- package/dist/src/components/Form/Form.d.ts +10 -15
- package/dist/src/components/Grid/SimpleGrid.d.ts +2 -6
- package/dist/src/components/Heading/Heading.d.ts +2 -9
- package/dist/src/components/HelperErrorText/HelperErrorText.d.ts +2 -7
- package/dist/src/components/Hero/Hero.d.ts +11 -13
- package/dist/src/components/HorizontalRule/HorizontalRule.d.ts +2 -6
- package/dist/src/components/Icons/Icon.d.ts +5 -9
- package/dist/src/components/Icons/IconSvgs.d.ts +3 -0
- package/dist/src/components/Icons/iconVariables.d.ts +3 -3
- package/dist/src/components/Image/Image.d.ts +2 -14
- package/dist/src/components/Label/Label.d.ts +3 -9
- package/dist/src/components/Link/Link.d.ts +8 -18
- package/dist/src/components/List/List.d.ts +5 -14
- package/dist/src/components/Logo/Logo.d.ts +2 -6
- package/dist/src/components/Menu/Menu.d.ts +2 -6
- package/dist/src/components/Modal/Modal.d.ts +8 -11
- package/dist/src/components/MultiSelect/MultiSelect.d.ts +9 -10
- package/dist/src/components/MultiSelect/MultiSelectItemsCountButton.d.ts +2 -5
- package/dist/src/components/MultiSelectGroup/MultiSelectGroup.d.ts +2 -6
- package/dist/src/components/NewsletterSignup/NewsletterSignup.d.ts +6 -11
- package/dist/src/components/Notification/Notification.d.ts +9 -13
- package/dist/src/components/Pagination/Pagination.d.ts +2 -6
- package/dist/src/components/ProgressIndicator/ProgressIndicator.d.ts +3 -5
- package/dist/src/components/Radio/Radio.d.ts +4 -13
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +6 -9
- package/dist/src/components/RadioGroup/RadioGroupContext.d.ts +10 -0
- package/dist/src/components/SearchBar/SearchBar.d.ts +5 -15
- package/dist/src/components/Select/Select.d.ts +6 -18
- package/dist/src/components/SkeletonLoader/SkeletonLoader.d.ts +2 -6
- package/dist/src/components/SkipNavigation/SkipNavigation.d.ts +2 -6
- package/dist/src/components/Slider/Slider.d.ts +3 -7
- package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +4 -8
- package/dist/src/components/StatusBadge/StatusBadge.d.ts +5 -9
- package/dist/src/components/StructuredContent/StructuredContent.d.ts +2 -6
- package/dist/src/components/StyledList/StyledList.d.ts +2 -8
- package/dist/src/components/SubNav/SubNav.d.ts +4 -13
- package/dist/src/components/Table/Table.d.ts +2 -10
- package/dist/src/components/Tabs/Tabs.d.ts +2 -4
- package/dist/src/components/TagSet/TagSet.d.ts +2 -9
- package/dist/src/components/TagSet/TagSetExplore.d.ts +3 -2
- package/dist/src/components/TagSet/TagSetFilter.d.ts +3 -4
- package/dist/src/components/Template/Template.d.ts +31 -41
- package/dist/src/components/Text/Text.d.ts +3 -11
- package/dist/src/components/TextInput/TextInput.d.ts +9 -34
- package/dist/src/components/Toggle/Toggle.d.ts +3 -10
- package/dist/src/components/Tooltip/Tooltip.d.ts +2 -8
- package/dist/src/components/VideoPlayer/VideoPlayer.d.ts +2 -6
- package/dist/src/hooks/useMultiSelect.d.ts +5 -1
- package/dist/src/hooks/useSafeId.d.ts +6 -0
- package/dist/src/index.d.ts +14 -16
- package/dist/src/theme/components/breadcrumb.d.ts +13 -5
- package/dist/src/theme/components/button.d.ts +12 -0
- package/dist/src/theme/components/datePicker.d.ts +4 -0
- package/dist/src/theme/components/feedbackBox.d.ts +15 -3
- package/dist/src/theme/components/fieldset.d.ts +1 -1
- package/dist/src/theme/components/global.d.ts +18 -5
- package/dist/src/theme/components/heading.d.ts +6 -72
- package/dist/src/theme/components/helperErrorText.d.ts +5 -14
- package/dist/src/theme/components/hero.d.ts +19 -16
- package/dist/src/theme/components/horizontalRule.d.ts +0 -2
- package/dist/src/theme/components/icon.d.ts +2 -5
- package/dist/src/theme/components/label.d.ts +0 -1
- package/dist/src/theme/components/list.d.ts +1 -11
- package/dist/src/theme/components/newsletterSignup.d.ts +4 -4
- package/dist/src/theme/components/notification.d.ts +3 -3
- package/dist/src/theme/components/notificationContent.d.ts +3 -3
- package/dist/src/theme/components/notificationHeading.d.ts +3 -3
- package/dist/src/theme/components/radioGroup.d.ts +1 -1
- package/dist/src/theme/components/searchBar.d.ts +3 -3
- package/dist/src/theme/components/select.d.ts +7 -3
- package/dist/src/theme/components/slider.d.ts +5 -1
- package/dist/src/theme/components/socialmedialinks.d.ts +2 -2
- package/dist/src/theme/components/structuredContent.d.ts +2 -69
- package/dist/src/theme/components/styledList.d.ts +0 -1
- package/dist/src/theme/components/subnav.d.ts +3 -2
- package/dist/src/theme/components/{customTable.d.ts → table.d.ts} +7 -13
- package/dist/src/theme/components/template.d.ts +92 -45
- package/dist/src/theme/components/text.d.ts +1 -3
- package/dist/src/theme/foundations/colors.d.ts +1 -1
- package/dist/src/theme/foundations/global.d.ts +0 -12
- package/dist/src/theme/foundations/spacing.d.ts +16 -0
- package/dist/src/theme/sharedStyles.d.ts +4 -0
- package/dist/src/theme/sharedTypes.d.ts +4 -0
- package/dist/src/utils/utils.d.ts +9 -3
- package/dist/styles.css +1 -1
- package/dist/template/templateChildBreakout.png +0 -0
- package/dist/template/templateChildContent.png +0 -0
- package/dist/template/templateChildFullContent.png +0 -0
- package/dist/template/templateChildFullContentBottom.png +0 -0
- package/dist/template/templateChildFullContentTop.png +0 -0
- package/dist/template/templateChildFullFooter.png +0 -0
- package/dist/template/templateChildFullHeader.png +0 -0
- package/dist/template/templateChildFullInside.png +0 -0
- package/dist/template/templateChildFullOutside.png +0 -0
- package/dist/template/templateChildSidebar.png +0 -0
- package/dist/template/templateFluidColumns1.png +0 -0
- package/dist/template/templateFluidColumns2.png +0 -0
- package/dist/template/templateFluidColumns3.png +0 -0
- package/dist/template/templateFluidColumns4.png +0 -0
- package/dist/template/templateFullPageLayout.png +0 -0
- package/dist/template/templateRegions.png +0 -0
- package/dist/template/templateRegionsFooter.png +0 -0
- package/dist/template/templateRegionsHeader.png +0 -0
- package/dist/template/templateRegionsMain.png +0 -0
- package/dist/template/templateSidebarNone.png +0 -0
- package/dist/template/templateVariantFull.png +0 -0
- package/dist/template/templateVariantNarrow.png +0 -0
- package/dist/template/templateVariantSidebarLeft.png +0 -0
- package/dist/template/templateVariantSidebarRight.png +0 -0
- package/dist/useNextjsImage/aspectRatio.png +0 -0
- package/dist/useNextjsImage/containedImageExamples.png +0 -0
- package/dist/useNextjsImage/croppedImageExamples.png +0 -0
- package/dist/useNextjsImage/customWidth.png +0 -0
- package/dist/useNextjsImage/fallbackImageDark.png +0 -0
- package/dist/useNextjsImage/fallbackImageLight.png +0 -0
- package/dist/useNextjsImage/focalPointExamples01.png +0 -0
- package/dist/useNextjsImage/focalPointExamples02.png +0 -0
- package/package.json +14 -18
- package/dist/src/hooks/useCarouselStyles.d.ts +0 -17
- package/dist/src/hooks/useWindowSize.d.ts +0 -10
- package/dist/src/theme/components/filterBar.d.ts +0 -46
- package/dist/template/templateBottom.png +0 -0
- package/dist/template/templateBreakout.png +0 -0
- package/dist/template/templateMain.png +0 -0
- package/dist/template/templateMainNarrow.png +0 -0
- package/dist/template/templateMainWide.png +0 -0
- package/dist/template/templateSidebarLeft.png +0 -0
- package/dist/template/templateSidebarRight.png +0 -0
- package/dist/template/templateTop.png +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
1
|
+
import { BoxProps, ChakraComponent, ChakraProps } from "@chakra-ui/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
4
4
|
import type { AutoCompleteValues } from "../../utils/constantValues";
|
|
@@ -14,7 +14,13 @@ export declare const TextInputFormats: {
|
|
|
14
14
|
url: string;
|
|
15
15
|
};
|
|
16
16
|
export type TextInputVariants = "default" | "searchBar" | "searchBarSelect";
|
|
17
|
-
|
|
17
|
+
type InputElementProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "color" | "height" | "width">;
|
|
18
|
+
type TextAreaElementProps = Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "color" | "height" | "width">;
|
|
19
|
+
interface BaseTextInputProps extends Pick<BoxProps, keyof ChakraProps> {
|
|
20
|
+
type?: TextInputTypes;
|
|
21
|
+
}
|
|
22
|
+
export type TextInputPropsWithHTML = BaseTextInputProps & (BaseTextInputProps["type"] extends "textarea" ? TextAreaElementProps : InputElementProps);
|
|
23
|
+
export interface InputProps extends TextInputPropsWithHTML {
|
|
18
24
|
/** FOR INTERNAL DS USE ONLY: Adds an aria-label or appends to an existing aria-label for screen readers.*/
|
|
19
25
|
additionalAriaLabel?: string;
|
|
20
26
|
/** FOR INTERNAL DS USE ONLY: additional helper text id(s) to be used for the input's `aria-describedby` value.
|
|
@@ -22,14 +28,8 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
22
28
|
additionalHelperTextIds?: string;
|
|
23
29
|
/** String value used to set the autocomplete attribute. */
|
|
24
30
|
autoComplete?: AutoCompleteValues;
|
|
25
|
-
/** A class name for the TextInput parent div. */
|
|
26
|
-
className?: string;
|
|
27
|
-
/** The starting value of the input field. */
|
|
28
|
-
defaultValue?: string;
|
|
29
31
|
/** Populates the HelperErrorText for the standard state */
|
|
30
32
|
helperText?: HelperErrorTextType;
|
|
31
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
32
|
-
id: string;
|
|
33
33
|
/** Populates the HelperErrorText for the error state */
|
|
34
34
|
invalidText?: HelperErrorTextType;
|
|
35
35
|
/** Adds a button to clear existing text in the input field. */
|
|
@@ -45,25 +45,6 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
45
45
|
/** Provides text for a `Label` component if `showLabel` is set to true;
|
|
46
46
|
* populates an `aria-label` attribute if `showLabel` is set to false. */
|
|
47
47
|
labelText: string | JSX.Element;
|
|
48
|
-
/** The max number for a `number` TextInput type. */
|
|
49
|
-
max?: number;
|
|
50
|
-
/** The max length of the input field. This prop is for all input types
|
|
51
|
-
* except for the `number` type. */
|
|
52
|
-
maxLength?: number;
|
|
53
|
-
/** The min number for a `number` TextInput type. */
|
|
54
|
-
min?: number;
|
|
55
|
-
/** Used to reference the input element in forms. */
|
|
56
|
-
name?: string;
|
|
57
|
-
/** The action to perform on the `input`/`textarea`'s onChange function */
|
|
58
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement> | React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
59
|
-
/** The action to perform on the `input`/`textarea`'s onClick function */
|
|
60
|
-
onClick?: (event: React.MouseEvent<HTMLInputElement, MouseEvent>) => void;
|
|
61
|
-
/** The action to perform on the `input`/`textarea`'s onFocus function */
|
|
62
|
-
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
63
|
-
/** Regex to query the user input against. */
|
|
64
|
-
pattern?: string;
|
|
65
|
-
/** Populates the placeholder for the input/textarea elements */
|
|
66
|
-
placeholder?: string;
|
|
67
48
|
/** Allows the '(required)' text to be changed for language purposes
|
|
68
49
|
* Note: Parenthesis will be added automatically by the component */
|
|
69
50
|
requiredLabelText?: string;
|
|
@@ -75,14 +56,8 @@ export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>
|
|
|
75
56
|
/** Whether or not to display the "(required)" text in the label text.
|
|
76
57
|
* True by default. */
|
|
77
58
|
showRequiredLabel?: boolean;
|
|
78
|
-
/** The amount to increase or decrease when using the number type. */
|
|
79
|
-
step?: number;
|
|
80
59
|
/** FOR INTERNAL DS USE ONLY: the input variant to display. */
|
|
81
|
-
|
|
82
|
-
/** HTML Input types as defined by MDN: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input */
|
|
83
|
-
type?: TextInputTypes;
|
|
84
|
-
/** Populates the value of the input/textarea elements */
|
|
85
|
-
value?: string;
|
|
60
|
+
textInputVariant?: TextInputVariants;
|
|
86
61
|
}
|
|
87
62
|
/**
|
|
88
63
|
* The type used for `ref`s. We want to extend both `input` and `textarea`
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
2
|
-
import React from "react";
|
|
1
|
+
import { BoxProps, ChakraComponent, ChakraProps } from "@chakra-ui/react";
|
|
2
|
+
import React, { InputHTMLAttributes } from "react";
|
|
3
3
|
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
4
4
|
export declare const toggleSizesArray: readonly ["default", "small"];
|
|
5
5
|
export type ToggleSizes = typeof toggleSizesArray[number];
|
|
6
|
-
export interface ToggleProps {
|
|
6
|
+
export interface ToggleProps extends Pick<BoxProps, keyof ChakraProps>, Omit<InputHTMLAttributes<HTMLInputElement>, "color" | "height" | "size" | "width"> {
|
|
7
7
|
/** Used for uncontrolled scenarios. Sets the state of the Toggle when the page first loads.
|
|
8
8
|
* If true, the toggle will be initially set to the "on" position. */
|
|
9
9
|
defaultChecked?: boolean;
|
|
10
10
|
/** Optional string to populate the HelperErrorText for standard state */
|
|
11
11
|
helperText?: HelperErrorTextType;
|
|
12
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
13
|
-
id: string;
|
|
14
12
|
/** Optional string to populate the HelperErrorText for the error state
|
|
15
13
|
* when `isInvalid` is true. */
|
|
16
14
|
invalidText?: HelperErrorTextType;
|
|
@@ -28,11 +26,6 @@ export interface ToggleProps {
|
|
|
28
26
|
isRequired?: boolean;
|
|
29
27
|
/** The toggle's label. This will serve as the text content for the `<label>` element */
|
|
30
28
|
labelText: string;
|
|
31
|
-
/** The name prop indicates the `Toggle`'s form element name. If none is
|
|
32
|
-
* specified, 'default' will be used. */
|
|
33
|
-
name?: string;
|
|
34
|
-
/** The action to perform on the `<input>`'s onChange function */
|
|
35
|
-
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
36
29
|
/** The size of the Toggle. Defaults to "large". */
|
|
37
30
|
size?: ToggleSizes;
|
|
38
31
|
}
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
3
|
-
export interface TooltipProps {
|
|
4
|
-
/** Any child node passed to the component. */
|
|
5
|
-
children: React.ReactNode;
|
|
2
|
+
import { BoxProps, ChakraComponent } from "@chakra-ui/react";
|
|
3
|
+
export interface TooltipProps extends Omit<BoxProps, "content"> {
|
|
6
4
|
/** Value used to populate the tooltip content. */
|
|
7
5
|
content: string | number | React.ReactNode;
|
|
8
|
-
/** A class name for the Tooltip parent div. */
|
|
9
|
-
className?: string;
|
|
10
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
11
|
-
id?: string;
|
|
12
6
|
/** Adds the `disabled` prop to the Tooltip when true. */
|
|
13
7
|
isDisabled?: boolean;
|
|
14
8
|
/** Wraps the children of the tooltip in `ComponentWrapper` with `tabIndex=0` when true. */
|
|
@@ -1,16 +1,14 @@
|
|
|
1
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
1
|
+
import { BoxProps, ChakraComponent } from "@chakra-ui/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
4
4
|
export declare const VideoPlayerAspectRatiosArray: readonly ["fourByThree", "sixteenByNine", "square"];
|
|
5
5
|
export declare const VideoPlayerTypesArray: readonly ["vimeo", "youtube"];
|
|
6
6
|
export type VideoPlayerAspectRatios = typeof VideoPlayerAspectRatiosArray[number];
|
|
7
7
|
export type VideoPlayerTypes = typeof VideoPlayerTypesArray[number];
|
|
8
|
-
export interface VideoPlayerProps {
|
|
8
|
+
export interface VideoPlayerProps extends BoxProps {
|
|
9
9
|
/** Optional aspect ratio prop to control the sizing of the video player; if
|
|
10
10
|
* omitted, the video player defaults to `sixteen-by-nine` */
|
|
11
11
|
aspectRatio?: VideoPlayerAspectRatios;
|
|
12
|
-
/** Optional className you can add in addition to `video-player` */
|
|
13
|
-
className?: string;
|
|
14
12
|
/** Optional string to set the text for a video description */
|
|
15
13
|
descriptionText?: string;
|
|
16
14
|
/** Optional string to set a code snippet provided by YouTube or Vimeo; the
|
|
@@ -23,8 +21,6 @@ export interface VideoPlayerProps {
|
|
|
23
21
|
headingText?: string | JSX.Element;
|
|
24
22
|
/** Optional string to set the text for a `HelperErrorText` component */
|
|
25
23
|
helperText?: HelperErrorTextType;
|
|
26
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
27
|
-
id?: string;
|
|
28
24
|
/** Optional title to be added to the `<iframe>` element for improved
|
|
29
25
|
* accessibility; this title should describe in a few words the content of
|
|
30
26
|
* the video; if omitted, a generic title will be added; if a `title`
|
|
@@ -12,7 +12,11 @@ export default function useMultiSelect(initialState?: SelectedItems): {
|
|
|
12
12
|
selectedItems: {} | SelectedItems;
|
|
13
13
|
setSelectedItems: (newState: SelectedItems) => void;
|
|
14
14
|
onChange: (itemId: string, multiSelectId: string) => void;
|
|
15
|
-
onMixedStateChange: (parentId
|
|
15
|
+
onMixedStateChange: ({ parentId, multiSelectId, items, }: {
|
|
16
|
+
parentId: string;
|
|
17
|
+
multiSelectId: string;
|
|
18
|
+
items: MultiSelectItem[];
|
|
19
|
+
}) => void;
|
|
16
20
|
onClear: (multiSelectId: string) => void;
|
|
17
21
|
onClearAll: () => void;
|
|
18
22
|
};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
export { Box, Center, chakra, Circle, ColorModeScript, cookieStorageManager, cookieStorageManagerSSR, FocusLock, Flex, Grid, GridItem, HStack, localStorageManager, Spacer, Square, Stack, useColorMode, useColorModeValue, useStyleConfig, useMediaQuery, useMultiStyleConfig, VStack, } from "@chakra-ui/react";
|
|
2
2
|
export { default as DSProvider } from "./theme/provider";
|
|
3
3
|
export { default as Accordion } from "./components/Accordion/Accordion";
|
|
4
|
-
export type {
|
|
4
|
+
export type { AccordionVariants, AccordionDataProps, } from "./components/Accordion/Accordion";
|
|
5
5
|
export { default as AlphabetFilter } from "./components/AlphabetFilter/AlphabetFilter";
|
|
6
6
|
export type { AlphabetFilterProps } from "./components/AlphabetFilter/AlphabetFilter";
|
|
7
7
|
export { default as AudioPlayer } from "./components/AudioPlayer/AudioPlayer";
|
|
8
8
|
export type { AudioType, AudioPlayerProps, } from "./components/AudioPlayer/AudioPlayer";
|
|
9
9
|
export { default as Banner } from "./components/Banner/Banner";
|
|
10
|
-
export type {
|
|
10
|
+
export type { BannerVariants, BannerBgColors, BannerHighlightColors, BannerProps, } from "./components/Banner/Banner";
|
|
11
11
|
export { default as Breadcrumbs } from "./components/Breadcrumbs/Breadcrumbs";
|
|
12
|
-
export type {
|
|
12
|
+
export type { BreadcrumbsVariants, BreadcrumbProps, BreadcrumbsDataProps, } from "./components/Breadcrumbs/Breadcrumbs";
|
|
13
13
|
export { default as Button } from "./components/Button/Button";
|
|
14
|
-
export type { ButtonElementType, ButtonProps, ButtonSizes,
|
|
14
|
+
export type { ButtonElementType, ButtonProps, ButtonSizes, ButtonVariants, } from "./components/Button/Button";
|
|
15
15
|
export { default as ButtonGroup } from "./components/ButtonGroup/ButtonGroup";
|
|
16
16
|
export type { ButtonGroupProps } from "./components/ButtonGroup/ButtonGroup";
|
|
17
17
|
export { default as Card, CardActions, CardContent, CardHeading, } from "./components/Card/Card";
|
|
@@ -40,20 +40,20 @@ export type { HeadingLevels, HeadingProps, HeadingSizes, } from "./components/He
|
|
|
40
40
|
export { default as HelperErrorText } from "./components/HelperErrorText/HelperErrorText";
|
|
41
41
|
export type { HelperErrorTextProps } from "./components/HelperErrorText/HelperErrorText";
|
|
42
42
|
export { default as Hero } from "./components/Hero/Hero";
|
|
43
|
-
export type { HeroProps,
|
|
43
|
+
export type { HeroProps, HeroVariants } from "./components/Hero/Hero";
|
|
44
44
|
export { default as HorizontalRule } from "./components/HorizontalRule/HorizontalRule";
|
|
45
45
|
export type { HorizontalRuleProps } from "./components/HorizontalRule/HorizontalRule";
|
|
46
46
|
export { default as Icon } from "./components/Icons/Icon";
|
|
47
|
-
export type { IconAlign, IconColors, IconNames, IconRotations, IconSizes,
|
|
47
|
+
export type { IconAlign, IconColors, IconNames, IconRotations, IconSizes, IconVariants, IconProps, } from "./components/Icons/Icon";
|
|
48
48
|
export { default as Image } from "./components/Image/Image";
|
|
49
49
|
export type { ComponentImageProps, ImageProps, ImageRatios, ImageSizes, ImageTypes, } from "./components/Image/Image";
|
|
50
50
|
export { default as Label } from "./components/Label/Label";
|
|
51
51
|
export type { LabelProps } from "./components/Label/Label";
|
|
52
52
|
export type { DimensionTypes, LayoutTypes, SectionTypes, } from "./helpers/types";
|
|
53
53
|
export { default as Link } from "./components/Link/Link";
|
|
54
|
-
export type { LinkProps,
|
|
54
|
+
export type { LinkProps, LinkVariants } from "./components/Link/Link";
|
|
55
55
|
export { default as List } from "./components/List/List";
|
|
56
|
-
export type { DescriptionProps, ListProps,
|
|
56
|
+
export type { DescriptionProps, ListProps, ListVariants, } from "./components/List/List";
|
|
57
57
|
export { default as Logo } from "./components/Logo/Logo";
|
|
58
58
|
export type { LogoNames, LogoProps, LogoSizes } from "./components/Logo/Logo";
|
|
59
59
|
export { default as MatchMedia } from "../src/__tests__/mediaMatchMock";
|
|
@@ -68,7 +68,7 @@ export type { MultiSelectGroupProps } from "./components/MultiSelectGroup/MultiS
|
|
|
68
68
|
export { default as NewsletterSignup } from "./components/NewsletterSignup/NewsletterSignup";
|
|
69
69
|
export type { HighlightColorTypes, NewsletterSignupProps, NewsletterSignupViewType, } from "./components/NewsletterSignup/NewsletterSignup";
|
|
70
70
|
export { default as Notification } from "./components/Notification/Notification";
|
|
71
|
-
export type { NotificationProps,
|
|
71
|
+
export type { NotificationProps, NotificationVariants, } from "./components/Notification/Notification";
|
|
72
72
|
export { default as Pagination } from "./components/Pagination/Pagination";
|
|
73
73
|
export type { PaginationProps } from "./components/Pagination/Pagination";
|
|
74
74
|
export { default as ProgressIndicator } from "./components/ProgressIndicator/ProgressIndicator";
|
|
@@ -80,7 +80,7 @@ export type { RadioGroupProps } from "./components/RadioGroup/RadioGroup";
|
|
|
80
80
|
export { default as SearchBar } from "./components/SearchBar/SearchBar";
|
|
81
81
|
export type { SearchBarProps } from "./components/SearchBar/SearchBar";
|
|
82
82
|
export { default as Select } from "./components/Select/Select";
|
|
83
|
-
export type { LabelPositions, SelectProps,
|
|
83
|
+
export type { LabelPositions, SelectProps, SelectVariants, } from "./components/Select/Select";
|
|
84
84
|
export { default as SimpleGrid } from "./components/Grid/SimpleGrid";
|
|
85
85
|
export type { GridGaps, SimpleGridProps } from "./components/Grid/SimpleGrid";
|
|
86
86
|
export { default as SkeletonLoader } from "./components/SkeletonLoader/SkeletonLoader";
|
|
@@ -92,21 +92,21 @@ export type { SliderProps } from "./components/Slider/Slider";
|
|
|
92
92
|
export { default as SocialMediaLinks } from "./components/SocialMediaLinks/SocialMediaLinks";
|
|
93
93
|
export type { SocialMediaLinkDataProps } from "./components/SocialMediaLinks/SocialMediaLinks";
|
|
94
94
|
export { default as StatusBadge } from "./components/StatusBadge/StatusBadge";
|
|
95
|
-
export type { StatusBadgeProps,
|
|
95
|
+
export type { StatusBadgeProps, StatusBadgeVariants, } from "./components/StatusBadge/StatusBadge";
|
|
96
96
|
export { default as StructuredContent } from "./components/StructuredContent/StructuredContent";
|
|
97
97
|
export type { StructuredContentImagePosition, StructuredContentProps, } from "./components/StructuredContent/StructuredContent";
|
|
98
98
|
export { default as StyledList } from "./components/StyledList/StyledList";
|
|
99
99
|
export type { StyledListProps, StyledListTextSizes, } from "./components/StyledList/StyledList";
|
|
100
100
|
export { default as SubNav, SubNavButton, SubNavLink, } from "./components/SubNav/SubNav";
|
|
101
101
|
export { default as Table } from "./components/Table/Table";
|
|
102
|
-
export type {
|
|
102
|
+
export type { TableProps } from "./components/Table/Table";
|
|
103
103
|
export { default as Tabs, TabList, Tab, TabPanels, TabPanel, } from "./components/Tabs/Tabs";
|
|
104
104
|
export type { TabsDataProps, TabsProps } from "./components/Tabs/Tabs";
|
|
105
105
|
export { default as TagSet } from "./components/TagSet/TagSet";
|
|
106
|
-
export type { TagSetProps
|
|
106
|
+
export type { TagSetProps } from "./components/TagSet/TagSet";
|
|
107
107
|
export type { TagSetExploreDataProps, TagSetExploreProps, } from "./components/TagSet/TagSetExplore";
|
|
108
108
|
export type { TagSetFilterDataProps, TagSetFilterProps, } from "./components/TagSet/TagSetFilter";
|
|
109
|
-
export { Template, TemplateBreakout,
|
|
109
|
+
export { Template, TemplateBreakout, TemplateContent, TemplateFooter, TemplateFull, TemplateHeader, TemplateMain, TemplateSidebar, } from "./components/Template/Template";
|
|
110
110
|
export { default as Text } from "./components/Text/Text";
|
|
111
111
|
export type { TextProps, TextSizes } from "./components/Text/Text";
|
|
112
112
|
export { default as TextInput } from "./components/TextInput/TextInput";
|
|
@@ -117,7 +117,6 @@ export { default as Tooltip } from "./components/Tooltip/Tooltip";
|
|
|
117
117
|
export type { TooltipProps } from "./components/Tooltip/Tooltip";
|
|
118
118
|
export { default as VideoPlayer } from "./components/VideoPlayer/VideoPlayer";
|
|
119
119
|
export type { VideoPlayerAspectRatios, VideoPlayerProps, VideoPlayerTypes, } from "./components/VideoPlayer/VideoPlayer";
|
|
120
|
-
export { default as useCarouselStyles } from "./hooks/useCarouselStyles";
|
|
121
120
|
export { default as useCloseDropDown } from "./hooks/useCloseDropDown";
|
|
122
121
|
export { default as useFormatNumber } from "./hooks/useFormatNumber";
|
|
123
122
|
export { default as useMultiSelect } from "./hooks/useMultiSelect";
|
|
@@ -125,5 +124,4 @@ export { default as useNYPLBreakpoints } from "./hooks/useNYPLBreakpoints";
|
|
|
125
124
|
export { default as useNYPLTheme } from "./hooks/useNYPLTheme";
|
|
126
125
|
export { default as useResponsiveSpacing } from "./hooks/useResponsiveSpacing";
|
|
127
126
|
export { default as useScrollFadeStyles } from "./hooks/useScrollFadeStyles";
|
|
128
|
-
export { default as useWindowSize } from "./hooks/useWindowSize";
|
|
129
127
|
export type { AutoCompleteValues } from "./utils/constantValues";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const Breadcrumb: {
|
|
2
|
-
baseStyle?: {
|
|
2
|
+
baseStyle?: () => {
|
|
3
3
|
bg: string;
|
|
4
4
|
color: string;
|
|
5
5
|
fontSize: string;
|
|
@@ -21,8 +21,16 @@ declare const Breadcrumb: {
|
|
|
21
21
|
};
|
|
22
22
|
margin: string;
|
|
23
23
|
maxWidth: string;
|
|
24
|
-
paddingStart:
|
|
25
|
-
|
|
24
|
+
paddingStart: {
|
|
25
|
+
base: string;
|
|
26
|
+
md: string;
|
|
27
|
+
xl: string;
|
|
28
|
+
};
|
|
29
|
+
paddingEnd: {
|
|
30
|
+
base: string;
|
|
31
|
+
md: string;
|
|
32
|
+
xl: string;
|
|
33
|
+
};
|
|
26
34
|
};
|
|
27
35
|
a: {
|
|
28
36
|
_visited: {
|
|
@@ -85,7 +93,7 @@ declare const Breadcrumb: {
|
|
|
85
93
|
md: "none";
|
|
86
94
|
};
|
|
87
95
|
};
|
|
88
|
-
"span:not(.
|
|
96
|
+
"span:not(.ds-breadcrumbs-link-label)": {
|
|
89
97
|
clip: string;
|
|
90
98
|
height: {
|
|
91
99
|
base: string;
|
|
@@ -257,7 +265,7 @@ declare const Breadcrumb: {
|
|
|
257
265
|
};
|
|
258
266
|
defaultProps?: {
|
|
259
267
|
size?: string | number;
|
|
260
|
-
variant?: "blogs" | "
|
|
268
|
+
variant?: "blogs" | "research" | "whatsOn" | "connect" | "booksAndMore" | "brand" | "digitalCollections" | "education" | "locations";
|
|
261
269
|
colorScheme?: string;
|
|
262
270
|
};
|
|
263
271
|
};
|
|
@@ -10,7 +10,11 @@ export declare const baseButtonStyle: {
|
|
|
10
10
|
lineHeight: string;
|
|
11
11
|
minWidth: string;
|
|
12
12
|
textDecoration: string;
|
|
13
|
+
transitionDuration: string;
|
|
13
14
|
wordWrap: string;
|
|
15
|
+
"&:has(svg)": {
|
|
16
|
+
gap: string;
|
|
17
|
+
};
|
|
14
18
|
svg: {
|
|
15
19
|
fill: string;
|
|
16
20
|
};
|
|
@@ -46,7 +50,11 @@ export declare const buttonBaseStyle: {
|
|
|
46
50
|
lineHeight: string;
|
|
47
51
|
minWidth: string;
|
|
48
52
|
textDecoration: string;
|
|
53
|
+
transitionDuration: string;
|
|
49
54
|
wordWrap: string;
|
|
55
|
+
"&:has(svg)": {
|
|
56
|
+
gap: string;
|
|
57
|
+
};
|
|
50
58
|
svg: {
|
|
51
59
|
fill: string;
|
|
52
60
|
};
|
|
@@ -119,7 +127,11 @@ declare const Button: {
|
|
|
119
127
|
lineHeight: string;
|
|
120
128
|
minWidth: string;
|
|
121
129
|
textDecoration: string;
|
|
130
|
+
transitionDuration: string;
|
|
122
131
|
wordWrap: string;
|
|
132
|
+
"&:has(svg)": {
|
|
133
|
+
gap: string;
|
|
134
|
+
};
|
|
123
135
|
svg: {
|
|
124
136
|
fill: string;
|
|
125
137
|
};
|
|
@@ -100,15 +100,27 @@ declare const FeedbackBox: {
|
|
|
100
100
|
zIndex: string;
|
|
101
101
|
};
|
|
102
102
|
};
|
|
103
|
+
radioGroup: {
|
|
104
|
+
".ds-radioGroup-stack": {
|
|
105
|
+
flexDirection: {
|
|
106
|
+
base: "column";
|
|
107
|
+
md: "row";
|
|
108
|
+
};
|
|
109
|
+
gap: {
|
|
110
|
+
base: string;
|
|
111
|
+
md: string;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
};
|
|
103
115
|
};
|
|
104
116
|
sizes?: {
|
|
105
117
|
[key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{
|
|
106
|
-
keys: ("closeButton" | "drawerBody" | "drawerContent" | "drawerHeader" | "openButton")[];
|
|
118
|
+
keys: ("radioGroup" | "closeButton" | "drawerBody" | "drawerContent" | "drawerHeader" | "openButton")[];
|
|
107
119
|
}>;
|
|
108
120
|
};
|
|
109
121
|
variants?: {
|
|
110
122
|
[key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{
|
|
111
|
-
keys: ("closeButton" | "drawerBody" | "drawerContent" | "drawerHeader" | "openButton")[];
|
|
123
|
+
keys: ("radioGroup" | "closeButton" | "drawerBody" | "drawerContent" | "drawerHeader" | "openButton")[];
|
|
112
124
|
}>;
|
|
113
125
|
};
|
|
114
126
|
defaultProps?: {
|
|
@@ -116,6 +128,6 @@ declare const FeedbackBox: {
|
|
|
116
128
|
variant?: string | number;
|
|
117
129
|
colorScheme?: string;
|
|
118
130
|
};
|
|
119
|
-
parts: ("closeButton" | "drawerBody" | "drawerContent" | "drawerHeader" | "openButton")[];
|
|
131
|
+
parts: ("radioGroup" | "closeButton" | "drawerBody" | "drawerContent" | "drawerHeader" | "openButton")[];
|
|
120
132
|
};
|
|
121
133
|
export default FeedbackBox;
|
|
@@ -106,7 +106,6 @@ declare const labelLegendText: {
|
|
|
106
106
|
display: string;
|
|
107
107
|
fontSize: string;
|
|
108
108
|
fontWeight: string;
|
|
109
|
-
marginBottom: string;
|
|
110
109
|
width: string;
|
|
111
110
|
span: {
|
|
112
111
|
fontWeight: string;
|
|
@@ -115,9 +114,6 @@ declare const labelLegendText: {
|
|
|
115
114
|
color: string;
|
|
116
115
|
};
|
|
117
116
|
};
|
|
118
|
-
declare const labelLegendTextSpecialSpacing: {
|
|
119
|
-
marginBottom: string;
|
|
120
|
-
};
|
|
121
117
|
declare const selectTextInputDisabledStyles: {
|
|
122
118
|
bg: string;
|
|
123
119
|
borderColor: string;
|
|
@@ -152,4 +148,21 @@ declare const textMargin: {
|
|
|
152
148
|
margin: string;
|
|
153
149
|
marginBottom: string;
|
|
154
150
|
};
|
|
155
|
-
|
|
151
|
+
declare const responsiveSpacing: {
|
|
152
|
+
gridGap: {
|
|
153
|
+
base: string;
|
|
154
|
+
md: string;
|
|
155
|
+
xl: string;
|
|
156
|
+
};
|
|
157
|
+
margin: {
|
|
158
|
+
base: string;
|
|
159
|
+
md: string;
|
|
160
|
+
xl: string;
|
|
161
|
+
};
|
|
162
|
+
padding: {
|
|
163
|
+
base: string;
|
|
164
|
+
md: string;
|
|
165
|
+
xl: string;
|
|
166
|
+
};
|
|
167
|
+
};
|
|
168
|
+
export { activeFocus, checkboxRadioControlSize, checkboxRadioGroupStyles, checkboxRadioHelperErrorTextStyle, checkboxRadioHoverStyles, checkboxRadioLabelStyles, customFocusColor, defaultElementSizes, labelLegendText, responsiveSpacing, selectTextInputDisabledStyles, selectTextInputFocusStyles, textMargin, };
|
|
@@ -1,66 +1,4 @@
|
|
|
1
1
|
export declare const headings: {
|
|
2
|
-
one: {
|
|
3
|
-
base: {
|
|
4
|
-
width: string;
|
|
5
|
-
a: {
|
|
6
|
-
textUnderlineOffset: string;
|
|
7
|
-
};
|
|
8
|
-
marginTop: string;
|
|
9
|
-
marginStart: string;
|
|
10
|
-
marginEnd: string;
|
|
11
|
-
fontSize: string;
|
|
12
|
-
fontWeight: string;
|
|
13
|
-
letterSpacing: string;
|
|
14
|
-
lineHeight: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
two: {
|
|
18
|
-
base: {
|
|
19
|
-
width: string;
|
|
20
|
-
a: {
|
|
21
|
-
textUnderlineOffset: string;
|
|
22
|
-
};
|
|
23
|
-
marginTop: string;
|
|
24
|
-
marginStart: string;
|
|
25
|
-
marginEnd: string;
|
|
26
|
-
fontSize: string;
|
|
27
|
-
fontWeight: string;
|
|
28
|
-
lineHeight: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
three: {
|
|
32
|
-
base: {
|
|
33
|
-
width: string;
|
|
34
|
-
marginTop: string;
|
|
35
|
-
marginStart: string;
|
|
36
|
-
marginEnd: string;
|
|
37
|
-
fontSize: string;
|
|
38
|
-
fontWeight: string;
|
|
39
|
-
lineHeight: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
four: {
|
|
43
|
-
base: {
|
|
44
|
-
width: string;
|
|
45
|
-
marginTop: string;
|
|
46
|
-
marginStart: string;
|
|
47
|
-
marginEnd: string;
|
|
48
|
-
fontSize: string;
|
|
49
|
-
fontWeight: string;
|
|
50
|
-
lineHeight: string;
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
fallback: {
|
|
54
|
-
base: {
|
|
55
|
-
width: string;
|
|
56
|
-
marginTop: string;
|
|
57
|
-
marginStart: string;
|
|
58
|
-
marginEnd: string;
|
|
59
|
-
fontSize: string;
|
|
60
|
-
fontWeight: string;
|
|
61
|
-
lineHeight: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
2
|
display1: {
|
|
65
3
|
base: {
|
|
66
4
|
fontSize: {
|
|
@@ -210,7 +148,7 @@ export declare const headings: {
|
|
|
210
148
|
};
|
|
211
149
|
};
|
|
212
150
|
declare const Heading: {
|
|
213
|
-
baseStyle?: ({ isCapitalized, isUppercase, isLowercase
|
|
151
|
+
baseStyle?: ({ isCapitalized, isUppercase, isLowercase }: import("@chakra-ui/styled-system").StyleFunctionProps) => {
|
|
214
152
|
base: {
|
|
215
153
|
"a:only-child": {
|
|
216
154
|
textDecoration: string;
|
|
@@ -231,23 +169,19 @@ declare const Heading: {
|
|
|
231
169
|
color: string;
|
|
232
170
|
textUnderlineOffset: string;
|
|
233
171
|
};
|
|
234
|
-
color: string;
|
|
235
172
|
margin: string;
|
|
236
173
|
textTransform: string;
|
|
174
|
+
};
|
|
175
|
+
defaultColorStyle: {
|
|
176
|
+
color: string;
|
|
237
177
|
_dark: {
|
|
238
178
|
color: string;
|
|
239
179
|
};
|
|
240
180
|
};
|
|
241
|
-
headingWrapper: {
|
|
242
|
-
marginTop: string;
|
|
243
|
-
marginStart: string;
|
|
244
|
-
marginEnd: string;
|
|
245
|
-
marginBottom: string;
|
|
246
|
-
};
|
|
247
181
|
};
|
|
248
182
|
sizes?: {
|
|
249
183
|
[key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{
|
|
250
|
-
keys: ("base" | "
|
|
184
|
+
keys: ("base" | "defaultColorStyle")[];
|
|
251
185
|
}>;
|
|
252
186
|
};
|
|
253
187
|
variants?: {
|
|
@@ -506,6 +440,6 @@ declare const Heading: {
|
|
|
506
440
|
variant?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "display1" | "heading1" | "heading2" | "heading3" | "heading4" | "heading5" | "heading6" | "heading7" | "heading8";
|
|
507
441
|
colorScheme?: string;
|
|
508
442
|
};
|
|
509
|
-
parts: ("base" | "
|
|
443
|
+
parts: ("base" | "defaultColorStyle")[];
|
|
510
444
|
};
|
|
511
445
|
export default Heading;
|
|
@@ -1,34 +1,25 @@
|
|
|
1
|
-
import { StyleFunctionProps } from "@chakra-ui/
|
|
1
|
+
import { StyleFunctionProps } from "@chakra-ui/react";
|
|
2
2
|
interface HelperErrorTextBaseStyle extends StyleFunctionProps {
|
|
3
3
|
isInvalid: boolean;
|
|
4
4
|
}
|
|
5
|
-
declare const
|
|
5
|
+
declare const HelperErrorText: {
|
|
6
6
|
baseStyle?: ({ isInvalid }: HelperErrorTextBaseStyle) => {
|
|
7
7
|
fontSize: string;
|
|
8
8
|
color: string;
|
|
9
9
|
_dark: {
|
|
10
10
|
color: string;
|
|
11
11
|
};
|
|
12
|
-
innerChild: {
|
|
13
|
-
marginTop: string;
|
|
14
|
-
marginBottom: string;
|
|
15
|
-
};
|
|
16
12
|
};
|
|
17
13
|
sizes?: {
|
|
18
|
-
[key: string]: import("@chakra-ui/styled-system").
|
|
19
|
-
keys: "innerChild"[];
|
|
20
|
-
}>;
|
|
14
|
+
[key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
|
|
21
15
|
};
|
|
22
16
|
variants?: {
|
|
23
|
-
[key: string]: import("@chakra-ui/styled-system").
|
|
24
|
-
keys: "innerChild"[];
|
|
25
|
-
}>;
|
|
17
|
+
[key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
|
|
26
18
|
};
|
|
27
19
|
defaultProps?: {
|
|
28
20
|
size?: string | number;
|
|
29
21
|
variant?: string | number;
|
|
30
22
|
colorScheme?: string;
|
|
31
23
|
};
|
|
32
|
-
parts: "innerChild"[];
|
|
33
24
|
};
|
|
34
|
-
export default
|
|
25
|
+
export default HelperErrorText;
|