@nypl/design-system-react-components 4.0.0-alpha-rc3 → 4.0.0-alpha-rc5
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 +57 -57
- package/dist/design-system-react-components.js +12960 -12998
- package/dist/readme/componentheader.png +0 -0
- 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 +2 -5
- package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +2 -4
- package/dist/src/components/Button/Button.d.ts +4 -6
- 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 +2 -4
- 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 +8 -5
- 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/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 +7 -8
- 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 +4 -6
- package/dist/src/components/Pagination/Pagination.d.ts +0 -2
- package/dist/src/components/ProgressIndicator/ProgressIndicator.d.ts +1 -3
- 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 +2 -7
- package/dist/src/components/TagSet/TagSetExplore.d.ts +3 -2
- package/dist/src/components/TagSet/TagSetFilter.d.ts +3 -4
- 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 +2 -2
- package/dist/src/theme/components/breadcrumb.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/feedbackBox.d.ts +1 -1
- 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 +6 -72
- package/dist/src/theme/components/helperErrorText.d.ts +5 -14
- package/dist/src/theme/components/hero.d.ts +14 -15
- 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/newsletterSignup.d.ts +1 -1
- package/dist/src/theme/components/radioGroup.d.ts +1 -1
- package/dist/src/theme/components/searchBar.d.ts +2 -2
- package/dist/src/theme/components/socialmedialinks.d.ts +2 -2
- package/dist/src/theme/components/structuredContent.d.ts +1 -64
- package/dist/src/theme/components/styledList.d.ts +0 -1
- package/dist/src/theme/components/subnav.d.ts +1 -1
- package/dist/src/theme/components/template.d.ts +6 -11
- 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 +2 -0
- package/dist/styles.css +1 -1
- 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 +9 -13
- package/dist/src/theme/components/filterBar.d.ts +0 -46
|
@@ -2,13 +2,11 @@ import { BoxProps, ChakraComponent } from "@chakra-ui/react";
|
|
|
2
2
|
import React from "react";
|
|
3
3
|
export declare const notificationVariantsArray: readonly ["standard", "announcement", "warning"];
|
|
4
4
|
export type NotificationVariants = typeof notificationVariantsArray[number];
|
|
5
|
-
interface BaseProps {
|
|
5
|
+
interface BaseProps extends BoxProps {
|
|
6
6
|
/** Optional prop to control text alignment in `NotificationContent` */
|
|
7
7
|
alignText?: boolean;
|
|
8
8
|
/** Optional custom `Icon` that will override the default `Icon`. */
|
|
9
9
|
icon?: JSX.Element;
|
|
10
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
11
|
-
id?: string;
|
|
12
10
|
/** Optional prop to control horizontal alignment of the `Notification` content */
|
|
13
11
|
isCentered?: boolean;
|
|
14
12
|
/** Optional content to be rendered in a `NotificationHeading` component. A
|
|
@@ -22,9 +20,9 @@ interface BaseProps {
|
|
|
22
20
|
/** Prop to display the `Notification` icon. Defaults to `true`. */
|
|
23
21
|
showIcon?: boolean;
|
|
24
22
|
}
|
|
23
|
+
type BasePropsWithoutAlignText = Omit<BaseProps, "alignText">;
|
|
25
24
|
type NotificationHeadingProps = Omit<BasePropsWithoutAlignText, "showIcon">;
|
|
26
25
|
type NotificationContentProps = Omit<BaseProps, "icon">;
|
|
27
|
-
type BasePropsWithoutAlignText = Omit<BaseProps, "alignText">;
|
|
28
26
|
export interface NotificationProps extends BasePropsWithoutAlignText, BoxProps {
|
|
29
27
|
/** Optional prop to control whether a `Notification` can be dismissed
|
|
30
28
|
* (closed) by a user. */
|
|
@@ -43,8 +41,8 @@ export declare const NotificationHeading: ChakraComponent<React.ForwardRefExotic
|
|
|
43
41
|
*/
|
|
44
42
|
export declare const NotificationContent: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<NotificationContentProps> & React.RefAttributes<HTMLDivElement>>, NotificationContentProps>;
|
|
45
43
|
/**
|
|
46
|
-
*
|
|
47
|
-
* standard, announcement, and warning.
|
|
44
|
+
* `Notification` is a component used to present users with three different levels
|
|
45
|
+
* of notifications: standard, announcement, and warning.
|
|
48
46
|
*/
|
|
49
47
|
export declare const Notification: ChakraComponent<React.ForwardRefExoticComponent<NotificationProps & React.RefAttributes<HTMLDivElement>>, NotificationProps>;
|
|
50
48
|
export default Notification;
|
|
@@ -9,8 +9,6 @@ export interface PaginationProps extends BoxProps {
|
|
|
9
9
|
* to use for a link's `href` attribute. This is used when the current
|
|
10
10
|
* page should refresh when navigating. */
|
|
11
11
|
getPageHref?: undefined | ((pageNumber: number) => string);
|
|
12
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
13
|
-
id?: string;
|
|
14
12
|
/** The initially selected page (default value is 1). */
|
|
15
13
|
initialPage?: number;
|
|
16
14
|
/** The callback function called when an item is selected and the current
|
|
@@ -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
|
|
@@ -35,7 +33,7 @@ interface CircularProgressIndicatorProps extends BaseProgressIndicatorProps {
|
|
|
35
33
|
}
|
|
36
34
|
export type ProgressIndicatorProps = LinearProgressIndicatorProps | CircularProgressIndicatorProps;
|
|
37
35
|
/**
|
|
38
|
-
*
|
|
36
|
+
* `ProgressIndicator` displays a progress status for any task that takes a long
|
|
39
37
|
* time to complete or consists of multiple steps. Examples include downloading,
|
|
40
38
|
* uploading, or processing.
|
|
41
39
|
*/
|
|
@@ -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 */
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ChakraComponent } from "@chakra-ui/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { TagSetExploreProps } from "./TagSetExplore";
|
|
4
4
|
import { TagSetFilterProps } from "./TagSetFilter";
|
|
5
|
-
export
|
|
6
|
-
/** ID that other components can cross reference for accessibility purposes. */
|
|
7
|
-
id?: string;
|
|
8
|
-
}
|
|
9
|
-
export type TagSetTypeProps = TagSetFilterProps | TagSetExploreProps;
|
|
10
|
-
export type TagSetProps = BaseTagSetProps & TagSetTypeProps;
|
|
5
|
+
export type TagSetProps = TagSetFilterProps | TagSetExploreProps;
|
|
11
6
|
export declare function isFilterVariant(variant: TagSetProps["variant"]): variant is "filter";
|
|
12
7
|
/**
|
|
13
8
|
* The `TagSet` component renders a group of individual tags which have two
|
|
@@ -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
|
|
@@ -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
|
@@ -103,10 +103,10 @@ 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, TemplateMain, TemplateSidebar, } from "./components/Template/Template";
|
|
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;
|
|
@@ -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;
|