@dfds-ui/forms 2.0.29 → 2.2.0-alpha.4e495871
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 +1 -1
- package/checkbox/Checkbox.d.ts +2 -2
- package/checkbox/CheckboxContext.d.ts +1 -1
- package/checkbox/CheckboxGroup.d.ts +1 -1
- package/cjs/assistive-text/AssistiveText.d.ts +1 -1
- package/cjs/asterisk/Asterisk.d.ts +1 -1
- package/cjs/asterisk/Asterisk.js +3 -3
- package/cjs/checkbox/Checkbox.d.ts +2 -2
- package/cjs/checkbox/Checkbox.js +17 -22
- package/cjs/checkbox/CheckboxContext.d.ts +1 -1
- package/cjs/checkbox/CheckboxContext.js +1 -1
- package/cjs/checkbox/CheckboxGroup.d.ts +1 -1
- package/cjs/checkbox/CheckboxGroup.js +14 -19
- package/cjs/checkbox/index.js +2 -2
- package/cjs/counter/Counter.d.ts +2 -2
- package/cjs/counter/Counter.js +31 -44
- package/cjs/counter/index.js +1 -1
- package/cjs/enhanced/EnhancedField.d.ts +4 -4
- package/cjs/enhanced/EnhancedField.js +13 -13
- package/cjs/enhanced/index.js +1 -1
- package/cjs/error-text/ErrorText.d.ts +1 -1
- package/cjs/field-wrap/FieldWrap.d.ts +1 -1
- package/cjs/field-wrap/index.js +1 -1
- package/cjs/help-icon/HelpIcon.d.ts +1 -1
- package/cjs/index.js +19 -19
- package/cjs/label/Label.d.ts +1 -1
- package/cjs/label/Label.js +9 -15
- package/cjs/password-field/PasswordField.d.ts +1 -1
- package/cjs/password-field/PasswordField.js +2 -11
- package/cjs/radio/Radio.d.ts +3 -3
- package/cjs/radio/Radio.js +15 -19
- package/cjs/radio/RadioContext.d.ts +1 -1
- package/cjs/radio/RadioContext.js +1 -1
- package/cjs/radio/RadioGroup.d.ts +1 -1
- package/cjs/radio/index.js +2 -2
- package/cjs/rating/Rating.d.ts +2 -2
- package/cjs/rating/Rating.js +4 -13
- package/cjs/rating/index.js +1 -1
- package/cjs/select-field/AsyncSelectField.d.ts +3 -83
- package/cjs/select-field/AsyncSelectField.js +19 -24
- package/cjs/select-field/CreatableSelectField.d.ts +3 -83
- package/cjs/select-field/CreatableSelectField.js +54 -61
- package/cjs/select-field/NativeSelectField.d.ts +2 -2
- package/cjs/select-field/NativeSelectField.js +17 -21
- package/cjs/select-field/SelectField.d.ts +3 -3
- package/cjs/select-field/SelectField.js +55 -63
- package/cjs/switch/Switch.d.ts +3 -3
- package/cjs/switch/Switch.js +24 -28
- package/cjs/switch/SwitchContext.d.ts +1 -1
- package/cjs/switch/SwitchContext.js +1 -1
- package/cjs/switch/SwitchGroup.d.ts +1 -1
- package/cjs/switch/index.js +2 -2
- package/cjs/tel-field/TelField.d.ts +2 -2
- package/cjs/tel-field/TelField.js +30 -52
- package/cjs/text-field/TextField.d.ts +2 -2
- package/cjs/text-field/TextField.js +33 -39
- package/cjs/textarea-field/TextareaField.d.ts +2 -2
- package/cjs/textarea-field/TextareaField.js +23 -38
- package/cjs/types/field.d.ts +1 -1
- package/cjs/types/index.js +2 -2
- package/cjs/types/size.d.ts +1 -1
- package/counter/Counter.d.ts +2 -2
- package/enhanced/EnhancedField.d.ts +4 -4
- package/error-text/ErrorText.d.ts +1 -1
- package/field-wrap/FieldWrap.d.ts +1 -1
- package/help-icon/HelpIcon.d.ts +1 -1
- package/label/Label.d.ts +1 -1
- package/package.json +7 -7
- package/password-field/PasswordField.d.ts +1 -1
- package/radio/Radio.d.ts +3 -3
- package/radio/RadioContext.d.ts +1 -1
- package/radio/RadioGroup.d.ts +1 -1
- package/rating/Rating.d.ts +2 -2
- package/select-field/AsyncSelectField.d.ts +3 -83
- package/select-field/CreatableSelectField.d.ts +3 -83
- package/select-field/NativeSelectField.d.ts +2 -2
- package/select-field/SelectField.d.ts +3 -3
- package/switch/Switch.d.ts +3 -3
- package/switch/Switch.js +17 -17
- package/switch/SwitchContext.d.ts +1 -1
- package/switch/SwitchGroup.d.ts +1 -1
- package/tel-field/TelField.d.ts +2 -2
- package/text-field/TextField.d.ts +2 -2
- package/textarea-field/TextareaField.d.ts +2 -2
- package/types/field.d.ts +1 -1
- package/types/size.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { SwitchProps } from './Switch';
|
|
3
|
-
|
|
3
|
+
type SwitchContextProps = Required<Pick<SwitchProps, 'size' | 'error'>> & {
|
|
4
4
|
children?: React.ReactNode;
|
|
5
5
|
};
|
|
6
6
|
export declare const SwitchContext: React.Context<SwitchContextProps | undefined>;
|
package/switch/SwitchGroup.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { BaseFieldProps } from '../types';
|
|
3
3
|
import { SwitchProps } from './Switch';
|
|
4
|
-
export
|
|
4
|
+
export type SwitchGroupProps = Pick<BaseFieldProps, 'label' | 'errorMessage' | 'hideAsterisk' | 'required'> & {
|
|
5
5
|
/**
|
|
6
6
|
* JSX enclosed by the group.
|
|
7
7
|
*/
|
package/tel-field/TelField.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Locale } from '@dfds-ui/react-components';
|
|
3
3
|
import { BaseFieldProps } from '../types';
|
|
4
|
-
export
|
|
4
|
+
export type TelFieldProps = BaseFieldProps & {
|
|
5
5
|
/**
|
|
6
6
|
* Class name to be added to the TelField.
|
|
7
7
|
*/
|
|
@@ -31,7 +31,7 @@ export declare type TelFieldProps = BaseFieldProps & {
|
|
|
31
31
|
*/
|
|
32
32
|
onBlur?: () => void;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type TelFieldElement = {
|
|
35
35
|
focus?: () => void;
|
|
36
36
|
};
|
|
37
37
|
export declare const TelField: React.ForwardRefExoticComponent<BaseFieldProps & {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BaseFieldProps, Size } from '../types';
|
|
3
|
-
export
|
|
3
|
+
export type TextFieldProps = BaseFieldProps & {
|
|
4
4
|
autoFocus?: boolean;
|
|
5
5
|
defaultValue?: string;
|
|
6
6
|
prefix?: React.ReactNode;
|
|
@@ -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" | "file" | "url" | "text" | "tel" | "email" | "date" | "password" | undefined;
|
|
49
49
|
autoComplete?: string | undefined;
|
|
50
50
|
minValue?: string | undefined;
|
|
51
51
|
maxValue?: string | undefined;
|
|
@@ -10,8 +10,8 @@ export declare const inputPaddings: {
|
|
|
10
10
|
horizontal: number;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
export
|
|
13
|
+
type FieldSize = Extract<Size, 'small' | 'medium'>;
|
|
14
|
+
export type TextareaFieldProps = BaseFieldProps & {
|
|
15
15
|
defaultValue?: string;
|
|
16
16
|
size?: FieldSize;
|
|
17
17
|
/**
|
package/types/field.d.ts
CHANGED
package/types/size.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type Size = 'small' | 'medium' | 'large';
|