@nypl/design-system-react-components 4.0.0-alpha-rc2 → 4.0.0-alpha-rc4
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 +53 -53
- package/dist/design-system-react-components.js +12891 -12799
- package/dist/src/components/Accordion/Accordion.d.ts +1 -3
- package/dist/src/components/AlphabetFilter/AlphabetFilter.d.ts +0 -2
- package/dist/src/components/AudioPlayer/AudioPlayer.d.ts +2 -9
- package/dist/src/components/Banner/Banner.d.ts +0 -2
- package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +2 -4
- package/dist/src/components/Button/Button.d.ts +3 -5
- package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +0 -2
- package/dist/src/components/ButtonGroup/ButtonGroupContext.d.ts +3 -0
- package/dist/src/components/Card/Card.d.ts +2 -4
- package/dist/src/components/Checkbox/Checkbox.d.ts +0 -2
- package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +0 -2
- package/dist/src/components/CheckboxGroup/CheckboxGroupContext.d.ts +10 -0
- package/dist/src/components/ComponentWrapper/ComponentWrapper.d.ts +0 -2
- package/dist/src/components/DatePicker/DatePicker.d.ts +3 -5
- package/dist/src/components/FeaturedContent/FeaturedContent.d.ts +0 -2
- package/dist/src/components/FeedbackBox/FeedbackBox.d.ts +0 -2
- package/dist/src/components/Fieldset/Fieldset.d.ts +0 -2
- package/dist/src/components/FilterBarInline/FilterBarInline.d.ts +0 -2
- package/dist/src/components/FilterBarPopup/FilterBarPopup.d.ts +0 -2
- package/dist/src/components/Form/Form.d.ts +2 -4
- package/dist/src/components/Grid/SimpleGrid.d.ts +0 -2
- package/dist/src/components/Heading/Heading.d.ts +0 -5
- package/dist/src/components/HelperErrorText/HelperErrorText.d.ts +0 -2
- package/dist/src/components/Hero/Hero.d.ts +3 -5
- package/dist/src/components/HorizontalRule/HorizontalRule.d.ts +0 -2
- package/dist/src/components/Icons/Icon.d.ts +1 -3
- package/dist/src/components/Icons/IconSvgs.d.ts +3 -0
- package/dist/src/components/Icons/iconVariables.d.ts +1 -1
- package/dist/src/components/Image/Image.d.ts +0 -4
- package/dist/src/components/Label/Label.d.ts +0 -2
- package/dist/src/components/Link/Link.d.ts +0 -2
- package/dist/src/components/List/List.d.ts +0 -11
- package/dist/src/components/Logo/Logo.d.ts +1 -3
- package/dist/src/components/Menu/Menu.d.ts +0 -2
- package/dist/src/components/Modal/Modal.d.ts +1 -5
- package/dist/src/components/MultiSelect/MultiSelect.d.ts +0 -2
- package/dist/src/components/MultiSelect/MultiSelectItemsCountButton.d.ts +2 -5
- package/dist/src/components/MultiSelectGroup/MultiSelectGroup.d.ts +0 -2
- package/dist/src/components/NewsletterSignup/NewsletterSignup.d.ts +0 -2
- package/dist/src/components/Notification/Notification.d.ts +2 -4
- package/dist/src/components/Pagination/Pagination.d.ts +0 -2
- package/dist/src/components/ProgressIndicator/ProgressIndicator.d.ts +0 -2
- package/dist/src/components/Radio/Radio.d.ts +1 -4
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +0 -2
- package/dist/src/components/RadioGroup/RadioGroupContext.d.ts +10 -0
- package/dist/src/components/SearchBar/SearchBar.d.ts +0 -2
- package/dist/src/components/Select/Select.d.ts +0 -2
- package/dist/src/components/SkeletonLoader/SkeletonLoader.d.ts +0 -2
- package/dist/src/components/SkipNavigation/SkipNavigation.d.ts +0 -2
- package/dist/src/components/Slider/Slider.d.ts +0 -2
- package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +0 -2
- package/dist/src/components/StatusBadge/StatusBadge.d.ts +0 -2
- package/dist/src/components/StructuredContent/StructuredContent.d.ts +0 -2
- package/dist/src/components/StyledList/StyledList.d.ts +0 -2
- package/dist/src/components/SubNav/SubNav.d.ts +0 -5
- package/dist/src/components/Tabs/Tabs.d.ts +0 -2
- package/dist/src/components/TagSet/TagSet.d.ts +0 -2
- 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 +0 -4
- package/dist/src/components/TextInput/TextInput.d.ts +0 -2
- package/dist/src/components/Toggle/Toggle.d.ts +0 -2
- package/dist/src/components/Tooltip/Tooltip.d.ts +0 -2
- package/dist/src/components/VideoPlayer/VideoPlayer.d.ts +0 -2
- package/dist/src/hooks/useSafeId.d.ts +6 -0
- package/dist/src/index.d.ts +1 -1
- package/dist/src/theme/components/button.d.ts +9 -0
- package/dist/src/theme/components/datePicker.d.ts +4 -0
- package/dist/src/theme/components/fieldset.d.ts +1 -1
- package/dist/src/theme/components/global.d.ts +1 -5
- package/dist/src/theme/components/heading.d.ts +1 -69
- package/dist/src/theme/components/helperErrorText.d.ts +5 -14
- package/dist/src/theme/components/horizontalRule.d.ts +0 -2
- 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/radioGroup.d.ts +1 -1
- package/dist/src/theme/components/structuredContent.d.ts +0 -63
- package/dist/src/theme/components/styledList.d.ts +0 -1
- package/dist/src/theme/components/template.d.ts +86 -26
- package/dist/src/theme/components/text.d.ts +1 -3
- package/dist/src/theme/foundations/global.d.ts +0 -12
- package/dist/src/theme/foundations/spacing.d.ts +16 -0
- package/dist/src/utils/utils.d.ts +4 -2
- package/dist/styles.css +1 -1
- 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/templateRegionsFooter.png +0 -0
- package/dist/template/templateRegionsHeader.png +0 -0
- package/dist/template/templateRegionsMain.png +0 -0
- package/dist/template/templateSectionBreakout.png +0 -0
- package/dist/template/templateSectionContent.png +0 -0
- package/dist/template/templateSectionFull.png +0 -0
- package/dist/template/templateSectionSidebar.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/package.json +9 -13
- 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/templateSidebarNone.png +0 -0
- package/dist/template/templateSidebarRight.png +0 -0
- package/dist/template/templateTop.png +0 -0
|
@@ -7,8 +7,6 @@ export type ProgressIndicatorSizes = typeof progressIndicatorSizesArray[number];
|
|
|
7
7
|
export type ProgressIndicatorTypes = typeof progressIndicatorTypesArray[number];
|
|
8
8
|
export type ProgressIndicatorLabelPlacements = typeof progressIndicatorLabelPlacementsArray[number];
|
|
9
9
|
interface BaseProgressIndicatorProps extends BoxProps {
|
|
10
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
11
|
-
id: string;
|
|
12
10
|
/** Whether the `ProgressIndicator` should be linear or circular. */
|
|
13
11
|
indicatorType?: ProgressIndicatorTypes;
|
|
14
12
|
/** Whether the progress animation should display because the `value` prop is
|
|
@@ -4,11 +4,8 @@ import { HelperErrorTextType } from "../HelperErrorText/HelperErrorText";
|
|
|
4
4
|
export interface RadioProps extends Pick<BoxProps, keyof ChakraProps>, Omit<InputHTMLAttributes<HTMLInputElement>, "color" | "height" | "width"> {
|
|
5
5
|
/** Optional string to populate the HelperErrorText for the standard state. */
|
|
6
6
|
helperText?: HelperErrorTextType;
|
|
7
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
8
|
-
id: string;
|
|
9
7
|
/** Optional string to populate the HelperErrorText for the error state
|
|
10
|
-
* when `isInvalid` is true.
|
|
11
|
-
*/
|
|
8
|
+
* when `isInvalid` is true. */
|
|
12
9
|
invalidText?: HelperErrorTextType;
|
|
13
10
|
/** When using the Radio as a "controlled" form element, you can specify the
|
|
14
11
|
* `Radio`'s checked state using this prop. You must also pass an onChange prop.
|
|
@@ -7,8 +7,6 @@ export interface RadioGroupProps extends Omit<BoxProps, "onChange"> {
|
|
|
7
7
|
defaultValue?: string;
|
|
8
8
|
/** Optional string to populate the HelperErrorText for standard state */
|
|
9
9
|
helperText?: HelperErrorTextType;
|
|
10
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
11
|
-
id: string;
|
|
12
10
|
/** Optional string to populate the HelperErrorText for error state */
|
|
13
11
|
invalidText?: HelperErrorTextType;
|
|
14
12
|
/** Adds the 'disabled' prop to the input when true. */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface RadioGroupContextValue {
|
|
3
|
+
isDisabled: boolean;
|
|
4
|
+
isInvalid: boolean;
|
|
5
|
+
isRequired: boolean;
|
|
6
|
+
name: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const RadioGroupContext: import("react").Context<RadioGroupContextValue>;
|
|
9
|
+
export declare const useRadioGroup: () => RadioGroupContextValue;
|
|
10
|
+
export {};
|
|
@@ -22,8 +22,6 @@ export interface SearchBarProps extends Pick<BoxProps, keyof ChakraProps>, Omit<
|
|
|
22
22
|
headingText?: string | JSX.Element;
|
|
23
23
|
/** The text to display below the form in a `HelperErrorText` component. */
|
|
24
24
|
helperText?: HelperErrorTextType;
|
|
25
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
26
|
-
id: string;
|
|
27
25
|
/** Optional string to populate the `HelperErrorText` for the error state
|
|
28
26
|
* when `isInvalid` is true. */
|
|
29
27
|
invalidText?: HelperErrorTextType;
|
|
@@ -10,8 +10,6 @@ export interface SelectProps extends Pick<BoxProps, keyof ChakraProps>, Omit<Rea
|
|
|
10
10
|
defaultValue?: string;
|
|
11
11
|
/** Optional string to populate the `HelperErrorText` for the standard state. */
|
|
12
12
|
helperText?: HelperErrorTextType;
|
|
13
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
14
|
-
id: string;
|
|
15
13
|
/** Optional string to populate the `HelperErrorText` for the error state
|
|
16
14
|
* when `isInvalid` is true. */
|
|
17
15
|
invalidText?: HelperErrorTextType;
|
|
@@ -10,8 +10,6 @@ export interface SkeletonLoaderProps extends BoxProps {
|
|
|
10
10
|
/** Optional numeric value to control the number of lines for heading
|
|
11
11
|
* placeholder; default value is `1`. */
|
|
12
12
|
headingSize?: number;
|
|
13
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
14
|
-
id?: string;
|
|
15
13
|
/** Optional value to control the aspect ratio of the image placeholder;
|
|
16
14
|
* default value is `"square"`. */
|
|
17
15
|
imageAspectRatio?: SkeletonLoaderImageRatios;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { BoxProps, ChakraComponent } from "@chakra-ui/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
export interface SkipNavigationProps extends BoxProps {
|
|
4
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
5
|
-
id?: string;
|
|
6
4
|
/** The anchor target for the main skip link. The default is "#mainContent". */
|
|
7
5
|
target?: string;
|
|
8
6
|
}
|
|
@@ -7,8 +7,6 @@ export interface SliderProps extends Pick<BoxProps, keyof ChakraProps>, Omit<Inp
|
|
|
7
7
|
defaultValue?: number | number[];
|
|
8
8
|
/** Optional string to populate the HelperErrorText for standard state */
|
|
9
9
|
helperText?: HelperErrorTextType;
|
|
10
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
11
|
-
id: string;
|
|
12
10
|
/** Optional string to populate the `HelperErrorText` for the error state
|
|
13
11
|
* when `isInvalid` is true. */
|
|
14
12
|
invalidText?: HelperErrorTextType;
|
|
@@ -19,8 +19,6 @@ export interface SocialMediaLinkDataProps {
|
|
|
19
19
|
interface BaseSocialMediaLinksProps extends BoxProps {
|
|
20
20
|
/** Any of three optional values that will change the color of the svg and label text (if any). */
|
|
21
21
|
color?: ColorType;
|
|
22
|
-
/** ID that other components can cross-reference for accessibility purposes. */
|
|
23
|
-
id?: string;
|
|
24
22
|
/** Optional desktop layout. Smaller viewports are always in a column if there are labels and
|
|
25
23
|
* in a row if there are no labels. */
|
|
26
24
|
layout?: LayoutTypes;
|
|
@@ -4,8 +4,6 @@ import { messageVariantsArray } from "../../theme/sharedTypes";
|
|
|
4
4
|
export declare const statusBadgeFontSizeArray: readonly ["desktop.body.body1", "desktop.body.body2", "desktop.caption"];
|
|
5
5
|
export type StatusBadgeVariants = typeof messageVariantsArray[number];
|
|
6
6
|
export interface StatusBadgeProps extends BoxProps {
|
|
7
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
8
|
-
id?: string;
|
|
9
7
|
/** Semantic type of the status badge. */
|
|
10
8
|
variant?: StatusBadgeVariants;
|
|
11
9
|
}
|
|
@@ -14,8 +14,6 @@ export interface StructuredContentProps extends BoxProps {
|
|
|
14
14
|
* a DS Heading component that can be passed in.
|
|
15
15
|
*/
|
|
16
16
|
headingText?: string | JSX.Element;
|
|
17
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
18
|
-
id?: string;
|
|
19
17
|
/** Object used to create and render the `Image` component. */
|
|
20
18
|
imageProps?: StructuredContentImageProps;
|
|
21
19
|
/** Required value to set the text for the body content. */
|
|
@@ -3,8 +3,6 @@ import React from "react";
|
|
|
3
3
|
export declare const textSizesArray: readonly ["default", "body1", "body2", "caption"];
|
|
4
4
|
export type StyledListTextSizes = typeof textSizesArray[number];
|
|
5
5
|
export interface StyledListProps extends Omit<BoxProps, "style"> {
|
|
6
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
7
|
-
id?: string;
|
|
8
6
|
/** Data to render if `li` children elements are not passed. It must be an
|
|
9
7
|
* array of strings or JSX elements. */
|
|
10
8
|
listItems?: (string | JSX.Element)[];
|
|
@@ -14,11 +14,6 @@ export interface SubNavProps extends BoxProps {
|
|
|
14
14
|
* Custom color for SubNavLink, SubNavButton, and icons.
|
|
15
15
|
*/
|
|
16
16
|
highlightColor?: highlightColors;
|
|
17
|
-
/**
|
|
18
|
-
* Optional unique ID for accessibility, allowing other components
|
|
19
|
-
* to reference this element.
|
|
20
|
-
*/
|
|
21
|
-
id?: string;
|
|
22
17
|
/**
|
|
23
18
|
* Primary actions displayed on the left side of the SubNav.
|
|
24
19
|
* Use SubNavButton and SubNavLink components, which mirror
|
|
@@ -7,8 +7,6 @@ export interface TabsDataProps {
|
|
|
7
7
|
export interface TabsProps extends Omit<BoxProps, "onChange"> {
|
|
8
8
|
/** The index of the tab to display on the initial render. */
|
|
9
9
|
defaultIndex?: number;
|
|
10
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
11
|
-
id?: string;
|
|
12
10
|
/** The callback function invoked after every tab change event. The argument passed to the callback is the index of the tab just selected. */
|
|
13
11
|
onChange?: (index: number) => any;
|
|
14
12
|
/** Array of data to display */
|
|
@@ -3,8 +3,6 @@ import React from "react";
|
|
|
3
3
|
import { TagSetExploreProps } from "./TagSetExplore";
|
|
4
4
|
import { TagSetFilterProps } from "./TagSetFilter";
|
|
5
5
|
export interface BaseTagSetProps extends BoxProps {
|
|
6
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
7
|
-
id?: string;
|
|
8
6
|
}
|
|
9
7
|
export type TagSetTypeProps = TagSetFilterProps | TagSetExploreProps;
|
|
10
8
|
export type TagSetProps = BaseTagSetProps & TagSetTypeProps;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BoxProps } from "@chakra-ui/react";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import { IconNames } from "../Icons/Icon";
|
|
3
4
|
export interface TagSetExploreDataProps {
|
|
@@ -8,7 +9,7 @@ export interface TagSetExploreDataProps {
|
|
|
8
9
|
/** The content to display; should be a link-type component. */
|
|
9
10
|
label: JSX.Element;
|
|
10
11
|
}
|
|
11
|
-
export interface TagSetExploreProps {
|
|
12
|
+
export interface TagSetExploreProps extends BoxProps {
|
|
12
13
|
/** Whether the tags should be removable. This prop is not used in the
|
|
13
14
|
* "explore" variant. */
|
|
14
15
|
isDismissible?: never;
|
|
@@ -21,7 +22,7 @@ export interface TagSetExploreProps {
|
|
|
21
22
|
/** The array of data to display as tags. */
|
|
22
23
|
tagSetData: TagSetExploreDataProps[];
|
|
23
24
|
/** The `TagSet` variant to render; "filter" by default. */
|
|
24
|
-
variant
|
|
25
|
+
variant?: "explore";
|
|
25
26
|
}
|
|
26
27
|
/**
|
|
27
28
|
* The "explore" `TagSet` variant will always display the tags passed as data.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from "@chakra-ui/react";
|
|
2
3
|
import { IconNames } from "../Icons/Icon";
|
|
3
4
|
export interface TagSetFilterDataProps {
|
|
4
5
|
/** The name of the SVG `Icon` to render before the tag label. */
|
|
@@ -10,9 +11,7 @@ export interface TagSetFilterDataProps {
|
|
|
10
11
|
/** Any other properties the consuming app may need for app logic filtering. */
|
|
11
12
|
[key: string]: string;
|
|
12
13
|
}
|
|
13
|
-
export interface TagSetFilterProps {
|
|
14
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
15
|
-
id?: string;
|
|
14
|
+
export interface TagSetFilterProps extends Omit<BoxProps, "onClick"> {
|
|
16
15
|
/** Whether the tags should be removable. */
|
|
17
16
|
isDismissible?: boolean;
|
|
18
17
|
/** The function to perform when a tag is clicked when `isDismissible` is true. */
|
|
@@ -20,7 +19,7 @@ export interface TagSetFilterProps {
|
|
|
20
19
|
/** The array of data to display as tags. */
|
|
21
20
|
tagSetData: TagSetFilterDataProps[];
|
|
22
21
|
/** The `TagSet` variant to render; "filter" by default. */
|
|
23
|
-
variant
|
|
22
|
+
variant?: "filter";
|
|
24
23
|
}
|
|
25
24
|
/**
|
|
26
25
|
* The "filter" `TagSet` variant will display tags that can be removed when
|
|
@@ -1,18 +1,14 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BoxProps, ChakraComponent } from "@chakra-ui/react";
|
|
3
|
-
export declare const
|
|
4
|
-
export type
|
|
5
|
-
export interface TemplateProps
|
|
6
|
-
/**
|
|
7
|
-
|
|
8
|
-
/** Renders the `TemplateSidebar` component either on the left or
|
|
9
|
-
* right side of the `TemplateMain` component. */
|
|
10
|
-
sidebar?: SidebarPlacement;
|
|
3
|
+
export declare const templateVariantArray: readonly ["full", "narrow", "sidebarLeft", "sidebarRight"];
|
|
4
|
+
export type TemplateVariant = typeof templateVariantArray[number];
|
|
5
|
+
export interface TemplateProps {
|
|
6
|
+
/** Specifies the layout and DOM structure related to the content region. */
|
|
7
|
+
variant?: TemplateVariant;
|
|
11
8
|
}
|
|
12
|
-
export interface
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
id?: string;
|
|
9
|
+
export interface TemplateChildProps extends BoxProps {
|
|
10
|
+
}
|
|
11
|
+
export interface TemplateMainProps extends TemplateChildProps {
|
|
16
12
|
}
|
|
17
13
|
/**
|
|
18
14
|
* The main top-level parent component that wraps all template-related
|
|
@@ -20,43 +16,37 @@ export interface TemplateMainProps extends BoxProps {
|
|
|
20
16
|
*/
|
|
21
17
|
declare const Template: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<TemplateProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<TemplateProps>>;
|
|
22
18
|
/**
|
|
23
|
-
* This
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
* This component renders an HTML `<header>` element.
|
|
20
|
+
*/
|
|
21
|
+
declare const TemplateHeader: React.FC<React.PropsWithChildren<TemplateChildProps>>;
|
|
22
|
+
/**
|
|
23
|
+
* This component renders an HTML `<footer>` element.
|
|
26
24
|
*/
|
|
27
|
-
declare const
|
|
25
|
+
declare const TemplateFooter: React.FC<React.PropsWithChildren<TemplateChildProps>>;
|
|
28
26
|
/**
|
|
29
|
-
* This
|
|
30
|
-
* will render below `TemplateBreakout` (if being used) and above the
|
|
31
|
-
* main content and sidebar (if one exists).
|
|
27
|
+
* This component renders an HTML `<main>` element.
|
|
32
28
|
*/
|
|
33
|
-
declare const
|
|
29
|
+
declare const TemplateMain: React.FC<React.PropsWithChildren<TemplateChildProps>>;
|
|
34
30
|
/**
|
|
35
|
-
* This component
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* `TemplateMainNarrow`.
|
|
31
|
+
* This optional component spans the full width of the browser window
|
|
32
|
+
* (edge-to-edge). It is most useful for `Breadcrumbs`, `Hero`, or other
|
|
33
|
+
* banner-like components.
|
|
39
34
|
*/
|
|
40
|
-
declare const
|
|
35
|
+
declare const TemplateBreakout: React.FC<React.PropsWithChildren<TemplateChildProps>>;
|
|
41
36
|
/**
|
|
42
|
-
* This component
|
|
43
|
-
*
|
|
44
|
-
* navigation link. It provides a narrower container for better readability if
|
|
45
|
-
* the main content includes long text. This component is meant to be used in
|
|
46
|
-
* lieu of `TemplateMain`, and should not be used in conjunction with
|
|
47
|
-
* `TemplateSidebar`.
|
|
37
|
+
* This optional component will span the full width of the content area and will
|
|
38
|
+
* render content at a max width of 1280px.
|
|
48
39
|
*/
|
|
49
|
-
declare const
|
|
40
|
+
declare const TemplateFull: React.FC<React.PropsWithChildren<TemplateChildProps>>;
|
|
50
41
|
/**
|
|
51
|
-
*
|
|
52
|
-
* It must be paired with the `TemplateMain` component. An optional `sidebar`
|
|
53
|
-
* prop value of "left" or "right" must be passed to the `Template` wrapper
|
|
54
|
-
* to render the correct CSS styles.
|
|
42
|
+
* The width of this component is dependent on the value of the `variant` prop.
|
|
55
43
|
*/
|
|
56
|
-
declare const
|
|
44
|
+
declare const TemplateContent: React.FC<React.PropsWithChildren<TemplateMainProps>>;
|
|
57
45
|
/**
|
|
58
|
-
* This optional component
|
|
59
|
-
*
|
|
46
|
+
* This optional component is used to render content in a sidebar column. For
|
|
47
|
+
* proper rendering, this component must be paired with the `TemplateMain`
|
|
48
|
+
* component and the `variant` prop must be set to "sidebarLeft" or
|
|
49
|
+
* "sidebarRight".
|
|
60
50
|
*/
|
|
61
|
-
declare const
|
|
62
|
-
export { Template, TemplateBreakout,
|
|
51
|
+
declare const TemplateSidebar: React.FC<React.PropsWithChildren<TemplateChildProps>>;
|
|
52
|
+
export { Template, TemplateBreakout, TemplateContent, TemplateFooter, TemplateFull, TemplateHeader, TemplateMain, TemplateSidebar, };
|
|
@@ -3,8 +3,6 @@ import React from "react";
|
|
|
3
3
|
export declare const textSizesArray: readonly ["default", "body1", "body2", "caption", "tag", "mini", "overline1", "overline2", "subtitle1", "subtitle2"];
|
|
4
4
|
export type TextSizes = typeof textSizesArray[number];
|
|
5
5
|
export interface TextProps extends BoxProps {
|
|
6
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
7
|
-
id?: string;
|
|
8
6
|
/** Optional prop used to show bolded text */
|
|
9
7
|
isBold?: boolean;
|
|
10
8
|
/** Optional prop used to show itlicized text */
|
|
@@ -15,8 +13,6 @@ export interface TextProps extends BoxProps {
|
|
|
15
13
|
isUppercase?: boolean;
|
|
16
14
|
/** Optional prop used to show lower case text */
|
|
17
15
|
isLowercase?: boolean;
|
|
18
|
-
/** Optional prop used to remove default spacing */
|
|
19
|
-
noSpace?: boolean;
|
|
20
16
|
/** Optional prop to control the text styling */
|
|
21
17
|
size?: TextSizes;
|
|
22
18
|
}
|
|
@@ -30,8 +30,6 @@ export interface InputProps extends TextInputPropsWithHTML {
|
|
|
30
30
|
autoComplete?: AutoCompleteValues;
|
|
31
31
|
/** Populates the HelperErrorText for the standard state */
|
|
32
32
|
helperText?: HelperErrorTextType;
|
|
33
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
34
|
-
id: string;
|
|
35
33
|
/** Populates the HelperErrorText for the error state */
|
|
36
34
|
invalidText?: HelperErrorTextType;
|
|
37
35
|
/** Adds a button to clear existing text in the input field. */
|
|
@@ -9,8 +9,6 @@ export interface ToggleProps extends Pick<BoxProps, keyof ChakraProps>, Omit<Inp
|
|
|
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;
|
|
@@ -3,8 +3,6 @@ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
|
|
|
3
3
|
export interface TooltipProps extends Omit<BoxProps, "content"> {
|
|
4
4
|
/** Value used to populate the tooltip content. */
|
|
5
5
|
content: string | number | React.ReactNode;
|
|
6
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
7
|
-
id?: string;
|
|
8
6
|
/** Adds the `disabled` prop to the Tooltip when true. */
|
|
9
7
|
isDisabled?: boolean;
|
|
10
8
|
/** Wraps the children of the tooltip in `ComponentWrapper` with `tabIndex=0` when true. */
|
|
@@ -21,8 +21,6 @@ export interface VideoPlayerProps extends BoxProps {
|
|
|
21
21
|
headingText?: string | JSX.Element;
|
|
22
22
|
/** Optional string to set the text for a `HelperErrorText` component */
|
|
23
23
|
helperText?: HelperErrorTextType;
|
|
24
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
25
|
-
id?: string;
|
|
26
24
|
/** Optional title to be added to the `<iframe>` element for improved
|
|
27
25
|
* accessibility; this title should describe in a few words the content of
|
|
28
26
|
* the video; if omitted, a generic title will be added; if a `title`
|
package/dist/src/index.d.ts
CHANGED
|
@@ -106,7 +106,7 @@ export { default as TagSet } from "./components/TagSet/TagSet";
|
|
|
106
106
|
export type { TagSetProps, TagSetTypeProps } 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";
|
|
@@ -12,6 +12,9 @@ export declare const baseButtonStyle: {
|
|
|
12
12
|
textDecoration: string;
|
|
13
13
|
transitionDuration: string;
|
|
14
14
|
wordWrap: string;
|
|
15
|
+
"&:has(svg)": {
|
|
16
|
+
gap: string;
|
|
17
|
+
};
|
|
15
18
|
svg: {
|
|
16
19
|
fill: string;
|
|
17
20
|
};
|
|
@@ -49,6 +52,9 @@ export declare const buttonBaseStyle: {
|
|
|
49
52
|
textDecoration: string;
|
|
50
53
|
transitionDuration: string;
|
|
51
54
|
wordWrap: string;
|
|
55
|
+
"&:has(svg)": {
|
|
56
|
+
gap: string;
|
|
57
|
+
};
|
|
52
58
|
svg: {
|
|
53
59
|
fill: string;
|
|
54
60
|
};
|
|
@@ -123,6 +129,9 @@ declare const Button: {
|
|
|
123
129
|
textDecoration: string;
|
|
124
130
|
transitionDuration: string;
|
|
125
131
|
wordWrap: string;
|
|
132
|
+
"&:has(svg)": {
|
|
133
|
+
gap: string;
|
|
134
|
+
};
|
|
126
135
|
svg: {
|
|
127
136
|
fill: string;
|
|
128
137
|
};
|
|
@@ -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,4 @@ declare const textMargin: {
|
|
|
152
148
|
margin: string;
|
|
153
149
|
marginBottom: string;
|
|
154
150
|
};
|
|
155
|
-
export { activeFocus, checkboxRadioControlSize, checkboxRadioGroupStyles, checkboxRadioHelperErrorTextStyle, checkboxRadioHoverStyles, checkboxRadioLabelStyles, customFocusColor, defaultElementSizes, labelLegendText,
|
|
151
|
+
export { activeFocus, checkboxRadioControlSize, checkboxRadioGroupStyles, checkboxRadioHelperErrorTextStyle, checkboxRadioHoverStyles, checkboxRadioLabelStyles, customFocusColor, defaultElementSizes, labelLegendText, 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;
|
|
@@ -238,12 +176,6 @@ declare const Heading: {
|
|
|
238
176
|
color: string;
|
|
239
177
|
};
|
|
240
178
|
};
|
|
241
|
-
headingWrapper: {
|
|
242
|
-
marginTop: string;
|
|
243
|
-
marginStart: string;
|
|
244
|
-
marginEnd: string;
|
|
245
|
-
marginBottom: string;
|
|
246
|
-
};
|
|
247
179
|
};
|
|
248
180
|
sizes?: {
|
|
249
181
|
[key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{
|
|
@@ -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;
|