@app-studio/web 0.1.5 → 0.1.6
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/package.json +2 -3
- package/src/components/Button/Button/Button.props.ts +0 -79
- package/src/components/Button/Button/Button.state.ts +0 -7
- package/src/components/Button/Button/Button.style.ts +0 -95
- package/src/components/Button/Button/Button.type.d.ts +0 -11
- package/src/components/Button/Button/Button.view.tsx +0 -113
- package/src/components/Button/Button.md +0 -165
- package/src/components/Button/Button.tsx +0 -24
- package/src/components/Button/examples/AutoFocusButton.tsx +0 -13
- package/src/components/Button/examples/BorderedButtons.tsx +0 -14
- package/src/components/Button/examples/ColoredButtons.tsx +0 -12
- package/src/components/Button/examples/DefaultButton.tsx +0 -4
- package/src/components/Button/examples/DisabledButton.tsx +0 -13
- package/src/components/Button/examples/IconButtons.tsx +0 -23
- package/src/components/Button/examples/LoadingButtons.tsx +0 -32
- package/src/components/Button/examples/ShadowButton.tsx +0 -6
- package/src/components/Button/examples/SizeButtons.tsx +0 -16
- package/src/components/Button/examples/VariantButtons.tsx +0 -20
- package/src/components/Button/examples/index.ts +0 -9
- package/src/components/Form/Checkbox/Checkbox/Checkbox.props.ts +0 -118
- package/src/components/Form/Checkbox/Checkbox/Checkbox.state.ts +0 -15
- package/src/components/Form/Checkbox/Checkbox/Checkbox.style.ts +0 -29
- package/src/components/Form/Checkbox/Checkbox/Checkbox.type.d.ts +0 -8
- package/src/components/Form/Checkbox/Checkbox/Checkbox.view.tsx +0 -98
- package/src/components/Form/Checkbox/Checkbox.md +0 -128
- package/src/components/Form/Checkbox/Checkbox.tsx +0 -15
- package/src/components/Form/Checkbox/examples/ColorScheme.tsx +0 -12
- package/src/components/Form/Checkbox/examples/Default.tsx +0 -5
- package/src/components/Form/Checkbox/examples/DisabledInput.tsx +0 -5
- package/src/components/Form/Checkbox/examples/ErrorCheckbox.tsx +0 -5
- package/src/components/Form/Checkbox/examples/FormCheckout.tsx +0 -46
- package/src/components/Form/Checkbox/examples/IconCheckbox.tsx +0 -8
- package/src/components/Form/Checkbox/examples/IndeterminateCheckbox.tsx +0 -5
- package/src/components/Form/Checkbox/examples/ReadOnlyInput.tsx +0 -5
- package/src/components/Form/Checkbox/examples/Shadow.tsx +0 -11
- package/src/components/Form/Checkbox/examples/SizeInput.tsx +0 -18
- package/src/components/Form/Checkbox/examples/StylesInput.tsx +0 -22
- package/src/components/Form/Checkbox/examples/index.ts +0 -11
- package/src/components/Form/CountryPicker/CountryPicker/CountryPicker.props.ts +0 -187
- package/src/components/Form/CountryPicker/CountryPicker/CountryPicker.state.ts +0 -28
- package/src/components/Form/CountryPicker/CountryPicker/CountryPicker.style.ts +0 -17
- package/src/components/Form/CountryPicker/CountryPicker/CountryPicker.type.d.ts +0 -22
- package/src/components/Form/CountryPicker/CountryPicker/CountryPicker.view.tsx +0 -234
- package/src/components/Form/CountryPicker/CountryPicker.md +0 -206
- package/src/components/Form/CountryPicker/CountryPicker.tsx +0 -16
- package/src/components/Form/CountryPicker/countries.json +0 -1453
- package/src/components/Form/CountryPicker/examples/Color.tsx +0 -12
- package/src/components/Form/CountryPicker/examples/Default.tsx +0 -4
- package/src/components/Form/CountryPicker/examples/Disabled.tsx +0 -5
- package/src/components/Form/CountryPicker/examples/Error.tsx +0 -4
- package/src/components/Form/CountryPicker/examples/Form.tsx +0 -23
- package/src/components/Form/CountryPicker/examples/Formik.tsx +0 -39
- package/src/components/Form/CountryPicker/examples/HelperText.tsx +0 -5
- package/src/components/Form/CountryPicker/examples/ReadOnlyInput.tsx +0 -5
- package/src/components/Form/CountryPicker/examples/Shadow.tsx +0 -4
- package/src/components/Form/CountryPicker/examples/Shape.tsx +0 -13
- package/src/components/Form/CountryPicker/examples/SizeInput.tsx +0 -16
- package/src/components/Form/CountryPicker/examples/StylesInput.tsx +0 -17
- package/src/components/Form/CountryPicker/examples/Variant.tsx +0 -13
- package/src/components/Form/CountryPicker/examples/index.ts +0 -12
- package/src/components/Form/CountryPicker/styles.css +0 -7
- package/src/components/Form/DatePicker/DatePicker/DatePicker.props.ts +0 -113
- package/src/components/Form/DatePicker/DatePicker/DatePicker.state.ts +0 -17
- package/src/components/Form/DatePicker/DatePicker/DatePicker.style.ts +0 -17
- package/src/components/Form/DatePicker/DatePicker/DatePicker.type.d.ts +0 -15
- package/src/components/Form/DatePicker/DatePicker/DatePicker.view.tsx +0 -118
- package/src/components/Form/DatePicker/DatePicker.md +0 -115
- package/src/components/Form/DatePicker/DatePicker.tsx +0 -15
- package/src/components/Form/DatePicker/examples/ColorScheme.tsx +0 -12
- package/src/components/Form/DatePicker/examples/Default.tsx +0 -4
- package/src/components/Form/DatePicker/examples/DisabledInput.tsx +0 -5
- package/src/components/Form/DatePicker/examples/ErrorCheckbox.tsx +0 -4
- package/src/components/Form/DatePicker/examples/FormCheckout.tsx +0 -23
- package/src/components/Form/DatePicker/examples/Formik.tsx +0 -35
- package/src/components/Form/DatePicker/examples/ReadOnlyInput.tsx +0 -5
- package/src/components/Form/DatePicker/examples/Shadow.tsx +0 -10
- package/src/components/Form/DatePicker/examples/SizeInput.tsx +0 -16
- package/src/components/Form/DatePicker/examples/StylesInput.tsx +0 -14
- package/src/components/Form/DatePicker/examples/helperTextDatePicker.tsx +0 -6
- package/src/components/Form/DatePicker/examples/index.ts +0 -11
- package/src/components/Form/Label/Label/Label.props.ts +0 -36
- package/src/components/Form/Label/Label/Label.style.ts +0 -34
- package/src/components/Form/Label/Label/Label.type.ts +0 -14
- package/src/components/Form/Label/Label/Label.view.tsx +0 -35
- package/src/components/Form/Label/Label.tsx +0 -8
- package/src/components/Form/Password/Password/Password.props.ts +0 -36
- package/src/components/Form/Password/Password/Password.state.ts +0 -6
- package/src/components/Form/Password/Password/Password.type.d.ts +0 -14
- package/src/components/Form/Password/Password/Password.view.tsx +0 -32
- package/src/components/Form/Password/Password.md +0 -108
- package/src/components/Form/Password/Password.tsx +0 -15
- package/src/components/Form/Password/example/Default.tsx +0 -9
- package/src/components/Form/Password/example/DisabledInput.tsx +0 -17
- package/src/components/Form/Password/example/ErrorInput.tsx +0 -66
- package/src/components/Form/Password/example/FormikErrorInput.tsx +0 -67
- package/src/components/Form/Password/example/FormikHelperText.tsx +0 -65
- package/src/components/Form/Password/example/HelperText.tsx +0 -65
- package/src/components/Form/Select/Select/Select.props.ts +0 -262
- package/src/components/Form/Select/Select/Select.state.ts +0 -19
- package/src/components/Form/Select/Select/Select.style.ts +0 -19
- package/src/components/Form/Select/Select/Select.type.d.ts +0 -15
- package/src/components/Form/Select/Select/Select.view.tsx +0 -337
- package/src/components/Form/Select/Select.md +0 -165
- package/src/components/Form/Select/Select.tsx +0 -16
- package/src/components/Form/Select/examples/Color.tsx +0 -12
- package/src/components/Form/Select/examples/Default.tsx +0 -4
- package/src/components/Form/Select/examples/Disabled.tsx +0 -5
- package/src/components/Form/Select/examples/Error.tsx +0 -4
- package/src/components/Form/Select/examples/Form.tsx +0 -23
- package/src/components/Form/Select/examples/Formik.tsx +0 -41
- package/src/components/Form/Select/examples/HelperText.tsx +0 -7
- package/src/components/Form/Select/examples/Multiple.tsx +0 -6
- package/src/components/Form/Select/examples/ReadOnlyInput.tsx +0 -5
- package/src/components/Form/Select/examples/Shadow.tsx +0 -11
- package/src/components/Form/Select/examples/SizeInput.tsx +0 -16
- package/src/components/Form/Select/examples/StylesInput.tsx +0 -15
- package/src/components/Form/Switch/Switch/Switch.props.ts +0 -91
- package/src/components/Form/Switch/Switch/Switch.state.ts +0 -11
- package/src/components/Form/Switch/Switch/Switch.style.ts +0 -72
- package/src/components/Form/Switch/Switch/Switch.type.d.ts +0 -6
- package/src/components/Form/Switch/Switch/Switch.view.tsx +0 -78
- package/src/components/Form/Switch/Switch.md +0 -148
- package/src/components/Form/Switch/Switch.tsx +0 -12
- package/src/components/Form/Switch/examples/ChildSwitch.tsx +0 -20
- package/src/components/Form/Switch/examples/ColorScheme.tsx +0 -5
- package/src/components/Form/Switch/examples/Default.tsx +0 -4
- package/src/components/Form/Switch/examples/DisabledInput.tsx +0 -7
- package/src/components/Form/Switch/examples/FormSwitch.tsx +0 -22
- package/src/components/Form/Switch/examples/Formik.tsx +0 -30
- package/src/components/Form/Switch/examples/ReadOnlyInput.tsx +0 -7
- package/src/components/Form/Switch/examples/Shadow.tsx +0 -11
- package/src/components/Form/Switch/examples/SizeInput.tsx +0 -21
- package/src/components/Form/Switch/examples/StylesInput.tsx +0 -32
- package/src/components/Form/TextArea/TextArea/TextArea.props.ts +0 -154
- package/src/components/Form/TextArea/TextArea/TextArea.state.ts +0 -21
- package/src/components/Form/TextArea/TextArea/TextArea.type.ts +0 -15
- package/src/components/Form/TextArea/TextArea/TextArea.view.tsx +0 -143
- package/src/components/Form/TextArea/TextArea.md +0 -169
- package/src/components/Form/TextArea/TextArea.tsx +0 -15
- package/src/components/Form/TextArea/examples/ColorScheme.tsx +0 -13
- package/src/components/Form/TextArea/examples/Default.tsx +0 -5
- package/src/components/Form/TextArea/examples/DisabledInput.tsx +0 -7
- package/src/components/Form/TextArea/examples/ErrorInput.tsx +0 -50
- package/src/components/Form/TextArea/examples/FormikErrorInput.tsx +0 -52
- package/src/components/Form/TextArea/examples/FormikHelperText.tsx +0 -51
- package/src/components/Form/TextArea/examples/HelperText.tsx +0 -49
- package/src/components/Form/TextArea/examples/LabelInput.tsx +0 -23
- package/src/components/Form/TextArea/examples/MaxRowCol.tsx +0 -7
- package/src/components/Form/TextArea/examples/Placeholder.tsx +0 -23
- package/src/components/Form/TextArea/examples/ReadOnlyInput.tsx +0 -7
- package/src/components/Form/TextArea/examples/ShadowArea.tsx +0 -28
- package/src/components/Form/TextArea/examples/ShapeInput.tsx +0 -15
- package/src/components/Form/TextArea/examples/SizeInput.tsx +0 -16
- package/src/components/Form/TextArea/examples/StylesInput.tsx +0 -32
- package/src/components/Form/TextArea/examples/VariantsInputs.tsx +0 -15
- package/src/components/Form/TextArea/examples/index.ts +0 -15
- package/src/components/Form/TextArea/styles.css +0 -7
- package/src/components/Form/TextField/TextField/TextField.props.ts +0 -134
- package/src/components/Form/TextField/TextField/TextField.state.ts +0 -21
- package/src/components/Form/TextField/TextField/TextField.type.d.ts +0 -15
- package/src/components/Form/TextField/TextField/TextField.view.tsx +0 -170
- package/src/components/Form/TextField/TextField.md +0 -193
- package/src/components/Form/TextField/TextField.tsx +0 -14
- package/src/components/Form/TextField/examples/ClearInput.tsx +0 -13
- package/src/components/Form/TextField/examples/ColorScheme.tsx +0 -13
- package/src/components/Form/TextField/examples/Default.tsx +0 -23
- package/src/components/Form/TextField/examples/DisabledInput.tsx +0 -7
- package/src/components/Form/TextField/examples/ErrorInput.tsx +0 -74
- package/src/components/Form/TextField/examples/FormikErrorInput.tsx +0 -76
- package/src/components/Form/TextField/examples/FormikHelperText.tsx +0 -62
- package/src/components/Form/TextField/examples/HelperText.tsx +0 -60
- package/src/components/Form/TextField/examples/LabelInput.tsx +0 -23
- package/src/components/Form/TextField/examples/LeftChild.tsx +0 -8
- package/src/components/Form/TextField/examples/Placeholder.tsx +0 -23
- package/src/components/Form/TextField/examples/ReadOnlyInput.tsx +0 -7
- package/src/components/Form/TextField/examples/RightChild.tsx +0 -8
- package/src/components/Form/TextField/examples/ShapeInput.tsx +0 -15
- package/src/components/Form/TextField/examples/SizeInput.tsx +0 -16
- package/src/components/Form/TextField/examples/StylesInput.tsx +0 -33
- package/src/components/Form/TextField/examples/VariantsInputs.tsx +0 -15
- package/src/components/Form/TextField/examples/index.ts +0 -17
- package/src/components/Form/TextField/styles.css +0 -7
- package/src/components/Layout/Center/Center/Center.props.ts +0 -18
- package/src/components/Layout/Center/Center/Center.view.tsx +0 -12
- package/src/components/Layout/Center/Center.md +0 -17
- package/src/components/Layout/Center/Center.tsx +0 -11
- package/src/components/Layout/Horizontal/Horizontal/Horizontal.props.ts +0 -26
- package/src/components/Layout/Horizontal/Horizontal/Horizontal.view.tsx +0 -24
- package/src/components/Layout/Horizontal/Horizontal.md +0 -107
- package/src/components/Layout/Horizontal/Horizontal.tsx +0 -11
- package/src/components/Layout/Horizontal/examples/Default.tsx +0 -11
- package/src/components/Layout/Horizontal/examples/Justify.tsx +0 -25
- package/src/components/Layout/Horizontal/examples/Reversed.tsx +0 -11
- package/src/components/Layout/Horizontal/examples/Wrap.tsx +0 -29
- package/src/components/Layout/Horizontal/examples/index.ts +0 -4
- package/src/components/Layout/Input/FieldContainer/FieldContainer/FieldContainer.props.ts +0 -25
- package/src/components/Layout/Input/FieldContainer/FieldContainer.tsx +0 -17
- package/src/components/Layout/Input/FieldContent/FieldContent/FieldContent.props.ts +0 -75
- package/src/components/Layout/Input/FieldContent/FieldContent.tsx +0 -55
- package/src/components/Layout/Input/FieldIcons/FieldIcons/FieldIcons.props.ts +0 -12
- package/src/components/Layout/Input/FieldIcons/FieldIcons.tsx +0 -19
- package/src/components/Layout/Input/FieldLabel/FieldLabel/FieldLabel.props.ts +0 -31
- package/src/components/Layout/Input/FieldLabel/FieldLabel.tsx +0 -30
- package/src/components/Layout/Input/FieldLayout/FieldLayout/FieldLayout.props.ts +0 -29
- package/src/components/Layout/Input/FieldLayout/FieldLayout.tsx +0 -33
- package/src/components/Layout/Input/FieldWrapper/FieldWrapper.props.ts +0 -12
- package/src/components/Layout/Input/FieldWrapper/FieldWrapper.tsx +0 -11
- package/src/components/Layout/Input/HelperText/HelperText.props.ts +0 -21
- package/src/components/Layout/Input/HelperText/HelperText.tsx +0 -22
- package/src/components/Layout/Input/index.ts +0 -7
- package/src/components/Layout/Vertical/Vertical/Vertical.props.ts +0 -26
- package/src/components/Layout/Vertical/Vertical/Vertical.type.ts +0 -3
- package/src/components/Layout/Vertical/Vertical/Vertical.view.tsx +0 -23
- package/src/components/Layout/Vertical/Vertical.md +0 -120
- package/src/components/Layout/Vertical/Vertical.tsx +0 -12
- package/src/components/Layout/Vertical/examples/Default.tsx +0 -11
- package/src/components/Layout/Vertical/examples/Justify.tsx +0 -26
- package/src/components/Layout/Vertical/examples/Reversed.tsx +0 -11
- package/src/components/Layout/Vertical/examples/Wrap.tsx +0 -30
- package/src/components/Layout/Vertical/examples/index.tsx +0 -5
- package/src/components/Layout/View/View.tsx +0 -2
- package/src/components/Layout/configs/Input.style.ts +0 -45
- package/src/components/Layout/configs/Input.type.ts +0 -18
- package/src/components/Link/Link/Link.props.ts +0 -50
- package/src/components/Link/Link/Link.state.ts +0 -6
- package/src/components/Link/Link/Link.style.ts +0 -14
- package/src/components/Link/Link/Link.type.d.ts +0 -8
- package/src/components/Link/Link/Link.view.tsx +0 -44
- package/src/components/Link/Link.md +0 -61
- package/src/components/Link/Link.tsx +0 -15
- package/src/components/Link/examples/Default.tsx +0 -5
- package/src/components/Link/examples/IsExternal.tsx +0 -10
- package/src/components/Link/examples/Underline.tsx +0 -23
- package/src/components/Loader/Loader/Loader.props.ts +0 -105
- package/src/components/Loader/Loader/Loader.style.ts +0 -25
- package/src/components/Loader/Loader/Loader.type.d.ts +0 -4
- package/src/components/Loader/Loader/Loader.view.tsx +0 -138
- package/src/components/Loader/Loader.md +0 -111
- package/src/components/Loader/Loader.tsx +0 -11
- package/src/components/Loader/examples/ColorLoader.tsx +0 -13
- package/src/components/Loader/examples/DefaultLoader.tsx +0 -4
- package/src/components/Loader/examples/PositionLoader.tsx +0 -19
- package/src/components/Loader/examples/SizeLoader.tsx +0 -12
- package/src/components/Loader/examples/SpeedLoader.tsx +0 -12
- package/src/components/Loader/examples/TextLoader.tsx +0 -8
- package/src/components/Loader/examples/VariantLoader.tsx +0 -12
- package/src/components/Loader/examples/index.ts +0 -7
- package/src/components/Modal/Examples/BlurModal.tsx +0 -38
- package/src/components/Modal/Examples/CloseButtonModal.tsx +0 -44
- package/src/components/Modal/Examples/DefaultModal.tsx +0 -38
- package/src/components/Modal/Examples/FullScreenModal.tsx +0 -28
- package/src/components/Modal/Examples/ModalPosition.tsx +0 -61
- package/src/components/Modal/Examples/PreventCloseModal.tsx +0 -27
- package/src/components/Modal/Examples/ScrollModal.tsx +0 -41
- package/src/components/Modal/Examples/ShadowModal.tsx +0 -29
- package/src/components/Modal/Examples/VariantModal.tsx +0 -48
- package/src/components/Modal/Examples/index.ts +0 -9
- package/src/components/Modal/Modal/Modal.props.ts +0 -202
- package/src/components/Modal/Modal/Modal.style.ts +0 -23
- package/src/components/Modal/Modal/Modal.type.d.ts +0 -7
- package/src/components/Modal/Modal/Modal.view.tsx +0 -169
- package/src/components/Modal/Modal.md +0 -509
- package/src/components/Modal/Modal.tsx +0 -18
- package/src/components/Svg/ArrowDown.tsx +0 -32
- package/src/components/Svg/ArrowUp.tsx +0 -32
- package/src/components/Svg/Check.tsx +0 -28
- package/src/components/Svg/Close.tsx +0 -31
- package/src/components/Svg/CloseEye.tsx +0 -26
- package/src/components/Svg/DustBin.tsx +0 -29
- package/src/components/Svg/Edit.tsx +0 -34
- package/src/components/Svg/ExternalLink.tsx +0 -31
- package/src/components/Svg/Indeterminate.tsx +0 -21
- package/src/components/Svg/OpenEye.tsx +0 -26
- package/src/components/Svg/Profile.tsx +0 -40
- package/src/components/Svg/RightArrow.tsx +0 -44
- package/src/components/Svg/index.tsx +0 -12
- package/src/components/Text/Text/Text.props.ts +0 -84
- package/src/components/Text/Text/Text.style.ts +0 -34
- package/src/components/Text/Text/Text.type.d.ts +0 -14
- package/src/components/Text/Text/Text.view.tsx +0 -96
- package/src/components/Text/Text.md +0 -163
- package/src/components/Text/Text.tsx +0 -13
- package/src/components/index.tsx +0 -18
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
### Import
|
|
2
|
-
|
|
3
|
-
```tsx static
|
|
4
|
-
import { TextField } from "app-studio";
|
|
5
|
-
```
|
|
6
|
-
|
|
7
|
-
### Default
|
|
8
|
-
|
|
9
|
-
It has the attribute “name” as required, with type equals to “text” and isClearable set to true.
|
|
10
|
-
|
|
11
|
-
```tsx
|
|
12
|
-
<TextField name="default" placeholder="Enter your name..." />
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Disabled
|
|
16
|
-
|
|
17
|
-
“**_isDisabled_**” makes the text field unusable.
|
|
18
|
-
|
|
19
|
-
```tsx
|
|
20
|
-
<TextField name="disabled" value="Disabled" isDisabled />
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
### Read Only
|
|
24
|
-
|
|
25
|
-
“**_isReadOnly_**” makes the input field readable but not writable. Can only read the element.
|
|
26
|
-
|
|
27
|
-
```tsx
|
|
28
|
-
<TextField name="readOnly" value="Sarah" isReadOnly />
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Clear
|
|
32
|
-
|
|
33
|
-
“**_isClearable_**” adds a clear button in the input field. The button will erase the existing data in the input field. By default, it is set to true.
|
|
34
|
-
|
|
35
|
-
```tsx
|
|
36
|
-
<TextField name="clear" isClearable />
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
### Sizes
|
|
40
|
-
|
|
41
|
-
“**_size_**” changes the text size of the input field. It has a default value of “md”.
|
|
42
|
-
|
|
43
|
-
```tsx
|
|
44
|
-
import { Vertical } from "../../Layout/Vertical/Vertical";
|
|
45
|
-
|
|
46
|
-
<Vertical gap={10} width="300px">
|
|
47
|
-
<TextField name="xs" placeholder="xs" size="xs" />
|
|
48
|
-
<TextField name="sm" placeholder="sm" size="xs" />
|
|
49
|
-
<TextField name="md" placeholder="md" size="md" />
|
|
50
|
-
<TextField name="lg" placeholder="lg" size="lg" />
|
|
51
|
-
<TextField name="xl" placeholder="xl" size="md" />
|
|
52
|
-
</Vertical>;
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Variants
|
|
56
|
-
|
|
57
|
-
“**_variant_**” changed the input styles. It has a default value of “outline”.
|
|
58
|
-
|
|
59
|
-
```tsx
|
|
60
|
-
import { Vertical } from "../../Layout/Vertical/Vertical";
|
|
61
|
-
|
|
62
|
-
<Vertical gap={10} width="300px">
|
|
63
|
-
{["default", "outline", "unStyled"].map((variant, index) => (
|
|
64
|
-
<TextField
|
|
65
|
-
key={index}
|
|
66
|
-
name={variant}
|
|
67
|
-
placeholder={variant}
|
|
68
|
-
variant={variant}
|
|
69
|
-
/>
|
|
70
|
-
))}
|
|
71
|
-
</Vertical>;
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Label
|
|
75
|
-
|
|
76
|
-
“**_label_**” adds a label above the input field.
|
|
77
|
-
|
|
78
|
-
```tsx
|
|
79
|
-
<TextField name="label" label="Label" />
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
### Shadow
|
|
83
|
-
|
|
84
|
-
“**_shadow_**” adds a shadow effect to the text field.
|
|
85
|
-
|
|
86
|
-
```tsx
|
|
87
|
-
<TextField
|
|
88
|
-
name="surname"
|
|
89
|
-
label="Surname"
|
|
90
|
-
shadow={{ boxShadow: "rgba(0, 0, 0, 0.20) 0px 3px 8px" }}
|
|
91
|
-
/>
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### Child
|
|
95
|
-
|
|
96
|
-
“**_child_**” property allows you to place an element to the left or right of the text field.
|
|
97
|
-
|
|
98
|
-
```tsx
|
|
99
|
-
import { ProfileSvg } from "../../Svg/Profile";
|
|
100
|
-
import { EditSvg } from "../../Svg/Edit";
|
|
101
|
-
|
|
102
|
-
<TextField
|
|
103
|
-
name="name"
|
|
104
|
-
placeholder="Name"
|
|
105
|
-
leftchild={<ProfileSvg size={12} />}
|
|
106
|
-
rightChild={<EditSvg size={12} />}
|
|
107
|
-
/>;
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
### ColorScheme
|
|
111
|
-
|
|
112
|
-
“**_colorScheme_**” changes the label and border color .
|
|
113
|
-
|
|
114
|
-
```tsx
|
|
115
|
-
import { Vertical } from "../../Layout/Vertical/Vertical";
|
|
116
|
-
|
|
117
|
-
<Vertical gap={10} width="300px">
|
|
118
|
-
<TextField name="surname" label="Surname" colorScheme="theme.secondary" />
|
|
119
|
-
<TextField name="name" label="Name" colorScheme="theme.primary" variant="outline" />
|
|
120
|
-
</Vertical>;
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
### Styles
|
|
124
|
-
|
|
125
|
-
“**_styles_**” changes the style of the input field.
|
|
126
|
-
|
|
127
|
-
```tsx
|
|
128
|
-
<TextField
|
|
129
|
-
name="surname"
|
|
130
|
-
label="Surname"
|
|
131
|
-
variant="unStyled"
|
|
132
|
-
isClearable="false"
|
|
133
|
-
shadow={{ boxShadow: "rgba(0, 0, 0, 0.20) 0px 3px 8px" }}
|
|
134
|
-
styles={{
|
|
135
|
-
box: { borderRadius: 8, borderColor: 'theme.primary',
|
|
136
|
-
borderStyle: 'solid',
|
|
137
|
-
borderWidth: 1, },
|
|
138
|
-
field: { color: "theme.primary" },
|
|
139
|
-
label: { color: "theme.primary" },
|
|
140
|
-
}}
|
|
141
|
-
/>
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
### Error
|
|
145
|
-
|
|
146
|
-
“**_error_**” if true, indicates that the text field value failed the validation criteria.
|
|
147
|
-
|
|
148
|
-
```tsx
|
|
149
|
-
<TextField placeholder="Enter your address..." error />
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
### Helper Text
|
|
153
|
-
|
|
154
|
-
“**_helperText_**” provides information about the field.
|
|
155
|
-
|
|
156
|
-
```tsx
|
|
157
|
-
<TextField error helperText="Enter your address!" />
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### **Types**
|
|
161
|
-
|
|
162
|
-
```tsx static
|
|
163
|
-
type Variant = "outline" | "default" | "unStyled";
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
```tsx static
|
|
167
|
-
type Shape = "default" | "sharp" | "rounded" | "pillShaped";
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
```tsx static
|
|
171
|
-
type Size = "xs" | "sm" | "md" | "lg" | "xl";
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
```tsx static
|
|
175
|
-
type TextFieldStyles = {
|
|
176
|
-
box?: CSSProperties;
|
|
177
|
-
text?: CSSProperties;
|
|
178
|
-
label?: CSSProperties;
|
|
179
|
-
helperText?: CSSProperties;
|
|
180
|
-
field?: CSSProperties;
|
|
181
|
-
};
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
## _Default Values_
|
|
185
|
-
|
|
186
|
-
```tsx static
|
|
187
|
-
const Shapes: Record<Shape, number | string> = {
|
|
188
|
-
default: "6px 6px 0 0",
|
|
189
|
-
sharp: 0,
|
|
190
|
-
rounded: 4,
|
|
191
|
-
pillShaped: 24,
|
|
192
|
-
};
|
|
193
|
-
```
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { TextFieldProps } from './TextField/TextField.props';
|
|
4
|
-
import { useTextFieldState } from './TextField/TextField.state';
|
|
5
|
-
import TextFieldView from './TextField/TextField.view';
|
|
6
|
-
|
|
7
|
-
const TextFieldComponent: React.FC<TextFieldProps> = (props: TextFieldProps) => {
|
|
8
|
-
const textFieldStates = useTextFieldState(props);
|
|
9
|
-
return <TextFieldView {...textFieldStates} {...props} />;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* TextField is used to capture text data from users.
|
|
13
|
-
*/
|
|
14
|
-
export const TextField = TextFieldComponent;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
3
|
-
|
|
4
|
-
import { TextField } from '../TextField';
|
|
5
|
-
|
|
6
|
-
export const ClearInput = () => {
|
|
7
|
-
return (
|
|
8
|
-
<Vertical gap={10} width="300px">
|
|
9
|
-
<TextField value="Clear Button" size="xs" />
|
|
10
|
-
<TextField size="xs" value="No Clear Button" isClearable={false} />
|
|
11
|
-
</Vertical>
|
|
12
|
-
);
|
|
13
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
3
|
-
|
|
4
|
-
import { TextField } from '../TextField';
|
|
5
|
-
|
|
6
|
-
export const ColorInput = () => {
|
|
7
|
-
return (
|
|
8
|
-
<Vertical gap={10} width="300px">
|
|
9
|
-
<TextField name="surname" label="Surname" colorScheme="theme.secondary" />
|
|
10
|
-
<TextField name="name" label="Name" colorScheme="theme.primary" variant="outline" />
|
|
11
|
-
</Vertical>
|
|
12
|
-
);
|
|
13
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button } from 'src/components';
|
|
3
|
-
import { Horizontal } from 'src/components';
|
|
4
|
-
|
|
5
|
-
import { TextField } from '../TextField';
|
|
6
|
-
|
|
7
|
-
export const DefaultInput = () => {
|
|
8
|
-
const handleSubmit = (event: any) => {
|
|
9
|
-
event.preventDefault();
|
|
10
|
-
const formData = new FormData(event.target);
|
|
11
|
-
alert(`Hello, ${formData.get('surname')}`);
|
|
12
|
-
};
|
|
13
|
-
return (
|
|
14
|
-
<form onSubmit={handleSubmit}>
|
|
15
|
-
<Horizontal gap={10} alignItems="center" wrap="nowrap">
|
|
16
|
-
<TextField name="surname" />
|
|
17
|
-
<Button type="submit" height="40px" isAuto>
|
|
18
|
-
Submit
|
|
19
|
-
</Button>
|
|
20
|
-
</Horizontal>
|
|
21
|
-
</form>
|
|
22
|
-
);
|
|
23
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Button } from 'src/components';
|
|
4
|
-
import { TextField } from 'src/components';
|
|
5
|
-
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
6
|
-
|
|
7
|
-
export const ErrorInput = () => {
|
|
8
|
-
const initialValues = {
|
|
9
|
-
firstName: '',
|
|
10
|
-
lastName: '',
|
|
11
|
-
email: '',
|
|
12
|
-
};
|
|
13
|
-
const [formValues, setFormValues] = useState(initialValues);
|
|
14
|
-
const [formErrors, setFormErrors] = useState(initialValues);
|
|
15
|
-
|
|
16
|
-
const validate = (values: any) => {
|
|
17
|
-
const errors: any = {};
|
|
18
|
-
|
|
19
|
-
if (!values.firstName) {
|
|
20
|
-
errors.firstName = 'Required';
|
|
21
|
-
}
|
|
22
|
-
if (!values.lastName) {
|
|
23
|
-
errors.lastName = 'Required';
|
|
24
|
-
}
|
|
25
|
-
if (!values.email) {
|
|
26
|
-
errors.email = 'Required';
|
|
27
|
-
} else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(values.email)) {
|
|
28
|
-
errors.email = 'Invalid email address';
|
|
29
|
-
}
|
|
30
|
-
setFormErrors(errors);
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
const handleChange = (event: any) => {
|
|
34
|
-
setFormValues({ ...formValues, [event.target.name]: event.target.value });
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const handleSubmit = (event: any) => {
|
|
38
|
-
event.preventDefault();
|
|
39
|
-
validate(formValues);
|
|
40
|
-
if (Object.values(formErrors).length === 0) {
|
|
41
|
-
alert(`Hello, ${formValues.firstName} ${formValues.lastName} ${formValues.email}`);
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
return (
|
|
45
|
-
<form onSubmit={handleSubmit}>
|
|
46
|
-
<Vertical gap={10} alignItems="center" wrap="nowrap">
|
|
47
|
-
<TextField
|
|
48
|
-
name="firstName"
|
|
49
|
-
placeholder="First Name"
|
|
50
|
-
error={!!formErrors.firstName}
|
|
51
|
-
onChange={handleChange}
|
|
52
|
-
colorScheme="theme.secondary"
|
|
53
|
-
/>
|
|
54
|
-
<TextField
|
|
55
|
-
name="lastName"
|
|
56
|
-
placeholder="Last Name"
|
|
57
|
-
error={!!formErrors.lastName}
|
|
58
|
-
onChange={handleChange}
|
|
59
|
-
colorScheme="theme.secondary"
|
|
60
|
-
/>
|
|
61
|
-
<TextField
|
|
62
|
-
name="email"
|
|
63
|
-
placeholder="Email"
|
|
64
|
-
error={!!formErrors.email}
|
|
65
|
-
onChange={handleChange}
|
|
66
|
-
colorScheme="theme.secondary"
|
|
67
|
-
/>
|
|
68
|
-
<Button type="submit" height="40px" isAuto>
|
|
69
|
-
Submit
|
|
70
|
-
</Button>
|
|
71
|
-
</Vertical>
|
|
72
|
-
</form>
|
|
73
|
-
);
|
|
74
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Field, Form, Formik } from 'formik';
|
|
3
|
-
import { Button } from 'src/components';
|
|
4
|
-
import { TextField } from 'src/components';
|
|
5
|
-
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
6
|
-
|
|
7
|
-
export const FormikErrorInput = () => {
|
|
8
|
-
const initialValues = {
|
|
9
|
-
firstName: '',
|
|
10
|
-
lastName: '',
|
|
11
|
-
email: '',
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const validate = (values: any) => {
|
|
15
|
-
const errors: any = {};
|
|
16
|
-
|
|
17
|
-
if (!values.firstName) {
|
|
18
|
-
errors.firstName = 'Required';
|
|
19
|
-
}
|
|
20
|
-
if (!values.lastName) {
|
|
21
|
-
errors.lastName = 'Required';
|
|
22
|
-
}
|
|
23
|
-
if (!values.email) {
|
|
24
|
-
errors.email = 'Required';
|
|
25
|
-
} else if (!/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i.test(values.email)) {
|
|
26
|
-
errors.email = 'Invalid email address';
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return errors;
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
return (
|
|
33
|
-
<Formik
|
|
34
|
-
initialValues={initialValues}
|
|
35
|
-
validate={validate}
|
|
36
|
-
onSubmit={(values, { setSubmitting }) => {
|
|
37
|
-
setTimeout(() => {
|
|
38
|
-
alert(JSON.stringify(values, null, 2));
|
|
39
|
-
setSubmitting(false);
|
|
40
|
-
}, 400);
|
|
41
|
-
}}
|
|
42
|
-
>
|
|
43
|
-
{({ errors, touched, isSubmitting }) => (
|
|
44
|
-
<Form>
|
|
45
|
-
<Vertical gap={10}>
|
|
46
|
-
<Field
|
|
47
|
-
as={TextField}
|
|
48
|
-
name="firstName"
|
|
49
|
-
placeholder="First Name"
|
|
50
|
-
error={touched.firstName && errors.firstName}
|
|
51
|
-
colorScheme="theme.secondary"
|
|
52
|
-
/>
|
|
53
|
-
<Field
|
|
54
|
-
as={TextField}
|
|
55
|
-
name="lastName"
|
|
56
|
-
placeholder="Last Name"
|
|
57
|
-
colorScheme="theme.secondary"
|
|
58
|
-
error={touched.lastName && errors.lastName}
|
|
59
|
-
/>
|
|
60
|
-
<Field
|
|
61
|
-
type="email"
|
|
62
|
-
as={TextField}
|
|
63
|
-
name="email"
|
|
64
|
-
placeholder="Email"
|
|
65
|
-
colorScheme="theme.secondary"
|
|
66
|
-
error={touched.email && errors.email}
|
|
67
|
-
/>
|
|
68
|
-
<Button type="submit" isDisabled={isSubmitting}>
|
|
69
|
-
Submit
|
|
70
|
-
</Button>
|
|
71
|
-
</Vertical>
|
|
72
|
-
</Form>
|
|
73
|
-
)}
|
|
74
|
-
</Formik>
|
|
75
|
-
);
|
|
76
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Field, Form, Formik } from 'formik';
|
|
3
|
-
import { Button } from 'src/components';
|
|
4
|
-
import { TextField } from 'src/components';
|
|
5
|
-
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
6
|
-
|
|
7
|
-
export const FormikHelperTextInput = () => {
|
|
8
|
-
const initialValues = {
|
|
9
|
-
firstName: '',
|
|
10
|
-
lastName: '',
|
|
11
|
-
};
|
|
12
|
-
|
|
13
|
-
const validate = (values: any) => {
|
|
14
|
-
const errors: any = {};
|
|
15
|
-
|
|
16
|
-
if (!values.firstName) {
|
|
17
|
-
errors.firstName = 'Required';
|
|
18
|
-
}
|
|
19
|
-
if (!values.lastName) {
|
|
20
|
-
errors.lastName = 'Required';
|
|
21
|
-
}
|
|
22
|
-
return errors;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
return (
|
|
26
|
-
<Formik
|
|
27
|
-
initialValues={initialValues}
|
|
28
|
-
validate={validate}
|
|
29
|
-
onSubmit={(values, { setSubmitting }) => {
|
|
30
|
-
setTimeout(() => {
|
|
31
|
-
alert(JSON.stringify(values, null, 2));
|
|
32
|
-
setSubmitting(false);
|
|
33
|
-
}, 400);
|
|
34
|
-
}}
|
|
35
|
-
>
|
|
36
|
-
{({ errors, touched, isSubmitting }) => (
|
|
37
|
-
<Form>
|
|
38
|
-
<Vertical gap={10}>
|
|
39
|
-
<Field
|
|
40
|
-
as={TextField}
|
|
41
|
-
name="firstName"
|
|
42
|
-
placeholder="First Name"
|
|
43
|
-
error={touched.firstName && errors.firstName}
|
|
44
|
-
helperText={touched.firstName && errors.firstName}
|
|
45
|
-
/>
|
|
46
|
-
<Field
|
|
47
|
-
as={TextField}
|
|
48
|
-
name="lastName"
|
|
49
|
-
placeholder="Last Name"
|
|
50
|
-
error={touched.lastName && errors.lastName}
|
|
51
|
-
helperText={touched.lastName && errors.lastName}
|
|
52
|
-
styles={{ helperText: { color: 'red', size: 'sm' } }}
|
|
53
|
-
/>
|
|
54
|
-
<Button type="submit" isDisabled={isSubmitting}>
|
|
55
|
-
Submit
|
|
56
|
-
</Button>
|
|
57
|
-
</Vertical>
|
|
58
|
-
</Form>
|
|
59
|
-
)}
|
|
60
|
-
</Formik>
|
|
61
|
-
);
|
|
62
|
-
};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { useState } from 'react';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { Button } from 'src/components';
|
|
4
|
-
import { TextField } from 'src/components';
|
|
5
|
-
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
6
|
-
|
|
7
|
-
export const HelperTextInput = () => {
|
|
8
|
-
const initialValues = {
|
|
9
|
-
firstName: '',
|
|
10
|
-
lastName: '',
|
|
11
|
-
};
|
|
12
|
-
const [formValues, setFormValues] = useState(initialValues);
|
|
13
|
-
const [formErrors, setFormErrors] = useState(initialValues);
|
|
14
|
-
|
|
15
|
-
const validate = (values: any) => {
|
|
16
|
-
const errors: any = {};
|
|
17
|
-
if (!values.firstName) {
|
|
18
|
-
errors.firstName = 'Required';
|
|
19
|
-
}
|
|
20
|
-
if (!values.lastName) {
|
|
21
|
-
errors.lastName = 'Required';
|
|
22
|
-
}
|
|
23
|
-
setFormErrors(errors);
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const handleChange = (event: any) => {
|
|
27
|
-
setFormValues({ ...formValues, [event.target.name]: event.target.value });
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
const handleSubmit = (event: any) => {
|
|
31
|
-
event.preventDefault();
|
|
32
|
-
validate(formValues);
|
|
33
|
-
if (Object.values(formErrors).length === 0) {
|
|
34
|
-
alert(`Hello, ${formValues.firstName} ${formValues.lastName} `);
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
return (
|
|
38
|
-
<form onSubmit={handleSubmit}>
|
|
39
|
-
<Vertical gap={10} alignItems="center" wrap="nowrap">
|
|
40
|
-
<TextField
|
|
41
|
-
name="firstName"
|
|
42
|
-
placeholder="First Name"
|
|
43
|
-
helperText={formErrors.firstName}
|
|
44
|
-
error={!!formErrors.firstName}
|
|
45
|
-
onChange={handleChange}
|
|
46
|
-
/>
|
|
47
|
-
<TextField
|
|
48
|
-
name="lastName"
|
|
49
|
-
placeholder="Last Name"
|
|
50
|
-
helperText={formErrors.lastName}
|
|
51
|
-
error={!!formErrors.lastName}
|
|
52
|
-
onChange={handleChange}
|
|
53
|
-
/>
|
|
54
|
-
<Button type="submit" height="40px" isAuto>
|
|
55
|
-
Submit
|
|
56
|
-
</Button>
|
|
57
|
-
</Vertical>
|
|
58
|
-
</form>
|
|
59
|
-
);
|
|
60
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button } from 'src/components';
|
|
3
|
-
import { Horizontal } from 'src/components';
|
|
4
|
-
|
|
5
|
-
import { TextField } from '../TextField';
|
|
6
|
-
|
|
7
|
-
export const LabelInput = () => {
|
|
8
|
-
const handleSubmit = (event: any) => {
|
|
9
|
-
event.preventDefault();
|
|
10
|
-
const formData = new FormData(event.target);
|
|
11
|
-
alert(`Hello, ${formData.get('surname')}`);
|
|
12
|
-
};
|
|
13
|
-
return (
|
|
14
|
-
<form onSubmit={handleSubmit}>
|
|
15
|
-
<Horizontal gap={10} alignItems="center" wrap="nowrap">
|
|
16
|
-
<TextField name="surname" label="Surname" />
|
|
17
|
-
<Button type="submit" height="40px" isAuto>
|
|
18
|
-
Submit
|
|
19
|
-
</Button>
|
|
20
|
-
</Horizontal>
|
|
21
|
-
</form>
|
|
22
|
-
);
|
|
23
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ProfileSvg } from 'src/components/Svg';
|
|
3
|
-
|
|
4
|
-
import { TextField } from '../TextField';
|
|
5
|
-
|
|
6
|
-
export const LeftInput = () => {
|
|
7
|
-
return <TextField name="name" placeholder="Name" leftChild={<ProfileSvg color="black" size={16} />} />;
|
|
8
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button } from 'src/components';
|
|
3
|
-
import { Horizontal } from 'src/components';
|
|
4
|
-
|
|
5
|
-
import { TextField } from '../TextField';
|
|
6
|
-
|
|
7
|
-
export const Placeholder = () => {
|
|
8
|
-
const handleSubmit = (event: any) => {
|
|
9
|
-
event.preventDefault();
|
|
10
|
-
const formData = new FormData(event.target);
|
|
11
|
-
alert(`Hello, ${formData.get('surname')}`);
|
|
12
|
-
};
|
|
13
|
-
return (
|
|
14
|
-
<form onSubmit={handleSubmit}>
|
|
15
|
-
<Horizontal gap={10} alignItems="center" wrap="nowrap">
|
|
16
|
-
<TextField name="surname" placeholder="Surname" />
|
|
17
|
-
<Button type="submit" height="40px" isAuto>
|
|
18
|
-
Submit
|
|
19
|
-
</Button>
|
|
20
|
-
</Horizontal>
|
|
21
|
-
</form>
|
|
22
|
-
);
|
|
23
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { EditSvg } from 'src/components/Svg';
|
|
3
|
-
|
|
4
|
-
import { TextField } from '../TextField';
|
|
5
|
-
|
|
6
|
-
export const RightInput = () => {
|
|
7
|
-
return <TextField name="name" placeholder="Name" rightChild={<EditSvg color="black" size={16} />} />;
|
|
8
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
3
|
-
|
|
4
|
-
import { TextField } from '../TextField';
|
|
5
|
-
import { Shape } from '../TextField/TextField.type';
|
|
6
|
-
|
|
7
|
-
export const ShapesInput = () => {
|
|
8
|
-
return (
|
|
9
|
-
<Vertical gap={10} width="300px">
|
|
10
|
-
{['default', 'sharp', 'rounded', 'pillShaped'].map((shape, index) => (
|
|
11
|
-
<TextField key={index} name={shape} placeholder={shape} shape={shape as Shape} variant="outline" />
|
|
12
|
-
))}
|
|
13
|
-
</Vertical>
|
|
14
|
-
);
|
|
15
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
3
|
-
|
|
4
|
-
import { TextField } from '../TextField';
|
|
5
|
-
|
|
6
|
-
export const SizeInput = () => {
|
|
7
|
-
return (
|
|
8
|
-
<Vertical gap={10} width="300px">
|
|
9
|
-
<TextField name="xs" placeholder="xs" size="xs" />
|
|
10
|
-
<TextField name="sm" placeholder="sm" size="xs" />
|
|
11
|
-
<TextField name="md" placeholder="md" size="md" />
|
|
12
|
-
<TextField name="lg" placeholder="lg" size="lg" />
|
|
13
|
-
<TextField name="xl" placeholder="xl" size="md" />
|
|
14
|
-
</Vertical>
|
|
15
|
-
);
|
|
16
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Button } from 'src/components';
|
|
3
|
-
import { Horizontal } from 'src/components';
|
|
4
|
-
|
|
5
|
-
import { TextField } from '../TextField';
|
|
6
|
-
|
|
7
|
-
export const StyledInput = () => {
|
|
8
|
-
const handleSubmit = (event: any) => {
|
|
9
|
-
event.preventDefault();
|
|
10
|
-
const formData = new FormData(event.target);
|
|
11
|
-
alert(`Hello, ${formData.get('surname')}`);
|
|
12
|
-
};
|
|
13
|
-
return (
|
|
14
|
-
<form onSubmit={handleSubmit}>
|
|
15
|
-
<Horizontal gap={10} alignItems="center" wrap="nowrap">
|
|
16
|
-
<TextField
|
|
17
|
-
name="surname"
|
|
18
|
-
label="Surname"
|
|
19
|
-
variant="unStyled"
|
|
20
|
-
shadow={{ boxShadow: 'rgba(0, 0, 0, 0.20) 0px 3px 8px' }}
|
|
21
|
-
styles={{
|
|
22
|
-
box: { borderRadius: 8, borderColor: 'theme.primary', borderStyle: 'solid', borderWidth: 1 },
|
|
23
|
-
text: { color: 'theme.primary' },
|
|
24
|
-
label: { color: 'theme.primary' },
|
|
25
|
-
}}
|
|
26
|
-
/>
|
|
27
|
-
<Button type="submit" height="40px" colorScheme="theme.primary" isAuto>
|
|
28
|
-
Submit
|
|
29
|
-
</Button>
|
|
30
|
-
</Horizontal>
|
|
31
|
-
</form>
|
|
32
|
-
);
|
|
33
|
-
};
|