@app-studio/web 0.1.4 → 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/dist/components/Button/examples/index.d.ts +9 -9
- package/dist/components/Form/Checkbox/examples/index.d.ts +11 -11
- package/dist/components/Form/CountryPicker/examples/index.d.ts +12 -12
- package/dist/components/Form/DatePicker/examples/index.d.ts +11 -11
- package/dist/components/Form/Password/Password/Password.props.d.ts +1 -1
- package/dist/components/Form/TextArea/examples/index.d.ts +15 -15
- package/dist/components/Form/TextField/examples/index.d.ts +17 -17
- package/dist/components/Layout/Horizontal/examples/index.d.ts +4 -4
- package/dist/components/Layout/Input/FieldContainer/FieldContainer/FieldContainer.props.d.ts +1 -1
- package/dist/components/Layout/Input/FieldContent/FieldContent/FieldContent.props.d.ts +1 -1
- package/dist/components/Layout/Input/FieldLabel/FieldLabel/FieldLabel.props.d.ts +1 -1
- package/dist/components/Layout/Input/FieldLayout/FieldLayout/FieldLayout.props.d.ts +1 -1
- package/dist/components/Layout/Input/HelperText/HelperText.props.d.ts +1 -1
- package/dist/components/Layout/Input/index.d.ts +7 -7
- package/dist/components/Loader/examples/index.d.ts +7 -7
- package/dist/components/Modal/Examples/index.d.ts +9 -9
- package/dist/components/index.d.ts +18 -18
- package/package.json +6 -7
- 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,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Typography } from 'app-studio';
|
|
3
|
-
|
|
4
|
-
import { Vertical } from '../../Vertical/Vertical';
|
|
5
|
-
|
|
6
|
-
import { FieldProps } from './FieldLayout/FieldLayout.props';
|
|
7
|
-
|
|
8
|
-
export const FieldLayout: React.FC<FieldProps> = ({
|
|
9
|
-
children,
|
|
10
|
-
size = 'md',
|
|
11
|
-
isDisabled = false,
|
|
12
|
-
isReadOnly = false,
|
|
13
|
-
styles = { text: {} },
|
|
14
|
-
...props
|
|
15
|
-
}) => (
|
|
16
|
-
<Vertical
|
|
17
|
-
gap={2}
|
|
18
|
-
margin={0}
|
|
19
|
-
padding={0}
|
|
20
|
-
width="100%"
|
|
21
|
-
heigth="100%"
|
|
22
|
-
border="none"
|
|
23
|
-
position="relative"
|
|
24
|
-
fontSize={Typography.fontSizes[size]}
|
|
25
|
-
backgroundColor="transparent"
|
|
26
|
-
color={isDisabled ? 'theme.text.disable' : 'theme.text.normal'}
|
|
27
|
-
cursor={isDisabled ? 'not-allowed' : isReadOnly ? 'auto' : 'pointer'}
|
|
28
|
-
{...styles['text']}
|
|
29
|
-
{...props}
|
|
30
|
-
>
|
|
31
|
-
{children}
|
|
32
|
-
</Vertical>
|
|
33
|
-
);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
export interface WrapperFieldProps {
|
|
4
|
-
/**
|
|
5
|
-
* The content to be rendered inside the Wrapper Field.
|
|
6
|
-
*/
|
|
7
|
-
children?: React.ReactNode;
|
|
8
|
-
/**
|
|
9
|
-
* Additional properties and attributes for the field.
|
|
10
|
-
*/
|
|
11
|
-
[x: string]: any;
|
|
12
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Vertical } from '../../Vertical/Vertical';
|
|
4
|
-
|
|
5
|
-
import { WrapperFieldProps } from './FieldWrapper.props';
|
|
6
|
-
|
|
7
|
-
export const FieldWrapper: React.FC<WrapperFieldProps> = ({ children, ...props }) => (
|
|
8
|
-
<Vertical width="100%" {...props}>
|
|
9
|
-
{children}
|
|
10
|
-
</Vertical>
|
|
11
|
-
);
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextFieldStyles } from 'src/components/Layout/configs/Input.type';
|
|
3
|
-
|
|
4
|
-
export interface HelperTextProps {
|
|
5
|
-
/**
|
|
6
|
-
* The content to be rendered inside the HelperText.
|
|
7
|
-
*/
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
/**
|
|
10
|
-
* If true, changes the input style to indicate error.
|
|
11
|
-
*/
|
|
12
|
-
error?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* CSS styles applied to the HelperText.
|
|
15
|
-
*/
|
|
16
|
-
styles?: TextFieldStyles;
|
|
17
|
-
/**
|
|
18
|
-
* Additional properties and attributes for the field.
|
|
19
|
-
*/
|
|
20
|
-
[x: string]: any;
|
|
21
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Text } from 'src/components';
|
|
3
|
-
|
|
4
|
-
import { HelperTextProps } from './HelperText.props';
|
|
5
|
-
|
|
6
|
-
export const HelperText: React.FC<HelperTextProps> = ({
|
|
7
|
-
children,
|
|
8
|
-
styles = { helperText: {} },
|
|
9
|
-
error = false,
|
|
10
|
-
...props
|
|
11
|
-
}) => (
|
|
12
|
-
<Text
|
|
13
|
-
size="xs"
|
|
14
|
-
marginVertical={0}
|
|
15
|
-
marginHorizontal={0}
|
|
16
|
-
color={error ? 'theme.error' : 'theme.text.dark'}
|
|
17
|
-
{...(styles['helperText'] as any)}
|
|
18
|
-
{...props}
|
|
19
|
-
>
|
|
20
|
-
{children}
|
|
21
|
-
</Text>
|
|
22
|
-
);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * from 'src/components/Layout/Input/FieldContainer/FieldContainer';
|
|
2
|
-
export * from 'src/components/Layout/Input/FieldContent/FieldContent';
|
|
3
|
-
export * from 'src/components/Layout/Input/FieldIcons/FieldIcons';
|
|
4
|
-
export * from 'src/components/Layout/Input/FieldLabel/FieldLabel';
|
|
5
|
-
export * from 'src/components/Layout/Input/FieldLayout/FieldLayout';
|
|
6
|
-
export * from 'src/components/Layout/Input/FieldWrapper/FieldWrapper';
|
|
7
|
-
export * from 'src/components/Layout/Input/HelperText/HelperText';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Justify, Wrap } from '../../configs/Input.type';
|
|
4
|
-
|
|
5
|
-
export interface VerticalProps {
|
|
6
|
-
/**
|
|
7
|
-
* The layout content
|
|
8
|
-
*/
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
/**
|
|
11
|
-
* It aligns the elements of the container according to the available space.
|
|
12
|
-
*/
|
|
13
|
-
justify?: Justify;
|
|
14
|
-
/**
|
|
15
|
-
* To specify, if the items should be wrap or not, based on available space on the line.
|
|
16
|
-
*/
|
|
17
|
-
wrap?: Wrap;
|
|
18
|
-
/**
|
|
19
|
-
* If true, the items' position on the vertical axis is reversed.
|
|
20
|
-
*/
|
|
21
|
-
isReversed?: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* other properties
|
|
24
|
-
*/
|
|
25
|
-
[x: string]: any;
|
|
26
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View } from 'app-studio';
|
|
3
|
-
|
|
4
|
-
import { VerticalProps } from './Vertical.props';
|
|
5
|
-
|
|
6
|
-
const VerticalView: React.FC<VerticalProps> = ({
|
|
7
|
-
children,
|
|
8
|
-
wrap = 'nowrap',
|
|
9
|
-
justify = 'flex-start',
|
|
10
|
-
isReversed = false,
|
|
11
|
-
...props
|
|
12
|
-
}) => (
|
|
13
|
-
<View
|
|
14
|
-
display="flex"
|
|
15
|
-
flexWrap={wrap}
|
|
16
|
-
flexDirection={isReversed ? 'column-reverse' : 'column'}
|
|
17
|
-
justifyContent={justify}
|
|
18
|
-
{...props}
|
|
19
|
-
>
|
|
20
|
-
{children}
|
|
21
|
-
</View>
|
|
22
|
-
);
|
|
23
|
-
export default VerticalView;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
### **Import**
|
|
2
|
-
|
|
3
|
-
```tsx static
|
|
4
|
-
import { Vertical } from "app-studio";
|
|
5
|
-
```
|
|
6
|
-
|
|
7
|
-
### **Default**
|
|
8
|
-
|
|
9
|
-
Flex direction is set as “column.
|
|
10
|
-
|
|
11
|
-
```tsx
|
|
12
|
-
import { View } from "../View/View";
|
|
13
|
-
|
|
14
|
-
<Vertical>
|
|
15
|
-
<View height={50} backgroundColor="theme.primary" />
|
|
16
|
-
<View height={50} backgroundColor="theme.secondary" />
|
|
17
|
-
<View height={50} backgroundColor="theme.warning" />
|
|
18
|
-
</Vertical>;
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### **Wrap**
|
|
22
|
-
|
|
23
|
-
“**_wrap_**” specifies if the items should be wrap or not based on the available space on the line. By default, wrap is set to “wrap”.
|
|
24
|
-
|
|
25
|
-
**Example**
|
|
26
|
-
|
|
27
|
-
```tsx
|
|
28
|
-
import { Horizontal } from "../Horizontal/Horizontal";
|
|
29
|
-
import { View } from "../View/View";
|
|
30
|
-
|
|
31
|
-
const size = {
|
|
32
|
-
width: 50,
|
|
33
|
-
height: 50,
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
<Horizontal gap={5} justify="space-evenly">
|
|
37
|
-
{["wrap", "nowrap", "wrap-reverse"].map((wrapping, index) => (
|
|
38
|
-
<View key={index}>
|
|
39
|
-
<View>{wrapping}</View>
|
|
40
|
-
<Vertical wrap={wrapping} gap={5} height={200} flex={1}>
|
|
41
|
-
<View backgroundColor="theme.primary" {...size} />
|
|
42
|
-
<View backgroundColor="theme.secondary" {...size} />
|
|
43
|
-
<View backgroundColor="theme.warning" {...size} />
|
|
44
|
-
<View backgroundColor="theme.success" {...size} />
|
|
45
|
-
<View backgroundColor="theme.error" {...size} />
|
|
46
|
-
<View backgroundColor="color.blue" {...size} />
|
|
47
|
-
</Vertical>
|
|
48
|
-
</View>
|
|
49
|
-
))}
|
|
50
|
-
</Horizontal>;
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## **Reverse**
|
|
54
|
-
|
|
55
|
-
“**_isReversed_**” renders the items in the reverse order at the end of the main axis.
|
|
56
|
-
|
|
57
|
-
```tsx
|
|
58
|
-
import { View } from "../View/View";
|
|
59
|
-
|
|
60
|
-
<Vertical isReversed gap={5}>
|
|
61
|
-
<View height={50} backgroundColor="theme.primary" />
|
|
62
|
-
<View height={50} backgroundColor="theme.secondary" />
|
|
63
|
-
<View height={50} backgroundColor="theme.warning" />
|
|
64
|
-
</Vertical>;
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## **Justify**
|
|
68
|
-
|
|
69
|
-
“**_justify_**” with type “Justify”, aligns the elements of the container according to the available space.
|
|
70
|
-
|
|
71
|
-
```tsx
|
|
72
|
-
import { Horizontal } from "../Horizontal/Horizontal";
|
|
73
|
-
import { View } from "../View/View";
|
|
74
|
-
|
|
75
|
-
const size = {
|
|
76
|
-
width: 50,
|
|
77
|
-
height: 50,
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
<Horizontal gap={20} wrap="nowrap" justify="space-between">
|
|
81
|
-
{[
|
|
82
|
-
"flex-start",
|
|
83
|
-
"flex-end",
|
|
84
|
-
"center",
|
|
85
|
-
"space-between",
|
|
86
|
-
"space-around",
|
|
87
|
-
"space-evenly",
|
|
88
|
-
].map((justify) => (
|
|
89
|
-
<Vertical flex={1}>
|
|
90
|
-
{justify}
|
|
91
|
-
<Vertical
|
|
92
|
-
justify={justify}
|
|
93
|
-
gap={5}
|
|
94
|
-
height={300}
|
|
95
|
-
backgroundColor="lightgray"
|
|
96
|
-
>
|
|
97
|
-
<View backgroundColor="theme.primary" {...size} />
|
|
98
|
-
<View backgroundColor="theme.secondary" {...size} />
|
|
99
|
-
<View backgroundColor="theme.warning" {...size} />
|
|
100
|
-
</Vertical>
|
|
101
|
-
</Vertical>
|
|
102
|
-
))}
|
|
103
|
-
</Horizontal>;
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
## **Types**
|
|
107
|
-
|
|
108
|
-
```tsx static
|
|
109
|
-
type Wrap = "wrap" | "nowrap" | "wrap-reverse";
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
```tsx static
|
|
113
|
-
type Justify =
|
|
114
|
-
| "flex-start"
|
|
115
|
-
| "center"
|
|
116
|
-
| "flex-end"
|
|
117
|
-
| "space-between"
|
|
118
|
-
| "space-around"
|
|
119
|
-
| "space-evenly";
|
|
120
|
-
```
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { VerticalProps } from './Vertical/Vertical.props';
|
|
4
|
-
import VerticalView from './Vertical/Vertical.view';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Vertical layout aligns all the elements in a container on the vertical axis.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
const VerticalComponent: React.FC<VerticalProps> = (props) => <VerticalView {...props} />;
|
|
11
|
-
|
|
12
|
-
export const Vertical = VerticalComponent;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Vertical } from 'src/components';
|
|
3
|
-
import { View } from 'src/components/Layout/View/View';
|
|
4
|
-
|
|
5
|
-
export const DefaultVertical = () => (
|
|
6
|
-
<Vertical>
|
|
7
|
-
<View height={50} backgroundColor="theme.primary" />
|
|
8
|
-
<View height={50} backgroundColor="theme.secondary" />
|
|
9
|
-
<View height={50} backgroundColor="theme.warning" />
|
|
10
|
-
</Vertical>
|
|
11
|
-
);
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Vertical } from 'src/components';
|
|
3
|
-
import { Horizontal } from 'src/components';
|
|
4
|
-
import { Justify } from 'src/components/Layout/Vertical/Vertical/Vertical.type';
|
|
5
|
-
import { View } from 'src/components/Layout/View/View';
|
|
6
|
-
|
|
7
|
-
export const JustifyVertical = () => {
|
|
8
|
-
const size = {
|
|
9
|
-
width: 50,
|
|
10
|
-
height: 50,
|
|
11
|
-
};
|
|
12
|
-
return (
|
|
13
|
-
<Horizontal gap={20} wrap="nowrap" justify="space-between">
|
|
14
|
-
{['flex-start', 'flex-end', 'center', 'space-between', 'space-around', 'space-evenly'].map((justify) => (
|
|
15
|
-
<Vertical flex={1} key={justify}>
|
|
16
|
-
{justify}
|
|
17
|
-
<Vertical justify={justify as Justify} gap={5} height={300} backgroundColor="lightgray">
|
|
18
|
-
<View backgroundColor="theme.primary" {...size} />
|
|
19
|
-
<View backgroundColor="theme.secondary" {...size} />
|
|
20
|
-
<View backgroundColor="theme.warning" {...size} />
|
|
21
|
-
</Vertical>
|
|
22
|
-
</Vertical>
|
|
23
|
-
))}
|
|
24
|
-
</Horizontal>
|
|
25
|
-
);
|
|
26
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Vertical } from 'src/components';
|
|
3
|
-
import { View } from 'src/components/Layout/View/View';
|
|
4
|
-
|
|
5
|
-
export const ReversedVertical = () => (
|
|
6
|
-
<Vertical isReversed gap={5}>
|
|
7
|
-
<View height={50} backgroundColor="theme.primary" />
|
|
8
|
-
<View height={50} backgroundColor="theme.secondary" />
|
|
9
|
-
<View height={50} backgroundColor="theme.warning" />
|
|
10
|
-
</Vertical>
|
|
11
|
-
);
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Vertical } from 'src/components';
|
|
3
|
-
import { Horizontal } from 'src/components';
|
|
4
|
-
import { View } from 'src/components/Layout/View/View';
|
|
5
|
-
|
|
6
|
-
import { Wrap } from '../Vertical/Vertical.type';
|
|
7
|
-
|
|
8
|
-
export const WrapVertical = () => {
|
|
9
|
-
const size = {
|
|
10
|
-
width: 50,
|
|
11
|
-
height: 50,
|
|
12
|
-
};
|
|
13
|
-
return (
|
|
14
|
-
<Horizontal gap={5} justify="space-between">
|
|
15
|
-
{['wrap', 'nowrap', 'wrap-reverse'].map((wrapping, index) => (
|
|
16
|
-
<View key={index}>
|
|
17
|
-
<View>{wrapping}</View>
|
|
18
|
-
<Vertical wrap={wrapping as Wrap} gap={5} height={200} flex={1}>
|
|
19
|
-
<View backgroundColor="theme.primary" {...size} />
|
|
20
|
-
<View backgroundColor="theme.secondary" {...size} />
|
|
21
|
-
<View backgroundColor="theme.warning" {...size} />
|
|
22
|
-
<View backgroundColor="theme.success" {...size} />
|
|
23
|
-
<View backgroundColor="theme.error" {...size} />
|
|
24
|
-
<View backgroundColor="color.blue" {...size} />
|
|
25
|
-
</Vertical>
|
|
26
|
-
</View>
|
|
27
|
-
))}
|
|
28
|
-
</Horizontal>
|
|
29
|
-
);
|
|
30
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
|
|
3
|
-
import { Shape, Size, Variant } from './Input.type';
|
|
4
|
-
|
|
5
|
-
export const Shapes: Record<Shape, CSSProperties> = {
|
|
6
|
-
default: { borderTopLeftRadius: 6, borderTopRightRadius: 6, borderBottomLeftRadius: 0, borderBottomRightRadius: 0 },
|
|
7
|
-
sharp: { borderRadius: 0 },
|
|
8
|
-
rounded: { borderRadius: 4 },
|
|
9
|
-
pillShaped: { borderRadius: 24 },
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const LabelSizes: Record<Size, number> = {
|
|
13
|
-
xs: 8,
|
|
14
|
-
sm: 10,
|
|
15
|
-
md: 12,
|
|
16
|
-
lg: 14,
|
|
17
|
-
xl: 16,
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const InputVariants: Record<Variant, CSSProperties> = {
|
|
21
|
-
outline: {
|
|
22
|
-
borderWidth: 1,
|
|
23
|
-
},
|
|
24
|
-
default: {
|
|
25
|
-
borderWidth: 0,
|
|
26
|
-
borderBottomWidth: 2,
|
|
27
|
-
},
|
|
28
|
-
unStyled: {
|
|
29
|
-
border: 'none',
|
|
30
|
-
backgroundColor: 'transparent',
|
|
31
|
-
},
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
export const PadddingWithLabel = {
|
|
35
|
-
paddingTop: 16,
|
|
36
|
-
paddingBottom: 0,
|
|
37
|
-
paddingLeft: 16,
|
|
38
|
-
paddingRight: 35,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
export const PaddingWithoutLabel = {
|
|
42
|
-
paddingVertical: 8,
|
|
43
|
-
paddingLeft: 16,
|
|
44
|
-
paddingRight: 35,
|
|
45
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
|
|
3
|
-
export type Variant = 'outline' | 'default' | 'unStyled';
|
|
4
|
-
|
|
5
|
-
export type Shape = 'default' | 'sharp' | 'rounded' | 'pillShaped';
|
|
6
|
-
|
|
7
|
-
export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
8
|
-
|
|
9
|
-
export type TextFieldStyles = {
|
|
10
|
-
box?: CSSProperties;
|
|
11
|
-
text?: CSSProperties;
|
|
12
|
-
label?: CSSProperties;
|
|
13
|
-
helperText?: CSSProperties;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export type Wrap = 'wrap' | 'nowrap' | 'wrap-reverse';
|
|
17
|
-
|
|
18
|
-
export type Justify = 'flex-start' | 'center' | 'flex-end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { Size, Styles, TextDecorationStyle } from './Link.type';
|
|
4
|
-
|
|
5
|
-
export interface LinkProps {
|
|
6
|
-
/**
|
|
7
|
-
* The content of the link.
|
|
8
|
-
*/
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
/**
|
|
11
|
-
* The style of text decoration for the link.
|
|
12
|
-
* Can be one of "default", "hover", or "underline".
|
|
13
|
-
*/
|
|
14
|
-
underline?: TextDecorationStyle;
|
|
15
|
-
/**
|
|
16
|
-
* Indicates whether the link opens in a new tab.
|
|
17
|
-
*/
|
|
18
|
-
isExternal?: boolean;
|
|
19
|
-
/**
|
|
20
|
-
* The size of the icon associated with the link.
|
|
21
|
-
*/
|
|
22
|
-
iconSize?: Size;
|
|
23
|
-
/**
|
|
24
|
-
* Sets the color of the icon and text.
|
|
25
|
-
*/
|
|
26
|
-
colorScheme?: string;
|
|
27
|
-
/**
|
|
28
|
-
* The URL or destination of the link.
|
|
29
|
-
*/
|
|
30
|
-
href: string;
|
|
31
|
-
/**
|
|
32
|
-
* CSS styles for the external icon.
|
|
33
|
-
*/
|
|
34
|
-
styles?: Styles;
|
|
35
|
-
/**
|
|
36
|
-
* Additional props for customization.
|
|
37
|
-
*/
|
|
38
|
-
[x: string]: any;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface LinkViewProps extends LinkProps {
|
|
42
|
-
/**
|
|
43
|
-
* Indicates whether the link is currently being hovered
|
|
44
|
-
*/
|
|
45
|
-
isHovered: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Function to set the hovered state of the link
|
|
48
|
-
*/
|
|
49
|
-
setIsHovered: Function;
|
|
50
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Element } from 'app-studio';
|
|
3
|
-
import { Link as ReactRouterLink } from 'react-router-dom';
|
|
4
|
-
import { Horizontal } from 'src/components';
|
|
5
|
-
import { ExternalLinkSvg } from 'src/components/Svg';
|
|
6
|
-
|
|
7
|
-
import { LinkViewProps } from './Link.props';
|
|
8
|
-
import { IconSizes } from './Link.style';
|
|
9
|
-
|
|
10
|
-
const LinkView: React.FC<LinkViewProps> = ({
|
|
11
|
-
children,
|
|
12
|
-
href = '/',
|
|
13
|
-
iconSize = 'sm',
|
|
14
|
-
underline = 'default',
|
|
15
|
-
isHovered = false,
|
|
16
|
-
isExternal = false,
|
|
17
|
-
colorScheme = '#0072F5',
|
|
18
|
-
styles = { icon: {}, text: {} },
|
|
19
|
-
setIsHovered = () => {},
|
|
20
|
-
...props
|
|
21
|
-
}) => {
|
|
22
|
-
const handleHover = () => {
|
|
23
|
-
if (underline === 'hover') setIsHovered(true);
|
|
24
|
-
};
|
|
25
|
-
return (
|
|
26
|
-
<ReactRouterLink to={href} target={isExternal ? '_blank' : '_self'}>
|
|
27
|
-
<Element
|
|
28
|
-
color={colorScheme}
|
|
29
|
-
onMouseEnter={handleHover}
|
|
30
|
-
onMouseLeave={handleHover}
|
|
31
|
-
textDecoration={isHovered || underline === 'underline' ? 'underline !important' : 'none'}
|
|
32
|
-
{...styles.text}
|
|
33
|
-
{...props}
|
|
34
|
-
>
|
|
35
|
-
<Horizontal gap={3} alignItems="center" wrap="nowrap">
|
|
36
|
-
{children}
|
|
37
|
-
{isExternal && <ExternalLinkSvg color={colorScheme} size={IconSizes[iconSize]} style={styles.icon} />}
|
|
38
|
-
</Horizontal>
|
|
39
|
-
</Element>
|
|
40
|
-
</ReactRouterLink>
|
|
41
|
-
);
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export default LinkView;
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
### **Import**
|
|
2
|
-
|
|
3
|
-
```tsx static
|
|
4
|
-
import { Link } from "app-studio";
|
|
5
|
-
```
|
|
6
|
-
|
|
7
|
-
### **Default**
|
|
8
|
-
|
|
9
|
-
```tsx
|
|
10
|
-
<Link>Click Me</Link>
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
### **Underline**
|
|
14
|
-
|
|
15
|
-
“**_underline_**” modifies the text decoration of the link. It has a type TextDecorationStyle.
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
import { Vertical } from "../Layout/Vertical/Vertical";
|
|
19
|
-
import { Text } from "../Text/Text";
|
|
20
|
-
|
|
21
|
-
<Vertical gap={10}>
|
|
22
|
-
<Link href="https://www.npmjs.com/package/app-studio" underline="default">
|
|
23
|
-
Default
|
|
24
|
-
</Link>
|
|
25
|
-
<Link
|
|
26
|
-
href="https://www.npmjs.com/package/app-studio"
|
|
27
|
-
underline="hover"
|
|
28
|
-
color="black"
|
|
29
|
-
>
|
|
30
|
-
Hover
|
|
31
|
-
</Link>
|
|
32
|
-
<Link
|
|
33
|
-
href="https://www.npmjs.com/package/app-studio"
|
|
34
|
-
underline="underline"
|
|
35
|
-
color="theme.primary"
|
|
36
|
-
>
|
|
37
|
-
<Text>Underline</Text>
|
|
38
|
-
</Link>
|
|
39
|
-
</Vertical>;
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### **IsExternal**
|
|
43
|
-
|
|
44
|
-
“**_isExternal_**” enables the opening of URL links in a new tab. When set to true, it adds an icon on the right side of the link content, visually indicating that it is an external link.
|
|
45
|
-
|
|
46
|
-
```tsx
|
|
47
|
-
import { Text } from "../Text/Text";
|
|
48
|
-
<Link
|
|
49
|
-
href={"https://www.npmjs.com/package/app-studio"}
|
|
50
|
-
iconSize="md"
|
|
51
|
-
isExternal
|
|
52
|
-
>
|
|
53
|
-
<Text size="2xl">External</Text>
|
|
54
|
-
</Link>;
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Types
|
|
58
|
-
|
|
59
|
-
```tsx static
|
|
60
|
-
type TextDecorationStyle = "default" | "hover" | "underline";
|
|
61
|
-
```
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
|
|
3
|
-
import { LinkProps } from './Link/Link.props';
|
|
4
|
-
import { useLinkState } from './Link/Link.state';
|
|
5
|
-
import LinkView from './Link/Link.view';
|
|
6
|
-
|
|
7
|
-
const LinkComponent: React.FC<LinkProps> = (props) => {
|
|
8
|
-
const linkStates = useLinkState();
|
|
9
|
-
return <LinkView {...linkStates} {...props} />;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Link allows users to navigate from page to page. It have a similar appearance as the hyperlink.
|
|
14
|
-
*/
|
|
15
|
-
export const Link = LinkComponent;
|