@workday/canvas-kit-react 11.0.0-alpha.769-next.0 → 11.0.0-alpha.770-next.0
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/button/lib/BaseButton.tsx +260 -204
- package/button/lib/Button.tsx +1 -4
- package/button/lib/DeleteButton.tsx +42 -38
- package/button/lib/PrimaryButton.tsx +74 -71
- package/button/lib/SecondaryButton.tsx +85 -87
- package/button/lib/TertiaryButton.tsx +214 -132
- package/dist/commonjs/button/lib/BaseButton.d.ts +70 -29
- package/dist/commonjs/button/lib/BaseButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/BaseButton.js +98 -55
- package/dist/commonjs/button/lib/Button.d.ts.map +1 -1
- package/dist/commonjs/button/lib/Button.js +1 -2
- package/dist/commonjs/button/lib/DeleteButton.d.ts +1 -1
- package/dist/commonjs/button/lib/DeleteButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/DeleteButton.js +9 -6
- package/dist/commonjs/button/lib/PrimaryButton.d.ts +0 -5
- package/dist/commonjs/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/PrimaryButton.js +14 -10
- package/dist/commonjs/button/lib/SecondaryButton.d.ts +0 -5
- package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/SecondaryButton.js +13 -10
- package/dist/commonjs/button/lib/TertiaryButton.d.ts +0 -22
- package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/commonjs/button/lib/TertiaryButton.js +80 -35
- package/dist/es6/button/lib/BaseButton.d.ts +70 -29
- package/dist/es6/button/lib/BaseButton.d.ts.map +1 -1
- package/dist/es6/button/lib/BaseButton.js +99 -54
- package/dist/es6/button/lib/Button.d.ts.map +1 -1
- package/dist/es6/button/lib/Button.js +1 -2
- package/dist/es6/button/lib/DeleteButton.d.ts +1 -1
- package/dist/es6/button/lib/DeleteButton.d.ts.map +1 -1
- package/dist/es6/button/lib/DeleteButton.js +12 -9
- package/dist/es6/button/lib/PrimaryButton.d.ts +0 -5
- package/dist/es6/button/lib/PrimaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/PrimaryButton.js +15 -11
- package/dist/es6/button/lib/SecondaryButton.d.ts +0 -5
- package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/SecondaryButton.js +15 -12
- package/dist/es6/button/lib/TertiaryButton.d.ts +0 -22
- package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
- package/dist/es6/button/lib/TertiaryButton.js +82 -37
- package/package.json +4 -4
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {buttonStencil} from './BaseButton';
|
|
4
4
|
import {createComponent, focusRing} from '@workday/canvas-kit-react/common';
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {system, brand, base} from '@workday/canvas-tokens-web';
|
|
8
|
-
import {borderRadius, space} from '@workday/canvas-kit-react/tokens';
|
|
5
|
+
import {calc, createStencil} from '@workday/canvas-kit-styling';
|
|
6
|
+
import {system, brand} from '@workday/canvas-tokens-web';
|
|
9
7
|
import {Button, ButtonProps} from './Button';
|
|
10
|
-
import {systemIconStencil} from '
|
|
8
|
+
import {systemIconStencil} from '@workday/canvas-kit-react/icon';
|
|
9
|
+
import {mergeStyles} from '@workday/canvas-kit-react/layout';
|
|
11
10
|
|
|
12
11
|
/**
|
|
13
12
|
* Extends all the style properties from Box to our buttons as well as props from ButtonProps.
|
|
@@ -22,133 +21,215 @@ export interface TertiaryButtonProps extends ButtonProps {
|
|
|
22
21
|
isThemeable?: boolean;
|
|
23
22
|
}
|
|
24
23
|
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
[
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
export const tertiaryButtonModifiers = createModifiers({
|
|
70
|
-
isThemeable: {
|
|
71
|
-
true: createStyles({
|
|
24
|
+
const tertiaryButtonStencil = createStencil({
|
|
25
|
+
extends: buttonStencil,
|
|
26
|
+
// Base Styles
|
|
27
|
+
base: {
|
|
28
|
+
paddingInline: system.space.x2,
|
|
29
|
+
minWidth: 'auto',
|
|
30
|
+
textDecoration: 'underline',
|
|
31
|
+
border: system.space.zero,
|
|
32
|
+
[buttonStencil.vars.background]: 'transparent',
|
|
33
|
+
[buttonStencil.vars.borderRadius]: system.shape.x1,
|
|
34
|
+
[buttonStencil.vars.label]: brand.primary.base,
|
|
35
|
+
[systemIconStencil.vars.color]: brand.primary.base,
|
|
36
|
+
// Focus Styles
|
|
37
|
+
'&:focus-visible, &.focus': {
|
|
38
|
+
[buttonStencil.vars.background]: 'transparent',
|
|
39
|
+
[buttonStencil.vars.label]: brand.primary.base,
|
|
40
|
+
[buttonStencil.vars.boxShadowInner]: brand.common.focusOutline,
|
|
41
|
+
[buttonStencil.vars.boxShadowOuter]: brand.common.focusOutline,
|
|
42
|
+
[systemIconStencil.vars.color]: brand.primary.base,
|
|
43
|
+
...focusRing({
|
|
44
|
+
width: 2,
|
|
45
|
+
separation: 0,
|
|
46
|
+
innerColor: system.color.fg.inverse,
|
|
47
|
+
outerColor: brand.common.focusOutline,
|
|
48
|
+
}),
|
|
49
|
+
},
|
|
50
|
+
// Hover Styles
|
|
51
|
+
'&:hover, &.hover': {
|
|
52
|
+
[buttonStencil.vars.background]: system.color.bg.alt.default,
|
|
53
|
+
[buttonStencil.vars.label]: brand.primary.dark,
|
|
54
|
+
[systemIconStencil.vars.color]: brand.primary.dark,
|
|
55
|
+
},
|
|
56
|
+
// Active Styles
|
|
57
|
+
'&:active, &.active': {
|
|
58
|
+
[buttonStencil.vars.background]: system.color.bg.alt.strong,
|
|
59
|
+
[buttonStencil.vars.label]: brand.primary.darkest,
|
|
60
|
+
[systemIconStencil.vars.color]: brand.primary.darkest,
|
|
61
|
+
},
|
|
62
|
+
// Disabled Styles
|
|
63
|
+
'&:disabled, &.disabled': {
|
|
64
|
+
[buttonStencil.vars.background]: 'transparent',
|
|
65
|
+
[buttonStencil.vars.label]: brand.primary.base,
|
|
66
|
+
[buttonStencil.vars.opacity]: system.opacity.disabled,
|
|
72
67
|
[systemIconStencil.vars.color]: brand.primary.base,
|
|
73
|
-
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
modifiers: {
|
|
71
|
+
// IconPosition Styles
|
|
72
|
+
iconPosition: {
|
|
73
|
+
only: {
|
|
74
|
+
padding: 0,
|
|
75
|
+
borderRadius: system.shape.round,
|
|
76
|
+
[systemIconStencil.vars.color]: system.color.fg.strong,
|
|
77
|
+
'&:focus-visible, &.focus': {
|
|
78
|
+
[systemIconStencil.vars.color]: system.color.fg.strong,
|
|
79
|
+
},
|
|
80
|
+
'&:hover, &.hover': {
|
|
81
|
+
[systemIconStencil.vars.color]: system.color.fg.strong,
|
|
82
|
+
},
|
|
83
|
+
'&:active, &.active': {
|
|
84
|
+
[systemIconStencil.vars.color]: system.color.fg.stronger,
|
|
85
|
+
},
|
|
86
|
+
'&:disabled, &.disabled': {
|
|
87
|
+
[systemIconStencil.vars.color]: system.color.fg.strong,
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
start: {},
|
|
91
|
+
end: {},
|
|
92
|
+
},
|
|
93
|
+
isThemeable: {
|
|
94
|
+
true: {
|
|
74
95
|
[systemIconStencil.vars.color]: brand.primary.base,
|
|
96
|
+
'&:focus-visible, &.focus': {
|
|
97
|
+
[systemIconStencil.vars.color]: brand.primary.base,
|
|
98
|
+
},
|
|
99
|
+
'&:hover, &.hover': {
|
|
100
|
+
[systemIconStencil.vars.color]: brand.primary.dark,
|
|
101
|
+
},
|
|
102
|
+
'&:active, &.active': {
|
|
103
|
+
[systemIconStencil.vars.color]: brand.primary.darkest,
|
|
104
|
+
},
|
|
105
|
+
'&:disabled, &.disabled': {
|
|
106
|
+
[systemIconStencil.vars.color]: brand.primary.base,
|
|
107
|
+
},
|
|
75
108
|
},
|
|
76
|
-
|
|
77
|
-
|
|
109
|
+
},
|
|
110
|
+
variant: {
|
|
111
|
+
// Inverse Styles
|
|
112
|
+
inverse: {
|
|
113
|
+
[buttonStencil.vars.background]: 'transparent',
|
|
114
|
+
[buttonStencil.vars.label]: system.color.fg.inverse,
|
|
115
|
+
[systemIconStencil.vars.color]: system.color.fg.inverse,
|
|
116
|
+
// Focus Styles
|
|
117
|
+
'&:focus-visible, &.focus': {
|
|
118
|
+
[buttonStencil.vars.background]: system.color.bg.default,
|
|
119
|
+
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
120
|
+
[systemIconStencil.vars.color]: system.color.fg.strong,
|
|
121
|
+
...focusRing({
|
|
122
|
+
inset: 'inner',
|
|
123
|
+
width: 2,
|
|
124
|
+
separation: 2,
|
|
125
|
+
innerColor: system.color.fg.strong,
|
|
126
|
+
outerColor: system.color.fg.inverse,
|
|
127
|
+
}),
|
|
128
|
+
},
|
|
129
|
+
// Hover Styles
|
|
130
|
+
'&:hover, &.hover': {
|
|
131
|
+
[buttonStencil.vars.background]: system.color.bg.default,
|
|
132
|
+
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
133
|
+
[systemIconStencil.vars.color]: system.color.fg.strong,
|
|
134
|
+
},
|
|
135
|
+
// Active Styles
|
|
136
|
+
'&:active, &.active': {
|
|
137
|
+
[buttonStencil.vars.background]: system.color.bg.alt.soft,
|
|
138
|
+
[buttonStencil.vars.label]: system.color.fg.strong,
|
|
139
|
+
[systemIconStencil.vars.color]: system.color.fg.strong,
|
|
140
|
+
},
|
|
141
|
+
// Disabled Styles
|
|
142
|
+
'&:disabled, &.disabled': {
|
|
143
|
+
[buttonStencil.vars.background]: 'transparent',
|
|
144
|
+
[buttonStencil.vars.label]: system.color.fg.inverse,
|
|
145
|
+
[systemIconStencil.vars.color]: system.color.fg.inverse,
|
|
146
|
+
},
|
|
78
147
|
},
|
|
79
|
-
|
|
80
|
-
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
// Compound Modifier Styles
|
|
151
|
+
compound: [
|
|
152
|
+
{
|
|
153
|
+
modifiers: {size: 'large', iconPosition: 'only'},
|
|
154
|
+
styles: {
|
|
155
|
+
minWidth: calc.multiply(system.space.x4, 3),
|
|
81
156
|
},
|
|
82
|
-
|
|
83
|
-
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
modifiers: {size: 'large', iconPosition: 'start'},
|
|
160
|
+
styles: {
|
|
161
|
+
paddingInlineStart: system.space.x2,
|
|
162
|
+
paddingInlineEnd: system.space.x3,
|
|
84
163
|
},
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
[systemIconStencil.vars.color]: base.blackPepper400,
|
|
98
|
-
...focusRing({
|
|
99
|
-
inset: 'inner',
|
|
100
|
-
width: 2,
|
|
101
|
-
separation: 2,
|
|
102
|
-
innerColor: base.blackPepper400,
|
|
103
|
-
outerColor: base.frenchVanilla100,
|
|
104
|
-
}),
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
modifiers: {size: 'large', iconPosition: 'end'},
|
|
167
|
+
styles: {
|
|
168
|
+
paddingInlineStart: system.space.x3,
|
|
169
|
+
paddingInlineEnd: system.space.x2,
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
modifiers: {size: 'medium', iconPosition: 'only'},
|
|
174
|
+
styles: {
|
|
175
|
+
minWidth: system.space.x10,
|
|
105
176
|
},
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
modifiers: {size: 'medium', iconPosition: 'start'},
|
|
180
|
+
styles: {
|
|
181
|
+
paddingInlineStart: system.space.x2,
|
|
182
|
+
paddingInlineEnd: system.space.x3,
|
|
111
183
|
},
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
modifiers: {size: 'medium', iconPosition: 'end'},
|
|
187
|
+
styles: {
|
|
188
|
+
paddingInlineStart: system.space.x3,
|
|
189
|
+
paddingInlineEnd: system.space.x2,
|
|
117
190
|
},
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
[systemIconStencil.vars.color]: base.frenchVanilla100,
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
modifiers: {size: 'small', iconPosition: 'only'},
|
|
194
|
+
styles: {
|
|
195
|
+
minWidth: system.space.x8,
|
|
124
196
|
},
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
modifiers: {size: 'small', iconPosition: 'start'},
|
|
200
|
+
styles: {
|
|
201
|
+
paddingInlineStart: system.space.x2,
|
|
202
|
+
paddingInlineEnd: system.space.x3,
|
|
203
|
+
},
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
modifiers: {size: 'small', iconPosition: 'end'},
|
|
207
|
+
styles: {
|
|
208
|
+
paddingInlineStart: system.space.x3,
|
|
209
|
+
paddingInlineEnd: system.space.x2,
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
modifiers: {size: 'extraSmall', iconPosition: 'only'},
|
|
214
|
+
styles: {
|
|
215
|
+
minWidth: system.space.x6,
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
modifiers: {size: 'extraSmall', iconPosition: 'start'},
|
|
220
|
+
styles: {
|
|
221
|
+
paddingInlineStart: system.space.x1,
|
|
222
|
+
paddingInlineEnd: system.space.x2,
|
|
223
|
+
},
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
modifiers: {size: 'extraSmall', iconPosition: 'end'},
|
|
227
|
+
styles: {
|
|
228
|
+
paddingInlineStart: system.space.x2,
|
|
229
|
+
paddingInlineEnd: system.space.x1,
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
],
|
|
152
233
|
});
|
|
153
234
|
|
|
154
235
|
export const TertiaryButton = createComponent('button')({
|
|
@@ -157,8 +238,8 @@ export const TertiaryButton = createComponent('button')({
|
|
|
157
238
|
{
|
|
158
239
|
children,
|
|
159
240
|
icon,
|
|
160
|
-
size = 'medium',
|
|
161
241
|
isThemeable,
|
|
242
|
+
size = 'medium',
|
|
162
243
|
variant,
|
|
163
244
|
iconPosition,
|
|
164
245
|
...elemProps
|
|
@@ -179,16 +260,17 @@ export const TertiaryButton = createComponent('button')({
|
|
|
179
260
|
as={Element}
|
|
180
261
|
ref={ref}
|
|
181
262
|
icon={icon}
|
|
182
|
-
iconPosition={iconPosition}
|
|
183
263
|
size={size}
|
|
184
|
-
{
|
|
185
|
-
|
|
186
|
-
|
|
264
|
+
iconPosition={iconPosition}
|
|
265
|
+
{...mergeStyles(
|
|
266
|
+
elemProps,
|
|
267
|
+
tertiaryButtonStencil({
|
|
268
|
+
variant,
|
|
269
|
+
size,
|
|
187
270
|
isThemeable: (isThemeable || baseIconPosition !== 'only') as any,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
])}
|
|
271
|
+
iconPosition: baseIconPosition,
|
|
272
|
+
})
|
|
273
|
+
)}
|
|
192
274
|
>
|
|
193
275
|
{children}
|
|
194
276
|
</Button>
|
|
@@ -17,7 +17,7 @@ export interface ButtonContainerProps extends Partial<SystemIconProps>, GrowthBe
|
|
|
17
17
|
size?: ButtonSizes;
|
|
18
18
|
/**
|
|
19
19
|
* The icon of the Button.
|
|
20
|
-
* Note:
|
|
20
|
+
* Note: Not displayed at `small` size
|
|
21
21
|
*/
|
|
22
22
|
icon?: CanvasSystemIcon;
|
|
23
23
|
/**
|
|
@@ -47,47 +47,88 @@ export interface ButtonContainerProps extends Partial<SystemIconProps>, GrowthBe
|
|
|
47
47
|
export interface BaseButtonProps extends Omit<ButtonContainerProps, 'ref'> {
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* The purpose of this object is for the `colors` prop - to provide backwards compatibility with how we allowed color overrides in Emotion.
|
|
51
51
|
*/
|
|
52
|
-
export declare const
|
|
52
|
+
export declare const buttonColorPropVars: {
|
|
53
53
|
default: import("@workday/canvas-kit-styling").CsVars<"label" | "opacity" | "background" | "border" | "borderRadius" | "icon" | "boxShadowInner" | "boxShadowOuter", never>;
|
|
54
|
+
focus: import("@workday/canvas-kit-styling").CsVars<"label" | "opacity" | "background" | "border" | "borderRadius" | "icon" | "boxShadowInner" | "boxShadowOuter", never>;
|
|
54
55
|
hover: import("@workday/canvas-kit-styling").CsVars<"label" | "opacity" | "background" | "border" | "borderRadius" | "icon" | "boxShadowInner" | "boxShadowOuter", never>;
|
|
55
56
|
active: import("@workday/canvas-kit-styling").CsVars<"label" | "opacity" | "background" | "border" | "borderRadius" | "icon" | "boxShadowInner" | "boxShadowOuter", never>;
|
|
56
|
-
focus: import("@workday/canvas-kit-styling").CsVars<"label" | "opacity" | "background" | "border" | "borderRadius" | "icon" | "boxShadowInner" | "boxShadowOuter", never>;
|
|
57
57
|
disabled: import("@workday/canvas-kit-styling").CsVars<"label" | "opacity" | "background" | "border" | "borderRadius" | "icon" | "boxShadowInner" | "boxShadowOuter", never>;
|
|
58
58
|
};
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
61
|
-
* - `Size`: These modifiers will dictate a size of a Button and has a set of styles to associated with it.
|
|
62
|
-
* - `iconPosition`: These modifiers will override the existing `Size` styles. These are specific to icon locations
|
|
63
|
-
* within a button or if there is only an icon and no text.
|
|
60
|
+
* Base styles for Buttons.
|
|
64
61
|
*/
|
|
65
|
-
export declare const
|
|
62
|
+
export declare const buttonStencil: import("@workday/canvas-kit-styling").Stencil<{
|
|
63
|
+
/**
|
|
64
|
+
* Button modifiers that will overwrite the base styles of Buttons.
|
|
65
|
+
* - `Size`: These modifiers will dictate a size of a Button and has a set of styles to associated with it.
|
|
66
|
+
* - `iconPosition`: These modifiers will override the existing `Size` styles. These are specific to icon locations
|
|
67
|
+
* within a button or if there is only an icon and no text.
|
|
68
|
+
*/
|
|
66
69
|
size: {
|
|
67
|
-
large:
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
70
|
+
large: {
|
|
71
|
+
fontWeight: "--cnvs-sys-font-weight-bold";
|
|
72
|
+
height: string;
|
|
73
|
+
paddingInline: "--cnvs-sys-space-x8";
|
|
74
|
+
minWidth: string;
|
|
75
|
+
fontFamily: "--cnvs-base-font-family-50";
|
|
76
|
+
lineHeight: "--cnvs-base-line-height-150";
|
|
77
|
+
fontSize: "--cnvs-base-font-size-100";
|
|
78
|
+
letterSpacing: "--cnvs-base-letter-spacing-200";
|
|
79
|
+
};
|
|
80
|
+
medium: {
|
|
81
|
+
fontWeight: "--cnvs-sys-font-weight-bold";
|
|
82
|
+
minWidth: string;
|
|
83
|
+
paddingInline: "--cnvs-sys-space-x6";
|
|
84
|
+
height: "--cnvs-sys-space-x10";
|
|
85
|
+
fontFamily: "--cnvs-base-font-family-50";
|
|
86
|
+
lineHeight: "--cnvs-base-line-height-100";
|
|
87
|
+
fontSize: "--cnvs-base-font-size-75";
|
|
88
|
+
letterSpacing: "--cnvs-base-letter-spacing-150";
|
|
89
|
+
};
|
|
90
|
+
small: {
|
|
91
|
+
fontWeight: "--cnvs-sys-font-weight-bold";
|
|
92
|
+
height: "--cnvs-sys-space-x8";
|
|
93
|
+
minWidth: "--cnvs-sys-space-x20";
|
|
94
|
+
paddingInline: "--cnvs-sys-space-x4";
|
|
95
|
+
gap: "--cnvs-sys-space-x1";
|
|
96
|
+
fontFamily: "--cnvs-base-font-family-50";
|
|
97
|
+
lineHeight: "--cnvs-base-line-height-100";
|
|
98
|
+
fontSize: "--cnvs-base-font-size-75";
|
|
99
|
+
letterSpacing: "--cnvs-base-letter-spacing-150";
|
|
100
|
+
};
|
|
101
|
+
extraSmall: {
|
|
102
|
+
fontWeight: "--cnvs-sys-font-weight-bold";
|
|
103
|
+
height: "--cnvs-sys-space-x6";
|
|
104
|
+
minWidth: string;
|
|
105
|
+
paddingInline: "--cnvs-sys-space-x3";
|
|
106
|
+
gap: "--cnvs-sys-space-x1";
|
|
107
|
+
fontFamily: "--cnvs-base-font-family-50";
|
|
108
|
+
lineHeight: "--cnvs-base-line-height-50";
|
|
109
|
+
fontSize: "--cnvs-base-font-size-50";
|
|
110
|
+
letterSpacing: "--cnvs-base-letter-spacing-100";
|
|
111
|
+
};
|
|
71
112
|
};
|
|
72
113
|
iconPosition: {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
mediumEnd: string;
|
|
79
|
-
smallOnly: string;
|
|
80
|
-
smallStart: string;
|
|
81
|
-
smallEnd: string;
|
|
82
|
-
extraSmallOnly: string;
|
|
83
|
-
extraSmallStart: string;
|
|
84
|
-
extraSmallEnd: string;
|
|
114
|
+
only: {
|
|
115
|
+
padding: "--cnvs-sys-space-zero";
|
|
116
|
+
};
|
|
117
|
+
start: {};
|
|
118
|
+
end: {};
|
|
85
119
|
};
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
120
|
+
}, {
|
|
121
|
+
background: string;
|
|
122
|
+
border: string;
|
|
123
|
+
boxShadowInner: string;
|
|
124
|
+
boxShadowOuter: string;
|
|
125
|
+
label: string;
|
|
126
|
+
opacity: string;
|
|
127
|
+
borderRadius: string;
|
|
128
|
+
}, never, never>;
|
|
89
129
|
/**
|
|
90
|
-
* The base button which all
|
|
130
|
+
* The base button which which is the foundation of all Button variants (`PrimaryButton`,
|
|
131
|
+
* `SecondaryButton`, `TertiaryButton`, `DeleteButton`, `ToolbarIconButton` and `ToolbarDropdownButton`).
|
|
91
132
|
*/
|
|
92
133
|
export declare const BaseButton: import("@workday/canvas-kit-react/common").ElementComponent<"button", ButtonContainerProps> & {
|
|
93
134
|
Icon: import("@workday/canvas-kit-react/common").ElementComponent<"span", import("../lib/parts/ButtonLabelIcon").ButtonLabelIconProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/BaseButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAkB,cAAc,EAAY,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"BaseButton.d.ts","sourceRoot":"","sources":["../../../../button/lib/BaseButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAkB,cAAc,EAAY,MAAM,kCAAkC,CAAC;AAE5F,OAAO,EAAC,eAAe,EAAoB,MAAM,gCAAgC,CAAC;AAElF,OAAO,EAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAC,MAAM,SAAS,CAAC;AACjE,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,MAAM,WAAW,oBAAqB,SAAQ,OAAO,CAAC,eAAe,CAAC,EAAE,cAAc;IACpF;;OAEG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB;;;OAGG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,oBAAoB,EAAE,KAAK,CAAC;CAAG;AAE7E;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;CAmD/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa;IAyHtB;;;;;OAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gBA2HL,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,UAAU;;;CAqCrB,CAAC"}
|