@workday/canvas-kit-react 11.0.11 → 11.0.13
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/avatar/lib/Avatar.tsx +7 -3
- package/button/lib/DeleteButton.tsx +7 -7
- package/button/lib/PrimaryButton.tsx +30 -12
- package/button/lib/SecondaryButton.tsx +36 -12
- package/button/lib/TertiaryButton.tsx +71 -22
- package/common/lib/theming/index.ts +1 -1
- package/common/lib/theming/styled.ts +23 -16
- package/dist/commonjs/avatar/lib/Avatar.d.ts.map +1 -1
- package/dist/commonjs/avatar/lib/Avatar.js +6 -2
- package/dist/commonjs/button/lib/DeleteButton.js +2 -2
- package/dist/commonjs/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/PrimaryButton.js +3 -3
- package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/SecondaryButton.js +3 -3
- package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/TertiaryButton.js +19 -19
- package/dist/commonjs/common/lib/theming/index.d.ts +1 -1
- package/dist/commonjs/common/lib/theming/index.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/index.js +2 -1
- package/dist/commonjs/common/lib/theming/styled.d.ts +1 -0
- package/dist/commonjs/common/lib/theming/styled.d.ts.map +1 -1
- package/dist/commonjs/common/lib/theming/styled.js +7 -2
- package/dist/commonjs/skeleton/lib/parts/skeletonText.d.ts.map +1 -1
- package/dist/commonjs/skeleton/lib/parts/skeletonText.js +3 -1
- package/dist/commonjs/tabs/lib/TabsList.d.ts.map +1 -1
- package/dist/commonjs/tabs/lib/TabsList.js +3 -1
- package/dist/es6/avatar/lib/Avatar.d.ts.map +1 -1
- package/dist/es6/avatar/lib/Avatar.js +7 -3
- package/dist/es6/button/lib/DeleteButton.js +4 -4
- package/dist/es6/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/PrimaryButton.js +5 -5
- package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/SecondaryButton.js +5 -5
- package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/TertiaryButton.js +21 -21
- package/dist/es6/common/lib/theming/index.d.ts +1 -1
- package/dist/es6/common/lib/theming/index.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/index.js +1 -1
- package/dist/es6/common/lib/theming/styled.d.ts +1 -0
- package/dist/es6/common/lib/theming/styled.d.ts.map +1 -1
- package/dist/es6/common/lib/theming/styled.js +5 -2
- package/dist/es6/skeleton/lib/parts/skeletonText.d.ts.map +1 -1
- package/dist/es6/skeleton/lib/parts/skeletonText.js +4 -2
- package/dist/es6/tabs/lib/TabsList.d.ts.map +1 -1
- package/dist/es6/tabs/lib/TabsList.js +4 -2
- package/package.json +4 -4
- package/skeleton/lib/parts/skeletonText.tsx +4 -2
- package/tabs/lib/TabsList.tsx +6 -3
package/avatar/lib/Avatar.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, {useState} from 'react';
|
|
2
2
|
import {Property} from 'csstype';
|
|
3
|
-
import {styled, focusRing, hideMouseFocus} from '@workday/canvas-kit-react/common';
|
|
3
|
+
import {styled, focusRing, hideMouseFocus, filterOutProps} from '@workday/canvas-kit-react/common';
|
|
4
4
|
import isPropValid from '@emotion/is-prop-valid';
|
|
5
5
|
import {borderRadius, colors} from '@workday/canvas-kit-react/tokens';
|
|
6
6
|
import {SystemIconCircle, SystemIconCircleSize} from '@workday/canvas-kit-react/icon';
|
|
@@ -106,7 +106,9 @@ const StyledStack = styled('span')<Pick<AvatarProps, 'size'>>(
|
|
|
106
106
|
})
|
|
107
107
|
);
|
|
108
108
|
|
|
109
|
-
const StyledIcon = styled(SystemIconCircle
|
|
109
|
+
const StyledIcon = styled(SystemIconCircle, {
|
|
110
|
+
shouldForwardProp: filterOutProps(['isImageLoaded']),
|
|
111
|
+
})<{isImageLoaded: boolean}>(
|
|
110
112
|
{
|
|
111
113
|
transition: fadeTransition,
|
|
112
114
|
},
|
|
@@ -115,7 +117,9 @@ const StyledIcon = styled(SystemIconCircle)<{isImageLoaded: boolean}>(
|
|
|
115
117
|
})
|
|
116
118
|
);
|
|
117
119
|
|
|
118
|
-
const StyledImage = styled('img'
|
|
120
|
+
const StyledImage = styled('img', {
|
|
121
|
+
shouldForwardProp: filterOutProps(['isLoaded', 'objectFit']),
|
|
122
|
+
})<{isLoaded: boolean; objectFit?: Property.ObjectFit}>(
|
|
119
123
|
{
|
|
120
124
|
width: '100%',
|
|
121
125
|
height: '100%',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import {buttonStencil} from './BaseButton';
|
|
3
|
+
import {buttonColorPropVars, buttonStencil} from './BaseButton';
|
|
4
4
|
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
5
|
-
import {createStencil} from '@workday/canvas-kit-styling';
|
|
5
|
+
import {createStencil, cssVar} from '@workday/canvas-kit-styling';
|
|
6
6
|
import {brand, system} from '@workday/canvas-tokens-web';
|
|
7
7
|
import {Button, ButtonProps} from './Button';
|
|
8
8
|
import {systemIconStencil} from '@workday/canvas-kit-react/icon';
|
|
@@ -22,12 +22,12 @@ const deleteButtonStencil = createStencil({
|
|
|
22
22
|
[buttonStencil.vars.background]: brand.error.base,
|
|
23
23
|
[buttonStencil.vars.borderRadius]: system.shape.round,
|
|
24
24
|
[buttonStencil.vars.label]: brand.error.accent,
|
|
25
|
-
[systemIconStencil.vars.color]: brand.error.accent,
|
|
25
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, brand.error.accent),
|
|
26
26
|
// Focus Styles
|
|
27
27
|
'&:focus-visible, &.focus': {
|
|
28
28
|
[buttonStencil.vars.background]: brand.error.base,
|
|
29
29
|
[buttonStencil.vars.label]: brand.error.accent,
|
|
30
|
-
[systemIconStencil.vars.color]: brand.error.accent,
|
|
30
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.focus.icon, brand.error.accent),
|
|
31
31
|
[buttonStencil.vars.boxShadowInner]: system.color.border.inverse,
|
|
32
32
|
[buttonStencil.vars.boxShadowOuter]: brand.common.focusOutline,
|
|
33
33
|
},
|
|
@@ -35,19 +35,19 @@ const deleteButtonStencil = createStencil({
|
|
|
35
35
|
'&:hover, &.hover': {
|
|
36
36
|
[buttonStencil.vars.background]: brand.error.dark,
|
|
37
37
|
[buttonStencil.vars.label]: brand.error.accent,
|
|
38
|
-
[systemIconStencil.vars.color]: brand.error.accent,
|
|
38
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.hover.icon, brand.error.accent),
|
|
39
39
|
},
|
|
40
40
|
// Active Styles
|
|
41
41
|
'&:active, &.active': {
|
|
42
42
|
[buttonStencil.vars.background]: brand.error.darkest,
|
|
43
43
|
[buttonStencil.vars.label]: brand.error.accent,
|
|
44
|
-
[systemIconStencil.vars.color]: brand.error.accent,
|
|
44
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.active.icon, brand.error.accent),
|
|
45
45
|
},
|
|
46
46
|
// Disabled Styles
|
|
47
47
|
'&:disabled, &.disabled': {
|
|
48
48
|
[buttonStencil.vars.background]: brand.error.base,
|
|
49
49
|
[buttonStencil.vars.label]: brand.error.accent,
|
|
50
|
-
[systemIconStencil.vars.color]: brand.error.accent,
|
|
50
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.disabled.icon, brand.error.accent),
|
|
51
51
|
[buttonStencil.vars.opacity]: system.opacity.disabled,
|
|
52
52
|
},
|
|
53
53
|
},
|
|
@@ -2,9 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
|
|
3
3
|
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
4
4
|
import {systemIconStencil} from '@workday/canvas-kit-react/icon';
|
|
5
|
-
import {createStencil} from '@workday/canvas-kit-styling';
|
|
5
|
+
import {createStencil, cssVar} from '@workday/canvas-kit-styling';
|
|
6
6
|
import {brand, system} from '@workday/canvas-tokens-web';
|
|
7
|
-
import {buttonStencil} from './BaseButton';
|
|
7
|
+
import {buttonColorPropVars, buttonStencil} from './BaseButton';
|
|
8
8
|
import {Button, ButtonProps} from './Button';
|
|
9
9
|
import {mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
10
10
|
|
|
@@ -27,33 +27,36 @@ const primaryButtonStencil = createStencil({
|
|
|
27
27
|
[buttonStencil.vars.background]: brand.primary.base,
|
|
28
28
|
[buttonStencil.vars.borderRadius]: system.shape.round,
|
|
29
29
|
[buttonStencil.vars.label]: brand.primary.accent,
|
|
30
|
-
[systemIconStencil.vars.color]: brand.primary.accent,
|
|
30
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, brand.primary.accent),
|
|
31
31
|
// Focus Styles
|
|
32
32
|
'&:focus-visible, &.focus': {
|
|
33
33
|
[buttonStencil.vars.background]: brand.primary.base,
|
|
34
34
|
[buttonStencil.vars.label]: brand.primary.accent,
|
|
35
35
|
[buttonStencil.vars.boxShadowInner]: system.color.border.inverse,
|
|
36
36
|
[buttonStencil.vars.boxShadowOuter]: brand.common.focusOutline,
|
|
37
|
-
[systemIconStencil.vars.color]: brand.primary.accent,
|
|
37
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.focus.icon, brand.primary.accent),
|
|
38
38
|
},
|
|
39
39
|
// Hover Styles
|
|
40
40
|
'&:hover, &.hover': {
|
|
41
41
|
[buttonStencil.vars.background]: brand.primary.dark,
|
|
42
42
|
[buttonStencil.vars.label]: brand.primary.accent,
|
|
43
|
-
[systemIconStencil.vars.color]: brand.primary.accent,
|
|
43
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.hover.icon, brand.primary.accent),
|
|
44
44
|
},
|
|
45
45
|
// Active Styles
|
|
46
46
|
'&:active, &.active': {
|
|
47
47
|
[buttonStencil.vars.background]: brand.primary.darkest,
|
|
48
48
|
[buttonStencil.vars.label]: brand.primary.accent,
|
|
49
|
-
[systemIconStencil.vars.color]: brand.primary.accent,
|
|
49
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.active.icon, brand.primary.accent),
|
|
50
50
|
},
|
|
51
51
|
// Disabled Styles
|
|
52
52
|
'&:disabled, &.disabled': {
|
|
53
53
|
[buttonStencil.vars.background]: brand.primary.base,
|
|
54
54
|
[buttonStencil.vars.label]: brand.primary.accent,
|
|
55
55
|
[buttonStencil.vars.opacity]: system.opacity.disabled,
|
|
56
|
-
[systemIconStencil.vars.color]:
|
|
56
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
57
|
+
buttonColorPropVars.disabled.icon,
|
|
58
|
+
brand.primary.accent
|
|
59
|
+
),
|
|
57
60
|
},
|
|
58
61
|
},
|
|
59
62
|
modifiers: {
|
|
@@ -63,32 +66,47 @@ const primaryButtonStencil = createStencil({
|
|
|
63
66
|
[buttonStencil.vars.background]: system.color.bg.default,
|
|
64
67
|
[buttonStencil.vars.borderRadius]: system.shape.round,
|
|
65
68
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
66
|
-
[systemIconStencil.vars.color]:
|
|
69
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
70
|
+
buttonColorPropVars.default.icon,
|
|
71
|
+
system.color.fg.strong
|
|
72
|
+
),
|
|
67
73
|
// Focus Styles
|
|
68
74
|
'&:focus-visible, &.focus': {
|
|
69
75
|
[buttonStencil.vars.background]: system.color.bg.default,
|
|
70
76
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
71
77
|
[buttonStencil.vars.boxShadowInner]: system.color.border.contrast.default,
|
|
72
78
|
[buttonStencil.vars.boxShadowOuter]: system.color.border.inverse,
|
|
73
|
-
[systemIconStencil.vars.color]:
|
|
79
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
80
|
+
buttonColorPropVars.focus.icon,
|
|
81
|
+
system.color.fg.strong
|
|
82
|
+
),
|
|
74
83
|
},
|
|
75
84
|
// Hover Styles
|
|
76
85
|
'&:hover, &.hover': {
|
|
77
86
|
[buttonStencil.vars.background]: system.color.bg.alt.default,
|
|
78
87
|
[buttonStencil.vars.label]: system.color.fg.stronger,
|
|
79
|
-
[systemIconStencil.vars.color]:
|
|
88
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
89
|
+
buttonColorPropVars.hover.icon,
|
|
90
|
+
system.color.fg.stronger
|
|
91
|
+
),
|
|
80
92
|
},
|
|
81
93
|
// Active Styles
|
|
82
94
|
'&:active, &.active': {
|
|
83
95
|
[buttonStencil.vars.background]: system.color.bg.alt.strong,
|
|
84
96
|
[buttonStencil.vars.label]: system.color.fg.stronger,
|
|
85
|
-
[systemIconStencil.vars.color]:
|
|
97
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
98
|
+
buttonColorPropVars.active.icon,
|
|
99
|
+
system.color.fg.stronger
|
|
100
|
+
),
|
|
86
101
|
},
|
|
87
102
|
// Disabled Styles
|
|
88
103
|
'&:disabled, &.disabled': {
|
|
89
104
|
[buttonStencil.vars.background]: system.color.bg.default,
|
|
90
105
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
91
|
-
[systemIconStencil.vars.color]:
|
|
106
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
107
|
+
buttonColorPropVars.disabled.icon,
|
|
108
|
+
system.color.fg.strong
|
|
109
|
+
),
|
|
92
110
|
},
|
|
93
111
|
},
|
|
94
112
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import {buttonStencil} from './BaseButton';
|
|
3
|
+
import {buttonColorPropVars, buttonStencil} from './BaseButton';
|
|
4
4
|
import {createComponent} from '@workday/canvas-kit-react/common';
|
|
5
|
-
import {createStencil} from '@workday/canvas-kit-styling';
|
|
5
|
+
import {createStencil, cssVar} from '@workday/canvas-kit-styling';
|
|
6
6
|
import {brand, system} from '@workday/canvas-tokens-web';
|
|
7
7
|
import {Button, ButtonProps} from './Button';
|
|
8
8
|
import {systemIconStencil} from '@workday/canvas-kit-react/icon';
|
|
@@ -28,7 +28,10 @@ const secondaryButtonStencil = createStencil({
|
|
|
28
28
|
[buttonStencil.vars.border]: system.color.border.contrast.default,
|
|
29
29
|
[buttonStencil.vars.borderRadius]: system.shape.round,
|
|
30
30
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
31
|
-
[systemIconStencil.vars.color]:
|
|
31
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
32
|
+
buttonColorPropVars.default.icon,
|
|
33
|
+
system.color.fg.strong
|
|
34
|
+
),
|
|
32
35
|
// Focus Styles
|
|
33
36
|
'&:focus-visible, &.focus': {
|
|
34
37
|
[buttonStencil.vars.background]: 'transparent',
|
|
@@ -36,21 +39,24 @@ const secondaryButtonStencil = createStencil({
|
|
|
36
39
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
37
40
|
[buttonStencil.vars.boxShadowInner]: system.color.border.inverse,
|
|
38
41
|
[buttonStencil.vars.boxShadowOuter]: brand.common.focusOutline,
|
|
39
|
-
[systemIconStencil.vars.color]:
|
|
42
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
43
|
+
buttonColorPropVars.focus.icon,
|
|
44
|
+
system.color.fg.strong
|
|
45
|
+
),
|
|
40
46
|
},
|
|
41
47
|
// Hover Styles
|
|
42
48
|
'&:hover, &.hover': {
|
|
43
49
|
[buttonStencil.vars.background]: system.color.bg.contrast.default,
|
|
44
50
|
[buttonStencil.vars.border]: system.color.border.contrast.default,
|
|
45
51
|
[buttonStencil.vars.label]: brand.primary.accent,
|
|
46
|
-
[systemIconStencil.vars.color]: brand.primary.accent,
|
|
52
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.hover.icon, brand.primary.accent),
|
|
47
53
|
},
|
|
48
54
|
// Active Styles
|
|
49
55
|
'&:active, &.active': {
|
|
50
56
|
[buttonStencil.vars.background]: system.color.bg.contrast.strong,
|
|
51
57
|
[buttonStencil.vars.border]: system.color.border.contrast.strong,
|
|
52
58
|
[buttonStencil.vars.label]: brand.primary.accent,
|
|
53
|
-
[systemIconStencil.vars.color]: brand.primary.accent,
|
|
59
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.active.icon, brand.primary.accent),
|
|
54
60
|
},
|
|
55
61
|
// Disabled Styles
|
|
56
62
|
'&:disabled, &.disabled': {
|
|
@@ -58,7 +64,10 @@ const secondaryButtonStencil = createStencil({
|
|
|
58
64
|
[buttonStencil.vars.border]: system.color.border.contrast.default,
|
|
59
65
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
60
66
|
[buttonStencil.vars.opacity]: system.opacity.disabled,
|
|
61
|
-
[systemIconStencil.vars.color]:
|
|
67
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
68
|
+
buttonColorPropVars.disabled.icon,
|
|
69
|
+
system.color.fg.strong
|
|
70
|
+
),
|
|
62
71
|
},
|
|
63
72
|
},
|
|
64
73
|
modifiers: {
|
|
@@ -68,7 +77,10 @@ const secondaryButtonStencil = createStencil({
|
|
|
68
77
|
[buttonStencil.vars.background]: 'transparent',
|
|
69
78
|
[buttonStencil.vars.border]: system.color.border.inverse,
|
|
70
79
|
[buttonStencil.vars.label]: system.color.fg.inverse,
|
|
71
|
-
[systemIconStencil.vars.color]:
|
|
80
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
81
|
+
buttonColorPropVars.default.icon,
|
|
82
|
+
system.color.fg.inverse
|
|
83
|
+
),
|
|
72
84
|
// Focus Styles
|
|
73
85
|
'&:focus-visible, &.focus': {
|
|
74
86
|
[buttonStencil.vars.background]: system.color.bg.default,
|
|
@@ -76,28 +88,40 @@ const secondaryButtonStencil = createStencil({
|
|
|
76
88
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
77
89
|
[buttonStencil.vars.boxShadowInner]: system.color.border.contrast.default,
|
|
78
90
|
[buttonStencil.vars.boxShadowOuter]: system.color.border.inverse,
|
|
79
|
-
[systemIconStencil.vars.color]:
|
|
91
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
92
|
+
buttonColorPropVars.focus.icon,
|
|
93
|
+
system.color.fg.strong
|
|
94
|
+
),
|
|
80
95
|
},
|
|
81
96
|
// Hover Styles
|
|
82
97
|
'&:hover, &.hover': {
|
|
83
98
|
[buttonStencil.vars.background]: system.color.bg.alt.default,
|
|
84
99
|
[buttonStencil.vars.border]: 'transparent',
|
|
85
100
|
[buttonStencil.vars.label]: system.color.fg.stronger,
|
|
86
|
-
[systemIconStencil.vars.color]:
|
|
101
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
102
|
+
buttonColorPropVars.hover.icon,
|
|
103
|
+
system.color.fg.stronger
|
|
104
|
+
),
|
|
87
105
|
},
|
|
88
106
|
// Active Styles
|
|
89
107
|
'&:active, &.active': {
|
|
90
108
|
[buttonStencil.vars.background]: system.color.bg.alt.strong,
|
|
91
109
|
[buttonStencil.vars.border]: 'transparent',
|
|
92
110
|
[buttonStencil.vars.label]: system.color.fg.stronger,
|
|
93
|
-
[systemIconStencil.vars.color]:
|
|
111
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
112
|
+
buttonColorPropVars.active.icon,
|
|
113
|
+
system.color.fg.stronger
|
|
114
|
+
),
|
|
94
115
|
},
|
|
95
116
|
// Disabled Styles
|
|
96
117
|
'&:disabled, &.disabled': {
|
|
97
118
|
[buttonStencil.vars.background]: 'transparent',
|
|
98
119
|
[buttonStencil.vars.border]: system.color.border.inverse,
|
|
99
120
|
[buttonStencil.vars.label]: system.color.fg.inverse,
|
|
100
|
-
[systemIconStencil.vars.color]:
|
|
121
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
122
|
+
buttonColorPropVars.disabled.icon,
|
|
123
|
+
system.color.fg.inverse
|
|
124
|
+
),
|
|
101
125
|
},
|
|
102
126
|
},
|
|
103
127
|
},
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import {buttonStencil} from './BaseButton';
|
|
3
|
+
import {buttonColorPropVars, buttonStencil} from './BaseButton';
|
|
4
4
|
import {createComponent, focusRing} from '@workday/canvas-kit-react/common';
|
|
5
|
-
import {calc, createStencil} from '@workday/canvas-kit-styling';
|
|
5
|
+
import {calc, createStencil, cssVar} from '@workday/canvas-kit-styling';
|
|
6
6
|
import {system, brand} from '@workday/canvas-tokens-web';
|
|
7
7
|
import {Button, ButtonProps} from './Button';
|
|
8
8
|
import {systemIconStencil} from '@workday/canvas-kit-react/icon';
|
|
@@ -32,14 +32,14 @@ const tertiaryButtonStencil = createStencil({
|
|
|
32
32
|
[buttonStencil.vars.background]: 'transparent',
|
|
33
33
|
[buttonStencil.vars.borderRadius]: system.shape.x1,
|
|
34
34
|
[buttonStencil.vars.label]: brand.primary.base,
|
|
35
|
-
[systemIconStencil.vars.color]: brand.primary.base,
|
|
35
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.default.icon, brand.primary.base),
|
|
36
36
|
// Focus Styles
|
|
37
37
|
'&:focus-visible, &.focus': {
|
|
38
38
|
[buttonStencil.vars.background]: 'transparent',
|
|
39
39
|
[buttonStencil.vars.label]: brand.primary.base,
|
|
40
40
|
[buttonStencil.vars.boxShadowInner]: brand.common.focusOutline,
|
|
41
41
|
[buttonStencil.vars.boxShadowOuter]: brand.common.focusOutline,
|
|
42
|
-
[systemIconStencil.vars.color]: brand.primary.base,
|
|
42
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.focus.icon, brand.primary.base),
|
|
43
43
|
...focusRing({
|
|
44
44
|
width: 2,
|
|
45
45
|
separation: 0,
|
|
@@ -51,20 +51,23 @@ const tertiaryButtonStencil = createStencil({
|
|
|
51
51
|
'&:hover, &.hover': {
|
|
52
52
|
[buttonStencil.vars.background]: system.color.bg.alt.default,
|
|
53
53
|
[buttonStencil.vars.label]: brand.primary.dark,
|
|
54
|
-
[systemIconStencil.vars.color]: brand.primary.dark,
|
|
54
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.hover.icon, brand.primary.dark),
|
|
55
55
|
},
|
|
56
56
|
// Active Styles
|
|
57
57
|
'&:active, &.active': {
|
|
58
58
|
[buttonStencil.vars.background]: system.color.bg.alt.strong,
|
|
59
59
|
[buttonStencil.vars.label]: brand.primary.darkest,
|
|
60
|
-
[systemIconStencil.vars.color]:
|
|
60
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
61
|
+
buttonColorPropVars.active.icon,
|
|
62
|
+
brand.primary.darkest
|
|
63
|
+
),
|
|
61
64
|
},
|
|
62
65
|
// Disabled Styles
|
|
63
66
|
'&:disabled, &.disabled': {
|
|
64
67
|
[buttonStencil.vars.background]: 'transparent',
|
|
65
68
|
[buttonStencil.vars.label]: brand.primary.base,
|
|
66
69
|
[buttonStencil.vars.opacity]: system.opacity.disabled,
|
|
67
|
-
[systemIconStencil.vars.color]: brand.primary.base,
|
|
70
|
+
[systemIconStencil.vars.color]: cssVar(buttonColorPropVars.active.icon, brand.primary.base),
|
|
68
71
|
},
|
|
69
72
|
},
|
|
70
73
|
modifiers: {
|
|
@@ -73,18 +76,33 @@ const tertiaryButtonStencil = createStencil({
|
|
|
73
76
|
only: {
|
|
74
77
|
padding: 0,
|
|
75
78
|
borderRadius: system.shape.round,
|
|
76
|
-
[systemIconStencil.vars.color]:
|
|
79
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
80
|
+
buttonColorPropVars.default.icon,
|
|
81
|
+
system.color.fg.strong
|
|
82
|
+
),
|
|
77
83
|
'&:focus-visible, &.focus': {
|
|
78
|
-
[systemIconStencil.vars.color]:
|
|
84
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
85
|
+
buttonColorPropVars.focus.icon,
|
|
86
|
+
system.color.fg.strong
|
|
87
|
+
),
|
|
79
88
|
},
|
|
80
89
|
'&:hover, &.hover': {
|
|
81
|
-
[systemIconStencil.vars.color]:
|
|
90
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
91
|
+
buttonColorPropVars.hover.icon,
|
|
92
|
+
system.color.fg.strong
|
|
93
|
+
),
|
|
82
94
|
},
|
|
83
95
|
'&:active, &.active': {
|
|
84
|
-
[systemIconStencil.vars.color]:
|
|
96
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
97
|
+
buttonColorPropVars.active.icon,
|
|
98
|
+
system.color.fg.strong
|
|
99
|
+
),
|
|
85
100
|
},
|
|
86
101
|
'&:disabled, &.disabled': {
|
|
87
|
-
[systemIconStencil.vars.color]:
|
|
102
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
103
|
+
buttonColorPropVars.disabled.icon,
|
|
104
|
+
system.color.fg.strong
|
|
105
|
+
),
|
|
88
106
|
},
|
|
89
107
|
},
|
|
90
108
|
start: {},
|
|
@@ -92,18 +110,34 @@ const tertiaryButtonStencil = createStencil({
|
|
|
92
110
|
},
|
|
93
111
|
isThemeable: {
|
|
94
112
|
true: {
|
|
95
|
-
[systemIconStencil.vars.color]:
|
|
113
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
114
|
+
buttonColorPropVars.default.icon,
|
|
115
|
+
brand.primary.base
|
|
116
|
+
),
|
|
117
|
+
|
|
96
118
|
'&:focus-visible, &.focus': {
|
|
97
|
-
[systemIconStencil.vars.color]:
|
|
119
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
120
|
+
buttonColorPropVars.focus.icon,
|
|
121
|
+
brand.primary.base
|
|
122
|
+
),
|
|
98
123
|
},
|
|
99
124
|
'&:hover, &.hover': {
|
|
100
|
-
[systemIconStencil.vars.color]:
|
|
125
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
126
|
+
buttonColorPropVars.hover.icon,
|
|
127
|
+
brand.primary.dark
|
|
128
|
+
),
|
|
101
129
|
},
|
|
102
130
|
'&:active, &.active': {
|
|
103
|
-
[systemIconStencil.vars.color]:
|
|
131
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
132
|
+
buttonColorPropVars.active.icon,
|
|
133
|
+
brand.primary.darkest
|
|
134
|
+
),
|
|
104
135
|
},
|
|
105
136
|
'&:disabled, &.disabled': {
|
|
106
|
-
[systemIconStencil.vars.color]:
|
|
137
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
138
|
+
buttonColorPropVars.disabled.icon,
|
|
139
|
+
brand.primary.base
|
|
140
|
+
),
|
|
107
141
|
},
|
|
108
142
|
},
|
|
109
143
|
},
|
|
@@ -112,12 +146,18 @@ const tertiaryButtonStencil = createStencil({
|
|
|
112
146
|
inverse: {
|
|
113
147
|
[buttonStencil.vars.background]: 'transparent',
|
|
114
148
|
[buttonStencil.vars.label]: system.color.fg.inverse,
|
|
115
|
-
[systemIconStencil.vars.color]:
|
|
149
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
150
|
+
buttonColorPropVars.default.icon,
|
|
151
|
+
system.color.fg.inverse
|
|
152
|
+
),
|
|
116
153
|
// Focus Styles
|
|
117
154
|
'&:focus-visible, &.focus': {
|
|
118
155
|
[buttonStencil.vars.background]: system.color.bg.default,
|
|
119
156
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
120
|
-
[systemIconStencil.vars.color]:
|
|
157
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
158
|
+
buttonColorPropVars.focus.icon,
|
|
159
|
+
system.color.fg.strong
|
|
160
|
+
),
|
|
121
161
|
...focusRing({
|
|
122
162
|
inset: 'inner',
|
|
123
163
|
width: 2,
|
|
@@ -130,19 +170,28 @@ const tertiaryButtonStencil = createStencil({
|
|
|
130
170
|
'&:hover, &.hover': {
|
|
131
171
|
[buttonStencil.vars.background]: system.color.bg.default,
|
|
132
172
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
133
|
-
[systemIconStencil.vars.color]:
|
|
173
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
174
|
+
buttonColorPropVars.hover.icon,
|
|
175
|
+
system.color.fg.strong
|
|
176
|
+
),
|
|
134
177
|
},
|
|
135
178
|
// Active Styles
|
|
136
179
|
'&:active, &.active': {
|
|
137
180
|
[buttonStencil.vars.background]: system.color.bg.alt.soft,
|
|
138
181
|
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
139
|
-
[systemIconStencil.vars.color]:
|
|
182
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
183
|
+
buttonColorPropVars.active.icon,
|
|
184
|
+
system.color.fg.strong
|
|
185
|
+
),
|
|
140
186
|
},
|
|
141
187
|
// Disabled Styles
|
|
142
188
|
'&:disabled, &.disabled': {
|
|
143
189
|
[buttonStencil.vars.background]: 'transparent',
|
|
144
190
|
[buttonStencil.vars.label]: system.color.fg.inverse,
|
|
145
|
-
[systemIconStencil.vars.color]:
|
|
191
|
+
[systemIconStencil.vars.color]: cssVar(
|
|
192
|
+
buttonColorPropVars.disabled.icon,
|
|
193
|
+
system.color.fg.inverse
|
|
194
|
+
),
|
|
146
195
|
},
|
|
147
196
|
},
|
|
148
197
|
},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export * from './breakpoints';
|
|
2
2
|
export {createCanvasTheme} from './createCanvasTheme';
|
|
3
3
|
export * from './types';
|
|
4
|
-
export {default as styled, StyleRewriteFn} from './styled';
|
|
4
|
+
export {default as styled, StyleRewriteFn, filterOutProps} from './styled';
|
|
5
5
|
export * from './theme';
|
|
6
6
|
export * from './useTheme';
|
|
7
7
|
export * from './useThemedRing';
|
|
@@ -6,32 +6,39 @@ import rtlCSSJS from 'rtl-css-js';
|
|
|
6
6
|
|
|
7
7
|
const noop = (styles: any) => styles;
|
|
8
8
|
|
|
9
|
+
interface ThemingStyledOptions {
|
|
10
|
+
shouldForwardProp?: (prop: any) => boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const filterOutProps = (omittedProps: string[]) => {
|
|
14
|
+
return (prop: string) => !omittedProps.includes(prop);
|
|
15
|
+
};
|
|
16
|
+
|
|
9
17
|
// Pulled from https://github.com/emotion-js/emotion/blob/master/packages/styled-base/src/utils.js#L6 (not exported)
|
|
10
18
|
type Interpolations = Array<any>;
|
|
11
19
|
export type StyleRewriteFn = (obj?: CSSProperties) => CSSProperties | undefined;
|
|
12
20
|
|
|
13
|
-
function styled<Props>(node: any) {
|
|
21
|
+
function styled<Props>(node: any, options?: ThemingStyledOptions) {
|
|
14
22
|
return (...args: Interpolation<Props>[]) => {
|
|
15
23
|
const newArgs: Interpolations = args.map(
|
|
16
|
-
interpolation =>
|
|
17
|
-
props: Props & {theme: EmotionCanvasTheme & {_styleRewriteFn?: StyleRewriteFn}}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
interpolation =>
|
|
25
|
+
(props: Props & {theme: EmotionCanvasTheme & {_styleRewriteFn?: StyleRewriteFn}}) => {
|
|
26
|
+
props.theme = useTheme(props.theme);
|
|
27
|
+
const direction = props.theme.canvas.direction;
|
|
28
|
+
const maybeFlip = direction === ContentDirection.RTL ? rtlCSSJS : noop;
|
|
29
|
+
const maybeConvert = props.theme._styleRewriteFn || noop;
|
|
30
|
+
try {
|
|
31
|
+
if (typeof interpolation === 'function') {
|
|
32
|
+
return maybeFlip(maybeConvert(interpolation(props)) as CSSObject);
|
|
33
|
+
}
|
|
34
|
+
return maybeFlip(maybeConvert(interpolation) as CSSObject);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
return maybeConvert(interpolation);
|
|
26
37
|
}
|
|
27
|
-
return maybeFlip(maybeConvert(interpolation) as CSSObject);
|
|
28
|
-
} catch (e) {
|
|
29
|
-
return maybeConvert(interpolation);
|
|
30
38
|
}
|
|
31
|
-
}
|
|
32
39
|
);
|
|
33
40
|
|
|
34
|
-
return emotionStyled(node)(newArgs);
|
|
41
|
+
return emotionStyled(node, options)(newArgs);
|
|
35
42
|
};
|
|
36
43
|
}
|
|
37
44
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../avatar/lib/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAIjC,OAAO,EAAmB,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGtF,oBAAY,aAAa;IACvB,KAAK,IAAA;IACL,IAAI,IAAA;CACL;AAED,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAChF;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAAC;IACrC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC;IACX;;;;;OAKG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;CAChC;AAED;;GAEG;AACH,aAAK,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,GAC1F,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEvC;;GAEG;AACH,aAAK,cAAc,GAAG;IACpB,CAAC,KAAK,EAAE;QAAC,EAAE,EAAE,KAAK,CAAA;KAAC,GAAG,cAAc,GAAG;QAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;KAAC,GAAG,KAAK,CAAC,YAAY,CAAC;IAC3F,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG;QAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;KAAC,GAAG,KAAK,CAAC,YAAY,CAAC;IAC5F,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B,IAAI,EAAE,OAAO,oBAAoB,CAAC;CACnC,CAAC;
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../avatar/lib/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAC;AACtC,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAIjC,OAAO,EAAmB,oBAAoB,EAAC,MAAM,gCAAgC,CAAC;AAGtF,oBAAY,aAAa;IACvB,KAAK,IAAA;IACL,IAAI,IAAA;CACL;AAED,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAChF;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAAC;IACrC;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC;IACX;;;;;OAKG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC;CAChC;AAED;;GAEG;AACH,aAAK,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,CAAC,GAC1F,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC;AAEvC;;GAEG;AACH,aAAK,cAAc,GAAG;IACpB,CAAC,KAAK,EAAE;QAAC,EAAE,EAAE,KAAK,CAAA;KAAC,GAAG,cAAc,GAAG;QAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;KAAC,GAAG,KAAK,CAAC,YAAY,CAAC;IAC3F,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,GAAG;QAAC,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAA;KAAC,GAAG,KAAK,CAAC,YAAY,CAAC;IAC5F,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B,IAAI,EAAE,OAAO,oBAAoB,CAAC;CACnC,CAAC;AAyEF,eAAO,MAAM,MAAM,EAAE,cA0Db,CAAC"}
|
|
@@ -69,12 +69,16 @@ const StyledStack = common_1.styled('span')({
|
|
|
69
69
|
height: size,
|
|
70
70
|
width: size,
|
|
71
71
|
}));
|
|
72
|
-
const StyledIcon = common_1.styled(icon_1.SystemIconCircle
|
|
72
|
+
const StyledIcon = common_1.styled(icon_1.SystemIconCircle, {
|
|
73
|
+
shouldForwardProp: common_1.filterOutProps(['isImageLoaded']),
|
|
74
|
+
})({
|
|
73
75
|
transition: fadeTransition,
|
|
74
76
|
}, ({ isImageLoaded }) => ({
|
|
75
77
|
opacity: isImageLoaded ? 0 : 1,
|
|
76
78
|
}));
|
|
77
|
-
const StyledImage = common_1.styled('img'
|
|
79
|
+
const StyledImage = common_1.styled('img', {
|
|
80
|
+
shouldForwardProp: common_1.filterOutProps(['isLoaded', 'objectFit']),
|
|
81
|
+
})({
|
|
78
82
|
width: '100%',
|
|
79
83
|
height: '100%',
|
|
80
84
|
borderRadius: tokens_1.borderRadius.circle,
|
|
@@ -30,8 +30,8 @@ const icon_1 = require("@workday/canvas-kit-react/icon");
|
|
|
30
30
|
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
31
31
|
const deleteButtonStencil = canvas_kit_styling_1.createStencil({
|
|
32
32
|
extends: BaseButton_1.buttonStencil,
|
|
33
|
-
base: { name: "
|
|
34
|
-
}, "delete-button-
|
|
33
|
+
base: { name: "b70e28", styles: "box-sizing:border-box;--background-button-65cb05:var(--cnvs-brand-error-base);--borderRadius-button-65cb05:var(--cnvs-sys-shape-round);--label-button-65cb05:var(--cnvs-brand-error-accent);--color-system-icon-53c273:var(--icon-b5fb58, var(--cnvs-brand-error-accent));&:focus-visible, &.focus{--background-button-65cb05:var(--cnvs-brand-error-base);--label-button-65cb05:var(--cnvs-brand-error-accent);--color-system-icon-53c273:var(--icon-2ae7b1, var(--cnvs-brand-error-accent));--boxShadowInner-button-65cb05:var(--cnvs-sys-color-border-inverse);--boxShadowOuter-button-65cb05:var(--cnvs-brand-common-focus-outline);}&:hover, &.hover{--background-button-65cb05:var(--cnvs-brand-error-dark);--label-button-65cb05:var(--cnvs-brand-error-accent);--color-system-icon-53c273:var(--icon-c4b8f8, var(--cnvs-brand-error-accent));}&:active, &.active{--background-button-65cb05:var(--cnvs-brand-error-darkest);--label-button-65cb05:var(--cnvs-brand-error-accent);--color-system-icon-53c273:var(--icon-93b1ce, var(--cnvs-brand-error-accent));}&:disabled, &.disabled{--background-button-65cb05:var(--cnvs-brand-error-base);--label-button-65cb05:var(--cnvs-brand-error-accent);--color-system-icon-53c273:var(--icon-c34400, var(--cnvs-brand-error-accent));--opacity-button-65cb05:var(--cnvs-sys-opacity-disabled);}" }
|
|
34
|
+
}, "delete-button-d069ff");
|
|
35
35
|
/**
|
|
36
36
|
* Use sparingly for destructive actions that will result in data loss, can’t be undone, or will
|
|
37
37
|
* have significant consequences. They commonly appear in confirmation dialogs as the final
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrimaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/PrimaryButton.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAS,WAAW,EAAC,MAAM,UAAU,CAAC;AAG7C;;;;GAIG;AACH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;
|
|
1
|
+
{"version":3,"file":"PrimaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/PrimaryButton.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAS,WAAW,EAAC,MAAM,UAAU,CAAC;AAG7C;;;;GAIG;AACH,MAAM,WAAW,kBAAmB,SAAQ,WAAW;IACrD;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AA+FD,eAAO,MAAM,aAAa,2FASxB,CAAC"}
|
|
@@ -30,14 +30,14 @@ const Button_1 = require("./Button");
|
|
|
30
30
|
const layout_1 = require("@workday/canvas-kit-react/layout");
|
|
31
31
|
const primaryButtonStencil = canvas_kit_styling_1.createStencil({
|
|
32
32
|
extends: BaseButton_1.buttonStencil,
|
|
33
|
-
base: { name: "
|
|
33
|
+
base: { name: "3662fa", styles: "box-sizing:border-box;--background-button-65cb05:var(--cnvs-brand-primary-base);--borderRadius-button-65cb05:var(--cnvs-sys-shape-round);--label-button-65cb05:var(--cnvs-brand-primary-accent);--color-system-icon-53c273:var(--icon-b5fb58, var(--cnvs-brand-primary-accent));&:focus-visible, &.focus{--background-button-65cb05:var(--cnvs-brand-primary-base);--label-button-65cb05:var(--cnvs-brand-primary-accent);--boxShadowInner-button-65cb05:var(--cnvs-sys-color-border-inverse);--boxShadowOuter-button-65cb05:var(--cnvs-brand-common-focus-outline);--color-system-icon-53c273:var(--icon-2ae7b1, var(--cnvs-brand-primary-accent));}&:hover, &.hover{--background-button-65cb05:var(--cnvs-brand-primary-dark);--label-button-65cb05:var(--cnvs-brand-primary-accent);--color-system-icon-53c273:var(--icon-c4b8f8, var(--cnvs-brand-primary-accent));}&:active, &.active{--background-button-65cb05:var(--cnvs-brand-primary-darkest);--label-button-65cb05:var(--cnvs-brand-primary-accent);--color-system-icon-53c273:var(--icon-93b1ce, var(--cnvs-brand-primary-accent));}&:disabled, &.disabled{--background-button-65cb05:var(--cnvs-brand-primary-base);--label-button-65cb05:var(--cnvs-brand-primary-accent);--opacity-button-65cb05:var(--cnvs-sys-opacity-disabled);--color-system-icon-53c273:var(--icon-c34400, var(--cnvs-brand-primary-accent));}" },
|
|
34
34
|
modifiers: {
|
|
35
35
|
variant: {
|
|
36
36
|
// Inverse Styles
|
|
37
|
-
inverse: { name: "
|
|
37
|
+
inverse: { name: "9c04ef", styles: "--background-button-65cb05:var(--cnvs-sys-color-bg-default);--borderRadius-button-65cb05:var(--cnvs-sys-shape-round);--label-button-65cb05:var(--cnvs-sys-color-fg-strong);--color-system-icon-53c273:var(--icon-b5fb58, var(--cnvs-sys-color-fg-strong));&:focus-visible, &.focus{--background-button-65cb05:var(--cnvs-sys-color-bg-default);--label-button-65cb05:var(--cnvs-sys-color-fg-strong);--boxShadowInner-button-65cb05:var(--cnvs-sys-color-border-contrast-default);--boxShadowOuter-button-65cb05:var(--cnvs-sys-color-border-inverse);--color-system-icon-53c273:var(--icon-2ae7b1, var(--cnvs-sys-color-fg-strong));}&:hover, &.hover{--background-button-65cb05:var(--cnvs-sys-color-bg-alt-default);--label-button-65cb05:var(--cnvs-sys-color-fg-stronger);--color-system-icon-53c273:var(--icon-c4b8f8, var(--cnvs-sys-color-fg-stronger));}&:active, &.active{--background-button-65cb05:var(--cnvs-sys-color-bg-alt-strong);--label-button-65cb05:var(--cnvs-sys-color-fg-stronger);--color-system-icon-53c273:var(--icon-93b1ce, var(--cnvs-sys-color-fg-stronger));}&:disabled, &.disabled{--background-button-65cb05:var(--cnvs-sys-color-bg-default);--label-button-65cb05:var(--cnvs-sys-color-fg-strong);--color-system-icon-53c273:var(--icon-c34400, var(--cnvs-sys-color-fg-strong));}" }
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
}, "primary-button-
|
|
40
|
+
}, "primary-button-a56ed8");
|
|
41
41
|
exports.PrimaryButton = common_1.createComponent('button')({
|
|
42
42
|
displayName: 'PrimaryButton',
|
|
43
43
|
Component: ({ children, variant, ...elemProps }, ref, Element) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecondaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/SecondaryButton.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAS,WAAW,EAAC,MAAM,UAAU,CAAC;AAI7C;;;;GAIG;AACH,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;
|
|
1
|
+
{"version":3,"file":"SecondaryButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/SecondaryButton.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAS,WAAW,EAAC,MAAM,UAAU,CAAC;AAI7C;;;;GAIG;AACH,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACrB;AA8GD,eAAO,MAAM,eAAe,6FAS1B,CAAC"}
|