@nypl/design-system-react-components 2.0.0-rc2 → 2.0.0-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 +67 -67
- package/dist/design-system-react-components.js +8450 -8069
- package/dist/src/components/Icons/IconSvgs.d.ts +6 -0
- package/dist/src/components/Icons/iconVariables.d.ts +1 -1
- package/dist/src/components/Link/Link.d.ts +1 -0
- package/dist/src/components/Logo/LogoSvgs.d.ts +9 -0
- package/dist/src/components/Logo/logoVariables.d.ts +1 -1
- package/dist/src/components/SocialMediaLinks/SocialMediaLinks.d.ts +42 -0
- package/dist/src/components/SocialMediaLinks/SocialMediaLinksUtils.d.ts +7 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/theme/components/socialmedialinks.d.ts +192 -0
- package/package.json +1 -1
|
@@ -135,6 +135,9 @@ declare const _default: {
|
|
|
135
135
|
minus: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
136
136
|
title?: string;
|
|
137
137
|
}>;
|
|
138
|
+
moonCrescent: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
139
|
+
title?: string;
|
|
140
|
+
}>;
|
|
138
141
|
plus: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
139
142
|
title?: string;
|
|
140
143
|
}>;
|
|
@@ -174,6 +177,9 @@ declare const _default: {
|
|
|
174
177
|
speakerNotes: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
175
178
|
title?: string;
|
|
176
179
|
}>;
|
|
180
|
+
sunFull: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
181
|
+
title?: string;
|
|
182
|
+
}>;
|
|
177
183
|
utilityAccountFilled: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
178
184
|
title?: string;
|
|
179
185
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const iconAlignArray: readonly ["left", "right", "none"];
|
|
2
2
|
export declare const iconColorsArray: readonly ["ui.black", "ui.white", "brand.primary", "brand.secondary", "ui.error.primary", "ui.error.secondary", "ui.status.primary", "ui.status.secondary", "ui.success.primary", "ui.success.secondary", "ui.warning.primary", "ui.warning.secondary", "section.blogs.primary", "section.blogs.secondary", "section.books-and-more.primary", "section.books-and-more.secondary", "section.education.primary", "section.education.secondary", "section.locations.primary", "section.locations.secondary", "section.research.primary", "section.research.secondary", "section.research-library.lpa", "section.research-library.schomburg", "section.research-library.schwartzman", "section.whats-on.primary", "section.whats-on.secondary", "dark.ui.error.primary", "dark.ui.error.secondary", "dark.ui.status.primary", "dark.ui.status.secondary", "dark.ui.success.primary", "dark.ui.success.secondary", "dark.ui.warning.primary", "dark.ui.warning.secondary"];
|
|
3
|
-
export declare const iconNamesArray: readonly ["accessibilityFull", "accessibilityPartial", "actionCheckCircle", "actionCheckCircleFilled", "actionExit", "actionHelpDefault", "actionHelpOutline", "actionIdentity", "actionIdentityFilled", "actionLaunch", "actionPower", "actionRegistration", "actionSearch", "actionSettings", "alertNotificationImportant", "alertWarningFilled", "alertWarningOutline", "arrow", "building", "check", "clock", "close", "decorativeEnvelope", "decorativeLibraryCard", "decorativeShoppingBag", "download", "errorFilled", "errorOutline", "fileTypeAudio", "fileTypeDoc", "fileTypeGenericDoc", "fileTypeImage", "fileTypePdf", "fileTypeSpreadsheet", "fileTypeVideo", "headset", "legacyAccountFilled", "legacyAccountUnfilled", "legacySocialFacebook", "legacySocialInstagram", "legacySocialTwitter", "legacySocialYoutube", "locator", "mapsPlace", "minus", "plus", "search", "socialFacebook", "socialInstagram", "socialPinterest", "socialSoundCloud", "socialSpotify", "socialTikTok", "socialTumblr", "socialTwitter", "socialVimeo", "socialYoutube", "speakerNotes", "utilityAccountFilled", "utilityAccountUnfilled", "utilityHamburger", "utilitySearch"];
|
|
3
|
+
export declare const iconNamesArray: readonly ["accessibilityFull", "accessibilityPartial", "actionCheckCircle", "actionCheckCircleFilled", "actionExit", "actionHelpDefault", "actionHelpOutline", "actionIdentity", "actionIdentityFilled", "actionLaunch", "actionPower", "actionRegistration", "actionSearch", "actionSettings", "alertNotificationImportant", "alertWarningFilled", "alertWarningOutline", "arrow", "building", "check", "clock", "close", "decorativeEnvelope", "decorativeLibraryCard", "decorativeShoppingBag", "download", "errorFilled", "errorOutline", "fileTypeAudio", "fileTypeDoc", "fileTypeGenericDoc", "fileTypeImage", "fileTypePdf", "fileTypeSpreadsheet", "fileTypeVideo", "headset", "legacyAccountFilled", "legacyAccountUnfilled", "legacySocialFacebook", "legacySocialInstagram", "legacySocialTwitter", "legacySocialYoutube", "locator", "mapsPlace", "minus", "moonCrescent", "plus", "search", "socialFacebook", "socialInstagram", "socialPinterest", "socialSoundCloud", "socialSpotify", "socialTikTok", "socialTumblr", "socialTwitter", "socialVimeo", "socialYoutube", "speakerNotes", "sunFull", "utilityAccountFilled", "utilityAccountUnfilled", "utilityHamburger", "utilitySearch"];
|
|
4
4
|
export declare const iconRotationsArray: readonly ["rotate0", "rotate90", "rotate180", "rotate270"];
|
|
5
5
|
export declare const iconSizesArray: readonly ["default", "xsmall", "small", "medium", "large", "xlarge", "xxlarge", "xxxlarge"];
|
|
6
6
|
export declare const iconTypesArray: readonly ["default", "breadcrumbs"];
|
|
@@ -15,6 +15,7 @@ export interface LinkProps {
|
|
|
15
15
|
* underline in hover state. */
|
|
16
16
|
isUnderlined?: boolean;
|
|
17
17
|
onClick?: (event: React.MouseEvent<HTMLDivElement | HTMLAnchorElement, MouseEvent>) => void;
|
|
18
|
+
rel?: string;
|
|
18
19
|
/** Visibly hidden text that will only be read by screenreaders. */
|
|
19
20
|
screenreaderOnlyText?: string;
|
|
20
21
|
/** Prop that sets the HTML attribute to target where the link should go. */
|
|
@@ -63,6 +63,15 @@ declare const _default: {
|
|
|
63
63
|
nycdoeWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
64
64
|
title?: string;
|
|
65
65
|
}>;
|
|
66
|
+
nycpsBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
67
|
+
title?: string;
|
|
68
|
+
}>;
|
|
69
|
+
nycpsColor: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
70
|
+
title?: string;
|
|
71
|
+
}>;
|
|
72
|
+
nycpsWhite: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
73
|
+
title?: string;
|
|
74
|
+
}>;
|
|
66
75
|
nyplFullBlack: import("react").FunctionComponent<import("react").SVGProps<SVGSVGElement> & {
|
|
67
76
|
title?: string;
|
|
68
77
|
}>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const logoNamesArray: readonly ["appleAppStoreBlack", "appleAppStoreWhite", "bplBlack", "bplWhite", "cleverBadgeColor", "cleverColor", "cleverWhite", "digitalCollectionsBlack", "digitalCollectionsWhite", "firstbookColor", "firstbookColorNegative", "googlePlayBlack", "lpaBlack", "lpaColor", "lpaWhite", "mlnBlack", "mlnColor", "mlnWhite", "nycdoeBlack", "nycdoeColor", "nycdoeWhite", "nyplFullBlack", "nyplFullWhite", "nyplLionBlack", "nyplLionWhite", "nyplTextBlack", "nyplTextWhite", "openebooksColor", "openebooksNegative", "openebooksWithTextColor", "openebooksWithTextNegative", "qplAltBlack", "qplAltWhite", "qplBlack", "qplColor", "qplWhite", "reservoirIconColor", "reservoirVerticalColor", "schomburgBlack", "schomburgCircleBlack", "schomburgCircleColor", "schomburgCircleWhite", "schomburgColor", "schomburgWhite", "simplyeBlack", "simplyeWhite", "simplyeColor", "snflBlack", "snflWhite", "treasuresColor", "treasuresColorNegative"];
|
|
1
|
+
export declare const logoNamesArray: readonly ["appleAppStoreBlack", "appleAppStoreWhite", "bplBlack", "bplWhite", "cleverBadgeColor", "cleverColor", "cleverWhite", "digitalCollectionsBlack", "digitalCollectionsWhite", "firstbookColor", "firstbookColorNegative", "googlePlayBlack", "lpaBlack", "lpaColor", "lpaWhite", "mlnBlack", "mlnColor", "mlnWhite", "nycdoeBlack", "nycdoeColor", "nycdoeWhite", "nycpsBlack", "nycpsColor", "nycpsWhite", "nyplFullBlack", "nyplFullWhite", "nyplLionBlack", "nyplLionWhite", "nyplTextBlack", "nyplTextWhite", "openebooksColor", "openebooksNegative", "openebooksWithTextColor", "openebooksWithTextNegative", "qplAltBlack", "qplAltWhite", "qplBlack", "qplColor", "qplWhite", "reservoirIconColor", "reservoirVerticalColor", "schomburgBlack", "schomburgCircleBlack", "schomburgCircleColor", "schomburgCircleWhite", "schomburgColor", "schomburgWhite", "simplyeBlack", "simplyeWhite", "simplyeColor", "snflBlack", "snflWhite", "treasuresColor", "treasuresColorNegative"];
|
|
2
2
|
export declare const logoSizesArray: readonly ["default", "xxsmall", "xsmall", "small", "medium", "large"];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LayoutTypes } from "../../helpers/types";
|
|
2
|
+
import React from "react";
|
|
3
|
+
export declare const borderTypeArray: readonly ["none", "circular", "straight"];
|
|
4
|
+
export type BorderType = typeof borderTypeArray[number];
|
|
5
|
+
export declare const colorTypeArray: readonly ["link", "textDefault", "textInverse"];
|
|
6
|
+
export type ColorType = typeof colorTypeArray[number];
|
|
7
|
+
export declare const sizeTypeArray: readonly ["small", "medium", "large"];
|
|
8
|
+
export type SizeType = typeof sizeTypeArray[number];
|
|
9
|
+
export declare const socialMediaLinkTypeArray: string[];
|
|
10
|
+
export type SocialMediaLinkType = typeof socialMediaLinkTypeArray[number];
|
|
11
|
+
export interface SocialMediaLinkDataProps {
|
|
12
|
+
/** Optional override for default platform name */
|
|
13
|
+
labelText?: string;
|
|
14
|
+
/** Required. Must be one of socialMediaLinkTypeArray */
|
|
15
|
+
type: SocialMediaLinkType;
|
|
16
|
+
/** Optional override for default social media url */
|
|
17
|
+
url?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SocialMediaLinksProps {
|
|
20
|
+
/** Optional border: straight, circular or none. */
|
|
21
|
+
borders?: BorderType;
|
|
22
|
+
/** Optional className you can add in addition to "social-media-links." */
|
|
23
|
+
className?: string;
|
|
24
|
+
/** Any of three optional values that will change the color of the svg and label text (if any). */
|
|
25
|
+
color?: ColorType;
|
|
26
|
+
/** ID that other components can cross-reference for accessibility purposes. */
|
|
27
|
+
id?: string;
|
|
28
|
+
/** Optional desktop layout. Smaller viewports are always in a column. */
|
|
29
|
+
layout?: LayoutTypes;
|
|
30
|
+
/** Optional array of social media platform types, urls, and label texts. */
|
|
31
|
+
linksData?: SocialMediaLinkDataProps[];
|
|
32
|
+
/** Optional true/false to display names of platforms along with icons.
|
|
33
|
+
* NOTE: Labels will NOT be shown with a circular border */
|
|
34
|
+
showLabels?: boolean;
|
|
35
|
+
/** Optional size: small, medium, or large. */
|
|
36
|
+
size?: SizeType;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The SocialMediaLinks component renders a list of links for accessing social media sites.
|
|
40
|
+
*/
|
|
41
|
+
export declare const SocialMediaLinks: import("@chakra-ui/react").ChakraComponent<React.ForwardRefExoticComponent<SocialMediaLinksProps & React.RefAttributes<HTMLDivElement & HTMLUListElement & HTMLOListElement>>, {}>;
|
|
42
|
+
export default SocialMediaLinks;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export { default as Hero } from "./components/Hero/Hero";
|
|
|
28
28
|
export type { HeroTypes } from "./components/Hero/Hero";
|
|
29
29
|
export { default as HorizontalRule } from "./components/HorizontalRule/HorizontalRule";
|
|
30
30
|
export { default as Icon } from "./components/Icons/Icon";
|
|
31
|
-
export type { IconAlign, IconColors, IconNames, IconRotations, IconSizes, IconTypes, } from "./components/Icons/Icon";
|
|
31
|
+
export type { IconAlign, IconColors, IconNames, IconRotationTypes, IconRotations, IconSizes, IconTypes, } from "./components/Icons/Icon";
|
|
32
32
|
export { default as Image } from "./components/Image/Image";
|
|
33
33
|
export type { ImageRatios, ImageSizes, ImageTypes, } from "./components/Image/Image";
|
|
34
34
|
export { default as Label } from "./components/Label/Label";
|
|
@@ -60,6 +60,7 @@ export { default as SkeletonLoader } from "./components/SkeletonLoader/SkeletonL
|
|
|
60
60
|
export type { SkeletonLoaderImageRatios } from "./components/SkeletonLoader/SkeletonLoader";
|
|
61
61
|
export { default as SkipNavigation } from "./components/SkipNavigation/SkipNavigation";
|
|
62
62
|
export { default as Slider } from "./components/Slider/Slider";
|
|
63
|
+
export { default as SocialMediaLinks } from "./components/SocialMediaLinks/SocialMediaLinks";
|
|
63
64
|
export { default as StatusBadge } from "./components/StatusBadge/StatusBadge";
|
|
64
65
|
export type { StatusBadgeTypes } from "./components/StatusBadge/StatusBadge";
|
|
65
66
|
export { default as StructuredContent } from "./components/StructuredContent/StructuredContent";
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { StyleFunctionProps } from "@chakra-ui/theme-tools";
|
|
2
|
+
declare const SocialMediaLinks: {
|
|
3
|
+
baseStyle: {
|
|
4
|
+
display: string;
|
|
5
|
+
alignItems: string;
|
|
6
|
+
gap: string;
|
|
7
|
+
width: {
|
|
8
|
+
base: string;
|
|
9
|
+
md: string;
|
|
10
|
+
};
|
|
11
|
+
marginBottom: string;
|
|
12
|
+
li: {
|
|
13
|
+
marginInlineEnd: string;
|
|
14
|
+
marginTop: string;
|
|
15
|
+
width: {
|
|
16
|
+
base: string;
|
|
17
|
+
md: string;
|
|
18
|
+
};
|
|
19
|
+
_notFirst: {
|
|
20
|
+
marginTop: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
a: {
|
|
24
|
+
display: string;
|
|
25
|
+
justifyContent: string;
|
|
26
|
+
alignContent: string;
|
|
27
|
+
flexWrap: string;
|
|
28
|
+
minWidth: {
|
|
29
|
+
base: string;
|
|
30
|
+
md: string;
|
|
31
|
+
};
|
|
32
|
+
minHeight: {
|
|
33
|
+
base: string;
|
|
34
|
+
md: string;
|
|
35
|
+
};
|
|
36
|
+
fontStyle: string;
|
|
37
|
+
fontSize: string;
|
|
38
|
+
textDecoration: string;
|
|
39
|
+
color: string;
|
|
40
|
+
_hover: {
|
|
41
|
+
color: string;
|
|
42
|
+
};
|
|
43
|
+
_visited: {
|
|
44
|
+
color: string;
|
|
45
|
+
};
|
|
46
|
+
_dark: {
|
|
47
|
+
color: string;
|
|
48
|
+
_hover: {
|
|
49
|
+
color: string;
|
|
50
|
+
};
|
|
51
|
+
_visited: {
|
|
52
|
+
color: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
div: {
|
|
57
|
+
display: string;
|
|
58
|
+
alignItems: string;
|
|
59
|
+
gap: string;
|
|
60
|
+
alignSelf: string;
|
|
61
|
+
justifyContent: string;
|
|
62
|
+
width: string;
|
|
63
|
+
height: string;
|
|
64
|
+
};
|
|
65
|
+
svg: {
|
|
66
|
+
fill: string;
|
|
67
|
+
_dark: {
|
|
68
|
+
fill: string;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
variants: {
|
|
73
|
+
straight(props: StyleFunctionProps): {
|
|
74
|
+
flexDirection: {
|
|
75
|
+
base: string;
|
|
76
|
+
md: any;
|
|
77
|
+
};
|
|
78
|
+
gap: string;
|
|
79
|
+
a: {
|
|
80
|
+
color: string;
|
|
81
|
+
_hover: {
|
|
82
|
+
color: string;
|
|
83
|
+
};
|
|
84
|
+
_visited: {
|
|
85
|
+
color: string;
|
|
86
|
+
};
|
|
87
|
+
_dark: {
|
|
88
|
+
borderColor: string;
|
|
89
|
+
color: string;
|
|
90
|
+
_hover: {
|
|
91
|
+
color: string;
|
|
92
|
+
};
|
|
93
|
+
_visited: {
|
|
94
|
+
color: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
div: {
|
|
99
|
+
padding: string;
|
|
100
|
+
borderRadius: string;
|
|
101
|
+
borderWidth: string;
|
|
102
|
+
borderStyle: string;
|
|
103
|
+
borderColor: string;
|
|
104
|
+
_dark: {
|
|
105
|
+
borderColor: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
svg: {
|
|
109
|
+
fill: string;
|
|
110
|
+
_dark: {
|
|
111
|
+
fill: string;
|
|
112
|
+
borderColor: string;
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
circular(props: StyleFunctionProps): {
|
|
117
|
+
flexDirection: {
|
|
118
|
+
base: string;
|
|
119
|
+
md: any;
|
|
120
|
+
};
|
|
121
|
+
gap: string;
|
|
122
|
+
a: {
|
|
123
|
+
color: string;
|
|
124
|
+
_hover: {
|
|
125
|
+
color: string;
|
|
126
|
+
};
|
|
127
|
+
_visited: {
|
|
128
|
+
color: string;
|
|
129
|
+
};
|
|
130
|
+
_dark: {
|
|
131
|
+
color: string;
|
|
132
|
+
_hover: {
|
|
133
|
+
color: string;
|
|
134
|
+
};
|
|
135
|
+
_visited: {
|
|
136
|
+
color: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
div: {
|
|
141
|
+
padding: string;
|
|
142
|
+
borderRadius: string;
|
|
143
|
+
borderColor: string;
|
|
144
|
+
borderWidth: string;
|
|
145
|
+
borderStyle: string;
|
|
146
|
+
_dark: {
|
|
147
|
+
borderColor: string;
|
|
148
|
+
};
|
|
149
|
+
};
|
|
150
|
+
svg: {
|
|
151
|
+
fill: string;
|
|
152
|
+
_dark: {
|
|
153
|
+
fill: string;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
none(props: StyleFunctionProps): {
|
|
158
|
+
flexDirection: {
|
|
159
|
+
base: string;
|
|
160
|
+
md: any;
|
|
161
|
+
};
|
|
162
|
+
a: {
|
|
163
|
+
color: string;
|
|
164
|
+
_hover: {
|
|
165
|
+
color: string;
|
|
166
|
+
};
|
|
167
|
+
_visited: {
|
|
168
|
+
color: string;
|
|
169
|
+
};
|
|
170
|
+
_dark: {
|
|
171
|
+
color: string;
|
|
172
|
+
_hover: {
|
|
173
|
+
color: string;
|
|
174
|
+
};
|
|
175
|
+
_visited: {
|
|
176
|
+
color: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
svg: {
|
|
181
|
+
fill: string;
|
|
182
|
+
_dark: {
|
|
183
|
+
fill: string;
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
defaultProps: {
|
|
189
|
+
variant: string;
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
export default SocialMediaLinks;
|