@atlaskit/forge-react-types 0.3.0 → 0.4.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/CHANGELOG.md +10 -0
- package/dist/cjs/components/__generated__/BoxProps.codegen.js +62 -22
- package/dist/es2019/components/__generated__/BoxProps.codegen.js +62 -22
- package/dist/esm/components/__generated__/BoxProps.codegen.js +62 -22
- package/dist/types/components/__generated__/BoxProps.codegen.d.ts +60 -16
- package/dist/types/components/__generated__/DynamicTableProps.codegen.d.ts +2 -2
- package/dist/types/components/__generated__/FlexProps.codegen.d.ts +2 -2
- package/dist/types/components/__generated__/GridProps.codegen.d.ts +2 -2
- package/dist/types/components/__generated__/InlineProps.codegen.d.ts +2 -2
- package/dist/types/components/__generated__/StackProps.codegen.d.ts +2 -2
- package/dist/types/components/__generated__/TextAreaProps.codegen.d.ts +2 -2
- package/dist/types/components/__generated__/index.codegen.d.ts +8 -8
- package/dist/types-ts4.5/components/__generated__/BoxProps.codegen.d.ts +60 -16
- package/dist/types-ts4.5/components/__generated__/DynamicTableProps.codegen.d.ts +2 -2
- package/dist/types-ts4.5/components/__generated__/FlexProps.codegen.d.ts +2 -2
- package/dist/types-ts4.5/components/__generated__/GridProps.codegen.d.ts +2 -2
- package/dist/types-ts4.5/components/__generated__/InlineProps.codegen.d.ts +2 -2
- package/dist/types-ts4.5/components/__generated__/StackProps.codegen.d.ts +2 -2
- package/dist/types-ts4.5/components/__generated__/TextAreaProps.codegen.d.ts +2 -2
- package/dist/types-ts4.5/components/__generated__/index.codegen.d.ts +8 -8
- package/package.json +2 -2
- package/src/components/__generated__/BoxProps.codegen.tsx +39 -35
- package/src/components/__generated__/DynamicTableProps.codegen.tsx +2 -2
- package/src/components/__generated__/FlexProps.codegen.tsx +2 -2
- package/src/components/__generated__/GridProps.codegen.tsx +2 -2
- package/src/components/__generated__/InlineProps.codegen.tsx +2 -2
- package/src/components/__generated__/StackProps.codegen.tsx +2 -2
- package/src/components/__generated__/TextAreaProps.codegen.tsx +2 -2
- package/src/components/__generated__/index.codegen.ts +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @atlaskit/forge-react-types
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#75522](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/75522) [`202e7032a684`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/202e7032a684) - Reduce XCSS support scope on border-radius and border-width props
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 0.3.0
|
|
4
14
|
|
|
5
15
|
### Minor Changes
|
|
@@ -8,9 +8,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
*
|
|
9
9
|
* Extract component prop types from UIKit 2 components - BoxProps
|
|
10
10
|
*
|
|
11
|
-
* @codegen <<SignedSource::
|
|
11
|
+
* @codegen <<SignedSource::d3c324dbe7016205a18cc6190b57ad19>>
|
|
12
12
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
13
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/box/__generated__/index.partial.tsx <<SignedSource::
|
|
13
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/box/__generated__/index.partial.tsx <<SignedSource::851605328aa816df414378c18c7104fe>>
|
|
14
14
|
*/
|
|
15
15
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
|
|
16
16
|
|
|
@@ -84,26 +84,66 @@ var xcssValidator = makeXCSSValidator({
|
|
|
84
84
|
paddingRight: true,
|
|
85
85
|
paddingTop: true,
|
|
86
86
|
// other box related props
|
|
87
|
-
borderRadius:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
87
|
+
borderRadius: {
|
|
88
|
+
supportedValues: ['border.radius']
|
|
89
|
+
},
|
|
90
|
+
borderBottomLeftRadius: {
|
|
91
|
+
supportedValues: ['border.radius']
|
|
92
|
+
},
|
|
93
|
+
borderBottomRightRadius: {
|
|
94
|
+
supportedValues: ['border.radius']
|
|
95
|
+
},
|
|
96
|
+
borderTopLeftRadius: {
|
|
97
|
+
supportedValues: ['border.radius']
|
|
98
|
+
},
|
|
99
|
+
borderTopRightRadius: {
|
|
100
|
+
supportedValues: ['border.radius']
|
|
101
|
+
},
|
|
102
|
+
borderEndEndRadius: {
|
|
103
|
+
supportedValues: ['border.radius']
|
|
104
|
+
},
|
|
105
|
+
borderEndStartRadius: {
|
|
106
|
+
supportedValues: ['border.radius']
|
|
107
|
+
},
|
|
108
|
+
borderStartEndRadius: {
|
|
109
|
+
supportedValues: ['border.radius']
|
|
110
|
+
},
|
|
111
|
+
borderStartStartRadius: {
|
|
112
|
+
supportedValues: ['border.radius']
|
|
113
|
+
},
|
|
114
|
+
borderWidth: {
|
|
115
|
+
supportedValues: ['border.width']
|
|
116
|
+
},
|
|
117
|
+
borderBlockWidth: {
|
|
118
|
+
supportedValues: ['border.width']
|
|
119
|
+
},
|
|
120
|
+
borderBlockEndWidth: {
|
|
121
|
+
supportedValues: ['border.width']
|
|
122
|
+
},
|
|
123
|
+
borderBlockStartWidth: {
|
|
124
|
+
supportedValues: ['border.width']
|
|
125
|
+
},
|
|
126
|
+
borderBottomWidth: {
|
|
127
|
+
supportedValues: ['border.width']
|
|
128
|
+
},
|
|
129
|
+
borderInlineWidth: {
|
|
130
|
+
supportedValues: ['border.width']
|
|
131
|
+
},
|
|
132
|
+
borderInlineEndWidth: {
|
|
133
|
+
supportedValues: ['border.width']
|
|
134
|
+
},
|
|
135
|
+
borderInlineStartWidth: {
|
|
136
|
+
supportedValues: ['border.width']
|
|
137
|
+
},
|
|
138
|
+
borderLeftWidth: {
|
|
139
|
+
supportedValues: ['border.width']
|
|
140
|
+
},
|
|
141
|
+
borderRightWidth: {
|
|
142
|
+
supportedValues: ['border.width']
|
|
143
|
+
},
|
|
144
|
+
borderTopWidth: {
|
|
145
|
+
supportedValues: ['border.width']
|
|
146
|
+
},
|
|
107
147
|
// other props not in tokens based props
|
|
108
148
|
borderTopStyle: {
|
|
109
149
|
supportedValues: ['dotted', 'dashed', 'solid', 'none', 'hidden']
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - BoxProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::d3c324dbe7016205a18cc6190b57ad19>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/box/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/box/__generated__/index.partial.tsx <<SignedSource::851605328aa816df414378c18c7104fe>>
|
|
9
9
|
*/
|
|
10
10
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
|
|
11
11
|
|
|
@@ -79,26 +79,66 @@ const xcssValidator = makeXCSSValidator({
|
|
|
79
79
|
paddingRight: true,
|
|
80
80
|
paddingTop: true,
|
|
81
81
|
// other box related props
|
|
82
|
-
borderRadius:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
82
|
+
borderRadius: {
|
|
83
|
+
supportedValues: ['border.radius']
|
|
84
|
+
},
|
|
85
|
+
borderBottomLeftRadius: {
|
|
86
|
+
supportedValues: ['border.radius']
|
|
87
|
+
},
|
|
88
|
+
borderBottomRightRadius: {
|
|
89
|
+
supportedValues: ['border.radius']
|
|
90
|
+
},
|
|
91
|
+
borderTopLeftRadius: {
|
|
92
|
+
supportedValues: ['border.radius']
|
|
93
|
+
},
|
|
94
|
+
borderTopRightRadius: {
|
|
95
|
+
supportedValues: ['border.radius']
|
|
96
|
+
},
|
|
97
|
+
borderEndEndRadius: {
|
|
98
|
+
supportedValues: ['border.radius']
|
|
99
|
+
},
|
|
100
|
+
borderEndStartRadius: {
|
|
101
|
+
supportedValues: ['border.radius']
|
|
102
|
+
},
|
|
103
|
+
borderStartEndRadius: {
|
|
104
|
+
supportedValues: ['border.radius']
|
|
105
|
+
},
|
|
106
|
+
borderStartStartRadius: {
|
|
107
|
+
supportedValues: ['border.radius']
|
|
108
|
+
},
|
|
109
|
+
borderWidth: {
|
|
110
|
+
supportedValues: ['border.width']
|
|
111
|
+
},
|
|
112
|
+
borderBlockWidth: {
|
|
113
|
+
supportedValues: ['border.width']
|
|
114
|
+
},
|
|
115
|
+
borderBlockEndWidth: {
|
|
116
|
+
supportedValues: ['border.width']
|
|
117
|
+
},
|
|
118
|
+
borderBlockStartWidth: {
|
|
119
|
+
supportedValues: ['border.width']
|
|
120
|
+
},
|
|
121
|
+
borderBottomWidth: {
|
|
122
|
+
supportedValues: ['border.width']
|
|
123
|
+
},
|
|
124
|
+
borderInlineWidth: {
|
|
125
|
+
supportedValues: ['border.width']
|
|
126
|
+
},
|
|
127
|
+
borderInlineEndWidth: {
|
|
128
|
+
supportedValues: ['border.width']
|
|
129
|
+
},
|
|
130
|
+
borderInlineStartWidth: {
|
|
131
|
+
supportedValues: ['border.width']
|
|
132
|
+
},
|
|
133
|
+
borderLeftWidth: {
|
|
134
|
+
supportedValues: ['border.width']
|
|
135
|
+
},
|
|
136
|
+
borderRightWidth: {
|
|
137
|
+
supportedValues: ['border.width']
|
|
138
|
+
},
|
|
139
|
+
borderTopWidth: {
|
|
140
|
+
supportedValues: ['border.width']
|
|
141
|
+
},
|
|
102
142
|
// other props not in tokens based props
|
|
103
143
|
borderTopStyle: {
|
|
104
144
|
supportedValues: ['dotted', 'dashed', 'solid', 'none', 'hidden']
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - BoxProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::d3c324dbe7016205a18cc6190b57ad19>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/box/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/box/__generated__/index.partial.tsx <<SignedSource::851605328aa816df414378c18c7104fe>>
|
|
9
9
|
*/
|
|
10
10
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
|
|
11
11
|
|
|
@@ -79,26 +79,66 @@ var xcssValidator = makeXCSSValidator({
|
|
|
79
79
|
paddingRight: true,
|
|
80
80
|
paddingTop: true,
|
|
81
81
|
// other box related props
|
|
82
|
-
borderRadius:
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
82
|
+
borderRadius: {
|
|
83
|
+
supportedValues: ['border.radius']
|
|
84
|
+
},
|
|
85
|
+
borderBottomLeftRadius: {
|
|
86
|
+
supportedValues: ['border.radius']
|
|
87
|
+
},
|
|
88
|
+
borderBottomRightRadius: {
|
|
89
|
+
supportedValues: ['border.radius']
|
|
90
|
+
},
|
|
91
|
+
borderTopLeftRadius: {
|
|
92
|
+
supportedValues: ['border.radius']
|
|
93
|
+
},
|
|
94
|
+
borderTopRightRadius: {
|
|
95
|
+
supportedValues: ['border.radius']
|
|
96
|
+
},
|
|
97
|
+
borderEndEndRadius: {
|
|
98
|
+
supportedValues: ['border.radius']
|
|
99
|
+
},
|
|
100
|
+
borderEndStartRadius: {
|
|
101
|
+
supportedValues: ['border.radius']
|
|
102
|
+
},
|
|
103
|
+
borderStartEndRadius: {
|
|
104
|
+
supportedValues: ['border.radius']
|
|
105
|
+
},
|
|
106
|
+
borderStartStartRadius: {
|
|
107
|
+
supportedValues: ['border.radius']
|
|
108
|
+
},
|
|
109
|
+
borderWidth: {
|
|
110
|
+
supportedValues: ['border.width']
|
|
111
|
+
},
|
|
112
|
+
borderBlockWidth: {
|
|
113
|
+
supportedValues: ['border.width']
|
|
114
|
+
},
|
|
115
|
+
borderBlockEndWidth: {
|
|
116
|
+
supportedValues: ['border.width']
|
|
117
|
+
},
|
|
118
|
+
borderBlockStartWidth: {
|
|
119
|
+
supportedValues: ['border.width']
|
|
120
|
+
},
|
|
121
|
+
borderBottomWidth: {
|
|
122
|
+
supportedValues: ['border.width']
|
|
123
|
+
},
|
|
124
|
+
borderInlineWidth: {
|
|
125
|
+
supportedValues: ['border.width']
|
|
126
|
+
},
|
|
127
|
+
borderInlineEndWidth: {
|
|
128
|
+
supportedValues: ['border.width']
|
|
129
|
+
},
|
|
130
|
+
borderInlineStartWidth: {
|
|
131
|
+
supportedValues: ['border.width']
|
|
132
|
+
},
|
|
133
|
+
borderLeftWidth: {
|
|
134
|
+
supportedValues: ['border.width']
|
|
135
|
+
},
|
|
136
|
+
borderRightWidth: {
|
|
137
|
+
supportedValues: ['border.width']
|
|
138
|
+
},
|
|
139
|
+
borderTopWidth: {
|
|
140
|
+
supportedValues: ['border.width']
|
|
141
|
+
},
|
|
102
142
|
// other props not in tokens based props
|
|
103
143
|
borderTopStyle: {
|
|
104
144
|
supportedValues: ['dotted', 'dashed', 'solid', 'none', 'hidden']
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - BoxProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::d3c324dbe7016205a18cc6190b57ad19>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/box/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/box/__generated__/index.partial.tsx <<SignedSource::851605328aa816df414378c18c7104fe>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Box as PlatformBox } from '@atlaskit/primitives';
|
|
@@ -14,22 +14,26 @@ import type * as CSS from 'csstype';
|
|
|
14
14
|
import type { MediaQuery } from '@atlaskit/primitives';
|
|
15
15
|
import { tokensMap } from '@atlaskit/primitives';
|
|
16
16
|
type TokensMap = typeof tokensMap;
|
|
17
|
-
type
|
|
18
|
-
|
|
17
|
+
type TokensMapPropKey = keyof TokensMap;
|
|
18
|
+
type TokenizedProps = {
|
|
19
|
+
[K in TokensMapPropKey]?: keyof TokensMap[K];
|
|
19
20
|
};
|
|
20
|
-
type
|
|
21
|
-
|
|
21
|
+
type RawCSSValue = string & {};
|
|
22
|
+
type RelaxedTokenizedProps = {
|
|
23
|
+
[K in TokensMapPropKey]?: keyof TokensMap[K] | RawCSSValue;
|
|
22
24
|
};
|
|
23
25
|
type AllMedia = MediaQuery | '@media screen and (forced-colors: active), screen and (-ms-high-contrast: active)' | '@media (prefers-color-scheme: dark)' | '@media (prefers-color-scheme: light)' | '@media (prefers-reduced-motion: reduce)';
|
|
24
|
-
type StandardCSSProps = Omit<CSSProperties,
|
|
25
|
-
type
|
|
26
|
-
|
|
26
|
+
type StandardCSSProps = Omit<CSSProperties, TokensMapPropKey>;
|
|
27
|
+
type RestrictedPropsSpec = RelaxedTokenizedProps & StandardCSSProps;
|
|
28
|
+
type SafeCSSObject<SupportedPropKeys extends keyof CSSProperties = keyof CSSProperties, RawCSSPropKeys extends SupportedPropKeys = SupportedPropKeys, RestrictedProps extends RestrictedPropsSpec = RestrictedPropsSpec> = {
|
|
29
|
+
[MQ in AllMedia]?: Omit<SafeCSSObject<SupportedPropKeys, RawCSSPropKeys, RestrictedPropsSpec>, AllMedia>;
|
|
27
30
|
} & {
|
|
28
|
-
[Pseudo in CSS.Pseudos]?: Omit<SafeCSSObject<
|
|
29
|
-
} & Pick<
|
|
31
|
+
[Pseudo in CSS.Pseudos]?: Omit<SafeCSSObject<SupportedPropKeys, RawCSSPropKeys, RestrictedPropsSpec>, CSS.Pseudos | AllMedia>;
|
|
32
|
+
} & Pick<TokenizedProps, Exclude<Extract<SupportedPropKeys, TokensMapPropKey>, RawCSSPropKeys | keyof RestrictedProps>> & Pick<StandardCSSProps, Exclude<Extract<SupportedPropKeys, keyof StandardCSSProps>, RawCSSPropKeys | keyof RestrictedProps>> & // force standard css prop values for allowCSS: true
|
|
33
|
+
Pick<CSSProperties, Extract<RawCSSPropKeys, keyof CSSProperties>> & RestrictedProps;
|
|
30
34
|
type XCSSValidatorParam = {
|
|
31
35
|
[key in keyof CSSProperties]: true | {
|
|
32
|
-
supportedValues: Array<
|
|
36
|
+
supportedValues: Array<RestrictedPropsSpec[key]>;
|
|
33
37
|
} | {
|
|
34
38
|
allowCSS: true;
|
|
35
39
|
};
|
|
@@ -44,14 +48,14 @@ type XCSSValidatorParam = {
|
|
|
44
48
|
* as specified in the supportedXCSSProps list. The props that are not supported will be removed from the
|
|
45
49
|
* returned style object and a warning will be logged in the console.
|
|
46
50
|
*/
|
|
47
|
-
declare const makeXCSSValidator: <U extends XCSSValidatorParam>(supportedXCSSProps: U) => (styleObj: SafeCSSObject<keyof CSSProperties, keyof CSSProperties,
|
|
51
|
+
declare const makeXCSSValidator: <U extends XCSSValidatorParam>(supportedXCSSProps: U) => (styleObj: SafeCSSObject<keyof CSSProperties, keyof CSSProperties, RestrictedPropsSpec> | SafeCSSObject<Extract<keyof U, keyof CSSProperties>, Extract<{
|
|
48
52
|
[K in Extract<keyof U, keyof CSSProperties>]: U[K] extends {
|
|
49
53
|
allowCSS: true;
|
|
50
54
|
} ? K : never;
|
|
51
55
|
}[Extract<keyof U, keyof CSSProperties>], Extract<keyof U, keyof CSSProperties>>, {
|
|
52
56
|
[K_2 in Extract<{
|
|
53
57
|
[K_1 in Extract<keyof U, keyof CSSProperties>]: U[K_1] extends {
|
|
54
|
-
supportedValues:
|
|
58
|
+
supportedValues: RestrictedPropsSpec[K_1][];
|
|
55
59
|
} ? K_1 : never;
|
|
56
60
|
}[Extract<keyof U, keyof CSSProperties>], Extract<keyof U, keyof CSSProperties>>]?: (U[K_2] extends {
|
|
57
61
|
supportedValues: infer V;
|
|
@@ -63,7 +67,7 @@ declare const makeXCSSValidator: <U extends XCSSValidatorParam>(supportedXCSSPro
|
|
|
63
67
|
}[Extract<keyof U, keyof CSSProperties>], Extract<keyof U, keyof CSSProperties>>, {
|
|
64
68
|
[K_2 in Extract<{
|
|
65
69
|
[K_1 in Extract<keyof U, keyof CSSProperties>]: U[K_1] extends {
|
|
66
|
-
supportedValues:
|
|
70
|
+
supportedValues: RestrictedPropsSpec[K_1][];
|
|
67
71
|
} ? K_1 : never;
|
|
68
72
|
}[Extract<keyof U, keyof CSSProperties>], Extract<keyof U, keyof CSSProperties>>]?: (U[K_2] extends {
|
|
69
73
|
supportedValues: infer V;
|
|
@@ -71,7 +75,27 @@ declare const makeXCSSValidator: <U extends XCSSValidatorParam>(supportedXCSSPro
|
|
|
71
75
|
}>;
|
|
72
76
|
export { makeXCSSValidator };
|
|
73
77
|
export type { SafeCSSObject };
|
|
74
|
-
declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof CSSProperties,
|
|
78
|
+
declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof CSSProperties, RestrictedPropsSpec> | SafeCSSObject<"backgroundColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockEndWidth" | "borderBlockStartColor" | "borderBlockStartWidth" | "borderBlockWidth" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomWidth" | "borderColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderInlineColor" | "borderInlineEndColor" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartWidth" | "borderInlineWidth" | "borderLeftColor" | "borderLeftWidth" | "borderRadius" | "borderRightColor" | "borderRightWidth" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopWidth" | "borderWidth" | "boxShadow" | "color" | "height" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "width" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderTopStyle" | "position" | "borderStyle", "height" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "width", {
|
|
79
|
+
borderBlockEndWidth?: "border.width" | undefined;
|
|
80
|
+
borderBlockStartWidth?: "border.width" | undefined;
|
|
81
|
+
borderBlockWidth?: "border.width" | undefined;
|
|
82
|
+
borderBottomLeftRadius?: "border.radius" | undefined;
|
|
83
|
+
borderBottomRightRadius?: "border.radius" | undefined;
|
|
84
|
+
borderBottomWidth?: "border.width" | undefined;
|
|
85
|
+
borderEndEndRadius?: "border.radius" | undefined;
|
|
86
|
+
borderEndStartRadius?: "border.radius" | undefined;
|
|
87
|
+
borderInlineEndWidth?: "border.width" | undefined;
|
|
88
|
+
borderInlineStartWidth?: "border.width" | undefined;
|
|
89
|
+
borderInlineWidth?: "border.width" | undefined;
|
|
90
|
+
borderLeftWidth?: "border.width" | undefined;
|
|
91
|
+
borderRadius?: "border.radius" | undefined;
|
|
92
|
+
borderRightWidth?: "border.width" | undefined;
|
|
93
|
+
borderStartEndRadius?: "border.radius" | undefined;
|
|
94
|
+
borderStartStartRadius?: "border.radius" | undefined;
|
|
95
|
+
borderTopLeftRadius?: "border.radius" | undefined;
|
|
96
|
+
borderTopRightRadius?: "border.radius" | undefined;
|
|
97
|
+
borderTopWidth?: "border.width" | undefined;
|
|
98
|
+
borderWidth?: "border.width" | undefined;
|
|
75
99
|
borderBottomStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
76
100
|
borderLeftStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
77
101
|
borderRightStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
@@ -79,6 +103,26 @@ declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof
|
|
|
79
103
|
position?: "relative" | "static" | undefined;
|
|
80
104
|
borderStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
81
105
|
}>) => SafeCSSObject<"backgroundColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockEndWidth" | "borderBlockStartColor" | "borderBlockStartWidth" | "borderBlockWidth" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomWidth" | "borderColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderInlineColor" | "borderInlineEndColor" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartWidth" | "borderInlineWidth" | "borderLeftColor" | "borderLeftWidth" | "borderRadius" | "borderRightColor" | "borderRightWidth" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopWidth" | "borderWidth" | "boxShadow" | "color" | "height" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "width" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderTopStyle" | "position" | "borderStyle", "height" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "width", {
|
|
106
|
+
borderBlockEndWidth?: "border.width" | undefined;
|
|
107
|
+
borderBlockStartWidth?: "border.width" | undefined;
|
|
108
|
+
borderBlockWidth?: "border.width" | undefined;
|
|
109
|
+
borderBottomLeftRadius?: "border.radius" | undefined;
|
|
110
|
+
borderBottomRightRadius?: "border.radius" | undefined;
|
|
111
|
+
borderBottomWidth?: "border.width" | undefined;
|
|
112
|
+
borderEndEndRadius?: "border.radius" | undefined;
|
|
113
|
+
borderEndStartRadius?: "border.radius" | undefined;
|
|
114
|
+
borderInlineEndWidth?: "border.width" | undefined;
|
|
115
|
+
borderInlineStartWidth?: "border.width" | undefined;
|
|
116
|
+
borderInlineWidth?: "border.width" | undefined;
|
|
117
|
+
borderLeftWidth?: "border.width" | undefined;
|
|
118
|
+
borderRadius?: "border.radius" | undefined;
|
|
119
|
+
borderRightWidth?: "border.width" | undefined;
|
|
120
|
+
borderStartEndRadius?: "border.radius" | undefined;
|
|
121
|
+
borderStartStartRadius?: "border.radius" | undefined;
|
|
122
|
+
borderTopLeftRadius?: "border.radius" | undefined;
|
|
123
|
+
borderTopRightRadius?: "border.radius" | undefined;
|
|
124
|
+
borderTopWidth?: "border.width" | undefined;
|
|
125
|
+
borderWidth?: "border.width" | undefined;
|
|
82
126
|
borderBottomStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
83
127
|
borderLeftStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
84
128
|
borderRightStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - DynamicTableProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::3ec687a739b617f4cbe7a8969062cca9>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/dynamictable/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/dynamictable/__generated__/index.partial.tsx <<SignedSource::027c1440c4dc132bea4898d69f352f23>>
|
|
9
9
|
*/
|
|
10
10
|
import type { RowType, StatefulProps } from '@atlaskit/dynamic-table/types';
|
|
11
11
|
type NewRowType = Pick<RowType, 'cells' | 'key' | 'isHighlighted'>;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - FlexProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::2660d61ae4436d4239c8c7ed6c343415>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/flex/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/flex/__generated__/index.partial.tsx <<SignedSource::87ea6214c3b6ee4b2d36987f1682074e>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Flex as PlatformFlex } from '@atlaskit/primitives';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - GridProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::4f326921dc60e223cfd0ba05be93a9eb>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/grid/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/grid/__generated__/index.partial.tsx <<SignedSource::82ef52184f696a17dcca4c8a84e23441>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Grid as PlatformGrid } from '@atlaskit/primitives';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - InlineProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::807734fa360131f49ef4e7bb552bcb95>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/inline/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/inline/__generated__/index.partial.tsx <<SignedSource::d8e43c17dbcecadc5f72802f65dc1eb4>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Inline as PlatformInline } from '@atlaskit/primitives';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - StackProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::078aee141bb0e11ae719fd7e91902969>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/stack/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/stack/__generated__/index.partial.tsx <<SignedSource::a7e2eb6e4d64591d6b9659e49b6ca7cc>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Stack as PlatformStack } from '@atlaskit/primitives';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - TextAreaProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::57ac3475df0ec3a8015a85ab681b0bec>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/textarea/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/textarea/__generated__/index.partial.tsx <<SignedSource::bebce724d5e7ad41e8a3cd3c50b5ea6f>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformTextarea from '@atlaskit/textarea';
|
|
@@ -3,29 +3,29 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Index file for component prop types
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::0af01b1102b6d9b9f668cbed2fe0b27b>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
8
|
* @codegenDependency BadgeProps.codegen.tsx <<SignedSource::4759a95fede44eb7af89a4ada26252e9>>
|
|
9
9
|
* @codegenDependency BleedProps.codegen.tsx <<SignedSource::376f3f60ae6c1912e80b568958802fb5>>
|
|
10
|
-
* @codegenDependency BoxProps.codegen.tsx <<SignedSource::
|
|
10
|
+
* @codegenDependency BoxProps.codegen.tsx <<SignedSource::981f130ecaeeb0b694d4f81c2dc8255d>>
|
|
11
11
|
* @codegenDependency ButtonGroupProps.codegen.tsx <<SignedSource::a529cee05261919cb2eccacb9837aed0>>
|
|
12
12
|
* @codegenDependency ButtonProps.codegen.tsx <<SignedSource::cc45a3581574c0496c410cbba542fa50>>
|
|
13
13
|
* @codegenDependency CheckboxProps.codegen.tsx <<SignedSource::64e2dd8eb8b122646e0a11c5a029a4d6>>
|
|
14
14
|
* @codegenDependency CodeBlockProps.codegen.tsx <<SignedSource::54097e23c683ba0621cb0c224cbdee7a>>
|
|
15
15
|
* @codegenDependency CodeProps.codegen.tsx <<SignedSource::bc1c608d36eb55ac7c4eb0545c4beda3>>
|
|
16
16
|
* @codegenDependency DatePickerProps.codegen.tsx <<SignedSource::91eb5f1515fdb028c2916d07b59ea49a>>
|
|
17
|
-
* @codegenDependency DynamicTableProps.codegen.tsx <<SignedSource::
|
|
17
|
+
* @codegenDependency DynamicTableProps.codegen.tsx <<SignedSource::5e1fb410256c2a689e97b87ac6152074>>
|
|
18
18
|
* @codegenDependency ErrorMessageProps.codegen.tsx <<SignedSource::63e86a9739201928809df1932f0ceec9>>
|
|
19
|
-
* @codegenDependency FlexProps.codegen.tsx <<SignedSource::
|
|
19
|
+
* @codegenDependency FlexProps.codegen.tsx <<SignedSource::7f93c1d8cb30006984a5a43ebd95e4c8>>
|
|
20
20
|
* @codegenDependency FormFooterProps.codegen.tsx <<SignedSource::3c26d17eab08af0dfa1beabfc6065d18>>
|
|
21
21
|
* @codegenDependency FormHeaderProps.codegen.tsx <<SignedSource::1327f7e4c259cd2d5c1bf3198cc8c1eb>>
|
|
22
22
|
* @codegenDependency FormProps.codegen.tsx <<SignedSource::22baf31090e921045516d5295e2226ef>>
|
|
23
23
|
* @codegenDependency FormSectionProps.codegen.tsx <<SignedSource::43e20fc89b7abc977b8f10fd61ba6ea7>>
|
|
24
|
-
* @codegenDependency GridProps.codegen.tsx <<SignedSource::
|
|
24
|
+
* @codegenDependency GridProps.codegen.tsx <<SignedSource::e98d5d15bb747873a1436cfa2428fdf6>>
|
|
25
25
|
* @codegenDependency HeadingProps.codegen.tsx <<SignedSource::e34844b4af1a7c827505fe3ff587eda9>>
|
|
26
26
|
* @codegenDependency HelperMessageProps.codegen.tsx <<SignedSource::8afdecf85bd6b2539ac011e4f5249b09>>
|
|
27
27
|
* @codegenDependency IconProps.codegen.tsx <<SignedSource::24314f42437fe2bf4e2693316b97bb74>>
|
|
28
|
-
* @codegenDependency InlineProps.codegen.tsx <<SignedSource::
|
|
28
|
+
* @codegenDependency InlineProps.codegen.tsx <<SignedSource::e9624f171d2611c81d05bb70d5d5efd8>>
|
|
29
29
|
* @codegenDependency LabelProps.codegen.tsx <<SignedSource::32b9d05796f68e57b79ad99d6c37d246>>
|
|
30
30
|
* @codegenDependency LinkButtonProps.codegen.tsx <<SignedSource::9d91758a306a8ad6dadcd2693603ca0c>>
|
|
31
31
|
* @codegenDependency LoadingButtonProps.codegen.tsx <<SignedSource::8db1bb8fad98a6f0d577c0f55e30d679>>
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
* @codegenDependency SectionMessageProps.codegen.tsx <<SignedSource::dad8a3d213b5863972ea115389c33fdc>>
|
|
46
46
|
* @codegenDependency SelectProps.codegen.tsx <<SignedSource::5c1824fd709a27eb74098e537e7f3541>>
|
|
47
47
|
* @codegenDependency SpinnerProps.codegen.tsx <<SignedSource::602b1cc246e020dd7f32222a4d6bbb6e>>
|
|
48
|
-
* @codegenDependency StackProps.codegen.tsx <<SignedSource::
|
|
48
|
+
* @codegenDependency StackProps.codegen.tsx <<SignedSource::d3889e3b819fa2f96c0ce38a52734b76>>
|
|
49
49
|
* @codegenDependency TabListProps.codegen.tsx <<SignedSource::ba3257cc8f382811ae1630adc50c4fac>>
|
|
50
50
|
* @codegenDependency TabPanelProps.codegen.tsx <<SignedSource::dda2f64bb72b6b2d308412f1f9dae114>>
|
|
51
51
|
* @codegenDependency TabProps.codegen.tsx <<SignedSource::6edd2e77416e83af2879893b06c1e004>>
|
|
52
52
|
* @codegenDependency TabsProps.codegen.tsx <<SignedSource::014a7bfcca5304d7bb613a53d9117d01>>
|
|
53
53
|
* @codegenDependency TagGroupProps.codegen.tsx <<SignedSource::e8e2bd37a4b5175ff1bf296b465ef727>>
|
|
54
54
|
* @codegenDependency TagProps.codegen.tsx <<SignedSource::86aff9005e1db842009ece108d61a6b1>>
|
|
55
|
-
* @codegenDependency TextAreaProps.codegen.tsx <<SignedSource::
|
|
55
|
+
* @codegenDependency TextAreaProps.codegen.tsx <<SignedSource::1ffeeec37e609f7a8e8fa7a4abcffc28>>
|
|
56
56
|
* @codegenDependency TextfieldProps.codegen.tsx <<SignedSource::f029b18bd851bfca81384b61b12ba04b>>
|
|
57
57
|
* @codegenDependency ToggleProps.codegen.tsx <<SignedSource::4cf587b7a202a52ddb50db0157c2b0e5>>
|
|
58
58
|
* @codegenDependency TooltipProps.codegen.tsx <<SignedSource::aa2be4a5cb38eecf50dd652836a3e6ad>>
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - BoxProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::d3c324dbe7016205a18cc6190b57ad19>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/box/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/box/__generated__/index.partial.tsx <<SignedSource::851605328aa816df414378c18c7104fe>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Box as PlatformBox } from '@atlaskit/primitives';
|
|
@@ -14,22 +14,26 @@ import type * as CSS from 'csstype';
|
|
|
14
14
|
import type { MediaQuery } from '@atlaskit/primitives';
|
|
15
15
|
import { tokensMap } from '@atlaskit/primitives';
|
|
16
16
|
type TokensMap = typeof tokensMap;
|
|
17
|
-
type
|
|
18
|
-
|
|
17
|
+
type TokensMapPropKey = keyof TokensMap;
|
|
18
|
+
type TokenizedProps = {
|
|
19
|
+
[K in TokensMapPropKey]?: keyof TokensMap[K];
|
|
19
20
|
};
|
|
20
|
-
type
|
|
21
|
-
|
|
21
|
+
type RawCSSValue = string & {};
|
|
22
|
+
type RelaxedTokenizedProps = {
|
|
23
|
+
[K in TokensMapPropKey]?: keyof TokensMap[K] | RawCSSValue;
|
|
22
24
|
};
|
|
23
25
|
type AllMedia = MediaQuery | '@media screen and (forced-colors: active), screen and (-ms-high-contrast: active)' | '@media (prefers-color-scheme: dark)' | '@media (prefers-color-scheme: light)' | '@media (prefers-reduced-motion: reduce)';
|
|
24
|
-
type StandardCSSProps = Omit<CSSProperties,
|
|
25
|
-
type
|
|
26
|
-
|
|
26
|
+
type StandardCSSProps = Omit<CSSProperties, TokensMapPropKey>;
|
|
27
|
+
type RestrictedPropsSpec = RelaxedTokenizedProps & StandardCSSProps;
|
|
28
|
+
type SafeCSSObject<SupportedPropKeys extends keyof CSSProperties = keyof CSSProperties, RawCSSPropKeys extends SupportedPropKeys = SupportedPropKeys, RestrictedProps extends RestrictedPropsSpec = RestrictedPropsSpec> = {
|
|
29
|
+
[MQ in AllMedia]?: Omit<SafeCSSObject<SupportedPropKeys, RawCSSPropKeys, RestrictedPropsSpec>, AllMedia>;
|
|
27
30
|
} & {
|
|
28
|
-
[Pseudo in CSS.Pseudos]?: Omit<SafeCSSObject<
|
|
29
|
-
} & Pick<
|
|
31
|
+
[Pseudo in CSS.Pseudos]?: Omit<SafeCSSObject<SupportedPropKeys, RawCSSPropKeys, RestrictedPropsSpec>, CSS.Pseudos | AllMedia>;
|
|
32
|
+
} & Pick<TokenizedProps, Exclude<Extract<SupportedPropKeys, TokensMapPropKey>, RawCSSPropKeys | keyof RestrictedProps>> & Pick<StandardCSSProps, Exclude<Extract<SupportedPropKeys, keyof StandardCSSProps>, RawCSSPropKeys | keyof RestrictedProps>> & // force standard css prop values for allowCSS: true
|
|
33
|
+
Pick<CSSProperties, Extract<RawCSSPropKeys, keyof CSSProperties>> & RestrictedProps;
|
|
30
34
|
type XCSSValidatorParam = {
|
|
31
35
|
[key in keyof CSSProperties]: true | {
|
|
32
|
-
supportedValues: Array<
|
|
36
|
+
supportedValues: Array<RestrictedPropsSpec[key]>;
|
|
33
37
|
} | {
|
|
34
38
|
allowCSS: true;
|
|
35
39
|
};
|
|
@@ -44,14 +48,14 @@ type XCSSValidatorParam = {
|
|
|
44
48
|
* as specified in the supportedXCSSProps list. The props that are not supported will be removed from the
|
|
45
49
|
* returned style object and a warning will be logged in the console.
|
|
46
50
|
*/
|
|
47
|
-
declare const makeXCSSValidator: <U extends XCSSValidatorParam>(supportedXCSSProps: U) => (styleObj: SafeCSSObject<keyof CSSProperties, keyof CSSProperties,
|
|
51
|
+
declare const makeXCSSValidator: <U extends XCSSValidatorParam>(supportedXCSSProps: U) => (styleObj: SafeCSSObject<keyof CSSProperties, keyof CSSProperties, RestrictedPropsSpec> | SafeCSSObject<Extract<keyof U, keyof CSSProperties>, Extract<{
|
|
48
52
|
[K in Extract<keyof U, keyof CSSProperties>]: U[K] extends {
|
|
49
53
|
allowCSS: true;
|
|
50
54
|
} ? K : never;
|
|
51
55
|
}[Extract<keyof U, keyof CSSProperties>], Extract<keyof U, keyof CSSProperties>>, {
|
|
52
56
|
[K_2 in Extract<{
|
|
53
57
|
[K_1 in Extract<keyof U, keyof CSSProperties>]: U[K_1] extends {
|
|
54
|
-
supportedValues:
|
|
58
|
+
supportedValues: RestrictedPropsSpec[K_1][];
|
|
55
59
|
} ? K_1 : never;
|
|
56
60
|
}[Extract<keyof U, keyof CSSProperties>], Extract<keyof U, keyof CSSProperties>>]?: (U[K_2] extends {
|
|
57
61
|
supportedValues: infer V;
|
|
@@ -63,7 +67,7 @@ declare const makeXCSSValidator: <U extends XCSSValidatorParam>(supportedXCSSPro
|
|
|
63
67
|
}[Extract<keyof U, keyof CSSProperties>], Extract<keyof U, keyof CSSProperties>>, {
|
|
64
68
|
[K_2 in Extract<{
|
|
65
69
|
[K_1 in Extract<keyof U, keyof CSSProperties>]: U[K_1] extends {
|
|
66
|
-
supportedValues:
|
|
70
|
+
supportedValues: RestrictedPropsSpec[K_1][];
|
|
67
71
|
} ? K_1 : never;
|
|
68
72
|
}[Extract<keyof U, keyof CSSProperties>], Extract<keyof U, keyof CSSProperties>>]?: (U[K_2] extends {
|
|
69
73
|
supportedValues: infer V;
|
|
@@ -71,7 +75,27 @@ declare const makeXCSSValidator: <U extends XCSSValidatorParam>(supportedXCSSPro
|
|
|
71
75
|
}>;
|
|
72
76
|
export { makeXCSSValidator };
|
|
73
77
|
export type { SafeCSSObject };
|
|
74
|
-
declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof CSSProperties,
|
|
78
|
+
declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof CSSProperties, RestrictedPropsSpec> | SafeCSSObject<"backgroundColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockEndWidth" | "borderBlockStartColor" | "borderBlockStartWidth" | "borderBlockWidth" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomWidth" | "borderColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderInlineColor" | "borderInlineEndColor" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartWidth" | "borderInlineWidth" | "borderLeftColor" | "borderLeftWidth" | "borderRadius" | "borderRightColor" | "borderRightWidth" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopWidth" | "borderWidth" | "boxShadow" | "color" | "height" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "width" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderTopStyle" | "position" | "borderStyle", "height" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "width", {
|
|
79
|
+
borderBlockEndWidth?: "border.width" | undefined;
|
|
80
|
+
borderBlockStartWidth?: "border.width" | undefined;
|
|
81
|
+
borderBlockWidth?: "border.width" | undefined;
|
|
82
|
+
borderBottomLeftRadius?: "border.radius" | undefined;
|
|
83
|
+
borderBottomRightRadius?: "border.radius" | undefined;
|
|
84
|
+
borderBottomWidth?: "border.width" | undefined;
|
|
85
|
+
borderEndEndRadius?: "border.radius" | undefined;
|
|
86
|
+
borderEndStartRadius?: "border.radius" | undefined;
|
|
87
|
+
borderInlineEndWidth?: "border.width" | undefined;
|
|
88
|
+
borderInlineStartWidth?: "border.width" | undefined;
|
|
89
|
+
borderInlineWidth?: "border.width" | undefined;
|
|
90
|
+
borderLeftWidth?: "border.width" | undefined;
|
|
91
|
+
borderRadius?: "border.radius" | undefined;
|
|
92
|
+
borderRightWidth?: "border.width" | undefined;
|
|
93
|
+
borderStartEndRadius?: "border.radius" | undefined;
|
|
94
|
+
borderStartStartRadius?: "border.radius" | undefined;
|
|
95
|
+
borderTopLeftRadius?: "border.radius" | undefined;
|
|
96
|
+
borderTopRightRadius?: "border.radius" | undefined;
|
|
97
|
+
borderTopWidth?: "border.width" | undefined;
|
|
98
|
+
borderWidth?: "border.width" | undefined;
|
|
75
99
|
borderBottomStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
76
100
|
borderLeftStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
77
101
|
borderRightStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
@@ -79,6 +103,26 @@ declare const xcssValidator: (styleObj: SafeCSSObject<keyof CSSProperties, keyof
|
|
|
79
103
|
position?: "relative" | "static" | undefined;
|
|
80
104
|
borderStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
81
105
|
}>) => SafeCSSObject<"backgroundColor" | "borderBlockColor" | "borderBlockEndColor" | "borderBlockEndWidth" | "borderBlockStartColor" | "borderBlockStartWidth" | "borderBlockWidth" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomWidth" | "borderColor" | "borderEndEndRadius" | "borderEndStartRadius" | "borderInlineColor" | "borderInlineEndColor" | "borderInlineEndWidth" | "borderInlineStartColor" | "borderInlineStartWidth" | "borderInlineWidth" | "borderLeftColor" | "borderLeftWidth" | "borderRadius" | "borderRightColor" | "borderRightWidth" | "borderStartEndRadius" | "borderStartStartRadius" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopWidth" | "borderWidth" | "boxShadow" | "color" | "height" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "width" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderTopStyle" | "position" | "borderStyle", "height" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "width", {
|
|
106
|
+
borderBlockEndWidth?: "border.width" | undefined;
|
|
107
|
+
borderBlockStartWidth?: "border.width" | undefined;
|
|
108
|
+
borderBlockWidth?: "border.width" | undefined;
|
|
109
|
+
borderBottomLeftRadius?: "border.radius" | undefined;
|
|
110
|
+
borderBottomRightRadius?: "border.radius" | undefined;
|
|
111
|
+
borderBottomWidth?: "border.width" | undefined;
|
|
112
|
+
borderEndEndRadius?: "border.radius" | undefined;
|
|
113
|
+
borderEndStartRadius?: "border.radius" | undefined;
|
|
114
|
+
borderInlineEndWidth?: "border.width" | undefined;
|
|
115
|
+
borderInlineStartWidth?: "border.width" | undefined;
|
|
116
|
+
borderInlineWidth?: "border.width" | undefined;
|
|
117
|
+
borderLeftWidth?: "border.width" | undefined;
|
|
118
|
+
borderRadius?: "border.radius" | undefined;
|
|
119
|
+
borderRightWidth?: "border.width" | undefined;
|
|
120
|
+
borderStartEndRadius?: "border.radius" | undefined;
|
|
121
|
+
borderStartStartRadius?: "border.radius" | undefined;
|
|
122
|
+
borderTopLeftRadius?: "border.radius" | undefined;
|
|
123
|
+
borderTopRightRadius?: "border.radius" | undefined;
|
|
124
|
+
borderTopWidth?: "border.width" | undefined;
|
|
125
|
+
borderWidth?: "border.width" | undefined;
|
|
82
126
|
borderBottomStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
83
127
|
borderLeftStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
84
128
|
borderRightStyle?: "dashed" | "dotted" | "hidden" | "none" | "solid" | undefined;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - DynamicTableProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::3ec687a739b617f4cbe7a8969062cca9>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/dynamictable/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/dynamictable/__generated__/index.partial.tsx <<SignedSource::027c1440c4dc132bea4898d69f352f23>>
|
|
9
9
|
*/
|
|
10
10
|
import type { RowType, StatefulProps } from '@atlaskit/dynamic-table/types';
|
|
11
11
|
type NewRowType = Pick<RowType, 'cells' | 'key' | 'isHighlighted'>;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - FlexProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::2660d61ae4436d4239c8c7ed6c343415>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/flex/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/flex/__generated__/index.partial.tsx <<SignedSource::87ea6214c3b6ee4b2d36987f1682074e>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Flex as PlatformFlex } from '@atlaskit/primitives';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - GridProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::4f326921dc60e223cfd0ba05be93a9eb>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/grid/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/grid/__generated__/index.partial.tsx <<SignedSource::82ef52184f696a17dcca4c8a84e23441>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Grid as PlatformGrid } from '@atlaskit/primitives';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - InlineProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::807734fa360131f49ef4e7bb552bcb95>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/inline/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/inline/__generated__/index.partial.tsx <<SignedSource::d8e43c17dbcecadc5f72802f65dc1eb4>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Inline as PlatformInline } from '@atlaskit/primitives';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - StackProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::078aee141bb0e11ae719fd7e91902969>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/stack/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/stack/__generated__/index.partial.tsx <<SignedSource::a7e2eb6e4d64591d6b9659e49b6ca7cc>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Stack as PlatformStack } from '@atlaskit/primitives';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - TextAreaProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::57ac3475df0ec3a8015a85ab681b0bec>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/textarea/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/textarea/__generated__/index.partial.tsx <<SignedSource::bebce724d5e7ad41e8a3cd3c50b5ea6f>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformTextarea from '@atlaskit/textarea';
|
|
@@ -3,29 +3,29 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Index file for component prop types
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::0af01b1102b6d9b9f668cbed2fe0b27b>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
8
|
* @codegenDependency BadgeProps.codegen.tsx <<SignedSource::4759a95fede44eb7af89a4ada26252e9>>
|
|
9
9
|
* @codegenDependency BleedProps.codegen.tsx <<SignedSource::376f3f60ae6c1912e80b568958802fb5>>
|
|
10
|
-
* @codegenDependency BoxProps.codegen.tsx <<SignedSource::
|
|
10
|
+
* @codegenDependency BoxProps.codegen.tsx <<SignedSource::981f130ecaeeb0b694d4f81c2dc8255d>>
|
|
11
11
|
* @codegenDependency ButtonGroupProps.codegen.tsx <<SignedSource::a529cee05261919cb2eccacb9837aed0>>
|
|
12
12
|
* @codegenDependency ButtonProps.codegen.tsx <<SignedSource::cc45a3581574c0496c410cbba542fa50>>
|
|
13
13
|
* @codegenDependency CheckboxProps.codegen.tsx <<SignedSource::64e2dd8eb8b122646e0a11c5a029a4d6>>
|
|
14
14
|
* @codegenDependency CodeBlockProps.codegen.tsx <<SignedSource::54097e23c683ba0621cb0c224cbdee7a>>
|
|
15
15
|
* @codegenDependency CodeProps.codegen.tsx <<SignedSource::bc1c608d36eb55ac7c4eb0545c4beda3>>
|
|
16
16
|
* @codegenDependency DatePickerProps.codegen.tsx <<SignedSource::91eb5f1515fdb028c2916d07b59ea49a>>
|
|
17
|
-
* @codegenDependency DynamicTableProps.codegen.tsx <<SignedSource::
|
|
17
|
+
* @codegenDependency DynamicTableProps.codegen.tsx <<SignedSource::5e1fb410256c2a689e97b87ac6152074>>
|
|
18
18
|
* @codegenDependency ErrorMessageProps.codegen.tsx <<SignedSource::63e86a9739201928809df1932f0ceec9>>
|
|
19
|
-
* @codegenDependency FlexProps.codegen.tsx <<SignedSource::
|
|
19
|
+
* @codegenDependency FlexProps.codegen.tsx <<SignedSource::7f93c1d8cb30006984a5a43ebd95e4c8>>
|
|
20
20
|
* @codegenDependency FormFooterProps.codegen.tsx <<SignedSource::3c26d17eab08af0dfa1beabfc6065d18>>
|
|
21
21
|
* @codegenDependency FormHeaderProps.codegen.tsx <<SignedSource::1327f7e4c259cd2d5c1bf3198cc8c1eb>>
|
|
22
22
|
* @codegenDependency FormProps.codegen.tsx <<SignedSource::22baf31090e921045516d5295e2226ef>>
|
|
23
23
|
* @codegenDependency FormSectionProps.codegen.tsx <<SignedSource::43e20fc89b7abc977b8f10fd61ba6ea7>>
|
|
24
|
-
* @codegenDependency GridProps.codegen.tsx <<SignedSource::
|
|
24
|
+
* @codegenDependency GridProps.codegen.tsx <<SignedSource::e98d5d15bb747873a1436cfa2428fdf6>>
|
|
25
25
|
* @codegenDependency HeadingProps.codegen.tsx <<SignedSource::e34844b4af1a7c827505fe3ff587eda9>>
|
|
26
26
|
* @codegenDependency HelperMessageProps.codegen.tsx <<SignedSource::8afdecf85bd6b2539ac011e4f5249b09>>
|
|
27
27
|
* @codegenDependency IconProps.codegen.tsx <<SignedSource::24314f42437fe2bf4e2693316b97bb74>>
|
|
28
|
-
* @codegenDependency InlineProps.codegen.tsx <<SignedSource::
|
|
28
|
+
* @codegenDependency InlineProps.codegen.tsx <<SignedSource::e9624f171d2611c81d05bb70d5d5efd8>>
|
|
29
29
|
* @codegenDependency LabelProps.codegen.tsx <<SignedSource::32b9d05796f68e57b79ad99d6c37d246>>
|
|
30
30
|
* @codegenDependency LinkButtonProps.codegen.tsx <<SignedSource::9d91758a306a8ad6dadcd2693603ca0c>>
|
|
31
31
|
* @codegenDependency LoadingButtonProps.codegen.tsx <<SignedSource::8db1bb8fad98a6f0d577c0f55e30d679>>
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
* @codegenDependency SectionMessageProps.codegen.tsx <<SignedSource::dad8a3d213b5863972ea115389c33fdc>>
|
|
46
46
|
* @codegenDependency SelectProps.codegen.tsx <<SignedSource::5c1824fd709a27eb74098e537e7f3541>>
|
|
47
47
|
* @codegenDependency SpinnerProps.codegen.tsx <<SignedSource::602b1cc246e020dd7f32222a4d6bbb6e>>
|
|
48
|
-
* @codegenDependency StackProps.codegen.tsx <<SignedSource::
|
|
48
|
+
* @codegenDependency StackProps.codegen.tsx <<SignedSource::d3889e3b819fa2f96c0ce38a52734b76>>
|
|
49
49
|
* @codegenDependency TabListProps.codegen.tsx <<SignedSource::ba3257cc8f382811ae1630adc50c4fac>>
|
|
50
50
|
* @codegenDependency TabPanelProps.codegen.tsx <<SignedSource::dda2f64bb72b6b2d308412f1f9dae114>>
|
|
51
51
|
* @codegenDependency TabProps.codegen.tsx <<SignedSource::6edd2e77416e83af2879893b06c1e004>>
|
|
52
52
|
* @codegenDependency TabsProps.codegen.tsx <<SignedSource::014a7bfcca5304d7bb613a53d9117d01>>
|
|
53
53
|
* @codegenDependency TagGroupProps.codegen.tsx <<SignedSource::e8e2bd37a4b5175ff1bf296b465ef727>>
|
|
54
54
|
* @codegenDependency TagProps.codegen.tsx <<SignedSource::86aff9005e1db842009ece108d61a6b1>>
|
|
55
|
-
* @codegenDependency TextAreaProps.codegen.tsx <<SignedSource::
|
|
55
|
+
* @codegenDependency TextAreaProps.codegen.tsx <<SignedSource::1ffeeec37e609f7a8e8fa7a4abcffc28>>
|
|
56
56
|
* @codegenDependency TextfieldProps.codegen.tsx <<SignedSource::f029b18bd851bfca81384b61b12ba04b>>
|
|
57
57
|
* @codegenDependency ToggleProps.codegen.tsx <<SignedSource::4cf587b7a202a52ddb50db0157c2b0e5>>
|
|
58
58
|
* @codegenDependency TooltipProps.codegen.tsx <<SignedSource::aa2be4a5cb38eecf50dd652836a3e6ad>>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/forge-react-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Component types for Forge UI Kit React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/heading": "^1.6.0",
|
|
35
35
|
"@atlaskit/lozenge": "^11.6.0",
|
|
36
36
|
"@atlaskit/modal-dialog": "^12.10.0",
|
|
37
|
-
"@atlaskit/primitives": "^2.
|
|
37
|
+
"@atlaskit/primitives": "^2.1.0",
|
|
38
38
|
"@atlaskit/progress-bar": "2.0.1",
|
|
39
39
|
"@atlaskit/progress-tracker": "8.5.6",
|
|
40
40
|
"@atlaskit/radio": "^6.0.0",
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - BoxProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::d3c324dbe7016205a18cc6190b57ad19>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/box/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/box/__generated__/index.partial.tsx <<SignedSource::851605328aa816df414378c18c7104fe>>
|
|
9
9
|
*/
|
|
10
10
|
/* eslint-disable @atlaskit/design-system/ensure-design-token-usage/preview */
|
|
11
11
|
|
|
@@ -17,22 +17,26 @@ import type * as CSS from 'csstype';
|
|
|
17
17
|
import type { MediaQuery } from '@atlaskit/primitives';
|
|
18
18
|
import { tokensMap } from '@atlaskit/primitives';
|
|
19
19
|
type TokensMap = typeof tokensMap;
|
|
20
|
-
type
|
|
21
|
-
|
|
20
|
+
type TokensMapPropKey = keyof TokensMap;
|
|
21
|
+
type TokenizedProps = {
|
|
22
|
+
[K in TokensMapPropKey]?: keyof TokensMap[K];
|
|
22
23
|
};
|
|
23
|
-
type
|
|
24
|
-
|
|
24
|
+
type RawCSSValue = string & {};
|
|
25
|
+
type RelaxedTokenizedProps = {
|
|
26
|
+
[K in TokensMapPropKey]?: keyof TokensMap[K] | RawCSSValue;
|
|
25
27
|
};
|
|
26
28
|
type AllMedia = MediaQuery | '@media screen and (forced-colors: active), screen and (-ms-high-contrast: active)' | '@media (prefers-color-scheme: dark)' | '@media (prefers-color-scheme: light)' | '@media (prefers-reduced-motion: reduce)';
|
|
27
|
-
type StandardCSSProps = Omit<CSSProperties,
|
|
28
|
-
type
|
|
29
|
-
|
|
29
|
+
type StandardCSSProps = Omit<CSSProperties, TokensMapPropKey>;
|
|
30
|
+
type RestrictedPropsSpec = RelaxedTokenizedProps & StandardCSSProps;
|
|
31
|
+
type SafeCSSObject<SupportedPropKeys extends keyof CSSProperties = keyof CSSProperties, RawCSSPropKeys extends SupportedPropKeys = SupportedPropKeys, RestrictedProps extends RestrictedPropsSpec = RestrictedPropsSpec> = {
|
|
32
|
+
[MQ in AllMedia]?: Omit<SafeCSSObject<SupportedPropKeys, RawCSSPropKeys, RestrictedPropsSpec>, AllMedia>;
|
|
30
33
|
} & {
|
|
31
|
-
[Pseudo in CSS.Pseudos]?: Omit<SafeCSSObject<
|
|
32
|
-
} & Pick<
|
|
34
|
+
[Pseudo in CSS.Pseudos]?: Omit<SafeCSSObject<SupportedPropKeys, RawCSSPropKeys, RestrictedPropsSpec>, CSS.Pseudos | AllMedia>;
|
|
35
|
+
} & Pick<TokenizedProps, Exclude<Extract<SupportedPropKeys, TokensMapPropKey>, RawCSSPropKeys | keyof RestrictedProps>> & Pick<StandardCSSProps, Exclude<Extract<SupportedPropKeys, keyof StandardCSSProps>, RawCSSPropKeys | keyof RestrictedProps>> & // force standard css prop values for allowCSS: true
|
|
36
|
+
Pick<CSSProperties, Extract<RawCSSPropKeys, keyof CSSProperties>> & RestrictedProps;
|
|
33
37
|
type XCSSValidatorParam = {
|
|
34
38
|
[key in keyof CSSProperties]: true | {
|
|
35
|
-
supportedValues: Array<
|
|
39
|
+
supportedValues: Array<RestrictedPropsSpec[key]>;
|
|
36
40
|
} | {
|
|
37
41
|
allowCSS: true;
|
|
38
42
|
};
|
|
@@ -47,16 +51,16 @@ type XCSSValidatorParam = {
|
|
|
47
51
|
* as specified in the supportedXCSSProps list. The props that are not supported will be removed from the
|
|
48
52
|
* returned style object and a warning will be logged in the console.
|
|
49
53
|
*/
|
|
50
|
-
declare const makeXCSSValidator: <U extends XCSSValidatorParam>(supportedXCSSProps: U) => (styleObj: SafeCSSObject<keyof CSSProperties, keyof CSSProperties,
|
|
54
|
+
declare const makeXCSSValidator: <U extends XCSSValidatorParam>(supportedXCSSProps: U) => (styleObj: SafeCSSObject<keyof CSSProperties, keyof CSSProperties, RestrictedPropsSpec> | SafeCSSObject<Extract<keyof U, keyof CSSProperties>, Extract<{ [K in Extract<keyof U, keyof CSSProperties>]: U[K] extends {
|
|
51
55
|
allowCSS: true;
|
|
52
56
|
} ? K : never; }[Extract<keyof U, keyof CSSProperties>], Extract<keyof U, keyof CSSProperties>>, { [K_2 in Extract<{ [K_1 in Extract<keyof U, keyof CSSProperties>]: U[K_1] extends {
|
|
53
|
-
supportedValues:
|
|
57
|
+
supportedValues: RestrictedPropsSpec[K_1][];
|
|
54
58
|
} ? K_1 : never; }[Extract<keyof U, keyof CSSProperties>], Extract<keyof U, keyof CSSProperties>>]?: (U[K_2] extends {
|
|
55
59
|
supportedValues: infer V;
|
|
56
60
|
} ? Exclude<V[keyof V], number | Function> : never) | undefined; }>) => SafeCSSObject<Extract<keyof U, keyof CSSProperties>, Extract<{ [K in Extract<keyof U, keyof CSSProperties>]: U[K] extends {
|
|
57
61
|
allowCSS: true;
|
|
58
62
|
} ? K : never; }[Extract<keyof U, keyof CSSProperties>], Extract<keyof U, keyof CSSProperties>>, { [K_2 in Extract<{ [K_1 in Extract<keyof U, keyof CSSProperties>]: U[K_1] extends {
|
|
59
|
-
supportedValues:
|
|
63
|
+
supportedValues: RestrictedPropsSpec[K_1][];
|
|
60
64
|
} ? K_1 : never; }[Extract<keyof U, keyof CSSProperties>], Extract<keyof U, keyof CSSProperties>>]?: (U[K_2] extends {
|
|
61
65
|
supportedValues: infer V;
|
|
62
66
|
} ? Exclude<V[keyof V], number | Function> : never) | undefined; }>;
|
|
@@ -124,26 +128,26 @@ const xcssValidator = makeXCSSValidator({
|
|
|
124
128
|
paddingTop: true,
|
|
125
129
|
|
|
126
130
|
// other box related props
|
|
127
|
-
borderRadius:
|
|
128
|
-
borderBottomLeftRadius:
|
|
129
|
-
borderBottomRightRadius:
|
|
130
|
-
borderTopLeftRadius:
|
|
131
|
-
borderTopRightRadius:
|
|
132
|
-
borderEndEndRadius:
|
|
133
|
-
borderEndStartRadius:
|
|
134
|
-
borderStartEndRadius:
|
|
135
|
-
borderStartStartRadius:
|
|
136
|
-
borderWidth:
|
|
137
|
-
borderBlockWidth:
|
|
138
|
-
borderBlockEndWidth:
|
|
139
|
-
borderBlockStartWidth:
|
|
140
|
-
borderBottomWidth:
|
|
141
|
-
borderInlineWidth:
|
|
142
|
-
borderInlineEndWidth:
|
|
143
|
-
borderInlineStartWidth:
|
|
144
|
-
borderLeftWidth:
|
|
145
|
-
borderRightWidth:
|
|
146
|
-
borderTopWidth:
|
|
131
|
+
borderRadius: { supportedValues: ['border.radius'] },
|
|
132
|
+
borderBottomLeftRadius: { supportedValues: ['border.radius'] },
|
|
133
|
+
borderBottomRightRadius: { supportedValues: ['border.radius'] },
|
|
134
|
+
borderTopLeftRadius: { supportedValues: ['border.radius'] },
|
|
135
|
+
borderTopRightRadius: { supportedValues: ['border.radius'] },
|
|
136
|
+
borderEndEndRadius: { supportedValues: ['border.radius'] },
|
|
137
|
+
borderEndStartRadius: { supportedValues: ['border.radius'] },
|
|
138
|
+
borderStartEndRadius: { supportedValues: ['border.radius'] },
|
|
139
|
+
borderStartStartRadius: { supportedValues: ['border.radius'] },
|
|
140
|
+
borderWidth: { supportedValues: ['border.width'] },
|
|
141
|
+
borderBlockWidth: { supportedValues: ['border.width'] },
|
|
142
|
+
borderBlockEndWidth: { supportedValues: ['border.width'] },
|
|
143
|
+
borderBlockStartWidth: { supportedValues: ['border.width'] },
|
|
144
|
+
borderBottomWidth: { supportedValues: ['border.width'] },
|
|
145
|
+
borderInlineWidth: { supportedValues: ['border.width'] },
|
|
146
|
+
borderInlineEndWidth: { supportedValues: ['border.width'] },
|
|
147
|
+
borderInlineStartWidth: { supportedValues: ['border.width'] },
|
|
148
|
+
borderLeftWidth: { supportedValues: ['border.width'] },
|
|
149
|
+
borderRightWidth: { supportedValues: ['border.width'] },
|
|
150
|
+
borderTopWidth: { supportedValues: ['border.width'] },
|
|
147
151
|
|
|
148
152
|
// other props not in tokens based props
|
|
149
153
|
borderTopStyle: {
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - DynamicTableProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::3ec687a739b617f4cbe7a8969062cca9>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/dynamictable/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/dynamictable/__generated__/index.partial.tsx <<SignedSource::027c1440c4dc132bea4898d69f352f23>>
|
|
9
9
|
*/
|
|
10
10
|
import type { RowType, StatefulProps } from '@atlaskit/dynamic-table/types';
|
|
11
11
|
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - FlexProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::2660d61ae4436d4239c8c7ed6c343415>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/flex/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/flex/__generated__/index.partial.tsx <<SignedSource::87ea6214c3b6ee4b2d36987f1682074e>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Flex as PlatformFlex } from '@atlaskit/primitives';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - GridProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::4f326921dc60e223cfd0ba05be93a9eb>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/grid/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/grid/__generated__/index.partial.tsx <<SignedSource::82ef52184f696a17dcca4c8a84e23441>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Grid as PlatformGrid } from '@atlaskit/primitives';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - InlineProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::807734fa360131f49ef4e7bb552bcb95>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/inline/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/inline/__generated__/index.partial.tsx <<SignedSource::d8e43c17dbcecadc5f72802f65dc1eb4>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Inline as PlatformInline } from '@atlaskit/primitives';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - StackProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::078aee141bb0e11ae719fd7e91902969>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/stack/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/stack/__generated__/index.partial.tsx <<SignedSource::a7e2eb6e4d64591d6b9659e49b6ca7cc>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Stack as PlatformStack } from '@atlaskit/primitives';
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - TextAreaProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::57ac3475df0ec3a8015a85ab681b0bec>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/textarea/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/textarea/__generated__/index.partial.tsx <<SignedSource::bebce724d5e7ad41e8a3cd3c50b5ea6f>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformTextarea from '@atlaskit/textarea';
|
|
@@ -3,29 +3,29 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Index file for component prop types
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::0af01b1102b6d9b9f668cbed2fe0b27b>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
8
|
* @codegenDependency BadgeProps.codegen.tsx <<SignedSource::4759a95fede44eb7af89a4ada26252e9>>
|
|
9
9
|
* @codegenDependency BleedProps.codegen.tsx <<SignedSource::376f3f60ae6c1912e80b568958802fb5>>
|
|
10
|
-
* @codegenDependency BoxProps.codegen.tsx <<SignedSource::
|
|
10
|
+
* @codegenDependency BoxProps.codegen.tsx <<SignedSource::981f130ecaeeb0b694d4f81c2dc8255d>>
|
|
11
11
|
* @codegenDependency ButtonGroupProps.codegen.tsx <<SignedSource::a529cee05261919cb2eccacb9837aed0>>
|
|
12
12
|
* @codegenDependency ButtonProps.codegen.tsx <<SignedSource::cc45a3581574c0496c410cbba542fa50>>
|
|
13
13
|
* @codegenDependency CheckboxProps.codegen.tsx <<SignedSource::64e2dd8eb8b122646e0a11c5a029a4d6>>
|
|
14
14
|
* @codegenDependency CodeBlockProps.codegen.tsx <<SignedSource::54097e23c683ba0621cb0c224cbdee7a>>
|
|
15
15
|
* @codegenDependency CodeProps.codegen.tsx <<SignedSource::bc1c608d36eb55ac7c4eb0545c4beda3>>
|
|
16
16
|
* @codegenDependency DatePickerProps.codegen.tsx <<SignedSource::91eb5f1515fdb028c2916d07b59ea49a>>
|
|
17
|
-
* @codegenDependency DynamicTableProps.codegen.tsx <<SignedSource::
|
|
17
|
+
* @codegenDependency DynamicTableProps.codegen.tsx <<SignedSource::5e1fb410256c2a689e97b87ac6152074>>
|
|
18
18
|
* @codegenDependency ErrorMessageProps.codegen.tsx <<SignedSource::63e86a9739201928809df1932f0ceec9>>
|
|
19
|
-
* @codegenDependency FlexProps.codegen.tsx <<SignedSource::
|
|
19
|
+
* @codegenDependency FlexProps.codegen.tsx <<SignedSource::7f93c1d8cb30006984a5a43ebd95e4c8>>
|
|
20
20
|
* @codegenDependency FormFooterProps.codegen.tsx <<SignedSource::3c26d17eab08af0dfa1beabfc6065d18>>
|
|
21
21
|
* @codegenDependency FormHeaderProps.codegen.tsx <<SignedSource::1327f7e4c259cd2d5c1bf3198cc8c1eb>>
|
|
22
22
|
* @codegenDependency FormProps.codegen.tsx <<SignedSource::22baf31090e921045516d5295e2226ef>>
|
|
23
23
|
* @codegenDependency FormSectionProps.codegen.tsx <<SignedSource::43e20fc89b7abc977b8f10fd61ba6ea7>>
|
|
24
|
-
* @codegenDependency GridProps.codegen.tsx <<SignedSource::
|
|
24
|
+
* @codegenDependency GridProps.codegen.tsx <<SignedSource::e98d5d15bb747873a1436cfa2428fdf6>>
|
|
25
25
|
* @codegenDependency HeadingProps.codegen.tsx <<SignedSource::e34844b4af1a7c827505fe3ff587eda9>>
|
|
26
26
|
* @codegenDependency HelperMessageProps.codegen.tsx <<SignedSource::8afdecf85bd6b2539ac011e4f5249b09>>
|
|
27
27
|
* @codegenDependency IconProps.codegen.tsx <<SignedSource::24314f42437fe2bf4e2693316b97bb74>>
|
|
28
|
-
* @codegenDependency InlineProps.codegen.tsx <<SignedSource::
|
|
28
|
+
* @codegenDependency InlineProps.codegen.tsx <<SignedSource::e9624f171d2611c81d05bb70d5d5efd8>>
|
|
29
29
|
* @codegenDependency LabelProps.codegen.tsx <<SignedSource::32b9d05796f68e57b79ad99d6c37d246>>
|
|
30
30
|
* @codegenDependency LinkButtonProps.codegen.tsx <<SignedSource::9d91758a306a8ad6dadcd2693603ca0c>>
|
|
31
31
|
* @codegenDependency LoadingButtonProps.codegen.tsx <<SignedSource::8db1bb8fad98a6f0d577c0f55e30d679>>
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
* @codegenDependency SectionMessageProps.codegen.tsx <<SignedSource::dad8a3d213b5863972ea115389c33fdc>>
|
|
46
46
|
* @codegenDependency SelectProps.codegen.tsx <<SignedSource::5c1824fd709a27eb74098e537e7f3541>>
|
|
47
47
|
* @codegenDependency SpinnerProps.codegen.tsx <<SignedSource::602b1cc246e020dd7f32222a4d6bbb6e>>
|
|
48
|
-
* @codegenDependency StackProps.codegen.tsx <<SignedSource::
|
|
48
|
+
* @codegenDependency StackProps.codegen.tsx <<SignedSource::d3889e3b819fa2f96c0ce38a52734b76>>
|
|
49
49
|
* @codegenDependency TabListProps.codegen.tsx <<SignedSource::ba3257cc8f382811ae1630adc50c4fac>>
|
|
50
50
|
* @codegenDependency TabPanelProps.codegen.tsx <<SignedSource::dda2f64bb72b6b2d308412f1f9dae114>>
|
|
51
51
|
* @codegenDependency TabProps.codegen.tsx <<SignedSource::6edd2e77416e83af2879893b06c1e004>>
|
|
52
52
|
* @codegenDependency TabsProps.codegen.tsx <<SignedSource::014a7bfcca5304d7bb613a53d9117d01>>
|
|
53
53
|
* @codegenDependency TagGroupProps.codegen.tsx <<SignedSource::e8e2bd37a4b5175ff1bf296b465ef727>>
|
|
54
54
|
* @codegenDependency TagProps.codegen.tsx <<SignedSource::86aff9005e1db842009ece108d61a6b1>>
|
|
55
|
-
* @codegenDependency TextAreaProps.codegen.tsx <<SignedSource::
|
|
55
|
+
* @codegenDependency TextAreaProps.codegen.tsx <<SignedSource::1ffeeec37e609f7a8e8fa7a4abcffc28>>
|
|
56
56
|
* @codegenDependency TextfieldProps.codegen.tsx <<SignedSource::f029b18bd851bfca81384b61b12ba04b>>
|
|
57
57
|
* @codegenDependency ToggleProps.codegen.tsx <<SignedSource::4cf587b7a202a52ddb50db0157c2b0e5>>
|
|
58
58
|
* @codegenDependency TooltipProps.codegen.tsx <<SignedSource::aa2be4a5cb38eecf50dd652836a3e6ad>>
|