@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.
Files changed (41) hide show
  1. package/button/lib/BaseButton.tsx +260 -204
  2. package/button/lib/Button.tsx +1 -4
  3. package/button/lib/DeleteButton.tsx +42 -38
  4. package/button/lib/PrimaryButton.tsx +74 -71
  5. package/button/lib/SecondaryButton.tsx +85 -87
  6. package/button/lib/TertiaryButton.tsx +214 -132
  7. package/dist/commonjs/button/lib/BaseButton.d.ts +70 -29
  8. package/dist/commonjs/button/lib/BaseButton.d.ts.map +1 -1
  9. package/dist/commonjs/button/lib/BaseButton.js +98 -55
  10. package/dist/commonjs/button/lib/Button.d.ts.map +1 -1
  11. package/dist/commonjs/button/lib/Button.js +1 -2
  12. package/dist/commonjs/button/lib/DeleteButton.d.ts +1 -1
  13. package/dist/commonjs/button/lib/DeleteButton.d.ts.map +1 -1
  14. package/dist/commonjs/button/lib/DeleteButton.js +9 -6
  15. package/dist/commonjs/button/lib/PrimaryButton.d.ts +0 -5
  16. package/dist/commonjs/button/lib/PrimaryButton.d.ts.map +1 -1
  17. package/dist/commonjs/button/lib/PrimaryButton.js +14 -10
  18. package/dist/commonjs/button/lib/SecondaryButton.d.ts +0 -5
  19. package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
  20. package/dist/commonjs/button/lib/SecondaryButton.js +13 -10
  21. package/dist/commonjs/button/lib/TertiaryButton.d.ts +0 -22
  22. package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
  23. package/dist/commonjs/button/lib/TertiaryButton.js +80 -35
  24. package/dist/es6/button/lib/BaseButton.d.ts +70 -29
  25. package/dist/es6/button/lib/BaseButton.d.ts.map +1 -1
  26. package/dist/es6/button/lib/BaseButton.js +99 -54
  27. package/dist/es6/button/lib/Button.d.ts.map +1 -1
  28. package/dist/es6/button/lib/Button.js +1 -2
  29. package/dist/es6/button/lib/DeleteButton.d.ts +1 -1
  30. package/dist/es6/button/lib/DeleteButton.d.ts.map +1 -1
  31. package/dist/es6/button/lib/DeleteButton.js +12 -9
  32. package/dist/es6/button/lib/PrimaryButton.d.ts +0 -5
  33. package/dist/es6/button/lib/PrimaryButton.d.ts.map +1 -1
  34. package/dist/es6/button/lib/PrimaryButton.js +15 -11
  35. package/dist/es6/button/lib/SecondaryButton.d.ts +0 -5
  36. package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
  37. package/dist/es6/button/lib/SecondaryButton.js +15 -12
  38. package/dist/es6/button/lib/TertiaryButton.d.ts +0 -22
  39. package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
  40. package/dist/es6/button/lib/TertiaryButton.js +82 -37
  41. package/package.json +4 -4
@@ -1,13 +1,12 @@
1
1
  import * as React from 'react';
2
2
 
3
- import {buttonVars, getIconPosition} from './BaseButton';
3
+ import {buttonStencil} from './BaseButton';
4
4
  import {createComponent, focusRing} from '@workday/canvas-kit-react/common';
5
- import {createStyles, createModifiers} from '@workday/canvas-kit-styling';
6
- import {mergeStyles} from '@workday/canvas-kit-react/layout';
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 '../../icon';
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 tertiaryStyles = createStyles({
26
- paddingInline: system.space.x2,
27
- minWidth: 'auto',
28
- textDecoration: 'underline',
29
- border: 0,
30
- [buttonVars.default.background]: 'transparent',
31
- [buttonVars.default.border]: 'transparent',
32
- [buttonVars.default.borderRadius]: system.shape.x1,
33
- [buttonVars.default.label]: brand.primary.base,
34
- [systemIconStencil.vars.color]: base.blackPepper400,
35
- '&:focus-visible, &.focus': {
36
- [buttonVars.focus.background]: 'transparent',
37
- [buttonVars.focus.border]: 'transparent',
38
- [buttonVars.focus.label]: brand.primary.base,
39
- [buttonVars.focus.boxShadowInner]: brand.common.focusOutline,
40
- [buttonVars.focus.boxShadowOuter]: brand.common.focusOutline,
41
- [systemIconStencil.vars.color]: base.blackPepper400,
42
- ...focusRing({
43
- width: 2,
44
- separation: 0,
45
- innerColor: base.frenchVanilla100,
46
- outerColor: brand.common.focusOutline,
47
- }),
48
- },
49
- '&:hover, &.hover': {
50
- [buttonVars.hover.background]: base.soap300,
51
- [buttonVars.hover.border]: 'transparent',
52
- [buttonVars.hover.label]: brand.primary.dark,
53
- [systemIconStencil.vars.color]: base.blackPepper400,
54
- },
55
- '&:active, &.active': {
56
- [buttonVars.active.background]: base.soap400,
57
- [buttonVars.active.border]: 'transparent',
58
- [buttonVars.active.label]: brand.primary.darkest,
59
- [systemIconStencil.vars.color]: base.blackPepper500,
60
- },
61
- '&:disabled, &.disabled': {
62
- [buttonVars.disabled.background]: 'transparent',
63
- [buttonVars.disabled.border]: 'transparent',
64
- [buttonVars.disabled.label]: brand.primary.base,
65
- [buttonVars.disabled.opacity]: '0.4',
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
- '&:focus-visible, &.focus': {
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
- '&:hover, &.hover': {
77
- [systemIconStencil.vars.color]: brand.primary.dark,
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
- '&:active, &.active': {
80
- [systemIconStencil.vars.color]: brand.primary.darkest,
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
- '&:disabled, &.disabled': {
83
- [systemIconStencil.vars.color]: brand.primary.base,
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
- variant: {
88
- inverse: createStyles({
89
- [buttonVars.default.background]: 'transparent',
90
- [buttonVars.default.border]: 'transparent',
91
- [buttonVars.default.label]: base.frenchVanilla100,
92
- [systemIconStencil.vars.color]: base.frenchVanilla100,
93
- '&:focus-visible, &.focus': {
94
- [buttonVars.focus.background]: base.frenchVanilla100,
95
- [buttonVars.focus.border]: 'transparent',
96
- [buttonVars.focus.label]: base.blackPepper400,
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
- '&:hover, &.hover': {
107
- [buttonVars.hover.background]: base.frenchVanilla100,
108
- [buttonVars.hover.border]: 'transparent',
109
- [buttonVars.hover.label]: base.blackPepper400,
110
- [systemIconStencil.vars.color]: base.blackPepper400,
177
+ },
178
+ {
179
+ modifiers: {size: 'medium', iconPosition: 'start'},
180
+ styles: {
181
+ paddingInlineStart: system.space.x2,
182
+ paddingInlineEnd: system.space.x3,
111
183
  },
112
- '&:active, &.active': {
113
- [buttonVars.active.background]: base.soap200,
114
- [buttonVars.active.border]: 'transparent',
115
- [buttonVars.active.label]: base.blackPepper400,
116
- [systemIconStencil.vars.color]: base.blackPepper400,
184
+ },
185
+ {
186
+ modifiers: {size: 'medium', iconPosition: 'end'},
187
+ styles: {
188
+ paddingInlineStart: system.space.x3,
189
+ paddingInlineEnd: system.space.x2,
117
190
  },
118
- '&:disabled, &.disabled': {
119
- // Disabled Styles
120
- [buttonVars.disabled.background]: 'transparent',
121
- [buttonVars.disabled.border]: base.frenchVanilla100,
122
- [buttonVars.disabled.label]: base.frenchVanilla100,
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
- iconPosition: {
128
- largeOnly: createStyles({
129
- borderRadius: borderRadius.circle,
130
- padding: '0',
131
- minWidth: `calc(${system.space.x4} * 3)`,
132
- }),
133
- largeStart: createStyles({
134
- paddingInlineStart: space.xxs,
135
- paddingInlineEnd: space.xs,
136
- }),
137
- largeEnd: createStyles({paddingInlineStart: space.xs, paddingInlineEnd: space.xxs}),
138
- mediumOnly: createStyles({padding: '0', minWidth: space.xl, borderRadius: borderRadius.circle}),
139
- mediumStart: createStyles({paddingInlineStart: space.xxs, paddingInlineEnd: space.xs}),
140
- mediumEnd: createStyles({paddingInlineStart: space.xs, paddingInlineEnd: space.xxs}),
141
- smallOnly: createStyles({padding: '0', minWidth: space.l, borderRadius: borderRadius.circle}),
142
- smallStart: createStyles({paddingInlineStart: space.xxs, paddingInlineEnd: space.xs}),
143
- smallEnd: createStyles({paddingInlineStart: space.xs, paddingInlineEnd: space.xxs}),
144
- extraSmallOnly: createStyles({
145
- padding: '0',
146
- minWidth: space.m,
147
- borderRadius: borderRadius.circle,
148
- }),
149
- extraSmallStart: createStyles({paddingInlineStart: space.xxxs, paddingInlineEnd: space.xxs}),
150
- extraSmallEnd: createStyles({paddingInlineStart: space.xxs, paddingInlineEnd: space.xxxs}),
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
- {...mergeStyles(elemProps, [
185
- tertiaryStyles,
186
- tertiaryButtonModifiers({
264
+ iconPosition={iconPosition}
265
+ {...mergeStyles(
266
+ elemProps,
267
+ tertiaryButtonStencil({
268
+ variant,
269
+ size,
187
270
  isThemeable: (isThemeable || baseIconPosition !== 'only') as any,
188
- variant: variant,
189
- iconPosition: getIconPosition(size, baseIconPosition),
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: not displayed at `small` size
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
- * Temporary css variables to be used across all Buttons.
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 buttonVars: {
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
- * Button modifiers that will overwrite the base styles of Buttons.
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 buttonModifiers: import("@workday/canvas-kit-styling").ModifierReturn<{
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: string;
68
- medium: string;
69
- small: string;
70
- extraSmall: string;
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
- largeOnly: string;
74
- largeStart: string;
75
- largeEnd: string;
76
- mediumOnly: string;
77
- mediumStart: string;
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
- export declare function capitalize(string?: string): string;
88
- export declare function getIconPosition(size?: keyof typeof buttonModifiers.size, iconPosition?: IconPositions, children?: React.ReactNode): keyof typeof buttonModifiers.iconPosition;
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 other buttons are built.
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,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