@atlaskit/forge-react-types 0.27.6 → 0.27.7
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 +8 -0
- package/dist/types/components/__generated__/CheckboxProps.codegen.d.ts +3 -3
- package/dist/types/components/__generated__/RadioGroupProps.codegen.d.ts +3 -3
- package/dist/types/components/__generated__/RadioProps.codegen.d.ts +3 -3
- package/dist/types/components/__generated__/RangeProps.codegen.d.ts +3 -3
- package/dist/types/components/__generated__/TextAreaProps.codegen.d.ts +3 -3
- package/dist/types/components/__generated__/TextfieldProps.codegen.d.ts +3 -3
- package/dist/types/components/__generated__/ToggleProps.codegen.d.ts +3 -3
- package/dist/types/components/__generated__/types.codegen.d.ts +8 -5
- package/dist/types-ts4.5/components/__generated__/CheckboxProps.codegen.d.ts +3 -3
- package/dist/types-ts4.5/components/__generated__/RadioGroupProps.codegen.d.ts +3 -3
- package/dist/types-ts4.5/components/__generated__/RadioProps.codegen.d.ts +3 -3
- package/dist/types-ts4.5/components/__generated__/RangeProps.codegen.d.ts +3 -3
- package/dist/types-ts4.5/components/__generated__/TextAreaProps.codegen.d.ts +3 -3
- package/dist/types-ts4.5/components/__generated__/TextfieldProps.codegen.d.ts +3 -3
- package/dist/types-ts4.5/components/__generated__/ToggleProps.codegen.d.ts +3 -3
- package/dist/types-ts4.5/components/__generated__/types.codegen.d.ts +8 -5
- package/package.json +6 -6
- package/scripts/codegen/codeGenerator.ts +4 -1
- package/scripts/codegen/componentPropTypes.ts +1 -2
- package/src/components/__generated__/CheckboxProps.codegen.tsx +3 -3
- package/src/components/__generated__/RadioGroupProps.codegen.tsx +3 -3
- package/src/components/__generated__/RadioProps.codegen.tsx +3 -3
- package/src/components/__generated__/RangeProps.codegen.tsx +3 -3
- package/src/components/__generated__/TextAreaProps.codegen.tsx +27 -6
- package/src/components/__generated__/TextfieldProps.codegen.tsx +30 -6
- package/src/components/__generated__/ToggleProps.codegen.tsx +3 -3
- package/src/components/__generated__/types.codegen.ts +9 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @atlaskit/forge-react-types
|
|
2
2
|
|
|
3
|
+
## 0.27.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#133080](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/133080)
|
|
8
|
+
[`99d1f02563769`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/99d1f02563769) -
|
|
9
|
+
Fix input component types, fix controlled states losing cursor state for Textfield and Textarea
|
|
10
|
+
|
|
3
11
|
## 0.27.6
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - CheckboxProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::3a91a161c9c94e4ac140697510a2b366>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/checkbox/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/checkbox/__generated__/index.partial.tsx <<SignedSource::b920c1cd759f2f7718cbd7afc3c04856>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformCheckbox from '@atlaskit/checkbox';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformCheckboxProps = React.ComponentProps<typeof PlatformCheckbox>;
|
|
14
|
-
export type CheckboxProps = Pick<PlatformCheckboxProps, 'testId' | 'defaultChecked' | 'isChecked' | 'isIndeterminate' | 'label' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | '
|
|
14
|
+
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
15
|
export {};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - RadioGroupProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::bfe736ed7d6bc248df6a092491f99239>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/radio/__generated__/radio-group.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/radio/__generated__/radio-group.partial.tsx <<SignedSource::4389c503fdf3481d7d3b0a5b93920e3f>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { RadioGroup as PlatformRadioGroup } from '@atlaskit/radio';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformRadioGroupProps = React.ComponentProps<typeof PlatformRadioGroup>;
|
|
14
|
-
export type RadioGroupProps = Pick<PlatformRadioGroupProps, 'defaultValue' | 'options' | 'onInvalid' | 'testId' | 'isRequired' | 'isDisabled' | 'isInvalid' | '
|
|
14
|
+
export type RadioGroupProps = Pick<PlatformRadioGroupProps, 'defaultValue' | 'options' | 'onInvalid' | 'testId' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange'>;
|
|
15
15
|
export {};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - RadioProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::e022f493d36ef87f3f686367c3344680>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/radio/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/radio/__generated__/index.partial.tsx <<SignedSource::f8ac68c1f51a8a6ea746a657fc9ee4da>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Radio as PlatformRadio } from '@atlaskit/radio';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformRadioProps = React.ComponentProps<typeof PlatformRadio>;
|
|
14
|
-
export type RadioProps = Pick<PlatformRadioProps, 'label' | 'testId' | 'isChecked' | 'ariaLabel' | 'onInvalid' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | '
|
|
14
|
+
export type RadioProps = Pick<PlatformRadioProps, 'label' | 'testId' | 'isChecked' | 'ariaLabel' | 'onInvalid' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
15
15
|
export {};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - RangeProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::b8d42e64b587e4e3daad0988c1fe339e>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/range/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/range/__generated__/index.partial.tsx <<SignedSource::47b47ae1505ae1df985d952d77e858e8>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformRange from '@atlaskit/range';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformRangeProps = React.ComponentProps<typeof PlatformRange>;
|
|
14
|
-
export type RangeProps = Pick<PlatformRangeProps, 'defaultValue' | 'max' | 'min' | 'step' | 'testId' | 'onChange' | 'id' | 'isDisabled' | '
|
|
14
|
+
export type RangeProps = Pick<PlatformRangeProps, 'defaultValue' | 'max' | 'min' | 'step' | 'testId' | 'onChange' | 'id' | 'isDisabled' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onBlur' | 'onFocus'>;
|
|
15
15
|
export {};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - TextAreaProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::d341a38eb88440dce90367d58211d0d7>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/textarea/
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/textarea/index.tsx <<SignedSource::cb1d758c7c2bb0e325bf9f7e3d6ae09d>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformTextarea from '@atlaskit/textarea';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformTextareaProps = React.ComponentProps<typeof PlatformTextarea>;
|
|
14
|
-
export type TextAreaProps = Pick<PlatformTextareaProps, 'appearance' | 'defaultValue' | 'isCompact' | 'isMonospaced' | 'isReadOnly' | 'maxHeight' | 'minimumRows' | 'placeholder' | 'resize' | 'spellCheck' | 'testId' | 'maxLength' | 'minLength' | 'autoFocus' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | '
|
|
14
|
+
export type TextAreaProps = Pick<PlatformTextareaProps, 'appearance' | 'defaultValue' | 'isCompact' | 'isMonospaced' | 'isReadOnly' | 'maxHeight' | 'minimumRows' | 'placeholder' | 'resize' | 'spellCheck' | 'testId' | 'maxLength' | 'minLength' | 'autoFocus' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
15
15
|
export {};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - TextfieldProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::45c617e56bc06c911a5944941288beba>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/textfield/
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/textfield/index.tsx <<SignedSource::3cab13a24ee050b7fe926e8e6a19858b>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformTextfield from '@atlaskit/textfield';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformTextfieldProps = React.ComponentProps<typeof PlatformTextfield>;
|
|
14
|
-
export type TextfieldProps = Pick<PlatformTextfieldProps, 'appearance' | 'elemAfterInput' | 'elemBeforeInput' | 'isCompact' | 'autoFocus' | 'isReadOnly' | 'isMonospaced' | 'placeholder' | 'testId' | 'width' | 'type' | 'defaultValue' | 'min' | 'max' | 'maxLength' | 'minLength' | 'pattern' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | '
|
|
14
|
+
export type TextfieldProps = Pick<PlatformTextfieldProps, 'appearance' | 'elemAfterInput' | 'elemBeforeInput' | 'isCompact' | 'autoFocus' | 'isReadOnly' | 'isMonospaced' | 'placeholder' | 'testId' | 'width' | 'type' | 'defaultValue' | 'min' | 'max' | 'maxLength' | 'minLength' | 'pattern' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
15
15
|
export {};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - ToggleProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::9fae69dce4ff6b99dfdeaff9a08a72f4>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/toggle/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/toggle/__generated__/index.partial.tsx <<SignedSource::c3ddcdd89af4be8543231a1ab89d8f45>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformToggle from '@atlaskit/toggle';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformToggleProps = React.ComponentProps<typeof PlatformToggle>;
|
|
14
|
-
export type ToggleProps = Pick<PlatformToggleProps, 'size' | 'testId' | 'defaultChecked' | 'isChecked' | 'label' | 'id' | 'isDisabled' | '
|
|
14
|
+
export type ToggleProps = Pick<PlatformToggleProps, 'size' | 'testId' | 'defaultChecked' | 'isChecked' | 'label' | 'id' | 'isDisabled' | 'value' | 'name'> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
15
15
|
export {};
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared types file from UIKit 2
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::634fdc59c731fd94bdd55b0d31077d48>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/types.ts <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/types.ts <<SignedSource::01eebd8c9c7c64bb9ed0b194e2475ed4>>
|
|
9
9
|
*/
|
|
10
10
|
export type SerialisableEvent = {
|
|
11
11
|
bubbles: boolean;
|
|
@@ -14,6 +14,8 @@ export type SerialisableEvent = {
|
|
|
14
14
|
eventPhase: number;
|
|
15
15
|
isTrusted: boolean;
|
|
16
16
|
target: {
|
|
17
|
+
selectionStart?: number | null;
|
|
18
|
+
selectionEnd?: number | null;
|
|
17
19
|
value?: any;
|
|
18
20
|
checked?: boolean;
|
|
19
21
|
name?: string;
|
|
@@ -24,8 +26,9 @@ export type SerialisableEvent = {
|
|
|
24
26
|
timeStamp: number;
|
|
25
27
|
type: string;
|
|
26
28
|
};
|
|
29
|
+
export type InputEvent = SerialisableEvent;
|
|
27
30
|
export type EventHandlerProps = {
|
|
28
|
-
onChange?: (event:
|
|
29
|
-
onBlur?: (event:
|
|
30
|
-
onFocus?: (event:
|
|
31
|
+
onChange?: (event: InputEvent) => void;
|
|
32
|
+
onBlur?: (event: InputEvent) => void;
|
|
33
|
+
onFocus?: (event: InputEvent) => void;
|
|
31
34
|
};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - CheckboxProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::3a91a161c9c94e4ac140697510a2b366>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/checkbox/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/checkbox/__generated__/index.partial.tsx <<SignedSource::b920c1cd759f2f7718cbd7afc3c04856>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformCheckbox from '@atlaskit/checkbox';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformCheckboxProps = React.ComponentProps<typeof PlatformCheckbox>;
|
|
14
|
-
export type CheckboxProps = Pick<PlatformCheckboxProps, 'testId' | 'defaultChecked' | 'isChecked' | 'isIndeterminate' | 'label' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | '
|
|
14
|
+
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
15
|
export {};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - RadioGroupProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::bfe736ed7d6bc248df6a092491f99239>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/radio/__generated__/radio-group.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/radio/__generated__/radio-group.partial.tsx <<SignedSource::4389c503fdf3481d7d3b0a5b93920e3f>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { RadioGroup as PlatformRadioGroup } from '@atlaskit/radio';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformRadioGroupProps = React.ComponentProps<typeof PlatformRadioGroup>;
|
|
14
|
-
export type RadioGroupProps = Pick<PlatformRadioGroupProps, 'defaultValue' | 'options' | 'onInvalid' | 'testId' | 'isRequired' | 'isDisabled' | 'isInvalid' | '
|
|
14
|
+
export type RadioGroupProps = Pick<PlatformRadioGroupProps, 'defaultValue' | 'options' | 'onInvalid' | 'testId' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange'>;
|
|
15
15
|
export {};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - RadioProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::e022f493d36ef87f3f686367c3344680>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/radio/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/radio/__generated__/index.partial.tsx <<SignedSource::f8ac68c1f51a8a6ea746a657fc9ee4da>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Radio as PlatformRadio } from '@atlaskit/radio';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformRadioProps = React.ComponentProps<typeof PlatformRadio>;
|
|
14
|
-
export type RadioProps = Pick<PlatformRadioProps, 'label' | 'testId' | 'isChecked' | 'ariaLabel' | 'onInvalid' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | '
|
|
14
|
+
export type RadioProps = Pick<PlatformRadioProps, 'label' | 'testId' | 'isChecked' | 'ariaLabel' | 'onInvalid' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
15
15
|
export {};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - RangeProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::b8d42e64b587e4e3daad0988c1fe339e>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/range/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/range/__generated__/index.partial.tsx <<SignedSource::47b47ae1505ae1df985d952d77e858e8>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformRange from '@atlaskit/range';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformRangeProps = React.ComponentProps<typeof PlatformRange>;
|
|
14
|
-
export type RangeProps = Pick<PlatformRangeProps, 'defaultValue' | 'max' | 'min' | 'step' | 'testId' | 'onChange' | 'id' | 'isDisabled' | '
|
|
14
|
+
export type RangeProps = Pick<PlatformRangeProps, 'defaultValue' | 'max' | 'min' | 'step' | 'testId' | 'onChange' | 'id' | 'isDisabled' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onBlur' | 'onFocus'>;
|
|
15
15
|
export {};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - TextAreaProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::d341a38eb88440dce90367d58211d0d7>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/textarea/
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/textarea/index.tsx <<SignedSource::cb1d758c7c2bb0e325bf9f7e3d6ae09d>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformTextarea from '@atlaskit/textarea';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformTextareaProps = React.ComponentProps<typeof PlatformTextarea>;
|
|
14
|
-
export type TextAreaProps = Pick<PlatformTextareaProps, 'appearance' | 'defaultValue' | 'isCompact' | 'isMonospaced' | 'isReadOnly' | 'maxHeight' | 'minimumRows' | 'placeholder' | 'resize' | 'spellCheck' | 'testId' | 'maxLength' | 'minLength' | 'autoFocus' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | '
|
|
14
|
+
export type TextAreaProps = Pick<PlatformTextareaProps, 'appearance' | 'defaultValue' | 'isCompact' | 'isMonospaced' | 'isReadOnly' | 'maxHeight' | 'minimumRows' | 'placeholder' | 'resize' | 'spellCheck' | 'testId' | 'maxLength' | 'minLength' | 'autoFocus' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
15
15
|
export {};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - TextfieldProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::45c617e56bc06c911a5944941288beba>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/textfield/
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/textfield/index.tsx <<SignedSource::3cab13a24ee050b7fe926e8e6a19858b>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformTextfield from '@atlaskit/textfield';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformTextfieldProps = React.ComponentProps<typeof PlatformTextfield>;
|
|
14
|
-
export type TextfieldProps = Pick<PlatformTextfieldProps, 'appearance' | 'elemAfterInput' | 'elemBeforeInput' | 'isCompact' | 'autoFocus' | 'isReadOnly' | 'isMonospaced' | 'placeholder' | 'testId' | 'width' | 'type' | 'defaultValue' | 'min' | 'max' | 'maxLength' | 'minLength' | 'pattern' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | '
|
|
14
|
+
export type TextfieldProps = Pick<PlatformTextfieldProps, 'appearance' | 'elemAfterInput' | 'elemBeforeInput' | 'isCompact' | 'autoFocus' | 'isReadOnly' | 'isMonospaced' | 'placeholder' | 'testId' | 'width' | 'type' | 'defaultValue' | 'min' | 'max' | 'maxLength' | 'minLength' | 'pattern' | 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
15
15
|
export {};
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - ToggleProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::9fae69dce4ff6b99dfdeaff9a08a72f4>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/toggle/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/toggle/__generated__/index.partial.tsx <<SignedSource::c3ddcdd89af4be8543231a1ab89d8f45>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformToggle from '@atlaskit/toggle';
|
|
12
12
|
import type { EventHandlerProps } from './types.codegen';
|
|
13
13
|
type PlatformToggleProps = React.ComponentProps<typeof PlatformToggle>;
|
|
14
|
-
export type ToggleProps = Pick<PlatformToggleProps, 'size' | 'testId' | 'defaultChecked' | 'isChecked' | 'label' | 'id' | 'isDisabled' | '
|
|
14
|
+
export type ToggleProps = Pick<PlatformToggleProps, 'size' | 'testId' | 'defaultChecked' | 'isChecked' | 'label' | 'id' | 'isDisabled' | 'value' | 'name'> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
15
15
|
export {};
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared types file from UIKit 2
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::634fdc59c731fd94bdd55b0d31077d48>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/types.ts <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/types.ts <<SignedSource::01eebd8c9c7c64bb9ed0b194e2475ed4>>
|
|
9
9
|
*/
|
|
10
10
|
export type SerialisableEvent = {
|
|
11
11
|
bubbles: boolean;
|
|
@@ -14,6 +14,8 @@ export type SerialisableEvent = {
|
|
|
14
14
|
eventPhase: number;
|
|
15
15
|
isTrusted: boolean;
|
|
16
16
|
target: {
|
|
17
|
+
selectionStart?: number | null;
|
|
18
|
+
selectionEnd?: number | null;
|
|
17
19
|
value?: any;
|
|
18
20
|
checked?: boolean;
|
|
19
21
|
name?: string;
|
|
@@ -24,8 +26,9 @@ export type SerialisableEvent = {
|
|
|
24
26
|
timeStamp: number;
|
|
25
27
|
type: string;
|
|
26
28
|
};
|
|
29
|
+
export type InputEvent = SerialisableEvent;
|
|
27
30
|
export type EventHandlerProps = {
|
|
28
|
-
onChange?: (event:
|
|
29
|
-
onBlur?: (event:
|
|
30
|
-
onFocus?: (event:
|
|
31
|
+
onChange?: (event: InputEvent) => void;
|
|
32
|
+
onBlur?: (event: InputEvent) => void;
|
|
33
|
+
onFocus?: (event: InputEvent) => void;
|
|
31
34
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/forge-react-types",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.7",
|
|
4
4
|
"description": "Component types for Forge UI Kit React components",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@atlaskit/badge": "^16.4.0",
|
|
29
29
|
"@atlaskit/banner": "^12.5.0",
|
|
30
|
-
"@atlaskit/button": "^20.
|
|
30
|
+
"@atlaskit/button": "^20.1.0",
|
|
31
31
|
"@atlaskit/calendar": "^14.5.0",
|
|
32
32
|
"@atlaskit/checkbox": "^13.7.0",
|
|
33
33
|
"@atlaskit/code": "^15.5.0",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"@atlaskit/empty-state": "^7.11.0",
|
|
36
36
|
"@atlaskit/form": "^10.5.0",
|
|
37
37
|
"@atlaskit/heading": "^2.4.0",
|
|
38
|
-
"@atlaskit/inline-edit": "^13.
|
|
38
|
+
"@atlaskit/inline-edit": "^13.7.0",
|
|
39
39
|
"@atlaskit/lozenge": "^11.10.0",
|
|
40
40
|
"@atlaskit/modal-dialog": "^12.15.0",
|
|
41
|
-
"@atlaskit/popup": "^1.
|
|
41
|
+
"@atlaskit/popup": "^1.23.0",
|
|
42
42
|
"@atlaskit/primitives": "^12.0.0",
|
|
43
43
|
"@atlaskit/progress-bar": "2.3.1",
|
|
44
44
|
"@atlaskit/progress-tracker": "8.8.1",
|
|
45
45
|
"@atlaskit/radio": "^6.5.0",
|
|
46
46
|
"@atlaskit/range": "^7.4.0",
|
|
47
47
|
"@atlaskit/section-message": "^6.6.0",
|
|
48
|
-
"@atlaskit/select": "^17.
|
|
48
|
+
"@atlaskit/select": "^17.15.0",
|
|
49
49
|
"@atlaskit/spinner": "^16.3.0",
|
|
50
50
|
"@atlaskit/tabs": "^16.4.0",
|
|
51
51
|
"@atlaskit/tag": "^12.5.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@atlaskit/textarea": "^5.6.0",
|
|
54
54
|
"@atlaskit/textfield": "^6.5.0",
|
|
55
55
|
"@atlaskit/toggle": "^13.3.0",
|
|
56
|
-
"@atlaskit/tokens": "^1.
|
|
56
|
+
"@atlaskit/tokens": "^1.59.0",
|
|
57
57
|
"@atlaskit/tooltip": "^18.7.0",
|
|
58
58
|
"@babel/runtime": "^7.0.0"
|
|
59
59
|
},
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/ban-types */
|
|
1
2
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
2
3
|
import {
|
|
3
4
|
type Symbol,
|
|
@@ -136,9 +137,11 @@ class ImportDeclarationProxy {
|
|
|
136
137
|
}
|
|
137
138
|
}
|
|
138
139
|
|
|
140
|
+
// handles type imports from platform/packages/forge/forge-ui/src/components/UIKit/types.ts
|
|
139
141
|
const isSharedUIKit2TypesImport = (importDeclaration: ImportDeclaration) => {
|
|
140
142
|
return (
|
|
141
|
-
importDeclaration.isTypeOnly() &&
|
|
143
|
+
importDeclaration.isTypeOnly() &&
|
|
144
|
+
importDeclaration.getModuleSpecifierValue().split('/').pop() === 'types'
|
|
142
145
|
);
|
|
143
146
|
};
|
|
144
147
|
|
|
@@ -162,9 +162,8 @@ const updatePackageJsonWithADSComponentDependencies = (componentOutputDir: strin
|
|
|
162
162
|
}, {});
|
|
163
163
|
|
|
164
164
|
packageJson.dependencies = updatedDependencies;
|
|
165
|
-
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, '\t'));
|
|
165
|
+
fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, '\t') + '\n');
|
|
166
166
|
};
|
|
167
|
-
|
|
168
167
|
/**
|
|
169
168
|
* This copies types file from the types file in UIKit
|
|
170
169
|
* to __generated__ folder.
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - CheckboxProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::3a91a161c9c94e4ac140697510a2b366>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/checkbox/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/checkbox/__generated__/index.partial.tsx <<SignedSource::b920c1cd759f2f7718cbd7afc3c04856>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformCheckbox from '@atlaskit/checkbox';
|
|
@@ -16,5 +16,5 @@ type PlatformCheckboxProps = React.ComponentProps<typeof PlatformCheckbox>;
|
|
|
16
16
|
export type CheckboxProps = Pick<
|
|
17
17
|
PlatformCheckboxProps,
|
|
18
18
|
'testId' | 'defaultChecked' | 'isChecked' | 'isIndeterminate' | 'label'
|
|
19
|
-
| 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | '
|
|
19
|
+
| 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'
|
|
20
20
|
> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - RadioGroupProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::bfe736ed7d6bc248df6a092491f99239>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/radio/__generated__/radio-group.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/radio/__generated__/radio-group.partial.tsx <<SignedSource::4389c503fdf3481d7d3b0a5b93920e3f>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { RadioGroup as PlatformRadioGroup } from '@atlaskit/radio';
|
|
@@ -16,5 +16,5 @@ type PlatformRadioGroupProps = React.ComponentProps<typeof PlatformRadioGroup>;
|
|
|
16
16
|
export type RadioGroupProps = Pick<
|
|
17
17
|
PlatformRadioGroupProps,
|
|
18
18
|
'defaultValue' | 'options' | 'onInvalid' | 'testId'
|
|
19
|
-
| 'isRequired' | 'isDisabled' | 'isInvalid' | '
|
|
19
|
+
| 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-labelledby' | 'name'
|
|
20
20
|
> & Pick<EventHandlerProps, 'onChange'>;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - RadioProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::e022f493d36ef87f3f686367c3344680>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/radio/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/radio/__generated__/index.partial.tsx <<SignedSource::f8ac68c1f51a8a6ea746a657fc9ee4da>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { Radio as PlatformRadio } from '@atlaskit/radio';
|
|
@@ -16,5 +16,5 @@ type PlatformRadioProps = React.ComponentProps<typeof PlatformRadio>;
|
|
|
16
16
|
export type RadioProps = Pick<
|
|
17
17
|
PlatformRadioProps,
|
|
18
18
|
'label' | 'testId' | 'isChecked' | 'ariaLabel' | 'onInvalid'
|
|
19
|
-
| 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | '
|
|
19
|
+
| 'id' | 'isRequired' | 'isDisabled' | 'isInvalid' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'
|
|
20
20
|
> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - RangeProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::b8d42e64b587e4e3daad0988c1fe339e>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/range/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/range/__generated__/index.partial.tsx <<SignedSource::47b47ae1505ae1df985d952d77e858e8>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformRange from '@atlaskit/range';
|
|
@@ -16,5 +16,5 @@ type PlatformRangeProps = React.ComponentProps<typeof PlatformRange>;
|
|
|
16
16
|
export type RangeProps = Pick<
|
|
17
17
|
PlatformRangeProps,
|
|
18
18
|
'defaultValue' | 'max' | 'min' | 'step' | 'testId' | 'onChange'
|
|
19
|
-
| 'id' | 'isDisabled' | '
|
|
19
|
+
| 'id' | 'isDisabled' | 'value' | 'aria-invalid' | 'aria-labelledby' | 'name'
|
|
20
20
|
> & Pick<EventHandlerProps, 'onBlur' | 'onFocus'>;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - TextAreaProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::d341a38eb88440dce90367d58211d0d7>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/textarea/
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/textarea/index.tsx <<SignedSource::cb1d758c7c2bb0e325bf9f7e3d6ae09d>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformTextarea from '@atlaskit/textarea';
|
|
@@ -14,7 +14,28 @@ import type { EventHandlerProps } from './types.codegen';
|
|
|
14
14
|
type PlatformTextareaProps = React.ComponentProps<typeof PlatformTextarea>;
|
|
15
15
|
|
|
16
16
|
export type TextAreaProps = Pick<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
PlatformTextareaProps,
|
|
18
|
+
| 'appearance'
|
|
19
|
+
| 'defaultValue'
|
|
20
|
+
| 'isCompact'
|
|
21
|
+
| 'isMonospaced'
|
|
22
|
+
| 'isReadOnly'
|
|
23
|
+
| 'maxHeight'
|
|
24
|
+
| 'minimumRows'
|
|
25
|
+
| 'placeholder'
|
|
26
|
+
| 'resize'
|
|
27
|
+
| 'spellCheck'
|
|
28
|
+
| 'testId'
|
|
29
|
+
| 'maxLength'
|
|
30
|
+
| 'minLength'
|
|
31
|
+
| 'autoFocus'
|
|
32
|
+
| 'id'
|
|
33
|
+
| 'isRequired'
|
|
34
|
+
| 'isDisabled'
|
|
35
|
+
| 'isInvalid'
|
|
36
|
+
| 'value'
|
|
37
|
+
| 'aria-invalid'
|
|
38
|
+
| 'aria-labelledby'
|
|
39
|
+
| 'name'
|
|
40
|
+
> &
|
|
41
|
+
Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - TextfieldProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::45c617e56bc06c911a5944941288beba>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/textfield/
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/textfield/index.tsx <<SignedSource::3cab13a24ee050b7fe926e8e6a19858b>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformTextfield from '@atlaskit/textfield';
|
|
@@ -14,7 +14,31 @@ import type { EventHandlerProps } from './types.codegen';
|
|
|
14
14
|
type PlatformTextfieldProps = React.ComponentProps<typeof PlatformTextfield>;
|
|
15
15
|
|
|
16
16
|
export type TextfieldProps = Pick<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
PlatformTextfieldProps,
|
|
18
|
+
| 'appearance'
|
|
19
|
+
| 'elemAfterInput'
|
|
20
|
+
| 'elemBeforeInput'
|
|
21
|
+
| 'isCompact'
|
|
22
|
+
| 'autoFocus'
|
|
23
|
+
| 'isReadOnly'
|
|
24
|
+
| 'isMonospaced'
|
|
25
|
+
| 'placeholder'
|
|
26
|
+
| 'testId'
|
|
27
|
+
| 'width'
|
|
28
|
+
| 'type'
|
|
29
|
+
| 'defaultValue'
|
|
30
|
+
| 'min'
|
|
31
|
+
| 'max'
|
|
32
|
+
| 'maxLength'
|
|
33
|
+
| 'minLength'
|
|
34
|
+
| 'pattern'
|
|
35
|
+
| 'id'
|
|
36
|
+
| 'isRequired'
|
|
37
|
+
| 'isDisabled'
|
|
38
|
+
| 'isInvalid'
|
|
39
|
+
| 'value'
|
|
40
|
+
| 'aria-invalid'
|
|
41
|
+
| 'aria-labelledby'
|
|
42
|
+
| 'name'
|
|
43
|
+
> &
|
|
44
|
+
Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Extract component prop types from UIKit 2 components - ToggleProps
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::9fae69dce4ff6b99dfdeaff9a08a72f4>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/toggle/__generated__/index.partial.tsx <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/toggle/__generated__/index.partial.tsx <<SignedSource::c3ddcdd89af4be8543231a1ab89d8f45>>
|
|
9
9
|
*/
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import PlatformToggle from '@atlaskit/toggle';
|
|
@@ -16,5 +16,5 @@ type PlatformToggleProps = React.ComponentProps<typeof PlatformToggle>;
|
|
|
16
16
|
export type ToggleProps = Pick<
|
|
17
17
|
PlatformToggleProps,
|
|
18
18
|
'size' | 'testId' | 'defaultChecked' | 'isChecked' | 'label'
|
|
19
|
-
| 'id' | 'isDisabled' | '
|
|
19
|
+
| 'id' | 'isDisabled' | 'value' | 'name'
|
|
20
20
|
> & Pick<EventHandlerProps, 'onChange' | 'onBlur' | 'onFocus'>;
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Shared types file from UIKit 2
|
|
5
5
|
*
|
|
6
|
-
* @codegen <<SignedSource::
|
|
6
|
+
* @codegen <<SignedSource::634fdc59c731fd94bdd55b0d31077d48>>
|
|
7
7
|
* @codegenCommand yarn workspace @atlaskit/forge-react-types codegen
|
|
8
|
-
* @codegenDependency ../../../../forge-ui/src/components/UIKit/types.ts <<SignedSource::
|
|
8
|
+
* @codegenDependency ../../../../forge-ui/src/components/UIKit/types.ts <<SignedSource::01eebd8c9c7c64bb9ed0b194e2475ed4>>
|
|
9
9
|
*/
|
|
10
10
|
export type SerialisableEvent = {
|
|
11
11
|
bubbles: boolean;
|
|
@@ -14,6 +14,8 @@ export type SerialisableEvent = {
|
|
|
14
14
|
eventPhase: number;
|
|
15
15
|
isTrusted: boolean;
|
|
16
16
|
target: {
|
|
17
|
+
selectionStart?: number | null;
|
|
18
|
+
selectionEnd?: number | null;
|
|
17
19
|
value?: any;
|
|
18
20
|
checked?: boolean;
|
|
19
21
|
name?: string;
|
|
@@ -25,8 +27,10 @@ export type SerialisableEvent = {
|
|
|
25
27
|
type: string;
|
|
26
28
|
};
|
|
27
29
|
|
|
30
|
+
export type InputEvent = SerialisableEvent;
|
|
31
|
+
|
|
28
32
|
export type EventHandlerProps = {
|
|
29
|
-
onChange?: (event:
|
|
30
|
-
onBlur?: (event:
|
|
31
|
-
onFocus?: (event:
|
|
33
|
+
onChange?: (event: InputEvent) => void;
|
|
34
|
+
onBlur?: (event: InputEvent) => void;
|
|
35
|
+
onFocus?: (event: InputEvent) => void;
|
|
32
36
|
};
|