@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
|
@@ -1,19 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
interface SkipNavigationProps {
|
|
3
|
-
/** Additional CSS class name to render in the `nav` element. */
|
|
4
|
-
className?: string;
|
|
5
|
-
/** ID that other components can cross reference for accessibility purposes */
|
|
6
|
-
id?: string;
|
|
7
|
-
/** The anchor target for the main skip link. The default is "#mainContent". */
|
|
8
|
-
target?: string;
|
|
9
|
-
}
|
|
10
2
|
/**
|
|
11
3
|
* SkipNavigation is a component that is used to provide a navigational list of
|
|
12
4
|
* links. The first link is used to skip to the main content of the page using
|
|
13
5
|
* the `#mainContent` id, and the second link points to accessibility information
|
|
14
6
|
* on NYPL.org. These links are visually hidden but can be read by screenreaders.
|
|
15
7
|
*/
|
|
16
|
-
export declare const SkipNavigation:
|
|
17
|
-
children?: React.ReactNode;
|
|
18
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
8
|
+
export declare const SkipNavigation: React.FC<any>;
|
|
19
9
|
export default SkipNavigation;
|
|
@@ -59,7 +59,5 @@ export interface SliderProps {
|
|
|
59
59
|
* with a min and max value. The value(s) can be updated through the slider
|
|
60
60
|
* thumb(s) or through the text input(s) elements.
|
|
61
61
|
*/
|
|
62
|
-
export declare const Slider:
|
|
63
|
-
children?: React.ReactNode;
|
|
64
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
62
|
+
export declare const Slider: React.FC<any>;
|
|
65
63
|
export default Slider;
|
|
@@ -38,5 +38,5 @@ export interface SocialMediaLinksProps {
|
|
|
38
38
|
/**
|
|
39
39
|
* The SocialMediaLinks component renders a list of links for accessing social media sites.
|
|
40
40
|
*/
|
|
41
|
-
export declare const SocialMediaLinks:
|
|
41
|
+
export declare const SocialMediaLinks: React.FC<any>;
|
|
42
42
|
export default SocialMediaLinks;
|
|
@@ -13,7 +13,5 @@ export interface StatusBadgeProps {
|
|
|
13
13
|
* The `StatusBadge` component is used to display a visual badge for three
|
|
14
14
|
* different status levels.
|
|
15
15
|
*/
|
|
16
|
-
export declare const StatusBadge:
|
|
17
|
-
children?: React.ReactNode;
|
|
18
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
16
|
+
export declare const StatusBadge: React.FC<any>;
|
|
19
17
|
export default StatusBadge;
|
|
@@ -24,7 +24,5 @@ export interface StructuredContentProps {
|
|
|
24
24
|
* The `StructuredContent` component that displays a heading, callout content,
|
|
25
25
|
* an image, and body content. All are optional except for body content.
|
|
26
26
|
*/
|
|
27
|
-
export declare const StructuredContent:
|
|
28
|
-
children?: React.ReactNode;
|
|
29
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
27
|
+
export declare const StructuredContent: React.FC<any>;
|
|
30
28
|
export default StructuredContent;
|
|
@@ -299,7 +299,7 @@ export declare const cssVars: {
|
|
|
299
299
|
dataBodyColor?: undefined;
|
|
300
300
|
})[];
|
|
301
301
|
};
|
|
302
|
-
export declare const makeColorCard: (data: any) => import("
|
|
302
|
+
export declare const makeColorCard: (data: any) => import("react/jsx-runtime").JSX.Element;
|
|
303
303
|
export declare const getColorCards: (category: any) => any[];
|
|
304
304
|
export interface DataTableProps {
|
|
305
305
|
/** Contrast and WCAG compliance data related to the color ui.bg.page when
|
|
@@ -343,6 +343,6 @@ export interface ColorCardProps extends DataTableProps {
|
|
|
343
343
|
/** The name of the color that the current color is based on. */
|
|
344
344
|
colorSource: string;
|
|
345
345
|
}
|
|
346
|
-
export declare const DataTable: (props: PropsWithChildren<DataTableProps>) => import("
|
|
347
|
-
export declare const ColorCard: (props: PropsWithChildren<ColorCardProps>) => import("
|
|
346
|
+
export declare const DataTable: (props: PropsWithChildren<DataTableProps>) => import("react/jsx-runtime").JSX.Element;
|
|
347
|
+
export declare const ColorCard: (props: PropsWithChildren<ColorCardProps>) => import("react/jsx-runtime").JSX.Element;
|
|
348
348
|
export default ColorCard;
|
|
@@ -22,5 +22,5 @@ export interface StyledListProps {
|
|
|
22
22
|
* adhere to traditional numbered and bulleted list styles. Unlike
|
|
23
23
|
* the `List` component, `StyledList` only renders an unordered list.
|
|
24
24
|
*/
|
|
25
|
-
export declare const StyledList:
|
|
25
|
+
export declare const StyledList: React.FC<any>;
|
|
26
26
|
export default StyledList;
|
|
@@ -26,7 +26,5 @@ export interface TableProps {
|
|
|
26
26
|
* Basic `Table` component used to organize and display tabular data in
|
|
27
27
|
* rows and columns.
|
|
28
28
|
*/
|
|
29
|
-
export declare const Table:
|
|
30
|
-
children?: React.ReactNode;
|
|
31
|
-
} & React.RefAttributes<HTMLTableElement>>, {}>;
|
|
29
|
+
export declare const Table: React.FC<any>;
|
|
32
30
|
export default Table;
|
|
@@ -21,8 +21,6 @@ export interface TabsProps {
|
|
|
21
21
|
* Renders Chakra's `Tab` component with specific variants, props,
|
|
22
22
|
* and controlled styling.
|
|
23
23
|
*/
|
|
24
|
-
export declare const Tabs:
|
|
25
|
-
children?: React.ReactNode;
|
|
26
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
24
|
+
export declare const Tabs: React.FC<any>;
|
|
27
25
|
export { TabList, Tab, TabPanels, TabPanel };
|
|
28
26
|
export default Tabs;
|
|
@@ -20,5 +20,5 @@ export declare function isFilterType(type: TagSetProps["type"]): type is "filter
|
|
|
20
20
|
* The full label text will be automatically revealed when the tag is hovered
|
|
21
21
|
* with a DS `Tooltip` component.
|
|
22
22
|
*/
|
|
23
|
-
export declare const TagSet:
|
|
23
|
+
export declare const TagSet: React.FC<any>;
|
|
24
24
|
export default TagSet;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { IconNames } from "../Icons/Icon";
|
|
3
3
|
export interface TagSetExploreDataProps {
|
|
4
4
|
/** The name of the SVG `Icon` to render before the tag label. */
|
|
@@ -24,5 +24,5 @@ export interface TagSetExploreProps {
|
|
|
24
24
|
* The `label` property in the `tagSetData` prop should be set to a link-type
|
|
25
25
|
* JSX component for linking to specific content.
|
|
26
26
|
*/
|
|
27
|
-
export declare const TagSetExplore:
|
|
27
|
+
export declare const TagSetExplore: React.FC<any>;
|
|
28
28
|
export default TagSetExplore;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { IconNames } from "../Icons/Icon";
|
|
2
3
|
export interface TagSetFilterDataProps {
|
|
3
4
|
/** The name of the SVG `Icon` to render before the tag label. */
|
|
@@ -21,5 +22,5 @@ export interface TagSetFilterProps {
|
|
|
21
22
|
* The "filter" `TagSet` variant will display tags that can be removed when
|
|
22
23
|
* `isDismissible` is true and they are clicked.
|
|
23
24
|
*/
|
|
24
|
-
export declare const TagSetFilter:
|
|
25
|
+
export declare const TagSetFilter: React.FC<any>;
|
|
25
26
|
export default TagSetFilter;
|
|
@@ -4,6 +4,4 @@ import React from "react";
|
|
|
4
4
|
* long or a React fragment. This assumes that the `label` prop is a rather
|
|
5
5
|
* simple single root JSX element, such as `<Link ...>....</Link>`.
|
|
6
6
|
*/
|
|
7
|
-
export declare const TooltipWrapper: ({ label, children, }: React.PropsWithChildren<
|
|
8
|
-
label: any;
|
|
9
|
-
}>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare const TooltipWrapper: ({ label, children, }: React.PropsWithChildren<any>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -47,9 +47,7 @@ export interface TemplateAppContainerProps extends TemplateFooterProps, Template
|
|
|
47
47
|
* The main top-level parent component that wraps all template-related
|
|
48
48
|
* components.
|
|
49
49
|
*/
|
|
50
|
-
declare const Template:
|
|
51
|
-
children?: React.ReactNode;
|
|
52
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
50
|
+
declare const Template: React.FC<any>;
|
|
53
51
|
/**
|
|
54
52
|
* This optional component renders its children from edge-to-edge and should
|
|
55
53
|
* be used for alerts or notifications that are typically site-wide. This must
|
|
@@ -58,7 +56,7 @@ declare const Template: import("@chakra-ui/react").ChakraComponent<React.Forward
|
|
|
58
56
|
* `role="complementary"` attribute. These elements should *not* be rendered
|
|
59
57
|
* in the `header` HTML section since that's an accessibility violation.
|
|
60
58
|
*/
|
|
61
|
-
declare const TemplateAboveHeader:
|
|
59
|
+
declare const TemplateAboveHeader: React.FC<any>;
|
|
62
60
|
/**
|
|
63
61
|
* This optional component should be the first child of the `Template`
|
|
64
62
|
* component. This is rendered as an HTML `<header>` element. If an HTML
|
|
@@ -66,14 +64,14 @@ declare const TemplateAboveHeader: (props: React.PropsWithChildren<TemplateProps
|
|
|
66
64
|
* set `renderFooterElement` to `false`. Otherwise, the parent wrapper will
|
|
67
65
|
* render an HTML `<header>` element.
|
|
68
66
|
*/
|
|
69
|
-
declare const TemplateHeader:
|
|
67
|
+
declare const TemplateHeader: React.FC<any>;
|
|
70
68
|
/**
|
|
71
69
|
* This component should be used inside the `Template` component to contain both
|
|
72
70
|
* the `TemplateAboveHeader` and `TemplateHeader` components. This is meant to
|
|
73
71
|
* render its children from edge to edge and is most useful for the headers,
|
|
74
72
|
* `Breadcrumbs`, and `Hero` components or other banner-like components.
|
|
75
73
|
*/
|
|
76
|
-
declare const TemplateBreakout:
|
|
74
|
+
declare const TemplateBreakout: React.FC<any>;
|
|
77
75
|
/**
|
|
78
76
|
* This component is most useful to render content on the page. This renders an
|
|
79
77
|
* HTML `<main>` element with an id of "mainContent". The "mainContent" id should
|
|
@@ -84,20 +82,20 @@ declare const TemplateBreakout: (props: React.PropsWithChildren<TemplateProps>)
|
|
|
84
82
|
* and `TemplateContentSidebar` must be ordered correctly as children elements
|
|
85
83
|
* for the appropriate styles to take effect.
|
|
86
84
|
*/
|
|
87
|
-
declare const TemplateContent:
|
|
85
|
+
declare const TemplateContent: React.FC<any>;
|
|
88
86
|
/**
|
|
89
87
|
* This optional component must be used inside the `TemplateContent` component.
|
|
90
88
|
* This renders content in the main width of the container and will always render
|
|
91
89
|
* above the primary component and the sidebar component (if any).
|
|
92
90
|
*/
|
|
93
|
-
declare const TemplateContentTop:
|
|
91
|
+
declare const TemplateContentTop: React.FC<any>;
|
|
94
92
|
/**
|
|
95
93
|
* This optional component must be used inside the `TemplateContent` component
|
|
96
94
|
* and after the `TemplateContentPrimary` or `TemplateContentSidebar` component.
|
|
97
95
|
* This renders content in the main width of the container and should always
|
|
98
96
|
* render below the primary component and the sidebar component (if any).
|
|
99
97
|
*/
|
|
100
|
-
declare const TemplateContentBottom:
|
|
98
|
+
declare const TemplateContentBottom: React.FC<any>;
|
|
101
99
|
/**
|
|
102
100
|
* This component is used to render content in a column when there must be a
|
|
103
101
|
* sidebar component on either its left or right side. It must go inside the
|
|
@@ -106,7 +104,7 @@ declare const TemplateContentBottom: (props: React.PropsWithChildren<TemplatePro
|
|
|
106
104
|
* prop is used in the `TemplateContent` component, there is no need to pass
|
|
107
105
|
* the `sidebar` prop to this component -- `TemplateContent` will handle it.
|
|
108
106
|
*/
|
|
109
|
-
declare const TemplateContentPrimary:
|
|
107
|
+
declare const TemplateContentPrimary: React.FC<any>;
|
|
110
108
|
/**
|
|
111
109
|
* This component is used to render content in a sidebar column. It must go
|
|
112
110
|
* inside the `TemplateContent` component and must be paired with the
|
|
@@ -118,14 +116,14 @@ declare const TemplateContentPrimary: (props: React.PropsWithChildren<TemplateCo
|
|
|
118
116
|
* component, there is no need to pass the `sidebar` prop to this component --
|
|
119
117
|
* `TemplateContent` will handle it.
|
|
120
118
|
*/
|
|
121
|
-
declare const TemplateContentSidebar:
|
|
119
|
+
declare const TemplateContentSidebar: React.FC<any>;
|
|
122
120
|
/**
|
|
123
121
|
* This optional component should be the last child of the `Template`
|
|
124
122
|
* component. This is rendered as an HTML `<footer>` element and spans the full
|
|
125
123
|
* width of the page. If an HTML `<footer>` element is already passed in a
|
|
126
124
|
* custom component, set `renderFooterElement` to `false`.
|
|
127
125
|
*/
|
|
128
|
-
declare const TemplateFooter:
|
|
126
|
+
declare const TemplateFooter: React.FC<any>;
|
|
129
127
|
/**
|
|
130
128
|
* This single component can be used instead of all the individual template
|
|
131
129
|
* components. Instead of importing and rendering the needed "template"
|
|
@@ -133,8 +131,6 @@ declare const TemplateFooter: ({ children, renderFooterElement, }: React.PropsWi
|
|
|
133
131
|
* be rendered. For example, if you want to render content in the
|
|
134
132
|
* `TemplateContentPrimary` section, then pass it as a prop to `contentPrimary`.
|
|
135
133
|
*/
|
|
136
|
-
export declare const TemplateAppContainer:
|
|
137
|
-
children?: React.ReactNode;
|
|
138
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
134
|
+
export declare const TemplateAppContainer: React.FC<any>;
|
|
139
135
|
export { Template, TemplateAboveHeader, TemplateBreakout, TemplateContent, TemplateContentBottom, TemplateContentPrimary, TemplateContentSidebar, TemplateContentTop, TemplateFooter, TemplateHeader, };
|
|
140
136
|
export default TemplateAppContainer;
|
|
@@ -21,7 +21,5 @@ export interface TextProps {
|
|
|
21
21
|
/** Optional prop to control the text styling */
|
|
22
22
|
size?: TextSizes;
|
|
23
23
|
}
|
|
24
|
-
export declare const Text:
|
|
25
|
-
children?: React.ReactNode;
|
|
26
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
24
|
+
export declare const Text: React.FC<any>;
|
|
27
25
|
export default Text;
|
|
@@ -94,5 +94,5 @@ export type TextInputRefType = HTMLInputElement & HTMLTextAreaElement;
|
|
|
94
94
|
* element. All types will render an accessible `Label` component and an
|
|
95
95
|
* optional `HelperErrorText` component.
|
|
96
96
|
*/
|
|
97
|
-
export declare const TextInput:
|
|
97
|
+
export declare const TextInput: React.FC<any>;
|
|
98
98
|
export default TextInput;
|
|
@@ -39,5 +39,5 @@ export declare const onChangeDefault: () => void;
|
|
|
39
39
|
/**
|
|
40
40
|
* Component that renders Chakra's `Switch` component along with NYPL defaults.
|
|
41
41
|
*/
|
|
42
|
-
export declare const Toggle:
|
|
42
|
+
export declare const Toggle: React.FC<any>;
|
|
43
43
|
export default Toggle;
|
|
@@ -13,5 +13,5 @@ export interface TooltipProps {
|
|
|
13
13
|
/** Wraps the children of the tooltip in `ComponentWrapper` with `tabIndex=0` when true. */
|
|
14
14
|
shouldWrapChildren?: boolean;
|
|
15
15
|
}
|
|
16
|
-
export declare const Tooltip:
|
|
16
|
+
export declare const Tooltip: React.FC<any>;
|
|
17
17
|
export default Tooltip;
|
|
@@ -36,7 +36,5 @@ export interface VideoPlayerProps {
|
|
|
36
36
|
/** Required. Used to specify which video service is being used. */
|
|
37
37
|
videoType?: VideoPlayerTypes;
|
|
38
38
|
}
|
|
39
|
-
export declare const VideoPlayer:
|
|
40
|
-
children?: React.ReactNode;
|
|
41
|
-
} & React.RefAttributes<HTMLDivElement>>, {}>;
|
|
39
|
+
export declare const VideoPlayer: React.FC<any>;
|
|
42
40
|
export default VideoPlayer;
|
|
@@ -1,14 +1,37 @@
|
|
|
1
1
|
export declare const buttonBaseStyle: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
base: {
|
|
3
|
+
alignItems: string;
|
|
4
|
+
borderRadius: string;
|
|
5
|
+
display: string;
|
|
6
|
+
cursor: string;
|
|
7
|
+
color: string;
|
|
8
|
+
fontWeight: string;
|
|
9
|
+
justifyContent: string;
|
|
10
|
+
lineHeight: string;
|
|
11
|
+
textDecoration: string;
|
|
12
|
+
wordWrap: string;
|
|
13
|
+
svg: {
|
|
14
|
+
fill: string;
|
|
15
|
+
};
|
|
16
|
+
_hover: {
|
|
17
|
+
bg: string;
|
|
18
|
+
};
|
|
19
|
+
_visited: {
|
|
20
|
+
color: string;
|
|
21
|
+
};
|
|
22
|
+
_disabled: {
|
|
23
|
+
bg: string;
|
|
24
|
+
color: string;
|
|
25
|
+
opacity: string;
|
|
26
|
+
pointerEvents: string;
|
|
27
|
+
};
|
|
28
|
+
_dark: {
|
|
29
|
+
_disabled: {
|
|
30
|
+
bg: string;
|
|
31
|
+
color: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
12
35
|
/** The element will handle descriptive text added to aid
|
|
13
36
|
* screen readers. */
|
|
14
37
|
screenreaderOnly: {
|
|
@@ -28,56 +51,58 @@ export declare const buttonBaseStyle: {
|
|
|
28
51
|
};
|
|
29
52
|
wordWrap: string;
|
|
30
53
|
};
|
|
31
|
-
svg: {
|
|
32
|
-
fill: string;
|
|
33
|
-
};
|
|
34
|
-
_hover: {
|
|
35
|
-
bg: string;
|
|
36
|
-
};
|
|
37
|
-
_visited: {
|
|
38
|
-
color: string;
|
|
39
|
-
};
|
|
40
|
-
_disabled: {
|
|
41
|
-
bg: string;
|
|
42
|
-
color: string;
|
|
43
|
-
opacity: string;
|
|
44
|
-
pointerEvents: string;
|
|
45
|
-
};
|
|
46
|
-
_dark: {
|
|
47
|
-
_disabled: {
|
|
48
|
-
bg: string;
|
|
49
|
-
color: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
54
|
};
|
|
53
|
-
export declare const primary: ({ buttonSize }: {
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
55
|
+
export declare const primary: ({ buttonSize }: any) => {
|
|
56
|
+
base: any;
|
|
57
|
+
screenreaderOnly: {};
|
|
58
|
+
};
|
|
59
|
+
export declare const secondary: ({ buttonSize }: any) => {
|
|
60
|
+
base: any;
|
|
61
|
+
};
|
|
62
|
+
export declare const pill: ({ buttonSize }: any) => {
|
|
63
|
+
base: any;
|
|
64
|
+
};
|
|
65
|
+
export declare const callout: ({ buttonSize }: any) => {
|
|
66
|
+
base: any;
|
|
67
|
+
};
|
|
68
|
+
export declare const noBrand: ({ buttonSize }: any) => {
|
|
69
|
+
base: any;
|
|
70
|
+
};
|
|
68
71
|
declare const Button: {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
72
|
+
baseStyle?: {
|
|
73
|
+
base: {
|
|
74
|
+
alignItems: string;
|
|
75
|
+
borderRadius: string;
|
|
76
|
+
display: string;
|
|
77
|
+
cursor: string;
|
|
78
|
+
color: string;
|
|
79
|
+
fontWeight: string;
|
|
80
|
+
justifyContent: string;
|
|
81
|
+
lineHeight: string;
|
|
82
|
+
textDecoration: string;
|
|
83
|
+
wordWrap: string;
|
|
84
|
+
svg: {
|
|
85
|
+
fill: string;
|
|
86
|
+
};
|
|
87
|
+
_hover: {
|
|
88
|
+
bg: string;
|
|
89
|
+
};
|
|
90
|
+
_visited: {
|
|
91
|
+
color: string;
|
|
92
|
+
};
|
|
93
|
+
_disabled: {
|
|
94
|
+
bg: string;
|
|
95
|
+
color: string;
|
|
96
|
+
opacity: string;
|
|
97
|
+
pointerEvents: string;
|
|
98
|
+
};
|
|
99
|
+
_dark: {
|
|
100
|
+
_disabled: {
|
|
101
|
+
bg: string;
|
|
102
|
+
color: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
};
|
|
81
106
|
/** The element will handle descriptive text added to aid
|
|
82
107
|
* screen readers. */
|
|
83
108
|
screenreaderOnly: {
|
|
@@ -97,56 +122,44 @@ declare const Button: {
|
|
|
97
122
|
};
|
|
98
123
|
wordWrap: string;
|
|
99
124
|
};
|
|
100
|
-
|
|
101
|
-
|
|
125
|
+
};
|
|
126
|
+
sizes?: {
|
|
127
|
+
[key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{
|
|
128
|
+
keys: ("base" | "screenreaderOnly")[];
|
|
129
|
+
}>;
|
|
130
|
+
};
|
|
131
|
+
variants?: {
|
|
132
|
+
primary: ({ buttonSize }: any) => {
|
|
133
|
+
base: any;
|
|
134
|
+
screenreaderOnly: {};
|
|
102
135
|
};
|
|
103
|
-
|
|
104
|
-
|
|
136
|
+
secondary: ({ buttonSize }: any) => {
|
|
137
|
+
base: any;
|
|
105
138
|
};
|
|
106
|
-
|
|
107
|
-
|
|
139
|
+
text: ({ buttonSize }: any) => {
|
|
140
|
+
base: any;
|
|
108
141
|
};
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
color: string;
|
|
112
|
-
opacity: string;
|
|
113
|
-
pointerEvents: string;
|
|
142
|
+
link: ({ buttonSize }: any) => {
|
|
143
|
+
base: any;
|
|
114
144
|
};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
145
|
+
pill: ({ buttonSize }: any) => {
|
|
146
|
+
base: any;
|
|
147
|
+
};
|
|
148
|
+
iconOnly: ({ buttonSize }: any) => {
|
|
149
|
+
base: any;
|
|
150
|
+
};
|
|
151
|
+
callout: ({ buttonSize }: any) => {
|
|
152
|
+
base: any;
|
|
153
|
+
};
|
|
154
|
+
noBrand: ({ buttonSize }: any) => {
|
|
155
|
+
base: any;
|
|
120
156
|
};
|
|
121
157
|
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
secondary: ({ buttonSize }: {
|
|
127
|
-
buttonSize?: string;
|
|
128
|
-
}) => any;
|
|
129
|
-
text: ({ buttonSize }: {
|
|
130
|
-
buttonSize?: string;
|
|
131
|
-
}) => any;
|
|
132
|
-
link: ({ buttonSize }: {
|
|
133
|
-
buttonSize?: string;
|
|
134
|
-
}) => any;
|
|
135
|
-
pill: ({ buttonSize }: {
|
|
136
|
-
buttonSize?: string;
|
|
137
|
-
}) => any;
|
|
138
|
-
iconOnly: ({ buttonSize }: {
|
|
139
|
-
buttonSize?: string;
|
|
140
|
-
}) => any;
|
|
141
|
-
callout: ({ buttonSize }: {
|
|
142
|
-
buttonSize?: string;
|
|
143
|
-
}) => any;
|
|
144
|
-
noBrand: ({ buttonSize }: {
|
|
145
|
-
buttonSize?: string;
|
|
146
|
-
}) => any;
|
|
147
|
-
};
|
|
148
|
-
defaultProps: {
|
|
149
|
-
variant: string;
|
|
158
|
+
defaultProps?: {
|
|
159
|
+
size?: string | number;
|
|
160
|
+
variant?: "link" | "text" | "primary" | "secondary" | "pill" | "iconOnly" | "callout" | "noBrand";
|
|
161
|
+
colorScheme?: string;
|
|
150
162
|
};
|
|
163
|
+
parts: ("base" | "screenreaderOnly")[];
|
|
151
164
|
};
|
|
152
165
|
export default Button;
|