@nypl/design-system-react-components 4.1.2 → 4.1.4
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 +46 -46
- package/dist/design-system-react-components.js +8054 -7413
- package/dist/src/components/Hero/Hero.d.ts +8 -3
- package/dist/src/components/TagSet/TagSetExplore.d.ts +4 -0
- package/dist/src/components/TagSet/TagSetFilter.d.ts +4 -0
- package/dist/src/theme/components/hero.d.ts +2 -1
- package/dist/src/theme/components/statusBadge.d.ts +0 -1
- package/dist/src/theme/components/tagSet.d.ts +7 -134
- package/package.json +1 -1
|
@@ -41,9 +41,14 @@ export interface HeroProps extends BoxProps {
|
|
|
41
41
|
* Set `isDarkText` to `true` if the `textBackgroundColor` is set to a light
|
|
42
42
|
* color. */
|
|
43
43
|
isDarkText?: boolean;
|
|
44
|
-
/** Optional boolean used to toggle the treatment of the background image
|
|
45
|
-
* the "campaign" variant. If true, the background image will be
|
|
46
|
-
*
|
|
44
|
+
/** Optional boolean used to toggle the blur treatment of the background image
|
|
45
|
+
* in the "campaign" variant. If true, the background image will be blurred
|
|
46
|
+
* and darkened slightly.
|
|
47
|
+
*/
|
|
48
|
+
isBlurredBackgroundImage?: boolean;
|
|
49
|
+
/** Optional boolean used to toggle the color treatment of the background
|
|
50
|
+
* image in the "campaign" variant. If true, the background image will be
|
|
51
|
+
* converted to black & white and darkened moderately. */
|
|
47
52
|
isDarkBackgroundImage?: boolean;
|
|
48
53
|
/** Optional string used for the subheader that displays underneath the
|
|
49
54
|
* heading element. */
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { BoxProps } from "@chakra-ui/react";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import { IconNames } from "../Icons/Icon";
|
|
4
|
+
import { messageVariantsArray } from "../../theme/sharedTypes";
|
|
5
|
+
export type TagSemanticVariants = typeof messageVariantsArray[number];
|
|
4
6
|
export interface TagSetExploreDataProps {
|
|
5
7
|
/** The name of the SVG `Icon` to render before the tag label. */
|
|
6
8
|
iconName?: IconNames;
|
|
@@ -19,6 +21,8 @@ export interface TagSetExploreProps extends BoxProps {
|
|
|
19
21
|
/** The function to perform when a tag is clicked when `isDismissible` is
|
|
20
22
|
* true. This prop is not used in the "explore" variant. */
|
|
21
23
|
onClick?: never;
|
|
24
|
+
/** Semantic type of the tags. */
|
|
25
|
+
semanticVariant?: TagSemanticVariants | "default";
|
|
22
26
|
/** The array of data to display as tags. */
|
|
23
27
|
tagSetData: TagSetExploreDataProps[];
|
|
24
28
|
/** The `TagSet` variant to render; "filter" by default. */
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BoxProps } from "@chakra-ui/react";
|
|
3
3
|
import { IconNames } from "../Icons/Icon";
|
|
4
|
+
import { messageVariantsArray } from "../../theme/sharedTypes";
|
|
5
|
+
export type TagSemanticVariants = typeof messageVariantsArray[number];
|
|
4
6
|
export interface TagSetFilterDataProps {
|
|
5
7
|
/** The name of the SVG `Icon` to render before the tag label. */
|
|
6
8
|
iconName?: IconNames;
|
|
@@ -16,6 +18,8 @@ export interface TagSetFilterProps extends Omit<BoxProps, "onClick"> {
|
|
|
16
18
|
isDismissible?: boolean;
|
|
17
19
|
/** The function to perform when a tag is clicked when `isDismissible` is true. */
|
|
18
20
|
onClick?: (tagSet: TagSetFilterDataProps) => void;
|
|
21
|
+
/** Semantic type of the tags. */
|
|
22
|
+
semanticVariant?: TagSemanticVariants | "default";
|
|
19
23
|
/** The array of data to display as tags. */
|
|
20
24
|
tagSetData: TagSetFilterDataProps[];
|
|
21
25
|
/** The `TagSet` variant to render; "filter" by default. */
|
|
@@ -568,7 +568,7 @@ declare const Hero: {
|
|
|
568
568
|
};
|
|
569
569
|
};
|
|
570
570
|
};
|
|
571
|
-
campaign: ({ foregroundColor, isDarkText, textColor }: import("@chakra-ui/styled-system").StyleFunctionProps) => {
|
|
571
|
+
campaign: ({ foregroundColor, isBlurredBackgroundImage, isDarkBackgroundImage, isDarkText, textColor, }: import("@chakra-ui/styled-system").StyleFunctionProps) => {
|
|
572
572
|
base: {
|
|
573
573
|
alignItems: string;
|
|
574
574
|
display: string;
|
|
@@ -603,6 +603,7 @@ declare const Hero: {
|
|
|
603
603
|
content: {
|
|
604
604
|
alignItems: string;
|
|
605
605
|
bg: string;
|
|
606
|
+
boxShadow: string;
|
|
606
607
|
color: any;
|
|
607
608
|
display: string;
|
|
608
609
|
flexFlow: {
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { StyleFunctionProps } from "@chakra-ui/system";
|
|
2
2
|
interface TagSetFilterProps extends StyleFunctionProps {
|
|
3
3
|
isDismissible: boolean;
|
|
4
|
+
semanticVariant: string;
|
|
5
|
+
}
|
|
6
|
+
interface TagSetExploreProps extends StyleFunctionProps {
|
|
7
|
+
semanticVariant: string;
|
|
4
8
|
}
|
|
5
9
|
declare const _default: {
|
|
6
10
|
TagSet: {
|
|
@@ -23,93 +27,7 @@ declare const _default: {
|
|
|
23
27
|
};
|
|
24
28
|
};
|
|
25
29
|
TagSetExplore: {
|
|
26
|
-
baseStyle?: {
|
|
27
|
-
_focusWithin: {
|
|
28
|
-
boxShadow: string;
|
|
29
|
-
outline: string;
|
|
30
|
-
outlineOffset: string;
|
|
31
|
-
outlineColor: string;
|
|
32
|
-
_dark: {
|
|
33
|
-
outlineColor: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
a: {
|
|
37
|
-
border: string;
|
|
38
|
-
_focus: {
|
|
39
|
-
outline: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
"> span": {
|
|
43
|
-
display: string;
|
|
44
|
-
overflow: string;
|
|
45
|
-
textOverflow: string;
|
|
46
|
-
whiteSpace: string;
|
|
47
|
-
};
|
|
48
|
-
svg: {
|
|
49
|
-
fill: string;
|
|
50
|
-
};
|
|
51
|
-
_hover: {
|
|
52
|
-
bg: string;
|
|
53
|
-
borderColor: string;
|
|
54
|
-
a: {
|
|
55
|
-
color: string;
|
|
56
|
-
};
|
|
57
|
-
svg: {
|
|
58
|
-
fill: string;
|
|
59
|
-
};
|
|
60
|
-
"> span": {
|
|
61
|
-
color: string;
|
|
62
|
-
};
|
|
63
|
-
};
|
|
64
|
-
_dark: {
|
|
65
|
-
bg: string;
|
|
66
|
-
borderColor: string;
|
|
67
|
-
color: string;
|
|
68
|
-
a: {
|
|
69
|
-
color: string;
|
|
70
|
-
};
|
|
71
|
-
svg: {
|
|
72
|
-
fill: string;
|
|
73
|
-
};
|
|
74
|
-
_hover: {
|
|
75
|
-
bg: string;
|
|
76
|
-
borderColor: string;
|
|
77
|
-
a: {
|
|
78
|
-
color: string;
|
|
79
|
-
};
|
|
80
|
-
svg: {
|
|
81
|
-
fill: string;
|
|
82
|
-
};
|
|
83
|
-
"> span": {
|
|
84
|
-
color: string;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
};
|
|
88
|
-
transitionDuration: string;
|
|
89
|
-
transitionTimingFunction: string;
|
|
90
|
-
textDecoration: string;
|
|
91
|
-
textDecorationStyle: string;
|
|
92
|
-
textDecorationThickness: string;
|
|
93
|
-
display: string;
|
|
94
|
-
alignItems: string;
|
|
95
|
-
justifyContent: string;
|
|
96
|
-
bg: string;
|
|
97
|
-
border: string;
|
|
98
|
-
borderColor: string;
|
|
99
|
-
borderRadius: string;
|
|
100
|
-
color: string;
|
|
101
|
-
cursor: string;
|
|
102
|
-
fontSize: string;
|
|
103
|
-
height: {
|
|
104
|
-
base: "32px";
|
|
105
|
-
md: "22px";
|
|
106
|
-
};
|
|
107
|
-
minHeight: string;
|
|
108
|
-
maxWidth: string;
|
|
109
|
-
py: string;
|
|
110
|
-
px: string;
|
|
111
|
-
textUnderlineOffset: string;
|
|
112
|
-
};
|
|
30
|
+
baseStyle?: ({ semanticVariant }: TagSetExploreProps) => any;
|
|
113
31
|
sizes?: {
|
|
114
32
|
[key: string]: import("@chakra-ui/styled-system").SystemStyleInterpolation;
|
|
115
33
|
};
|
|
@@ -123,53 +41,8 @@ declare const _default: {
|
|
|
123
41
|
};
|
|
124
42
|
};
|
|
125
43
|
TagSetFilter: {
|
|
126
|
-
baseStyle?: ({ isDismissible }: TagSetFilterProps) => {
|
|
127
|
-
base:
|
|
128
|
-
"> span": {
|
|
129
|
-
display: string;
|
|
130
|
-
overflow: string;
|
|
131
|
-
textOverflow: string;
|
|
132
|
-
whiteSpace: string;
|
|
133
|
-
};
|
|
134
|
-
_hover: {
|
|
135
|
-
bg: string;
|
|
136
|
-
borderColor: string;
|
|
137
|
-
};
|
|
138
|
-
_dark: {
|
|
139
|
-
bg: string;
|
|
140
|
-
borderColor: string;
|
|
141
|
-
color: string;
|
|
142
|
-
_hover: {
|
|
143
|
-
bg: string;
|
|
144
|
-
borderColor: string;
|
|
145
|
-
color: string;
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
transitionDuration: string;
|
|
149
|
-
transitionTimingFunction: string;
|
|
150
|
-
alignItems: string;
|
|
151
|
-
bg: string;
|
|
152
|
-
border: string;
|
|
153
|
-
borderColor: string;
|
|
154
|
-
borderRadius: string;
|
|
155
|
-
color: string;
|
|
156
|
-
cursor: string;
|
|
157
|
-
display: string;
|
|
158
|
-
fontSize: string;
|
|
159
|
-
height: {
|
|
160
|
-
base: "32px";
|
|
161
|
-
md: "22px";
|
|
162
|
-
};
|
|
163
|
-
justifyContent: string;
|
|
164
|
-
minHeight: string;
|
|
165
|
-
maxWidth: string;
|
|
166
|
-
py: string;
|
|
167
|
-
paddingLeft: string;
|
|
168
|
-
paddingRight: string | {
|
|
169
|
-
base: "8px";
|
|
170
|
-
md: "6px";
|
|
171
|
-
};
|
|
172
|
-
};
|
|
44
|
+
baseStyle?: ({ isDismissible, semanticVariant }: TagSetFilterProps) => {
|
|
45
|
+
base: any;
|
|
173
46
|
};
|
|
174
47
|
sizes?: {
|
|
175
48
|
[key: string]: import("@chakra-ui/styled-system").PartsStyleInterpolation<{
|