@workday/canvas-kit-react 6.0.0-alpha.0-next.27 → 6.0.0-alpha.0-next.31

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 (53) hide show
  1. package/button/lib/PrimaryButton.tsx +110 -32
  2. package/button/lib/SecondaryButton.tsx +31 -16
  3. package/button/lib/TertiaryButton.tsx +45 -36
  4. package/button/lib/parts/ButtonContainer.tsx +18 -5
  5. package/button/lib/parts/ButtonLabelIcon.tsx +34 -14
  6. package/button/lib/types.ts +11 -0
  7. package/dist/commonjs/button/lib/PrimaryButton.d.ts +80 -6
  8. package/dist/commonjs/button/lib/PrimaryButton.d.ts.map +1 -1
  9. package/dist/commonjs/button/lib/PrimaryButton.js +80 -26
  10. package/dist/commonjs/button/lib/SecondaryButton.d.ts +8 -5
  11. package/dist/commonjs/button/lib/SecondaryButton.d.ts.map +1 -1
  12. package/dist/commonjs/button/lib/SecondaryButton.js +22 -12
  13. package/dist/commonjs/button/lib/TertiaryButton.d.ts +8 -4
  14. package/dist/commonjs/button/lib/TertiaryButton.d.ts.map +1 -1
  15. package/dist/commonjs/button/lib/TertiaryButton.js +24 -20
  16. package/dist/commonjs/button/lib/parts/ButtonContainer.d.ts +5 -3
  17. package/dist/commonjs/button/lib/parts/ButtonContainer.d.ts.map +1 -1
  18. package/dist/commonjs/button/lib/parts/ButtonContainer.js +7 -9
  19. package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts +7 -4
  20. package/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
  21. package/dist/commonjs/button/lib/parts/ButtonLabelIcon.js +28 -13
  22. package/dist/commonjs/button/lib/types.d.ts +9 -0
  23. package/dist/commonjs/button/lib/types.d.ts.map +1 -1
  24. package/dist/es6/button/lib/PrimaryButton.d.ts +80 -6
  25. package/dist/es6/button/lib/PrimaryButton.d.ts.map +1 -1
  26. package/dist/es6/button/lib/PrimaryButton.js +81 -27
  27. package/dist/es6/button/lib/SecondaryButton.d.ts +8 -5
  28. package/dist/es6/button/lib/SecondaryButton.d.ts.map +1 -1
  29. package/dist/es6/button/lib/SecondaryButton.js +22 -12
  30. package/dist/es6/button/lib/TertiaryButton.d.ts +8 -4
  31. package/dist/es6/button/lib/TertiaryButton.d.ts.map +1 -1
  32. package/dist/es6/button/lib/TertiaryButton.js +25 -21
  33. package/dist/es6/button/lib/parts/ButtonContainer.d.ts +5 -3
  34. package/dist/es6/button/lib/parts/ButtonContainer.d.ts.map +1 -1
  35. package/dist/es6/button/lib/parts/ButtonContainer.js +7 -9
  36. package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts +7 -4
  37. package/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts.map +1 -1
  38. package/dist/es6/button/lib/parts/ButtonLabelIcon.js +28 -13
  39. package/dist/es6/button/lib/types.d.ts +9 -0
  40. package/dist/es6/button/lib/types.d.ts.map +1 -1
  41. package/package.json +5 -5
  42. package/ts3.5/dist/commonjs/button/lib/PrimaryButton.d.ts +80 -6
  43. package/ts3.5/dist/commonjs/button/lib/SecondaryButton.d.ts +8 -5
  44. package/ts3.5/dist/commonjs/button/lib/TertiaryButton.d.ts +8 -4
  45. package/ts3.5/dist/commonjs/button/lib/parts/ButtonContainer.d.ts +5 -3
  46. package/ts3.5/dist/commonjs/button/lib/parts/ButtonLabelIcon.d.ts +7 -4
  47. package/ts3.5/dist/commonjs/button/lib/types.d.ts +9 -0
  48. package/ts3.5/dist/es6/button/lib/PrimaryButton.d.ts +80 -6
  49. package/ts3.5/dist/es6/button/lib/SecondaryButton.d.ts +8 -5
  50. package/ts3.5/dist/es6/button/lib/TertiaryButton.d.ts +8 -4
  51. package/ts3.5/dist/es6/button/lib/parts/ButtonContainer.d.ts +5 -3
  52. package/ts3.5/dist/es6/button/lib/parts/ButtonLabelIcon.d.ts +7 -4
  53. package/ts3.5/dist/es6/button/lib/types.d.ts +9 -0
@@ -19,4 +19,13 @@ export interface ButtonColors {
19
19
  };
20
20
  disabled: ButtonStateColors;
21
21
  }
22
+ /**
23
+ * There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
24
+ * If no size is provided, it will default to `medium`.
25
+ *
26
+ * @default 'medium'
27
+ */
28
+ export declare type ButtonSizes = 'extraSmall' | 'small' | 'medium' | 'large';
29
+ export declare type TertiaryButtonSizes = 'extraSmall' | 'small' | 'medium';
30
+ export declare type IconPositions = 'left' | 'right';
22
31
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../button/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,iBAAiB,GAAG;QACzB,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;IACF,QAAQ,EAAE,iBAAiB,CAAC;CAC7B"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../button/lib/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,iBAAiB,CAAC;IAC3B,KAAK,EAAE,iBAAiB,CAAC;IACzB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,KAAK,EAAE,iBAAiB,GAAG;QACzB,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;IACF,QAAQ,EAAE,iBAAiB,CAAC;CAC7B;AAED;;;;;GAKG;AACH,oBAAY,WAAW,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtE,oBAAY,mBAAmB,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;AACpE,oBAAY,aAAa,GAAG,MAAM,GAAG,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "6.0.0-alpha.0-next.27+438f1a7b",
3
+ "version": "6.0.0-alpha.0-next.31+17cf46c1",
4
4
  "description": "The parent module that contains all Workday Canvas Kit React components",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -56,9 +56,9 @@
56
56
  "@emotion/styled": "^10.0.27",
57
57
  "@popperjs/core": "^2.5.4",
58
58
  "@workday/canvas-colors-web": "^2.0.0",
59
- "@workday/canvas-kit-labs-react": "^6.0.0-alpha.0-next.27+438f1a7b",
60
- "@workday/canvas-kit-popup-stack": "^6.0.0-alpha.0-next.27+438f1a7b",
61
- "@workday/canvas-kit-preview-react": "^6.0.0-alpha.0-next.27+438f1a7b",
59
+ "@workday/canvas-kit-labs-react": "^6.0.0-alpha.0-next.31+17cf46c1",
60
+ "@workday/canvas-kit-popup-stack": "^6.0.0-alpha.0-next.31+17cf46c1",
61
+ "@workday/canvas-kit-preview-react": "^6.0.0-alpha.0-next.31+17cf46c1",
62
62
  "@workday/canvas-system-icons-web": "1.0.41",
63
63
  "@workday/design-assets-types": "^0.2.4",
64
64
  "chroma-js": "^2.1.0",
@@ -74,5 +74,5 @@
74
74
  "@workday/canvas-accent-icons-web": "^1.0.0",
75
75
  "@workday/canvas-applet-icons-web": "^0.17.50"
76
76
  },
77
- "gitHead": "438f1a7befd5744cf80fe8d70714f5cbf254029b"
77
+ "gitHead": "17cf46c147e4ccad22b84011924c73456d63e252"
78
78
  }
@@ -1,13 +1,20 @@
1
1
  import * as React from 'react';
2
2
  import { GrowthBehavior, Themeable, EmotionCanvasTheme } from '@workday/canvas-kit-react/common';
3
3
  import { CanvasSystemIcon } from '@workday/design-assets-types';
4
- import { ButtonColors } from './types';
4
+ import { ButtonSizes, IconPositions } from './types';
5
5
  export interface PrimaryButtonProps extends Themeable, GrowthBehavior {
6
6
  /**
7
- * The size of the Button.
7
+ * The variant of the PrimaryButton.
8
+ * @default undefined
9
+ */
10
+ variant?: 'inverse';
11
+ /**
12
+ * There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
13
+ * If no size is provided, it will default to `medium`.
14
+ *
8
15
  * @default 'medium'
9
16
  */
10
- size?: 'small' | 'medium' | 'large';
17
+ size?: ButtonSizes;
11
18
  /**
12
19
  * The data label of the Button.
13
20
  * Note: not displayed at `small` size
@@ -19,10 +26,11 @@ export interface PrimaryButtonProps extends Themeable, GrowthBehavior {
19
26
  */
20
27
  icon?: CanvasSystemIcon;
21
28
  /**
22
- * The position of the TertiaryButton icon.
29
+ * Button icon positions can either be `left` or `right`.
30
+ * If no value is provided, it defaults to `left`.
23
31
  * @default 'left'
24
32
  */
25
- iconPosition?: 'left' | 'right';
33
+ iconPosition?: IconPositions;
26
34
  /**
27
35
  * If set to `true`, transform the icon's x-axis to mirror the graphic
28
36
  * @default false
@@ -31,5 +39,71 @@ export interface PrimaryButtonProps extends Themeable, GrowthBehavior {
31
39
  children?: React.ReactNode;
32
40
  }
33
41
  export declare const PrimaryButton: import("../../common").ElementComponent<"button", PrimaryButtonProps>;
34
- export declare const getPrimaryButtonColors: ({ canvas: { palette: { primary: themePrimary }, }, }: EmotionCanvasTheme) => ButtonColors;
42
+ export declare const getPrimaryButtonColors: (variant: "inverse" | undefined, theme: EmotionCanvasTheme) => {
43
+ default: {
44
+ background: string;
45
+ icon: string;
46
+ label: string;
47
+ labelData?: undefined;
48
+ };
49
+ hover: {
50
+ background: string;
51
+ icon?: undefined;
52
+ label?: undefined;
53
+ labelData?: undefined;
54
+ };
55
+ active: {
56
+ background: string;
57
+ icon?: undefined;
58
+ label?: undefined;
59
+ labelData?: undefined;
60
+ };
61
+ focus: {
62
+ background: string;
63
+ border?: undefined;
64
+ icon?: undefined;
65
+ label?: undefined;
66
+ labelData?: undefined;
67
+ focusRing?: undefined;
68
+ };
69
+ disabled: {
70
+ background: string;
71
+ icon?: undefined;
72
+ label?: undefined;
73
+ labelData?: undefined;
74
+ };
75
+ } | {
76
+ default: {
77
+ background: string;
78
+ icon: string;
79
+ label: string;
80
+ labelData: string;
81
+ };
82
+ hover: {
83
+ background: string;
84
+ icon: string;
85
+ label: string;
86
+ labelData: string;
87
+ };
88
+ active: {
89
+ background: string;
90
+ icon: string;
91
+ label: string;
92
+ labelData: string;
93
+ };
94
+ focus: {
95
+ background: string;
96
+ border: string;
97
+ icon: string;
98
+ label: string;
99
+ labelData: string;
100
+ focusRing: import("@emotion/serialize").CSSObject;
101
+ };
102
+ disabled: {
103
+ background: string;
104
+ icon: string;
105
+ label: string;
106
+ labelData: string;
107
+ };
108
+ };
35
109
  //# sourceMappingURL=PrimaryButton.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { GrowthBehavior, Themeable, EmotionCanvasTheme } from '@workday/canvas-kit-react/common';
3
3
  import { CanvasSystemIcon } from '@workday/design-assets-types';
4
- import { ButtonColors } from './types';
4
+ import { ButtonColors, ButtonSizes, IconPositions } from './types';
5
5
  export interface SecondaryButtonProps extends Themeable, GrowthBehavior {
6
6
  /**
7
7
  * The variant of the SecondaryButton.
@@ -9,10 +9,12 @@ export interface SecondaryButtonProps extends Themeable, GrowthBehavior {
9
9
  */
10
10
  variant?: 'inverse' | undefined;
11
11
  /**
12
- * The size of the Button.
12
+ * There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
13
+ * If no size is provided, it will default to `medium`.
14
+ *
13
15
  * @default 'medium'
14
16
  */
15
- size?: 'small' | 'medium' | 'large';
17
+ size?: ButtonSizes;
16
18
  /**
17
19
  * The data label of the Button.
18
20
  * Note: not displayed at `small` size
@@ -24,10 +26,11 @@ export interface SecondaryButtonProps extends Themeable, GrowthBehavior {
24
26
  */
25
27
  icon?: CanvasSystemIcon;
26
28
  /**
27
- * The position of the TertiaryButton icon.
29
+ * Button icon positions can either be `left` or `right`.
30
+ * If no value is provided, it defaults to `left`.
28
31
  * @default 'left'
29
32
  */
30
- iconPosition?: 'left' | 'right';
33
+ iconPosition?: IconPositions;
31
34
  /**
32
35
  * If set to `true`, transform the icon's x-axis to mirror the graphic
33
36
  * @default false
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Themeable } from '@workday/canvas-kit-react/common';
3
3
  import { CanvasSystemIcon } from '@workday/design-assets-types';
4
+ import { TertiaryButtonSizes, IconPositions } from './types';
4
5
  export interface TertiaryButtonProps extends Themeable {
5
6
  /**
6
7
  * The variant of the TertiaryButton.
@@ -8,15 +9,18 @@ export interface TertiaryButtonProps extends Themeable {
8
9
  */
9
10
  variant?: 'inverse' | undefined;
10
11
  /**
11
- * The size of the TertiaryButton.
12
+ * There are three button sizes: `extraSmall`, `small`, and `medium`.
13
+ * If no size is provided, it will default to `medium`.
14
+ *
12
15
  * @default 'medium'
13
16
  */
14
- size?: 'small' | 'medium';
17
+ size?: TertiaryButtonSizes;
15
18
  /**
16
- * The position of the TertiaryButton icon.
19
+ * Button icon positions can either be `left` or `right`.
20
+ * If no value is provided, it defaults to `left`.
17
21
  * @default 'left'
18
22
  */
19
- iconPosition?: 'left' | 'right';
23
+ iconPosition?: IconPositions;
20
24
  /**
21
25
  * The icon of the TertiaryButton.
22
26
  */
@@ -1,14 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import { CSSObject } from '@emotion/core';
3
3
  import { GrowthBehavior, EmotionCanvasTheme, StyledType } from '@workday/canvas-kit-react/common';
4
- import { ButtonColors } from '../types';
4
+ import { ButtonColors, ButtonSizes } from '../types';
5
5
  export interface ButtonContainerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, GrowthBehavior {
6
6
  colors?: ButtonColors;
7
7
  /**
8
- * The size of the Button.
8
+ * There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
9
+ * If no size is provided, it will default to `medium`.
10
+ *
9
11
  * @default 'medium'
10
12
  */
11
- size?: 'small' | 'medium' | 'large';
13
+ size?: ButtonSizes;
12
14
  /**
13
15
  * The ref to the button that the styled component renders.
14
16
  */
@@ -1,20 +1,23 @@
1
1
  import { CanvasSystemIcon } from '@workday/design-assets-types';
2
+ import { ButtonSizes, IconPositions } from '../types';
2
3
  export interface ButtonLabelIconProps {
3
4
  /**
4
- * The size of the Button.
5
+ * There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
6
+ *
5
7
  * @default 'medium'
6
8
  */
7
- size?: 'small' | 'medium' | 'large';
9
+ size?: ButtonSizes;
8
10
  /**
9
11
  * The icon of the Button.
10
12
  * Note: not displayed at `small` size
11
13
  */
12
14
  icon?: CanvasSystemIcon;
13
15
  /**
14
- * The position of the TertiaryButton icon.
16
+ * Button icon positions can either be `left` or `right`.
17
+ * If no value is provided, it defaults to `left`.
15
18
  * @default 'left'
16
19
  */
17
- iconPosition?: 'left' | 'right';
20
+ iconPosition?: IconPositions;
18
21
  /**
19
22
  * If set to `true`, transform the icon's x-axis to mirror the graphic
20
23
  * @default false
@@ -19,4 +19,13 @@ export interface ButtonColors {
19
19
  };
20
20
  disabled: ButtonStateColors;
21
21
  }
22
+ /**
23
+ * There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
24
+ * If no size is provided, it will default to `medium`.
25
+ *
26
+ * @default 'medium'
27
+ */
28
+ export declare type ButtonSizes = 'extraSmall' | 'small' | 'medium' | 'large';
29
+ export declare type TertiaryButtonSizes = 'extraSmall' | 'small' | 'medium';
30
+ export declare type IconPositions = 'left' | 'right';
22
31
  //# sourceMappingURL=types.d.ts.map
@@ -1,13 +1,20 @@
1
1
  import * as React from 'react';
2
2
  import { GrowthBehavior, Themeable, EmotionCanvasTheme } from '@workday/canvas-kit-react/common';
3
3
  import { CanvasSystemIcon } from '@workday/design-assets-types';
4
- import { ButtonColors } from './types';
4
+ import { ButtonSizes, IconPositions } from './types';
5
5
  export interface PrimaryButtonProps extends Themeable, GrowthBehavior {
6
6
  /**
7
- * The size of the Button.
7
+ * The variant of the PrimaryButton.
8
+ * @default undefined
9
+ */
10
+ variant?: 'inverse';
11
+ /**
12
+ * There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
13
+ * If no size is provided, it will default to `medium`.
14
+ *
8
15
  * @default 'medium'
9
16
  */
10
- size?: 'small' | 'medium' | 'large';
17
+ size?: ButtonSizes;
11
18
  /**
12
19
  * The data label of the Button.
13
20
  * Note: not displayed at `small` size
@@ -19,10 +26,11 @@ export interface PrimaryButtonProps extends Themeable, GrowthBehavior {
19
26
  */
20
27
  icon?: CanvasSystemIcon;
21
28
  /**
22
- * The position of the TertiaryButton icon.
29
+ * Button icon positions can either be `left` or `right`.
30
+ * If no value is provided, it defaults to `left`.
23
31
  * @default 'left'
24
32
  */
25
- iconPosition?: 'left' | 'right';
33
+ iconPosition?: IconPositions;
26
34
  /**
27
35
  * If set to `true`, transform the icon's x-axis to mirror the graphic
28
36
  * @default false
@@ -31,5 +39,71 @@ export interface PrimaryButtonProps extends Themeable, GrowthBehavior {
31
39
  children?: React.ReactNode;
32
40
  }
33
41
  export declare const PrimaryButton: import("../../common").ElementComponent<"button", PrimaryButtonProps>;
34
- export declare const getPrimaryButtonColors: ({ canvas: { palette: { primary: themePrimary }, }, }: EmotionCanvasTheme) => ButtonColors;
42
+ export declare const getPrimaryButtonColors: (variant: "inverse" | undefined, theme: EmotionCanvasTheme) => {
43
+ default: {
44
+ background: string;
45
+ icon: string;
46
+ label: string;
47
+ labelData?: undefined;
48
+ };
49
+ hover: {
50
+ background: string;
51
+ icon?: undefined;
52
+ label?: undefined;
53
+ labelData?: undefined;
54
+ };
55
+ active: {
56
+ background: string;
57
+ icon?: undefined;
58
+ label?: undefined;
59
+ labelData?: undefined;
60
+ };
61
+ focus: {
62
+ background: string;
63
+ border?: undefined;
64
+ icon?: undefined;
65
+ label?: undefined;
66
+ labelData?: undefined;
67
+ focusRing?: undefined;
68
+ };
69
+ disabled: {
70
+ background: string;
71
+ icon?: undefined;
72
+ label?: undefined;
73
+ labelData?: undefined;
74
+ };
75
+ } | {
76
+ default: {
77
+ background: string;
78
+ icon: string;
79
+ label: string;
80
+ labelData: string;
81
+ };
82
+ hover: {
83
+ background: string;
84
+ icon: string;
85
+ label: string;
86
+ labelData: string;
87
+ };
88
+ active: {
89
+ background: string;
90
+ icon: string;
91
+ label: string;
92
+ labelData: string;
93
+ };
94
+ focus: {
95
+ background: string;
96
+ border: string;
97
+ icon: string;
98
+ label: string;
99
+ labelData: string;
100
+ focusRing: import("@emotion/serialize").CSSObject;
101
+ };
102
+ disabled: {
103
+ background: string;
104
+ icon: string;
105
+ label: string;
106
+ labelData: string;
107
+ };
108
+ };
35
109
  //# sourceMappingURL=PrimaryButton.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { GrowthBehavior, Themeable, EmotionCanvasTheme } from '@workday/canvas-kit-react/common';
3
3
  import { CanvasSystemIcon } from '@workday/design-assets-types';
4
- import { ButtonColors } from './types';
4
+ import { ButtonColors, ButtonSizes, IconPositions } from './types';
5
5
  export interface SecondaryButtonProps extends Themeable, GrowthBehavior {
6
6
  /**
7
7
  * The variant of the SecondaryButton.
@@ -9,10 +9,12 @@ export interface SecondaryButtonProps extends Themeable, GrowthBehavior {
9
9
  */
10
10
  variant?: 'inverse' | undefined;
11
11
  /**
12
- * The size of the Button.
12
+ * There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
13
+ * If no size is provided, it will default to `medium`.
14
+ *
13
15
  * @default 'medium'
14
16
  */
15
- size?: 'small' | 'medium' | 'large';
17
+ size?: ButtonSizes;
16
18
  /**
17
19
  * The data label of the Button.
18
20
  * Note: not displayed at `small` size
@@ -24,10 +26,11 @@ export interface SecondaryButtonProps extends Themeable, GrowthBehavior {
24
26
  */
25
27
  icon?: CanvasSystemIcon;
26
28
  /**
27
- * The position of the TertiaryButton icon.
29
+ * Button icon positions can either be `left` or `right`.
30
+ * If no value is provided, it defaults to `left`.
28
31
  * @default 'left'
29
32
  */
30
- iconPosition?: 'left' | 'right';
33
+ iconPosition?: IconPositions;
31
34
  /**
32
35
  * If set to `true`, transform the icon's x-axis to mirror the graphic
33
36
  * @default false
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { Themeable } from '@workday/canvas-kit-react/common';
3
3
  import { CanvasSystemIcon } from '@workday/design-assets-types';
4
+ import { TertiaryButtonSizes, IconPositions } from './types';
4
5
  export interface TertiaryButtonProps extends Themeable {
5
6
  /**
6
7
  * The variant of the TertiaryButton.
@@ -8,15 +9,18 @@ export interface TertiaryButtonProps extends Themeable {
8
9
  */
9
10
  variant?: 'inverse' | undefined;
10
11
  /**
11
- * The size of the TertiaryButton.
12
+ * There are three button sizes: `extraSmall`, `small`, and `medium`.
13
+ * If no size is provided, it will default to `medium`.
14
+ *
12
15
  * @default 'medium'
13
16
  */
14
- size?: 'small' | 'medium';
17
+ size?: TertiaryButtonSizes;
15
18
  /**
16
- * The position of the TertiaryButton icon.
19
+ * Button icon positions can either be `left` or `right`.
20
+ * If no value is provided, it defaults to `left`.
17
21
  * @default 'left'
18
22
  */
19
- iconPosition?: 'left' | 'right';
23
+ iconPosition?: IconPositions;
20
24
  /**
21
25
  * The icon of the TertiaryButton.
22
26
  */
@@ -1,14 +1,16 @@
1
1
  import * as React from 'react';
2
2
  import { CSSObject } from '@emotion/core';
3
3
  import { GrowthBehavior, EmotionCanvasTheme, StyledType } from '@workday/canvas-kit-react/common';
4
- import { ButtonColors } from '../types';
4
+ import { ButtonColors, ButtonSizes } from '../types';
5
5
  export interface ButtonContainerProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, GrowthBehavior {
6
6
  colors?: ButtonColors;
7
7
  /**
8
- * The size of the Button.
8
+ * There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
9
+ * If no size is provided, it will default to `medium`.
10
+ *
9
11
  * @default 'medium'
10
12
  */
11
- size?: 'small' | 'medium' | 'large';
13
+ size?: ButtonSizes;
12
14
  /**
13
15
  * The ref to the button that the styled component renders.
14
16
  */
@@ -1,20 +1,23 @@
1
1
  import { CanvasSystemIcon } from '@workday/design-assets-types';
2
+ import { ButtonSizes, IconPositions } from '../types';
2
3
  export interface ButtonLabelIconProps {
3
4
  /**
4
- * The size of the Button.
5
+ * There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
6
+ *
5
7
  * @default 'medium'
6
8
  */
7
- size?: 'small' | 'medium' | 'large';
9
+ size?: ButtonSizes;
8
10
  /**
9
11
  * The icon of the Button.
10
12
  * Note: not displayed at `small` size
11
13
  */
12
14
  icon?: CanvasSystemIcon;
13
15
  /**
14
- * The position of the TertiaryButton icon.
16
+ * Button icon positions can either be `left` or `right`.
17
+ * If no value is provided, it defaults to `left`.
15
18
  * @default 'left'
16
19
  */
17
- iconPosition?: 'left' | 'right';
20
+ iconPosition?: IconPositions;
18
21
  /**
19
22
  * If set to `true`, transform the icon's x-axis to mirror the graphic
20
23
  * @default false
@@ -19,4 +19,13 @@ export interface ButtonColors {
19
19
  };
20
20
  disabled: ButtonStateColors;
21
21
  }
22
+ /**
23
+ * There are four button sizes: `extraSmall`, `small`, `medium`, and `large`.
24
+ * If no size is provided, it will default to `medium`.
25
+ *
26
+ * @default 'medium'
27
+ */
28
+ export declare type ButtonSizes = 'extraSmall' | 'small' | 'medium' | 'large';
29
+ export declare type TertiaryButtonSizes = 'extraSmall' | 'small' | 'medium';
30
+ export declare type IconPositions = 'left' | 'right';
22
31
  //# sourceMappingURL=types.d.ts.map