@zendeskgarden/react-tags 9.1.0 → 9.1.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/esm/elements/Tag.js
CHANGED
|
@@ -15,15 +15,21 @@ import { Avatar } from './Avatar.js';
|
|
|
15
15
|
|
|
16
16
|
const TagComponent = forwardRef((_ref, ref) => {
|
|
17
17
|
let {
|
|
18
|
+
isPill,
|
|
19
|
+
isRound,
|
|
20
|
+
isRegular,
|
|
18
21
|
size,
|
|
19
22
|
hue,
|
|
20
|
-
...
|
|
23
|
+
...other
|
|
21
24
|
} = _ref;
|
|
22
25
|
return React__default.createElement(StyledTag, Object.assign({
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
$hue: hue,
|
|
27
|
+
$isPill: isPill,
|
|
28
|
+
$isRegular: isRegular,
|
|
29
|
+
$isRound: isRound,
|
|
30
|
+
$size: size,
|
|
31
|
+
ref: ref
|
|
32
|
+
}, other));
|
|
27
33
|
});
|
|
28
34
|
TagComponent.displayName = 'Tag';
|
|
29
35
|
TagComponent.propTypes = {
|
|
@@ -10,7 +10,7 @@ import { StyledBaseIcon, retrieveComponentStyles } from '@zendeskgarden/react-th
|
|
|
10
10
|
const COMPONENT_ID = 'tags.avatar';
|
|
11
11
|
const StyledAvatar = styled(StyledBaseIcon).attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.1.
|
|
13
|
+
'data-garden-version': '9.1.2'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledAvatar",
|
|
16
16
|
componentId: "sc-3kdmgt-0"
|
|
@@ -10,7 +10,7 @@ import { retrieveComponentStyles } from '@zendeskgarden/react-theming';
|
|
|
10
10
|
const COMPONENT_ID = 'tags.close';
|
|
11
11
|
const StyledClose = styled.button.attrs({
|
|
12
12
|
'data-garden-id': COMPONENT_ID,
|
|
13
|
-
'data-garden-version': '9.1.
|
|
13
|
+
'data-garden-version': '9.1.2'
|
|
14
14
|
}).withConfig({
|
|
15
15
|
displayName: "StyledClose",
|
|
16
16
|
componentId: "sc-d6lrpn-0"
|
|
@@ -14,16 +14,16 @@ const COMPONENT_ID = 'tags.tag_view';
|
|
|
14
14
|
const colorStyles = _ref => {
|
|
15
15
|
let {
|
|
16
16
|
theme,
|
|
17
|
-
hue
|
|
17
|
+
$hue
|
|
18
18
|
} = _ref;
|
|
19
19
|
let backgroundColor;
|
|
20
20
|
let foregroundColor;
|
|
21
|
-
if (hue) {
|
|
21
|
+
if ($hue) {
|
|
22
22
|
foregroundColor = getColor({
|
|
23
23
|
theme,
|
|
24
24
|
variable: 'foreground.onEmphasis'
|
|
25
25
|
});
|
|
26
|
-
switch (hue) {
|
|
26
|
+
switch ($hue) {
|
|
27
27
|
case 'grey':
|
|
28
28
|
case 'neutralHue':
|
|
29
29
|
backgroundColor = getColor({
|
|
@@ -101,7 +101,7 @@ const colorStyles = _ref => {
|
|
|
101
101
|
const variable = 'foreground.onEmphasis';
|
|
102
102
|
backgroundColor = getColor({
|
|
103
103
|
theme,
|
|
104
|
-
hue
|
|
104
|
+
hue: $hue
|
|
105
105
|
});
|
|
106
106
|
foregroundColor = readableColor(backgroundColor, getColor({
|
|
107
107
|
theme: darkTheme,
|
|
@@ -135,63 +135,69 @@ const colorStyles = _ref => {
|
|
|
135
135
|
selector: '&:focus'
|
|
136
136
|
}));
|
|
137
137
|
};
|
|
138
|
-
const sizeStyles =
|
|
138
|
+
const sizeStyles = _ref2 => {
|
|
139
|
+
let {
|
|
140
|
+
$isPill,
|
|
141
|
+
$isRound,
|
|
142
|
+
$size,
|
|
143
|
+
theme
|
|
144
|
+
} = _ref2;
|
|
139
145
|
let borderRadius;
|
|
140
146
|
let padding;
|
|
141
147
|
let height;
|
|
142
148
|
let fontSize;
|
|
143
149
|
let minWidth;
|
|
144
150
|
let avatarSize;
|
|
145
|
-
if (
|
|
146
|
-
borderRadius =
|
|
147
|
-
padding =
|
|
148
|
-
height =
|
|
149
|
-
fontSize =
|
|
151
|
+
if ($size === 'small') {
|
|
152
|
+
borderRadius = theme.borderRadii.sm;
|
|
153
|
+
padding = theme.space.base;
|
|
154
|
+
height = theme.space.base * 4;
|
|
155
|
+
fontSize = theme.fontSizes.xs;
|
|
150
156
|
avatarSize = 0;
|
|
151
|
-
} else if (
|
|
152
|
-
borderRadius =
|
|
153
|
-
padding =
|
|
154
|
-
height =
|
|
155
|
-
fontSize =
|
|
156
|
-
avatarSize =
|
|
157
|
+
} else if ($size === 'large') {
|
|
158
|
+
borderRadius = theme.borderRadii.md;
|
|
159
|
+
padding = theme.space.base * 3;
|
|
160
|
+
height = theme.space.base * 8;
|
|
161
|
+
fontSize = theme.fontSizes.sm;
|
|
162
|
+
avatarSize = theme.space.base * 6;
|
|
157
163
|
} else {
|
|
158
|
-
borderRadius =
|
|
159
|
-
padding =
|
|
160
|
-
height =
|
|
161
|
-
fontSize =
|
|
162
|
-
avatarSize =
|
|
164
|
+
borderRadius = theme.borderRadii.sm;
|
|
165
|
+
padding = theme.space.base * 2;
|
|
166
|
+
height = theme.space.base * 5;
|
|
167
|
+
fontSize = theme.fontSizes.sm;
|
|
168
|
+
avatarSize = theme.space.base * 4;
|
|
163
169
|
}
|
|
164
|
-
let avatarBorderRadius =
|
|
170
|
+
let avatarBorderRadius = $size === 'large' ? math(`${borderRadius} - 1`) : borderRadius;
|
|
165
171
|
const avatarMargin = (height - avatarSize) / 2;
|
|
166
|
-
const avatarTextMargin =
|
|
167
|
-
if (
|
|
172
|
+
const avatarTextMargin = $isRound ? avatarMargin : avatarMargin * 2;
|
|
173
|
+
if ($isRound) {
|
|
168
174
|
borderRadius = '50%';
|
|
169
175
|
padding = 0;
|
|
170
176
|
minWidth = height;
|
|
171
177
|
avatarBorderRadius = '50%';
|
|
172
|
-
} else if (
|
|
178
|
+
} else if ($isPill) {
|
|
173
179
|
borderRadius = '100px';
|
|
174
180
|
avatarBorderRadius = '50%';
|
|
175
|
-
if (
|
|
176
|
-
padding =
|
|
177
|
-
minWidth =
|
|
178
|
-
} else if (
|
|
179
|
-
minWidth =
|
|
181
|
+
if ($size === 'small') {
|
|
182
|
+
padding = theme.space.base * 1.5;
|
|
183
|
+
minWidth = theme.space.base * 6;
|
|
184
|
+
} else if ($size === 'large') {
|
|
185
|
+
minWidth = theme.space.base * 12;
|
|
180
186
|
} else {
|
|
181
|
-
minWidth =
|
|
187
|
+
minWidth = theme.space.base * 7.5;
|
|
182
188
|
}
|
|
183
189
|
}
|
|
184
|
-
return css(["border-radius:", ";padding:0 ", "px;min-width:", ";height:", "px;line-height:", ";font-size:", ";& > *{width:100%;min-width:", ";}& ", "{margin-", ":-", "px;margin-", ":", "px;border-radius:", ";width:", "px;min-width:", "px;height:", "px;}& ", "{margin-", ":-", "px;border-radius:", ";width:", "px;height:", "px;}"], borderRadius, padding, minWidth ? `${minWidth}px` : `calc(${padding * 2}px + 1ch)`, height, getLineHeight(height, fontSize), fontSize, minWidth ? `${minWidth - padding * 2}px` : '1ch', StyledAvatar,
|
|
190
|
+
return css(["border-radius:", ";padding:0 ", "px;min-width:", ";height:", "px;line-height:", ";font-size:", ";& > *{width:100%;min-width:", ";}& ", "{margin-", ":-", "px;margin-", ":", "px;border-radius:", ";width:", "px;min-width:", "px;height:", "px;}& ", "{margin-", ":-", "px;border-radius:", ";width:", "px;height:", "px;}"], borderRadius, padding, minWidth ? `${minWidth}px` : `calc(${padding * 2}px + 1ch)`, height, getLineHeight(height, fontSize), fontSize, minWidth ? `${minWidth - padding * 2}px` : '1ch', StyledAvatar, theme.rtl ? 'right' : 'left', padding - avatarMargin, theme.rtl ? 'left' : 'right', avatarTextMargin, avatarBorderRadius, avatarSize, avatarSize, avatarSize, StyledClose, theme.rtl ? 'left' : 'right', padding, borderRadius, height, height);
|
|
185
191
|
};
|
|
186
192
|
const StyledTag = styled.div.attrs({
|
|
187
193
|
'data-garden-id': COMPONENT_ID,
|
|
188
|
-
'data-garden-version': '9.1.
|
|
194
|
+
'data-garden-version': '9.1.2'
|
|
189
195
|
}).withConfig({
|
|
190
196
|
displayName: "StyledTag",
|
|
191
197
|
componentId: "sc-1jvbe03-0"
|
|
192
|
-
})(["display:inline-flex;flex-wrap:nowrap;align-items:center;justify-content:", ";transition:box-shadow 0.1s ease-in-out;box-sizing:border-box;border:0;max-width:100%;overflow:hidden;vertical-align:middle;text-decoration:none;white-space:nowrap;font-weight:", ";direction:", ";", ";&:hover{cursor:default;text-decoration:none;}&:link:hover,&:visited:hover{cursor:pointer;}&:any-link:hover{cursor:pointer;}", "{text-decoration:none;}", ";& > *{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;}& b{font-weight:", ";}& ", "{display:", ";}& ", "{display:", ";}", ";"], props => props
|
|
198
|
+
})(["display:inline-flex;flex-wrap:nowrap;align-items:center;justify-content:", ";transition:box-shadow 0.1s ease-in-out;box-sizing:border-box;border:0;max-width:100%;overflow:hidden;vertical-align:middle;text-decoration:none;white-space:nowrap;font-weight:", ";direction:", ";", ";&:hover{cursor:default;text-decoration:none;}&:link:hover,&:visited:hover{cursor:pointer;}&:any-link:hover{cursor:pointer;}", "{text-decoration:none;}", ";& > *{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;}& b{font-weight:", ";}& ", "{display:", ";}& ", "{display:", ";}", ";"], props => props.$isRound && 'center', props => !props.$isRegular && props.theme.fontWeights.semibold, props => props.theme.rtl ? 'rtl' : 'ltr', props => sizeStyles(props), SELECTOR_FOCUS_VISIBLE, props => colorStyles(props), props => props.theme.fontWeights.semibold, StyledAvatar, props => (props.$isRound || props.$size === 'small') && 'none', StyledClose, props => props.$isRound && 'none', props => retrieveComponentStyles(COMPONENT_ID, props));
|
|
193
199
|
StyledTag.defaultProps = {
|
|
194
|
-
size: 'medium',
|
|
200
|
+
$size: 'medium',
|
|
195
201
|
theme: DEFAULT_THEME
|
|
196
202
|
};
|
|
197
203
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -41,7 +41,7 @@ const SIZE = ['small', 'medium', 'large'];
|
|
|
41
41
|
const COMPONENT_ID$2 = 'tags.avatar';
|
|
42
42
|
const StyledAvatar = styled__default.default(reactTheming.StyledBaseIcon).attrs({
|
|
43
43
|
'data-garden-id': COMPONENT_ID$2,
|
|
44
|
-
'data-garden-version': '9.1.
|
|
44
|
+
'data-garden-version': '9.1.2'
|
|
45
45
|
}).withConfig({
|
|
46
46
|
displayName: "StyledAvatar",
|
|
47
47
|
componentId: "sc-3kdmgt-0"
|
|
@@ -50,7 +50,7 @@ const StyledAvatar = styled__default.default(reactTheming.StyledBaseIcon).attrs(
|
|
|
50
50
|
const COMPONENT_ID$1 = 'tags.close';
|
|
51
51
|
const StyledClose = styled__default.default.button.attrs({
|
|
52
52
|
'data-garden-id': COMPONENT_ID$1,
|
|
53
|
-
'data-garden-version': '9.1.
|
|
53
|
+
'data-garden-version': '9.1.2'
|
|
54
54
|
}).withConfig({
|
|
55
55
|
displayName: "StyledClose",
|
|
56
56
|
componentId: "sc-d6lrpn-0"
|
|
@@ -60,16 +60,16 @@ const COMPONENT_ID = 'tags.tag_view';
|
|
|
60
60
|
const colorStyles = _ref => {
|
|
61
61
|
let {
|
|
62
62
|
theme,
|
|
63
|
-
hue
|
|
63
|
+
$hue
|
|
64
64
|
} = _ref;
|
|
65
65
|
let backgroundColor;
|
|
66
66
|
let foregroundColor;
|
|
67
|
-
if (hue) {
|
|
67
|
+
if ($hue) {
|
|
68
68
|
foregroundColor = reactTheming.getColor({
|
|
69
69
|
theme,
|
|
70
70
|
variable: 'foreground.onEmphasis'
|
|
71
71
|
});
|
|
72
|
-
switch (hue) {
|
|
72
|
+
switch ($hue) {
|
|
73
73
|
case 'grey':
|
|
74
74
|
case 'neutralHue':
|
|
75
75
|
backgroundColor = reactTheming.getColor({
|
|
@@ -147,7 +147,7 @@ const colorStyles = _ref => {
|
|
|
147
147
|
const variable = 'foreground.onEmphasis';
|
|
148
148
|
backgroundColor = reactTheming.getColor({
|
|
149
149
|
theme,
|
|
150
|
-
hue
|
|
150
|
+
hue: $hue
|
|
151
151
|
});
|
|
152
152
|
foregroundColor = polished.readableColor(backgroundColor, reactTheming.getColor({
|
|
153
153
|
theme: darkTheme,
|
|
@@ -181,63 +181,69 @@ const colorStyles = _ref => {
|
|
|
181
181
|
selector: '&:focus'
|
|
182
182
|
}));
|
|
183
183
|
};
|
|
184
|
-
const sizeStyles =
|
|
184
|
+
const sizeStyles = _ref2 => {
|
|
185
|
+
let {
|
|
186
|
+
$isPill,
|
|
187
|
+
$isRound,
|
|
188
|
+
$size,
|
|
189
|
+
theme
|
|
190
|
+
} = _ref2;
|
|
185
191
|
let borderRadius;
|
|
186
192
|
let padding;
|
|
187
193
|
let height;
|
|
188
194
|
let fontSize;
|
|
189
195
|
let minWidth;
|
|
190
196
|
let avatarSize;
|
|
191
|
-
if (
|
|
192
|
-
borderRadius =
|
|
193
|
-
padding =
|
|
194
|
-
height =
|
|
195
|
-
fontSize =
|
|
197
|
+
if ($size === 'small') {
|
|
198
|
+
borderRadius = theme.borderRadii.sm;
|
|
199
|
+
padding = theme.space.base;
|
|
200
|
+
height = theme.space.base * 4;
|
|
201
|
+
fontSize = theme.fontSizes.xs;
|
|
196
202
|
avatarSize = 0;
|
|
197
|
-
} else if (
|
|
198
|
-
borderRadius =
|
|
199
|
-
padding =
|
|
200
|
-
height =
|
|
201
|
-
fontSize =
|
|
202
|
-
avatarSize =
|
|
203
|
+
} else if ($size === 'large') {
|
|
204
|
+
borderRadius = theme.borderRadii.md;
|
|
205
|
+
padding = theme.space.base * 3;
|
|
206
|
+
height = theme.space.base * 8;
|
|
207
|
+
fontSize = theme.fontSizes.sm;
|
|
208
|
+
avatarSize = theme.space.base * 6;
|
|
203
209
|
} else {
|
|
204
|
-
borderRadius =
|
|
205
|
-
padding =
|
|
206
|
-
height =
|
|
207
|
-
fontSize =
|
|
208
|
-
avatarSize =
|
|
210
|
+
borderRadius = theme.borderRadii.sm;
|
|
211
|
+
padding = theme.space.base * 2;
|
|
212
|
+
height = theme.space.base * 5;
|
|
213
|
+
fontSize = theme.fontSizes.sm;
|
|
214
|
+
avatarSize = theme.space.base * 4;
|
|
209
215
|
}
|
|
210
|
-
let avatarBorderRadius =
|
|
216
|
+
let avatarBorderRadius = $size === 'large' ? polished.math(`${borderRadius} - 1`) : borderRadius;
|
|
211
217
|
const avatarMargin = (height - avatarSize) / 2;
|
|
212
|
-
const avatarTextMargin =
|
|
213
|
-
if (
|
|
218
|
+
const avatarTextMargin = $isRound ? avatarMargin : avatarMargin * 2;
|
|
219
|
+
if ($isRound) {
|
|
214
220
|
borderRadius = '50%';
|
|
215
221
|
padding = 0;
|
|
216
222
|
minWidth = height;
|
|
217
223
|
avatarBorderRadius = '50%';
|
|
218
|
-
} else if (
|
|
224
|
+
} else if ($isPill) {
|
|
219
225
|
borderRadius = '100px';
|
|
220
226
|
avatarBorderRadius = '50%';
|
|
221
|
-
if (
|
|
222
|
-
padding =
|
|
223
|
-
minWidth =
|
|
224
|
-
} else if (
|
|
225
|
-
minWidth =
|
|
227
|
+
if ($size === 'small') {
|
|
228
|
+
padding = theme.space.base * 1.5;
|
|
229
|
+
minWidth = theme.space.base * 6;
|
|
230
|
+
} else if ($size === 'large') {
|
|
231
|
+
minWidth = theme.space.base * 12;
|
|
226
232
|
} else {
|
|
227
|
-
minWidth =
|
|
233
|
+
minWidth = theme.space.base * 7.5;
|
|
228
234
|
}
|
|
229
235
|
}
|
|
230
|
-
return styled.css(["border-radius:", ";padding:0 ", "px;min-width:", ";height:", "px;line-height:", ";font-size:", ";& > *{width:100%;min-width:", ";}& ", "{margin-", ":-", "px;margin-", ":", "px;border-radius:", ";width:", "px;min-width:", "px;height:", "px;}& ", "{margin-", ":-", "px;border-radius:", ";width:", "px;height:", "px;}"], borderRadius, padding, minWidth ? `${minWidth}px` : `calc(${padding * 2}px + 1ch)`, height, reactTheming.getLineHeight(height, fontSize), fontSize, minWidth ? `${minWidth - padding * 2}px` : '1ch', StyledAvatar,
|
|
236
|
+
return styled.css(["border-radius:", ";padding:0 ", "px;min-width:", ";height:", "px;line-height:", ";font-size:", ";& > *{width:100%;min-width:", ";}& ", "{margin-", ":-", "px;margin-", ":", "px;border-radius:", ";width:", "px;min-width:", "px;height:", "px;}& ", "{margin-", ":-", "px;border-radius:", ";width:", "px;height:", "px;}"], borderRadius, padding, minWidth ? `${minWidth}px` : `calc(${padding * 2}px + 1ch)`, height, reactTheming.getLineHeight(height, fontSize), fontSize, minWidth ? `${minWidth - padding * 2}px` : '1ch', StyledAvatar, theme.rtl ? 'right' : 'left', padding - avatarMargin, theme.rtl ? 'left' : 'right', avatarTextMargin, avatarBorderRadius, avatarSize, avatarSize, avatarSize, StyledClose, theme.rtl ? 'left' : 'right', padding, borderRadius, height, height);
|
|
231
237
|
};
|
|
232
238
|
const StyledTag = styled__default.default.div.attrs({
|
|
233
239
|
'data-garden-id': COMPONENT_ID,
|
|
234
|
-
'data-garden-version': '9.1.
|
|
240
|
+
'data-garden-version': '9.1.2'
|
|
235
241
|
}).withConfig({
|
|
236
242
|
displayName: "StyledTag",
|
|
237
243
|
componentId: "sc-1jvbe03-0"
|
|
238
|
-
})(["display:inline-flex;flex-wrap:nowrap;align-items:center;justify-content:", ";transition:box-shadow 0.1s ease-in-out;box-sizing:border-box;border:0;max-width:100%;overflow:hidden;vertical-align:middle;text-decoration:none;white-space:nowrap;font-weight:", ";direction:", ";", ";&:hover{cursor:default;text-decoration:none;}&:link:hover,&:visited:hover{cursor:pointer;}&:any-link:hover{cursor:pointer;}", "{text-decoration:none;}", ";& > *{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;}& b{font-weight:", ";}& ", "{display:", ";}& ", "{display:", ";}", ";"], props => props
|
|
244
|
+
})(["display:inline-flex;flex-wrap:nowrap;align-items:center;justify-content:", ";transition:box-shadow 0.1s ease-in-out;box-sizing:border-box;border:0;max-width:100%;overflow:hidden;vertical-align:middle;text-decoration:none;white-space:nowrap;font-weight:", ";direction:", ";", ";&:hover{cursor:default;text-decoration:none;}&:link:hover,&:visited:hover{cursor:pointer;}&:any-link:hover{cursor:pointer;}", "{text-decoration:none;}", ";& > *{overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;}& b{font-weight:", ";}& ", "{display:", ";}& ", "{display:", ";}", ";"], props => props.$isRound && 'center', props => !props.$isRegular && props.theme.fontWeights.semibold, props => props.theme.rtl ? 'rtl' : 'ltr', props => sizeStyles(props), reactTheming.SELECTOR_FOCUS_VISIBLE, props => colorStyles(props), props => props.theme.fontWeights.semibold, StyledAvatar, props => (props.$isRound || props.$size === 'small') && 'none', StyledClose, props => props.$isRound && 'none', props => reactTheming.retrieveComponentStyles(COMPONENT_ID, props));
|
|
239
245
|
StyledTag.defaultProps = {
|
|
240
|
-
size: 'medium',
|
|
246
|
+
$size: 'medium',
|
|
241
247
|
theme: reactTheming.DEFAULT_THEME
|
|
242
248
|
};
|
|
243
249
|
|
|
@@ -277,15 +283,21 @@ const Avatar = AvatarComponent;
|
|
|
277
283
|
|
|
278
284
|
const TagComponent = React.forwardRef((_ref, ref) => {
|
|
279
285
|
let {
|
|
286
|
+
isPill,
|
|
287
|
+
isRound,
|
|
288
|
+
isRegular,
|
|
280
289
|
size,
|
|
281
290
|
hue,
|
|
282
|
-
...
|
|
291
|
+
...other
|
|
283
292
|
} = _ref;
|
|
284
293
|
return React__namespace.default.createElement(StyledTag, Object.assign({
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
294
|
+
$hue: hue,
|
|
295
|
+
$isPill: isPill,
|
|
296
|
+
$isRegular: isRegular,
|
|
297
|
+
$isRound: isRound,
|
|
298
|
+
$size: size,
|
|
299
|
+
ref: ref
|
|
300
|
+
}, other));
|
|
289
301
|
});
|
|
290
302
|
TagComponent.displayName = 'Tag';
|
|
291
303
|
TagComponent.propTypes = {
|
|
@@ -4,6 +4,14 @@
|
|
|
4
4
|
* Use of this source code is governed under the Apache License, Version 2.0
|
|
5
5
|
* found at http://www.apache.org/licenses/LICENSE-2.0.
|
|
6
6
|
*/
|
|
7
|
-
import { DefaultTheme } from 'styled-components';
|
|
7
|
+
import { ThemeProps, DefaultTheme } from 'styled-components';
|
|
8
8
|
import { ITagProps } from '../types';
|
|
9
|
-
|
|
9
|
+
interface IStyledTagProps extends ThemeProps<DefaultTheme> {
|
|
10
|
+
$hue?: ITagProps['hue'];
|
|
11
|
+
$isPill?: ITagProps['isPill'];
|
|
12
|
+
$isRegular?: ITagProps['isRegular'];
|
|
13
|
+
$isRound?: ITagProps['isRound'];
|
|
14
|
+
$size?: ITagProps['size'];
|
|
15
|
+
}
|
|
16
|
+
export declare const StyledTag: import("styled-components").StyledComponent<"div", DefaultTheme, IStyledTagProps, never>;
|
|
17
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-tags",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.2",
|
|
4
4
|
"description": "Components relating to tags in the Garden Design System",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Zendesk Garden <garden@zendesk.com>",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"prop-types": "^15.5.7"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@zendeskgarden/react-theming": ">=9.0.0
|
|
29
|
+
"@zendeskgarden/react-theming": ">=9.0.0",
|
|
30
30
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
31
31
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
32
32
|
"styled-components": "^5.3.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@zendeskgarden/react-theming": "^9.1.
|
|
35
|
+
"@zendeskgarden/react-theming": "^9.1.2",
|
|
36
36
|
"@zendeskgarden/svg-icons": "7.3.0"
|
|
37
37
|
},
|
|
38
38
|
"keywords": [
|
|
@@ -45,5 +45,5 @@
|
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
47
|
"zendeskgarden:src": "src/index.ts",
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "dd7b2e7fb6747ef39a028b4e7b9924c2098deea0"
|
|
49
49
|
}
|