@atlaskit/forge-react-types 0.42.9 → 0.42.11

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,20 @@
1
1
  # @atlaskit/forge-react-types
2
2
 
3
+ ## 0.42.11
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 0.42.10
10
+
11
+ ### Patch Changes
12
+
13
+ - [#186460](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/186460)
14
+ [`a06d9cf8482bf`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a06d9cf8482bf) -
15
+ Improve prop types for Checkbox, EmptyState, ErrorMessage, and Lozenge components
16
+ - Updated dependencies
17
+
3
18
  ## 0.42.9
4
19
 
5
20
  ### Patch Changes
@@ -3,14 +3,72 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - CheckboxProps
5
5
  *
6
- * @codegen <<SignedSource::d5cd5c6518e80c98416fc61091717141>>
6
+ * @codegen <<SignedSource::634533a7eaed746ad58981b553539cdf>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/checkbox/__generated__/index.partial.tsx <<SignedSource::e34c0ab52d3409a8548b6e51450ba43b>>
9
9
  */
10
- import React from 'react';
11
- import PlatformCheckbox from '@atlaskit/checkbox';
12
10
  import type { EventHandlerProps } from './types.codegen';
13
- type PlatformCheckboxProps = React.ComponentProps<typeof PlatformCheckbox>;
11
+ import type React from 'react';
12
+ type PlatformCheckboxProps = {
13
+ /**
14
+ * The name of the submitted field in a checkbox.
15
+ */
16
+ name?: string;
17
+ /**
18
+ * The value to be used in the checkbox input. This is the value that will be returned on form submission.
19
+ */
20
+ value?: string | number;
21
+ /**
22
+ * Sets whether the checkbox begins as checked or unchecked.
23
+ */
24
+ defaultChecked?: boolean;
25
+ /**
26
+ * The ID assigned to the input.
27
+ */
28
+ id?: string;
29
+ /**
30
+ * Indicates the entered value does not conform to the format expected by the application.
31
+ * @see aria-errormessage.
32
+ */
33
+ "aria-invalid"?: false | true | 'false' | 'true' | 'grammar' | 'spelling';
34
+ /**
35
+ * Identifies the element (or elements) that labels the current element.
36
+ * @see aria-describedby.
37
+ */
38
+ "aria-labelledby"?: string;
39
+ /**
40
+ * Sets whether the checkbox is checked or unchecked.
41
+ */
42
+ isChecked?: boolean;
43
+ /**
44
+ * Sets whether the checkbox is disabled. Don’t use a disabled checkbox if it needs to remain in the tab order for assistive technologies.
45
+ */
46
+ isDisabled?: boolean;
47
+ /**
48
+ * Sets whether the checkbox is indeterminate. This only affects the
49
+ * style and does not modify the isChecked property.
50
+ */
51
+ isIndeterminate?: boolean;
52
+ /**
53
+ * Marks the field as invalid. Changes style of unchecked component.
54
+ */
55
+ isInvalid?: boolean;
56
+ /**
57
+ * Marks the field as required & changes the label style.
58
+ */
59
+ isRequired?: boolean;
60
+ /**
61
+ * The label to be displayed to the right of the checkbox. The label is part
62
+ * of the clickable element to select the checkbox.
63
+ */
64
+ label?: React.ReactChild;
65
+ /**
66
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
67
+ * we have generated testid based on the one you pass to the Checkbox component:
68
+ * - `{testId}--hidden-checkbox` to check if it got changed to checked/unchecked.
69
+ */
70
+ testId?: string;
71
+ };
14
72
  export type CheckboxProps = Pick<PlatformCheckboxProps, 'testId' | 'defaultChecked' | 'isChecked' | 'isIndeterminate' | 'label' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
15
73
  /**
16
74
  * A checkbox is an input control that allows a user to select one or more options from a number of choices.
@@ -3,13 +3,54 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - EmptyStateProps
5
5
  *
6
- * @codegen <<SignedSource::142748ed4aa864312e3b9ea16f297672>>
6
+ * @codegen <<SignedSource::62fe186d8326a7c3e8533e18dba9fcfb>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/emptystate/__generated__/index.partial.tsx <<SignedSource::d6c509a722d55de0f55d401cd2e75435>>
9
9
  */
10
- import React from 'react';
11
- import PlatformEmptyState from '@atlaskit/empty-state';
12
- type PlatformEmptyStateProps = React.ComponentProps<typeof PlatformEmptyState>;
10
+ import type React from 'react';
11
+ type PlatformEmptyStateProps = {
12
+ /**
13
+ * Accessible name for the action buttons group of empty state. Can be used for internationalization. Default is "Button group".
14
+ */
15
+ buttonGroupLabel?: string;
16
+ /**
17
+ * The main block of text that holds additional supporting information.
18
+ */
19
+ description?: React.ReactNode;
20
+ /**
21
+ * Title that briefly describes the page to the user.
22
+ */
23
+ header: string;
24
+ /**
25
+ * The value used to set the heading level of the header element.
26
+ * Must be in the range of 1 to 6. Defaults to 4.
27
+ */
28
+ headingLevel?: number;
29
+ /**
30
+ * Used to indicate a loading state. Will show a spinner next to the action buttons when true.
31
+ */
32
+ isLoading?: boolean;
33
+ /**
34
+ * Primary action button for the page, usually it will be something like "Create" (or "Retry" for error pages).
35
+ */
36
+ primaryAction?: React.ReactNode;
37
+ /**
38
+ * Secondary action button for the page.
39
+ */
40
+ secondaryAction?: React.ReactNode;
41
+ /**
42
+ * Controls how much horizontal space the component fills. Defaults to "wide".
43
+ */
44
+ width?: 'narrow' | 'wide';
45
+ /**
46
+ * Button with link to some external resource like documentation or tutorial, it will be opened in a new tab.
47
+ */
48
+ tertiaryAction?: React.ReactNode;
49
+ /**
50
+ * A hook for automated testing.
51
+ */
52
+ testId?: string;
53
+ };
13
54
  export type EmptyStateProps = Pick<PlatformEmptyStateProps, 'buttonGroupLabel' | 'description' | 'header' | 'headingLevel' | 'isLoading' | 'primaryAction' | 'secondaryAction' | 'tertiaryAction' | 'testId' | 'width'>;
14
55
  /**
15
56
  * An empty state appears when there is no data to display and describes what the user can do next.
@@ -3,13 +3,23 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - ErrorMessageProps
5
5
  *
6
- * @codegen <<SignedSource::f2821b3d824a19e37d6d769695a883f4>>
6
+ * @codegen <<SignedSource::e5e94f85cf8efd7d6cc06b1355785c4b>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/form/__generated__/error-message.partial.tsx <<SignedSource::3758488a0115c629a624fcaae1f524c7>>
9
9
  */
10
- import React from 'react';
11
- import { ErrorMessage as PlatformErrorMessage } from '@atlaskit/form';
12
- type PlatformErrorMessageProps = React.ComponentProps<typeof PlatformErrorMessage>;
10
+ import type React from 'react';
11
+ type PlatformErrorMessageProps = {
12
+ /**
13
+ * The content of the message
14
+ */
15
+ children: React.ReactNode;
16
+ /**
17
+ * A testId prop is provided for specified elements, which is a unique string
18
+ * that appears as a data attribute data-testid in the rendered code,
19
+ * serving as a hook for automated tests
20
+ */
21
+ testId?: string;
22
+ };
13
23
  export type ErrorMessageProps = Pick<PlatformErrorMessageProps, 'children' | 'testId'>;
14
24
  /**
15
25
  * An error message is used to tell a user that the field input is invalid.
@@ -3,13 +3,35 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - LozengeProps
5
5
  *
6
- * @codegen <<SignedSource::25dee9ab928c0059e43d176df9313264>>
6
+ * @codegen <<SignedSource::0ef732d9e1b715ee6f4229d3ef5b4649>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/lozenge/__generated__/index.partial.tsx <<SignedSource::e362dbb308b0f7785d47bb5e9aa46ab0>>
9
9
  */
10
- import React from 'react';
11
- import PlatformLozenge from '@atlaskit/lozenge';
12
- type PlatformLozengeProps = React.ComponentProps<typeof PlatformLozenge>;
10
+ import type React from 'react';
11
+ type PlatformLozengeProps = {
12
+ /**
13
+ * Elements to be rendered inside the lozenge. This should ideally be just a word or two.
14
+ */
15
+ children?: React.ReactNode;
16
+ /**
17
+ * A `testId` prop is provided for specified elements, which is a unique
18
+ * string that appears as a data attribute `data-testid` in the rendered code,
19
+ * serving as a hook for automated tests
20
+ */
21
+ testId?: string;
22
+ /**
23
+ * Determines whether to apply the bold style or not.
24
+ */
25
+ isBold?: boolean;
26
+ /**
27
+ * The appearance type.
28
+ */
29
+ appearance?: 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
30
+ /**
31
+ * max-width of lozenge container. Default to 200px.
32
+ */
33
+ maxWidth?: string | number;
34
+ };
13
35
  export type LozengeProps = Pick<PlatformLozengeProps, 'appearance' | 'children' | 'isBold' | 'maxWidth' | 'testId'>;
14
36
  /**
15
37
  * A lozenge is a visual indicator used to highlight an item's status for quick recognition.
@@ -3,14 +3,72 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - CheckboxProps
5
5
  *
6
- * @codegen <<SignedSource::d5cd5c6518e80c98416fc61091717141>>
6
+ * @codegen <<SignedSource::634533a7eaed746ad58981b553539cdf>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/checkbox/__generated__/index.partial.tsx <<SignedSource::e34c0ab52d3409a8548b6e51450ba43b>>
9
9
  */
10
- import React from 'react';
11
- import PlatformCheckbox from '@atlaskit/checkbox';
12
10
  import type { EventHandlerProps } from './types.codegen';
13
- type PlatformCheckboxProps = React.ComponentProps<typeof PlatformCheckbox>;
11
+ import type React from 'react';
12
+ type PlatformCheckboxProps = {
13
+ /**
14
+ * The name of the submitted field in a checkbox.
15
+ */
16
+ name?: string;
17
+ /**
18
+ * The value to be used in the checkbox input. This is the value that will be returned on form submission.
19
+ */
20
+ value?: string | number;
21
+ /**
22
+ * Sets whether the checkbox begins as checked or unchecked.
23
+ */
24
+ defaultChecked?: boolean;
25
+ /**
26
+ * The ID assigned to the input.
27
+ */
28
+ id?: string;
29
+ /**
30
+ * Indicates the entered value does not conform to the format expected by the application.
31
+ * @see aria-errormessage.
32
+ */
33
+ "aria-invalid"?: false | true | 'false' | 'true' | 'grammar' | 'spelling';
34
+ /**
35
+ * Identifies the element (or elements) that labels the current element.
36
+ * @see aria-describedby.
37
+ */
38
+ "aria-labelledby"?: string;
39
+ /**
40
+ * Sets whether the checkbox is checked or unchecked.
41
+ */
42
+ isChecked?: boolean;
43
+ /**
44
+ * Sets whether the checkbox is disabled. Don’t use a disabled checkbox if it needs to remain in the tab order for assistive technologies.
45
+ */
46
+ isDisabled?: boolean;
47
+ /**
48
+ * Sets whether the checkbox is indeterminate. This only affects the
49
+ * style and does not modify the isChecked property.
50
+ */
51
+ isIndeterminate?: boolean;
52
+ /**
53
+ * Marks the field as invalid. Changes style of unchecked component.
54
+ */
55
+ isInvalid?: boolean;
56
+ /**
57
+ * Marks the field as required & changes the label style.
58
+ */
59
+ isRequired?: boolean;
60
+ /**
61
+ * The label to be displayed to the right of the checkbox. The label is part
62
+ * of the clickable element to select the checkbox.
63
+ */
64
+ label?: React.ReactChild;
65
+ /**
66
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
67
+ * we have generated testid based on the one you pass to the Checkbox component:
68
+ * - `{testId}--hidden-checkbox` to check if it got changed to checked/unchecked.
69
+ */
70
+ testId?: string;
71
+ };
14
72
  export type CheckboxProps = Pick<PlatformCheckboxProps, 'testId' | 'defaultChecked' | 'isChecked' | 'isIndeterminate' | 'label' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
15
73
  /**
16
74
  * A checkbox is an input control that allows a user to select one or more options from a number of choices.
@@ -3,13 +3,54 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - EmptyStateProps
5
5
  *
6
- * @codegen <<SignedSource::142748ed4aa864312e3b9ea16f297672>>
6
+ * @codegen <<SignedSource::62fe186d8326a7c3e8533e18dba9fcfb>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/emptystate/__generated__/index.partial.tsx <<SignedSource::d6c509a722d55de0f55d401cd2e75435>>
9
9
  */
10
- import React from 'react';
11
- import PlatformEmptyState from '@atlaskit/empty-state';
12
- type PlatformEmptyStateProps = React.ComponentProps<typeof PlatformEmptyState>;
10
+ import type React from 'react';
11
+ type PlatformEmptyStateProps = {
12
+ /**
13
+ * Accessible name for the action buttons group of empty state. Can be used for internationalization. Default is "Button group".
14
+ */
15
+ buttonGroupLabel?: string;
16
+ /**
17
+ * The main block of text that holds additional supporting information.
18
+ */
19
+ description?: React.ReactNode;
20
+ /**
21
+ * Title that briefly describes the page to the user.
22
+ */
23
+ header: string;
24
+ /**
25
+ * The value used to set the heading level of the header element.
26
+ * Must be in the range of 1 to 6. Defaults to 4.
27
+ */
28
+ headingLevel?: number;
29
+ /**
30
+ * Used to indicate a loading state. Will show a spinner next to the action buttons when true.
31
+ */
32
+ isLoading?: boolean;
33
+ /**
34
+ * Primary action button for the page, usually it will be something like "Create" (or "Retry" for error pages).
35
+ */
36
+ primaryAction?: React.ReactNode;
37
+ /**
38
+ * Secondary action button for the page.
39
+ */
40
+ secondaryAction?: React.ReactNode;
41
+ /**
42
+ * Controls how much horizontal space the component fills. Defaults to "wide".
43
+ */
44
+ width?: 'narrow' | 'wide';
45
+ /**
46
+ * Button with link to some external resource like documentation or tutorial, it will be opened in a new tab.
47
+ */
48
+ tertiaryAction?: React.ReactNode;
49
+ /**
50
+ * A hook for automated testing.
51
+ */
52
+ testId?: string;
53
+ };
13
54
  export type EmptyStateProps = Pick<PlatformEmptyStateProps, 'buttonGroupLabel' | 'description' | 'header' | 'headingLevel' | 'isLoading' | 'primaryAction' | 'secondaryAction' | 'tertiaryAction' | 'testId' | 'width'>;
14
55
  /**
15
56
  * An empty state appears when there is no data to display and describes what the user can do next.
@@ -3,13 +3,23 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - ErrorMessageProps
5
5
  *
6
- * @codegen <<SignedSource::f2821b3d824a19e37d6d769695a883f4>>
6
+ * @codegen <<SignedSource::e5e94f85cf8efd7d6cc06b1355785c4b>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/form/__generated__/error-message.partial.tsx <<SignedSource::3758488a0115c629a624fcaae1f524c7>>
9
9
  */
10
- import React from 'react';
11
- import { ErrorMessage as PlatformErrorMessage } from '@atlaskit/form';
12
- type PlatformErrorMessageProps = React.ComponentProps<typeof PlatformErrorMessage>;
10
+ import type React from 'react';
11
+ type PlatformErrorMessageProps = {
12
+ /**
13
+ * The content of the message
14
+ */
15
+ children: React.ReactNode;
16
+ /**
17
+ * A testId prop is provided for specified elements, which is a unique string
18
+ * that appears as a data attribute data-testid in the rendered code,
19
+ * serving as a hook for automated tests
20
+ */
21
+ testId?: string;
22
+ };
13
23
  export type ErrorMessageProps = Pick<PlatformErrorMessageProps, 'children' | 'testId'>;
14
24
  /**
15
25
  * An error message is used to tell a user that the field input is invalid.
@@ -3,13 +3,35 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - LozengeProps
5
5
  *
6
- * @codegen <<SignedSource::25dee9ab928c0059e43d176df9313264>>
6
+ * @codegen <<SignedSource::0ef732d9e1b715ee6f4229d3ef5b4649>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/lozenge/__generated__/index.partial.tsx <<SignedSource::e362dbb308b0f7785d47bb5e9aa46ab0>>
9
9
  */
10
- import React from 'react';
11
- import PlatformLozenge from '@atlaskit/lozenge';
12
- type PlatformLozengeProps = React.ComponentProps<typeof PlatformLozenge>;
10
+ import type React from 'react';
11
+ type PlatformLozengeProps = {
12
+ /**
13
+ * Elements to be rendered inside the lozenge. This should ideally be just a word or two.
14
+ */
15
+ children?: React.ReactNode;
16
+ /**
17
+ * A `testId` prop is provided for specified elements, which is a unique
18
+ * string that appears as a data attribute `data-testid` in the rendered code,
19
+ * serving as a hook for automated tests
20
+ */
21
+ testId?: string;
22
+ /**
23
+ * Determines whether to apply the bold style or not.
24
+ */
25
+ isBold?: boolean;
26
+ /**
27
+ * The appearance type.
28
+ */
29
+ appearance?: 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
30
+ /**
31
+ * max-width of lozenge container. Default to 200px.
32
+ */
33
+ maxWidth?: string | number;
34
+ };
13
35
  export type LozengeProps = Pick<PlatformLozengeProps, 'appearance' | 'children' | 'isBold' | 'maxWidth' | 'testId'>;
14
36
  /**
15
37
  * A lozenge is a visual indicator used to highlight an item's status for quick recognition.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/forge-react-types",
3
- "version": "0.42.9",
3
+ "version": "0.42.11",
4
4
  "description": "Component types for Forge UI Kit React components",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,32 +24,29 @@
24
24
  "team": "Forge UI"
25
25
  },
26
26
  "dependencies": {
27
- "@atlaskit/button": "^23.2.0",
28
- "@atlaskit/checkbox": "^17.1.0",
27
+ "@atlaskit/button": "^23.3.0",
29
28
  "@atlaskit/comment": "^13.0.0",
30
29
  "@atlaskit/datetime-picker": "^17.0.0",
31
30
  "@atlaskit/dynamic-table": "^18.2.0",
32
- "@atlaskit/empty-state": "^10.1.0",
33
31
  "@atlaskit/form": "^12.0.0",
34
32
  "@atlaskit/inline-edit": "^15.3.0",
35
- "@atlaskit/lozenge": "^13.0.0",
36
- "@atlaskit/modal-dialog": "^14.2.0",
33
+ "@atlaskit/modal-dialog": "^14.3.0",
37
34
  "@atlaskit/popup": "^4.3.0",
38
35
  "@atlaskit/primitives": "^14.10.0",
39
36
  "@atlaskit/progress-bar": "^4.0.0",
40
- "@atlaskit/progress-tracker": "^10.2.0",
37
+ "@atlaskit/progress-tracker": "^10.3.0",
41
38
  "@atlaskit/radio": "^8.1.0",
42
- "@atlaskit/section-message": "^8.2.0",
43
- "@atlaskit/select": "^21.1.0",
44
- "@atlaskit/spinner": "^18.0.0",
39
+ "@atlaskit/section-message": "^8.5.0",
40
+ "@atlaskit/select": "^21.2.0",
41
+ "@atlaskit/spinner": "^19.0.0",
45
42
  "@atlaskit/tabs": "^18.1.0",
46
- "@atlaskit/tag": "^14.0.0",
43
+ "@atlaskit/tag": "^14.1.0",
47
44
  "@atlaskit/tag-group": "^12.0.0",
48
45
  "@atlaskit/textarea": "^8.0.0",
49
46
  "@atlaskit/textfield": "^8.0.0",
50
- "@atlaskit/toggle": "^15.0.0",
51
- "@atlaskit/tokens": "^5.4.0",
52
- "@atlaskit/tooltip": "^20.3.0",
47
+ "@atlaskit/toggle": "^15.1.0",
48
+ "@atlaskit/tokens": "^5.6.0",
49
+ "@atlaskit/tooltip": "^20.4.0",
53
50
  "@babel/runtime": "^7.0.0"
54
51
  },
55
52
  "peerDependencies": {
@@ -57,7 +54,7 @@
57
54
  },
58
55
  "devDependencies": {
59
56
  "@atlassian/codegen": "^0.1.0",
60
- "@atlassian/forge-ui": "^32.24.0",
57
+ "@atlassian/forge-ui": "^32.28.0",
61
58
  "@types/node": "~20.16.5",
62
59
  "lodash": "^4.17.21",
63
60
  "react": "^18.2.0",
@@ -578,7 +578,7 @@ const registeredExternalTypes: Record<
578
578
  defaultImport: string;
579
579
  }
580
580
  > = {
581
- '^React\..+$': {
581
+ '^React..+$': {
582
582
  package: 'react',
583
583
  defaultImport: 'React',
584
584
  },
@@ -824,9 +824,13 @@ const codeConsolidators: Record<string, CodeConsolidator> = {
824
824
 
825
825
  const typeSerializableComponentPropSymbols = [
826
826
  'CalendarProps',
827
+ 'CheckboxProps',
827
828
  'CodeProps',
828
829
  'CodeBlockProps',
829
830
  'BadgeProps',
831
+ 'EmptyStateProps',
832
+ 'ErrorMessageProps',
833
+ 'LozengeProps',
830
834
  'HeadingProps',
831
835
  'RangeProps',
832
836
  ];
@@ -2,16 +2,24 @@
2
2
  import {
3
3
  type BadgeProps,
4
4
  type CalendarProps,
5
+ type CheckboxProps,
5
6
  type CodeBlockProps,
6
7
  type CodeProps,
8
+ type EmptyStateProps,
9
+ type ErrorMessageProps,
7
10
  type HeadingProps,
11
+ type LozengeProps,
8
12
  type RangeProps,
9
13
  } from '@atlassian/forge-ui/src/components/UIKit';
10
14
  import { type BadgeProps as GeneratedBadgeProps } from '../src/components/__generated__/BadgeProps.codegen';
11
15
  import { type CalendarProps as GeneratedCalendarProps } from '../src/components/__generated__/CalendarProps.codegen';
16
+ import { type CheckboxProps as GeneratedCheckboxProps } from '../src/components/__generated__/CheckboxProps.codegen';
12
17
  import { type CodeBlockProps as GeneratedCodeBlockProps } from '../src/components/__generated__/CodeBlockProps.codegen';
13
18
  import { type CodeProps as GeneratedCodeProps } from '../src/components/__generated__/CodeProps.codegen';
19
+ import { type EmptyStateProps as GeneratedEmptyStateProps } from '../src/components/__generated__/EmptyStateProps.codegen';
20
+ import { type ErrorMessageProps as GeneratedErrorMessageProps } from '../src/components/__generated__/ErrorMessageProps.codegen';
14
21
  import { type HeadingProps as GeneratedHeadingProps } from '../src/components/__generated__/HeadingProps.codegen';
22
+ import { type LozengeProps as GeneratedLozengeProps } from '../src/components/__generated__/LozengeProps.codegen';
15
23
  import { type RangeProps as GeneratedRangeProps } from '../src/components/__generated__/RangeProps.codegen';
16
24
 
17
25
  const assertAssignable = <A, B extends A>() => {};
@@ -33,3 +41,15 @@ assertAssignable<RangeProps, GeneratedRangeProps>();
33
41
 
34
42
  assertAssignable<GeneratedCalendarProps, CalendarProps>();
35
43
  assertAssignable<CalendarProps, GeneratedCalendarProps>();
44
+
45
+ assertAssignable<GeneratedCheckboxProps, CheckboxProps>();
46
+ assertAssignable<CheckboxProps, GeneratedCheckboxProps>();
47
+
48
+ assertAssignable<GeneratedEmptyStateProps, EmptyStateProps>();
49
+ assertAssignable<EmptyStateProps, GeneratedEmptyStateProps>();
50
+
51
+ assertAssignable<GeneratedErrorMessageProps, ErrorMessageProps>();
52
+ assertAssignable<ErrorMessageProps, GeneratedErrorMessageProps>();
53
+
54
+ assertAssignable<GeneratedLozengeProps, LozengeProps>();
55
+ assertAssignable<LozengeProps, GeneratedLozengeProps>();
@@ -3,17 +3,77 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - CheckboxProps
5
5
  *
6
- * @codegen <<SignedSource::d5cd5c6518e80c98416fc61091717141>>
6
+ * @codegen <<SignedSource::634533a7eaed746ad58981b553539cdf>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/checkbox/__generated__/index.partial.tsx <<SignedSource::e34c0ab52d3409a8548b6e51450ba43b>>
9
9
  */
10
10
  /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
11
11
 
12
- import React from 'react';
13
- import PlatformCheckbox from '@atlaskit/checkbox';
14
12
  import type { EventHandlerProps } from './types.codegen';
13
+ import type React from 'react';
15
14
 
16
- type PlatformCheckboxProps = React.ComponentProps<typeof PlatformCheckbox>;
15
+
16
+ // Serialized type
17
+ type PlatformCheckboxProps = {
18
+ /**
19
+ * The name of the submitted field in a checkbox.
20
+ */
21
+ name?: string;
22
+ /**
23
+ * The value to be used in the checkbox input. This is the value that will be returned on form submission.
24
+ */
25
+ value?: string | number;
26
+ /**
27
+ * Sets whether the checkbox begins as checked or unchecked.
28
+ */
29
+ defaultChecked?: boolean;
30
+ /**
31
+ * The ID assigned to the input.
32
+ */
33
+ id?: string;
34
+ /**
35
+ * Indicates the entered value does not conform to the format expected by the application.
36
+ * @see aria-errormessage.
37
+ */
38
+ "aria-invalid"?: false | true | 'false' | 'true' | 'grammar' | 'spelling';
39
+ /**
40
+ * Identifies the element (or elements) that labels the current element.
41
+ * @see aria-describedby.
42
+ */
43
+ "aria-labelledby"?: string;
44
+ /**
45
+ * Sets whether the checkbox is checked or unchecked.
46
+ */
47
+ isChecked?: boolean;
48
+ /**
49
+ * Sets whether the checkbox is disabled. Don’t use a disabled checkbox if it needs to remain in the tab order for assistive technologies.
50
+ */
51
+ isDisabled?: boolean;
52
+ /**
53
+ * Sets whether the checkbox is indeterminate. This only affects the
54
+ * style and does not modify the isChecked property.
55
+ */
56
+ isIndeterminate?: boolean;
57
+ /**
58
+ * Marks the field as invalid. Changes style of unchecked component.
59
+ */
60
+ isInvalid?: boolean;
61
+ /**
62
+ * Marks the field as required & changes the label style.
63
+ */
64
+ isRequired?: boolean;
65
+ /**
66
+ * The label to be displayed to the right of the checkbox. The label is part
67
+ * of the clickable element to select the checkbox.
68
+ */
69
+ label?: React.ReactChild;
70
+ /**
71
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
72
+ * we have generated testid based on the one you pass to the Checkbox component:
73
+ * - `{testId}--hidden-checkbox` to check if it got changed to checked/unchecked.
74
+ */
75
+ testId?: string;
76
+ };
17
77
 
18
78
  export type CheckboxProps = Pick<
19
79
  PlatformCheckboxProps,
@@ -3,16 +3,59 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - EmptyStateProps
5
5
  *
6
- * @codegen <<SignedSource::142748ed4aa864312e3b9ea16f297672>>
6
+ * @codegen <<SignedSource::62fe186d8326a7c3e8533e18dba9fcfb>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/emptystate/__generated__/index.partial.tsx <<SignedSource::d6c509a722d55de0f55d401cd2e75435>>
9
9
  */
10
10
  /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
11
11
 
12
- import React from 'react';
13
- import PlatformEmptyState from '@atlaskit/empty-state';
12
+ import type React from 'react';
14
13
 
15
- type PlatformEmptyStateProps = React.ComponentProps<typeof PlatformEmptyState>;
14
+
15
+ // Serialized type
16
+ type PlatformEmptyStateProps = {
17
+ /**
18
+ * Accessible name for the action buttons group of empty state. Can be used for internationalization. Default is "Button group".
19
+ */
20
+ buttonGroupLabel?: string;
21
+ /**
22
+ * The main block of text that holds additional supporting information.
23
+ */
24
+ description?: React.ReactNode;
25
+ /**
26
+ * Title that briefly describes the page to the user.
27
+ */
28
+ header: string;
29
+ /**
30
+ * The value used to set the heading level of the header element.
31
+ * Must be in the range of 1 to 6. Defaults to 4.
32
+ */
33
+ headingLevel?: number;
34
+ /**
35
+ * Used to indicate a loading state. Will show a spinner next to the action buttons when true.
36
+ */
37
+ isLoading?: boolean;
38
+ /**
39
+ * Primary action button for the page, usually it will be something like "Create" (or "Retry" for error pages).
40
+ */
41
+ primaryAction?: React.ReactNode;
42
+ /**
43
+ * Secondary action button for the page.
44
+ */
45
+ secondaryAction?: React.ReactNode;
46
+ /**
47
+ * Controls how much horizontal space the component fills. Defaults to "wide".
48
+ */
49
+ width?: 'narrow' | 'wide';
50
+ /**
51
+ * Button with link to some external resource like documentation or tutorial, it will be opened in a new tab.
52
+ */
53
+ tertiaryAction?: React.ReactNode;
54
+ /**
55
+ * A hook for automated testing.
56
+ */
57
+ testId?: string;
58
+ };
16
59
 
17
60
  export type EmptyStateProps = Pick<
18
61
  PlatformEmptyStateProps,
@@ -3,16 +3,28 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - ErrorMessageProps
5
5
  *
6
- * @codegen <<SignedSource::f2821b3d824a19e37d6d769695a883f4>>
6
+ * @codegen <<SignedSource::e5e94f85cf8efd7d6cc06b1355785c4b>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/form/__generated__/error-message.partial.tsx <<SignedSource::3758488a0115c629a624fcaae1f524c7>>
9
9
  */
10
10
  /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
11
11
 
12
- import React from 'react';
13
- import { ErrorMessage as PlatformErrorMessage } from '@atlaskit/form';
12
+ import type React from 'react';
14
13
 
15
- type PlatformErrorMessageProps = React.ComponentProps<typeof PlatformErrorMessage>;
14
+
15
+ // Serialized type
16
+ type PlatformErrorMessageProps = {
17
+ /**
18
+ * The content of the message
19
+ */
20
+ children: React.ReactNode;
21
+ /**
22
+ * A testId prop is provided for specified elements, which is a unique string
23
+ * that appears as a data attribute data-testid in the rendered code,
24
+ * serving as a hook for automated tests
25
+ */
26
+ testId?: string;
27
+ };
16
28
 
17
29
  export type ErrorMessageProps = Pick<
18
30
  PlatformErrorMessageProps,
@@ -3,16 +3,40 @@
3
3
  *
4
4
  * Extract component prop types from UIKit 2 components - LozengeProps
5
5
  *
6
- * @codegen <<SignedSource::25dee9ab928c0059e43d176df9313264>>
6
+ * @codegen <<SignedSource::0ef732d9e1b715ee6f4229d3ef5b4649>>
7
7
  * @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
8
8
  * @codegenDependency ../../../../forge-ui/src/components/UIKit/lozenge/__generated__/index.partial.tsx <<SignedSource::e362dbb308b0f7785d47bb5e9aa46ab0>>
9
9
  */
10
10
  /* eslint @repo/internal/codegen/signed-source-integrity: "warn" */
11
11
 
12
- import React from 'react';
13
- import PlatformLozenge from '@atlaskit/lozenge';
12
+ import type React from 'react';
14
13
 
15
- type PlatformLozengeProps = React.ComponentProps<typeof PlatformLozenge>;
14
+
15
+ // Serialized type
16
+ type PlatformLozengeProps = {
17
+ /**
18
+ * Elements to be rendered inside the lozenge. This should ideally be just a word or two.
19
+ */
20
+ children?: React.ReactNode;
21
+ /**
22
+ * A `testId` prop is provided for specified elements, which is a unique
23
+ * string that appears as a data attribute `data-testid` in the rendered code,
24
+ * serving as a hook for automated tests
25
+ */
26
+ testId?: string;
27
+ /**
28
+ * Determines whether to apply the bold style or not.
29
+ */
30
+ isBold?: boolean;
31
+ /**
32
+ * The appearance type.
33
+ */
34
+ appearance?: 'default' | 'inprogress' | 'moved' | 'new' | 'removed' | 'success';
35
+ /**
36
+ * max-width of lozenge container. Default to 200px.
37
+ */
38
+ maxWidth?: string | number;
39
+ };
16
40
 
17
41
  export type LozengeProps = Pick<
18
42
  PlatformLozengeProps,