@workday/canvas-kit-react 10.0.0-alpha.446-next.0 → 10.0.0-alpha.449-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 (70) hide show
  1. package/button/lib/BaseButton.tsx +4 -4
  2. package/checkbox/lib/Checkbox.tsx +18 -12
  3. package/dist/commonjs/button/lib/BaseButton.d.ts +1 -1
  4. package/dist/commonjs/button/lib/BaseButton.d.ts.map +1 -1
  5. package/dist/commonjs/button/lib/BaseButton.js +4 -4
  6. package/dist/commonjs/checkbox/lib/Checkbox.d.ts.map +1 -1
  7. package/dist/commonjs/checkbox/lib/Checkbox.js +11 -11
  8. package/dist/commonjs/popup/lib/Popper.d.ts +4 -4
  9. package/dist/commonjs/popup/lib/Popper.d.ts.map +1 -1
  10. package/dist/commonjs/popup/lib/Popper.js +2 -2
  11. package/dist/commonjs/popup/lib/fallbackPlacements.d.ts +3 -3
  12. package/dist/commonjs/popup/lib/fallbackPlacements.d.ts.map +1 -1
  13. package/dist/commonjs/popup/lib/fallbackPlacements.js +3 -22
  14. package/dist/commonjs/radio/lib/Radio.d.ts.map +1 -1
  15. package/dist/commonjs/radio/lib/Radio.js +13 -13
  16. package/dist/commonjs/select/lib/Select.d.ts.map +1 -1
  17. package/dist/commonjs/select/lib/Select.js +1 -1
  18. package/dist/commonjs/table/lib/TableRow.js +1 -1
  19. package/dist/commonjs/text-area/lib/TextArea.d.ts.map +1 -1
  20. package/dist/commonjs/text-area/lib/TextArea.js +3 -3
  21. package/dist/commonjs/text-input/lib/TextInput.js +1 -1
  22. package/dist/commonjs/tokens/index.d.ts.map +1 -1
  23. package/dist/commonjs/tokens/lib/depth.d.ts +6 -6
  24. package/dist/commonjs/tokens/lib/depth.d.ts.map +1 -1
  25. package/dist/commonjs/tokens/lib/depth.js +6 -6
  26. package/dist/commonjs/tokens/lib/space.d.ts +65 -27
  27. package/dist/commonjs/tokens/lib/space.d.ts.map +1 -1
  28. package/dist/commonjs/tokens/lib/space.js +61 -23
  29. package/dist/commonjs/tooltip/lib/TooltipContainer.js +8 -8
  30. package/dist/es6/button/lib/BaseButton.d.ts +1 -1
  31. package/dist/es6/button/lib/BaseButton.d.ts.map +1 -1
  32. package/dist/es6/button/lib/BaseButton.js +4 -4
  33. package/dist/es6/checkbox/lib/Checkbox.d.ts.map +1 -1
  34. package/dist/es6/checkbox/lib/Checkbox.js +12 -12
  35. package/dist/es6/popup/lib/Popper.d.ts +4 -4
  36. package/dist/es6/popup/lib/Popper.d.ts.map +1 -1
  37. package/dist/es6/popup/lib/Popper.js +2 -2
  38. package/dist/es6/popup/lib/fallbackPlacements.d.ts +3 -3
  39. package/dist/es6/popup/lib/fallbackPlacements.d.ts.map +1 -1
  40. package/dist/es6/popup/lib/fallbackPlacements.js +3 -3
  41. package/dist/es6/radio/lib/Radio.d.ts.map +1 -1
  42. package/dist/es6/radio/lib/Radio.js +14 -14
  43. package/dist/es6/select/lib/Select.d.ts.map +1 -1
  44. package/dist/es6/select/lib/Select.js +2 -2
  45. package/dist/es6/table/lib/TableRow.js +1 -1
  46. package/dist/es6/text-area/lib/TextArea.d.ts.map +1 -1
  47. package/dist/es6/text-area/lib/TextArea.js +4 -4
  48. package/dist/es6/text-input/lib/TextInput.js +1 -1
  49. package/dist/es6/tokens/index.d.ts.map +1 -1
  50. package/dist/es6/tokens/index.js +1 -1
  51. package/dist/es6/tokens/lib/depth.d.ts +6 -6
  52. package/dist/es6/tokens/lib/depth.d.ts.map +1 -1
  53. package/dist/es6/tokens/lib/depth.js +6 -6
  54. package/dist/es6/tokens/lib/space.d.ts +65 -27
  55. package/dist/es6/tokens/lib/space.d.ts.map +1 -1
  56. package/dist/es6/tokens/lib/space.js +61 -23
  57. package/dist/es6/tooltip/lib/TooltipContainer.js +8 -8
  58. package/package.json +3 -3
  59. package/popup/lib/Popper.tsx +6 -6
  60. package/popup/lib/fallbackPlacements.ts +16 -8
  61. package/radio/lib/Radio.tsx +20 -14
  62. package/select/lib/Select.tsx +2 -9
  63. package/table/lib/TableRow.tsx +1 -1
  64. package/text-area/lib/TextArea.tsx +10 -4
  65. package/text-input/lib/TextInput.tsx +1 -1
  66. package/tokens/README.md +19 -19
  67. package/tokens/index.ts +1 -2
  68. package/tokens/lib/depth.ts +16 -12
  69. package/tokens/lib/space.ts +84 -46
  70. package/tooltip/lib/TooltipContainer.tsx +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../tokens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,MAAM,EAEN,SAAS,EAKV,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAC,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,wBAAwB,EAAC,MAAM,cAAc,CAAC;AAChH,OAAO,EAAC,aAAa,EAAE,WAAW,EAAC,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAC,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAC,MAAM,aAAa,CAAC;AAClE,OAAO,EACL,KAAK,EACL,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EACb,MAAM,aAAa,CAAC;AACrB,OAAO,EAAC,IAAI,EACV,UAAU,EACV,cAAc,EACd,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBlB,CAAC;AAEF,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,MAAM,EACN,SAAS,EACT,KAAK,EACL,KAAK,EACL,YAAY,EACZ,IAAI,EACJ,UAAU,EACV,cAAc,EACd,aAAa,GACd,CAAC;AAEF,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,GACd,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../tokens/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,MAAM,EAEN,SAAS,EAKV,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAC,YAAY,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,wBAAwB,EAAC,MAAM,cAAc,CAAC;AAChH,OAAO,EAAC,aAAa,EAAE,WAAW,EAAC,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAC,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAC,MAAM,aAAa,CAAC;AAClE,OAAO,EACL,KAAK,EACL,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,YAAY,EAAC,MAAM,aAAa,CAAC;AACnC,OAAO,EAAC,IAAI,EACV,UAAU,EACV,cAAc,EACd,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAC,aAAa,EAAC,MAAM,aAAa,CAAC;AAE1C,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBlB,CAAC;AAEF,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EACL,YAAY,EACZ,MAAM,EACN,SAAS,EACT,KAAK,EACL,KAAK,EACL,YAAY,EACZ,IAAI,EACJ,UAAU,EACV,cAAc,EACd,aAAa,GACd,CAAC;AAEF,YAAY,EACV,kBAAkB,EAClB,sBAAsB,EACtB,wBAAwB,EACxB,WAAW,EACX,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,UAAU,EACV,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,GACd,CAAA"}
@@ -2,7 +2,7 @@ import { buttonColors, chartingColorOffsets, chartingColors, colors, commonColor
2
2
  import { borderRadius } from './lib/radius';
3
3
  import { BrandingColor } from './lib/colors.types';
4
4
  import { depth } from './lib/depth';
5
- import { space, spaceNumbers, } from './lib/space';
5
+ import { space, spaceNumbers } from './lib/space';
6
6
  import { type, fontFamily, monoFontFamily, } from './lib/type';
7
7
  export const canvas = {
8
8
  buttonColors,
@@ -29,7 +29,7 @@ export declare type CanvasDepth = {
29
29
  * ```
30
30
  */
31
31
  1: {
32
- boxShadow: '0px 1px 4px rgba(31, 38, 46, 0.12), 0px 2px 8px rgba(31, 38, 46, 0.08)';
32
+ boxShadow: '0 0.0625rem 0.25rem rgba(31, 38, 46, 0.12), 0 0.125rem 0.5rem rgba(31, 38, 46, 0.08)';
33
33
  };
34
34
  /**
35
35
  * ### Depth 2
@@ -45,7 +45,7 @@ export declare type CanvasDepth = {
45
45
  * ```
46
46
  */
47
47
  2: {
48
- boxShadow: '0px 2px 8px rgba(31, 38, 46, 0.12), 0px 4px 16px rgba(31, 38, 46, 0.08)';
48
+ boxShadow: '0 0.125rem 0.5rem rgba(31, 38, 46, 0.12), 0 0.25rem 1rem rgba(31, 38, 46, 0.08)';
49
49
  };
50
50
  /**
51
51
  * ### Depth 3
@@ -61,7 +61,7 @@ export declare type CanvasDepth = {
61
61
  * ```
62
62
  */
63
63
  3: {
64
- boxShadow: '0px 3px 12px rgba(31, 38, 46, 0.12), 0px 6px 24px rgba(31, 38, 46, 0.08)';
64
+ boxShadow: '0 0.1875rem 0.75rem rgba(31, 38, 46, 0.12), 0 0.375rem 1.5rem rgba(31, 38, 46, 0.08)';
65
65
  };
66
66
  /**
67
67
  * ### Depth 4
@@ -76,7 +76,7 @@ export declare type CanvasDepth = {
76
76
  * ```
77
77
  */
78
78
  4: {
79
- boxShadow: '0px 4px 16px rgba(31, 38, 46, 0.12), 0px 8px 32px rgba(31, 38, 46, 0.08)';
79
+ boxShadow: '0 0.25rem 1rem rgba(31, 38, 46, 0.12), 0 0.5rem 2rem rgba(31, 38, 46, 0.08)';
80
80
  };
81
81
  /**
82
82
  * ### Depth 5
@@ -92,7 +92,7 @@ export declare type CanvasDepth = {
92
92
  * ```
93
93
  */
94
94
  5: {
95
- boxShadow: '0px 5px 20px rgba(31, 38, 46, 0.12), 0px 10px 40px rgba(31, 38, 46, 0.08)';
95
+ boxShadow: '0 0.3125rem 1.25rem rgba(31, 38, 46, 0.12), 0 0.625rem 2.5rem rgba(31, 38, 46, 0.08)';
96
96
  };
97
97
  /**
98
98
  * ### Depth 6
@@ -108,7 +108,7 @@ export declare type CanvasDepth = {
108
108
  * ```
109
109
  */
110
110
  6: {
111
- boxShadow: '0px 6px 24px rgba(31, 38, 46, 0.12), 0px 12px 48px rgba(31, 38, 46, 0.08)';
111
+ boxShadow: '0 0.375rem 1.5rem rgba(31, 38, 46, 0.12), 0 0.75rem 3rem rgba(31, 38, 46, 0.08)';
112
112
  };
113
113
  };
114
114
  declare type ValueOf<T> = T[keyof T];
@@ -1 +1 @@
1
- {"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../../../tokens/lib/depth.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG;IACxB;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,wEAAwE,CAAC;KACrF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,yEAAyE,CAAC;KACtF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,0EAA0E,CAAC;KACvF,CAAC;IACF;;;;;;;;;;;OAWG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,0EAA0E,CAAC;KACvF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,2EAA2E,CAAC;KACxF,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,2EAA2E,CAAC;KACxF,CAAC;CACH,CAAC;AAEF,aAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B,oBAAY,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,KAAK,EAAE,WAsBnB,CAAC"}
1
+ {"version":3,"file":"depth.d.ts","sourceRoot":"","sources":["../../../../tokens/lib/depth.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,GAAG;IACxB;;;;;;;;;;;;OAYG;IACH,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,sFAAsF,CAAC;KACnG,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,iFAAiF,CAAC;KAC9F,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,sFAAsF,CAAC;KACnG,CAAC;IACF;;;;;;;;;;;OAWG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,6EAA6E,CAAC;KAC1F,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,sFAAsF,CAAC;KACnG,CAAC;IACF;;;;;;;;;;;;OAYG;IACH,CAAC,EAAE;QACD,SAAS,EAAE,iFAAiF,CAAC;KAC9F,CAAC;CACH,CAAC;AAEF,aAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAC7B,oBAAY,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,KAAK,EAAE,WAyBnB,CAAC"}
@@ -25,21 +25,21 @@ export const depth = {
25
25
  boxShadow: 'none',
26
26
  },
27
27
  1: {
28
- boxShadow: '0px 1px 4px rgba(31, 38, 46, 0.12), 0px 2px 8px rgba(31, 38, 46, 0.08)',
28
+ boxShadow: '0 0.0625rem 0.25rem rgba(31, 38, 46, 0.12), 0 0.125rem 0.5rem rgba(31, 38, 46, 0.08)',
29
29
  },
30
30
  2: {
31
- boxShadow: '0px 2px 8px rgba(31, 38, 46, 0.12), 0px 4px 16px rgba(31, 38, 46, 0.08)',
31
+ boxShadow: '0 0.125rem 0.5rem rgba(31, 38, 46, 0.12), 0 0.25rem 1rem rgba(31, 38, 46, 0.08)',
32
32
  },
33
33
  3: {
34
- boxShadow: '0px 3px 12px rgba(31, 38, 46, 0.12), 0px 6px 24px rgba(31, 38, 46, 0.08)',
34
+ boxShadow: '0 0.1875rem 0.75rem rgba(31, 38, 46, 0.12), 0 0.375rem 1.5rem rgba(31, 38, 46, 0.08)',
35
35
  },
36
36
  4: {
37
- boxShadow: '0px 4px 16px rgba(31, 38, 46, 0.12), 0px 8px 32px rgba(31, 38, 46, 0.08)',
37
+ boxShadow: '0 0.25rem 1rem rgba(31, 38, 46, 0.12), 0 0.5rem 2rem rgba(31, 38, 46, 0.08)',
38
38
  },
39
39
  5: {
40
- boxShadow: '0px 5px 20px rgba(31, 38, 46, 0.12), 0px 10px 40px rgba(31, 38, 46, 0.08)',
40
+ boxShadow: '0 0.3125rem 1.25rem rgba(31, 38, 46, 0.12), 0 0.625rem 2.5rem rgba(31, 38, 46, 0.08)',
41
41
  },
42
42
  6: {
43
- boxShadow: '0px 6px 24px rgba(31, 38, 46, 0.12), 0px 12px 48px rgba(31, 38, 46, 0.08)',
43
+ boxShadow: '0 0.375rem 1.5rem rgba(31, 38, 46, 0.12), 0 0.75rem 3rem rgba(31, 38, 46, 0.08)',
44
44
  },
45
45
  };
@@ -1,44 +1,82 @@
1
1
  declare type ValueOf<T> = T[keyof T];
2
- /** Type for the `space` object with keys and px values (strings) */
2
+ /** Type for the `space` object with keys and rem values (strings) */
3
3
  export declare type CanvasSpace = {
4
- zero: '0px';
5
- xxxs: '4px';
6
- xxs: '8px';
7
- xs: '12px';
8
- s: '16px';
9
- m: '24px';
10
- l: '32px';
11
- xl: '40px';
12
- xxl: '64px';
13
- xxxl: '80px';
4
+ zero: '0';
5
+ xxxs: '0.25rem';
6
+ xxs: '0.5rem';
7
+ xs: '0.75rem';
8
+ s: '1rem';
9
+ m: '1.5rem';
10
+ l: '2rem';
11
+ xl: '2.5rem';
12
+ xxl: '4rem';
13
+ xxxl: '5rem';
14
14
  };
15
15
  /** Type for `CanvasSpace` keys */
16
16
  export declare type CanvasSpaceKeys = keyof CanvasSpace;
17
- /** The px values for CanvasSpace (strings) */
17
+ /** The rem values for CanvasSpace (strings) */
18
18
  export declare type CanvasSpaceValues = ValueOf<CanvasSpace>;
19
- /** An object of space keys and px values (strings) */
19
+ /**
20
+ * An object of space keys and rem values (strings)
21
+ *
22
+ * Below is a table to show the equivalent values from `px` to `rem`.
23
+ * This is based on the default browser font size which is `16px`.
24
+ *
25
+ * | px Value | rem Value | space token |
26
+ * | --------- | --------- | ----------- |
27
+ * | 0 | 0 | zero |
28
+ * | 4px | 0.25rem | xxxs |
29
+ * | 8px | 0.5rem | xxs |
30
+ * | 12px | 0.75rem | xs |
31
+ * | 16px | 1rem | s |
32
+ * | 24px | 1.5rem | m |
33
+ * | 32px | 2rem | l |
34
+ * | 40px | 2.5rem | xl |
35
+ * | 64px | 4rem | xxl |
36
+ * | 80px | 5rem | xxxl |
37
+ *
38
+ * */
20
39
  export declare const space: CanvasSpace;
21
- /** Type for the `spaceNumbers` object with keys and numeric px values (numbers) */
40
+ /** Type for the `spaceNumbers` object with keys and numeric rem values (numbers) */
22
41
  export declare type CanvasSpaceNumbers = {
23
42
  zero: 0;
24
- xxxs: 4;
25
- xxs: 8;
26
- xs: 12;
27
- s: 16;
28
- m: 24;
29
- l: 32;
30
- xl: 40;
31
- xxl: 64;
32
- xxxl: 80;
43
+ xxxs: 0.25;
44
+ xxs: 0.5;
45
+ xs: 0.75;
46
+ s: 1;
47
+ m: 1.5;
48
+ l: 2;
49
+ xl: 2.5;
50
+ xxl: 4;
51
+ xxxl: 5;
33
52
  };
34
- /** The numeric px values for CanvasSpaceNumbers (numbers) */
53
+ /** The numeric rem values for CanvasSpaceNumbers (numbers) */
35
54
  export declare type CanvasSpaceNumberValues = ValueOf<CanvasSpaceNumbers>;
36
55
  /**
37
- * An object of space keys and their numeric px values (numbers)
38
- * - These are helpful when you need a raw numeric px value.
56
+ * An object of space keys and their numeric rem values (numbers)
57
+ * - These are helpful when you need a raw numeric rem value.
39
58
  * - Here's an example usage to perform calculations:
40
59
  * @example
41
- * const buttonPaddingLeft = spaceNumbers.s + iconSize;
60
+ * ```tsx
61
+ * const buttonPaddingLeft = `${spaceNumbers.s + iconSize}rem`;
62
+ * ```
63
+ *
64
+ * Below is a table to show the equivalent values from `px` to `rem`.
65
+ * This is based on the default browser font size which is `16px`.
66
+ *
67
+ * | px Value | rem Value | space token |
68
+ * | --------- | --------- | ----------- |
69
+ * | 0 | 0 | zero |
70
+ * | 4px | 0.25rem | xxxs |
71
+ * | 8px | 0.5rem | xxs |
72
+ * | 12px | 0.75rem | xs |
73
+ * | 16px | 1rem | s |
74
+ * | 24px | 1.5rem | m |
75
+ * | 32px | 2rem | l |
76
+ * | 40px | 2.5rem | xl |
77
+ * | 64px | 4rem | xxl |
78
+ * | 80px | 5rem | xxxl |
79
+ *
42
80
  */
43
81
  export declare const spaceNumbers: CanvasSpaceNumbers;
44
82
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../../../tokens/lib/space.ts"],"names":[],"mappings":"AAAA,aAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAO7B,oEAAoE;AACpE,oBAAY,WAAW,GAAG;IACxB,IAAI,EAAE,KAAK,CAAC;IACZ,IAAI,EAAE,KAAK,CAAC;IACZ,GAAG,EAAE,KAAK,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,kCAAkC;AAClC,oBAAY,eAAe,GAAG,MAAM,WAAW,CAAC;AAEhD,8CAA8C;AAC9C,oBAAY,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAErD,sDAAsD;AACtD,eAAO,MAAM,KAAK,EAAE,WAWnB,CAAC;AAEF,mFAAmF;AACnF,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,CAAC,CAAC;IACR,GAAG,EAAE,CAAC,CAAC;IACP,EAAE,EAAE,EAAE,CAAC;IACP,CAAC,EAAE,EAAE,CAAC;IACN,CAAC,EAAE,EAAE,CAAC;IACN,CAAC,EAAE,EAAE,CAAC;IACN,EAAE,EAAE,EAAE,CAAC;IACP,GAAG,EAAE,EAAE,CAAC;IACR,IAAI,EAAE,EAAE,CAAC;CACV,CAAC;AAEF,6DAA6D;AAC7D,oBAAY,uBAAuB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAElE;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,EAAE,kBAW1B,CAAC"}
1
+ {"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../../../tokens/lib/space.ts"],"names":[],"mappings":"AAAA,aAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAO7B,qEAAqE;AACrE,oBAAY,WAAW,GAAG;IACxB,IAAI,EAAE,GAAG,CAAC;IACV,IAAI,EAAE,SAAS,CAAC;IAChB,GAAG,EAAE,QAAQ,CAAC;IACd,EAAE,EAAE,SAAS,CAAC;IACd,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,QAAQ,CAAC;IACZ,CAAC,EAAE,MAAM,CAAC;IACV,EAAE,EAAE,QAAQ,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,kCAAkC;AAClC,oBAAY,eAAe,GAAG,MAAM,WAAW,CAAC;AAEhD,+CAA+C;AAC/C,oBAAY,iBAAiB,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AAErD;;;;;;;;;;;;;;;;;;;KAmBK;AACL,eAAO,MAAM,KAAK,EAAE,WAWnB,CAAC;AAEF,oFAAoF;AACpF,oBAAY,kBAAkB,GAAG;IAC/B,IAAI,EAAE,CAAC,CAAC;IACR,IAAI,EAAE,IAAI,CAAC;IACX,GAAG,EAAE,GAAG,CAAC;IACT,EAAE,EAAE,IAAI,CAAC;IACT,CAAC,EAAE,CAAC,CAAC;IACL,CAAC,EAAE,GAAG,CAAC;IACP,CAAC,EAAE,CAAC,CAAC;IACL,EAAE,EAAE,GAAG,CAAC;IACR,GAAG,EAAE,CAAC,CAAC;IACP,IAAI,EAAE,CAAC,CAAC;CACT,CAAC;AAEF,8DAA8D;AAC9D,oBAAY,uBAAuB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAElE;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,YAAY,EAAE,kBAW1B,CAAC"}
@@ -1,32 +1,70 @@
1
- /** An object of space keys and px values (strings) */
1
+ /**
2
+ * An object of space keys and rem values (strings)
3
+ *
4
+ * Below is a table to show the equivalent values from `px` to `rem`.
5
+ * This is based on the default browser font size which is `16px`.
6
+ *
7
+ * | px Value | rem Value | space token |
8
+ * | --------- | --------- | ----------- |
9
+ * | 0 | 0 | zero |
10
+ * | 4px | 0.25rem | xxxs |
11
+ * | 8px | 0.5rem | xxs |
12
+ * | 12px | 0.75rem | xs |
13
+ * | 16px | 1rem | s |
14
+ * | 24px | 1.5rem | m |
15
+ * | 32px | 2rem | l |
16
+ * | 40px | 2.5rem | xl |
17
+ * | 64px | 4rem | xxl |
18
+ * | 80px | 5rem | xxxl |
19
+ *
20
+ * */
2
21
  export const space = {
3
- zero: '0px',
4
- xxxs: '4px',
5
- xxs: '8px',
6
- xs: '12px',
7
- s: '16px',
8
- m: '24px',
9
- l: '32px',
10
- xl: '40px',
11
- xxl: '64px',
12
- xxxl: '80px',
22
+ zero: '0',
23
+ xxxs: '0.25rem',
24
+ xxs: '0.5rem',
25
+ xs: '0.75rem',
26
+ s: '1rem',
27
+ m: '1.5rem',
28
+ l: '2rem',
29
+ xl: '2.5rem',
30
+ xxl: '4rem',
31
+ xxxl: '5rem',
13
32
  };
14
33
  /**
15
- * An object of space keys and their numeric px values (numbers)
16
- * - These are helpful when you need a raw numeric px value.
34
+ * An object of space keys and their numeric rem values (numbers)
35
+ * - These are helpful when you need a raw numeric rem value.
17
36
  * - Here's an example usage to perform calculations:
18
37
  * @example
19
- * const buttonPaddingLeft = spaceNumbers.s + iconSize;
38
+ * ```tsx
39
+ * const buttonPaddingLeft = `${spaceNumbers.s + iconSize}rem`;
40
+ * ```
41
+ *
42
+ * Below is a table to show the equivalent values from `px` to `rem`.
43
+ * This is based on the default browser font size which is `16px`.
44
+ *
45
+ * | px Value | rem Value | space token |
46
+ * | --------- | --------- | ----------- |
47
+ * | 0 | 0 | zero |
48
+ * | 4px | 0.25rem | xxxs |
49
+ * | 8px | 0.5rem | xxs |
50
+ * | 12px | 0.75rem | xs |
51
+ * | 16px | 1rem | s |
52
+ * | 24px | 1.5rem | m |
53
+ * | 32px | 2rem | l |
54
+ * | 40px | 2.5rem | xl |
55
+ * | 64px | 4rem | xxl |
56
+ * | 80px | 5rem | xxxl |
57
+ *
20
58
  */
21
59
  export const spaceNumbers = {
22
60
  zero: 0,
23
- xxxs: 4,
24
- xxs: 8,
25
- xs: 12,
26
- s: 16,
27
- m: 24,
28
- l: 32,
29
- xl: 40,
30
- xxl: 64,
31
- xxxl: 80,
61
+ xxxs: 0.25,
62
+ xxs: 0.5,
63
+ xs: 0.75,
64
+ s: 1,
65
+ m: 1.5,
66
+ l: 2,
67
+ xl: 2.5,
68
+ xxl: 4,
69
+ xxxl: 5,
32
70
  };
@@ -23,7 +23,7 @@ export const TooltipContainer = styled('div')({
23
23
  ...type.levels.subtext.medium,
24
24
  display: 'inline-flex',
25
25
  position: 'relative',
26
- padding: spaceNumbers.xxs + spaceNumbers.xxxs,
26
+ padding: space.xs,
27
27
  color: colors.frenchVanilla100,
28
28
  a: {
29
29
  color: colors.frenchVanilla100,
@@ -34,7 +34,7 @@ export const TooltipContainer = styled('div')({
34
34
  content: '""',
35
35
  borderRadius: borderRadius.m,
36
36
  zIndex: -1,
37
- margin: spaceNumbers.xxxs,
37
+ margin: space.xxxs,
38
38
  backgroundColor: 'rgba(0,0,0,.85)',
39
39
  position: 'absolute',
40
40
  top: 0,
@@ -44,9 +44,9 @@ export const TooltipContainer = styled('div')({
44
44
  },
45
45
  // offset tooltips by 2 pixels when a keyboard focus ring is detected
46
46
  '[data-whatinput=keyboard] &': {
47
- padding: spaceNumbers.xxs + spaceNumbers.xxxs + 2,
47
+ padding: `${spaceNumbers.s - 0.125}rem`,
48
48
  ':before': {
49
- margin: spaceNumbers.xxxs + 2,
49
+ margin: `${spaceNumbers.xxxs + 0.125}rem`,
50
50
  },
51
51
  },
52
52
  // Hide tooltip when the reference element is either clipped or fully hidden
@@ -56,16 +56,16 @@ export const TooltipContainer = styled('div')({
56
56
  },
57
57
  // Fix offsets based on placement
58
58
  '[data-popper-placement="top-start"] &, [data-popper-placement="bottom-start"] &': {
59
- left: -spaceNumbers.xxxs,
59
+ left: `-${space.xxxs}`,
60
60
  },
61
61
  '[data-popper-placement="top-end"] &, [data-popper-placement="bottom-end"] &': {
62
- right: -spaceNumbers.xxxs,
62
+ right: `-${space.xxxs}`,
63
63
  },
64
64
  '[data-popper-placement="left-start"] &, [data-popper-placement="right-start"] &': {
65
- top: -spaceNumbers.xxxs,
65
+ top: `-${space.xxxs}`,
66
66
  },
67
67
  '[data-popper-placement="left-end"] &, [data-popper-placement="right-end"] &': {
68
- bottom: -spaceNumbers.xxxs,
68
+ bottom: `-${space.xxxs}`,
69
69
  },
70
70
  }, ({ transformOrigin = defaultTransformOrigin }) => {
71
71
  if (transformOrigin === null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "10.0.0-alpha.446-next.0",
3
+ "version": "10.0.0-alpha.449-next.0",
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",
@@ -49,7 +49,7 @@
49
49
  "@emotion/styled": "^11.6.0",
50
50
  "@popperjs/core": "^2.5.4",
51
51
  "@workday/canvas-colors-web": "^2.0.0",
52
- "@workday/canvas-kit-popup-stack": "^10.0.0-alpha.446-next.0",
52
+ "@workday/canvas-kit-popup-stack": "^10.0.0-alpha.449-next.0",
53
53
  "@workday/canvas-system-icons-web": "^3.0.0",
54
54
  "@workday/design-assets-types": "^0.2.8",
55
55
  "chroma-js": "^2.1.0",
@@ -66,5 +66,5 @@
66
66
  "@workday/canvas-accent-icons-web": "^3.0.0",
67
67
  "@workday/canvas-applet-icons-web": "^2.0.0"
68
68
  },
69
- "gitHead": "7202c6904b61f4ef6d4a221276faa1e13062c8e3"
69
+ "gitHead": "aec7d64ecbea44ef7b474ec988885000069ff000"
70
70
  }
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import * as ReactDOM from 'react-dom';
3
- import * as PopperJS from '@popperjs/core';
3
+ import { Placement as PopperJSPlacement, Options, Instance, Modifier, createPopper } from '@popperjs/core';
4
4
 
5
- export type Placement = `${PopperJS.Placement}`; // Use template literals to make documentation list them out
6
- export type PopperOptions = PopperJS.Options;
5
+ export type Placement = `${PopperJSPlacement}`; // Use template literals to make documentation list them out
6
+ export type PopperOptions = Options;
7
7
  export const defaultFallbackPlacements: Placement[] = ['top', 'right', 'bottom', 'left'];
8
8
 
9
9
  import {usePopupStack} from './hooks';
@@ -74,7 +74,7 @@ export interface PopperProps {
74
74
  * Reference to the PopperJS instance. Useful for making direct method calls on the popper
75
75
  * instance like `update`.
76
76
  */
77
- popperInstanceRef?: React.Ref<PopperJS.Instance>;
77
+ popperInstanceRef?: React.Ref<Instance>;
78
78
  }
79
79
 
80
80
  /**
@@ -142,7 +142,7 @@ const OpenPopper = React.forwardRef<HTMLDivElement, PopperProps>(
142
142
  const placementRef = React.useRef(popperPlacement);
143
143
  placementRef.current = placement;
144
144
 
145
- const placementModifier = React.useMemo((): PopperJS.Modifier<any, any> => {
145
+ const placementModifier = React.useMemo((): Modifier<any, any> => {
146
146
  return {
147
147
  name: 'setPlacement',
148
148
  enabled: true,
@@ -169,7 +169,7 @@ const OpenPopper = React.forwardRef<HTMLDivElement, PopperProps>(
169
169
  }
170
170
 
171
171
  if (stackRef.current) {
172
- const instance = PopperJS.createPopper(anchorEl, stackRef.current, {
172
+ const instance = createPopper(anchorEl, stackRef.current, {
173
173
  placement: popperPlacement,
174
174
  ...popperOptions,
175
175
  modifiers: [
@@ -1,6 +1,14 @@
1
- import * as PopperJS from '@popperjs/core';
1
+ import {
2
+ Placement as PopperJSPlacement,
3
+ placements,
4
+ State,
5
+ detectOverflow,
6
+ SideObject,
7
+ Modifier,
8
+ ModifierArguments,
9
+ } from '@popperjs/core';
2
10
 
3
- export type Placement = PopperJS.Placement; // Use template literals to make documentation list them out
11
+ export type Placement = PopperJSPlacement; // Use template literals to make documentation list them out
4
12
 
5
13
  const getOppositePlacement = (popperPlacement: Placement): Placement => {
6
14
  const [first, second] = popperPlacement.split('-');
@@ -23,7 +31,7 @@ const getOppositePlacement = (popperPlacement: Placement): Placement => {
23
31
  }
24
32
  if (second) {
25
33
  oppositePlacement =
26
- PopperJS.placements.find(placement => placement.includes(`${oppositePlacement}-${second}`)) ??
34
+ placements.find(placement => placement.includes(`${oppositePlacement}-${second}`)) ??
27
35
  oppositePlacement;
28
36
  }
29
37
  return oppositePlacement;
@@ -31,7 +39,7 @@ const getOppositePlacement = (popperPlacement: Placement): Placement => {
31
39
 
32
40
  const choseAvailablePlacement = (
33
41
  placements: Placement[],
34
- state: PopperJS.State,
42
+ state: State,
35
43
  preferredPlacement: Placement
36
44
  ): Placement => {
37
45
  if (placements.length === 0 || placements[0].split('-')[0] === 'auto') {
@@ -39,7 +47,7 @@ const choseAvailablePlacement = (
39
47
  }
40
48
 
41
49
  const {reference, popper} = state.rects;
42
- const overflow = PopperJS.detectOverflow({...state, placement: placements[0]});
50
+ const overflow = detectOverflow({...state, placement: placements[0]});
43
51
  const direction = /left|right/.test(placements[0].split('-')[0]) ? 'horizontal' : 'vertical';
44
52
  const isOverflowed =
45
53
  (overflow.top > 0 || overflow.bottom > 0 || overflow.left > 0 || overflow.right > 0) &&
@@ -48,7 +56,7 @@ const choseAvailablePlacement = (
48
56
  popper.height / 2 - overflow.bottom < reference.height
49
57
  : popper.width - overflow.left < reference.width ||
50
58
  popper.width - overflow.right < reference.width);
51
- const key = placements[0].split('-')[0] as keyof PopperJS.SideObject;
59
+ const key = placements[0].split('-')[0] as keyof SideObject;
52
60
 
53
61
  if (!isOverflowed && overflow[key] <= 0) {
54
62
  return placements[0];
@@ -63,14 +71,14 @@ export type Options = {
63
71
 
64
72
  const name = 'fallbackModifier';
65
73
 
66
- export const fallbackPlacementsModifier: PopperJS.Modifier<typeof name, Options> = {
74
+ export const fallbackPlacementsModifier: Modifier<typeof name, Options> = {
67
75
  name: name,
68
76
  enabled: true,
69
77
  phase: 'main',
70
78
  data: {
71
79
  _skip: false,
72
80
  },
73
- fn({state, options}: PopperJS.ModifierArguments<Options>) {
81
+ fn({state, options}: ModifierArguments<Options>) {
74
82
  const preferredPlacement = state.options.placement;
75
83
  const {fallbackPlacements} = options;
76
84
 
@@ -8,7 +8,13 @@ import {
8
8
  Themeable,
9
9
  useUniqueId,
10
10
  } from '@workday/canvas-kit-react/common';
11
- import {borderRadius, colors, inputColors, spaceNumbers} from '@workday/canvas-kit-react/tokens';
11
+ import {
12
+ borderRadius,
13
+ colors,
14
+ inputColors,
15
+ space,
16
+ spaceNumbers,
17
+ } from '@workday/canvas-kit-react/tokens';
12
18
  import {LabelText} from '@workday/canvas-kit-react/text';
13
19
 
14
20
  export interface RadioProps extends Themeable {
@@ -47,13 +53,13 @@ export interface RadioProps extends Themeable {
47
53
  variant?: 'inverse' | undefined;
48
54
  }
49
55
 
50
- const radioBorderRadius = 9;
51
- const radioDot = 8;
52
- const radioHeight = 18;
53
- const radioTapArea = spaceNumbers.m;
56
+ const radioBorderRadius = `${spaceNumbers.xxs + 0.0625}rem`;
57
+ const radioDot = space.xxs;
58
+ const radioHeight = (spaceNumbers.xl - spaceNumbers.xxxs) / 2;
59
+ const radioTapArea = space.m;
54
60
  const radioContainerHeight = radioTapArea;
55
- const radioLabelDistance = spaceNumbers.xs;
56
- const radioWidth = 18;
61
+ const radioLabelDistance = space.xs;
62
+ const radioWidth = radioHeight;
57
63
  const rippleRadius = (spaceNumbers.l - radioWidth) / 2;
58
64
 
59
65
  const RadioContainer = styled('div')({
@@ -70,17 +76,17 @@ const RadioContainer = styled('div')({
70
76
  */
71
77
  const RadioInputWrapper = styled('div')<Pick<RadioProps, 'disabled'>>({
72
78
  display: 'flex',
73
- height: radioHeight,
74
- width: radioWidth,
79
+ height: `${radioHeight}rem`,
80
+ width: `${radioWidth}rem`,
75
81
  });
76
82
 
77
83
  const RadioRipple = styled('span')<Pick<RadioProps, 'disabled' | 'variant'>>(
78
84
  {
79
85
  borderRadius: borderRadius.circle,
80
86
  boxShadow: `0 0 0 0 ${colors.soap200}`,
81
- height: radioHeight,
87
+ height: `${radioHeight}rem`,
82
88
  transition: 'box-shadow 150ms ease-out',
83
- width: radioWidth,
89
+ width: `${radioWidth}rem`,
84
90
  position: 'absolute',
85
91
  pointerEvents: 'none', // This is a decorative element we don't want it to block clicks to input
86
92
  },
@@ -129,7 +135,7 @@ const RadioInput = styled('input')<RadioProps & StyledType>(
129
135
  // `span:first-of-type` refers to `RadioRipple`, the light grey
130
136
  // element that animates around the component on hover
131
137
  '&:hover ~ span:first-of-type': {
132
- boxShadow: disabled ? undefined : `0 0 0 ${rippleRadius}px ${colors.soap200}`,
138
+ boxShadow: disabled ? undefined : `0 0 0 ${rippleRadius}rem ${colors.soap200}`,
133
139
  },
134
140
 
135
141
  // `div:first-of-type` refers to the `RadioBackground`, the visual facade of the
@@ -212,13 +218,13 @@ const RadioBackground = styled('div')<RadioProps>(
212
218
  borderWidth: '1px',
213
219
  boxSizing: 'border-box',
214
220
  display: 'flex',
215
- height: radioHeight,
221
+ height: `${radioHeight}rem`,
216
222
  justifyContent: 'center',
217
223
  padding: '0px 2px',
218
224
  pointerEvents: 'none',
219
225
  position: 'absolute',
220
226
  transition: 'border 200ms ease, background 200ms',
221
- width: radioWidth,
227
+ width: `${radioWidth}rem`,
222
228
  },
223
229
  ({
224
230
  checked,
@@ -8,14 +8,7 @@ import {
8
8
  styled,
9
9
  Themeable,
10
10
  } from '@workday/canvas-kit-react/common';
11
- import {
12
- colors,
13
- borderRadius,
14
- inputColors,
15
- spaceNumbers,
16
- type,
17
- space,
18
- } from '@workday/canvas-kit-react/tokens';
11
+ import {colors, borderRadius, inputColors, type, space} from '@workday/canvas-kit-react/tokens';
19
12
  import {caretDownSmallIcon} from '@workday/canvas-system-icons-web';
20
13
  import {SystemIcon} from '@workday/canvas-kit-react/icon';
21
14
  import {SelectOption} from './SelectOption';
@@ -55,7 +48,7 @@ const StyledSelect = styled('select')<SelectProps & StyledType>(
55
48
  height: space.xl,
56
49
  minWidth: 280,
57
50
  transition: '0.2s box-shadow, 0.2s border-color',
58
- padding: spaceNumbers.xxs,
51
+ padding: space.xxs,
59
52
  margin: 0, // Fix Safari
60
53
  MozAppearance: 'none', // FF bugfix: hide arrow so it doesn't show under ours
61
54
  WebkitAppearance: 'none',
@@ -100,7 +100,7 @@ const StyledTableRow = styled('tr')<TableRowProps>(
100
100
  fontSize: 13,
101
101
  borderRight: cellBorder,
102
102
  borderBottom: cellBorder,
103
- height: spaceNumbers.xl + spaceNumbers.xxs,
103
+ height: `${spaceNumbers.xl + spaceNumbers.xxs}rem`,
104
104
  boxSizing: 'border-box',
105
105
  transition: 'background-color 0.2s',
106
106
  },
@@ -8,7 +8,13 @@ import {
8
8
  styled,
9
9
  Themeable,
10
10
  } from '@workday/canvas-kit-react/common';
11
- import {borderRadius, inputColors, spaceNumbers, type} from '@workday/canvas-kit-react/tokens';
11
+ import {
12
+ borderRadius,
13
+ inputColors,
14
+ space,
15
+ spaceNumbers,
16
+ type,
17
+ } from '@workday/canvas-kit-react/tokens';
12
18
 
13
19
  export interface TextAreaProps extends Themeable, GrowthBehavior {
14
20
  /**
@@ -59,10 +65,10 @@ const StyledTextArea = styled('textarea')<TextAreaProps & StyledType>(
59
65
  backgroundColor: inputColors.background,
60
66
  borderRadius: borderRadius.m,
61
67
  boxSizing: 'border-box',
62
- minHeight: 64,
63
- minWidth: 280,
68
+ minHeight: space.xxl,
69
+ minWidth: `${spaceNumbers.xxxl * 3 + spaceNumbers.xl}rem`,
64
70
  transition: '0.2s box-shadow, 0.2s border-color',
65
- padding: spaceNumbers.xxs, // Compensate for border
71
+ padding: space.xxs, // Compensate for border
66
72
  margin: 0, // Fix Safari
67
73
  '&::webkit-resizer': {
68
74
  display: 'none',