@nypl/design-system-react-components 3.0.0-react-chakra-rc2 → 3.0.0-react-chakra-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 +57 -57
- package/dist/design-system-react-components.js +13642 -13856
- package/dist/src/__tests__/mediaMatchMock.d.ts +79 -0
- package/dist/src/components/Link/Link.d.ts +4 -6
- package/dist/src/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/dist/src/components/MultiSelect/MultiSelectItemsCountButton.d.ts +4 -1
- package/dist/src/components/Tabs/Tabs.d.ts +2 -2
- package/dist/src/components/TagSet/TagSet.d.ts +2 -0
- package/dist/src/components/TagSet/TagSetExplore.d.ts +8 -4
- package/dist/src/components/TagSet/TagSetFilter.d.ts +6 -2
- package/dist/src/index.d.ts +16 -4
- package/dist/src/theme/components/breadcrumb.d.ts +20 -0
- package/dist/src/theme/components/featuredContent.d.ts +4 -4
- package/dist/src/theme/components/global.d.ts +11 -1
- package/dist/src/theme/components/heading.d.ts +15 -210
- package/dist/src/theme/components/menu.d.ts +18 -6
- package/dist/src/theme/components/multiSelectItemsCountButton.d.ts +1 -0
- package/dist/src/theme/components/notification.d.ts +12 -0
- package/dist/src/theme/components/skeletonLoader.d.ts +51 -60
- package/dist/src/theme/components/statusBadge.d.ts +1 -1
- package/dist/src/theme/components/structuredContent.d.ts +5 -72
- package/dist/src/theme/components/tabs.d.ts +2 -4
- package/package.json +1 -1
- package/dist/src/components/NewsletterSignup/NewsletterSignup.d.ts +0 -49
- package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +0 -43
- package/dist/src/components/SocialMediaLinks/SocialMediaLinksUtils.d.ts +0 -7
|
@@ -11,58 +11,83 @@ declare const imagePaddingBottomStyles: {
|
|
|
11
11
|
};
|
|
12
12
|
declare const SkeletonLoader: {
|
|
13
13
|
baseStyle?: ({ imageAspectRatio, isBordered }: SkeletonLoaderBaseStyle) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
marginBottom: string;
|
|
18
|
-
};
|
|
14
|
+
base: {
|
|
15
|
+
margin: string;
|
|
16
|
+
width: string;
|
|
19
17
|
};
|
|
20
|
-
|
|
21
|
-
boxSizing: string;
|
|
22
|
-
flexShrink: string;
|
|
18
|
+
button: {
|
|
23
19
|
height: string;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
position: string;
|
|
20
|
+
margin: string;
|
|
21
|
+
maxWidth: string;
|
|
27
22
|
width: string;
|
|
28
|
-
borderRadius: string;
|
|
29
|
-
marginBottom: string;
|
|
30
23
|
};
|
|
31
24
|
container: {
|
|
32
25
|
marginTop: string;
|
|
33
26
|
width: string;
|
|
34
27
|
};
|
|
35
|
-
|
|
28
|
+
content: {
|
|
36
29
|
height: string;
|
|
37
30
|
borderRadius: string;
|
|
38
31
|
boxSizing: string;
|
|
39
32
|
marginBottom: string;
|
|
40
33
|
};
|
|
41
|
-
|
|
34
|
+
heading: {
|
|
42
35
|
height: string;
|
|
43
36
|
borderRadius: string;
|
|
44
37
|
boxSizing: string;
|
|
45
38
|
marginBottom: string;
|
|
46
39
|
};
|
|
47
|
-
|
|
40
|
+
image: {
|
|
41
|
+
boxSizing: string;
|
|
42
|
+
flexShrink: string;
|
|
48
43
|
height: string;
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
overflow: string;
|
|
45
|
+
paddingBottom: string;
|
|
46
|
+
position: string;
|
|
51
47
|
width: string;
|
|
48
|
+
borderRadius: string;
|
|
49
|
+
marginBottom: string;
|
|
50
|
+
};
|
|
51
|
+
loader: {
|
|
52
|
+
borderRadius: string;
|
|
53
|
+
bg: string;
|
|
54
|
+
animation: string;
|
|
55
|
+
_dark: {
|
|
56
|
+
bg: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
section: {
|
|
60
|
+
marginBottom: string;
|
|
61
|
+
_last: {
|
|
62
|
+
marginBottom: string;
|
|
63
|
+
};
|
|
52
64
|
};
|
|
53
|
-
margin: string;
|
|
54
|
-
width: string;
|
|
55
65
|
};
|
|
56
66
|
sizes?: {
|
|
57
67
|
[key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{
|
|
58
|
-
keys: ("button" | "section" | "content" | "container" | "image" | "heading")[];
|
|
68
|
+
keys: ("base" | "button" | "section" | "content" | "container" | "image" | "heading" | "loader")[];
|
|
59
69
|
}>;
|
|
60
70
|
};
|
|
61
71
|
variants?: {
|
|
62
72
|
row: ({ imageAspectRatio, showImage }: SkeletonLoaderBaseStyle) => {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
73
|
+
base: {
|
|
74
|
+
alignItems: string;
|
|
75
|
+
display: {
|
|
76
|
+
md: "flex";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
button: {
|
|
80
|
+
margin: {
|
|
81
|
+
md: "0";
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
container: {
|
|
85
|
+
marginStart: {
|
|
86
|
+
md: "m";
|
|
87
|
+
};
|
|
88
|
+
marginTop: {
|
|
89
|
+
md: "0";
|
|
90
|
+
};
|
|
66
91
|
};
|
|
67
92
|
image: {
|
|
68
93
|
overflow: {
|
|
@@ -81,19 +106,6 @@ declare const SkeletonLoader: {
|
|
|
81
106
|
md: string;
|
|
82
107
|
};
|
|
83
108
|
};
|
|
84
|
-
container: {
|
|
85
|
-
marginStart: {
|
|
86
|
-
md: "m";
|
|
87
|
-
};
|
|
88
|
-
marginTop: {
|
|
89
|
-
md: "0";
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
button: {
|
|
93
|
-
margin: {
|
|
94
|
-
md: "0";
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
109
|
};
|
|
98
110
|
};
|
|
99
111
|
defaultProps?: {
|
|
@@ -101,27 +113,6 @@ declare const SkeletonLoader: {
|
|
|
101
113
|
variant?: "row";
|
|
102
114
|
colorScheme?: string;
|
|
103
115
|
};
|
|
104
|
-
parts: ("button" | "section" | "content" | "container" | "image" | "heading")[];
|
|
105
|
-
};
|
|
106
|
-
declare const Skeleton: {
|
|
107
|
-
baseStyle?: {
|
|
108
|
-
borderRadius: string;
|
|
109
|
-
bg: string;
|
|
110
|
-
animation: string;
|
|
111
|
-
_dark: {
|
|
112
|
-
bg: string;
|
|
113
|
-
};
|
|
114
|
-
};
|
|
115
|
-
sizes?: {
|
|
116
|
-
[key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
|
|
117
|
-
};
|
|
118
|
-
variants?: {
|
|
119
|
-
[key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
|
|
120
|
-
};
|
|
121
|
-
defaultProps?: {
|
|
122
|
-
size?: string | number;
|
|
123
|
-
variant?: string | number;
|
|
124
|
-
colorScheme?: string;
|
|
125
|
-
};
|
|
116
|
+
parts: ("base" | "button" | "section" | "content" | "container" | "image" | "heading" | "loader")[];
|
|
126
117
|
};
|
|
127
|
-
export
|
|
118
|
+
export default SkeletonLoader;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const StatusBadge: {
|
|
2
2
|
baseStyle?: {
|
|
3
|
+
alignItems: string;
|
|
3
4
|
bgColor: string;
|
|
4
5
|
borderLeft: string;
|
|
5
6
|
borderColor: string;
|
|
@@ -11,7 +12,6 @@ declare const StatusBadge: {
|
|
|
11
12
|
py: string;
|
|
12
13
|
paddingInlineEnd: string;
|
|
13
14
|
paddingInlineStart: string;
|
|
14
|
-
textAlign: string;
|
|
15
15
|
whiteSpace: string;
|
|
16
16
|
width: string;
|
|
17
17
|
_dark: {
|
|
@@ -12,15 +12,10 @@ declare const StructuredContent: {
|
|
|
12
12
|
a: {
|
|
13
13
|
textUnderlineOffset: string;
|
|
14
14
|
};
|
|
15
|
-
"@media (min-width: 0px)": {
|
|
16
|
-
fontSize: string;
|
|
17
|
-
};
|
|
18
|
-
"@media (min-width: 600px)": {
|
|
19
|
-
fontSize: string;
|
|
20
|
-
};
|
|
21
15
|
marginTop: string;
|
|
22
16
|
marginStart: string;
|
|
23
17
|
marginEnd: string;
|
|
18
|
+
fontSize: string;
|
|
24
19
|
fontWeight: string;
|
|
25
20
|
letterSpacing: string;
|
|
26
21
|
lineHeight: string;
|
|
@@ -32,15 +27,10 @@ declare const StructuredContent: {
|
|
|
32
27
|
a: {
|
|
33
28
|
textUnderlineOffset: string;
|
|
34
29
|
};
|
|
35
|
-
"@media (min-width: 0px)": {
|
|
36
|
-
fontSize: string;
|
|
37
|
-
};
|
|
38
|
-
"@media (min-width: 600px)": {
|
|
39
|
-
fontSize: string;
|
|
40
|
-
};
|
|
41
30
|
marginTop: string;
|
|
42
31
|
marginStart: string;
|
|
43
32
|
marginEnd: string;
|
|
33
|
+
fontSize: string;
|
|
44
34
|
fontWeight: string;
|
|
45
35
|
lineHeight: string;
|
|
46
36
|
};
|
|
@@ -48,15 +38,10 @@ declare const StructuredContent: {
|
|
|
48
38
|
three: {
|
|
49
39
|
base: {
|
|
50
40
|
width: string;
|
|
51
|
-
"@media (min-width: 0px)": {
|
|
52
|
-
fontSize: string;
|
|
53
|
-
};
|
|
54
|
-
"@media (min-width: 600px)": {
|
|
55
|
-
fontSize: string;
|
|
56
|
-
};
|
|
57
41
|
marginTop: string;
|
|
58
42
|
marginStart: string;
|
|
59
43
|
marginEnd: string;
|
|
44
|
+
fontSize: string;
|
|
60
45
|
fontWeight: string;
|
|
61
46
|
lineHeight: string;
|
|
62
47
|
};
|
|
@@ -64,15 +49,10 @@ declare const StructuredContent: {
|
|
|
64
49
|
four: {
|
|
65
50
|
base: {
|
|
66
51
|
width: string;
|
|
67
|
-
"@media (min-width: 0px)": {
|
|
68
|
-
fontSize: string;
|
|
69
|
-
};
|
|
70
|
-
"@media (min-width: 600px)": {
|
|
71
|
-
fontSize: string;
|
|
72
|
-
};
|
|
73
52
|
marginTop: string;
|
|
74
53
|
marginStart: string;
|
|
75
54
|
marginEnd: string;
|
|
55
|
+
fontSize: string;
|
|
76
56
|
fontWeight: string;
|
|
77
57
|
lineHeight: string;
|
|
78
58
|
};
|
|
@@ -80,15 +60,10 @@ declare const StructuredContent: {
|
|
|
80
60
|
fallback: {
|
|
81
61
|
base: {
|
|
82
62
|
width: string;
|
|
83
|
-
"@media (min-width: 0px)": {
|
|
84
|
-
fontSize: string;
|
|
85
|
-
};
|
|
86
|
-
"@media (min-width: 600px)": {
|
|
87
|
-
fontSize: string;
|
|
88
|
-
};
|
|
89
63
|
marginTop: string;
|
|
90
64
|
marginStart: string;
|
|
91
65
|
marginEnd: string;
|
|
66
|
+
fontSize: string;
|
|
92
67
|
fontWeight: string;
|
|
93
68
|
lineHeight: string;
|
|
94
69
|
};
|
|
@@ -106,12 +81,6 @@ declare const StructuredContent: {
|
|
|
106
81
|
a: {
|
|
107
82
|
textUnderlineOffset: string;
|
|
108
83
|
};
|
|
109
|
-
"@media (min-width: 0px)": {
|
|
110
|
-
fontSize: string;
|
|
111
|
-
};
|
|
112
|
-
"@media (min-width: 600px)": {
|
|
113
|
-
fontSize: string;
|
|
114
|
-
};
|
|
115
84
|
};
|
|
116
85
|
};
|
|
117
86
|
heading1: {
|
|
@@ -127,12 +96,6 @@ declare const StructuredContent: {
|
|
|
127
96
|
a: {
|
|
128
97
|
textUnderlineOffset: string;
|
|
129
98
|
};
|
|
130
|
-
"@media (min-width: 0px)": {
|
|
131
|
-
fontSize: string;
|
|
132
|
-
};
|
|
133
|
-
"@media (min-width: 600px)": {
|
|
134
|
-
fontSize: string;
|
|
135
|
-
};
|
|
136
99
|
};
|
|
137
100
|
};
|
|
138
101
|
heading2: {
|
|
@@ -148,12 +111,6 @@ declare const StructuredContent: {
|
|
|
148
111
|
a: {
|
|
149
112
|
textUnderlineOffset: string;
|
|
150
113
|
};
|
|
151
|
-
"@media (min-width: 0px)": {
|
|
152
|
-
fontSize: string;
|
|
153
|
-
};
|
|
154
|
-
"@media (min-width: 600px)": {
|
|
155
|
-
fontSize: string;
|
|
156
|
-
};
|
|
157
114
|
};
|
|
158
115
|
};
|
|
159
116
|
heading3: {
|
|
@@ -169,12 +126,6 @@ declare const StructuredContent: {
|
|
|
169
126
|
a: {
|
|
170
127
|
textUnderlineOffset: string;
|
|
171
128
|
};
|
|
172
|
-
"@media (min-width: 0px)": {
|
|
173
|
-
fontSize: string;
|
|
174
|
-
};
|
|
175
|
-
"@media (min-width: 600px)": {
|
|
176
|
-
fontSize: string;
|
|
177
|
-
};
|
|
178
129
|
};
|
|
179
130
|
};
|
|
180
131
|
heading4: {
|
|
@@ -190,12 +141,6 @@ declare const StructuredContent: {
|
|
|
190
141
|
a: {
|
|
191
142
|
textUnderlineOffset: string;
|
|
192
143
|
};
|
|
193
|
-
"@media (min-width: 0px)": {
|
|
194
|
-
fontSize: string;
|
|
195
|
-
};
|
|
196
|
-
"@media (min-width: 600px)": {
|
|
197
|
-
fontSize: string;
|
|
198
|
-
};
|
|
199
144
|
};
|
|
200
145
|
};
|
|
201
146
|
heading5: {
|
|
@@ -208,12 +153,6 @@ declare const StructuredContent: {
|
|
|
208
153
|
letterSpacing: string;
|
|
209
154
|
lineHeight: string;
|
|
210
155
|
width: string;
|
|
211
|
-
"@media (min-width: 0px)": {
|
|
212
|
-
fontSize: string;
|
|
213
|
-
};
|
|
214
|
-
"@media (min-width: 600px)": {
|
|
215
|
-
fontSize: string;
|
|
216
|
-
};
|
|
217
156
|
};
|
|
218
157
|
};
|
|
219
158
|
heading6: {
|
|
@@ -226,12 +165,6 @@ declare const StructuredContent: {
|
|
|
226
165
|
letterSpacing: string;
|
|
227
166
|
lineHeight: string;
|
|
228
167
|
width: string;
|
|
229
|
-
"@media (min-width: 0px)": {
|
|
230
|
-
fontSize: string;
|
|
231
|
-
};
|
|
232
|
-
"@media (min-width: 600px)": {
|
|
233
|
-
fontSize: string;
|
|
234
|
-
};
|
|
235
168
|
};
|
|
236
169
|
};
|
|
237
170
|
imageFigure: {
|
|
@@ -7,6 +7,7 @@ declare const CustomTabs: {
|
|
|
7
7
|
};
|
|
8
8
|
tablist: {
|
|
9
9
|
borderColor: string;
|
|
10
|
+
width: string;
|
|
10
11
|
};
|
|
11
12
|
tab: {
|
|
12
13
|
background: string;
|
|
@@ -160,10 +161,7 @@ declare const CustomTabs: {
|
|
|
160
161
|
display: string;
|
|
161
162
|
};
|
|
162
163
|
overflowY: string;
|
|
163
|
-
overflowX:
|
|
164
|
-
base: string;
|
|
165
|
-
md: string;
|
|
166
|
-
};
|
|
164
|
+
overflowX: string;
|
|
167
165
|
};
|
|
168
166
|
};
|
|
169
167
|
sizes?: {
|
package/package.json
CHANGED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { SectionTypes } from "../../helpers/types";
|
|
4
|
-
interface NewsletterSignupProps {
|
|
5
|
-
/** Additional class name to add. */
|
|
6
|
-
className?: string;
|
|
7
|
-
/** Text displayed next to the confirmation icon after a successful email submission */
|
|
8
|
-
confirmationHeading: string;
|
|
9
|
-
/** Detail text for the confirmation view */
|
|
10
|
-
confirmationText: string;
|
|
11
|
-
/** Appears below the title to provide details about the newsletter. Accepts a string or an element. */
|
|
12
|
-
descriptionText?: string | JSX.Element;
|
|
13
|
-
/** Text displayed next to the error icon in case of an error in the email submission process*/
|
|
14
|
-
errorHeading?: string;
|
|
15
|
-
/** Appears below the title to provide details about next steps in case of an error. Accepts a string or an element. */
|
|
16
|
-
errorText?: string | JSX.Element;
|
|
17
|
-
/** Appears below the input field's example text to provide any additional instructions. Accepts a string or
|
|
18
|
-
* an element. */
|
|
19
|
-
formHelperText?: string | JSX.Element;
|
|
20
|
-
/** ID that other components can cross-reference for accessibility purposes */
|
|
21
|
-
id?: string;
|
|
22
|
-
/** Toggles the invalid state for the email field. */
|
|
23
|
-
isInvalidEmail?: boolean;
|
|
24
|
-
/** Value to determine the section color highlight. The default is set to "blogs" as it uses the
|
|
25
|
-
* "ui.border.deafult" color.
|
|
26
|
-
*/
|
|
27
|
-
newsletterSignupType?: SectionTypes;
|
|
28
|
-
/** A handler function that will be called when the form is submitted. */
|
|
29
|
-
onSubmit: (event: React.FormEvent<any>) => void;
|
|
30
|
-
/** A handler function that will be called when the text input changes. */
|
|
31
|
-
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
32
|
-
/** Link to the relevant privacy policy page. */
|
|
33
|
-
privacyPolicyLink?: string;
|
|
34
|
-
/** Optional string value used to set the text for a `Heading` component, or
|
|
35
|
-
* a DS Heading component that can be passed in.
|
|
36
|
-
*/
|
|
37
|
-
title?: JSX.Element | string;
|
|
38
|
-
/** The value of the email text input field. */
|
|
39
|
-
valueEmail?: string;
|
|
40
|
-
/** Used to specify what is displayed in the component form/feedback area. */
|
|
41
|
-
view?: NewsletterSignupViewType;
|
|
42
|
-
}
|
|
43
|
-
export type NewsletterSignupViewType = "form" | "submitting" | "confirmation" | "error";
|
|
44
|
-
/**
|
|
45
|
-
* The NewsletterSignup component provides a way for patrons to register for an
|
|
46
|
-
* email-based newsletter distribution list.
|
|
47
|
-
*/
|
|
48
|
-
export declare const NewsletterSignup: ChakraComponent<React.ForwardRefExoticComponent<React.PropsWithChildren<NewsletterSignupProps> & React.RefAttributes<HTMLDivElement>>, React.PropsWithChildren<NewsletterSignupProps>>;
|
|
49
|
-
export default NewsletterSignup;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ChakraComponent } from "@chakra-ui/react";
|
|
2
|
-
import { LayoutTypes } from "../../helpers/types";
|
|
3
|
-
import React from "react";
|
|
4
|
-
export declare const borderTypeArray: readonly ["none", "circular", "straight"];
|
|
5
|
-
export type BorderType = typeof borderTypeArray[number];
|
|
6
|
-
export declare const colorTypeArray: readonly ["link", "textDefault", "textInverse"];
|
|
7
|
-
export type ColorType = typeof colorTypeArray[number];
|
|
8
|
-
export declare const sizeTypeArray: readonly ["small", "medium", "large"];
|
|
9
|
-
export type SizeType = typeof sizeTypeArray[number];
|
|
10
|
-
export declare const socialMediaLinkTypeArray: string[];
|
|
11
|
-
export type SocialMediaLinkType = typeof socialMediaLinkTypeArray[number];
|
|
12
|
-
export interface SocialMediaLinkDataProps {
|
|
13
|
-
/** Optional override for default platform name */
|
|
14
|
-
labelText?: string;
|
|
15
|
-
/** Required. Must be one of socialMediaLinkTypeArray */
|
|
16
|
-
type: SocialMediaLinkType;
|
|
17
|
-
/** Optional override for default social media url */
|
|
18
|
-
url?: string;
|
|
19
|
-
}
|
|
20
|
-
export interface SocialMediaLinksProps {
|
|
21
|
-
/** Optional border: straight, circular or none. */
|
|
22
|
-
borders?: BorderType;
|
|
23
|
-
/** Optional className you can add in addition to "social-media-links." */
|
|
24
|
-
className?: string;
|
|
25
|
-
/** Any of three optional values that will change the color of the svg and label text (if any). */
|
|
26
|
-
color?: ColorType;
|
|
27
|
-
/** ID that other components can cross-reference for accessibility purposes. */
|
|
28
|
-
id?: string;
|
|
29
|
-
/** Optional desktop layout. Smaller viewports are always in a column. */
|
|
30
|
-
layout?: LayoutTypes;
|
|
31
|
-
/** Optional array of social media platform types, urls, and label texts. */
|
|
32
|
-
linksData?: SocialMediaLinkDataProps[];
|
|
33
|
-
/** Optional true/false to display names of platforms along with icons.
|
|
34
|
-
* NOTE: Labels will NOT be shown with a circular border */
|
|
35
|
-
showLabels?: boolean;
|
|
36
|
-
/** Optional size: small, medium, or large. */
|
|
37
|
-
size?: SizeType;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* The SocialMediaLinks component renders a list of links for accessing social media sites.
|
|
41
|
-
*/
|
|
42
|
-
export declare const SocialMediaLinks: ChakraComponent<React.ForwardRefExoticComponent<SocialMediaLinksProps & React.RefAttributes<HTMLDivElement & HTMLUListElement & HTMLOListElement>>, SocialMediaLinksProps>;
|
|
43
|
-
export default SocialMediaLinks;
|