@workday/canvas-kit-react 14.0.0-alpha.1251-next.0 → 14.0.0-alpha.1252-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.
- package/common/lib/styles/errorRing.ts +2 -6
- package/common/lib/styles/focusRing.ts +1 -1
- package/dist/commonjs/common/lib/styles/errorRing.d.ts +18 -5
- package/dist/commonjs/common/lib/styles/errorRing.d.ts.map +1 -1
- package/dist/commonjs/common/lib/styles/focusRing.d.ts +1 -1
- package/dist/commonjs/common/lib/styles/focusRing.d.ts.map +1 -1
- package/dist/commonjs/common/lib/styles/focusRing.js +1 -1
- package/dist/es6/common/lib/styles/errorRing.d.ts +18 -5
- package/dist/es6/common/lib/styles/errorRing.d.ts.map +1 -1
- package/dist/es6/common/lib/styles/focusRing.d.ts +1 -1
- package/dist/es6/common/lib/styles/focusRing.d.ts.map +1 -1
- package/dist/es6/common/lib/styles/focusRing.js +1 -1
- package/package.json +4 -4
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import {EmotionCanvasTheme} from '../theming/index';
|
|
2
2
|
import {ErrorType} from '../types';
|
|
3
|
-
import {
|
|
4
|
-
import {CSSObjectWithVars, cssVar} from '@workday/canvas-kit-styling';
|
|
5
|
-
|
|
6
|
-
// Backwards compatible type that works with both styled components and Canvas Kit styling
|
|
7
|
-
type CompatibleCSSObject = CSSObject & CSSObjectWithVars;
|
|
3
|
+
import {cssVar} from '@workday/canvas-kit-styling';
|
|
8
4
|
|
|
9
5
|
import {brand, system} from '@workday/canvas-tokens-web';
|
|
10
6
|
|
|
@@ -40,7 +36,7 @@ export function getErrorColors(error?: ErrorType, theme?: EmotionCanvasTheme) {
|
|
|
40
36
|
}
|
|
41
37
|
}
|
|
42
38
|
|
|
43
|
-
export function errorRing(error?: ErrorType, theme?: EmotionCanvasTheme)
|
|
39
|
+
export function errorRing(error?: ErrorType, theme?: EmotionCanvasTheme) {
|
|
44
40
|
if (error !== ErrorType.Error && error !== ErrorType.Caution) {
|
|
45
41
|
return {};
|
|
46
42
|
}
|
|
@@ -81,7 +81,7 @@ function calculateFocusRing({
|
|
|
81
81
|
*
|
|
82
82
|
* @returns {{boxShadow: string}} the css object for the focus ring style
|
|
83
83
|
*/
|
|
84
|
-
export function focusRing(options: FocusRingOptions = {}
|
|
84
|
+
export function focusRing(options: FocusRingOptions = {}) {
|
|
85
85
|
const {
|
|
86
86
|
width = 2,
|
|
87
87
|
separation = 0,
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { EmotionCanvasTheme } from '../theming/index';
|
|
2
2
|
import { ErrorType } from '../types';
|
|
3
|
-
import { CSSObject } from '@emotion/styled';
|
|
4
|
-
import { CSSObjectWithVars } from '@workday/canvas-kit-styling';
|
|
5
|
-
type CompatibleCSSObject = CSSObject & CSSObjectWithVars;
|
|
6
3
|
export declare function getErrorColors(error?: ErrorType, theme?: EmotionCanvasTheme): {
|
|
7
4
|
outer: string;
|
|
8
5
|
inner: string;
|
|
@@ -10,6 +7,22 @@ export declare function getErrorColors(error?: ErrorType, theme?: EmotionCanvasT
|
|
|
10
7
|
outer?: undefined;
|
|
11
8
|
inner?: undefined;
|
|
12
9
|
};
|
|
13
|
-
export declare function errorRing(error?: ErrorType, theme?: EmotionCanvasTheme):
|
|
14
|
-
|
|
10
|
+
export declare function errorRing(error?: ErrorType, theme?: EmotionCanvasTheme): {
|
|
11
|
+
borderColor?: undefined;
|
|
12
|
+
transition?: undefined;
|
|
13
|
+
boxShadow?: undefined;
|
|
14
|
+
'&:hover, &:disabled, &.hover, &.disabled'?: undefined;
|
|
15
|
+
'&:focus-visible:not([disabled]), &.focus:not([disabled])'?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
borderColor: string | undefined;
|
|
18
|
+
transition: string;
|
|
19
|
+
boxShadow: string;
|
|
20
|
+
'&:hover, &:disabled, &.hover, &.disabled': {
|
|
21
|
+
borderColor: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
'&:focus-visible:not([disabled]), &.focus:not([disabled])': {
|
|
24
|
+
borderColor: string | undefined;
|
|
25
|
+
boxShadow: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
15
28
|
//# sourceMappingURL=errorRing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorRing.d.ts","sourceRoot":"","sources":["../../../../../common/lib/styles/errorRing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"errorRing.d.ts","sourceRoot":"","sources":["../../../../../common/lib/styles/errorRing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAKnC,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,kBAAkB;;;;;;EA8B3E;AAED,wBAAgB,SAAS,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,kBAAkB;;;;;;;;;;;;;;;;;EAyBtE"}
|
|
@@ -34,7 +34,7 @@ interface FocusRingOptions {
|
|
|
34
34
|
*
|
|
35
35
|
* @returns {{boxShadow: string}} the css object for the focus ring style
|
|
36
36
|
*/
|
|
37
|
-
export declare function focusRing(options?: FocusRingOptions
|
|
37
|
+
export declare function focusRing(options?: FocusRingOptions): {
|
|
38
38
|
boxShadow: string;
|
|
39
39
|
};
|
|
40
40
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focusRing.d.ts","sourceRoot":"","sources":["../../../../../common/lib/styles/focusRing.ts"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AA0CD;;;;;;;;;;;;;;GAcG;AAEH;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB
|
|
1
|
+
{"version":3,"file":"focusRing.d.ts","sourceRoot":"","sources":["../../../../../common/lib/styles/focusRing.ts"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AA0CD;;;;;;;;;;;;;;GAcG;AAEH;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB;;EAqBvD"}
|
|
@@ -55,7 +55,7 @@ function calculateFocusRing({ width, separation, inset, innerColor, outerColor,
|
|
|
55
55
|
*
|
|
56
56
|
* @returns {{boxShadow: string}} the css object for the focus ring style
|
|
57
57
|
*/
|
|
58
|
-
function focusRing(options = {}
|
|
58
|
+
function focusRing(options = {}) {
|
|
59
59
|
const { width = 2, separation = 0, animate = true,
|
|
60
60
|
// hard code CSS fallbacks for dynamic styles that don't use the static style transform
|
|
61
61
|
innerColor = (0, canvas_kit_styling_1.cssVar)(canvas_tokens_web_1.system.color.border.inverse, 'rgba(255,255,255,1)'), outerColor = (0, canvas_kit_styling_1.cssVar)(canvas_tokens_web_1.brand.common.focusOutline, 'rgba(8,117,225,1)'), inset, } = options;
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { EmotionCanvasTheme } from '../theming/index';
|
|
2
2
|
import { ErrorType } from '../types';
|
|
3
|
-
import { CSSObject } from '@emotion/styled';
|
|
4
|
-
import { CSSObjectWithVars } from '@workday/canvas-kit-styling';
|
|
5
|
-
type CompatibleCSSObject = CSSObject & CSSObjectWithVars;
|
|
6
3
|
export declare function getErrorColors(error?: ErrorType, theme?: EmotionCanvasTheme): {
|
|
7
4
|
outer: string;
|
|
8
5
|
inner: string;
|
|
@@ -10,6 +7,22 @@ export declare function getErrorColors(error?: ErrorType, theme?: EmotionCanvasT
|
|
|
10
7
|
outer?: undefined;
|
|
11
8
|
inner?: undefined;
|
|
12
9
|
};
|
|
13
|
-
export declare function errorRing(error?: ErrorType, theme?: EmotionCanvasTheme):
|
|
14
|
-
|
|
10
|
+
export declare function errorRing(error?: ErrorType, theme?: EmotionCanvasTheme): {
|
|
11
|
+
borderColor?: undefined;
|
|
12
|
+
transition?: undefined;
|
|
13
|
+
boxShadow?: undefined;
|
|
14
|
+
'&:hover, &:disabled, &.hover, &.disabled'?: undefined;
|
|
15
|
+
'&:focus-visible:not([disabled]), &.focus:not([disabled])'?: undefined;
|
|
16
|
+
} | {
|
|
17
|
+
borderColor: string | undefined;
|
|
18
|
+
transition: string;
|
|
19
|
+
boxShadow: string;
|
|
20
|
+
'&:hover, &:disabled, &.hover, &.disabled': {
|
|
21
|
+
borderColor: string | undefined;
|
|
22
|
+
};
|
|
23
|
+
'&:focus-visible:not([disabled]), &.focus:not([disabled])': {
|
|
24
|
+
borderColor: string | undefined;
|
|
25
|
+
boxShadow: string;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
15
28
|
//# sourceMappingURL=errorRing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorRing.d.ts","sourceRoot":"","sources":["../../../../../common/lib/styles/errorRing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"errorRing.d.ts","sourceRoot":"","sources":["../../../../../common/lib/styles/errorRing.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAC,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAC,SAAS,EAAC,MAAM,UAAU,CAAC;AAKnC,wBAAgB,cAAc,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,kBAAkB;;;;;;EA8B3E;AAED,wBAAgB,SAAS,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,EAAE,kBAAkB;;;;;;;;;;;;;;;;;EAyBtE"}
|
|
@@ -34,7 +34,7 @@ interface FocusRingOptions {
|
|
|
34
34
|
*
|
|
35
35
|
* @returns {{boxShadow: string}} the css object for the focus ring style
|
|
36
36
|
*/
|
|
37
|
-
export declare function focusRing(options?: FocusRingOptions
|
|
37
|
+
export declare function focusRing(options?: FocusRingOptions): {
|
|
38
38
|
boxShadow: string;
|
|
39
39
|
};
|
|
40
40
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"focusRing.d.ts","sourceRoot":"","sources":["../../../../../common/lib/styles/focusRing.ts"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AA0CD;;;;;;;;;;;;;;GAcG;AAEH;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB
|
|
1
|
+
{"version":3,"file":"focusRing.d.ts","sourceRoot":"","sources":["../../../../../common/lib/styles/focusRing.ts"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AA0CD;;;;;;;;;;;;;;GAcG;AAEH;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB;;EAqBvD"}
|
|
@@ -52,7 +52,7 @@ function calculateFocusRing({ width, separation, inset, innerColor, outerColor,
|
|
|
52
52
|
*
|
|
53
53
|
* @returns {{boxShadow: string}} the css object for the focus ring style
|
|
54
54
|
*/
|
|
55
|
-
export function focusRing(options = {}
|
|
55
|
+
export function focusRing(options = {}) {
|
|
56
56
|
const { width = 2, separation = 0, animate = true,
|
|
57
57
|
// hard code CSS fallbacks for dynamic styles that don't use the static style transform
|
|
58
58
|
innerColor = cssVar(system.color.border.inverse, 'rgba(255,255,255,1)'), outerColor = cssVar(brand.common.focusOutline, 'rgba(8,117,225,1)'), inset, } = options;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-react",
|
|
3
|
-
"version": "14.0.0-alpha.
|
|
3
|
+
"version": "14.0.0-alpha.1252-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",
|
|
@@ -52,8 +52,8 @@
|
|
|
52
52
|
"@popperjs/core": "^2.5.4",
|
|
53
53
|
"@tanstack/react-virtual": "^3.13.9",
|
|
54
54
|
"@workday/canvas-colors-web": "^2.0.0",
|
|
55
|
-
"@workday/canvas-kit-popup-stack": "^14.0.0-alpha.
|
|
56
|
-
"@workday/canvas-kit-styling": "^14.0.0-alpha.
|
|
55
|
+
"@workday/canvas-kit-popup-stack": "^14.0.0-alpha.1252-next.0",
|
|
56
|
+
"@workday/canvas-kit-styling": "^14.0.0-alpha.1252-next.0",
|
|
57
57
|
"@workday/canvas-system-icons-web": "^3.0.35",
|
|
58
58
|
"@workday/canvas-tokens-web": "3.0.0-alpha.12",
|
|
59
59
|
"@workday/design-assets-types": "^0.2.10",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"@workday/canvas-accent-icons-web": "^3.0.0",
|
|
69
69
|
"@workday/canvas-applet-icons-web": "^2.0.0"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "80e4dc6c529068c00bce5b14c625ea69a6ee63c2"
|
|
72
72
|
}
|