@atlaskit/forge-react-types 0.26.0 → 0.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @atlaskit/forge-react-types
2
2
 
3
+ ## 0.27.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#116956](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116956)
8
+ [`968939ae640cf`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/968939ae640cf) -
9
+ Updates types for Popup, InlineEdit and Timepicker
10
+
3
11
  ## 0.26.0
4
12
 
5
13
  ### Minor Changes
@@ -3,12 +3,22 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - InlineEditProps
5
5
  *
6
- * @codegen <<SignedSource::95bea94f50b42c9241a1fa71ae53d84c>>
6
+ * @codegen <<SignedSource::e87351dfe8a69d1c42b287eb4d6c40d3>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/inline-edit/index.tsx <<SignedSource::da035ef5c02a0c9efdef35e898e20656>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/inline-edit/index.tsx <<SignedSource::059229cf849086667e3ebf5b3362bb9f>>
9
9
  */
10
10
  import React from 'react';
11
11
  import { default as PlatformInlineEdit } from '@atlaskit/inline-edit';
12
+ type EditViewFieldProps = {
13
+ onChange: (value: any) => void;
14
+ value: any;
15
+ errorMessage?: string;
16
+ isInvalid: boolean;
17
+ 'aria-invalid': 'true' | 'false';
18
+ isRequired: boolean;
19
+ };
12
20
  export type InlineEditProps = Omit<React.ComponentProps<typeof PlatformInlineEdit>, 'analyticsContext' | 'onConfirm'> & {
13
21
  onConfirm: (value: any) => void;
22
+ editView: (fieldProps: EditViewFieldProps) => React.ReactNode;
14
23
  };
24
+ export {};
@@ -3,12 +3,14 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - PopupProps
5
5
  *
6
- * @codegen <<SignedSource::84c0328efa0f3aaecf6db4f7979c70c5>>
6
+ * @codegen <<SignedSource::5ea49084869c110ee74f05b602fb0db1>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/popup/index.tsx <<SignedSource::96a06afff36fc59275f3994adcaf5bd0>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/popup/index.tsx <<SignedSource::9c4061e9a4dfd26294367f18853c5ce1>>
9
9
  */
10
10
  import React from 'react';
11
11
  import { default as PlatformPopup } from '@atlaskit/popup';
12
12
  export type PopupProps = Omit<React.ComponentProps<typeof PlatformPopup>, 'popupComponent' | 'zIndex' | 'offset' | 'boundary'> & {
13
13
  boundary?: 'clippingParents';
14
+ content: () => React.ReactNode;
15
+ trigger: () => React.ReactNode;
14
16
  };
@@ -3,12 +3,22 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - InlineEditProps
5
5
  *
6
- * @codegen <<SignedSource::95bea94f50b42c9241a1fa71ae53d84c>>
6
+ * @codegen <<SignedSource::e87351dfe8a69d1c42b287eb4d6c40d3>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/inline-edit/index.tsx <<SignedSource::da035ef5c02a0c9efdef35e898e20656>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/inline-edit/index.tsx <<SignedSource::059229cf849086667e3ebf5b3362bb9f>>
9
9
  */
10
10
  import React from 'react';
11
11
  import { default as PlatformInlineEdit } from '@atlaskit/inline-edit';
12
+ type EditViewFieldProps = {
13
+ onChange: (value: any) => void;
14
+ value: any;
15
+ errorMessage?: string;
16
+ isInvalid: boolean;
17
+ 'aria-invalid': 'true' | 'false';
18
+ isRequired: boolean;
19
+ };
12
20
  export type InlineEditProps = Omit<React.ComponentProps<typeof PlatformInlineEdit>, 'analyticsContext' | 'onConfirm'> & {
13
21
  onConfirm: (value: any) => void;
22
+ editView: (fieldProps: EditViewFieldProps) => React.ReactNode;
14
23
  };
24
+ export {};
@@ -3,12 +3,14 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - PopupProps
5
5
  *
6
- * @codegen <<SignedSource::84c0328efa0f3aaecf6db4f7979c70c5>>
6
+ * @codegen <<SignedSource::5ea49084869c110ee74f05b602fb0db1>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/popup/index.tsx <<SignedSource::96a06afff36fc59275f3994adcaf5bd0>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/popup/index.tsx <<SignedSource::9c4061e9a4dfd26294367f18853c5ce1>>
9
9
  */
10
10
  import React from 'react';
11
11
  import { default as PlatformPopup } from '@atlaskit/popup';
12
12
  export type PopupProps = Omit<React.ComponentProps<typeof PlatformPopup>, 'popupComponent' | 'zIndex' | 'offset' | 'boundary'> & {
13
13
  boundary?: 'clippingParents';
14
+ content: () => React.ReactNode;
15
+ trigger: () => React.ReactNode;
14
16
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/forge-react-types",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Component types for Forge UI Kit React components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -3,17 +3,27 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - InlineEditProps
5
5
  *
6
- * @codegen <<SignedSource::95bea94f50b42c9241a1fa71ae53d84c>>
6
+ * @codegen <<SignedSource::e87351dfe8a69d1c42b287eb4d6c40d3>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/inline-edit/index.tsx <<SignedSource::da035ef5c02a0c9efdef35e898e20656>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/inline-edit/index.tsx <<SignedSource::059229cf849086667e3ebf5b3362bb9f>>
9
9
  */
10
10
  import React from 'react';
11
11
  import { default as PlatformInlineEdit } from '@atlaskit/inline-edit';
12
12
 
13
+ type EditViewFieldProps = {
14
+ onChange: (value: any) => void;
15
+ value: any;
16
+ errorMessage?: string;
17
+ isInvalid: boolean;
18
+ 'aria-invalid': 'true' | 'false';
19
+ isRequired: boolean;
20
+ };
21
+
13
22
  export type InlineEditProps = Omit<
14
23
  React.ComponentProps<typeof PlatformInlineEdit>,
15
24
  'analyticsContext' | 'onConfirm'
16
25
  > & {
17
26
  // ADS has an additional analyticsEvent arg that is not optional. We don't use this in UI Kit and it can't be removed due to breaking changes in products
18
27
  onConfirm: (value: any) => void;
28
+ editView: (fieldProps: EditViewFieldProps) => React.ReactNode;
19
29
  };
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - PopupProps
5
5
  *
6
- * @codegen <<SignedSource::84c0328efa0f3aaecf6db4f7979c70c5>>
6
+ * @codegen <<SignedSource::5ea49084869c110ee74f05b602fb0db1>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/popup/index.tsx <<SignedSource::96a06afff36fc59275f3994adcaf5bd0>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/popup/index.tsx <<SignedSource::9c4061e9a4dfd26294367f18853c5ce1>>
9
9
  */
10
10
  import React from 'react';
11
11
  import { default as PlatformPopup } from '@atlaskit/popup';
@@ -15,4 +15,6 @@ export type PopupProps = Omit<
15
15
  'popupComponent' | 'zIndex' | 'offset' | 'boundary'
16
16
  > & {
17
17
  boundary?: 'clippingParents';
18
+ content: () => React.ReactNode;
19
+ trigger: () => React.ReactNode;
18
20
  };
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - TimePickerProps
5
5
  *
6
- * @codegen <<SignedSource::a11aa419ac642ea0ddca74ef6b84f350>>
6
+ * @codegen <<SignedSource::9b49785e7a9a57c0a10723d0b2f28e23>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
- * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/timepicker/__generated__/index.partial.tsx <<SignedSource::2e6a672ddad4f76e568e3236e7bd4e8e>>
8
+ * @codegenDependency ../../../../forge-ui/src/components/UIKit2-codegen/timepicker/__generated__/index.partial.tsx <<SignedSource::785d7ffcaac38544d4658ed1560d72f5>>
9
9
  */
10
10
  import type { SelectProps } from '@atlaskit/select';
11
11
 
@@ -14,9 +14,9 @@ export interface FieldProps {
14
14
  isRequired: boolean;
15
15
  isDisabled: boolean;
16
16
  isInvalid: boolean;
17
- onChange: (event: any) => any;
18
- onBlur: () => any;
19
- onFocus: () => any;
17
+ onChange: (event: unknown) => void;
18
+ onBlur: (event: unknown) => void;
19
+ onFocus: (event: unknown) => void;
20
20
  value: any;
21
21
  'aria-invalid': 'true' | 'false';
22
22
  'aria-labelledby': string;
@@ -31,7 +31,6 @@ export type TimePickerProps = {
31
31
  autoFocus?: boolean;
32
32
  defaultIsOpen?: boolean;
33
33
  defaultValue?: string;
34
- formatDisplayLabel?: (time: string, timeFormat: string) => string;
35
34
  isOpen?: boolean;
36
35
  label?: string;
37
36
  onChange?: (value: string) => void;