@dfds-ui/forms 2.0.14-alpha.586868c3 → 2.0.14-alpha.703ad4f6
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/cjs/index.js +11 -0
- package/cjs/select-field/AsyncSelectField.js +111 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +7 -7
- package/select-field/AsyncSelectField.d.ts +99 -0
- package/select-field/AsyncSelectField.js +119 -0
- package/cjs/assistive-text/AssistiveText.d.ts +0 -9
- package/cjs/asterisk/Asterisk.d.ts +0 -11
- package/cjs/checkbox/Checkbox.d.ts +0 -65
- package/cjs/checkbox/CheckboxContext.d.ts +0 -13
- package/cjs/checkbox/CheckboxGroup.d.ts +0 -20
- package/cjs/checkbox/index.d.ts +0 -2
- package/cjs/counter/Counter.d.ts +0 -66
- package/cjs/counter/index.d.ts +0 -1
- package/cjs/enhanced/EnhancedField.d.ts +0 -20
- package/cjs/enhanced/index.d.ts +0 -1
- package/cjs/error-text/ErrorText.d.ts +0 -8
- package/cjs/field-wrap/FieldWrap.d.ts +0 -10
- package/cjs/field-wrap/index.d.ts +0 -1
- package/cjs/help-icon/HelpIcon.d.ts +0 -7
- package/cjs/index.d.ts +0 -17
- package/cjs/label/Label.d.ts +0 -11
- package/cjs/password-field/PasswordField.d.ts +0 -4
- package/cjs/radio/Radio.d.ts +0 -51
- package/cjs/radio/RadioContext.d.ts +0 -13
- package/cjs/radio/RadioGroup.d.ts +0 -12
- package/cjs/radio/index.d.ts +0 -2
- package/cjs/rating/Rating.d.ts +0 -55
- package/cjs/rating/index.d.ts +0 -1
- package/cjs/select-field/NativeSelectField.d.ts +0 -8
- package/cjs/select-field/SelectField.d.ts +0 -93
- package/cjs/switch/Switch.d.ts +0 -32
- package/cjs/switch/SwitchContext.d.ts +0 -11
- package/cjs/switch/SwitchGroup.d.ts +0 -10
- package/cjs/switch/index.d.ts +0 -2
- package/cjs/tel-field/TelField.d.ts +0 -67
- package/cjs/text-field/TextField.d.ts +0 -57
- package/cjs/textarea-field/TextareaField.d.ts +0 -44
- package/cjs/types/field.d.ts +0 -52
- package/cjs/types/index.d.ts +0 -2
- package/cjs/types/size.d.ts +0 -1
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React, { ChangeEvent } from 'react';
|
|
2
|
-
import { BaseFieldProps, Size } from '../types';
|
|
3
|
-
export declare const inputPaddings: {
|
|
4
|
-
small: {
|
|
5
|
-
vertical: number;
|
|
6
|
-
horizontal: number;
|
|
7
|
-
};
|
|
8
|
-
medium: {
|
|
9
|
-
vertical: number;
|
|
10
|
-
horizontal: number;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
declare type FieldSize = Extract<Size, 'small' | 'medium'>;
|
|
14
|
-
export declare type TextareaFieldProps = BaseFieldProps & {
|
|
15
|
-
defaultValue?: string;
|
|
16
|
-
size?: FieldSize;
|
|
17
|
-
/**
|
|
18
|
-
* Set a limit to the amount of characters the user may add. This number is also displayed on the bottom counter by default.
|
|
19
|
-
*/
|
|
20
|
-
maxValueLength?: number;
|
|
21
|
-
/**
|
|
22
|
-
* Whether to show the length counter at the bottom right
|
|
23
|
-
*/
|
|
24
|
-
showLengthCounter?: boolean;
|
|
25
|
-
value?: string;
|
|
26
|
-
onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
27
|
-
rows?: number;
|
|
28
|
-
};
|
|
29
|
-
export declare const TextareaField: React.ForwardRefExoticComponent<BaseFieldProps & {
|
|
30
|
-
defaultValue?: string | undefined;
|
|
31
|
-
size?: FieldSize | undefined;
|
|
32
|
-
/**
|
|
33
|
-
* Set a limit to the amount of characters the user may add. This number is also displayed on the bottom counter by default.
|
|
34
|
-
*/
|
|
35
|
-
maxValueLength?: number | undefined;
|
|
36
|
-
/**
|
|
37
|
-
* Whether to show the length counter at the bottom right
|
|
38
|
-
*/
|
|
39
|
-
showLengthCounter?: boolean | undefined;
|
|
40
|
-
value?: string | undefined;
|
|
41
|
-
onChange?: ((event: React.ChangeEvent<HTMLTextAreaElement>) => void) | undefined;
|
|
42
|
-
rows?: number | undefined;
|
|
43
|
-
} & React.RefAttributes<HTMLTextAreaElement>>;
|
|
44
|
-
export {};
|
package/cjs/types/field.d.ts
DELETED
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Generic FieldProps
|
|
4
|
-
*/
|
|
5
|
-
export declare type BaseFieldProps = {
|
|
6
|
-
/**
|
|
7
|
-
* Field name.
|
|
8
|
-
*/
|
|
9
|
-
name: string;
|
|
10
|
-
/**
|
|
11
|
-
* Field label.
|
|
12
|
-
*/
|
|
13
|
-
label?: ReactNode;
|
|
14
|
-
/**
|
|
15
|
-
* Indicates if the field is required. Will add an asterisk to the label unless `hideAsterisk` is set to `true`.
|
|
16
|
-
*/
|
|
17
|
-
required?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* If set to `true` the asterisk will never be shown.
|
|
20
|
-
*/
|
|
21
|
-
hideAsterisk?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* Hint for the field. For Input elements this maps to the `placeholder` attribute.
|
|
24
|
-
*/
|
|
25
|
-
placeholder?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Indicates that the field is disabled.
|
|
28
|
-
*/
|
|
29
|
-
disabled?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Sets an error message (if assistive text applies it will be replaced by this).
|
|
32
|
-
*/
|
|
33
|
-
errorMessage?: string;
|
|
34
|
-
/**
|
|
35
|
-
* Assistive text describing the field.
|
|
36
|
-
*
|
|
37
|
-
* NB! If space is needed for alignment you can use a space char (' ') here.
|
|
38
|
-
*/
|
|
39
|
-
assistiveText?: string;
|
|
40
|
-
/**
|
|
41
|
-
* Additional help.
|
|
42
|
-
*
|
|
43
|
-
* **This is an experimental prop and the behavior might change.**
|
|
44
|
-
*/
|
|
45
|
-
help?: string;
|
|
46
|
-
/**
|
|
47
|
-
* Controls the placement of the help icon.
|
|
48
|
-
*
|
|
49
|
-
* **This is an experimental prop and the behavior might change.**
|
|
50
|
-
*/
|
|
51
|
-
helpPlacement?: 'top' | 'right';
|
|
52
|
-
};
|
package/cjs/types/index.d.ts
DELETED
package/cjs/types/size.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare type Size = 'small' | 'medium' | 'large';
|