@nypl/design-system-react-components 2.1.2 → 2.2.0-react-chakra-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.
- package/dist/design-system-react-components.cjs +77 -400
- package/dist/design-system-react-components.js +24102 -22655
- package/dist/src/components/Accordion/Accordion.d.ts +1 -1
- package/dist/src/components/AlphabetFilter/AlphabetFilter.d.ts +1 -1
- package/dist/src/components/AudioPlayer/AudioPlayer.d.ts +1 -3
- package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/src/components/Button/Button.d.ts +1 -24
- package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +1 -16
- package/dist/src/components/Card/Card.d.ts +4 -16
- package/dist/src/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/src/components/ComponentWrapper/ComponentWrapper.d.ts +1 -3
- package/dist/src/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/src/components/FeaturedContent/FeaturedContent.d.ts +1 -3
- package/dist/src/components/FeedbackBox/FeedbackBox.d.ts +2 -52
- package/dist/src/components/Fieldset/Fieldset.d.ts +1 -18
- package/dist/src/components/Form/Form.d.ts +3 -5
- package/dist/src/components/Grid/SimpleGrid.d.ts +1 -3
- package/dist/src/components/Heading/Heading.d.ts +1 -3
- package/dist/src/components/HelperErrorText/HelperErrorText.d.ts +1 -25
- package/dist/src/components/Hero/Hero.d.ts +1 -3
- package/dist/src/components/HorizontalRule/HorizontalRule.d.ts +1 -1
- package/dist/src/components/Icons/Icon.d.ts +1 -3
- package/dist/src/components/Image/Image.d.ts +1 -1
- package/dist/src/components/Label/Label.d.ts +1 -20
- package/dist/src/components/Link/Link.d.ts +3 -1
- package/dist/src/components/List/List.d.ts +1 -3
- package/dist/src/components/Logo/Logo.d.ts +1 -3
- package/dist/src/components/Modal/Modal.d.ts +2 -8
- package/dist/src/components/NewsletterSignup/NewsletterSignup.d.ts +1 -39
- package/dist/src/components/Notification/Notification.d.ts +4 -6
- package/dist/src/components/Pagination/Pagination.d.ts +1 -1
- package/dist/src/components/ProgressIndicator/ProgressIndicator.d.ts +1 -1
- package/dist/src/components/Radio/Radio.d.ts +1 -1
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +1 -3
- package/dist/src/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/src/components/Select/Select.d.ts +1 -3
- package/dist/src/components/SkeletonLoader/SkeletonLoader.d.ts +1 -3
- package/dist/src/components/SkipNavigation/SkipNavigation.d.ts +1 -11
- package/dist/src/components/Slider/Slider.d.ts +1 -3
- package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +1 -1
- package/dist/src/components/StatusBadge/StatusBadge.d.ts +1 -3
- package/dist/src/components/StructuredContent/StructuredContent.d.ts +1 -3
- package/dist/src/components/StyleGuide/ColorCard.d.ts +3 -3
- package/dist/src/components/StyledList/StyledList.d.ts +1 -1
- package/dist/src/components/Table/Table.d.ts +1 -3
- package/dist/src/components/Tabs/Tabs.d.ts +1 -3
- package/dist/src/components/TagSet/TagSet.d.ts +1 -1
- package/dist/src/components/TagSet/TagSetExplore.d.ts +2 -2
- package/dist/src/components/TagSet/TagSetFilter.d.ts +2 -1
- package/dist/src/components/TagSet/TooltipWrapper.d.ts +1 -3
- package/dist/src/components/Template/Template.d.ts +11 -15
- package/dist/src/components/Text/Text.d.ts +1 -3
- package/dist/src/components/TextInput/TextInput.d.ts +1 -1
- package/dist/src/components/Toggle/Toggle.d.ts +1 -1
- package/dist/src/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/src/components/VideoPlayer/VideoPlayer.d.ts +1 -3
- package/dist/src/theme/components/button.d.ts +115 -102
- package/dist/src/theme/components/card.d.ts +36 -48
- package/dist/src/theme/components/heading.d.ts +9 -12
- package/dist/src/theme/components/link.d.ts +283 -94
- package/dist/src/theme/components/searchBar.d.ts +3 -0
- package/dist/src/theme/components/structuredContent.d.ts +9 -13
- package/dist/src/theme/foundations/breakpoints.d.ts +2 -2
- package/dist/src/theme/provider.d.ts +2 -2
- package/package.json +20 -20
- package/dist/src/theme/internalChakraProvider.d.ts +0 -67
|
@@ -25,5 +25,5 @@ export interface AccordionProps {
|
|
|
25
25
|
* Accordion component that shows content on toggle. Can be used to display
|
|
26
26
|
* multiple accordion items together.
|
|
27
27
|
*/
|
|
28
|
-
export declare const Accordion:
|
|
28
|
+
export declare const Accordion: React.FC<any>;
|
|
29
29
|
export default Accordion;
|
|
@@ -19,5 +19,5 @@ export interface AlphabetFilterProps {
|
|
|
19
19
|
/** The callback function called when a letter button or the Show All button is clicked. */
|
|
20
20
|
onClick: (filterValue: string) => void;
|
|
21
21
|
}
|
|
22
|
-
export declare const AlphabetFilter:
|
|
22
|
+
export declare const AlphabetFilter: React.FC<any>;
|
|
23
23
|
export default AlphabetFilter;
|
|
@@ -32,9 +32,7 @@ export interface AudioPlayerProps {
|
|
|
32
32
|
/**
|
|
33
33
|
* Renders an audio player from 3rd party services such as Libsyn, SoundCloud, and Spotify.
|
|
34
34
|
*/
|
|
35
|
-
export declare const AudioPlayer:
|
|
36
|
-
children?: React.ReactNode;
|
|
37
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
35
|
+
export declare const AudioPlayer: React.FC<any>;
|
|
38
36
|
/**
|
|
39
37
|
* Parse the embedCode string to a DOM object for proper formatted HTML element.
|
|
40
38
|
* We are only interested in the iframe element.
|
|
@@ -20,5 +20,5 @@ export interface BreadcrumbProps {
|
|
|
20
20
|
* breadcrumb path that reflects the site structure and allows a user to
|
|
21
21
|
* navigate to any page available in the breadcrumb hierarchy.
|
|
22
22
|
*/
|
|
23
|
-
export declare const Breadcrumbs:
|
|
23
|
+
export declare const Breadcrumbs: React.FC<any>;
|
|
24
24
|
export default Breadcrumbs;
|
|
@@ -5,31 +5,8 @@ export declare const buttonTypesArray: readonly ["primary", "secondary", "text",
|
|
|
5
5
|
export type ButtonElementType = typeof buttonElementTypeArray[number];
|
|
6
6
|
export type ButtonSizes = typeof buttonSizesArray[number];
|
|
7
7
|
export type ButtonTypes = typeof buttonTypesArray[number];
|
|
8
|
-
interface ButtonProps {
|
|
9
|
-
/** The button variation to render based on the `ButtonTypes` type.*/
|
|
10
|
-
buttonType?: ButtonTypes;
|
|
11
|
-
/** Additional className to use. */
|
|
12
|
-
className?: string;
|
|
13
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
14
|
-
id: string;
|
|
15
|
-
/** Adds 'disabled' property to the button. */
|
|
16
|
-
isDisabled?: boolean;
|
|
17
|
-
/** Trigger the Button's action through the `mouseDown` event handler instead
|
|
18
|
-
* of `onClick`. `false` by default. */
|
|
19
|
-
mouseDown?: boolean;
|
|
20
|
-
/** The action to perform on the `<button>`'s onClick function. */
|
|
21
|
-
onClick?: (event: React.MouseEvent | React.KeyboardEvent) => void;
|
|
22
|
-
/** Visibly hidden text that will only be read by screenreaders. */
|
|
23
|
-
screenreaderOnlyText?: string;
|
|
24
|
-
/** The size of the `Button`. */
|
|
25
|
-
size?: ButtonSizes;
|
|
26
|
-
/** The HTML button type attribute. */
|
|
27
|
-
type?: ButtonElementType;
|
|
28
|
-
}
|
|
29
8
|
/**
|
|
30
9
|
* Renders a simple `button` element with custom variant styles.
|
|
31
10
|
*/
|
|
32
|
-
export declare const Button:
|
|
33
|
-
children?: React.ReactNode;
|
|
34
|
-
} & React.RefAttributes<HTMLButtonElement>>, {}>;
|
|
11
|
+
export declare const Button: React.FC<React.PropsWithChildren<any>>;
|
|
35
12
|
export default Button;
|
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { LayoutTypes } from "../../helpers/types";
|
|
3
2
|
export declare const buttonGroupWidthsArray: readonly ["default", "full"];
|
|
4
3
|
export type ButtonGroupWidths = typeof buttonGroupWidthsArray[number];
|
|
5
|
-
interface ButtonGroupProps {
|
|
6
|
-
/** Sets the width to "default" (for "fit-content") or "full". */
|
|
7
|
-
buttonWidth?: ButtonGroupWidths;
|
|
8
|
-
/** Additional className to use. */
|
|
9
|
-
className?: string;
|
|
10
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
11
|
-
id?: string;
|
|
12
|
-
/** Set's the disabled state to all the internal `Button` components. */
|
|
13
|
-
isDisabled?: boolean;
|
|
14
|
-
/** Renders the layout of `Button` components in a row or column. */
|
|
15
|
-
layout?: LayoutTypes;
|
|
16
|
-
}
|
|
17
4
|
/**
|
|
18
5
|
* A simple wrapper to group `Button` components together. The layout can be set
|
|
19
6
|
* to row or column and the width of internal `Button` components can be set to
|
|
20
7
|
* the parent's full width or the `Button`'s content width
|
|
21
8
|
*/
|
|
22
|
-
export declare const ButtonGroup:
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
9
|
+
export declare const ButtonGroup: React.FC<React.PropsWithChildren<any>>;
|
|
25
10
|
export default ButtonGroup;
|
|
@@ -22,14 +22,6 @@ interface CardImageProps extends ComponentImageProps {
|
|
|
22
22
|
/** Optional boolean value to control the position of the `CardImage`. */
|
|
23
23
|
isAtEnd?: boolean;
|
|
24
24
|
}
|
|
25
|
-
interface CardActionsProps extends CardBaseProps {
|
|
26
|
-
/** Optional boolean value to control visibility of border on the bottom edge
|
|
27
|
-
* of the card actions element */
|
|
28
|
-
bottomBorder?: boolean;
|
|
29
|
-
/** Optional boolean value to control visibility of border on the top edge of
|
|
30
|
-
* the card actions element */
|
|
31
|
-
topBorder?: boolean;
|
|
32
|
-
}
|
|
33
25
|
export interface CardProps extends CardBaseProps, CardWrapperProps {
|
|
34
26
|
/** Optional hex color value used to set the card background color. */
|
|
35
27
|
backgroundColor?: string;
|
|
@@ -44,12 +36,8 @@ export interface CardProps extends CardBaseProps, CardWrapperProps {
|
|
|
44
36
|
* the row layout. */
|
|
45
37
|
isAlignedRightActions?: boolean;
|
|
46
38
|
}
|
|
47
|
-
export declare const CardHeading:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
export declare const
|
|
51
|
-
export declare const CardActions: import("@chakra-ui/react").ChakraComponent<(props: React.PropsWithChildren<CardActionsProps>) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
|
|
52
|
-
export declare const Card: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<CardProps & {
|
|
53
|
-
children?: React.ReactNode;
|
|
54
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
39
|
+
export declare const CardHeading: React.FC<any>;
|
|
40
|
+
export declare const CardContent: React.FC<React.PropsWithChildren<any>>;
|
|
41
|
+
export declare const CardActions: React.FC<React.PropsWithChildren<any>>;
|
|
42
|
+
export declare const Card: React.FC<React.PropsWithChildren<any>>;
|
|
55
43
|
export default Card;
|
|
@@ -43,5 +43,5 @@ export interface CheckboxProps extends CheckboxIconProps {
|
|
|
43
43
|
/** Populates the value of the input */
|
|
44
44
|
value?: string;
|
|
45
45
|
}
|
|
46
|
-
export declare const Checkbox:
|
|
46
|
+
export declare const Checkbox: React.FC<any>;
|
|
47
47
|
export default Checkbox;
|
|
@@ -47,5 +47,5 @@ export interface CheckboxGroupProps {
|
|
|
47
47
|
* wrapping and associated text elements, but the checkbox input elements
|
|
48
48
|
* _need_ to be child `Checkbox` components from the NYPL Design System.
|
|
49
49
|
*/
|
|
50
|
-
export declare const CheckboxGroup:
|
|
50
|
+
export declare const CheckboxGroup: React.FC<any>;
|
|
51
51
|
export default CheckboxGroup;
|
|
@@ -25,7 +25,5 @@ export interface ComponentWrapperProps {
|
|
|
25
25
|
/** Offers the ability to hide the helper/invalid text. */
|
|
26
26
|
showHelperInvalidText?: boolean;
|
|
27
27
|
}
|
|
28
|
-
export declare const ComponentWrapper:
|
|
29
|
-
children?: React.ReactNode;
|
|
30
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
28
|
+
export declare const ComponentWrapper: React.FC<React.PropsWithChildren<any>>;
|
|
31
29
|
export default ComponentWrapper;
|
|
@@ -78,5 +78,5 @@ export interface DatePickerProps extends DatePickerWrapperProps {
|
|
|
78
78
|
/**
|
|
79
79
|
* Returns a single date input field or two date input fields for a date range.
|
|
80
80
|
*/
|
|
81
|
-
export declare const DatePicker:
|
|
81
|
+
export declare const DatePicker: React.FC<any>;
|
|
82
82
|
export default DatePicker;
|
|
@@ -23,7 +23,5 @@ export interface FeaturedContentProps {
|
|
|
23
23
|
/** Data object that contains the props related to the image element: alt, position, src, width. */
|
|
24
24
|
imageProps: FeaturedContentImageProps;
|
|
25
25
|
}
|
|
26
|
-
export declare const FeaturedContent:
|
|
27
|
-
children?: React.ReactNode;
|
|
28
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
26
|
+
export declare const FeaturedContent: React.FC<any>;
|
|
29
27
|
export default FeaturedContent;
|
|
@@ -1,51 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
export declare const feedbackBoxViewTypeArray: readonly ["form", "confirmation", "error"];
|
|
3
3
|
export type FeedbackBoxViewType = typeof feedbackBoxViewTypeArray[number];
|
|
4
|
-
interface FeedbackBoxProps {
|
|
5
|
-
/** Additional class name to add. */
|
|
6
|
-
className?: string;
|
|
7
|
-
/** Used to add additional information to the default confirmation message in
|
|
8
|
-
* the confirmation view. */
|
|
9
|
-
confirmationText?: string | JSX.Element;
|
|
10
|
-
/** Used to add description text above the form input fields in
|
|
11
|
-
* the initial/form view. */
|
|
12
|
-
descriptionText?: string | JSX.Element;
|
|
13
|
-
/** A data object containing key/value pairs that will be added to the form
|
|
14
|
-
* field submitted data. */
|
|
15
|
-
hiddenFields?: any;
|
|
16
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
17
|
-
id?: string;
|
|
18
|
-
/** Toggles the invalid state for the comment field. */
|
|
19
|
-
isInvalidComment?: boolean;
|
|
20
|
-
/** Toggles the invalid state for the email field. */
|
|
21
|
-
isInvalidEmail?: boolean;
|
|
22
|
-
/** Only used for internal purposes. */
|
|
23
|
-
isOpen?: boolean;
|
|
24
|
-
/** Used to add a notification above the description in the
|
|
25
|
-
* initial/form view.*/
|
|
26
|
-
notificationText?: string | JSX.Element;
|
|
27
|
-
/** Only used for internal purposes. */
|
|
28
|
-
onClose?: any;
|
|
29
|
-
/** Only used for internal purposes. */
|
|
30
|
-
onOpen?: any;
|
|
31
|
-
/** Callback function that will be invoked when the form is submitted.
|
|
32
|
-
* The returned data object contains key/value pairs including the
|
|
33
|
-
* values from the `hiddenFields` prop.
|
|
34
|
-
*/
|
|
35
|
-
onSubmit: (values: {
|
|
36
|
-
[key: string]: string;
|
|
37
|
-
}) => any;
|
|
38
|
-
/** Toggles the category radio group field. */
|
|
39
|
-
showCategoryField?: boolean;
|
|
40
|
-
/** Toggles the email input field. When set to `true`, an additional
|
|
41
|
-
* confirmation message will be rendered. */
|
|
42
|
-
showEmailField?: boolean;
|
|
43
|
-
/** Used to populate the label on the open button and the `Drawer`'s
|
|
44
|
-
* header title. */
|
|
45
|
-
title: string;
|
|
46
|
-
/** Used to specify what screen should be displayed. */
|
|
47
|
-
view?: FeedbackBoxViewType;
|
|
48
|
-
}
|
|
49
4
|
/**
|
|
50
5
|
* The `FeedbackBox` component renders a fixed-positioned button on the bottom
|
|
51
6
|
* right corner of a page that opens a Chakra `Drawer` popup component. Inside
|
|
@@ -54,11 +9,6 @@ interface FeedbackBoxProps {
|
|
|
54
9
|
* submitted data; that feature is the responsibility of the consuming
|
|
55
10
|
* application.
|
|
56
11
|
*/
|
|
57
|
-
export declare const FeedbackBox:
|
|
58
|
-
export declare function useFeedbackBox():
|
|
59
|
-
isOpen: boolean;
|
|
60
|
-
onClose: () => void;
|
|
61
|
-
onOpen: () => void;
|
|
62
|
-
FeedbackBox: import("@chakra-ui/react").ChakraComponent<(props: any) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
|
|
63
|
-
};
|
|
12
|
+
export declare const FeedbackBox: React.FC<any>;
|
|
13
|
+
export declare function useFeedbackBox(): any;
|
|
64
14
|
export default FeedbackBox;
|
|
@@ -1,24 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
interface FieldsetProps {
|
|
3
|
-
/** Additional class name to add. */
|
|
4
|
-
className?: string;
|
|
5
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
6
|
-
id: string;
|
|
7
|
-
/** Flag to show or hide the text in the `legend` element. False by default. */
|
|
8
|
-
isLegendHidden?: boolean;
|
|
9
|
-
/** Flag to render "Required" in the `legend`. True by default. */
|
|
10
|
-
isRequired?: boolean;
|
|
11
|
-
/** Text to display in the `legend` element. */
|
|
12
|
-
legendText?: string;
|
|
13
|
-
/** Whether or not to display the "(Required)" text in the `legend` text.
|
|
14
|
-
* True by default. */
|
|
15
|
-
showRequiredLabel?: boolean;
|
|
16
|
-
}
|
|
17
2
|
/**
|
|
18
3
|
* A wrapper component that renders a `fieldset` element along with a `legend`
|
|
19
4
|
* element as its first child. Commonly used to wrap form components.
|
|
20
5
|
*/
|
|
21
|
-
export declare const Fieldset:
|
|
22
|
-
children?: React.ReactNode;
|
|
23
|
-
} & React.RefAttributes<HTMLDivElement & HTMLFieldSetElement>>, {}>;
|
|
6
|
+
export declare const Fieldset: React.FC<React.PropsWithChildren<any>>;
|
|
24
7
|
export default Fieldset;
|
|
@@ -21,11 +21,9 @@ export interface FormProps extends FormBaseProps {
|
|
|
21
21
|
onSubmit?: (e: React.FormEvent<any>) => void;
|
|
22
22
|
}
|
|
23
23
|
/** FormRow child-component */
|
|
24
|
-
export declare const FormRow:
|
|
24
|
+
export declare const FormRow: React.FC<any>;
|
|
25
25
|
/** FormField child-component */
|
|
26
|
-
export declare const FormField:
|
|
26
|
+
export declare const FormField: React.FC<any>;
|
|
27
27
|
/** Main Form component */
|
|
28
|
-
export declare const Form:
|
|
29
|
-
children?: React.ReactNode;
|
|
30
|
-
} & React.RefAttributes<HTMLDivElement & HTMLFormElement>>, {}>;
|
|
28
|
+
export declare const Form: React.FC<any>;
|
|
31
29
|
export default Form;
|
|
@@ -14,7 +14,5 @@ export interface SimpleGridProps {
|
|
|
14
14
|
/** ID that other components can cross reference for accessibility purposes */
|
|
15
15
|
id?: string;
|
|
16
16
|
}
|
|
17
|
-
export declare const SimpleGrid:
|
|
18
|
-
children?: React.ReactNode;
|
|
19
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
17
|
+
export declare const SimpleGrid: React.FC<any>;
|
|
20
18
|
export default SimpleGrid;
|
|
@@ -36,7 +36,5 @@ export interface HeadingProps {
|
|
|
36
36
|
/** Optional className for the URL when the `url` prop is passed */
|
|
37
37
|
urlClass?: string;
|
|
38
38
|
}
|
|
39
|
-
export declare const Heading:
|
|
40
|
-
children?: React.ReactNode;
|
|
41
|
-
} & React.RefAttributes<HTMLHeadingElement>>, {}>;
|
|
39
|
+
export declare const Heading: React.FC<any>;
|
|
42
40
|
export default Heading;
|
|
@@ -1,34 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export type AriaLiveValues = "assertive" | "off" | "polite" | undefined;
|
|
3
3
|
export type HelperErrorTextType = string | JSX.Element;
|
|
4
|
-
interface HelperErrorTextProps {
|
|
5
|
-
/** Aria attribute. When true, assistive technologies will read the entire
|
|
6
|
-
* DOM element. When false, only changes (additionals or removals) will be
|
|
7
|
-
* read. True by default. */
|
|
8
|
-
ariaAtomic?: boolean;
|
|
9
|
-
/** Aria attribute used to handle live updates for the helper and error text.
|
|
10
|
-
* This indicates the priority of the text and when it should be presented to
|
|
11
|
-
* users using screen readers; "off" indicates that the content should not be
|
|
12
|
-
* presented, "polite" that it will be announced at the next available time
|
|
13
|
-
* slot, and "assertive" that it should be announced immediately. This is set
|
|
14
|
-
* to "polite" by default. */
|
|
15
|
-
ariaLive?: AriaLiveValues;
|
|
16
|
-
/** Additional className to add. */
|
|
17
|
-
className?: string;
|
|
18
|
-
/** Unique ID for accessibility purposes. */
|
|
19
|
-
id?: string;
|
|
20
|
-
/** Toggles between helper and invalid styling. */
|
|
21
|
-
isInvalid?: boolean;
|
|
22
|
-
/** Offers the ability to render or not render the content passed in
|
|
23
|
-
* the `text` prop; `true` by default. */
|
|
24
|
-
isRenderedText?: boolean;
|
|
25
|
-
/** The text to display. */
|
|
26
|
-
text: HelperErrorTextType;
|
|
27
|
-
}
|
|
28
4
|
/**
|
|
29
5
|
* Component that always renders a div even if the text content is not passed.
|
|
30
6
|
* This pattern guarantees accessibility guidelines are met if the text content
|
|
31
7
|
* is dynamically updated by the app or component that implements it.
|
|
32
8
|
*/
|
|
33
|
-
export declare const HelperErrorText:
|
|
9
|
+
export declare const HelperErrorText: React.FC<any>;
|
|
34
10
|
export default HelperErrorText;
|
|
@@ -43,7 +43,5 @@ export interface HeroProps {
|
|
|
43
43
|
* underneath the heading element. */
|
|
44
44
|
subHeaderText?: string | JSX.Element;
|
|
45
45
|
}
|
|
46
|
-
export declare const Hero:
|
|
47
|
-
children?: React.ReactNode;
|
|
48
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
46
|
+
export declare const Hero: React.FC<any>;
|
|
49
47
|
export default Hero;
|
|
@@ -7,5 +7,5 @@ export interface HorizontalRuleProps {
|
|
|
7
7
|
/** ClassName you can add in addition to `horizontal-rule` */
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const HorizontalRule:
|
|
10
|
+
export declare const HorizontalRule: React.FC<any>;
|
|
11
11
|
export default HorizontalRule;
|
|
@@ -35,7 +35,5 @@ export interface IconProps {
|
|
|
35
35
|
/**
|
|
36
36
|
* Renders SVG-based icons.
|
|
37
37
|
*/
|
|
38
|
-
export declare const Icon:
|
|
39
|
-
children?: React.ReactNode;
|
|
40
|
-
} & React.RefAttributes<HTMLDivElement & SVGSVGElement>>, {}>;
|
|
38
|
+
export declare const Icon: React.FC<any>;
|
|
41
39
|
export default Icon;
|
|
@@ -64,5 +64,5 @@ export interface ImageProps extends ImageWrapperProps, ImgHTMLAttributes<HTMLIma
|
|
|
64
64
|
/** The src attribute is required, and contains the path to the image you want to embed. */
|
|
65
65
|
src?: string;
|
|
66
66
|
}
|
|
67
|
-
export declare const Image:
|
|
67
|
+
export declare const Image: React.FC<any>;
|
|
68
68
|
export default Image;
|
|
@@ -1,25 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
interface LabelProps {
|
|
3
|
-
/** Additional CSS class name to render in the `label` element. */
|
|
4
|
-
className?: string;
|
|
5
|
-
/** The id of the html element that this `Label` is describing. */
|
|
6
|
-
htmlFor: string;
|
|
7
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
8
|
-
id?: string;
|
|
9
|
-
/** Controls whether the label should be inline with the input it goes with.
|
|
10
|
-
* This prop should only be used internally. */
|
|
11
|
-
isInlined?: boolean;
|
|
12
|
-
/** Controls whether the "(Required)" text should be displayed alongside the
|
|
13
|
-
* label's text. False by default. */
|
|
14
|
-
isRequired?: boolean;
|
|
15
|
-
/** Allows the '(Required)' text to be changed for language purposes
|
|
16
|
-
* Note: Parenthesis will be added automatically by the component */
|
|
17
|
-
requiredLabelText?: string;
|
|
18
|
-
}
|
|
19
2
|
/**
|
|
20
3
|
* A label for form inputs. It should never be used alone.
|
|
21
4
|
*/
|
|
22
|
-
export declare const Label:
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
} & React.RefAttributes<HTMLDivElement & HTMLLabelElement>>, {}>;
|
|
5
|
+
export declare const Label: React.FC<any>;
|
|
25
6
|
export default Label;
|
|
@@ -6,6 +6,8 @@ export interface LinkProps {
|
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
/** Additional class name to render in the `Link` component. */
|
|
8
8
|
className?: string;
|
|
9
|
+
/** Used to include or remove visited state styles. Default is true. */
|
|
10
|
+
hasVisitedState?: boolean;
|
|
9
11
|
/** The `href` attribute for the anchor element. */
|
|
10
12
|
href?: string;
|
|
11
13
|
/** ID used for accessibility purposes. */
|
|
@@ -28,5 +30,5 @@ export interface LinkProps {
|
|
|
28
30
|
* A component that uses an `href` prop or a child anchor element, to create
|
|
29
31
|
* an anchor element with added styling and conventions.
|
|
30
32
|
*/
|
|
31
|
-
export declare const Link:
|
|
33
|
+
export declare const Link: React.FC<any>;
|
|
32
34
|
export default Link;
|
|
@@ -32,9 +32,7 @@ export interface ListProps {
|
|
|
32
32
|
* and `dd` elements based on the `type` prop. Note that the `title` prop will
|
|
33
33
|
* only display for the `Description` list type.
|
|
34
34
|
*/
|
|
35
|
-
export declare const List:
|
|
36
|
-
children?: React.ReactNode;
|
|
37
|
-
} & React.RefAttributes<HTMLDivElement & HTMLUListElement & HTMLOListElement>>, {}>;
|
|
35
|
+
export declare const List: React.FC<any>;
|
|
38
36
|
/**
|
|
39
37
|
* Checks for `li` elements and consoles a warning if the
|
|
40
38
|
* children are different HTML elements.
|
|
@@ -26,7 +26,5 @@ export interface LogoProps {
|
|
|
26
26
|
* The `Logo` component renders SVG-based logos and color variants that are
|
|
27
27
|
* commonly used by the New York Public Library.
|
|
28
28
|
*/
|
|
29
|
-
export declare const Logo:
|
|
30
|
-
children?: React.ReactNode;
|
|
31
|
-
} & React.RefAttributes<HTMLDivElement & SVGSVGElement>>, {}>;
|
|
29
|
+
export declare const Logo: React.FC<any>;
|
|
32
30
|
export default Logo;
|
|
@@ -19,17 +19,11 @@ export interface ModalProps {
|
|
|
19
19
|
* internal `Modal` component. Note that props to update the internal `Modal`
|
|
20
20
|
* component are passed through to the `modalProps` prop.
|
|
21
21
|
*/
|
|
22
|
-
export declare const ModalTrigger:
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
} & React.RefAttributes<HTMLButtonElement>>, {}>;
|
|
22
|
+
export declare const ModalTrigger: React.FC<any>;
|
|
25
23
|
/**
|
|
26
24
|
* This hook function can be used to render the `Modal` component with a custom
|
|
27
25
|
* open button(s) and optional custom close button(s). You must render your own
|
|
28
26
|
* button and pass the appropriate `onOpen` and ` handler for the modal to open.
|
|
29
27
|
*/
|
|
30
|
-
export declare function useModal():
|
|
31
|
-
onClose: () => void;
|
|
32
|
-
onOpen: () => void;
|
|
33
|
-
Modal: import("@chakra-ui/react").ChakraComponent<({ bodyContent, closeButtonLabel, headingText, id, ...rest }: React.PropsWithChildren<BaseModalProps>) => import("@emotion/react/jsx-runtime").JSX.Element, {}>;
|
|
34
|
-
};
|
|
28
|
+
export declare function useModal(): any;
|
|
35
29
|
export {};
|
|
@@ -1,46 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { SectionTypes } from "../../helpers/types";
|
|
3
|
-
interface NewsletterSignupProps {
|
|
4
|
-
/** Additional class name to add. */
|
|
5
|
-
className?: string;
|
|
6
|
-
/** Text displayed next to the confirmation icon after a successful email submission */
|
|
7
|
-
confirmationHeading: string;
|
|
8
|
-
/** Detail text for the confirmation view */
|
|
9
|
-
confirmationText: string;
|
|
10
|
-
/** Appears below the title to provide details about the newsletter. Accepts a string or an element. */
|
|
11
|
-
descriptionText?: string | JSX.Element;
|
|
12
|
-
/** Text displayed next to the error icon in case of an error in the email submission process*/
|
|
13
|
-
errorHeading?: string;
|
|
14
|
-
/** Appears below the title to provide details about next steps in case of an error. Accepts a string or an element. */
|
|
15
|
-
errorText?: string | JSX.Element;
|
|
16
|
-
/** Appears below the input field's example text to provide any additional instructions. Accepts a string or
|
|
17
|
-
* an element. */
|
|
18
|
-
formHelperText?: string | JSX.Element;
|
|
19
|
-
/** ID that other components can cross-reference for accessibility purposes */
|
|
20
|
-
id?: string;
|
|
21
|
-
/** Toggles the invalid state for the email field. */
|
|
22
|
-
isInvalidEmail?: boolean;
|
|
23
|
-
/** Value to determine the section color highlight. The default is set to "blogs" as it uses the
|
|
24
|
-
* "ui.border.deafult" color.
|
|
25
|
-
*/
|
|
26
|
-
newsletterSignupType?: SectionTypes;
|
|
27
|
-
/** A handler function that will be called when the form is submitted. */
|
|
28
|
-
onSubmit: (event: React.FormEvent<any>) => void;
|
|
29
|
-
/** A handler function that will be called when the text input changes. */
|
|
30
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
31
|
-
/** Link to the relevant privacy policy page. */
|
|
32
|
-
privacyPolicyLink?: string;
|
|
33
|
-
/** Used to populate the title of the Component*/
|
|
34
|
-
title?: JSX.Element;
|
|
35
|
-
/** The value of the email text input field. */
|
|
36
|
-
valueEmail?: string;
|
|
37
|
-
/** Used to specify what is displayed in the component form/feedback area. */
|
|
38
|
-
view?: NewsletterSignupViewType;
|
|
39
|
-
}
|
|
40
2
|
export type NewsletterSignupViewType = "form" | "submitting" | "confirmation" | "error";
|
|
41
3
|
/**
|
|
42
4
|
* The NewsletterSignup component provides a way for patrons to register for an
|
|
43
5
|
* email-based newsletter distribution list.
|
|
44
6
|
*/
|
|
45
|
-
export declare const NewsletterSignup:
|
|
7
|
+
export declare const NewsletterSignup: React.FC<any>;
|
|
46
8
|
export default NewsletterSignup;
|
|
@@ -18,13 +18,11 @@ interface BaseProps {
|
|
|
18
18
|
/** Prop to display the `Notification` icon. Defaults to `true`. */
|
|
19
19
|
showIcon?: boolean;
|
|
20
20
|
}
|
|
21
|
-
type NotificationHeadingProps = Omit<BasePropsWithoutAlignText, "notificationHeading" | "showIcon">;
|
|
22
|
-
type NotificationContentProps = Omit<BaseProps, "icon">;
|
|
23
21
|
type BasePropsWithoutAlignText = Omit<BaseProps, "alignText">;
|
|
24
22
|
export interface NotificationProps extends BasePropsWithoutAlignText {
|
|
25
23
|
/** Label used to describe the `Notification`'s aside HTML element. */
|
|
26
24
|
ariaLabel?: string;
|
|
27
|
-
/** Additional `className` to add.
|
|
25
|
+
/** Additional `className` to add. */
|
|
28
26
|
className?: string;
|
|
29
27
|
/** Optional prop to control whether a `Notification` can be dismissed
|
|
30
28
|
* (closed) by a user. */
|
|
@@ -39,14 +37,14 @@ export interface NotificationProps extends BasePropsWithoutAlignText {
|
|
|
39
37
|
/**
|
|
40
38
|
* NotificationHeading child-component.
|
|
41
39
|
*/
|
|
42
|
-
export declare const NotificationHeading:
|
|
40
|
+
export declare const NotificationHeading: React.FC<any>;
|
|
43
41
|
/**
|
|
44
42
|
* NotificationContent child-component.
|
|
45
43
|
*/
|
|
46
|
-
export declare const NotificationContent:
|
|
44
|
+
export declare const NotificationContent: React.FC<any>;
|
|
47
45
|
/**
|
|
48
46
|
* Component used to present users with three different levels of notifications:
|
|
49
47
|
* standard, announcement, and warning.
|
|
50
48
|
*/
|
|
51
|
-
export declare const Notification:
|
|
49
|
+
export declare const Notification: React.FC<any>;
|
|
52
50
|
export default Notification;
|
|
@@ -23,5 +23,5 @@ export interface PaginationProps {
|
|
|
23
23
|
/**
|
|
24
24
|
* A component that provides a navigational list of page items.
|
|
25
25
|
*/
|
|
26
|
-
export declare const Pagination:
|
|
26
|
+
export declare const Pagination: React.FC<any>;
|
|
27
27
|
export default Pagination;
|
|
@@ -28,5 +28,5 @@ export interface ProgressIndicatorProps {
|
|
|
28
28
|
* time to complete or consists of multiple steps. Examples include downloading,
|
|
29
29
|
* uploading, or processing.
|
|
30
30
|
*/
|
|
31
|
-
export declare const ProgressIndicator:
|
|
31
|
+
export declare const ProgressIndicator: React.FC<any>;
|
|
32
32
|
export default ProgressIndicator;
|
|
@@ -39,5 +39,5 @@ export interface RadioProps {
|
|
|
39
39
|
/** Populates the value of the input. */
|
|
40
40
|
value?: string;
|
|
41
41
|
}
|
|
42
|
-
export declare const Radio:
|
|
42
|
+
export declare const Radio: React.FC<any>;
|
|
43
43
|
export default Radio;
|
|
@@ -45,7 +45,5 @@ export interface RadioGroupProps {
|
|
|
45
45
|
* for this form group element and is not needed for individual DS `Radio`
|
|
46
46
|
* components when `RadioGroup` is used.
|
|
47
47
|
*/
|
|
48
|
-
export declare const RadioGroup:
|
|
49
|
-
children?: React.ReactNode;
|
|
50
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
48
|
+
export declare const RadioGroup: React.FC<any>;
|
|
51
49
|
export default RadioGroup;
|
|
@@ -54,5 +54,5 @@ export interface SearchBarProps {
|
|
|
54
54
|
* Renders a wrapper `form` element to be used with `Select` (optional),
|
|
55
55
|
* `Input`, and `Button` components together.
|
|
56
56
|
*/
|
|
57
|
-
export declare const SearchBar:
|
|
57
|
+
export declare const SearchBar: React.FC<any>;
|
|
58
58
|
export default SearchBar;
|
|
@@ -53,7 +53,5 @@ export interface SelectProps {
|
|
|
53
53
|
* Component that renders Chakra's `Select` component along with an accessible
|
|
54
54
|
* `Label` and optional `HelperErrorText` component.
|
|
55
55
|
*/
|
|
56
|
-
export declare const Select:
|
|
57
|
-
children?: React.ReactNode;
|
|
58
|
-
} & React.RefAttributes<HTMLSelectElement>>, {}>;
|
|
56
|
+
export declare const Select: React.FC<any>;
|
|
59
57
|
export default Select;
|
|
@@ -36,7 +36,5 @@ export interface SkeletonLoaderProps {
|
|
|
36
36
|
* The `SkeletonLoader` component renders a placeholder to be used while
|
|
37
37
|
* dynamic content is loading.
|
|
38
38
|
*/
|
|
39
|
-
export declare const SkeletonLoader:
|
|
40
|
-
children?: React.ReactNode;
|
|
41
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
39
|
+
export declare const SkeletonLoader: React.FC<any>;
|
|
42
40
|
export default SkeletonLoader;
|