File tree Expand file tree Collapse file tree 12 files changed +60
-31
lines changed
packages/carbon-component-mapper Expand file tree Collapse file tree 12 files changed +60
-31
lines changed Original file line number Diff line number Diff line change 33
33
"@carbon/icons-react" : " ^10.17.0" ,
34
34
"@semantic-release/git" : " ^7.0.5" ,
35
35
"@semantic-release/npm" : " ^5.1.1" ,
36
+ "@types/carbon-components-react" : " ^7.10.9" ,
36
37
"babel-core" : " ^7.0.0-bridge.0" ,
37
38
"babel-eslint" : " 9.x" ,
38
39
"babel-jest" : " ^23.6.0" ,
Original file line number Diff line number Diff line change 1
- import { UseFieldApiComponentConfig , AnyObject } from "@data-driven-forms/react-form-renderer" ;
1
+ import { UseFieldApiComponentConfig } from "@data-driven-forms/react-form-renderer" ;
2
2
import { ReactNode } from "react" ;
3
3
import { FormGroupProps } from "./form-group" ;
4
4
5
- export interface CheckboxOption extends AnyObject {
5
+ import { CheckboxProps as CarbonCheckboxProps } from 'carbon-components-react' ;
6
+
7
+ export interface CheckboxOption extends CarbonCheckboxProps {
6
8
value ?: any ;
7
9
label : ReactNode ;
8
10
}
9
11
10
- interface InternalCheckboxProps extends AnyObject , React . HTMLProps < HTMLInputElement > {
12
+ interface InternalCheckboxProps extends CarbonCheckboxProps {
11
13
options ?: CheckboxOption [ ] ;
12
14
}
13
15
Original file line number Diff line number Diff line change 1
1
import { FormGroupProps } from "./form-group" ;
2
2
import { UseFieldApiComponentConfig , AnyObject } from "@data-driven-forms/react-form-renderer" ;
3
3
4
- interface InternalDatePickerProps extends AnyObject , React . HTMLProps < HTMLInputElement > {
4
+ import { DatePickerProps as CarbonDatePickerProps , DatePickerInputProps } from 'carbon-components-react' ;
5
+
6
+
7
+ interface InternalDatePickerProps extends DatePickerInputProps {
5
8
datePickerType ?: string ;
6
- DatePickerProps ?: AnyObject ;
9
+ DatePickerProps ?: DatePickerProps ;
7
10
}
8
11
9
12
export type DatePickerProps = InternalDatePickerProps & FormGroupProps & UseFieldApiComponentConfig ;
Original file line number Diff line number Diff line change 1
- import { FormGroupProps } from "./form-group" ;
1
+ import { FormGroupProps as CommonFormGroupProps } from "./form-group" ;
2
2
import { UseFieldApiComponentConfig , AnyObject } from "@data-driven-forms/react-form-renderer" ;
3
3
import { ReactNode } from "react" ;
4
4
5
- export interface RadioOption extends AnyObject {
5
+ import { FormGroupProps , RadioButtonGroupProps , RadioButtonProps } from 'carbon-components-react' ;
6
+
7
+ export interface RadioOption extends RadioButtonProps {
6
8
value : any ;
7
9
label ?: ReactNode ;
8
10
}
9
11
10
- interface InternalRadioProps extends AnyObject {
12
+ interface InternalRadioProps extends RadioButtonGroupProps {
11
13
isDisabled ?: boolean ;
12
14
label ?: ReactNode ;
13
15
options : RadioOption [ ] ;
14
- FormGroupProps ?: AnyObject ;
16
+ FormGroupProps ?: FormGroupProps ;
15
17
}
16
18
17
- export type RadioProps = InternalRadioProps & FormGroupProps & UseFieldApiComponentConfig ;
19
+ export type RadioProps = InternalRadioProps & CommonFormGroupProps & UseFieldApiComponentConfig ;
18
20
19
21
declare const Radio : React . ComponentType < RadioProps > ;
20
22
Original file line number Diff line number Diff line change 1
1
import { FormGroupProps } from "./form-group" ;
2
- import { UseFieldApiComponentConfig , AnyObject } from "@data-driven-forms/react-form-renderer" ;
3
- import { ReactNode } from "react" ;
2
+ import { UseFieldApiComponentConfig } from "@data-driven-forms/react-form-renderer" ;
4
3
5
- export interface SelectOption extends AnyObject {
6
- value ?: any ;
7
- label : ReactNode ;
4
+ import { SelectItemProps , SelectProps as CarbonSelectProps } from 'carbon-components-react' ;
5
+
6
+ export interface SelectOption extends SelectItemProps {
7
+ value : any ;
8
+ label : string | undefined ;
8
9
}
9
10
10
- interface InternalSelectProps extends React . HTMLProps < HTMLSelectElement > {
11
+ interface InternalSelectProps extends CarbonSelectProps {
11
12
options : SelectOption [ ] ;
12
13
isDisabled ?: boolean ;
13
14
}
Original file line number Diff line number Diff line change 1
1
import { FormGroupProps } from "./form-group" ;
2
- import { UseFieldApiComponentConfig , AnyObject } from "@data-driven-forms/react-form-renderer" ;
2
+ import { UseFieldApiComponentConfig } from "@data-driven-forms/react-form-renderer" ;
3
3
4
- interface InternalSliderProps extends AnyObject , React . HTMLProps < HTMLInputElement > {
4
+ import { SliderProps as CarbonSliderProps } from 'carbon-components-react' ;
5
+
6
+ interface InternalSliderProps extends CarbonSliderProps {
5
7
}
6
8
7
9
export type SliderProps = InternalSliderProps & FormGroupProps & UseFieldApiComponentConfig ;
Original file line number Diff line number Diff line change 1
1
import { FormGroupProps } from "./form-group" ;
2
- import { UseFieldApiComponentConfig , AnyObject } from "@data-driven-forms/react-form-renderer" ;
2
+ import { UseFieldApiComponentConfig } from "@data-driven-forms/react-form-renderer" ;
3
3
4
- interface InternalSwitchProps extends AnyObject , React . HTMLProps < HTMLInputElement > { }
4
+ import { ToggleProps } from 'carbon-components-react' ;
5
+
6
+ interface InternalSwitchProps extends ToggleProps { }
5
7
6
8
export type SwitchProps = InternalSwitchProps & FormGroupProps & UseFieldApiComponentConfig ;
7
9
Original file line number Diff line number Diff line change 1
1
import { ReactNode } from "react" ;
2
- import { Field , AnyObject } from "@data-driven-forms/react-form-renderer" ;
2
+ import { Field } from "@data-driven-forms/react-form-renderer" ;
3
3
4
- export interface TabField extends AnyObject {
4
+ import { TabsProps as CarbonTabsProps , TabProps } from 'carbon-components-react' ;
5
+
6
+ export interface TabField extends TabProps {
5
7
name : string ;
6
- title ?: ReactNode ;
8
+ title ?: string | undefined ;
7
9
label ?: ReactNode ;
8
10
fields : Field [ ] ;
9
11
}
10
12
11
- export interface TabsProps extends AnyObject {
13
+ export interface TabsProps extends CarbonTabsProps {
12
14
fields : TabField [ ] ;
13
15
}
14
16
Original file line number Diff line number Diff line change 1
1
import { FormGroupProps } from "./form-group" ;
2
- import { UseFieldApiComponentConfig , AnyObject } from "@data-driven-forms/react-form-renderer" ;
2
+ import { UseFieldApiComponentConfig } from "@data-driven-forms/react-form-renderer" ;
3
3
4
- interface InternalTextFieldProps extends AnyObject , React . HTMLProps < HTMLInputElement > {
4
+ import { TextInputProps } from 'carbon-components-react' ;
5
+
6
+ interface InternalTextFieldProps extends TextInputProps {
5
7
}
6
8
7
9
export type TextFieldProps = InternalTextFieldProps & FormGroupProps & UseFieldApiComponentConfig ;
Original file line number Diff line number Diff line change 1
1
import { FormGroupProps } from "./form-group" ;
2
- import { UseFieldApiComponentConfig , AnyObject } from "@data-driven-forms/react-form-renderer" ;
2
+ import { UseFieldApiComponentConfig } from "@data-driven-forms/react-form-renderer" ;
3
3
4
- interface InternalTextareaProps extends AnyObject , React . HTMLProps < HTMLInputElement > {
4
+ import { TextAreaProps } from 'carbon-components-react' ;
5
+
6
+ interface InternalTextareaProps extends TextAreaProps {
5
7
}
6
8
7
9
export type TextareaProps = InternalTextareaProps & FormGroupProps & UseFieldApiComponentConfig ;
You can’t perform that action at this time.
0 commit comments