@automattic/vip-design-system 0.28.0 → 0.28.1
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/build/system/Dialog/DialogButton.js +1 -1
- package/build/system/Form/InlineSelect.js +3 -3
- package/build/system/Form/Input.js +1 -0
- package/build/system/Form/Input.styles.js +2 -2
- package/build/system/Form/Label.js +1 -1
- package/build/system/Form/SearchSelect.js +4 -4
- package/build/system/Notice/Notice.js +1 -0
- package/build/system/ResourceList/ResourceList.js +35 -26
- package/build/system/ResourceList/ResourceList.stories.js +2 -0
- package/build/system/theme/generated/valet-theme.json +26 -8
- package/build/system/theme/index.js +2 -5
- package/package.json +1 -1
- package/src/system/Dialog/DialogButton.js +1 -1
- package/src/system/Form/InlineSelect.js +3 -3
- package/src/system/Form/Input.js +1 -0
- package/src/system/Form/Input.styles.js +2 -2
- package/src/system/Form/Label.js +1 -1
- package/src/system/Form/SearchSelect.js +4 -4
- package/src/system/Notice/Notice.js +3 -1
- package/src/system/theme/generated/valet-theme.json +26 -8
- package/src/system/theme/index.js +1 -3
- package/tokens/valet-core/$themes.json +15 -89
- package/tokens/valet-core/wpvip-expressive-type.json +8 -8
- package/tokens/valet-core/wpvip-productive-color.json +26 -8
- package/.idea/GitLink.xml +0 -6
- package/.idea/codeStyles/Project.xml +0 -69
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/dbnavigator.xml +0 -467
- package/.idea/git_toolbox_prj.xml +0 -15
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/jsLinters/eslint.xml +0 -6
- package/.idea/misc.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/php.xml +0 -12
- package/.idea/vcs.xml +0 -6
- package/.idea/vip-design-system.iml +0 -9
|
@@ -98,10 +98,10 @@ var InlineSelect = function InlineSelect(_ref) {
|
|
|
98
98
|
sx: {
|
|
99
99
|
'.select__control': {
|
|
100
100
|
background: 'none',
|
|
101
|
-
color: 'input.text'
|
|
101
|
+
color: 'input.text.default'
|
|
102
102
|
},
|
|
103
103
|
'.select__single-value': {
|
|
104
|
-
color: 'input.text',
|
|
104
|
+
color: 'input.text.default',
|
|
105
105
|
px: 1
|
|
106
106
|
},
|
|
107
107
|
'.react-select__option': {
|
|
@@ -117,7 +117,7 @@ var InlineSelect = function InlineSelect(_ref) {
|
|
|
117
117
|
borderColor: 'input.border'
|
|
118
118
|
},
|
|
119
119
|
'.select__placeholder': {
|
|
120
|
-
color: 'input.placeholder'
|
|
120
|
+
color: 'input.text.placeholder'
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
}, props))
|
|
@@ -13,7 +13,7 @@ var baseControlBorderStyle = {
|
|
|
13
13
|
borderColor: 'input.border.default'
|
|
14
14
|
};
|
|
15
15
|
exports.baseControlBorderStyle = baseControlBorderStyle;
|
|
16
|
-
var inputBaseText = 'input.text';
|
|
16
|
+
var inputBaseText = 'input.text.default';
|
|
17
17
|
exports.inputBaseText = inputBaseText;
|
|
18
18
|
var inputBaseBackground = 'input.background';
|
|
19
19
|
exports.inputBaseBackground = inputBaseBackground;
|
|
@@ -40,7 +40,7 @@ var baseControlStyle = (0, _extends2["default"])({}, baseControlBorderStyle, {
|
|
|
40
40
|
borderColor: 'input.border.disabled'
|
|
41
41
|
},
|
|
42
42
|
'&::placeholder': {
|
|
43
|
-
color: 'input.placeholder',
|
|
43
|
+
color: 'input.text.placeholder',
|
|
44
44
|
opacity: 1
|
|
45
45
|
}
|
|
46
46
|
});
|
|
@@ -18,7 +18,7 @@ var _RequiredLabel = require("./RequiredLabel");
|
|
|
18
18
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
19
19
|
|
|
20
20
|
var _excluded = ["sx", "children", "required"];
|
|
21
|
-
var baseLabelColor = '
|
|
21
|
+
var baseLabelColor = 'input.label.default';
|
|
22
22
|
exports.baseLabelColor = baseLabelColor;
|
|
23
23
|
var baseLabelStyle = {
|
|
24
24
|
fontWeight: 500,
|
|
@@ -142,7 +142,7 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
142
142
|
sx: {
|
|
143
143
|
'.select__control': {
|
|
144
144
|
background: 'none',
|
|
145
|
-
color: 'input.text',
|
|
145
|
+
color: 'input.text.default',
|
|
146
146
|
border: '1px solid',
|
|
147
147
|
borderColor: 'input.border',
|
|
148
148
|
margin: 0,
|
|
@@ -151,10 +151,10 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
151
151
|
fontSize: 2
|
|
152
152
|
},
|
|
153
153
|
'.select__placeholder': {
|
|
154
|
-
color: 'input.placeholder'
|
|
154
|
+
color: 'input.text.placeholder'
|
|
155
155
|
},
|
|
156
156
|
'.select__single-value': {
|
|
157
|
-
color: 'input.text',
|
|
157
|
+
color: 'input.text.default',
|
|
158
158
|
px: 1
|
|
159
159
|
},
|
|
160
160
|
'.select__menu': {
|
|
@@ -162,7 +162,7 @@ var SearchSelect = function SearchSelect(props) {
|
|
|
162
162
|
boxShadow: 'medium'
|
|
163
163
|
},
|
|
164
164
|
'.react-select__option': {
|
|
165
|
-
color: 'input.text',
|
|
165
|
+
color: 'input.text.default',
|
|
166
166
|
paddingTop: 1,
|
|
167
167
|
paddingBottom: 1,
|
|
168
168
|
paddingLeft: 2,
|
|
@@ -9,6 +9,8 @@ var _extends3 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
|
+
var _react = require("react");
|
|
13
|
+
|
|
12
14
|
var _ = require("..");
|
|
13
15
|
|
|
14
16
|
var _jsxRuntime = require("theme-ui/jsx-runtime");
|
|
@@ -51,7 +53,7 @@ var StyledListItem = function StyledListItem(props) {
|
|
|
51
53
|
sx: {
|
|
52
54
|
py: 2,
|
|
53
55
|
borderBottom: '1px solid',
|
|
54
|
-
borderColor: '
|
|
56
|
+
borderColor: 'borders.2',
|
|
55
57
|
listStyleType: 'none',
|
|
56
58
|
margin: 0,
|
|
57
59
|
px: 0
|
|
@@ -85,6 +87,37 @@ var ResourceList = function ResourceList(_ref) {
|
|
|
85
87
|
});
|
|
86
88
|
};
|
|
87
89
|
|
|
90
|
+
var renderGoupedItems = function renderGoupedItems() {
|
|
91
|
+
return (0, _react.useMemo)(function () {
|
|
92
|
+
return Object.keys(groupedItems).map(function (groupName, index) {
|
|
93
|
+
return (0, _jsxRuntime.jsxs)(_.Box, {
|
|
94
|
+
sx: {
|
|
95
|
+
mb: 4
|
|
96
|
+
},
|
|
97
|
+
as: "li",
|
|
98
|
+
children: [(0, _jsxRuntime.jsx)(_.Heading, {
|
|
99
|
+
variant: "h4",
|
|
100
|
+
as: "h4",
|
|
101
|
+
sx: {
|
|
102
|
+
mb: 3
|
|
103
|
+
},
|
|
104
|
+
children: groupName
|
|
105
|
+
}), (0, _jsxRuntime.jsx)(_.Box, {
|
|
106
|
+
as: "ul",
|
|
107
|
+
sx: {
|
|
108
|
+
listStyleType: 'none',
|
|
109
|
+
m: 0,
|
|
110
|
+
p: 0,
|
|
111
|
+
borderTop: '1px solid',
|
|
112
|
+
borderColor: 'border'
|
|
113
|
+
},
|
|
114
|
+
children: renderItemList(groupedItems[groupName])
|
|
115
|
+
})]
|
|
116
|
+
}, index);
|
|
117
|
+
});
|
|
118
|
+
}, [groupedItems]);
|
|
119
|
+
};
|
|
120
|
+
|
|
88
121
|
return (0, _jsxRuntime.jsx)(_.Box, {
|
|
89
122
|
as: "ul",
|
|
90
123
|
sx: {
|
|
@@ -93,31 +126,7 @@ var ResourceList = function ResourceList(_ref) {
|
|
|
93
126
|
p: 0
|
|
94
127
|
},
|
|
95
128
|
className: "vip-resource-list-component",
|
|
96
|
-
children: groupedByDay ?
|
|
97
|
-
return (0, _jsxRuntime.jsxs)(_.Box, {
|
|
98
|
-
sx: {
|
|
99
|
-
mb: 4
|
|
100
|
-
},
|
|
101
|
-
children: [(0, _jsxRuntime.jsx)(_.Heading, {
|
|
102
|
-
variant: "h4",
|
|
103
|
-
as: "h4",
|
|
104
|
-
sx: {
|
|
105
|
-
mb: 3
|
|
106
|
-
},
|
|
107
|
-
children: groupName
|
|
108
|
-
}), (0, _jsxRuntime.jsx)(_.Box, {
|
|
109
|
-
as: "ul",
|
|
110
|
-
sx: {
|
|
111
|
-
listStyleType: 'none',
|
|
112
|
-
m: 0,
|
|
113
|
-
p: 0,
|
|
114
|
-
borderTop: '1px solid',
|
|
115
|
-
borderColor: 'border'
|
|
116
|
-
},
|
|
117
|
-
children: renderItemList(groupedItems[groupName])
|
|
118
|
-
})]
|
|
119
|
-
}, index);
|
|
120
|
-
}) : renderItemList(items)
|
|
129
|
+
children: groupedByDay ? renderGoupedItems(groupedItems) : renderItemList(items)
|
|
121
130
|
});
|
|
122
131
|
};
|
|
123
132
|
|
|
@@ -129,6 +129,7 @@ var Grouped = function Grouped() {
|
|
|
129
129
|
children: "#443"
|
|
130
130
|
})]
|
|
131
131
|
}), (0, _jsxRuntime.jsxs)(_.Text, {
|
|
132
|
+
as: "div",
|
|
132
133
|
sx: {
|
|
133
134
|
mb: 0,
|
|
134
135
|
fontSize: 1,
|
|
@@ -337,6 +338,7 @@ var Relative = function Relative() {
|
|
|
337
338
|
children: "Running"
|
|
338
339
|
})]
|
|
339
340
|
}), (0, _jsxRuntime.jsxs)(_.Text, {
|
|
341
|
+
as: "div",
|
|
340
342
|
sx: {
|
|
341
343
|
mb: 0,
|
|
342
344
|
color: 'muted',
|
|
@@ -38,6 +38,23 @@
|
|
|
38
38
|
"value": "#ffffff",
|
|
39
39
|
"type": "color"
|
|
40
40
|
},
|
|
41
|
+
"label": {
|
|
42
|
+
"default": {
|
|
43
|
+
"value": "#13191e",
|
|
44
|
+
"type": "color"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"text": {
|
|
48
|
+
"default": {
|
|
49
|
+
"value": "#13191e",
|
|
50
|
+
"type": "color"
|
|
51
|
+
},
|
|
52
|
+
"placeholder": {
|
|
53
|
+
"type": "color",
|
|
54
|
+
"value": "#767372",
|
|
55
|
+
"description": "Use for placeholder text in fields"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
41
58
|
"border": {
|
|
42
59
|
"default": {
|
|
43
60
|
"value": "#8f8c8b",
|
|
@@ -179,18 +196,19 @@
|
|
|
179
196
|
"description": "Use for helper text",
|
|
180
197
|
"value": "#6a6766"
|
|
181
198
|
},
|
|
182
|
-
"placeholder": {
|
|
183
|
-
"type": "color",
|
|
184
|
-
"value": "#767372",
|
|
185
|
-
"description": "Use for placeholder text in fields"
|
|
186
|
-
},
|
|
187
199
|
"disabled": {
|
|
188
200
|
"type": "color",
|
|
189
201
|
"value": "#9b9796"
|
|
190
202
|
},
|
|
191
203
|
"inverse": {
|
|
192
204
|
"type": "color",
|
|
193
|
-
"value": "#fbfbfb"
|
|
205
|
+
"value": "#fbfbfb",
|
|
206
|
+
"description": "Use for primary text on an inverse layer"
|
|
207
|
+
},
|
|
208
|
+
"inverse-secondary": {
|
|
209
|
+
"value": "#b3afae",
|
|
210
|
+
"type": "color",
|
|
211
|
+
"description": "Use for secondary text on an inverse layer."
|
|
194
212
|
},
|
|
195
213
|
"accent": {
|
|
196
214
|
"type": "color",
|
|
@@ -625,8 +643,8 @@
|
|
|
625
643
|
"info": {
|
|
626
644
|
"default": {
|
|
627
645
|
"type": "color",
|
|
628
|
-
"
|
|
629
|
-
"
|
|
646
|
+
"value": "#006979",
|
|
647
|
+
"description": "Use for text links"
|
|
630
648
|
},
|
|
631
649
|
"hover": {
|
|
632
650
|
"type": "color",
|
|
@@ -109,10 +109,7 @@ var _default = {
|
|
|
109
109
|
// icon
|
|
110
110
|
icon: (0, _extends2["default"])({}, _getColor.ValetTheme.icon),
|
|
111
111
|
// Form Controls
|
|
112
|
-
input: (0, _extends2["default"])({}, _getColor.ValetTheme.input,
|
|
113
|
-
text: (0, _getColor.getColor)('text', 'secondary'),
|
|
114
|
-
placeholder: (0, _getColor.getColor)('text', 'secondary')
|
|
115
|
-
}),
|
|
112
|
+
input: (0, _extends2["default"])({}, _getColor.ValetTheme.input),
|
|
116
113
|
optionRow: {
|
|
117
114
|
hover: 'rgba(0,0,0,.02)',
|
|
118
115
|
border: (0, _getColor.getColor)('border', '2'),
|
|
@@ -145,7 +142,7 @@ var _default = {
|
|
|
145
142
|
},
|
|
146
143
|
hover: 'rgba(0,0,0,.02)',
|
|
147
144
|
darken: 'rgba(0,0,0,.05)',
|
|
148
|
-
placeholder: (0, _getColor.
|
|
145
|
+
placeholder: (0, _getColor.getVariants)('input.text').placeholder,
|
|
149
146
|
midnight: '#13191E',
|
|
150
147
|
dialog: _colors.light.gray['0'],
|
|
151
148
|
backgroundMuted: (0, _getColor.getColor)('layer', '1'),
|
package/package.json
CHANGED
|
@@ -71,10 +71,10 @@ const InlineSelect = ( {
|
|
|
71
71
|
sx={ {
|
|
72
72
|
'.select__control': {
|
|
73
73
|
background: 'none',
|
|
74
|
-
color: 'input.text',
|
|
74
|
+
color: 'input.text.default',
|
|
75
75
|
},
|
|
76
76
|
'.select__single-value': {
|
|
77
|
-
color: 'input.text',
|
|
77
|
+
color: 'input.text.default',
|
|
78
78
|
px: 1,
|
|
79
79
|
},
|
|
80
80
|
'.react-select__option': {
|
|
@@ -90,7 +90,7 @@ const InlineSelect = ( {
|
|
|
90
90
|
borderColor: 'input.border',
|
|
91
91
|
},
|
|
92
92
|
'.select__placeholder': {
|
|
93
|
-
color: 'input.placeholder',
|
|
93
|
+
color: 'input.text.placeholder',
|
|
94
94
|
},
|
|
95
95
|
} }
|
|
96
96
|
{ ...props }
|
package/src/system/Form/Input.js
CHANGED
|
@@ -4,7 +4,7 @@ export const baseControlBorderStyle = {
|
|
|
4
4
|
borderColor: 'input.border.default',
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
export const inputBaseText = 'input.text';
|
|
7
|
+
export const inputBaseText = 'input.text.default';
|
|
8
8
|
export const inputBaseBackground = 'input.background';
|
|
9
9
|
export const baseControlFocusStyle = {
|
|
10
10
|
'&:focus': theme => theme.outline,
|
|
@@ -26,7 +26,7 @@ export const baseControlStyle = {
|
|
|
26
26
|
},
|
|
27
27
|
|
|
28
28
|
'&::placeholder': {
|
|
29
|
-
color: 'input.placeholder',
|
|
29
|
+
color: 'input.text.placeholder',
|
|
30
30
|
opacity: 1,
|
|
31
31
|
},
|
|
32
32
|
};
|
package/src/system/Form/Label.js
CHANGED
|
@@ -11,7 +11,7 @@ import PropTypes from 'prop-types';
|
|
|
11
11
|
*/
|
|
12
12
|
import { RequiredLabel } from './RequiredLabel';
|
|
13
13
|
|
|
14
|
-
export const baseLabelColor = '
|
|
14
|
+
export const baseLabelColor = 'input.label.default';
|
|
15
15
|
export const baseLabelStyle = {
|
|
16
16
|
fontWeight: 500,
|
|
17
17
|
fontSize: 2,
|
|
@@ -89,7 +89,7 @@ const SearchSelect = props => (
|
|
|
89
89
|
sx={ {
|
|
90
90
|
'.select__control': {
|
|
91
91
|
background: 'none',
|
|
92
|
-
color: 'input.text',
|
|
92
|
+
color: 'input.text.default',
|
|
93
93
|
border: '1px solid',
|
|
94
94
|
borderColor: 'input.border',
|
|
95
95
|
margin: 0,
|
|
@@ -98,10 +98,10 @@ const SearchSelect = props => (
|
|
|
98
98
|
fontSize: 2,
|
|
99
99
|
},
|
|
100
100
|
'.select__placeholder': {
|
|
101
|
-
color: 'input.placeholder',
|
|
101
|
+
color: 'input.text.placeholder',
|
|
102
102
|
},
|
|
103
103
|
'.select__single-value': {
|
|
104
|
-
color: 'input.text',
|
|
104
|
+
color: 'input.text.default',
|
|
105
105
|
px: 1,
|
|
106
106
|
},
|
|
107
107
|
'.select__menu': {
|
|
@@ -109,7 +109,7 @@ const SearchSelect = props => (
|
|
|
109
109
|
boxShadow: 'medium',
|
|
110
110
|
},
|
|
111
111
|
'.react-select__option': {
|
|
112
|
-
color: 'input.text',
|
|
112
|
+
color: 'input.text.default',
|
|
113
113
|
paddingTop: 1,
|
|
114
114
|
paddingBottom: 1,
|
|
115
115
|
paddingLeft: 2,
|
|
@@ -14,7 +14,9 @@ import { MdError, MdWarning, MdCheckCircle, MdInfo } from 'react-icons/md';
|
|
|
14
14
|
import { Box, Flex, Heading, Card } from '../';
|
|
15
15
|
|
|
16
16
|
const colorSystemVariant = color =>
|
|
17
|
-
( { warning: 'warning', alert: 'error', success: 'success', info: 'info' }[
|
|
17
|
+
( { warning: 'warning', error: 'error', alert: 'error', success: 'success', info: 'info' }[
|
|
18
|
+
color
|
|
19
|
+
] );
|
|
18
20
|
|
|
19
21
|
const NoticeIcon = ( { color, variant } ) => {
|
|
20
22
|
let Icon = MdWarning;
|
|
@@ -38,6 +38,23 @@
|
|
|
38
38
|
"value": "#ffffff",
|
|
39
39
|
"type": "color"
|
|
40
40
|
},
|
|
41
|
+
"label": {
|
|
42
|
+
"default": {
|
|
43
|
+
"value": "#13191e",
|
|
44
|
+
"type": "color"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"text": {
|
|
48
|
+
"default": {
|
|
49
|
+
"value": "#13191e",
|
|
50
|
+
"type": "color"
|
|
51
|
+
},
|
|
52
|
+
"placeholder": {
|
|
53
|
+
"type": "color",
|
|
54
|
+
"value": "#767372",
|
|
55
|
+
"description": "Use for placeholder text in fields"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
41
58
|
"border": {
|
|
42
59
|
"default": {
|
|
43
60
|
"value": "#8f8c8b",
|
|
@@ -179,18 +196,19 @@
|
|
|
179
196
|
"description": "Use for helper text",
|
|
180
197
|
"value": "#6a6766"
|
|
181
198
|
},
|
|
182
|
-
"placeholder": {
|
|
183
|
-
"type": "color",
|
|
184
|
-
"value": "#767372",
|
|
185
|
-
"description": "Use for placeholder text in fields"
|
|
186
|
-
},
|
|
187
199
|
"disabled": {
|
|
188
200
|
"type": "color",
|
|
189
201
|
"value": "#9b9796"
|
|
190
202
|
},
|
|
191
203
|
"inverse": {
|
|
192
204
|
"type": "color",
|
|
193
|
-
"value": "#fbfbfb"
|
|
205
|
+
"value": "#fbfbfb",
|
|
206
|
+
"description": "Use for primary text on an inverse layer"
|
|
207
|
+
},
|
|
208
|
+
"inverse-secondary": {
|
|
209
|
+
"value": "#b3afae",
|
|
210
|
+
"type": "color",
|
|
211
|
+
"description": "Use for secondary text on an inverse layer."
|
|
194
212
|
},
|
|
195
213
|
"accent": {
|
|
196
214
|
"type": "color",
|
|
@@ -625,8 +643,8 @@
|
|
|
625
643
|
"info": {
|
|
626
644
|
"default": {
|
|
627
645
|
"type": "color",
|
|
628
|
-
"
|
|
629
|
-
"
|
|
646
|
+
"value": "#006979",
|
|
647
|
+
"description": "Use for text links"
|
|
630
648
|
},
|
|
631
649
|
"hover": {
|
|
632
650
|
"type": "color",
|
|
@@ -122,8 +122,6 @@ export default {
|
|
|
122
122
|
// Form Controls
|
|
123
123
|
input: {
|
|
124
124
|
...ValetTheme.input,
|
|
125
|
-
text: getColor( 'text', 'secondary' ),
|
|
126
|
-
placeholder: getColor( 'text', 'secondary' ),
|
|
127
125
|
},
|
|
128
126
|
|
|
129
127
|
optionRow: {
|
|
@@ -160,7 +158,7 @@ export default {
|
|
|
160
158
|
},
|
|
161
159
|
hover: 'rgba(0,0,0,.02)',
|
|
162
160
|
darken: 'rgba(0,0,0,.05)',
|
|
163
|
-
placeholder:
|
|
161
|
+
placeholder: getVariants( 'input.text' ).placeholder,
|
|
164
162
|
midnight: '#13191E',
|
|
165
163
|
dialog: light.gray[ '0' ],
|
|
166
164
|
backgroundMuted: getColor( 'layer', '1' ),
|