@dfds-ui/forms 2.2.0-alpha.07a3a716 → 2.2.0-alpha.32eece3d
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/assistive-text/AssistiveText.d.ts +1 -1
- package/asterisk/Asterisk.d.ts +2 -2
- package/checkbox/CheckboxContext.d.ts +1 -0
- package/checkbox/CheckboxGroup.d.ts +2 -2
- package/cjs/assistive-text/AssistiveText.d.ts +1 -1
- package/cjs/asterisk/Asterisk.d.ts +2 -2
- package/cjs/checkbox/CheckboxContext.d.ts +1 -0
- package/cjs/checkbox/CheckboxGroup.d.ts +2 -2
- package/cjs/enhanced/EnhancedField.d.ts +1 -1
- package/cjs/error-text/ErrorText.d.ts +1 -1
- package/cjs/field-wrap/FieldWrap.d.ts +2 -2
- package/cjs/help-icon/HelpIcon.d.ts +2 -2
- package/cjs/label/Label.d.ts +1 -1
- package/cjs/radio/RadioContext.d.ts +1 -0
- package/cjs/radio/RadioGroup.d.ts +2 -2
- package/cjs/rating/Rating.d.ts +1 -1
- package/cjs/select-field/AsyncSelectField.d.ts +88 -80
- package/cjs/select-field/CreatableSelectField.d.ts +89 -81
- package/cjs/select-field/NativeSelectField.d.ts +1 -1
- package/cjs/select-field/SelectField.d.ts +4 -4
- package/cjs/switch/Switch.d.ts +1 -1
- package/cjs/switch/SwitchContext.d.ts +1 -0
- package/cjs/switch/SwitchGroup.d.ts +2 -2
- package/cjs/text-field/TextField.d.ts +2 -2
- package/enhanced/EnhancedField.d.ts +1 -1
- package/error-text/ErrorText.d.ts +1 -1
- package/field-wrap/FieldWrap.d.ts +2 -2
- package/help-icon/HelpIcon.d.ts +2 -2
- package/label/Label.d.ts +1 -1
- package/package.json +9 -9
- package/radio/RadioContext.d.ts +1 -0
- package/radio/RadioGroup.d.ts +2 -2
- package/rating/Rating.d.ts +1 -1
- package/select-field/AsyncSelectField.d.ts +88 -80
- package/select-field/CreatableSelectField.d.ts +89 -81
- package/select-field/NativeSelectField.d.ts +1 -1
- package/select-field/SelectField.d.ts +4 -4
- package/switch/Switch.d.ts +1 -1
- package/switch/SwitchContext.d.ts +1 -0
- package/switch/SwitchGroup.d.ts +2 -2
- package/text-field/TextField.d.ts +2 -2
|
@@ -41,88 +41,96 @@ export declare type CreatableSelectFieldProps<Option, IsMulti extends boolean, G
|
|
|
41
41
|
value?: SingleValue<Option> | MultiValue<Option>;
|
|
42
42
|
visualSize?: Size;
|
|
43
43
|
};
|
|
44
|
-
declare const CreatableSelectFieldInner: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ assistiveText, components, defaultValue, disabled, errorMessage, filterConfig, help, helpPlacement, hideAsterisk, isClearable, isMulti, isSearchable, label, name, onBlur, onChange, onSelect, options, placeholder, required, styles, value, visualSize, ...rest }: CreatableSelectFieldProps<Option, IsMulti, Group>, ref: React.ForwardedRef<any>) => JSX.Element;
|
|
45
|
-
export declare const CreatableSelectField: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: BaseFieldProps & Omit<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "id" | "
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
44
|
+
declare const CreatableSelectFieldInner: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>({ assistiveText, components, defaultValue, disabled, errorMessage, filterConfig, help, helpPlacement, hideAsterisk, isClearable, isMulti, isSearchable, label, name, onBlur, onChange, onSelect, options, placeholder, required, styles, value, visualSize, ...rest }: CreatableSelectFieldProps<Option, IsMulti, Group>, ref: React.ForwardedRef<any>) => React.JSX.Element;
|
|
45
|
+
export declare const CreatableSelectField: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: BaseFieldProps & Omit<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "id" | "className" | "value" | "form" | "autoFocus" | "aria-errormessage" | "aria-invalid" | "aria-label" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "theme" | "name" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
|
|
46
|
+
tabIndex?: number | undefined;
|
|
47
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
48
|
+
placeholder?: React.ReactNode;
|
|
49
|
+
backspaceRemovesValue?: boolean | undefined;
|
|
50
|
+
blurInputOnSelect?: boolean | undefined;
|
|
51
|
+
captureMenuScroll?: boolean | undefined;
|
|
52
|
+
closeMenuOnSelect?: boolean | undefined;
|
|
53
|
+
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
54
|
+
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
55
|
+
controlShouldRenderValue?: boolean | undefined;
|
|
56
|
+
escapeClearsValue?: boolean | undefined;
|
|
57
|
+
filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
58
|
+
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
59
|
+
getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
|
|
60
|
+
getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
|
|
61
|
+
isDisabled?: boolean | undefined;
|
|
62
|
+
isLoading?: boolean | undefined;
|
|
63
|
+
isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
|
|
64
|
+
isMulti?: IsMulti | undefined;
|
|
65
|
+
isRtl?: boolean | undefined;
|
|
66
|
+
isSearchable?: boolean | undefined;
|
|
67
|
+
loadingMessage?: ((obj: {
|
|
68
|
+
inputValue: string;
|
|
69
|
+
}) => React.ReactNode) | undefined;
|
|
70
|
+
minMenuHeight?: number | undefined;
|
|
71
|
+
maxMenuHeight?: number | undefined;
|
|
72
|
+
menuIsOpen?: boolean | undefined;
|
|
73
|
+
menuPlacement?: import("react-select").MenuPlacement | undefined;
|
|
74
|
+
menuPosition?: import("react-select").MenuPosition | undefined;
|
|
75
|
+
menuShouldBlockScroll?: boolean | undefined;
|
|
76
|
+
menuShouldScrollIntoView?: boolean | undefined;
|
|
77
|
+
noOptionsMessage?: ((obj: {
|
|
78
|
+
inputValue: string;
|
|
79
|
+
}) => React.ReactNode) | undefined;
|
|
80
|
+
openMenuOnFocus?: boolean | undefined;
|
|
81
|
+
openMenuOnClick?: boolean | undefined;
|
|
82
|
+
options?: OptionsOrGroups<Option, Group> | undefined;
|
|
83
|
+
pageSize?: number | undefined;
|
|
84
|
+
screenReaderStatus?: ((obj: {
|
|
80
85
|
count: number;
|
|
81
|
-
}) => string;
|
|
82
|
-
styles
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
'aria-live'
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
86
|
+
}) => string) | undefined;
|
|
87
|
+
styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
|
|
88
|
+
tabSelectsValue?: boolean | undefined;
|
|
89
|
+
} & {}, "value" | "onChange" | "inputValue" | "menuIsOpen" | "onInputChange" | "onMenuOpen" | "onMenuClose"> & Partial<Pick<import("react-select/dist/declarations/src/Select").Props<Option, IsMulti, Group>, "id" | "className" | "value" | "form" | "autoFocus" | "aria-errormessage" | "aria-invalid" | "aria-label" | "aria-labelledby" | "onFocus" | "onBlur" | "onChange" | "onKeyDown" | "theme" | "name" | "ariaLiveMessages" | "classNamePrefix" | "delimiter" | "formatOptionLabel" | "hideSelectedOptions" | "inputValue" | "inputId" | "instanceId" | "isClearable" | "isOptionSelected" | "menuPortalTarget" | "onInputChange" | "onMenuOpen" | "onMenuClose" | "onMenuScrollToTop" | "onMenuScrollToBottom"> & {
|
|
90
|
+
tabIndex?: number | undefined;
|
|
91
|
+
'aria-live'?: "off" | "assertive" | "polite" | undefined;
|
|
92
|
+
placeholder?: React.ReactNode;
|
|
93
|
+
backspaceRemovesValue?: boolean | undefined;
|
|
94
|
+
blurInputOnSelect?: boolean | undefined;
|
|
95
|
+
captureMenuScroll?: boolean | undefined;
|
|
96
|
+
closeMenuOnSelect?: boolean | undefined;
|
|
97
|
+
closeMenuOnScroll?: boolean | ((event: Event) => boolean) | undefined;
|
|
98
|
+
components?: Partial<import("react-select/dist/declarations/src/components").SelectComponents<Option, IsMulti, Group>> | undefined;
|
|
99
|
+
controlShouldRenderValue?: boolean | undefined;
|
|
100
|
+
escapeClearsValue?: boolean | undefined;
|
|
101
|
+
filterOption?: ((option: import("react-select/dist/declarations/src/filters").FilterOptionOption<Option>, inputValue: string) => boolean) | null | undefined;
|
|
102
|
+
formatGroupLabel?: ((group: Group) => React.ReactNode) | undefined;
|
|
103
|
+
getOptionLabel?: import("react-select").GetOptionLabel<Option> | undefined;
|
|
104
|
+
getOptionValue?: import("react-select").GetOptionValue<Option> | undefined;
|
|
105
|
+
isDisabled?: boolean | undefined;
|
|
106
|
+
isLoading?: boolean | undefined;
|
|
107
|
+
isOptionDisabled?: ((option: Option, selectValue: import("react-select").Options<Option>) => boolean) | undefined;
|
|
108
|
+
isMulti?: IsMulti | undefined;
|
|
109
|
+
isRtl?: boolean | undefined;
|
|
110
|
+
isSearchable?: boolean | undefined;
|
|
111
|
+
loadingMessage?: ((obj: {
|
|
112
|
+
inputValue: string;
|
|
113
|
+
}) => React.ReactNode) | undefined;
|
|
114
|
+
minMenuHeight?: number | undefined;
|
|
115
|
+
maxMenuHeight?: number | undefined;
|
|
116
|
+
menuIsOpen?: boolean | undefined;
|
|
117
|
+
menuPlacement?: import("react-select").MenuPlacement | undefined;
|
|
118
|
+
menuPosition?: import("react-select").MenuPosition | undefined;
|
|
119
|
+
menuShouldBlockScroll?: boolean | undefined;
|
|
120
|
+
menuShouldScrollIntoView?: boolean | undefined;
|
|
121
|
+
noOptionsMessage?: ((obj: {
|
|
122
|
+
inputValue: string;
|
|
123
|
+
}) => React.ReactNode) | undefined;
|
|
124
|
+
openMenuOnFocus?: boolean | undefined;
|
|
125
|
+
openMenuOnClick?: boolean | undefined;
|
|
126
|
+
options?: OptionsOrGroups<Option, Group> | undefined;
|
|
127
|
+
pageSize?: number | undefined;
|
|
128
|
+
screenReaderStatus?: ((obj: {
|
|
120
129
|
count: number;
|
|
121
|
-
}) => string;
|
|
122
|
-
styles
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}, never>>> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<Option> & import("react-select/dist/declarations/src/useCreatable").CreatableAdditionalProps<Option, Group> & {
|
|
130
|
+
}) => string) | undefined;
|
|
131
|
+
styles?: import("react-select").StylesConfig<Option, IsMulti, Group> | undefined;
|
|
132
|
+
tabSelectsValue?: boolean | undefined;
|
|
133
|
+
} & {}> & import("react-select/dist/declarations/src/useStateManager").StateManagerAdditionalProps<Option> & import("react-select/dist/declarations/src/useCreatable").CreatableAdditionalProps<Option, Group> & {
|
|
126
134
|
assistiveText?: string | undefined;
|
|
127
135
|
autoFocus?: boolean | undefined;
|
|
128
136
|
className?: string | undefined;
|
|
@@ -148,7 +156,7 @@ export declare const CreatableSelectField: <Option, IsMulti extends boolean, Gro
|
|
|
148
156
|
isMulti?: boolean | undefined;
|
|
149
157
|
isSearchable?: boolean | undefined;
|
|
150
158
|
menuIsOpen?: boolean | undefined;
|
|
151
|
-
menuPlacement?: "
|
|
159
|
+
menuPlacement?: "top" | "bottom" | "auto" | undefined;
|
|
152
160
|
onBlur?: ((value: any) => void) | undefined;
|
|
153
161
|
onChange?: ((newValue: MultiValue<Option> | SingleValue<Option>, actionMeta: ActionMeta<Option>) => void) | undefined;
|
|
154
162
|
onSelect?: ((value: MultiValue<Option> | SingleValue<Option>) => void) | undefined;
|
|
@@ -4,5 +4,5 @@ export declare type NativeSelectFieldProps = BaseFieldProps & React.ComponentPro
|
|
|
4
4
|
className?: string;
|
|
5
5
|
visualSize?: Size;
|
|
6
6
|
};
|
|
7
|
-
export declare const NativeSelectField: React.ForwardRefExoticComponent<
|
|
7
|
+
export declare const NativeSelectField: React.ForwardRefExoticComponent<Omit<NativeSelectFieldProps, "ref"> & React.RefAttributes<HTMLSelectElement>>;
|
|
8
8
|
export default NativeSelectField;
|
|
@@ -5,14 +5,14 @@ export declare type BaseReactSelectProps = Omit<React.PropsWithRef<Select>, 'siz
|
|
|
5
5
|
export declare type Size = 'small' | 'medium' | 'large';
|
|
6
6
|
export declare const ReactSelectWrapper: import("@emotion/styled").StyledComponent<{
|
|
7
7
|
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
-
as?: React.ElementType<any> | undefined;
|
|
8
|
+
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
9
9
|
} & {
|
|
10
10
|
error?: boolean | undefined;
|
|
11
11
|
size?: string | undefined;
|
|
12
12
|
arrow?: boolean | undefined;
|
|
13
13
|
selected?: boolean | undefined;
|
|
14
14
|
}, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
15
|
-
export declare const Menu: (props: any) => JSX.Element;
|
|
15
|
+
export declare const Menu: (props: any) => React.JSX.Element;
|
|
16
16
|
export declare type SelectFieldProps<T = string> = BaseFieldProps & {
|
|
17
17
|
assistiveText?: string;
|
|
18
18
|
autoFocus?: boolean;
|
|
@@ -51,7 +51,7 @@ export declare type SelectFieldProps<T = string> = BaseFieldProps & {
|
|
|
51
51
|
value?: SingleValue<T> | MultiValue<T>;
|
|
52
52
|
visualSize?: Size;
|
|
53
53
|
};
|
|
54
|
-
declare function SelectFieldInner<T>({ assistiveText, components, defaultValue, disabled, errorMessage, filterConfig, help, helpPlacement, hideAsterisk, isClearable, isMulti, isSearchable, label, name, onBlur, onChange, onSelect, options, placeholder, required, styles, value, visualSize, ...rest }: SelectFieldProps<T>, ref: React.ForwardedRef<any>): JSX.Element;
|
|
54
|
+
declare function SelectFieldInner<T>({ assistiveText, components, defaultValue, disabled, errorMessage, filterConfig, help, helpPlacement, hideAsterisk, isClearable, isMulti, isSearchable, label, name, onBlur, onChange, onSelect, options, placeholder, required, styles, value, visualSize, ...rest }: SelectFieldProps<T>, ref: React.ForwardedRef<any>): React.JSX.Element;
|
|
55
55
|
export declare const SelectField: <T>(props: BaseFieldProps & {
|
|
56
56
|
assistiveText?: string | undefined;
|
|
57
57
|
autoFocus?: boolean | undefined;
|
|
@@ -78,7 +78,7 @@ export declare const SelectField: <T>(props: BaseFieldProps & {
|
|
|
78
78
|
isMulti?: boolean | undefined;
|
|
79
79
|
isSearchable?: boolean | undefined;
|
|
80
80
|
menuIsOpen?: boolean | undefined;
|
|
81
|
-
menuPlacement?: "
|
|
81
|
+
menuPlacement?: "top" | "bottom" | "auto" | undefined;
|
|
82
82
|
onBlur?: ((value: any) => void) | undefined;
|
|
83
83
|
onChange?: ((newValue: SingleValue<T> | MultiValue<T>, actionMeta: ActionMeta<T>) => void) | undefined;
|
|
84
84
|
onSelect?: ((value: SingleValue<T> | MultiValue<T>) => void) | undefined;
|
package/switch/Switch.d.ts
CHANGED
|
@@ -28,5 +28,5 @@ export declare type SwitchProps = React.PropsWithRef<JSX.IntrinsicElements['labe
|
|
|
28
28
|
size?: Size;
|
|
29
29
|
error?: boolean;
|
|
30
30
|
};
|
|
31
|
-
export declare const Switch: React.ForwardRefExoticComponent<
|
|
31
|
+
export declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
32
32
|
export {};
|
|
@@ -6,6 +6,7 @@ declare type SwitchContextProps = Required<Pick<SwitchProps, 'size' | 'error'>>
|
|
|
6
6
|
export declare const SwitchContext: React.Context<SwitchContextProps | undefined>;
|
|
7
7
|
export declare const SwitchContextProvider: React.FC<{
|
|
8
8
|
value: SwitchContextProps;
|
|
9
|
+
children?: React.ReactNode;
|
|
9
10
|
}>;
|
|
10
11
|
declare const useSwitchContext: () => SwitchContextProps | undefined;
|
|
11
12
|
export default useSwitchContext;
|
package/switch/SwitchGroup.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { BaseFieldProps } from '../types';
|
|
3
3
|
import { SwitchProps } from './Switch';
|
|
4
4
|
export declare type SwitchGroupProps = Pick<BaseFieldProps, 'label' | 'errorMessage' | 'hideAsterisk' | 'required'> & {
|
|
@@ -7,4 +7,4 @@ export declare type SwitchGroupProps = Pick<BaseFieldProps, 'label' | 'errorMess
|
|
|
7
7
|
*/
|
|
8
8
|
children: ReactNode;
|
|
9
9
|
} & Pick<SwitchProps, 'size'>;
|
|
10
|
-
export declare const SwitchGroup: ({ size, label, errorMessage, required, hideAsterisk, children, }: SwitchGroupProps) => JSX.Element;
|
|
10
|
+
export declare const SwitchGroup: ({ size, label, errorMessage, required, hideAsterisk, children, }: SwitchGroupProps) => React.JSX.Element;
|
|
@@ -32,7 +32,7 @@ export declare const TextField: React.ForwardRefExoticComponent<BaseFieldProps &
|
|
|
32
32
|
defaultValue?: string | undefined;
|
|
33
33
|
prefix?: React.ReactNode;
|
|
34
34
|
suffix?: React.ReactNode;
|
|
35
|
-
icon?: React.ElementType<any> | undefined;
|
|
35
|
+
icon?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
36
36
|
/**
|
|
37
37
|
* Element to be placed after the input element.
|
|
38
38
|
*
|
|
@@ -45,7 +45,7 @@ export declare const TextField: React.ForwardRefExoticComponent<BaseFieldProps &
|
|
|
45
45
|
onChange?: ((event: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
46
46
|
onFocus?: ((event: React.FocusEvent<HTMLInputElement>) => void) | undefined;
|
|
47
47
|
onBlur?: ((event: React.ChangeEvent<HTMLInputElement>) => void) | undefined;
|
|
48
|
-
inputType?: "number" | "search" | "
|
|
48
|
+
inputType?: "number" | "search" | "time" | "text" | "tel" | "url" | "email" | "date" | "file" | "password" | undefined;
|
|
49
49
|
autoComplete?: string | undefined;
|
|
50
50
|
minValue?: string | undefined;
|
|
51
51
|
maxValue?: string | undefined;
|