@workday/canvas-kit-styling 10.0.24 → 10.0.25
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
|
@@ -328,7 +328,7 @@ localCs) {
|
|
|
328
328
|
// _does_ care because it uses the `classList` order to determine style merging. Therefore we
|
|
329
329
|
// should always be careful to order class names knowing we need to support runtime merging if
|
|
330
330
|
// runtime styles are detected.
|
|
331
|
-
const returnProps = csToProps([localCs, className, cs
|
|
331
|
+
const returnProps = csToProps([localCs, className, cs]);
|
|
332
332
|
// The following is basically what Emotion does internally to merge styles from different
|
|
333
333
|
// components into a single className. We will do this here for backwards compatibility with
|
|
334
334
|
// runtime style merging. `createStyles` and `@emotion/css` works by creating styles and injecting
|
|
@@ -346,6 +346,7 @@ localCs) {
|
|
|
346
346
|
shouldRuntimeMergeStyles = true;
|
|
347
347
|
}
|
|
348
348
|
});
|
|
349
|
+
returnProps.style = { ...returnProps.style, ...style };
|
|
349
350
|
// If runtime styles are detected, we need to do extra work to ensure styles merge according to
|
|
350
351
|
// the rules of Emotion's runtime.
|
|
351
352
|
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
|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ACxF;;;;;;;;;;;;;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
|
@@ -320,7 +320,7 @@ localCs) {
|
|
|
320
320
|
// _does_ care because it uses the `classList` order to determine style merging. Therefore we
|
|
321
321
|
// should always be careful to order class names knowing we need to support runtime merging if
|
|
322
322
|
// runtime styles are detected.
|
|
323
|
-
const returnProps = csToProps([localCs, className, cs
|
|
323
|
+
const returnProps = csToProps([localCs, className, cs]);
|
|
324
324
|
// The following is basically what Emotion does internally to merge styles from different
|
|
325
325
|
// components into a single className. We will do this here for backwards compatibility with
|
|
326
326
|
// runtime style merging. `createStyles` and `@emotion/css` works by creating styles and injecting
|
|
@@ -338,6 +338,7 @@ localCs) {
|
|
|
338
338
|
shouldRuntimeMergeStyles = true;
|
|
339
339
|
}
|
|
340
340
|
});
|
|
341
|
+
returnProps.style = { ...returnProps.style, ...style };
|
|
341
342
|
// If runtime styles are detected, we need to do extra work to ensure styles merge according to
|
|
342
343
|
// the rules of Emotion's runtime.
|
|
343
344
|
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.25",
|
|
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.25",
|
|
58
58
|
"@workday/canvas-tokens-web": "^1.0.0",
|
|
59
59
|
"typescript": "4.2"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "c30860328424cc0b0ad42c1d5ae17c61dbb36a4a"
|
|
62
62
|
}
|