@workday/canvas-kit-styling 16.0.0-alpha.0494-next.0 → 16.0.0-alpha.0500-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.
@@ -44,16 +44,10 @@ export interface InteractiveStateProps {
44
44
  * @default 'accent'
45
45
  */
46
46
  colorType?: 'accent' | 'surface';
47
- /**
48
- * A string that will determine which surface overlay variant to use.
49
- *
50
- * @default 'default'
51
- */
52
- surfaceType?: 'default' | 'inverse';
53
47
  }
54
48
  export declare const colorSpace: {
55
49
  darken: ({ color, fallback, mixinColor, mixinValue }: DarkenProps) => string;
56
- hover: ({ color, fallback, colorType, surfaceType, }: InteractiveStateProps) => string;
57
- pressed: ({ color, fallback, colorType, surfaceType, }: InteractiveStateProps) => string;
50
+ hover: ({ color, fallback, colorType }: InteractiveStateProps) => string;
51
+ pressed: ({ color, fallback, colorType }: InteractiveStateProps) => string;
58
52
  };
59
53
  //# sourceMappingURL=colorSpace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"colorSpace.d.ts","sourceRoot":"","sources":["../../../lib/colorSpace.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAcvE;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAiCD,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACrC;AA4ED,eAAO,MAAM,UAAU;0DAxGoC,WAAW;0DAgDnE,qBAAqB;4DAyCrB,qBAAqB;CAmBvB,CAAC"}
1
+ {"version":3,"file":"colorSpace.d.ts","sourceRoot":"","sources":["../../../lib/colorSpace.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAcvE;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAiCD,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAClC;AAsDD,eAAO,MAAM,UAAU;0DA5EoC,WAAW;4CAqCd,qBAAqB;8CA8BnB,qBAAqB;CAa9E,CAAC"}
@@ -66,16 +66,11 @@ const darken = ({ color, fallback, mixinColor, mixinValue }) => {
66
66
  * - `colorType`: A string that will determine where the mixin color and the mixin percentage comes from (i.e. `system.legacy.color.accent....` or `system.legacy.color.surface....`).
67
67
  *
68
68
  */
69
- const hover = ({ color, fallback, colorType = 'accent', surfaceType = 'default', }) => {
70
- const mixinColor = colorType === 'accent'
71
- ? canvas_tokens_web_1.system.legacy.color.accent.overlay.hover
72
- : surfaceType === 'default'
73
- ? canvas_tokens_web_1.system.legacy.color.surface.overlay.hover.default
74
- : canvas_tokens_web_1.system.legacy.color.surface.overlay.hover.inverse;
69
+ const hover = ({ color, fallback, colorType = 'accent' }) => {
75
70
  return darken({
76
71
  color: color,
77
72
  fallback: fallback,
78
- mixinColor: mixinColor,
73
+ mixinColor: canvas_tokens_web_1.system.legacy.color[colorType].overlay.mixin,
79
74
  mixinValue: canvas_tokens_web_1.system.legacy.opacity[colorType].hover,
80
75
  });
81
76
  };
@@ -100,16 +95,11 @@ const hover = ({ color, fallback, colorType = 'accent', surfaceType = 'default',
100
95
  * @param colorType
101
96
  * A string that will determine where the mixin color and the mixin percentage comes from within tokens.
102
97
  */
103
- const pressed = ({ color, fallback, colorType = 'accent', surfaceType = 'default', }) => {
104
- const mixinColor = colorType === 'accent'
105
- ? canvas_tokens_web_1.system.legacy.color.accent.overlay.pressed
106
- : surfaceType === 'default'
107
- ? canvas_tokens_web_1.system.legacy.color.surface.overlay.pressed.default
108
- : canvas_tokens_web_1.system.legacy.color.surface.overlay.pressed.inverse;
98
+ const pressed = ({ color, fallback, colorType = 'accent' }) => {
109
99
  return darken({
110
100
  color: color,
111
101
  fallback: fallback,
112
- mixinColor: mixinColor,
102
+ mixinColor: canvas_tokens_web_1.system.legacy.color[colorType].overlay.mixin,
113
103
  mixinValue: canvas_tokens_web_1.system.legacy.opacity[colorType].pressed,
114
104
  });
115
105
  };
@@ -44,16 +44,10 @@ export interface InteractiveStateProps {
44
44
  * @default 'accent'
45
45
  */
46
46
  colorType?: 'accent' | 'surface';
47
- /**
48
- * A string that will determine which surface overlay variant to use.
49
- *
50
- * @default 'default'
51
- */
52
- surfaceType?: 'default' | 'inverse';
53
47
  }
54
48
  export declare const colorSpace: {
55
49
  darken: ({ color, fallback, mixinColor, mixinValue }: DarkenProps) => string;
56
- hover: ({ color, fallback, colorType, surfaceType, }: InteractiveStateProps) => string;
57
- pressed: ({ color, fallback, colorType, surfaceType, }: InteractiveStateProps) => string;
50
+ hover: ({ color, fallback, colorType }: InteractiveStateProps) => string;
51
+ pressed: ({ color, fallback, colorType }: InteractiveStateProps) => string;
58
52
  };
59
53
  //# sourceMappingURL=colorSpace.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"colorSpace.d.ts","sourceRoot":"","sources":["../../../lib/colorSpace.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAcvE;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAiCD,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;IACjC;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACrC;AA4ED,eAAO,MAAM,UAAU;0DAxGoC,WAAW;0DAgDnE,qBAAqB;4DAyCrB,qBAAqB;CAmBvB,CAAC"}
1
+ {"version":3,"file":"colorSpace.d.ts","sourceRoot":"","sources":["../../../lib/colorSpace.tsx"],"names":[],"mappings":"AAIA;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAcvE;AAED,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAiCD,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAC;CAClC;AAsDD,eAAO,MAAM,UAAU;0DA5EoC,WAAW;4CAqCd,qBAAqB;8CA8BnB,qBAAqB;CAa9E,CAAC"}
@@ -62,16 +62,11 @@ const darken = ({ color, fallback, mixinColor, mixinValue }) => {
62
62
  * - `colorType`: A string that will determine where the mixin color and the mixin percentage comes from (i.e. `system.legacy.color.accent....` or `system.legacy.color.surface....`).
63
63
  *
64
64
  */
65
- const hover = ({ color, fallback, colorType = 'accent', surfaceType = 'default', }) => {
66
- const mixinColor = colorType === 'accent'
67
- ? system.legacy.color.accent.overlay.hover
68
- : surfaceType === 'default'
69
- ? system.legacy.color.surface.overlay.hover.default
70
- : system.legacy.color.surface.overlay.hover.inverse;
65
+ const hover = ({ color, fallback, colorType = 'accent' }) => {
71
66
  return darken({
72
67
  color: color,
73
68
  fallback: fallback,
74
- mixinColor: mixinColor,
69
+ mixinColor: system.legacy.color[colorType].overlay.mixin,
75
70
  mixinValue: system.legacy.opacity[colorType].hover,
76
71
  });
77
72
  };
@@ -96,16 +91,11 @@ const hover = ({ color, fallback, colorType = 'accent', surfaceType = 'default',
96
91
  * @param colorType
97
92
  * A string that will determine where the mixin color and the mixin percentage comes from within tokens.
98
93
  */
99
- const pressed = ({ color, fallback, colorType = 'accent', surfaceType = 'default', }) => {
100
- const mixinColor = colorType === 'accent'
101
- ? system.legacy.color.accent.overlay.pressed
102
- : surfaceType === 'default'
103
- ? system.legacy.color.surface.overlay.pressed.default
104
- : system.legacy.color.surface.overlay.pressed.inverse;
94
+ const pressed = ({ color, fallback, colorType = 'accent' }) => {
105
95
  return darken({
106
96
  color: color,
107
97
  fallback: fallback,
108
- mixinColor: mixinColor,
98
+ mixinColor: system.legacy.color[colorType].overlay.mixin,
109
99
  mixinValue: system.legacy.opacity[colorType].pressed,
110
100
  });
111
101
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workday/canvas-kit-styling",
3
- "version": "16.0.0-alpha.0494-next.0",
3
+ "version": "16.0.0-alpha.0500-next.0",
4
4
  "description": "The custom CSS in JS solution that takes JS styles and turns them into static CSS",
5
5
  "author": "Workday, Inc. (https://www.workday.com)",
6
6
  "license": "Apache-2.0",
@@ -53,9 +53,9 @@
53
53
  "@emotion/react": "^11.7.1",
54
54
  "@emotion/serialize": "^1.0.2",
55
55
  "@emotion/styled": "^11.6.0",
56
- "@workday/canvas-system-icons-web": "5.0.1",
57
- "@workday/canvas-tokens-web": "4.4.0-beta.13",
56
+ "@workday/canvas-system-icons-web": "^5.0.3",
57
+ "@workday/canvas-tokens-web": "^4.4.0",
58
58
  "typescript": "5.0"
59
59
  },
60
- "gitHead": "7bde57a5a6d4e41fd4a2e08f9f035c609ff4a8f0"
60
+ "gitHead": "009ee6f188364d295abc6d7fa4ac2eb610bf2251"
61
61
  }