@workday/canvas-kit-react 8.5.12 → 8.6.0-383-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 (43) hide show
  1. package/common/lib/utils/colorUtils.ts +20 -7
  2. package/dist/commonjs/common/lib/utils/colorUtils.d.ts +7 -0
  3. package/dist/commonjs/common/lib/utils/colorUtils.d.ts.map +1 -1
  4. package/dist/commonjs/common/lib/utils/colorUtils.js +20 -7
  5. package/dist/commonjs/icon/lib/AccentIcon.d.ts +3 -2
  6. package/dist/commonjs/icon/lib/AccentIcon.d.ts.map +1 -1
  7. package/dist/commonjs/icon/lib/AccentIcon.js +1 -1
  8. package/dist/commonjs/icon/lib/SystemIcon.d.ts.map +1 -1
  9. package/dist/commonjs/icon/lib/SystemIcon.js +6 -7
  10. package/dist/commonjs/icon/lib/SystemIconCircle.d.ts +2 -1
  11. package/dist/commonjs/icon/lib/SystemIconCircle.d.ts.map +1 -1
  12. package/dist/commonjs/icon/lib/SystemIconCircle.js +1 -1
  13. package/dist/commonjs/icon/lib/utils.d.ts +0 -2
  14. package/dist/commonjs/icon/lib/utils.d.ts.map +1 -1
  15. package/dist/commonjs/icon/lib/utils.js +1 -9
  16. package/dist/commonjs/layout/lib/utils/position.d.ts +4 -0
  17. package/dist/commonjs/layout/lib/utils/position.d.ts.map +1 -1
  18. package/dist/commonjs/layout/lib/utils/position.js +5 -0
  19. package/dist/commonjs/tabs/lib/TabsItem.d.ts +1 -1
  20. package/dist/es6/common/lib/utils/colorUtils.d.ts +7 -0
  21. package/dist/es6/common/lib/utils/colorUtils.d.ts.map +1 -1
  22. package/dist/es6/common/lib/utils/colorUtils.js +18 -6
  23. package/dist/es6/icon/lib/AccentIcon.d.ts +3 -2
  24. package/dist/es6/icon/lib/AccentIcon.d.ts.map +1 -1
  25. package/dist/es6/icon/lib/AccentIcon.js +2 -2
  26. package/dist/es6/icon/lib/SystemIcon.d.ts.map +1 -1
  27. package/dist/es6/icon/lib/SystemIcon.js +1 -2
  28. package/dist/es6/icon/lib/SystemIconCircle.d.ts +2 -1
  29. package/dist/es6/icon/lib/SystemIconCircle.d.ts.map +1 -1
  30. package/dist/es6/icon/lib/SystemIconCircle.js +2 -2
  31. package/dist/es6/icon/lib/utils.d.ts +0 -2
  32. package/dist/es6/icon/lib/utils.d.ts.map +1 -1
  33. package/dist/es6/icon/lib/utils.js +0 -7
  34. package/dist/es6/layout/lib/utils/position.d.ts +4 -0
  35. package/dist/es6/layout/lib/utils/position.d.ts.map +1 -1
  36. package/dist/es6/layout/lib/utils/position.js +5 -0
  37. package/dist/es6/tabs/lib/TabsItem.d.ts +1 -1
  38. package/icon/lib/AccentIcon.tsx +5 -6
  39. package/icon/lib/SystemIcon.tsx +1 -2
  40. package/icon/lib/SystemIconCircle.tsx +4 -3
  41. package/icon/lib/utils.ts +0 -8
  42. package/layout/lib/utils/position.ts +9 -0
  43. package/package.json +3 -3
@@ -1,6 +1,18 @@
1
- import {colors} from '@workday/canvas-kit-react/tokens';
1
+ import {CanvasColor, colors} from '@workday/canvas-kit-react/tokens';
2
2
  import chroma from 'chroma-js';
3
3
 
4
+ /**
5
+ * The function takes in a color string or an enum value of CanvasColor and returns its hex value color.
6
+ * @param value a string or an enum value of CanvasColor
7
+ * @returns the hex value color
8
+ */
9
+ export function getColor(value?: CanvasColor | string) {
10
+ if (value! in colors) {
11
+ return colors[value as keyof typeof colors];
12
+ }
13
+ return value;
14
+ }
15
+
4
16
  // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
5
17
  export const expandHex = (hex: string) => {
6
18
  const shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
@@ -31,16 +43,17 @@ export const pickForegroundColor = (
31
43
  darkColor?: string,
32
44
  lightColor?: string
33
45
  ) => {
34
- if (chroma.valid(background)) {
35
- if (lightColor && chroma.contrast(background, lightColor) >= 4.5) {
36
- return lightColor;
37
- } else if (darkColor && chroma.contrast(background, darkColor) >= 4.5) {
38
- return darkColor;
46
+ const [bg, dark, light] = [getColor(background), getColor(darkColor), getColor(lightColor)];
47
+ if (bg && chroma.valid(bg)) {
48
+ if (light && chroma.contrast(bg, light) >= 4.5) {
49
+ return light;
50
+ } else if (dark && chroma.contrast(bg, dark) >= 4.5) {
51
+ return dark;
39
52
  } else {
40
53
  for (let i = 0; i < colorPriority.length; i++) {
41
54
  const color = colorPriority[i];
42
55
 
43
- if (chroma.contrast(background, color) >= 4.5) {
56
+ if (chroma.contrast(bg, color) >= 4.5) {
44
57
  return color;
45
58
  }
46
59
  }
@@ -1,3 +1,10 @@
1
+ import { CanvasColor } from '@workday/canvas-kit-react/tokens';
2
+ /**
3
+ * The function takes in a color string or an enum value of CanvasColor and returns its hex value color.
4
+ * @param value a string or an enum value of CanvasColor
5
+ * @returns the hex value color
6
+ */
7
+ export declare function getColor(value?: CanvasColor | string): string | undefined;
1
8
  export declare const expandHex: (hex: string) => string;
2
9
  /**
3
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"colorUtils.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/colorUtils.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,QAAS,MAAM,WAKpC,CAAC;AAWF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,eAClB,MAAM,wFAoBnB,CAAC"}
1
+ {"version":3,"file":"colorUtils.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/colorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAS,MAAM,kCAAkC,CAAC;AAGrE;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,sBAKpD;AAGD,eAAO,MAAM,SAAS,QAAS,MAAM,WAKpC,CAAC;AAWF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,eAClB,MAAM,wFAqBnB,CAAC"}
@@ -3,9 +3,21 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.pickForegroundColor = exports.expandHex = void 0;
6
+ exports.pickForegroundColor = exports.expandHex = exports.getColor = void 0;
7
7
  var tokens_1 = require("@workday/canvas-kit-react/tokens");
8
8
  var chroma_js_1 = __importDefault(require("chroma-js"));
9
+ /**
10
+ * The function takes in a color string or an enum value of CanvasColor and returns its hex value color.
11
+ * @param value a string or an enum value of CanvasColor
12
+ * @returns the hex value color
13
+ */
14
+ function getColor(value) {
15
+ if (value in tokens_1.colors) {
16
+ return tokens_1.colors[value];
17
+ }
18
+ return value;
19
+ }
20
+ exports.getColor = getColor;
9
21
  // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
10
22
  var expandHex = function (hex) {
11
23
  var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
@@ -31,17 +43,18 @@ var colorPriority = [
31
43
  * (https://www.w3.org/TR/WCAG20-TECHS/G18.html)
32
44
  */
33
45
  var pickForegroundColor = function (background, darkColor, lightColor) {
34
- if (chroma_js_1.default.valid(background)) {
35
- if (lightColor && chroma_js_1.default.contrast(background, lightColor) >= 4.5) {
36
- return lightColor;
46
+ var _a = [getColor(background), getColor(darkColor), getColor(lightColor)], bg = _a[0], dark = _a[1], light = _a[2];
47
+ if (bg && chroma_js_1.default.valid(bg)) {
48
+ if (light && chroma_js_1.default.contrast(bg, light) >= 4.5) {
49
+ return light;
37
50
  }
38
- else if (darkColor && chroma_js_1.default.contrast(background, darkColor) >= 4.5) {
39
- return darkColor;
51
+ else if (dark && chroma_js_1.default.contrast(bg, dark) >= 4.5) {
52
+ return dark;
40
53
  }
41
54
  else {
42
55
  for (var i = 0; i < colorPriority.length; i++) {
43
56
  var color = colorPriority[i];
44
- if (chroma_js_1.default.contrast(background, color) >= 4.5) {
57
+ if (chroma_js_1.default.contrast(bg, color) >= 4.5) {
45
58
  return color;
46
59
  }
47
60
  }
@@ -1,19 +1,20 @@
1
1
  import { CanvasAccentIcon } from '@workday/design-assets-types';
2
2
  import { CSSObject } from '@emotion/styled';
3
3
  import { IconProps } from './Icon';
4
+ import { SystemPropValues } from '@workday/canvas-kit-react/layout';
4
5
  export interface AccentIconStyles {
5
6
  /**
6
7
  * The fill color of the AccentIcon.
7
8
  * @default colors.blueberry500
8
9
  */
9
- color?: string;
10
+ color?: SystemPropValues['color'];
10
11
  /**
11
12
  * If true, set the background fill of the AccentIcon to `transparent`. If false, set the background fill of the AccentIcon to `colors.frenchVanilla100`.
12
13
  * @default false
13
14
  */
14
15
  transparent?: boolean;
15
16
  }
16
- export interface AccentIconProps extends AccentIconStyles, Omit<IconProps, 'src' | 'type' | 'color'> {
17
+ export interface AccentIconProps extends AccentIconStyles, Omit<IconProps, 'src' | 'type'> {
17
18
  /**
18
19
  * The icon to display from `@workday/canvas-accent-icons-web`.
19
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AccentIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AccentIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAO,SAAS,EAAC,MAAM,QAAQ,CAAC;AAGvC,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3C;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB,4BAG1B,gBAAgB,KAAG,SAOpB,CAAC;AAEH,eAAO,MAAM,UAAU,sFAoBrB,CAAC"}
1
+ {"version":3,"file":"AccentIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AccentIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAO,SAAS,EAAC,MAAM,QAAQ,CAAC;AAEvC,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;IACxF;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB,4BAG1B,gBAAgB,KAAG,SAOpB,CAAC;AAEH,eAAO,MAAM,UAAU,sFAoBrB,CAAC"}
@@ -51,7 +51,7 @@ var accentIconStyles = function (_a) {
51
51
  var _b = _a.color, color = _b === void 0 ? tokens_1.colors.blueberry500 : _b, _c = _a.transparent, transparent = _c === void 0 ? false : _c;
52
52
  return ({
53
53
  '& .color-500': {
54
- fill: color,
54
+ fill: common_1.getColor(color),
55
55
  },
56
56
  '& .french-vanilla-100': {
57
57
  fill: transparent ? 'transparent' : tokens_1.colors.frenchVanilla100,
@@ -1 +1 @@
1
- {"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAO,SAAS,EAAC,MAAM,QAAQ,CAAC;AAGvC,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACxC;;;OAGG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC;;;OAGG;IACH,eAAe,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC5C;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAC1C;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAEH,eAAO,MAAM,UAAU,sFA4CrB,CAAC"}
1
+ {"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAO,SAAS,EAAC,MAAM,QAAQ,CAAC;AAEvC,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACxC;;;OAGG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC;;;OAGG;IACH,eAAe,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC5C;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAC1C;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAEH,eAAO,MAAM,UAAU,sFA4CrB,CAAC"}
@@ -47,27 +47,26 @@ var tokens_1 = require("@workday/canvas-kit-react/tokens");
47
47
  var design_assets_types_1 = require("@workday/design-assets-types");
48
48
  var Icon_1 = require("./Icon");
49
49
  var common_1 = require("@workday/canvas-kit-react/common");
50
- var utils_1 = require("./utils");
51
50
  var systemIconStyles = function (_a) {
52
51
  var accent = _a.accent, accentHover = _a.accentHover, _b = _a.background, background = _b === void 0 ? 'transparent' : _b, _c = _a.backgroundHover, backgroundHover = _c === void 0 ? 'transparent' : _c, _d = _a.color, color = _d === void 0 ? tokens_1.iconColors.standard : _d, _e = _a.colorHover, colorHover = _e === void 0 ? tokens_1.iconColors.hover : _e, fill = _a.fill, fillHover = _a.fillHover;
53
52
  return ({
54
53
  '& .wd-icon-fill': {
55
- fill: utils_1.getColor(fill) || utils_1.getColor(color),
54
+ fill: common_1.getColor(fill) || common_1.getColor(color),
56
55
  },
57
56
  ':hover .wd-icon-fill': {
58
- fill: utils_1.getColor(fillHover) || utils_1.getColor(colorHover),
57
+ fill: common_1.getColor(fillHover) || common_1.getColor(colorHover),
59
58
  },
60
59
  '& .wd-icon-accent, & .wd-icon-accent2': {
61
- fill: utils_1.getColor(accent) || utils_1.getColor(color),
60
+ fill: common_1.getColor(accent) || common_1.getColor(color),
62
61
  },
63
62
  ':hover .wd-icon-accent, :hover .wd-icon-accent2': {
64
- fill: utils_1.getColor(accentHover) || utils_1.getColor(colorHover),
63
+ fill: common_1.getColor(accentHover) || common_1.getColor(colorHover),
65
64
  },
66
65
  '& .wd-icon-background': {
67
- fill: utils_1.getColor(background),
66
+ fill: common_1.getColor(background),
68
67
  },
69
68
  ':hover .wd-icon-background': {
70
- fill: utils_1.getColor(backgroundHover),
69
+ fill: common_1.getColor(backgroundHover),
71
70
  },
72
71
  });
73
72
  };
@@ -1,5 +1,6 @@
1
1
  import { SystemIconProps } from './SystemIcon';
2
2
  import { CanvasSystemIcon } from '@workday/design-assets-types';
3
+ import { SystemPropValues } from '@workday/canvas-kit-react/layout';
3
4
  export declare enum SystemIconCircleSize {
4
5
  xs = 16,
5
6
  s = 24,
@@ -13,7 +14,7 @@ export interface SystemIconCircleProps extends Pick<SystemIconProps, 'shouldMirr
13
14
  * The background color of the SystemIconCircle from `@workday/canvas-colors-web`.
14
15
  * @default colors.soap300
15
16
  */
16
- background?: string;
17
+ background?: SystemPropValues['color'];
17
18
  /**
18
19
  * The icon to display from `@workday/canvas-accent-icons-web`.
19
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SystemIconCircle.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIconCircle.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,eAAe,EAAC,MAAM,cAAc,CAAC;AACzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,oBAAY,oBAAoB;IAC9B,EAAE,KAAK;IACP,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,EAAE,KAAK;IACP,GAAG,MAAM;CACV;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC;IAClF;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAAC;CACtC;AA4BD,eAAO,MAAM,gBAAgB,4FA8B3B,CAAC"}
1
+ {"version":3,"file":"SystemIconCircle.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIconCircle.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,eAAe,EAAC,MAAM,cAAc,CAAC;AACzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAElE,oBAAY,oBAAoB;IAC9B,EAAE,KAAK;IACP,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,EAAE,KAAK;IACP,GAAG,MAAM;CACV;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC;IAClF;;;OAGG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAAC;CACtC;AA4BD,eAAO,MAAM,gBAAgB,4FA8B3B,CAAC"}
@@ -78,7 +78,7 @@ var Container = styled_1.default('div', {
78
78
  }, function (_a) {
79
79
  var background = _a.background;
80
80
  return ({
81
- background: background,
81
+ background: common_1.getColor(background),
82
82
  });
83
83
  }, function (_a) {
84
84
  var size = _a.size;
@@ -1,5 +1,3 @@
1
1
  import { CanvasIcon, CanvasIconTypes } from '@workday/design-assets-types';
2
- import { CanvasColor } from '@workday/canvas-kit-react/tokens';
3
2
  export declare function validateIconType(icon: CanvasIcon, expectedType: CanvasIconTypes): void;
4
- export declare function getColor(value?: CanvasColor | string): string | undefined;
5
3
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../icon/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAC,WAAW,EAAS,MAAM,kCAAkC,CAAC;AAErE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,QAI/E;AAED,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,sBAKpD"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../icon/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAEzE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,QAI/E"}
@@ -1,17 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getColor = exports.validateIconType = void 0;
4
- var tokens_1 = require("@workday/canvas-kit-react/tokens");
3
+ exports.validateIconType = void 0;
5
4
  function validateIconType(icon, expectedType) {
6
5
  if (icon.type !== expectedType) {
7
6
  throw icon.name + ": Icon type \"" + icon.type + "\" does not match expected type \"" + expectedType + "\"";
8
7
  }
9
8
  }
10
9
  exports.validateIconType = validateIconType;
11
- function getColor(value) {
12
- if (value in tokens_1.colors) {
13
- return tokens_1.colors[value];
14
- }
15
- return value;
16
- }
17
- exports.getColor = getColor;
@@ -28,6 +28,10 @@ export declare type PositionStyleProps = {
28
28
  * - no bidirectional support
29
29
  * */
30
30
  left?: number | string;
31
+ /**
32
+ * - sets [CSS inset property](https://developer.mozilla.org/en-US/docs/Web/CSS/inset)
33
+ */
34
+ inset?: number | string;
31
35
  /**
32
36
  * - sets [CSS inset-inline-start property](https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline-start)
33
37
  * - bidirectional support
@@ -1 +1 @@
1
- {"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAkC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE/E,iDAAiD;AACjD,oBAAY,kBAAkB,GAAG;IAC/B;;SAEK;IACL,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC7B;;SAEK;IACL,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC;IACzB;;SAEK;IACL,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB;;;SAGK;IACL,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;SAEK;IACL,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;SAGK;IACL,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;SAGK;IACL,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC;;;SAGK;IACL,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,aAAa,EAyCjD,CAAC;AAEF,eAAO,MAAM,gBAAgB,oCAAwC,CAAC;AACtE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,mCAAyD,CAAC"}
1
+ {"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAkC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE/E,iDAAiD;AACjD,oBAAY,kBAAkB,GAAG;IAC/B;;SAEK;IACL,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC7B;;SAEK;IACL,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC;IACzB;;SAEK;IACL,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB;;;SAGK;IACL,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;SAEK;IACL,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;SAGK;IACL,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;SAGK;IACL,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC;;;SAGK;IACL,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,aAAa,EA8CjD,CAAC;AAEF,eAAO,MAAM,gBAAgB,oCAAwC,CAAC;AACtE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,mCAAyD,CAAC"}
@@ -33,6 +33,11 @@ exports.positionStyleFnConfigs = [
33
33
  properties: ['left'],
34
34
  system: 'none',
35
35
  },
36
+ {
37
+ name: 'inset',
38
+ properties: ['inset'],
39
+ system: 'none',
40
+ },
36
41
  {
37
42
  name: 'insetInlineStart',
38
43
  properties: ['insetInlineStart'],
@@ -53,7 +53,7 @@ export interface TabsItemProps extends ExtractProps<typeof Box, never>, Partial<
53
53
  */
54
54
  tabIndex?: number;
55
55
  }
56
- export declare const StyledTabItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
56
+ export declare const StyledTabItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
57
57
  ref?: React.Ref<HTMLButtonElement> | undefined;
58
58
  } & {
59
59
  theme?: import("@emotion/react").Theme | undefined;
@@ -1,3 +1,10 @@
1
+ import { CanvasColor } from '@workday/canvas-kit-react/tokens';
2
+ /**
3
+ * The function takes in a color string or an enum value of CanvasColor and returns its hex value color.
4
+ * @param value a string or an enum value of CanvasColor
5
+ * @returns the hex value color
6
+ */
7
+ export declare function getColor(value?: CanvasColor | string): string | undefined;
1
8
  export declare const expandHex: (hex: string) => string;
2
9
  /**
3
10
  *
@@ -1 +1 @@
1
- {"version":3,"file":"colorUtils.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/colorUtils.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,SAAS,QAAS,MAAM,WAKpC,CAAC;AAWF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,eAClB,MAAM,wFAoBnB,CAAC"}
1
+ {"version":3,"file":"colorUtils.d.ts","sourceRoot":"","sources":["../../../../../common/lib/utils/colorUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAS,MAAM,kCAAkC,CAAC;AAGrE;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,sBAKpD;AAGD,eAAO,MAAM,SAAS,QAAS,MAAM,WAKpC,CAAC;AAWF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,eAClB,MAAM,wFAqBnB,CAAC"}
@@ -1,5 +1,16 @@
1
1
  import { colors } from '@workday/canvas-kit-react/tokens';
2
2
  import chroma from 'chroma-js';
3
+ /**
4
+ * The function takes in a color string or an enum value of CanvasColor and returns its hex value color.
5
+ * @param value a string or an enum value of CanvasColor
6
+ * @returns the hex value color
7
+ */
8
+ export function getColor(value) {
9
+ if (value in colors) {
10
+ return colors[value];
11
+ }
12
+ return value;
13
+ }
3
14
  // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")
4
15
  export var expandHex = function (hex) {
5
16
  var shorthandRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
@@ -24,17 +35,18 @@ var colorPriority = [
24
35
  * (https://www.w3.org/TR/WCAG20-TECHS/G18.html)
25
36
  */
26
37
  export var pickForegroundColor = function (background, darkColor, lightColor) {
27
- if (chroma.valid(background)) {
28
- if (lightColor && chroma.contrast(background, lightColor) >= 4.5) {
29
- return lightColor;
38
+ var _a = [getColor(background), getColor(darkColor), getColor(lightColor)], bg = _a[0], dark = _a[1], light = _a[2];
39
+ if (bg && chroma.valid(bg)) {
40
+ if (light && chroma.contrast(bg, light) >= 4.5) {
41
+ return light;
30
42
  }
31
- else if (darkColor && chroma.contrast(background, darkColor) >= 4.5) {
32
- return darkColor;
43
+ else if (dark && chroma.contrast(bg, dark) >= 4.5) {
44
+ return dark;
33
45
  }
34
46
  else {
35
47
  for (var i = 0; i < colorPriority.length; i++) {
36
48
  var color = colorPriority[i];
37
- if (chroma.contrast(background, color) >= 4.5) {
49
+ if (chroma.contrast(bg, color) >= 4.5) {
38
50
  return color;
39
51
  }
40
52
  }
@@ -1,19 +1,20 @@
1
1
  import { CanvasAccentIcon } from '@workday/design-assets-types';
2
2
  import { CSSObject } from '@emotion/styled';
3
3
  import { IconProps } from './Icon';
4
+ import { SystemPropValues } from '@workday/canvas-kit-react/layout';
4
5
  export interface AccentIconStyles {
5
6
  /**
6
7
  * The fill color of the AccentIcon.
7
8
  * @default colors.blueberry500
8
9
  */
9
- color?: string;
10
+ color?: SystemPropValues['color'];
10
11
  /**
11
12
  * If true, set the background fill of the AccentIcon to `transparent`. If false, set the background fill of the AccentIcon to `colors.frenchVanilla100`.
12
13
  * @default false
13
14
  */
14
15
  transparent?: boolean;
15
16
  }
16
- export interface AccentIconProps extends AccentIconStyles, Omit<IconProps, 'src' | 'type' | 'color'> {
17
+ export interface AccentIconProps extends AccentIconStyles, Omit<IconProps, 'src' | 'type'> {
17
18
  /**
18
19
  * The icon to display from `@workday/canvas-accent-icons-web`.
19
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"AccentIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AccentIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAO,SAAS,EAAC,MAAM,QAAQ,CAAC;AAGvC,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3C;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB,4BAG1B,gBAAgB,KAAG,SAOpB,CAAC;AAEH,eAAO,MAAM,UAAU,sFAoBrB,CAAC"}
1
+ {"version":3,"file":"AccentIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/AccentIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAO,SAAS,EAAC,MAAM,QAAQ,CAAC;AAEvC,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB,EAAE,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,MAAM,CAAC;IACxF;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,gBAAgB,4BAG1B,gBAAgB,KAAG,SAOpB,CAAC;AAEH,eAAO,MAAM,UAAU,sFAoBrB,CAAC"}
@@ -24,12 +24,12 @@ import * as React from 'react';
24
24
  import { colors } from '@workday/canvas-kit-react/tokens';
25
25
  import { CanvasIconTypes } from '@workday/design-assets-types';
26
26
  import { Icon } from './Icon';
27
- import { createComponent } from '@workday/canvas-kit-react/common';
27
+ import { createComponent, getColor } from '@workday/canvas-kit-react/common';
28
28
  export var accentIconStyles = function (_a) {
29
29
  var _b = _a.color, color = _b === void 0 ? colors.blueberry500 : _b, _c = _a.transparent, transparent = _c === void 0 ? false : _c;
30
30
  return ({
31
31
  '& .color-500': {
32
- fill: color,
32
+ fill: getColor(color),
33
33
  },
34
34
  '& .french-vanilla-100': {
35
35
  fill: transparent ? 'transparent' : colors.frenchVanilla100,
@@ -1 +1 @@
1
- {"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAO,SAAS,EAAC,MAAM,QAAQ,CAAC;AAGvC,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACxC;;;OAGG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC;;;OAGG;IACH,eAAe,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC5C;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAC1C;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAEH,eAAO,MAAM,UAAU,sFA4CrB,CAAC"}
1
+ {"version":3,"file":"SystemIcon.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,gBAAgB,EAAkB,MAAM,8BAA8B,CAAC;AAC/E,OAAO,EAAC,SAAS,EAAC,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAO,SAAS,EAAC,MAAM,QAAQ,CAAC;AAEvC,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAElE,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACnC;;OAEG;IACH,WAAW,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACxC;;;OAGG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC;;;OAGG;IACH,eAAe,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAC5C;;;OAGG;IACH,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC;;;OAGG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACjC;;OAEG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,eACf,SAAQ,gBAAgB,EACtB,IAAI,CAAC,SAAS,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;IAC1C;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACpC;AAED,eAAO,MAAM,gBAAgB,8FAS1B,gBAAgB,KAAG,SAmBpB,CAAC;AAEH,eAAO,MAAM,UAAU,sFA4CrB,CAAC"}
@@ -24,8 +24,7 @@ import * as React from 'react';
24
24
  import { iconColors } from '@workday/canvas-kit-react/tokens';
25
25
  import { CanvasIconTypes } from '@workday/design-assets-types';
26
26
  import { Icon } from './Icon';
27
- import { createComponent } from '@workday/canvas-kit-react/common';
28
- import { getColor } from './utils';
27
+ import { createComponent, getColor } from '@workday/canvas-kit-react/common';
29
28
  export var systemIconStyles = function (_a) {
30
29
  var accent = _a.accent, accentHover = _a.accentHover, _b = _a.background, background = _b === void 0 ? 'transparent' : _b, _c = _a.backgroundHover, backgroundHover = _c === void 0 ? 'transparent' : _c, _d = _a.color, color = _d === void 0 ? iconColors.standard : _d, _e = _a.colorHover, colorHover = _e === void 0 ? iconColors.hover : _e, fill = _a.fill, fillHover = _a.fillHover;
31
30
  return ({
@@ -1,5 +1,6 @@
1
1
  import { SystemIconProps } from './SystemIcon';
2
2
  import { CanvasSystemIcon } from '@workday/design-assets-types';
3
+ import { SystemPropValues } from '@workday/canvas-kit-react/layout';
3
4
  export declare enum SystemIconCircleSize {
4
5
  xs = 16,
5
6
  s = 24,
@@ -13,7 +14,7 @@ export interface SystemIconCircleProps extends Pick<SystemIconProps, 'shouldMirr
13
14
  * The background color of the SystemIconCircle from `@workday/canvas-colors-web`.
14
15
  * @default colors.soap300
15
16
  */
16
- background?: string;
17
+ background?: SystemPropValues['color'];
17
18
  /**
18
19
  * The icon to display from `@workday/canvas-accent-icons-web`.
19
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"SystemIconCircle.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIconCircle.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,eAAe,EAAC,MAAM,cAAc,CAAC;AACzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAG9D,oBAAY,oBAAoB;IAC9B,EAAE,KAAK;IACP,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,EAAE,KAAK;IACP,GAAG,MAAM;CACV;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC;IAClF;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAAC;CACtC;AA4BD,eAAO,MAAM,gBAAgB,4FA8B3B,CAAC"}
1
+ {"version":3,"file":"SystemIconCircle.d.ts","sourceRoot":"","sources":["../../../../icon/lib/SystemIconCircle.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,eAAe,EAAC,MAAM,cAAc,CAAC;AACzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,8BAA8B,CAAC;AAE9D,OAAO,EAAC,gBAAgB,EAAC,MAAM,kCAAkC,CAAC;AAElE,oBAAY,oBAAoB;IAC9B,EAAE,KAAK;IACP,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,EAAE,KAAK;IACP,GAAG,MAAM;CACV;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,eAAe,EAAE,cAAc,CAAC;IAClF;;;OAGG;IACH,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC;;OAEG;IACH,IAAI,EAAE,gBAAgB,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,oBAAoB,GAAG,MAAM,CAAC;CACtC;AA4BD,eAAO,MAAM,gBAAgB,4FA8B3B,CAAC"}
@@ -25,7 +25,7 @@ import styled from '@emotion/styled';
25
25
  import isPropValid from '@emotion/is-prop-valid';
26
26
  import { colors, borderRadius } from '@workday/canvas-kit-react/tokens';
27
27
  import { SystemIcon } from './SystemIcon';
28
- import { createComponent, pickForegroundColor } from '@workday/canvas-kit-react/common';
28
+ import { createComponent, getColor, pickForegroundColor } from '@workday/canvas-kit-react/common';
29
29
  export var SystemIconCircleSize;
30
30
  (function (SystemIconCircleSize) {
31
31
  SystemIconCircleSize[SystemIconCircleSize["xs"] = 16] = "xs";
@@ -53,7 +53,7 @@ var Container = styled('div', {
53
53
  }, function (_a) {
54
54
  var background = _a.background;
55
55
  return ({
56
- background: background,
56
+ background: getColor(background),
57
57
  });
58
58
  }, function (_a) {
59
59
  var size = _a.size;
@@ -1,5 +1,3 @@
1
1
  import { CanvasIcon, CanvasIconTypes } from '@workday/design-assets-types';
2
- import { CanvasColor } from '@workday/canvas-kit-react/tokens';
3
2
  export declare function validateIconType(icon: CanvasIcon, expectedType: CanvasIconTypes): void;
4
- export declare function getColor(value?: CanvasColor | string): string | undefined;
5
3
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../icon/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAC,WAAW,EAAS,MAAM,kCAAkC,CAAC;AAErE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,QAI/E;AAED,wBAAgB,QAAQ,CAAC,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,sBAKpD"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../icon/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,eAAe,EAAC,MAAM,8BAA8B,CAAC;AAEzE,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,QAI/E"}
@@ -1,12 +1,5 @@
1
- import { colors } from '@workday/canvas-kit-react/tokens';
2
1
  export function validateIconType(icon, expectedType) {
3
2
  if (icon.type !== expectedType) {
4
3
  throw icon.name + ": Icon type \"" + icon.type + "\" does not match expected type \"" + expectedType + "\"";
5
4
  }
6
5
  }
7
- export function getColor(value) {
8
- if (value in colors) {
9
- return colors[value];
10
- }
11
- return value;
12
- }
@@ -28,6 +28,10 @@ export declare type PositionStyleProps = {
28
28
  * - no bidirectional support
29
29
  * */
30
30
  left?: number | string;
31
+ /**
32
+ * - sets [CSS inset property](https://developer.mozilla.org/en-US/docs/Web/CSS/inset)
33
+ */
34
+ inset?: number | string;
31
35
  /**
32
36
  * - sets [CSS inset-inline-start property](https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline-start)
33
37
  * - bidirectional support
@@ -1 +1 @@
1
- {"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAkC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE/E,iDAAiD;AACjD,oBAAY,kBAAkB,GAAG;IAC/B;;SAEK;IACL,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC7B;;SAEK;IACL,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC;IACzB;;SAEK;IACL,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB;;;SAGK;IACL,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;SAEK;IACL,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;SAGK;IACL,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;;SAGK;IACL,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC;;;SAGK;IACL,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,aAAa,EAyCjD,CAAC;AAEF,eAAO,MAAM,gBAAgB,oCAAwC,CAAC;AACtE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,mCAAyD,CAAC"}
1
+ {"version":3,"file":"position.d.ts","sourceRoot":"","sources":["../../../../../layout/lib/utils/position.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,SAAS,CAAC;AAEjC,OAAO,EAAkC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAE/E,iDAAiD;AACjD,oBAAY,kBAAkB,GAAG;IAC/B;;SAEK;IACL,QAAQ,CAAC,EAAE,QAAQ,CAAC,QAAQ,CAAC;IAC7B;;SAEK;IACL,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC;IACzB;;SAEK;IACL,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB;;;SAGK;IACL,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;SAEK;IACL,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;SAGK;IACL,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;SAGK;IACL,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACnC;;;SAGK;IACL,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,aAAa,EA8CjD,CAAC;AAEF,eAAO,MAAM,gBAAgB,oCAAwC,CAAC;AACtE;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,QAAQ,mCAAyD,CAAC"}
@@ -30,6 +30,11 @@ export var positionStyleFnConfigs = [
30
30
  properties: ['left'],
31
31
  system: 'none',
32
32
  },
33
+ {
34
+ name: 'inset',
35
+ properties: ['inset'],
36
+ system: 'none',
37
+ },
33
38
  {
34
39
  name: 'insetInlineStart',
35
40
  properties: ['insetInlineStart'],
@@ -53,7 +53,7 @@ export interface TabsItemProps extends ExtractProps<typeof Box, never>, Partial<
53
53
  */
54
54
  tabIndex?: number;
55
55
  }
56
- export declare const StyledTabItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
56
+ export declare const StyledTabItem: import("@emotion/styled").StyledComponent<import("@workday/canvas-kit-react/layout").BackgroundStyleProps & import("../../layout/lib/utils/border/color").BorderColorStyleProps & import("../../layout/lib/utils/border/lineStyle").BorderLineStyleProps & import("../../layout/lib/utils/border/radius").BorderRadiusStyleProps & import("../../layout/lib/utils/border/shorthand").BorderShorthandStyleProps & import("../../layout/lib/utils/border/width").BorderWidthStyleProps & import("@workday/canvas-kit-react/layout").ColorStyleProps & import("@workday/canvas-kit-react/layout").DepthStyleProps & import("@workday/canvas-kit-react/layout").FlexItemStyleProps & import("@workday/canvas-kit-react/layout").GridItemStyleProps & import("@workday/canvas-kit-react/layout").LayoutStyleProps & import("@workday/canvas-kit-react/layout").OtherStyleProps & import("@workday/canvas-kit-react/layout").PositionStyleProps & import("@workday/canvas-kit-react/layout").SpaceStyleProps & import("@workday/canvas-kit-react/layout").TextStyleProps & Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "left" | "right" | "top" | "bottom" | "fill" | "as" | "color" | "resize" | "width" | "height" | "alignSelf" | "appearance" | "backgroundAttachment" | "backgroundColor" | "backgroundImage" | "backgroundRepeat" | "backgroundSize" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderCollapse" | "borderInlineEndColor" | "borderInlineEndStyle" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartStyle" | "borderInlineStartWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderSpacing" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "boxShadow" | "boxSizing" | "content" | "cursor" | "display" | "flexBasis" | "flexGrow" | "flexShrink" | "float" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "gridColumnEnd" | "gridColumnStart" | "gridRowEnd" | "gridRowStart" | "inset" | "insetInlineEnd" | "insetInlineStart" | "justifySelf" | "letterSpacing" | "lineHeight" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "objectFit" | "objectPosition" | "opacity" | "order" | "outlineOffset" | "overflowWrap" | "overflowX" | "overflowY" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "pointerEvents" | "position" | "textAlign" | "textOverflow" | "textShadow" | "textTransform" | "transform" | "userSelect" | "verticalAlign" | "visibility" | "whiteSpace" | "wordBreak" | "zIndex" | "animation" | "background" | "backgroundPosition" | "border" | "borderBottom" | "borderColor" | "borderInlineEnd" | "borderInlineStart" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "flex" | "gridArea" | "gridColumn" | "gridRow" | "listStyle" | "margin" | "outline" | "overflow" | "padding" | "placeSelf" | "textDecoration" | "transition" | "stroke" | "depth" | "marginX" | "marginY" | "paddingX" | "paddingY"> & {
57
57
  ref?: React.Ref<HTMLButtonElement> | undefined;
58
58
  } & {
59
59
  theme?: import("@emotion/react").Theme | undefined;
@@ -3,14 +3,15 @@ import {colors} from '@workday/canvas-kit-react/tokens';
3
3
  import {CanvasAccentIcon, CanvasIconTypes} from '@workday/design-assets-types';
4
4
  import {CSSObject} from '@emotion/styled';
5
5
  import {Icon, IconProps} from './Icon';
6
- import {createComponent} from '@workday/canvas-kit-react/common';
6
+ import {createComponent, getColor} from '@workday/canvas-kit-react/common';
7
+ import {SystemPropValues} from '@workday/canvas-kit-react/layout';
7
8
 
8
9
  export interface AccentIconStyles {
9
10
  /**
10
11
  * The fill color of the AccentIcon.
11
12
  * @default colors.blueberry500
12
13
  */
13
- color?: string;
14
+ color?: SystemPropValues['color'];
14
15
  /**
15
16
  * If true, set the background fill of the AccentIcon to `transparent`. If false, set the background fill of the AccentIcon to `colors.frenchVanilla100`.
16
17
  * @default false
@@ -18,9 +19,7 @@ export interface AccentIconStyles {
18
19
  transparent?: boolean;
19
20
  }
20
21
 
21
- export interface AccentIconProps
22
- extends AccentIconStyles,
23
- Omit<IconProps, 'src' | 'type' | 'color'> {
22
+ export interface AccentIconProps extends AccentIconStyles, Omit<IconProps, 'src' | 'type'> {
24
23
  /**
25
24
  * The icon to display from `@workday/canvas-accent-icons-web`.
26
25
  */
@@ -37,7 +36,7 @@ export const accentIconStyles = ({
37
36
  transparent = false,
38
37
  }: AccentIconStyles): CSSObject => ({
39
38
  '& .color-500': {
40
- fill: color,
39
+ fill: getColor(color),
41
40
  },
42
41
  '& .french-vanilla-100': {
43
42
  fill: transparent ? 'transparent' : colors.frenchVanilla100,
@@ -3,8 +3,7 @@ import {iconColors} from '@workday/canvas-kit-react/tokens';
3
3
  import {CanvasSystemIcon, CanvasIconTypes} from '@workday/design-assets-types';
4
4
  import {CSSObject} from '@emotion/styled';
5
5
  import {Icon, IconProps} from './Icon';
6
- import {createComponent} from '@workday/canvas-kit-react/common';
7
- import {getColor} from './utils';
6
+ import {createComponent, getColor} from '@workday/canvas-kit-react/common';
8
7
  import {SystemPropValues} from '@workday/canvas-kit-react/layout';
9
8
 
10
9
  export interface SystemIconStyles {
@@ -4,7 +4,8 @@ import isPropValid from '@emotion/is-prop-valid';
4
4
  import {colors, borderRadius} from '@workday/canvas-kit-react/tokens';
5
5
  import {SystemIcon, SystemIconProps} from './SystemIcon';
6
6
  import {CanvasSystemIcon} from '@workday/design-assets-types';
7
- import {createComponent, pickForegroundColor} from '@workday/canvas-kit-react/common';
7
+ import {createComponent, getColor, pickForegroundColor} from '@workday/canvas-kit-react/common';
8
+ import {SystemPropValues} from '@workday/canvas-kit-react/layout';
8
9
 
9
10
  export enum SystemIconCircleSize {
10
11
  xs = 16,
@@ -20,7 +21,7 @@ export interface SystemIconCircleProps extends Pick<SystemIconProps, 'shouldMirr
20
21
  * The background color of the SystemIconCircle from `@workday/canvas-colors-web`.
21
22
  * @default colors.soap300
22
23
  */
23
- background?: string;
24
+ background?: SystemPropValues['color'];
24
25
  /**
25
26
  * The icon to display from `@workday/canvas-accent-icons-web`.
26
27
  */
@@ -50,7 +51,7 @@ const Container = styled('div', {
50
51
  },
51
52
  },
52
53
  ({background}) => ({
53
- background: background,
54
+ background: getColor(background),
54
55
  }),
55
56
  ({size}) => ({
56
57
  width: size,
package/icon/lib/utils.ts CHANGED
@@ -1,15 +1,7 @@
1
1
  import {CanvasIcon, CanvasIconTypes} from '@workday/design-assets-types';
2
- import {CanvasColor, colors} from '@workday/canvas-kit-react/tokens';
3
2
 
4
3
  export function validateIconType(icon: CanvasIcon, expectedType: CanvasIconTypes) {
5
4
  if (icon.type !== expectedType) {
6
5
  throw `${icon.name}: Icon type "${icon.type}" does not match expected type "${expectedType}"`;
7
6
  }
8
7
  }
9
-
10
- export function getColor(value?: CanvasColor | string) {
11
- if (value! in colors) {
12
- return colors[value as keyof typeof colors];
13
- }
14
- return value;
15
- }
@@ -30,6 +30,10 @@ export type PositionStyleProps = {
30
30
  * - no bidirectional support
31
31
  * */
32
32
  left?: number | string;
33
+ /**
34
+ * - sets [CSS inset property](https://developer.mozilla.org/en-US/docs/Web/CSS/inset)
35
+ */
36
+ inset?: number | string;
33
37
  /**
34
38
  * - sets [CSS inset-inline-start property](https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline-start)
35
39
  * - bidirectional support
@@ -73,6 +77,11 @@ export const positionStyleFnConfigs: StyleFnConfig[] = [
73
77
  properties: ['left'],
74
78
  system: 'none',
75
79
  },
80
+ {
81
+ name: 'inset',
82
+ properties: ['inset'],
83
+ system: 'none',
84
+ },
76
85
  {
77
86
  name: 'insetInlineStart',
78
87
  properties: ['insetInlineStart'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-react",
3
- "version": "8.5.12",
3
+ "version": "8.6.0-383-next.0+b7523570",
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": "^8.5.12",
52
+ "@workday/canvas-kit-popup-stack": "^8.6.0-383-next.0+b7523570",
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",
@@ -67,5 +67,5 @@
67
67
  "@workday/canvas-accent-icons-web": "^3.0.0",
68
68
  "@workday/canvas-applet-icons-web": "^2.0.0"
69
69
  },
70
- "gitHead": "e2acfd4c141af475f6914c9b0c698aad3fc490a9"
70
+ "gitHead": "b7523570240321d6c5d65619c0a7615e4c51bee8"
71
71
  }