@automattic/vip-design-system 0.13.0 → 0.14.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/.storybook/decorators/withColorMode.jsx +6 -6
- package/build/system/Button/Button.js +7 -1
- package/build/system/Form/Toggle.js +10 -0
- package/build/system/Form/Toggle.stories.js +4 -0
- package/build/system/Link/Link.js +6 -0
- package/build/system/NewDialog/DialogClose.js +5 -4
- package/build/system/NewDialog/DialogContent.js +1 -1
- package/build/system/NewDialog/DialogDescription.js +3 -0
- package/build/system/NewDialog/DialogTitle.js +3 -0
- package/build/system/NewDialog/NewDialog.js +4 -1
- package/build/system/NewDialog/NewDialog.stories.js +11 -0
- package/build/system/theme/getColor.js +43 -0
- package/build/system/theme/index.js +11 -2
- package/package.json +1 -1
- package/src/system/Button/Button.js +3 -1
- package/src/system/Form/Toggle.js +6 -0
- package/src/system/Form/Toggle.stories.jsx +5 -0
- package/src/system/Link/Link.js +2 -0
- package/src/system/NewDialog/DialogClose.js +2 -1
- package/src/system/NewDialog/DialogContent.js +1 -1
- package/src/system/NewDialog/DialogDescription.js +1 -1
- package/src/system/NewDialog/DialogTitle.js +1 -1
- package/src/system/NewDialog/NewDialog.js +1 -1
- package/src/system/NewDialog/NewDialog.stories.jsx +18 -0
- package/src/system/theme/getColor.js +29 -0
- package/src/system/theme/index.js +11 -2
- package/tokens/valet-color.json +6163 -1918
- package/tokens/valet-core.json +6558 -0
|
@@ -4,7 +4,7 @@ import { useColorMode } from 'theme-ui';
|
|
|
4
4
|
|
|
5
5
|
// These need to be updated to import VIP design tokens;
|
|
6
6
|
const lightBackground = '#ffffff';
|
|
7
|
-
const darkBackground = '#
|
|
7
|
+
const darkBackground = '#1C1C1B';
|
|
8
8
|
|
|
9
9
|
export const backgrounds = {
|
|
10
10
|
default: 'Light',
|
|
@@ -21,7 +21,7 @@ export const backgrounds = {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
function ThemeChanger( { background } ) {
|
|
24
|
-
const [colorMode, setColorMode] = useColorMode();
|
|
24
|
+
const [ colorMode, setColorMode ] = useColorMode();
|
|
25
25
|
const newColorMode = darkBackground === background ? 'dark' : 'default';
|
|
26
26
|
|
|
27
27
|
useEffect( () => {
|
|
@@ -29,7 +29,7 @@ function ThemeChanger( { background } ) {
|
|
|
29
29
|
}, [ newColorMode ] );
|
|
30
30
|
|
|
31
31
|
return null;
|
|
32
|
-
}
|
|
32
|
+
}
|
|
33
33
|
|
|
34
34
|
export default makeDecorator( {
|
|
35
35
|
name: 'withColorMode',
|
|
@@ -37,9 +37,9 @@ export default makeDecorator( {
|
|
|
37
37
|
wrapper: ( storyFn, context ) => {
|
|
38
38
|
return (
|
|
39
39
|
<>
|
|
40
|
-
<ThemeChanger background={context.globals?.backgrounds?.value} />
|
|
41
|
-
{storyFn()}
|
|
40
|
+
<ThemeChanger background={ context.globals?.backgrounds?.value } />
|
|
41
|
+
{ storyFn() }
|
|
42
42
|
</>
|
|
43
43
|
);
|
|
44
|
-
}
|
|
44
|
+
},
|
|
45
45
|
} );
|
|
@@ -30,8 +30,14 @@ var Button = function Button(_ref) {
|
|
|
30
30
|
justifyContent: 'center',
|
|
31
31
|
height: '36px',
|
|
32
32
|
py: 0,
|
|
33
|
+
'&:focus': function focus(theme) {
|
|
34
|
+
return theme.outline;
|
|
35
|
+
},
|
|
36
|
+
'&:focus-visible': function focusVisible(theme) {
|
|
37
|
+
return theme.outline;
|
|
38
|
+
},
|
|
33
39
|
'&:disabled': {
|
|
34
|
-
opacity: 0.
|
|
40
|
+
opacity: 0.7,
|
|
35
41
|
cursor: 'not-allowed',
|
|
36
42
|
pointerEvents: 'all'
|
|
37
43
|
}
|
|
@@ -38,6 +38,7 @@ var Toggle = function Toggle(_ref) {
|
|
|
38
38
|
className: (0, _classnames["default"])('vip-toggle-component', className),
|
|
39
39
|
sx: {
|
|
40
40
|
all: 'unset',
|
|
41
|
+
cursor: 'pointer',
|
|
41
42
|
position: 'relative',
|
|
42
43
|
width: 40,
|
|
43
44
|
height: 20,
|
|
@@ -47,6 +48,15 @@ var Toggle = function Toggle(_ref) {
|
|
|
47
48
|
backgroundPosition: 'right 2px top 2px',
|
|
48
49
|
backgroundImage: "url(\n\t\t\t\t'data:image/svg+xml;utf8,<svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M4.53846 3L3 4.53846L6.46156 8.00001L3.00003 11.4615L4.53848 13L8.00001 9.53847L11.4615 13L13 11.4615L9.53847 8.00001L13 4.53849L11.4615 3.00003L8.00001 6.46156L4.53846 3Z\" fill=\"white\"/></svg>')",
|
|
49
50
|
WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)',
|
|
51
|
+
'&:focus': function focus(theme) {
|
|
52
|
+
return theme.outline;
|
|
53
|
+
},
|
|
54
|
+
'&:focus-visible': function focusVisible(theme) {
|
|
55
|
+
return theme.outline;
|
|
56
|
+
},
|
|
57
|
+
'&[disabled]': {
|
|
58
|
+
opacity: 0.7
|
|
59
|
+
},
|
|
50
60
|
'&[data-state="checked"]': {
|
|
51
61
|
backgroundColor: variant,
|
|
52
62
|
backgroundPosition: 'left 2px top 2px',
|
|
@@ -42,6 +42,10 @@ var Default = function Default(args) {
|
|
|
42
42
|
checked: args.checked,
|
|
43
43
|
defaultChecked: false,
|
|
44
44
|
"aria-label": "Feature flag 2"
|
|
45
|
+
}), (0, _jsxRuntime.jsx)("br", {}), (0, _jsxRuntime.jsx)("br", {}), (0, _jsxRuntime.jsx)(_.Toggle, {
|
|
46
|
+
"aria-label": "Feature Disabled",
|
|
47
|
+
disabled: true,
|
|
48
|
+
defaultChecked: false
|
|
45
49
|
})]
|
|
46
50
|
});
|
|
47
51
|
};
|
|
@@ -33,6 +33,12 @@ var Link = function Link(_ref) {
|
|
|
33
33
|
},
|
|
34
34
|
'&:hover, &:focus': {
|
|
35
35
|
color: 'heading'
|
|
36
|
+
},
|
|
37
|
+
'&:focus': function focus(theme) {
|
|
38
|
+
return theme.outline;
|
|
39
|
+
},
|
|
40
|
+
'&:focus-visible': function focusVisible(theme) {
|
|
41
|
+
return theme.outline;
|
|
36
42
|
}
|
|
37
43
|
}, sx)
|
|
38
44
|
}));
|
|
@@ -58,10 +58,11 @@ var DialogClose = /*#__PURE__*/_react["default"].forwardRef(function (props, for
|
|
|
58
58
|
outlineColor: 'primary',
|
|
59
59
|
outlineWidth: '2px'
|
|
60
60
|
},
|
|
61
|
-
'&:focus': {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
'&:focus': function focus(theme) {
|
|
62
|
+
return theme.outline;
|
|
63
|
+
},
|
|
64
|
+
'&:focus-visible': function focusVisible(theme) {
|
|
65
|
+
return theme.outline;
|
|
65
66
|
}
|
|
66
67
|
},
|
|
67
68
|
children: (0, _jsxRuntime.jsx)(_io.IoClose, {
|
|
@@ -42,6 +42,9 @@ var DialogDescription = /*#__PURE__*/_react["default"].forwardRef(function (_ref
|
|
|
42
42
|
|
|
43
43
|
return (0, _jsxRuntime.jsx)(DialogPrimitive.Description, (0, _extends2["default"])({}, rest, {
|
|
44
44
|
ref: forwardedRef,
|
|
45
|
+
sx: {
|
|
46
|
+
margin: 0
|
|
47
|
+
},
|
|
45
48
|
children: text
|
|
46
49
|
}));
|
|
47
50
|
});
|
|
@@ -88,7 +88,10 @@ var NewDialog = function NewDialog(_ref) {
|
|
|
88
88
|
}), (0, _jsxRuntime.jsx)(_DialogDescription.DialogDescription, {
|
|
89
89
|
description: description,
|
|
90
90
|
hidden: !showHeading
|
|
91
|
-
}),
|
|
91
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
92
|
+
role: "document",
|
|
93
|
+
children: content
|
|
94
|
+
})]
|
|
92
95
|
})]
|
|
93
96
|
})]
|
|
94
97
|
});
|
|
@@ -59,6 +59,13 @@ var AutoOpen = function AutoOpen() {
|
|
|
59
59
|
children: "Auto Opens when rendered. Press escape to close it."
|
|
60
60
|
}), (0, _jsxRuntime.jsx)(_NewDialog.NewDialog, (0, _extends2["default"])({}, defaultProps, {
|
|
61
61
|
defaultOpen: true,
|
|
62
|
+
content: (0, _jsxRuntime.jsxs)("div", {
|
|
63
|
+
children: [(0, _jsxRuntime.jsx)("h3", {
|
|
64
|
+
children: "Test"
|
|
65
|
+
}), (0, _jsxRuntime.jsx)("p", {
|
|
66
|
+
children: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."
|
|
67
|
+
})]
|
|
68
|
+
}),
|
|
62
69
|
trigger: (0, _jsxRuntime.jsx)(_ScreenReaderText["default"], {
|
|
63
70
|
children: "hey"
|
|
64
71
|
})
|
|
@@ -97,6 +104,10 @@ var HiddenHeadings = function HiddenHeadings() {
|
|
|
97
104
|
type: "submit",
|
|
98
105
|
children: "Submit"
|
|
99
106
|
})]
|
|
107
|
+
}), (0, _jsxRuntime.jsx)("h3", {
|
|
108
|
+
children: "Continue here"
|
|
109
|
+
}), (0, _jsxRuntime.jsx)("p", {
|
|
110
|
+
children: "This is an example."
|
|
100
111
|
})]
|
|
101
112
|
})
|
|
102
113
|
}))]
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
exports.getColor = void 0;
|
|
7
|
+
|
|
8
|
+
var _valetColor = _interopRequireDefault(require("../../../tokens/valet-color.json"));
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Internal dependencies
|
|
12
|
+
*/
|
|
13
|
+
var ThemeColors = _valetColor["default"]['productive-color-wpvip'];
|
|
14
|
+
var CoreColors = _valetColor["default"]['valet-core'];
|
|
15
|
+
|
|
16
|
+
var getColor = function getColor(color, variant) {
|
|
17
|
+
if (variant === void 0) {
|
|
18
|
+
variant = 'default';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (!ThemeColors[color]) {
|
|
22
|
+
return '#000000';
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var colorValue = ThemeColors[color][variant].value;
|
|
26
|
+
|
|
27
|
+
if (colorValue.startsWith('{')) {
|
|
28
|
+
var _colorValue$replace$s = colorValue.replace(/[{}]/g, '').split('.'),
|
|
29
|
+
name = _colorValue$replace$s[0],
|
|
30
|
+
number = _colorValue$replace$s[1]; // Some colors are flat, there is no sub values.
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
if (CoreColors[name][number]) {
|
|
34
|
+
return CoreColors[name][number].value;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
return CoreColors[name].value;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return colorValue;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
exports.getColor = getColor;
|
|
@@ -9,6 +9,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
9
9
|
|
|
10
10
|
var _colors = require("./colors");
|
|
11
11
|
|
|
12
|
+
var _getColor = require("./getColor");
|
|
13
|
+
|
|
12
14
|
/**
|
|
13
15
|
* Internal dependencies
|
|
14
16
|
*/
|
|
@@ -59,7 +61,14 @@ var textStyles = {
|
|
|
59
61
|
letterSpacing: '.05em'
|
|
60
62
|
}
|
|
61
63
|
};
|
|
64
|
+
var outline = {
|
|
65
|
+
outlineStyle: 'solid',
|
|
66
|
+
outlineColor: '#ffffff',
|
|
67
|
+
outlineWidth: '1px',
|
|
68
|
+
boxShadow: "0 0 0 1px #fff, 0 0 0 3px " + (0, _getColor.getColor)('focus')
|
|
69
|
+
};
|
|
62
70
|
var _default = {
|
|
71
|
+
outline: outline,
|
|
63
72
|
space: [0, 4, 8, 16, 32, 64, 128, 256, 512],
|
|
64
73
|
fonts: {
|
|
65
74
|
body: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif',
|
|
@@ -86,8 +95,8 @@ var _default = {
|
|
|
86
95
|
},
|
|
87
96
|
initialColorModeName: 'light',
|
|
88
97
|
colors: (0, _extends2["default"])({
|
|
89
|
-
text:
|
|
90
|
-
heading:
|
|
98
|
+
text: (0, _getColor.getColor)('text', 'secondary'),
|
|
99
|
+
heading: (0, _getColor.getColor)('text', 'primary'),
|
|
91
100
|
background: '#fdfdfd',
|
|
92
101
|
backgroundSecondary: _colors.light.grey['10'],
|
|
93
102
|
primary: _colors.light.brand['70'],
|
package/package.json
CHANGED
|
@@ -16,8 +16,10 @@ const Button = ( { sx, ...props } ) => (
|
|
|
16
16
|
justifyContent: 'center',
|
|
17
17
|
height: '36px',
|
|
18
18
|
py: 0,
|
|
19
|
+
'&:focus': theme => theme.outline,
|
|
20
|
+
'&:focus-visible': theme => theme.outline,
|
|
19
21
|
'&:disabled': {
|
|
20
|
-
opacity: 0.
|
|
22
|
+
opacity: 0.7,
|
|
21
23
|
cursor: 'not-allowed',
|
|
22
24
|
pointerEvents: 'all',
|
|
23
25
|
},
|
|
@@ -23,6 +23,7 @@ export const Toggle = ( {
|
|
|
23
23
|
className={ classNames( 'vip-toggle-component', className ) }
|
|
24
24
|
sx={ {
|
|
25
25
|
all: 'unset',
|
|
26
|
+
cursor: 'pointer',
|
|
26
27
|
position: 'relative',
|
|
27
28
|
width: 40,
|
|
28
29
|
height: 20,
|
|
@@ -34,6 +35,11 @@ export const Toggle = ( {
|
|
|
34
35
|
'data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M4.53846 3L3 4.53846L6.46156 8.00001L3.00003 11.4615L4.53848 13L8.00001 9.53847L11.4615 13L13 11.4615L9.53847 8.00001L13 4.53849L11.4615 3.00003L8.00001 6.46156L4.53846 3Z" fill="white"/></svg>')`,
|
|
35
36
|
WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)',
|
|
36
37
|
|
|
38
|
+
'&:focus': theme => theme.outline,
|
|
39
|
+
'&:focus-visible': theme => theme.outline,
|
|
40
|
+
'&[disabled]': {
|
|
41
|
+
opacity: 0.7,
|
|
42
|
+
},
|
|
37
43
|
'&[data-state="checked"]': {
|
|
38
44
|
backgroundColor: variant,
|
|
39
45
|
backgroundPosition: 'left 2px top 2px',
|
|
@@ -33,6 +33,11 @@ const Default = args => (
|
|
|
33
33
|
<br />
|
|
34
34
|
|
|
35
35
|
<Toggle checked={ args.checked } defaultChecked={ false } aria-label="Feature flag 2" />
|
|
36
|
+
|
|
37
|
+
<br />
|
|
38
|
+
<br />
|
|
39
|
+
|
|
40
|
+
<Toggle aria-label="Feature Disabled" disabled defaultChecked={ false } />
|
|
36
41
|
</form>
|
|
37
42
|
);
|
|
38
43
|
|
package/src/system/Link/Link.js
CHANGED
|
@@ -34,7 +34,8 @@ export const DialogClose = React.forwardRef( ( props, forwardedRef ) => (
|
|
|
34
34
|
outlineColor: 'primary',
|
|
35
35
|
outlineWidth: '2px',
|
|
36
36
|
},
|
|
37
|
-
'&:focus':
|
|
37
|
+
'&:focus': theme => theme.outline,
|
|
38
|
+
'&:focus-visible': theme => theme.outline,
|
|
38
39
|
} }
|
|
39
40
|
>
|
|
40
41
|
<IoClose aria-hidden="true" />
|
|
@@ -21,7 +21,7 @@ export const DialogDescription = React.forwardRef(
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
|
-
<DialogPrimitive.Description { ...rest } ref={ forwardedRef }>
|
|
24
|
+
<DialogPrimitive.Description { ...rest } ref={ forwardedRef } sx={ { margin: 0 } }>
|
|
25
25
|
{ text }
|
|
26
26
|
</DialogPrimitive.Description>
|
|
27
27
|
);
|
|
@@ -18,7 +18,7 @@ export const DialogTitle = ( { title, hidden = false } ) => {
|
|
|
18
18
|
titleNode = <ScreenReaderText>{ titleNode }</ScreenReaderText>;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
return <DialogPrimitive.Title>{ titleNode }</DialogPrimitive.Title>;
|
|
21
|
+
return <DialogPrimitive.Title sx={ { margin: 0 } }>{ titleNode }</DialogPrimitive.Title>;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
DialogTitle.propTypes = {
|
|
@@ -56,7 +56,7 @@ export const NewDialog = ( {
|
|
|
56
56
|
<DialogTitle title={ title } hidden={ ! showHeading } />
|
|
57
57
|
<DialogDescription description={ description } hidden={ ! showHeading } />
|
|
58
58
|
|
|
59
|
-
{ content }
|
|
59
|
+
<div role="document">{ content }</div>
|
|
60
60
|
</DialogPrimitive.Content>
|
|
61
61
|
</DialogPrimitive.Portal>
|
|
62
62
|
</DialogPrimitive.Root>
|
|
@@ -34,6 +34,20 @@ export const AutoOpen = () => (
|
|
|
34
34
|
<NewDialog
|
|
35
35
|
{ ...defaultProps }
|
|
36
36
|
defaultOpen={ true }
|
|
37
|
+
content={
|
|
38
|
+
<div>
|
|
39
|
+
<h3>Test</h3>
|
|
40
|
+
<p>
|
|
41
|
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum
|
|
42
|
+
has been the industry standard dummy text ever since the 1500s, when an unknown printer
|
|
43
|
+
took a galley of type and scrambled it to make a type specimen book. It has survived not
|
|
44
|
+
only five centuries, but also the leap into electronic typesetting, remaining
|
|
45
|
+
essentially unchanged. It was popularised in the 1960s with the release of Letraset
|
|
46
|
+
sheets containing Lorem Ipsum passages, and more recently with desktop publishing
|
|
47
|
+
software like Aldus PageMaker including versions of Lorem Ipsum.
|
|
48
|
+
</p>
|
|
49
|
+
</div>
|
|
50
|
+
}
|
|
37
51
|
trigger={ <ScreenReaderText>hey</ScreenReaderText> }
|
|
38
52
|
/>
|
|
39
53
|
</>
|
|
@@ -61,6 +75,10 @@ export const HiddenHeadings = () => (
|
|
|
61
75
|
<Input type="text" name="username" id="username" />
|
|
62
76
|
<Button type="submit">Submit</Button>
|
|
63
77
|
</form>
|
|
78
|
+
|
|
79
|
+
<h3>Continue here</h3>
|
|
80
|
+
|
|
81
|
+
<p>This is an example.</p>
|
|
64
82
|
</div>
|
|
65
83
|
}
|
|
66
84
|
/>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import Valet from '../../../tokens/valet-color.json';
|
|
6
|
+
|
|
7
|
+
const ThemeColors = Valet[ 'productive-color-wpvip' ];
|
|
8
|
+
const CoreColors = Valet[ 'valet-core' ];
|
|
9
|
+
|
|
10
|
+
export const getColor = ( color, variant = 'default' ) => {
|
|
11
|
+
if ( ! ThemeColors[ color ] ) {
|
|
12
|
+
return '#000000';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const colorValue = ThemeColors[ color ][ variant ].value;
|
|
16
|
+
|
|
17
|
+
if ( colorValue.startsWith( '{' ) ) {
|
|
18
|
+
const [ name, number ] = colorValue.replace( /[{}]/g, '' ).split( '.' );
|
|
19
|
+
|
|
20
|
+
// Some colors are flat, there is no sub values.
|
|
21
|
+
if ( CoreColors[ name ][ number ] ) {
|
|
22
|
+
return CoreColors[ name ][ number ].value;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return CoreColors[ name ].value;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return colorValue;
|
|
29
|
+
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Internal dependencies
|
|
3
3
|
*/
|
|
4
4
|
import { light, dark } from './colors';
|
|
5
|
+
import { getColor } from './getColor';
|
|
5
6
|
|
|
6
7
|
const textStyles = {
|
|
7
8
|
h1: {
|
|
@@ -51,7 +52,15 @@ const textStyles = {
|
|
|
51
52
|
},
|
|
52
53
|
};
|
|
53
54
|
|
|
55
|
+
const outline = {
|
|
56
|
+
outlineStyle: 'solid',
|
|
57
|
+
outlineColor: '#ffffff',
|
|
58
|
+
outlineWidth: '1px',
|
|
59
|
+
boxShadow: `0 0 0 1px #fff, 0 0 0 3px ${ getColor( 'focus' ) }`,
|
|
60
|
+
};
|
|
61
|
+
|
|
54
62
|
export default {
|
|
63
|
+
outline,
|
|
55
64
|
space: [ 0, 4, 8, 16, 32, 64, 128, 256, 512 ],
|
|
56
65
|
fonts: {
|
|
57
66
|
body: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif',
|
|
@@ -78,8 +87,8 @@ export default {
|
|
|
78
87
|
},
|
|
79
88
|
initialColorModeName: 'light',
|
|
80
89
|
colors: {
|
|
81
|
-
text:
|
|
82
|
-
heading:
|
|
90
|
+
text: getColor( 'text', 'secondary' ),
|
|
91
|
+
heading: getColor( 'text', 'primary' ),
|
|
83
92
|
background: '#fdfdfd',
|
|
84
93
|
backgroundSecondary: light.grey[ '10' ],
|
|
85
94
|
primary: light.brand[ '70' ],
|