@workday/canvas-kit-styling 10.0.24 → 10.0.26
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Keyframes, SerializedStyles, CSSObject } from '@emotion/serialize';
|
|
2
|
+
import { Properties } from 'csstype';
|
|
3
3
|
export declare const createStylesCache: Record<string, boolean>;
|
|
4
4
|
/**
|
|
5
5
|
* Style properties in a JavaScript camelCase. Everything Emotion allows is also
|
|
@@ -122,10 +122,10 @@ export declare function createModifiers<T extends ModifierConfig>(input: T): Mod
|
|
|
122
122
|
* All acceptable values of the `cs` prop. It can be a CSS class name, any CSS properties, an object
|
|
123
123
|
* with a `className` and `styles`, or an array of these
|
|
124
124
|
*/
|
|
125
|
-
export declare type CSToPropsInput = undefined | CS | CsToPropsReturn |
|
|
125
|
+
export declare type CSToPropsInput = undefined | CS | CsToPropsReturn | Properties<string | number> | CSToPropsInput[];
|
|
126
126
|
export declare type CsToPropsReturn = {
|
|
127
127
|
className?: string;
|
|
128
|
-
style?:
|
|
128
|
+
style?: Properties<string | number>;
|
|
129
129
|
};
|
|
130
130
|
/**
|
|
131
131
|
* A function that takes in a single input, or an array. The type of the input is either:
|
|
@@ -258,7 +258,7 @@ export declare function createStyles(...args: ({
|
|
|
258
258
|
*/
|
|
259
259
|
export declare function handleCsProp<T extends CSProps & {
|
|
260
260
|
className?: string | undefined;
|
|
261
|
-
style?:
|
|
261
|
+
style?: Properties<string | number> | undefined;
|
|
262
262
|
}>(
|
|
263
263
|
/**
|
|
264
264
|
* All the props to be spread onto an element. The `cs` prop will be removed an reduced to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cs.d.ts","sourceRoot":"","sources":["../../../lib/cs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cs.d.ts","sourceRoot":"","sources":["../../../lib/cs.ts"],"names":[],"mappings":"A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AG,eAAe,CAkDhE;AAED,MAAM,WAAW,OAAO;IACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,EAAE,CAAC,EAAE,cAAc,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAC1B,GAAG,IAAI,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,GAAG,UAAU,GAAG,MAAM,CAAC,EAAE,GAChE,MAAM,CAsCR;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,OAAO,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/B,KAAK,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS,CAAC;CACjD;AAED;;;GAGG;AACH,SAAS,EAAE,CAAC;AACZ;;;GAGG;AACH,OAAO,CAAC,EAAE,cAAc,GACvB,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CA8Df"}
|
package/dist/commonjs/lib/cs.js
CHANGED
|
@@ -86,7 +86,6 @@ function createVars(...args) {
|
|
|
86
86
|
return vars;
|
|
87
87
|
};
|
|
88
88
|
args.forEach(key => {
|
|
89
|
-
console.log(key);
|
|
90
89
|
// @ts-ignore
|
|
91
90
|
result[key] = `--${id}-${makeEmotionSafe(key)}`;
|
|
92
91
|
}, {});
|
|
@@ -328,7 +327,7 @@ localCs) {
|
|
|
328
327
|
// _does_ care because it uses the `classList` order to determine style merging. Therefore we
|
|
329
328
|
// should always be careful to order class names knowing we need to support runtime merging if
|
|
330
329
|
// runtime styles are detected.
|
|
331
|
-
const returnProps = csToProps([localCs, className, cs
|
|
330
|
+
const returnProps = csToProps([localCs, className, cs]);
|
|
332
331
|
// The following is basically what Emotion does internally to merge styles from different
|
|
333
332
|
// components into a single className. We will do this here for backwards compatibility with
|
|
334
333
|
// runtime style merging. `createStyles` and `@emotion/css` works by creating styles and injecting
|
|
@@ -346,6 +345,7 @@ localCs) {
|
|
|
346
345
|
shouldRuntimeMergeStyles = true;
|
|
347
346
|
}
|
|
348
347
|
});
|
|
348
|
+
returnProps.style = { ...returnProps.style, ...style };
|
|
349
349
|
// If runtime styles are detected, we need to do extra work to ensure styles merge according to
|
|
350
350
|
// the rules of Emotion's runtime.
|
|
351
351
|
if (shouldRuntimeMergeStyles) {
|
package/dist/es6/lib/cs.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import { Keyframes, SerializedStyles, CSSObject } from '@emotion/serialize';
|
|
2
|
+
import { Properties } from 'csstype';
|
|
3
3
|
export declare const createStylesCache: Record<string, boolean>;
|
|
4
4
|
/**
|
|
5
5
|
* Style properties in a JavaScript camelCase. Everything Emotion allows is also
|
|
@@ -122,10 +122,10 @@ export declare function createModifiers<T extends ModifierConfig>(input: T): Mod
|
|
|
122
122
|
* All acceptable values of the `cs` prop. It can be a CSS class name, any CSS properties, an object
|
|
123
123
|
* with a `className` and `styles`, or an array of these
|
|
124
124
|
*/
|
|
125
|
-
export declare type CSToPropsInput = undefined | CS | CsToPropsReturn |
|
|
125
|
+
export declare type CSToPropsInput = undefined | CS | CsToPropsReturn | Properties<string | number> | CSToPropsInput[];
|
|
126
126
|
export declare type CsToPropsReturn = {
|
|
127
127
|
className?: string;
|
|
128
|
-
style?:
|
|
128
|
+
style?: Properties<string | number>;
|
|
129
129
|
};
|
|
130
130
|
/**
|
|
131
131
|
* A function that takes in a single input, or an array. The type of the input is either:
|
|
@@ -258,7 +258,7 @@ export declare function createStyles(...args: ({
|
|
|
258
258
|
*/
|
|
259
259
|
export declare function handleCsProp<T extends CSProps & {
|
|
260
260
|
className?: string | undefined;
|
|
261
|
-
style?:
|
|
261
|
+
style?: Properties<string | number> | undefined;
|
|
262
262
|
}>(
|
|
263
263
|
/**
|
|
264
264
|
* All the props to be spread onto an element. The `cs` prop will be removed an reduced to
|
package/dist/es6/lib/cs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cs.d.ts","sourceRoot":"","sources":["../../../lib/cs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cs.d.ts","sourceRoot":"","sources":["../../../lib/cs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,SAAS,EAAE,gBAAgB,EAAE,SAAS,EAAC,MAAM,oBAAoB,CAAC;AAC3F,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAInC,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,CAAC;AAE7D;;;GAGG;AACH,oBAAY,UAAU,GAClB,SAAS,GACT,OAAO,GACP,MAAM,GACN,MAAM,GACN,SAAS,GACT,gBAAgB,GAChB,SAAS,CAAC;AA4Bd,oBAAY,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,oBAAY,SAAS,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,SAAS,MAAM,GAAG,KAAK,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,GACrF,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,GAEjB;KAAE,CAAC,IAAI,CAAC,GAAG,KAAK,EAAE,IAAI,CAAC,EAAE;CAAC,CAAC;AAE/B,oBAAY,MAAM,CAAC,CAAC,SAAS,MAAM,EAAE,EAAE,SAAS,MAAM,GAAG,KAAK,IAAI,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG;IACnF,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;CACxD,CAAC;AAE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UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,GAC3B,cAAc,EAAE,CAAC;AAErB,oBAAY,eAAe,GAAG;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;CAAC,CAAC;AACxF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,eAAe,CAkDhE;AAED,MAAM,WAAW,OAAO;IACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,EAAE,CAAC,EAAE,cAAc,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,YAAY,CAC1B,GAAG,IAAI,EAAE,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAC,GAAG,UAAU,GAAG,MAAM,CAAC,EAAE,GAChE,MAAM,CAsCR;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,wBAAgB,YAAY,CAC1B,CAAC,SAAS,OAAO,GAAG;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAE/B,KAAK,CAAC,EAAE,UAAU,CAAC,MAAM,GAAG,MAAM,CAAC,GAAG,SAAS,CAAC;CACjD;AAED;;;GAGG;AACH,SAAS,EAAE,CAAC;AACZ;;;GAGG;AACH,OAAO,CAAC,EAAE,cAAc,GACvB,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CA8Df"}
|
package/dist/es6/lib/cs.js
CHANGED
|
@@ -82,7 +82,6 @@ export function createVars(...args) {
|
|
|
82
82
|
return vars;
|
|
83
83
|
};
|
|
84
84
|
args.forEach(key => {
|
|
85
|
-
console.log(key);
|
|
86
85
|
// @ts-ignore
|
|
87
86
|
result[key] = `--${id}-${makeEmotionSafe(key)}`;
|
|
88
87
|
}, {});
|
|
@@ -320,7 +319,7 @@ localCs) {
|
|
|
320
319
|
// _does_ care because it uses the `classList` order to determine style merging. Therefore we
|
|
321
320
|
// should always be careful to order class names knowing we need to support runtime merging if
|
|
322
321
|
// runtime styles are detected.
|
|
323
|
-
const returnProps = csToProps([localCs, className, cs
|
|
322
|
+
const returnProps = csToProps([localCs, className, cs]);
|
|
324
323
|
// The following is basically what Emotion does internally to merge styles from different
|
|
325
324
|
// components into a single className. We will do this here for backwards compatibility with
|
|
326
325
|
// runtime style merging. `createStyles` and `@emotion/css` works by creating styles and injecting
|
|
@@ -338,6 +337,7 @@ localCs) {
|
|
|
338
337
|
shouldRuntimeMergeStyles = true;
|
|
339
338
|
}
|
|
340
339
|
});
|
|
340
|
+
returnProps.style = { ...returnProps.style, ...style };
|
|
341
341
|
// If runtime styles are detected, we need to do extra work to ensure styles merge according to
|
|
342
342
|
// the rules of Emotion's runtime.
|
|
343
343
|
if (shouldRuntimeMergeStyles) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workday/canvas-kit-styling",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.26",
|
|
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",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@emotion/serialize": "^1.0.2",
|
|
55
55
|
"@emotion/styled": "^11.6.0",
|
|
56
56
|
"@emotion/utils": "^1.0.0",
|
|
57
|
-
"@workday/canvas-kit-react": "^10.0.
|
|
57
|
+
"@workday/canvas-kit-react": "^10.0.26",
|
|
58
58
|
"@workday/canvas-tokens-web": "^1.0.0",
|
|
59
59
|
"typescript": "4.2"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "f72e5ef2c7066355ea9d4011661158bb574a1564"
|
|
62
62
|
}
|