@workday/canvas-kit-docs 12.0.4 → 12.0.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.
|
@@ -8,6 +8,11 @@ import {systemIconStencil} from '@workday/canvas-kit-react/icon';
|
|
|
8
8
|
import {createStencil, createStyles, handleCsProp, px2rem} from '@workday/canvas-kit-styling';
|
|
9
9
|
import {system} from '@workday/canvas-tokens-web';
|
|
10
10
|
|
|
11
|
+
const customContainer = createStyles({
|
|
12
|
+
gap: system.space.x4,
|
|
13
|
+
maxWidth: 'max-content',
|
|
14
|
+
});
|
|
15
|
+
|
|
11
16
|
const myButtonStencil = createStencil({
|
|
12
17
|
base: {
|
|
13
18
|
[buttonStencil.vars.background]: system.color.static.green.soft,
|
|
@@ -19,11 +24,13 @@ const myButtonStencil = createStencil({
|
|
|
19
24
|
[buttonStencil.vars.background]: system.color.static.green.strong,
|
|
20
25
|
[buttonStencil.vars.boxShadowInner]: system.color.static.green.soft,
|
|
21
26
|
[buttonStencil.vars.boxShadowOuter]: system.color.static.green.strong,
|
|
27
|
+
[systemIconStencil.vars.color]: system.color.icon.inverse,
|
|
22
28
|
},
|
|
23
29
|
'&:hover': {
|
|
24
30
|
[buttonStencil.vars.background]: system.color.static.green.default,
|
|
25
31
|
border: `${px2rem(3)} dotted ${system.color.static.green.strong}`,
|
|
26
32
|
[systemIconStencil.vars.color]: system.color.static.green.strong,
|
|
33
|
+
[systemIconStencil.vars.color]: system.color.icon.inverse,
|
|
27
34
|
},
|
|
28
35
|
'&:active': {
|
|
29
36
|
[buttonStencil.vars.background]: system.color.static.green.strong,
|
|
@@ -44,6 +51,29 @@ const MyCustomButton = createComponent('button')({
|
|
|
44
51
|
const myCustomStyles = createStyles({
|
|
45
52
|
padding: system.space.x4,
|
|
46
53
|
textTransform: 'uppercase',
|
|
54
|
+
[buttonStencil.vars.background]: system.color.static.gray.soft,
|
|
55
|
+
[buttonStencil.vars.label]: system.color.static.gray.strong,
|
|
56
|
+
[systemIconStencil.vars.color]: system.color.static.gray.strong,
|
|
57
|
+
[buttonStencil.vars.borderRadius]: system.shape.x2,
|
|
58
|
+
[buttonStencil.vars.border]: system.color.static.gray.stronger,
|
|
59
|
+
'&:focus-visible': {
|
|
60
|
+
[buttonStencil.vars.background]: system.color.static.gray.strong,
|
|
61
|
+
[buttonStencil.vars.boxShadowInner]: system.color.static.gray.soft,
|
|
62
|
+
[buttonStencil.vars.boxShadowOuter]: system.color.static.gray.strong,
|
|
63
|
+
[systemIconStencil.vars.color]: system.color.icon.inverse,
|
|
64
|
+
},
|
|
65
|
+
'&:hover': {
|
|
66
|
+
[buttonStencil.vars.background]: system.color.static.gray.default,
|
|
67
|
+
[buttonStencil.vars.border]: `${px2rem(3)} dotted ${system.color.static.gray.strong}`,
|
|
68
|
+
[systemIconStencil.vars.color]: system.color.static.gray.strong,
|
|
69
|
+
[systemIconStencil.vars.color]: system.color.icon.inverse,
|
|
70
|
+
border: `${px2rem(3)} dotted ${system.color.static.gray.strong}`,
|
|
71
|
+
},
|
|
72
|
+
'&:active': {
|
|
73
|
+
[buttonStencil.vars.background]: system.color.static.gray.strong,
|
|
74
|
+
[buttonStencil.vars.label]: system.color.fg.inverse,
|
|
75
|
+
[systemIconStencil.vars.color]: system.color.fg.inverse,
|
|
76
|
+
},
|
|
47
77
|
});
|
|
48
78
|
|
|
49
79
|
const customColors = {
|
|
@@ -52,25 +82,27 @@ const customColors = {
|
|
|
52
82
|
icon: system.color.static.orange.strong,
|
|
53
83
|
label: system.color.static.orange.strong,
|
|
54
84
|
},
|
|
85
|
+
focus: {
|
|
86
|
+
background: system.color.static.orange.strong,
|
|
87
|
+
boxShadowInner: system.color.static.orange.soft,
|
|
88
|
+
boxShadowOuter: system.color.static.orange.strong,
|
|
89
|
+
},
|
|
55
90
|
hover: {
|
|
56
91
|
background: system.color.static.orange.default,
|
|
57
|
-
icon: system.color.
|
|
92
|
+
icon: system.color.icon.inverse,
|
|
58
93
|
},
|
|
59
94
|
active: {
|
|
60
95
|
background: system.color.static.orange.strong,
|
|
61
96
|
},
|
|
62
|
-
focus: {
|
|
63
|
-
background: system.color.static.orange.strong,
|
|
64
|
-
boxShadowInner: system.color.static.orange.soft,
|
|
65
|
-
boxShadowOuter: system.color.static.orange.strong,
|
|
66
|
-
},
|
|
67
97
|
disabled: {},
|
|
68
98
|
};
|
|
69
99
|
|
|
70
100
|
export default () => (
|
|
71
|
-
<Grid cs={
|
|
101
|
+
<Grid cs={customContainer}>
|
|
72
102
|
<MyCustomButton icon={plusIcon}>Styling Override Via Stencil Variables</MyCustomButton>
|
|
73
|
-
<
|
|
103
|
+
<MyCustomButton icon={plusIcon} cs={myCustomStyles}>
|
|
104
|
+
Style Override Via Create Styles
|
|
105
|
+
</MyCustomButton>
|
|
74
106
|
<PrimaryButton icon={plusIcon} colors={customColors}>
|
|
75
107
|
Styling Override Via Colors Prop
|
|
76
108
|
</PrimaryButton>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-docs",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.5",
|
|
4
4
|
"description": "Documentation components of Canvas Kit components",
|
|
5
5
|
"author": "Workday, Inc. (https://www.workday.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@emotion/styled": "^11.6.0",
|
|
46
46
|
"@storybook/csf": "0.0.1",
|
|
47
|
-
"@workday/canvas-kit-labs-react": "^12.0.
|
|
48
|
-
"@workday/canvas-kit-preview-react": "^12.0.
|
|
49
|
-
"@workday/canvas-kit-react": "^12.0.
|
|
50
|
-
"@workday/canvas-kit-styling": "^12.0.
|
|
47
|
+
"@workday/canvas-kit-labs-react": "^12.0.5",
|
|
48
|
+
"@workday/canvas-kit-preview-react": "^12.0.5",
|
|
49
|
+
"@workday/canvas-kit-react": "^12.0.5",
|
|
50
|
+
"@workday/canvas-kit-styling": "^12.0.5",
|
|
51
51
|
"@workday/canvas-system-icons-web": "^3.0.0",
|
|
52
52
|
"@workday/canvas-tokens-web": "^2.0.1",
|
|
53
53
|
"markdown-to-jsx": "^7.2.0",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"mkdirp": "^1.0.3",
|
|
61
61
|
"typescript": "5.0"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "cc29f641cfd65e404e4f748b63661319e3c5cf03"
|
|
64
64
|
}
|