@zendeskgarden/react-tags 9.0.0-next.3 → 9.0.0-next.5
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/index.cjs.js +8 -8
- package/dist/index.esm.js +9 -9
- package/package.json +4 -4
package/dist/index.cjs.js
CHANGED
|
@@ -63,7 +63,7 @@ const StyledAvatar = styled__default.default(_ref => {
|
|
|
63
63
|
return React__namespace.default.cloneElement(React.Children.only(children), props);
|
|
64
64
|
}).attrs({
|
|
65
65
|
'data-garden-id': COMPONENT_ID$2,
|
|
66
|
-
'data-garden-version': '9.0.0-next.
|
|
66
|
+
'data-garden-version': '9.0.0-next.5'
|
|
67
67
|
}).withConfig({
|
|
68
68
|
displayName: "StyledAvatar",
|
|
69
69
|
componentId: "sc-3kdmgt-0"
|
|
@@ -75,7 +75,7 @@ StyledAvatar.defaultProps = {
|
|
|
75
75
|
const COMPONENT_ID$1 = 'tags.close';
|
|
76
76
|
const StyledClose = styled__default.default.button.attrs({
|
|
77
77
|
'data-garden-id': COMPONENT_ID$1,
|
|
78
|
-
'data-garden-version': '9.0.0-next.
|
|
78
|
+
'data-garden-version': '9.0.0-next.5'
|
|
79
79
|
}).withConfig({
|
|
80
80
|
displayName: "StyledClose",
|
|
81
81
|
componentId: "sc-d6lrpn-0"
|
|
@@ -91,16 +91,16 @@ const colorStyles = props => {
|
|
|
91
91
|
let closeColor;
|
|
92
92
|
if (props.hue) {
|
|
93
93
|
const shade = props.hue === 'yellow' ? 400 : 600;
|
|
94
|
-
backgroundColor = reactTheming.
|
|
94
|
+
backgroundColor = reactTheming.getColorV8(props.hue, shade, props.theme);
|
|
95
95
|
if (props.hue === 'yellow' || props.hue === 'lemon') {
|
|
96
|
-
foregroundColor = reactTheming.
|
|
96
|
+
foregroundColor = reactTheming.getColorV8('yellow', 800, props.theme);
|
|
97
97
|
} else {
|
|
98
98
|
foregroundColor = polished.readableColor(backgroundColor, props.theme.palette.grey[800], props.theme.palette.white);
|
|
99
99
|
}
|
|
100
100
|
} else {
|
|
101
|
-
backgroundColor = reactTheming.
|
|
102
|
-
foregroundColor = reactTheming.
|
|
103
|
-
closeColor = reactTheming.
|
|
101
|
+
backgroundColor = reactTheming.getColorV8('neutralHue', 200, props.theme);
|
|
102
|
+
foregroundColor = reactTheming.getColorV8('neutralHue', 700, props.theme);
|
|
103
|
+
closeColor = reactTheming.getColorV8('neutralHue', 600, props.theme);
|
|
104
104
|
}
|
|
105
105
|
return styled.css(["background-color:", ";color:", ";&:hover{color:", ";}", " & ", "{color:", ";}"], backgroundColor, foregroundColor, foregroundColor, reactTheming.focusStyles({
|
|
106
106
|
theme: props.theme,
|
|
@@ -158,7 +158,7 @@ const sizeStyles = props => {
|
|
|
158
158
|
};
|
|
159
159
|
const StyledTag = styled__default.default.div.attrs({
|
|
160
160
|
'data-garden-id': COMPONENT_ID,
|
|
161
|
-
'data-garden-version': '9.0.0-next.
|
|
161
|
+
'data-garden-version': '9.0.0-next.5'
|
|
162
162
|
}).withConfig({
|
|
163
163
|
displayName: "StyledTag",
|
|
164
164
|
componentId: "sc-1jvbe03-0"
|
package/dist/index.esm.js
CHANGED
|
@@ -10,7 +10,7 @@ import React__default, { Children, forwardRef } from 'react';
|
|
|
10
10
|
import PropTypes from 'prop-types';
|
|
11
11
|
import styled, { css } from 'styled-components';
|
|
12
12
|
import { readableColor, math } from 'polished';
|
|
13
|
-
import { retrieveComponentStyles, DEFAULT_THEME, SELECTOR_FOCUS_VISIBLE,
|
|
13
|
+
import { retrieveComponentStyles, DEFAULT_THEME, SELECTOR_FOCUS_VISIBLE, getColorV8, focusStyles, getLineHeight, useText } from '@zendeskgarden/react-theming';
|
|
14
14
|
|
|
15
15
|
function _extends$1() {
|
|
16
16
|
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -38,7 +38,7 @@ const StyledAvatar = styled(_ref => {
|
|
|
38
38
|
return React__default.cloneElement(Children.only(children), props);
|
|
39
39
|
}).attrs({
|
|
40
40
|
'data-garden-id': COMPONENT_ID$2,
|
|
41
|
-
'data-garden-version': '9.0.0-next.
|
|
41
|
+
'data-garden-version': '9.0.0-next.5'
|
|
42
42
|
}).withConfig({
|
|
43
43
|
displayName: "StyledAvatar",
|
|
44
44
|
componentId: "sc-3kdmgt-0"
|
|
@@ -50,7 +50,7 @@ StyledAvatar.defaultProps = {
|
|
|
50
50
|
const COMPONENT_ID$1 = 'tags.close';
|
|
51
51
|
const StyledClose = styled.button.attrs({
|
|
52
52
|
'data-garden-id': COMPONENT_ID$1,
|
|
53
|
-
'data-garden-version': '9.0.0-next.
|
|
53
|
+
'data-garden-version': '9.0.0-next.5'
|
|
54
54
|
}).withConfig({
|
|
55
55
|
displayName: "StyledClose",
|
|
56
56
|
componentId: "sc-d6lrpn-0"
|
|
@@ -66,16 +66,16 @@ const colorStyles = props => {
|
|
|
66
66
|
let closeColor;
|
|
67
67
|
if (props.hue) {
|
|
68
68
|
const shade = props.hue === 'yellow' ? 400 : 600;
|
|
69
|
-
backgroundColor =
|
|
69
|
+
backgroundColor = getColorV8(props.hue, shade, props.theme);
|
|
70
70
|
if (props.hue === 'yellow' || props.hue === 'lemon') {
|
|
71
|
-
foregroundColor =
|
|
71
|
+
foregroundColor = getColorV8('yellow', 800, props.theme);
|
|
72
72
|
} else {
|
|
73
73
|
foregroundColor = readableColor(backgroundColor, props.theme.palette.grey[800], props.theme.palette.white);
|
|
74
74
|
}
|
|
75
75
|
} else {
|
|
76
|
-
backgroundColor =
|
|
77
|
-
foregroundColor =
|
|
78
|
-
closeColor =
|
|
76
|
+
backgroundColor = getColorV8('neutralHue', 200, props.theme);
|
|
77
|
+
foregroundColor = getColorV8('neutralHue', 700, props.theme);
|
|
78
|
+
closeColor = getColorV8('neutralHue', 600, props.theme);
|
|
79
79
|
}
|
|
80
80
|
return css(["background-color:", ";color:", ";&:hover{color:", ";}", " & ", "{color:", ";}"], backgroundColor, foregroundColor, foregroundColor, focusStyles({
|
|
81
81
|
theme: props.theme,
|
|
@@ -133,7 +133,7 @@ const sizeStyles = props => {
|
|
|
133
133
|
};
|
|
134
134
|
const StyledTag = styled.div.attrs({
|
|
135
135
|
'data-garden-id': COMPONENT_ID,
|
|
136
|
-
'data-garden-version': '9.0.0-next.
|
|
136
|
+
'data-garden-version': '9.0.0-next.5'
|
|
137
137
|
}).withConfig({
|
|
138
138
|
displayName: "StyledTag",
|
|
139
139
|
componentId: "sc-1jvbe03-0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zendeskgarden/react-tags",
|
|
3
|
-
"version": "9.0.0-next.
|
|
3
|
+
"version": "9.0.0-next.5",
|
|
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>",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"@zendeskgarden/react-theming": "^8.67.0",
|
|
30
30
|
"react": ">=16.8.0",
|
|
31
31
|
"react-dom": ">=16.8.0",
|
|
32
|
-
"styled-components": "^5.1
|
|
32
|
+
"styled-components": "^5.3.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@zendeskgarden/react-theming": "^9.0.0-next.
|
|
35
|
+
"@zendeskgarden/react-theming": "^9.0.0-next.5",
|
|
36
36
|
"@zendeskgarden/svg-icons": "7.0.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": "806fa33feb06142c3f69b6a87b53628469117e4d"
|
|
49
49
|
}
|