@compiled/react 0.13.1 → 0.15.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/dist/browser/class-names/index.js.flow +1 -1
- package/dist/browser/css/index.js.flow +1 -1
- package/dist/browser/css-map/index.d.ts +112 -0
- package/dist/browser/css-map/index.js +22 -0
- package/dist/browser/css-map/index.js.flow +125 -0
- package/dist/browser/css-map/index.js.map +1 -0
- package/dist/browser/css-map/pseudos.d.ts +1 -0
- package/dist/browser/css-map/pseudos.js +5 -0
- package/dist/browser/css-map/pseudos.js.flow +57 -0
- package/dist/browser/css-map/pseudos.js.map +1 -0
- package/dist/browser/index.d.ts +1 -0
- package/dist/browser/index.js +1 -0
- package/dist/browser/index.js.flow +2 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/keyframes/index.js.flow +1 -1
- package/dist/browser/runtime/ac.js.flow +1 -1
- package/dist/browser/runtime/ax.js.flow +1 -1
- package/dist/browser/runtime/cache.js.flow +1 -1
- package/dist/browser/runtime/css-custom-property.js.flow +1 -1
- package/dist/browser/runtime/dev-warnings.js.flow +1 -1
- package/dist/browser/runtime/index.js.flow +1 -1
- package/dist/browser/runtime/is-server-environment.js.flow +1 -1
- package/dist/browser/runtime/sheet.js.flow +1 -1
- package/dist/browser/runtime/style-cache.js.flow +1 -1
- package/dist/browser/runtime/style.js.flow +1 -1
- package/dist/browser/runtime/types.js.flow +1 -1
- package/dist/browser/runtime.js.flow +1 -1
- package/dist/browser/styled/index.js.flow +1 -1
- package/dist/browser/types.d.ts +3 -3
- package/dist/browser/types.js.flow +4 -4
- package/dist/browser/utils/error.js.flow +1 -1
- package/dist/cjs/class-names/index.js.flow +1 -1
- package/dist/cjs/css/index.js.flow +1 -1
- package/dist/cjs/css-map/index.d.ts +112 -0
- package/dist/cjs/css-map/index.js +25 -0
- package/dist/cjs/css-map/index.js.flow +125 -0
- package/dist/cjs/css-map/index.js.map +1 -0
- package/dist/cjs/css-map/pseudos.d.ts +1 -0
- package/dist/cjs/css-map/pseudos.js +6 -0
- package/dist/cjs/css-map/pseudos.js.flow +57 -0
- package/dist/cjs/css-map/pseudos.js.map +1 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/index.js.flow +2 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/keyframes/index.js.flow +1 -1
- package/dist/cjs/runtime/ac.js.flow +1 -1
- package/dist/cjs/runtime/ax.js.flow +1 -1
- package/dist/cjs/runtime/cache.js.flow +1 -1
- package/dist/cjs/runtime/css-custom-property.js.flow +1 -1
- package/dist/cjs/runtime/dev-warnings.js.flow +1 -1
- package/dist/cjs/runtime/index.js.flow +1 -1
- package/dist/cjs/runtime/is-server-environment.js.flow +1 -1
- package/dist/cjs/runtime/sheet.js.flow +1 -1
- package/dist/cjs/runtime/style-cache.js.flow +1 -1
- package/dist/cjs/runtime/style.js.flow +1 -1
- package/dist/cjs/runtime/types.js.flow +1 -1
- package/dist/cjs/runtime.js.flow +1 -1
- package/dist/cjs/styled/index.js.flow +1 -1
- package/dist/cjs/types.d.ts +3 -3
- package/dist/cjs/types.js.flow +4 -4
- package/dist/cjs/utils/error.js.flow +1 -1
- package/dist/esm/class-names/index.js.flow +1 -1
- package/dist/esm/css/index.js.flow +1 -1
- package/dist/esm/css-map/index.d.ts +112 -0
- package/dist/esm/css-map/index.js +22 -0
- package/dist/esm/css-map/index.js.flow +125 -0
- package/dist/esm/css-map/index.js.map +1 -0
- package/dist/esm/css-map/pseudos.d.ts +1 -0
- package/dist/esm/css-map/pseudos.js +5 -0
- package/dist/esm/css-map/pseudos.js.flow +57 -0
- package/dist/esm/css-map/pseudos.js.map +1 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.flow +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/keyframes/index.js.flow +1 -1
- package/dist/esm/runtime/ac.js.flow +1 -1
- package/dist/esm/runtime/ax.js.flow +1 -1
- package/dist/esm/runtime/cache.js.flow +1 -1
- package/dist/esm/runtime/css-custom-property.js.flow +1 -1
- package/dist/esm/runtime/dev-warnings.js.flow +1 -1
- package/dist/esm/runtime/index.js.flow +1 -1
- package/dist/esm/runtime/is-server-environment.js.flow +1 -1
- package/dist/esm/runtime/sheet.js.flow +1 -1
- package/dist/esm/runtime/style-cache.js.flow +1 -1
- package/dist/esm/runtime/style.js.flow +1 -1
- package/dist/esm/runtime/types.js.flow +1 -1
- package/dist/esm/runtime.js.flow +1 -1
- package/dist/esm/styled/index.js.flow +1 -1
- package/dist/esm/types.d.ts +3 -3
- package/dist/esm/types.js.flow +4 -4
- package/dist/esm/utils/error.js.flow +1 -1
- package/package.json +3 -3
- package/src/class-names/index.js.flow +1 -1
- package/src/css/index.js.flow +1 -1
- package/src/css-map/__tests__/index.test.tsx +52 -0
- package/src/css-map/index.js.flow +125 -0
- package/src/css-map/index.ts +126 -0
- package/src/css-map/pseudos.js.flow +57 -0
- package/src/css-map/pseudos.ts +59 -0
- package/src/index.js.flow +2 -1
- package/src/index.ts +1 -0
- package/src/keyframes/index.js.flow +1 -1
- package/src/runtime/ac.js.flow +1 -1
- package/src/runtime/ax.js.flow +1 -1
- package/src/runtime/cache.js.flow +1 -1
- package/src/runtime/css-custom-property.js.flow +1 -1
- package/src/runtime/dev-warnings.js.flow +1 -1
- package/src/runtime/index.js.flow +1 -1
- package/src/runtime/is-server-environment.js.flow +1 -1
- package/src/runtime/sheet.js.flow +1 -1
- package/src/runtime/style-cache.js.flow +1 -1
- package/src/runtime/style.js.flow +1 -1
- package/src/runtime/types.js.flow +1 -1
- package/src/runtime.js.flow +1 -1
- package/src/styled/index.js.flow +1 -1
- package/src/types.js.flow +4 -4
- package/src/types.ts +3 -3
- package/src/utils/error.js.flow +1 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for index
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
import type { Properties, AtRules } from 'csstype';
|
|
8
|
+
import type { Pseudos } from './pseudos';
|
|
9
|
+
/**
|
|
10
|
+
* These are all the CSS props that will exist.
|
|
11
|
+
* Only 'string' and 'number' are valid CSS values.
|
|
12
|
+
* @example ```
|
|
13
|
+
* const style: CssProps = {
|
|
14
|
+
* color: 'red',
|
|
15
|
+
* margin: 10,
|
|
16
|
+
* };
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare type CssProps = $ReadOnly<Properties<string | number>>;
|
|
20
|
+
declare type AllPseudos = $ObjMapi<
|
|
21
|
+
{ [k: Pseudos]: any },
|
|
22
|
+
<key>(key) => { ...CssProps, ...AllPseudos }
|
|
23
|
+
>;
|
|
24
|
+
declare type AtRuleSecondHalf = string;
|
|
25
|
+
declare type WhitelistedAtRule = $ObjMapi<
|
|
26
|
+
{ [k: AtRules]: any },
|
|
27
|
+
<atRuleFirstHalf>(atRuleFirstHalf) => $ObjMapi<
|
|
28
|
+
{ [k: AtRuleSecondHalf]: any },
|
|
29
|
+
<atRuleSecondHalf>(atRuleSecondHalf) => {
|
|
30
|
+
...CssProps,
|
|
31
|
+
...AllPseudos,
|
|
32
|
+
...WhitelistedAtRule,
|
|
33
|
+
}
|
|
34
|
+
>
|
|
35
|
+
>;
|
|
36
|
+
declare type WhitelistedSelector = { ...AllPseudos, ...WhitelistedAtRule };
|
|
37
|
+
declare type ExtendedSelector = {
|
|
38
|
+
...{
|
|
39
|
+
[key: string]: CssProps | ExtendedSelector,
|
|
40
|
+
},
|
|
41
|
+
...{
|
|
42
|
+
/**
|
|
43
|
+
* Using `selectors` is not valid here - you cannot nest a `selectors` object
|
|
44
|
+
* inside another `selectors` object.
|
|
45
|
+
*/
|
|
46
|
+
selectors?: empty,
|
|
47
|
+
...
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
declare type ExtendedSelectors = {
|
|
51
|
+
/**
|
|
52
|
+
* Provides a way to use selectors that have not been explicitly whitelisted
|
|
53
|
+
* in cssMap.
|
|
54
|
+
*
|
|
55
|
+
* This does not provide any type-checking for the selectors (thus allowing
|
|
56
|
+
* more expressive selectors), though this is more flexible and allows
|
|
57
|
+
* nesting selectors in other selectors.
|
|
58
|
+
*
|
|
59
|
+
* A selector defined both outside of the `selectors` object and
|
|
60
|
+
* inside the `selectors` object is a runtime error.
|
|
61
|
+
*
|
|
62
|
+
* Note that you cannot nest a `selectors` object inside another
|
|
63
|
+
* `selectors` object.
|
|
64
|
+
*
|
|
65
|
+
* Only use if absolutely necessary.
|
|
66
|
+
* @example ```
|
|
67
|
+
* const myMap = cssMap({
|
|
68
|
+
* danger: {
|
|
69
|
+
* color: 'red',
|
|
70
|
+
* '@media': {
|
|
71
|
+
* '(min-width: 100px)': {
|
|
72
|
+
* font-size: '1.5em',
|
|
73
|
+
* },
|
|
74
|
+
* },
|
|
75
|
+
* '&:hover': {
|
|
76
|
+
* color: 'pink',
|
|
77
|
+
* },
|
|
78
|
+
* selectors: {
|
|
79
|
+
* '&:not(:active)': {
|
|
80
|
+
* backgroundColor: 'yellow',
|
|
81
|
+
* }
|
|
82
|
+
* },
|
|
83
|
+
* },
|
|
84
|
+
* success: {
|
|
85
|
+
* color: 'green',
|
|
86
|
+
* '@media': {
|
|
87
|
+
* '(min-width: 100px)': {
|
|
88
|
+
* font-size: '1.3em',
|
|
89
|
+
* },
|
|
90
|
+
* },
|
|
91
|
+
* '&:hover': {
|
|
92
|
+
* color: '#8f8',
|
|
93
|
+
* },
|
|
94
|
+
* selectors: {
|
|
95
|
+
* '&:not(:active)': {
|
|
96
|
+
* backgroundColor: 'white',
|
|
97
|
+
* }
|
|
98
|
+
* },
|
|
99
|
+
* },
|
|
100
|
+
* });
|
|
101
|
+
* ```
|
|
102
|
+
*/
|
|
103
|
+
selectors?: ExtendedSelector,
|
|
104
|
+
...
|
|
105
|
+
};
|
|
106
|
+
declare type Variants<VariantName: string> = {
|
|
107
|
+
[key: VariantName]: { ...CssProps, ...WhitelistedSelector, ...ExtendedSelectors },
|
|
108
|
+
};
|
|
109
|
+
declare type ReturnType<VariantName: string> = { [key: VariantName]: CssProps };
|
|
110
|
+
/**
|
|
111
|
+
* ## cssMap
|
|
112
|
+
*
|
|
113
|
+
* Creates a collection of named CSS rules that are statically typed and useable with other Compiled APIs.
|
|
114
|
+
* For further details [read the documentation](https://compiledcssinjs.com/docs/api-cssmap).
|
|
115
|
+
* @example ```
|
|
116
|
+
* const borderStyleMap = cssMap({
|
|
117
|
+
* none: { borderStyle: 'none' },
|
|
118
|
+
* solid: { borderStyle: 'solid' },
|
|
119
|
+
* });
|
|
120
|
+
* const Component = ({ borderStyle }) => <div css={css(borderStyleMap[borderStyle])} />
|
|
121
|
+
*
|
|
122
|
+
* <Component borderStyle="solid" />
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
declare export default function cssMap<T: string>(_styles: Variants<T>): $ReadOnly<ReturnType<T>>;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { Properties, AtRules } from 'csstype';
|
|
2
|
+
|
|
3
|
+
import { createSetupError } from '../utils/error';
|
|
4
|
+
|
|
5
|
+
import type { Pseudos } from './pseudos';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* These are all the CSS props that will exist.
|
|
9
|
+
* Only 'string' and 'number' are valid CSS values.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```
|
|
13
|
+
* const style: CssProps = {
|
|
14
|
+
* color: 'red',
|
|
15
|
+
* margin: 10,
|
|
16
|
+
* };
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
type CssProps = Readonly<Properties<string | number>>;
|
|
20
|
+
|
|
21
|
+
type AllPseudos = { [key in Pseudos]?: CssProps & AllPseudos };
|
|
22
|
+
|
|
23
|
+
// The `screen and (max-width: 768px)` part of `@media screen and (max-width: 768px)`.
|
|
24
|
+
// Ideally we would do type checking to forbid this from containing the `@media` part,
|
|
25
|
+
// but TypeScript doesn't provide a good way to do this.
|
|
26
|
+
type AtRuleSecondHalf = string;
|
|
27
|
+
type WhitelistedAtRule = {
|
|
28
|
+
[atRuleFirstHalf in AtRules]?: {
|
|
29
|
+
[atRuleSecondHalf in AtRuleSecondHalf]: CssProps & AllPseudos & WhitelistedAtRule;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
type WhitelistedSelector = AllPseudos & WhitelistedAtRule;
|
|
33
|
+
|
|
34
|
+
type ExtendedSelector = { [key: string]: CssProps | ExtendedSelector } & {
|
|
35
|
+
/**
|
|
36
|
+
* Using `selectors` is not valid here - you cannot nest a `selectors` object
|
|
37
|
+
* inside another `selectors` object.
|
|
38
|
+
*/
|
|
39
|
+
selectors?: never;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
type ExtendedSelectors = {
|
|
43
|
+
/**
|
|
44
|
+
* Provides a way to use selectors that have not been explicitly whitelisted
|
|
45
|
+
* in cssMap.
|
|
46
|
+
*
|
|
47
|
+
* This does not provide any type-checking for the selectors (thus allowing
|
|
48
|
+
* more expressive selectors), though this is more flexible and allows
|
|
49
|
+
* nesting selectors in other selectors.
|
|
50
|
+
*
|
|
51
|
+
* A selector defined both outside of the `selectors` object and
|
|
52
|
+
* inside the `selectors` object is a runtime error.
|
|
53
|
+
*
|
|
54
|
+
* Note that you cannot nest a `selectors` object inside another
|
|
55
|
+
* `selectors` object.
|
|
56
|
+
*
|
|
57
|
+
* Only use if absolutely necessary.
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* ```
|
|
61
|
+
* const myMap = cssMap({
|
|
62
|
+
* danger: {
|
|
63
|
+
* color: 'red',
|
|
64
|
+
* '@media': {
|
|
65
|
+
* '(min-width: 100px)': {
|
|
66
|
+
* font-size: '1.5em',
|
|
67
|
+
* },
|
|
68
|
+
* },
|
|
69
|
+
* '&:hover': {
|
|
70
|
+
* color: 'pink',
|
|
71
|
+
* },
|
|
72
|
+
* selectors: {
|
|
73
|
+
* '&:not(:active)': {
|
|
74
|
+
* backgroundColor: 'yellow',
|
|
75
|
+
* }
|
|
76
|
+
* },
|
|
77
|
+
* },
|
|
78
|
+
* success: {
|
|
79
|
+
* color: 'green',
|
|
80
|
+
* '@media': {
|
|
81
|
+
* '(min-width: 100px)': {
|
|
82
|
+
* font-size: '1.3em',
|
|
83
|
+
* },
|
|
84
|
+
* },
|
|
85
|
+
* '&:hover': {
|
|
86
|
+
* color: '#8f8',
|
|
87
|
+
* },
|
|
88
|
+
* selectors: {
|
|
89
|
+
* '&:not(:active)': {
|
|
90
|
+
* backgroundColor: 'white',
|
|
91
|
+
* }
|
|
92
|
+
* },
|
|
93
|
+
* },
|
|
94
|
+
* });
|
|
95
|
+
* ```
|
|
96
|
+
*/
|
|
97
|
+
selectors?: ExtendedSelector;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
type Variants<VariantName extends string> = Record<
|
|
101
|
+
VariantName,
|
|
102
|
+
CssProps & WhitelistedSelector & ExtendedSelectors
|
|
103
|
+
>;
|
|
104
|
+
type ReturnType<VariantName extends string> = Record<VariantName, CssProps>;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* ## cssMap
|
|
108
|
+
*
|
|
109
|
+
* Creates a collection of named CSS rules that are statically typed and useable with other Compiled APIs.
|
|
110
|
+
* For further details [read the documentation](https://compiledcssinjs.com/docs/api-cssmap).
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```
|
|
114
|
+
* const borderStyleMap = cssMap({
|
|
115
|
+
* none: { borderStyle: 'none' },
|
|
116
|
+
* solid: { borderStyle: 'solid' },
|
|
117
|
+
* });
|
|
118
|
+
* const Component = ({ borderStyle }) => <div css={css(borderStyleMap[borderStyle])} />
|
|
119
|
+
*
|
|
120
|
+
* <Component borderStyle="solid" />
|
|
121
|
+
* ```
|
|
122
|
+
*/
|
|
123
|
+
|
|
124
|
+
export default function cssMap<T extends string>(_styles: Variants<T>): Readonly<ReturnType<T>> {
|
|
125
|
+
throw createSetupError();
|
|
126
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flowtype definitions for pseudos
|
|
3
|
+
* Generated by Flowgen from a Typescript Definition
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
|
+
* @flow
|
|
6
|
+
*/
|
|
7
|
+
export type Pseudos =
|
|
8
|
+
| '&::after'
|
|
9
|
+
| '&::backdrop'
|
|
10
|
+
| '&::before'
|
|
11
|
+
| '&::cue'
|
|
12
|
+
| '&::cue-region'
|
|
13
|
+
| '&::first-letter'
|
|
14
|
+
| '&::first-line'
|
|
15
|
+
| '&::grammar-error'
|
|
16
|
+
| '&::marker'
|
|
17
|
+
| '&::placeholder'
|
|
18
|
+
| '&::selection'
|
|
19
|
+
| '&::spelling-error'
|
|
20
|
+
| '&::target-text'
|
|
21
|
+
| '&::view-transition'
|
|
22
|
+
| '&:active'
|
|
23
|
+
| '&:autofill'
|
|
24
|
+
| '&:blank'
|
|
25
|
+
| '&:checked'
|
|
26
|
+
| '&:default'
|
|
27
|
+
| '&:defined'
|
|
28
|
+
| '&:disabled'
|
|
29
|
+
| '&:empty'
|
|
30
|
+
| '&:enabled'
|
|
31
|
+
| '&:first'
|
|
32
|
+
| '&:focus'
|
|
33
|
+
| '&:focus-visible'
|
|
34
|
+
| '&:focus-within'
|
|
35
|
+
| '&:fullscreen'
|
|
36
|
+
| '&:hover'
|
|
37
|
+
| '&:in-range'
|
|
38
|
+
| '&:indeterminate'
|
|
39
|
+
| '&:invalid'
|
|
40
|
+
| '&:left'
|
|
41
|
+
| '&:link'
|
|
42
|
+
| '&:local-link'
|
|
43
|
+
| '&:optional'
|
|
44
|
+
| '&:out-of-range'
|
|
45
|
+
| '&:paused'
|
|
46
|
+
| '&:picture-in-picture'
|
|
47
|
+
| '&:placeholder-shown'
|
|
48
|
+
| '&:playing'
|
|
49
|
+
| '&:read-only'
|
|
50
|
+
| '&:read-write'
|
|
51
|
+
| '&:required'
|
|
52
|
+
| '&:right'
|
|
53
|
+
| '&:target'
|
|
54
|
+
| '&:user-invalid'
|
|
55
|
+
| '&:user-valid'
|
|
56
|
+
| '&:valid'
|
|
57
|
+
| '&:visited';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// List of pseudo-classes and pseudo-elements are from csstype
|
|
2
|
+
// but with & added in the front, so that we target the current element
|
|
3
|
+
// (instead of a child element)
|
|
4
|
+
|
|
5
|
+
// We also exclude anything that requires providing an argument
|
|
6
|
+
// (e.g. &:not(...) ), and anything that uses information from elements
|
|
7
|
+
// outside of the current element (e.g. &:first-of-type)
|
|
8
|
+
|
|
9
|
+
export type Pseudos =
|
|
10
|
+
| '&::after'
|
|
11
|
+
| '&::backdrop'
|
|
12
|
+
| '&::before'
|
|
13
|
+
| '&::cue'
|
|
14
|
+
| '&::cue-region'
|
|
15
|
+
| '&::first-letter'
|
|
16
|
+
| '&::first-line'
|
|
17
|
+
| '&::grammar-error'
|
|
18
|
+
| '&::marker'
|
|
19
|
+
| '&::placeholder'
|
|
20
|
+
| '&::selection'
|
|
21
|
+
| '&::spelling-error'
|
|
22
|
+
| '&::target-text'
|
|
23
|
+
| '&::view-transition'
|
|
24
|
+
| '&:active'
|
|
25
|
+
| '&:autofill'
|
|
26
|
+
| '&:blank'
|
|
27
|
+
| '&:checked'
|
|
28
|
+
| '&:default'
|
|
29
|
+
| '&:defined'
|
|
30
|
+
| '&:disabled'
|
|
31
|
+
| '&:empty'
|
|
32
|
+
| '&:enabled'
|
|
33
|
+
| '&:first'
|
|
34
|
+
| '&:focus'
|
|
35
|
+
| '&:focus-visible'
|
|
36
|
+
| '&:focus-within'
|
|
37
|
+
| '&:fullscreen'
|
|
38
|
+
| '&:hover'
|
|
39
|
+
| '&:in-range'
|
|
40
|
+
| '&:indeterminate'
|
|
41
|
+
| '&:invalid'
|
|
42
|
+
| '&:left'
|
|
43
|
+
| '&:link'
|
|
44
|
+
| '&:local-link'
|
|
45
|
+
| '&:optional'
|
|
46
|
+
| '&:out-of-range'
|
|
47
|
+
| '&:paused'
|
|
48
|
+
| '&:picture-in-picture'
|
|
49
|
+
| '&:placeholder-shown'
|
|
50
|
+
| '&:playing'
|
|
51
|
+
| '&:read-only'
|
|
52
|
+
| '&:read-write'
|
|
53
|
+
| '&:required'
|
|
54
|
+
| '&:right'
|
|
55
|
+
| '&:target'
|
|
56
|
+
| '&:user-invalid'
|
|
57
|
+
| '&:user-valid'
|
|
58
|
+
| '&:valid'
|
|
59
|
+
| '&:visited';
|
package/src/index.js.flow
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Flowtype definitions for index
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
|
-
* Flowgen v1.
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
7
|
import type { CssFunction, CSSProps, CssType } from './types';
|
|
@@ -10,3 +10,4 @@ declare export { keyframes } from './keyframes';
|
|
|
10
10
|
declare export { styled } from './styled';
|
|
11
11
|
declare export { ClassNames } from './class-names';
|
|
12
12
|
declare export { default as css } from './css';
|
|
13
|
+
declare export { default as cssMap } from './css-map';
|
package/src/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { keyframes } from './keyframes';
|
|
|
9
9
|
export { styled } from './styled';
|
|
10
10
|
export { ClassNames } from './class-names';
|
|
11
11
|
export { default as css } from './css';
|
|
12
|
+
export { default as cssMap } from './css-map';
|
|
12
13
|
|
|
13
14
|
// Pass through the (classic) jsx runtime.
|
|
14
15
|
// Compiled currently doesn't define its own and uses this purely to enable a local jsx namespace.
|
package/src/runtime/ac.js.flow
CHANGED
package/src/runtime/ax.js.flow
CHANGED
package/src/runtime.js.flow
CHANGED
package/src/styled/index.js.flow
CHANGED
package/src/types.js.flow
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Flowtype definitions for types
|
|
3
3
|
* Generated by Flowgen from a Typescript Definition
|
|
4
|
-
* Flowgen v1.
|
|
4
|
+
* Flowgen v1.21.0
|
|
5
5
|
* @flow
|
|
6
6
|
*/
|
|
7
7
|
import * as CSS from 'csstype';
|
|
@@ -19,11 +19,11 @@ export type CssType<TProps> = CssObject<TProps> | FunctionInterpolation<TProps>
|
|
|
19
19
|
/**
|
|
20
20
|
* These are all the CSS props that will exist.
|
|
21
21
|
*/
|
|
22
|
-
export type CSSProps<TProps> = CSS.Properties<CssFunction<TProps
|
|
23
|
-
export type CssObject<TProps> = {
|
|
22
|
+
export type CSSProps<TProps> = $ReadOnly<CSS.Properties<CssFunction<TProps>>>;
|
|
23
|
+
export type CssObject<TProps> = $ReadOnly<{
|
|
24
24
|
...CSSProps<TProps>,
|
|
25
25
|
[key: string]: CssFunction<TProps>,
|
|
26
|
-
}
|
|
26
|
+
}>;
|
|
27
27
|
export type CssFunction<TProps = mixed> =
|
|
28
28
|
| CssType<TProps>
|
|
29
29
|
| BasicTemplateInterpolations
|
package/src/types.ts
CHANGED
|
@@ -21,11 +21,11 @@ export type CssType<TProps> =
|
|
|
21
21
|
/**
|
|
22
22
|
* These are all the CSS props that will exist.
|
|
23
23
|
*/
|
|
24
|
-
export type CSSProps<TProps> = CSS.Properties<CssFunction<TProps
|
|
24
|
+
export type CSSProps<TProps> = Readonly<CSS.Properties<CssFunction<TProps>>>;
|
|
25
25
|
|
|
26
|
-
export type CssObject<TProps> = {
|
|
26
|
+
export type CssObject<TProps> = Readonly<{
|
|
27
27
|
[key: string]: CssFunction<TProps>;
|
|
28
|
-
}
|
|
28
|
+
}>;
|
|
29
29
|
|
|
30
30
|
// CSS inside of a CSS expression
|
|
31
31
|
export type CssFunction<TProps = unknown> =
|