@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.
Files changed (29) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/cjs/components/__generated__/BoxProps.codegen.js +62 -22
  3. package/dist/es2019/components/__generated__/BoxProps.codegen.js +62 -22
  4. package/dist/esm/components/__generated__/BoxProps.codegen.js +62 -22
  5. package/dist/types/components/__generated__/BoxProps.codegen.d.ts +60 -16
  6. package/dist/types/components/__generated__/DynamicTableProps.codegen.d.ts +2 -2
  7. package/dist/types/components/__generated__/FlexProps.codegen.d.ts +2 -2
  8. package/dist/types/components/__generated__/GridProps.codegen.d.ts +2 -2
  9. package/dist/types/components/__generated__/InlineProps.codegen.d.ts +2 -2
  10. package/dist/types/components/__generated__/StackProps.codegen.d.ts +2 -2
  11. package/dist/types/components/__generated__/TextAreaProps.codegen.d.ts +2 -2
  12. package/dist/types/components/__generated__/index.codegen.d.ts +8 -8
  13. package/dist/types-ts4.5/components/__generated__/BoxProps.codegen.d.ts +60 -16
  14. package/dist/types-ts4.5/components/__generated__/DynamicTableProps.codegen.d.ts +2 -2
  15. package/dist/types-ts4.5/components/__generated__/FlexProps.codegen.d.ts +2 -2
  16. package/dist/types-ts4.5/components/__generated__/GridProps.codegen.d.ts +2 -2
  17. package/dist/types-ts4.5/components/__generated__/InlineProps.codegen.d.ts +2 -2
  18. package/dist/types-ts4.5/components/__generated__/StackProps.codegen.d.ts +2 -2
  19. package/dist/types-ts4.5/components/__generated__/TextAreaProps.codegen.d.ts +2 -2
  20. package/dist/types-ts4.5/components/__generated__/index.codegen.d.ts +8 -8
  21. package/package.json +2 -2
  22. package/src/components/__generated__/BoxProps.codegen.tsx +39 -35
  23. package/src/components/__generated__/DynamicTableProps.codegen.tsx +2 -2
  24. package/src/components/__generated__/FlexProps.codegen.tsx +2 -2
  25. package/src/components/__generated__/GridProps.codegen.tsx +2 -2
  26. package/src/components/__generated__/InlineProps.codegen.tsx +2 -2
  27. package/src/components/__generated__/StackProps.codegen.tsx +2 -2
  28. package/src/components/__generated__/TextAreaProps.codegen.tsx +2 -2
  29. 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::8309292dff495dc1e8e24268d3958b56>>
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::391296376275f3173652baee432184f1>>
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: true,
88
- borderBottomLeftRadius: true,
89
- borderBottomRightRadius: true,
90
- borderTopLeftRadius: true,
91
- borderTopRightRadius: true,
92
- borderEndEndRadius: true,
93
- borderEndStartRadius: true,
94
- borderStartEndRadius: true,
95
- borderStartStartRadius: true,
96
- borderWidth: true,
97
- borderBlockWidth: true,
98
- borderBlockEndWidth: true,
99
- borderBlockStartWidth: true,
100
- borderBottomWidth: true,
101
- borderInlineWidth: true,
102
- borderInlineEndWidth: true,
103
- borderInlineStartWidth: true,
104
- borderLeftWidth: true,
105
- borderRightWidth: true,
106
- borderTopWidth: true,
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::8309292dff495dc1e8e24268d3958b56>>
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::391296376275f3173652baee432184f1>>
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: true,
83
- borderBottomLeftRadius: true,
84
- borderBottomRightRadius: true,
85
- borderTopLeftRadius: true,
86
- borderTopRightRadius: true,
87
- borderEndEndRadius: true,
88
- borderEndStartRadius: true,
89
- borderStartEndRadius: true,
90
- borderStartStartRadius: true,
91
- borderWidth: true,
92
- borderBlockWidth: true,
93
- borderBlockEndWidth: true,
94
- borderBlockStartWidth: true,
95
- borderBottomWidth: true,
96
- borderInlineWidth: true,
97
- borderInlineEndWidth: true,
98
- borderInlineStartWidth: true,
99
- borderLeftWidth: true,
100
- borderRightWidth: true,
101
- borderTopWidth: true,
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::8309292dff495dc1e8e24268d3958b56>>
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::391296376275f3173652baee432184f1>>
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: true,
83
- borderBottomLeftRadius: true,
84
- borderBottomRightRadius: true,
85
- borderTopLeftRadius: true,
86
- borderTopRightRadius: true,
87
- borderEndEndRadius: true,
88
- borderEndStartRadius: true,
89
- borderStartEndRadius: true,
90
- borderStartStartRadius: true,
91
- borderWidth: true,
92
- borderBlockWidth: true,
93
- borderBlockEndWidth: true,
94
- borderBlockStartWidth: true,
95
- borderBottomWidth: true,
96
- borderInlineWidth: true,
97
- borderInlineEndWidth: true,
98
- borderInlineStartWidth: true,
99
- borderLeftWidth: true,
100
- borderRightWidth: true,
101
- borderTopWidth: true,
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::8309292dff495dc1e8e24268d3958b56>>
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::391296376275f3173652baee432184f1>>
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 TokenisedProps = {
18
- [K in keyof TokensMap]?: keyof TokensMap[K];
17
+ type TokensMapPropKey = keyof TokensMap;
18
+ type TokenizedProps = {
19
+ [K in TokensMapPropKey]?: keyof TokensMap[K];
19
20
  };
20
- type RelaxedTokenisedProps = {
21
- [K in keyof TokensMap]?: keyof TokensMap[K] | CSSProperties[K];
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, keyof TokenisedProps>;
25
- type SafeCSSObject<T extends keyof CSSProperties = keyof CSSProperties, R extends T = T, M extends StandardCSSProps = StandardCSSProps> = {
26
- [MQ in AllMedia]?: Omit<SafeCSSObject<T, R>, AllMedia>;
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<T, R>, CSS.Pseudos | AllMedia>;
29
- } & Pick<TokenisedProps, Exclude<Extract<T, keyof TokenisedProps>, R>> & Pick<RelaxedTokenisedProps, Extract<R, keyof TokenisedProps>> & Pick<StandardCSSProps, Exclude<Extract<T, keyof StandardCSSProps>, keyof M>> & M;
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<CSSProperties[key]>;
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, StandardCSSProps> | SafeCSSObject<Extract<keyof U, keyof CSSProperties>, Extract<{
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: CSSProperties[K_1][];
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: CSSProperties[K_1][];
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, StandardCSSProps> | 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", {
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::8b04874579e3370bf65d66c376e70709>>
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::9c044f09ae44854b9f861a93462c004a>>
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::f8cf7fcd48be584224dc9b3dbbb9d394>>
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::752cb9176f453cb3422d13a493b64a06>>
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::60e56f4ba271fccb01ee83e02659eb52>>
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::7f93ba0404d4e15e02f70341e423b955>>
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::1f9b9835477c3248e8ab5d01e9cdc22a>>
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::050cb8647981a5e0272677d7903f51eb>>
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::f3afde823b52ff8f169a9c09c922d8c8>>
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::70a76bc91e660eb24d95369466375eec>>
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::b8642225dd7fb8f95958aedb90aa5753>>
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::93a565327cd9ef8ff96aee7b16324589>>
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::7aadd96e19946571168b6a8dac3d9a84>>
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::4ced3eed4de7f562539dd8a769a6871d>>
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::a515b50fd70a7fc6bc821f42852a6c22>>
17
+ * @codegenDependency DynamicTableProps.codegen.tsx <<SignedSource::5e1fb410256c2a689e97b87ac6152074>>
18
18
  * @codegenDependency ErrorMessageProps.codegen.tsx <<SignedSource::63e86a9739201928809df1932f0ceec9>>
19
- * @codegenDependency FlexProps.codegen.tsx <<SignedSource::93c0da4d6aad38e9a93dac738a15c7e4>>
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::8887e674f7f9420766714b0bf196b7f7>>
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::db16fe89fabe2d38cad0e3e5695311b3>>
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::11eaa0ce90d5dd36a8ca57a03f01afe6>>
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::f79b76692f21e787a29f04f379710f32>>
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::8309292dff495dc1e8e24268d3958b56>>
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::391296376275f3173652baee432184f1>>
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 TokenisedProps = {
18
- [K in keyof TokensMap]?: keyof TokensMap[K];
17
+ type TokensMapPropKey = keyof TokensMap;
18
+ type TokenizedProps = {
19
+ [K in TokensMapPropKey]?: keyof TokensMap[K];
19
20
  };
20
- type RelaxedTokenisedProps = {
21
- [K in keyof TokensMap]?: keyof TokensMap[K] | CSSProperties[K];
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, keyof TokenisedProps>;
25
- type SafeCSSObject<T extends keyof CSSProperties = keyof CSSProperties, R extends T = T, M extends StandardCSSProps = StandardCSSProps> = {
26
- [MQ in AllMedia]?: Omit<SafeCSSObject<T, R>, AllMedia>;
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<T, R>, CSS.Pseudos | AllMedia>;
29
- } & Pick<TokenisedProps, Exclude<Extract<T, keyof TokenisedProps>, R>> & Pick<RelaxedTokenisedProps, Extract<R, keyof TokenisedProps>> & Pick<StandardCSSProps, Exclude<Extract<T, keyof StandardCSSProps>, keyof M>> & M;
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<CSSProperties[key]>;
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, StandardCSSProps> | SafeCSSObject<Extract<keyof U, keyof CSSProperties>, Extract<{
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: CSSProperties[K_1][];
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: CSSProperties[K_1][];
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, StandardCSSProps> | 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", {
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::8b04874579e3370bf65d66c376e70709>>
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::9c044f09ae44854b9f861a93462c004a>>
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::f8cf7fcd48be584224dc9b3dbbb9d394>>
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::752cb9176f453cb3422d13a493b64a06>>
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::60e56f4ba271fccb01ee83e02659eb52>>
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::7f93ba0404d4e15e02f70341e423b955>>
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::1f9b9835477c3248e8ab5d01e9cdc22a>>
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::050cb8647981a5e0272677d7903f51eb>>
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::f3afde823b52ff8f169a9c09c922d8c8>>
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::70a76bc91e660eb24d95369466375eec>>
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::b8642225dd7fb8f95958aedb90aa5753>>
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::93a565327cd9ef8ff96aee7b16324589>>
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::7aadd96e19946571168b6a8dac3d9a84>>
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::4ced3eed4de7f562539dd8a769a6871d>>
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::a515b50fd70a7fc6bc821f42852a6c22>>
17
+ * @codegenDependency DynamicTableProps.codegen.tsx <<SignedSource::5e1fb410256c2a689e97b87ac6152074>>
18
18
  * @codegenDependency ErrorMessageProps.codegen.tsx <<SignedSource::63e86a9739201928809df1932f0ceec9>>
19
- * @codegenDependency FlexProps.codegen.tsx <<SignedSource::93c0da4d6aad38e9a93dac738a15c7e4>>
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::8887e674f7f9420766714b0bf196b7f7>>
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::db16fe89fabe2d38cad0e3e5695311b3>>
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::11eaa0ce90d5dd36a8ca57a03f01afe6>>
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::f79b76692f21e787a29f04f379710f32>>
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.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.0.0",
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::8309292dff495dc1e8e24268d3958b56>>
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::391296376275f3173652baee432184f1>>
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 TokenisedProps = {
21
- [K in keyof TokensMap]?: keyof TokensMap[K];
20
+ type TokensMapPropKey = keyof TokensMap;
21
+ type TokenizedProps = {
22
+ [K in TokensMapPropKey]?: keyof TokensMap[K];
22
23
  };
23
- type RelaxedTokenisedProps = {
24
- [K in keyof TokensMap]?: keyof TokensMap[K] | CSSProperties[K];
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, keyof TokenisedProps>;
28
- type SafeCSSObject<T extends keyof CSSProperties = keyof CSSProperties, R extends T = T, M extends StandardCSSProps = StandardCSSProps> = {
29
- [MQ in AllMedia]?: Omit<SafeCSSObject<T, R>, AllMedia>;
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<T, R>, CSS.Pseudos | AllMedia>;
32
- } & Pick<TokenisedProps, Exclude<Extract<T, keyof TokenisedProps>, R>> & Pick<RelaxedTokenisedProps, Extract<R, keyof TokenisedProps>> & Pick<StandardCSSProps, Exclude<Extract<T, keyof StandardCSSProps>, keyof M>> & M;
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<CSSProperties[key]>;
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, StandardCSSProps> | SafeCSSObject<Extract<keyof U, keyof CSSProperties>, Extract<{ [K in Extract<keyof U, keyof CSSProperties>]: U[K] extends {
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: CSSProperties[K_1][];
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: CSSProperties[K_1][];
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: true,
128
- borderBottomLeftRadius: true,
129
- borderBottomRightRadius: true,
130
- borderTopLeftRadius: true,
131
- borderTopRightRadius: true,
132
- borderEndEndRadius: true,
133
- borderEndStartRadius: true,
134
- borderStartEndRadius: true,
135
- borderStartStartRadius: true,
136
- borderWidth: true,
137
- borderBlockWidth: true,
138
- borderBlockEndWidth: true,
139
- borderBlockStartWidth: true,
140
- borderBottomWidth: true,
141
- borderInlineWidth: true,
142
- borderInlineEndWidth: true,
143
- borderInlineStartWidth: true,
144
- borderLeftWidth: true,
145
- borderRightWidth: true,
146
- borderTopWidth: true,
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::8b04874579e3370bf65d66c376e70709>>
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::9c044f09ae44854b9f861a93462c004a>>
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::f8cf7fcd48be584224dc9b3dbbb9d394>>
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::752cb9176f453cb3422d13a493b64a06>>
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::60e56f4ba271fccb01ee83e02659eb52>>
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::7f93ba0404d4e15e02f70341e423b955>>
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::1f9b9835477c3248e8ab5d01e9cdc22a>>
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::050cb8647981a5e0272677d7903f51eb>>
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::f3afde823b52ff8f169a9c09c922d8c8>>
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::70a76bc91e660eb24d95369466375eec>>
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::b8642225dd7fb8f95958aedb90aa5753>>
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::93a565327cd9ef8ff96aee7b16324589>>
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::7aadd96e19946571168b6a8dac3d9a84>>
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::4ced3eed4de7f562539dd8a769a6871d>>
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::a515b50fd70a7fc6bc821f42852a6c22>>
17
+ * @codegenDependency DynamicTableProps.codegen.tsx <<SignedSource::5e1fb410256c2a689e97b87ac6152074>>
18
18
  * @codegenDependency ErrorMessageProps.codegen.tsx <<SignedSource::63e86a9739201928809df1932f0ceec9>>
19
- * @codegenDependency FlexProps.codegen.tsx <<SignedSource::93c0da4d6aad38e9a93dac738a15c7e4>>
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::8887e674f7f9420766714b0bf196b7f7>>
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::db16fe89fabe2d38cad0e3e5695311b3>>
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::11eaa0ce90d5dd36a8ca57a03f01afe6>>
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::f79b76692f21e787a29f04f379710f32>>
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>>