@dfds-ui/forms 2.0.13-alpha.387f7b2c → 2.0.13-alpha.510cb843
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 +2 -1
- package/assistive-text/AssistiveText.js +3 -1
- package/checkbox/Checkbox.d.ts +0 -6
- package/checkbox/Checkbox.js +10 -14
- package/checkbox/CheckboxGroup.d.ts +2 -2
- package/checkbox/CheckboxGroup.js +6 -14
- package/cjs/assistive-text/AssistiveText.d.ts +9 -0
- package/cjs/assistive-text/AssistiveText.js +2 -1
- package/cjs/asterisk/Asterisk.d.ts +11 -0
- package/cjs/checkbox/Checkbox.d.ts +59 -0
- package/cjs/checkbox/Checkbox.js +10 -14
- package/cjs/checkbox/CheckboxContext.d.ts +13 -0
- package/cjs/checkbox/CheckboxGroup.d.ts +20 -0
- package/cjs/checkbox/CheckboxGroup.js +6 -14
- package/cjs/checkbox/index.d.ts +2 -0
- package/cjs/counter/Counter.d.ts +66 -0
- package/cjs/counter/index.d.ts +1 -0
- package/cjs/enhanced/EnhancedField.d.ts +20 -0
- package/cjs/enhanced/index.d.ts +1 -0
- package/cjs/error-text/ErrorText.d.ts +8 -0
- package/cjs/field-wrap/FieldWrap.d.ts +10 -0
- package/cjs/field-wrap/FieldWrap.js +7 -4
- package/cjs/field-wrap/index.d.ts +1 -0
- package/cjs/help-icon/HelpIcon.d.ts +7 -0
- package/cjs/index.d.ts +15 -0
- package/cjs/label/Label.d.ts +11 -0
- package/cjs/label/Label.js +4 -2
- package/cjs/password-field/PasswordField.d.ts +4 -0
- package/cjs/radio/Radio.d.ts +51 -0
- package/cjs/radio/Radio.js +9 -8
- package/cjs/radio/RadioContext.d.ts +13 -0
- package/cjs/radio/RadioGroup.d.ts +12 -0
- package/cjs/radio/RadioGroup.js +4 -10
- package/cjs/radio/index.d.ts +2 -0
- package/cjs/rating/Rating.d.ts +55 -0
- package/cjs/rating/index.d.ts +1 -0
- package/cjs/select-field/NativeSelectField.d.ts +8 -0
- package/cjs/select-field/SelectField.d.ts +83 -0
- package/cjs/select-field/SelectField.js +48 -88
- package/cjs/switch/Switch.d.ts +32 -0
- package/cjs/switch/Switch.js +14 -13
- package/cjs/switch/SwitchContext.d.ts +11 -0
- package/cjs/switch/SwitchGroup.d.ts +10 -0
- package/cjs/switch/SwitchGroup.js +1 -11
- package/cjs/switch/index.d.ts +1 -0
- package/cjs/switch/index.js +6 -21
- package/cjs/tel-field/TelField.d.ts +67 -0
- package/cjs/text-field/TextField.d.ts +47 -0
- package/cjs/text-field/TextField.js +5 -4
- package/cjs/textarea-field/TextareaField.d.ts +44 -0
- package/cjs/types/field.d.ts +52 -0
- package/cjs/types/index.d.ts +2 -0
- package/cjs/types/size.d.ts +1 -0
- package/field-wrap/FieldWrap.d.ts +3 -2
- package/field-wrap/FieldWrap.js +7 -4
- package/label/Label.d.ts +2 -1
- package/label/Label.js +4 -2
- package/package.json +7 -7
- package/radio/Radio.js +9 -8
- package/radio/RadioGroup.d.ts +2 -2
- package/radio/RadioGroup.js +4 -10
- package/select-field/SelectField.d.ts +1 -11
- package/select-field/SelectField.js +49 -89
- package/switch/Switch.js +19 -18
- package/switch/SwitchGroup.js +12 -22
- package/switch/index.d.ts +1 -2
- package/switch/index.js +1 -2
- package/text-field/TextField.d.ts +2 -10
- package/text-field/TextField.js +5 -4
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { ChangeEvent } from 'react';
|
|
2
|
+
declare type Size = 'small' | 'medium';
|
|
3
|
+
export declare type SwitchProps = React.PropsWithRef<JSX.IntrinsicElements['label']> & {
|
|
4
|
+
/**
|
|
5
|
+
* Name of the input element
|
|
6
|
+
*/
|
|
7
|
+
name?: string;
|
|
8
|
+
/**
|
|
9
|
+
* State of the switch
|
|
10
|
+
*
|
|
11
|
+
*/
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Controls whether the input is disabled
|
|
15
|
+
*/
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Callback to fire when the state of the input changes
|
|
19
|
+
*/
|
|
20
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
21
|
+
/**
|
|
22
|
+
* Controls whether the input label should be displayed on the right of the input, displayed on the left by default
|
|
23
|
+
*/
|
|
24
|
+
right?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Visual size of the switch
|
|
27
|
+
*/
|
|
28
|
+
size?: Size;
|
|
29
|
+
error?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export declare const Switch: React.ForwardRefExoticComponent<Pick<SwitchProps, "error" | "key" | "name" | "right" | "disabled" | "size" | "checked" | "css" | keyof React.LabelHTMLAttributes<HTMLLabelElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
32
|
+
export {};
|