@atlaskit/forge-react-types 0.2.1 → 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 (58) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/components/__generated__/BoxProps.codegen.js +62 -22
  3. package/dist/cjs/components/__generated__/types.codegen.js +5 -0
  4. package/dist/es2019/components/__generated__/BoxProps.codegen.js +62 -22
  5. package/dist/es2019/components/__generated__/types.codegen.js +1 -0
  6. package/dist/esm/components/__generated__/BoxProps.codegen.js +62 -22
  7. package/dist/esm/components/__generated__/types.codegen.js +1 -0
  8. package/dist/types/components/__generated__/BoxProps.codegen.d.ts +60 -16
  9. package/dist/types/components/__generated__/CheckboxProps.codegen.d.ts +4 -3
  10. package/dist/types/components/__generated__/DynamicTableProps.codegen.d.ts +2 -2
  11. package/dist/types/components/__generated__/FlexProps.codegen.d.ts +2 -2
  12. package/dist/types/components/__generated__/GridProps.codegen.d.ts +2 -2
  13. package/dist/types/components/__generated__/InlineProps.codegen.d.ts +2 -2
  14. package/dist/types/components/__generated__/RadioGroupProps.codegen.d.ts +4 -3
  15. package/dist/types/components/__generated__/RadioProps.codegen.d.ts +4 -3
  16. package/dist/types/components/__generated__/RangeProps.codegen.d.ts +4 -3
  17. package/dist/types/components/__generated__/SelectProps.codegen.d.ts +3 -3
  18. package/dist/types/components/__generated__/StackProps.codegen.d.ts +2 -2
  19. package/dist/types/components/__generated__/TextAreaProps.codegen.d.ts +4 -3
  20. package/dist/types/components/__generated__/TextfieldProps.codegen.d.ts +4 -3
  21. package/dist/types/components/__generated__/ToggleProps.codegen.d.ts +4 -3
  22. package/dist/types/components/__generated__/index.codegen.d.ts +15 -15
  23. package/dist/types/components/__generated__/types.codegen.d.ts +32 -0
  24. package/dist/types-ts4.5/components/__generated__/BoxProps.codegen.d.ts +60 -16
  25. package/dist/types-ts4.5/components/__generated__/CheckboxProps.codegen.d.ts +4 -3
  26. package/dist/types-ts4.5/components/__generated__/DynamicTableProps.codegen.d.ts +2 -2
  27. package/dist/types-ts4.5/components/__generated__/FlexProps.codegen.d.ts +2 -2
  28. package/dist/types-ts4.5/components/__generated__/GridProps.codegen.d.ts +2 -2
  29. package/dist/types-ts4.5/components/__generated__/InlineProps.codegen.d.ts +2 -2
  30. package/dist/types-ts4.5/components/__generated__/RadioGroupProps.codegen.d.ts +4 -3
  31. package/dist/types-ts4.5/components/__generated__/RadioProps.codegen.d.ts +4 -3
  32. package/dist/types-ts4.5/components/__generated__/RangeProps.codegen.d.ts +4 -3
  33. package/dist/types-ts4.5/components/__generated__/SelectProps.codegen.d.ts +3 -3
  34. package/dist/types-ts4.5/components/__generated__/StackProps.codegen.d.ts +2 -2
  35. package/dist/types-ts4.5/components/__generated__/TextAreaProps.codegen.d.ts +4 -3
  36. package/dist/types-ts4.5/components/__generated__/TextfieldProps.codegen.d.ts +4 -3
  37. package/dist/types-ts4.5/components/__generated__/ToggleProps.codegen.d.ts +4 -3
  38. package/dist/types-ts4.5/components/__generated__/index.codegen.d.ts +15 -15
  39. package/dist/types-ts4.5/components/__generated__/types.codegen.d.ts +32 -0
  40. package/package.json +2 -2
  41. package/scripts/codegen/codeGenerator.ts +31 -13
  42. package/scripts/codegen/componentPropTypes.ts +29 -0
  43. package/src/components/__generated__/BoxProps.codegen.tsx +39 -35
  44. package/src/components/__generated__/CheckboxProps.codegen.tsx +4 -3
  45. package/src/components/__generated__/DynamicTableProps.codegen.tsx +2 -2
  46. package/src/components/__generated__/FlexProps.codegen.tsx +2 -2
  47. package/src/components/__generated__/GridProps.codegen.tsx +2 -2
  48. package/src/components/__generated__/InlineProps.codegen.tsx +2 -2
  49. package/src/components/__generated__/RadioGroupProps.codegen.tsx +4 -3
  50. package/src/components/__generated__/RadioProps.codegen.tsx +4 -3
  51. package/src/components/__generated__/RangeProps.codegen.tsx +4 -3
  52. package/src/components/__generated__/SelectProps.codegen.tsx +3 -3
  53. package/src/components/__generated__/StackProps.codegen.tsx +2 -2
  54. package/src/components/__generated__/TextAreaProps.codegen.tsx +4 -3
  55. package/src/components/__generated__/TextfieldProps.codegen.tsx +5 -4
  56. package/src/components/__generated__/ToggleProps.codegen.tsx +4 -3
  57. package/src/components/__generated__/index.codegen.ts +15 -15
  58. package/src/components/__generated__/types.codegen.ts +33 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
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
+
13
+ ## 0.3.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [#74137](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/74137) [`7e2066b045f7`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7e2066b045f7) - Update types for event handler
18
+
3
19
  ## 0.2.1
4
20
 
5
21
  ### Patch 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']
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -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']
@@ -0,0 +1 @@
1
+ export {};
@@ -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,12 +3,13 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - CheckboxProps
5
5
  *
6
- * @codegen <<SignedSource::56c904bc1a3ad0ed3621db32045cff13>>
6
+ * @codegen <<SignedSource::c3f249f62fc1e2dab7bc6a21a0681633>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/checkbox/__generated__/index.partial.tsx <<SignedSource::57649f2b33c0aec30c2ad0e41479c28b>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/checkbox/__generated__/index.partial.tsx <<SignedSource::e85d1dd9754f25c100758622ff6d2d91>>
9
9
  */
10
10
  import React from 'react';
11
11
  import PlatformCheckbox from '@atlaskit/checkbox';
12
+ import type { EventHandlerProps } from './types.codegen';
12
13
  type PlatformCheckboxProps = React.ComponentProps<typeof PlatformCheckbox>;
13
- export type CheckboxProps = Pick<PlatformCheckboxProps, 'testId' | 'defaultChecked' | 'isChecked' | 'isIndeterminate' | 'label' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'onChange' | 'onBlur' | 'onFocus' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'>;
14
+ export type CheckboxProps = Pick<PlatformCheckboxProps, 'testId' | 'defaultChecked' | 'isChecked' | 'isIndeterminate' | 'label' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'onChange' | 'onBlur' | 'onFocus' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
14
15
  export {};
@@ -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,12 +3,13 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - RadioGroupProps
5
5
  *
6
- * @codegen <<SignedSource::cdab8c21bdbe308e0525c518987435f6>>
6
+ * @codegen <<SignedSource::f21dfcf68dcf1e2443af8b267b5a057f>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/radio/__generated__/radio-group.partial.tsx <<SignedSource::7d9b07f217be4924a1cf7755f682fb58>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/radio/__generated__/radio-group.partial.tsx <<SignedSource::2cbedc883c6d0fdf8e7f443d9ea14eb1>>
9
9
  */
10
10
  import React from 'react';
11
11
  import { RadioGroup as PlatformRadioGroup } from '@atlaskit/radio';
12
+ import type { EventHandlerProps } from './types.codegen';
12
13
  type PlatformRadioGroupProps = React.ComponentProps<typeof PlatformRadioGroup>;
13
- export type RadioGroupProps = Pick<PlatformRadioGroupProps, 'defaultValue' | 'options' | 'onInvalid' | 'testId' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'onChange' | 'value' | 'aria-labelledby' | 'name'>;
14
+ export type RadioGroupProps = Pick<PlatformRadioGroupProps, 'defaultValue' | 'options' | 'onInvalid' | 'testId' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'onChange' | 'value' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange'>;
14
15
  export {};
@@ -3,12 +3,13 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - RadioProps
5
5
  *
6
- * @codegen <<SignedSource::ca014c2fa3ed73cb002099a84ac8a08a>>
6
+ * @codegen <<SignedSource::18d92f885ea65e94fa46c10f531d5b42>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/radio/__generated__/index.partial.tsx <<SignedSource::ba49931714a2937a807db87c6ed3ed7b>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/radio/__generated__/index.partial.tsx <<SignedSource::f8c9f83aa0faf7291e9446bec9e441d6>>
9
9
  */
10
10
  import React from 'react';
11
11
  import { Radio as PlatformRadio } from '@atlaskit/radio';
12
+ import type { EventHandlerProps } from './types.codegen';
12
13
  type PlatformRadioProps = React.ComponentProps<typeof PlatformRadio>;
13
- export type RadioProps = Pick<PlatformRadioProps, 'label' | 'testId' | 'isChecked' | 'ariaLabel' | 'onInvalid' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'onChange' | 'onBlur' | 'onFocus' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'>;
14
+ export type RadioProps = Pick<PlatformRadioProps, 'label' | 'testId' | 'isChecked' | 'ariaLabel' | 'onInvalid' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'onChange' | 'onBlur' | 'onFocus' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
14
15
  export {};
@@ -3,12 +3,13 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - RangeProps
5
5
  *
6
- * @codegen <<SignedSource::e63be8ed022af8026cc320c9683dfebf>>
6
+ * @codegen <<SignedSource::67e22cda61419468c91e120179019751>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/range/__generated__/index.partial.tsx <<SignedSource::73b4d120484ba38e2bf1334749c9bc05>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/range/__generated__/index.partial.tsx <<SignedSource::da47c96a98423bdcf0e9c79c7e31854f>>
9
9
  */
10
10
  import React from 'react';
11
11
  import PlatformRange from '@atlaskit/range';
12
+ import type { EventHandlerProps } from './types.codegen';
12
13
  type PlatformRangeProps = React.ComponentProps<typeof PlatformRange>;
13
- export type RangeProps = Pick<PlatformRangeProps, 'defaultValue' | 'max' | 'min' | 'step' | 'testId' | 'onChange' | 'id' | 'isDisabled' | 'onBlur' | 'onFocus' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'>;
14
+ export type RangeProps = Pick<PlatformRangeProps, 'defaultValue' | 'max' | 'min' | 'step' | 'testId' | 'onChange' | 'id' | 'isDisabled' | 'onBlur' | 'onFocus' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onBlur' | 'onFocus'>;
14
15
  export {};
@@ -3,11 +3,11 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - SelectProps
5
5
  *
6
- * @codegen <<SignedSource::fc820c7821eab223fd3731133a386703>>
6
+ * @codegen <<SignedSource::15d2ba46804ab0a683383a0ba9cae564>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/select/__generated__/index.partial.tsx <<SignedSource::9650d96ed765605a9c8e52d59df07caa>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/select/__generated__/index.partial.tsx <<SignedSource::a826a4f7af8f06890432c9274aad7332>>
9
9
  */
10
10
  import { SelectProps as PlatformSelectProps } from '@atlaskit/select';
11
11
  export type SelectProps = Pick<PlatformSelectProps<any, true | false>, 'spacing' | 'appearance' | 'testId' | 'autoFocus' | 'defaultValue' | 'closeMenuOnSelect' | 'inputValue' | 'inputId' | 'isClearable' | 'isLoading' | 'isMulti' | 'isSearchable' | 'menuIsOpen' | 'onInputChange' | 'options' | 'placeholder' | 'onChange' | 'id' | 'isDisabled' | 'isInvalid' | 'onBlur' | 'onFocus' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & {
12
- isRequired: boolean;
12
+ isRequired?: boolean;
13
13
  };
@@ -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';