@app-studio/web 0.1.0
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/LICENSE +448 -0
- package/README.md +50 -0
- package/dist/App.d.ts +3 -0
- package/dist/components/Button/Button/Button.props.d.ts +77 -0
- package/dist/components/Button/Button/Button.state.d.ts +5 -0
- package/dist/components/Button/Button/Button.style.d.ts +5 -0
- package/dist/components/Button/Button/Button.view.d.ts +4 -0
- package/dist/components/Button/Button.d.ts +6 -0
- package/dist/components/Button/examples/AutoFocusButton.d.ts +2 -0
- package/dist/components/Button/examples/BorderedButtons.d.ts +2 -0
- package/dist/components/Button/examples/ColoredButtons.d.ts +2 -0
- package/dist/components/Button/examples/DefaultButton.d.ts +2 -0
- package/dist/components/Button/examples/DisabledButton.d.ts +2 -0
- package/dist/components/Button/examples/IconButtons.d.ts +2 -0
- package/dist/components/Button/examples/LoadingButtons.d.ts +2 -0
- package/dist/components/Button/examples/ShadowButton.d.ts +2 -0
- package/dist/components/Button/examples/SizeButtons.d.ts +2 -0
- package/dist/components/Button/examples/VariantButtons.d.ts +2 -0
- package/dist/components/Button/examples/index.d.ts +9 -0
- package/dist/components/Form/Checkbox/Checkbox/Checkbox.props.d.ts +97 -0
- package/dist/components/Form/Checkbox/Checkbox/Checkbox.state.d.ts +8 -0
- package/dist/components/Form/Checkbox/Checkbox/Checkbox.style.d.ts +4 -0
- package/dist/components/Form/Checkbox/Checkbox/Checkbox.view.d.ts +4 -0
- package/dist/components/Form/Checkbox/Checkbox.d.ts +6 -0
- package/dist/components/Form/Checkbox/examples/ColorScheme.d.ts +2 -0
- package/dist/components/Form/Checkbox/examples/Default.d.ts +2 -0
- package/dist/components/Form/Checkbox/examples/DisabledInput.d.ts +2 -0
- package/dist/components/Form/Checkbox/examples/ErrorCheckbox.d.ts +2 -0
- package/dist/components/Form/Checkbox/examples/FormCheckout.d.ts +2 -0
- package/dist/components/Form/Checkbox/examples/IconCheckbox.d.ts +2 -0
- package/dist/components/Form/Checkbox/examples/IndeterminateCheckbox.d.ts +2 -0
- package/dist/components/Form/Checkbox/examples/ReadOnlyInput.d.ts +2 -0
- package/dist/components/Form/Checkbox/examples/Shadow.d.ts +2 -0
- package/dist/components/Form/Checkbox/examples/SizeInput.d.ts +2 -0
- package/dist/components/Form/Checkbox/examples/StylesInput.d.ts +2 -0
- package/dist/components/Form/Checkbox/examples/index.d.ts +11 -0
- package/dist/components/Form/CountryPicker/CountryPicker/CountryPicker.props.d.ts +173 -0
- package/dist/components/Form/CountryPicker/CountryPicker/CountryPicker.state.d.ts +15 -0
- package/dist/components/Form/CountryPicker/CountryPicker/CountryPicker.style.d.ts +3 -0
- package/dist/components/Form/CountryPicker/CountryPicker/CountryPicker.view.d.ts +6 -0
- package/dist/components/Form/CountryPicker/CountryPicker.d.ts +6 -0
- package/dist/components/Form/CountryPicker/examples/Color.d.ts +2 -0
- package/dist/components/Form/CountryPicker/examples/Default.d.ts +2 -0
- package/dist/components/Form/CountryPicker/examples/Disabled.d.ts +2 -0
- package/dist/components/Form/CountryPicker/examples/Error.d.ts +2 -0
- package/dist/components/Form/CountryPicker/examples/Form.d.ts +2 -0
- package/dist/components/Form/CountryPicker/examples/Formik.d.ts +2 -0
- package/dist/components/Form/CountryPicker/examples/HelperText.d.ts +2 -0
- package/dist/components/Form/CountryPicker/examples/ReadOnlyInput.d.ts +2 -0
- package/dist/components/Form/CountryPicker/examples/Shadow.d.ts +2 -0
- package/dist/components/Form/CountryPicker/examples/Shape.d.ts +2 -0
- package/dist/components/Form/CountryPicker/examples/SizeInput.d.ts +2 -0
- package/dist/components/Form/CountryPicker/examples/StylesInput.d.ts +2 -0
- package/dist/components/Form/CountryPicker/examples/Variant.d.ts +2 -0
- package/dist/components/Form/CountryPicker/examples/index.d.ts +12 -0
- package/dist/components/Form/DatePicker/DatePicker/DatePicker.props.d.ts +103 -0
- package/dist/components/Form/DatePicker/DatePicker/DatePicker.state.d.ts +9 -0
- package/dist/components/Form/DatePicker/DatePicker/DatePicker.style.d.ts +3 -0
- package/dist/components/Form/DatePicker/DatePicker/DatePicker.view.d.ts +4 -0
- package/dist/components/Form/DatePicker/DatePicker.d.ts +6 -0
- package/dist/components/Form/DatePicker/examples/ColorScheme.d.ts +2 -0
- package/dist/components/Form/DatePicker/examples/Default.d.ts +2 -0
- package/dist/components/Form/DatePicker/examples/DisabledInput.d.ts +2 -0
- package/dist/components/Form/DatePicker/examples/ErrorCheckbox.d.ts +2 -0
- package/dist/components/Form/DatePicker/examples/FormCheckout.d.ts +2 -0
- package/dist/components/Form/DatePicker/examples/Formik.d.ts +2 -0
- package/dist/components/Form/DatePicker/examples/ReadOnlyInput.d.ts +2 -0
- package/dist/components/Form/DatePicker/examples/Shadow.d.ts +2 -0
- package/dist/components/Form/DatePicker/examples/SizeInput.d.ts +2 -0
- package/dist/components/Form/DatePicker/examples/StylesInput.d.ts +2 -0
- package/dist/components/Form/DatePicker/examples/helperTextDatePicker.d.ts +2 -0
- package/dist/components/Form/DatePicker/examples/index.d.ts +11 -0
- package/dist/components/Form/Label/Label/Label.props.d.ts +36 -0
- package/dist/components/Form/Label/Label/Label.style.d.ts +2 -0
- package/dist/components/Form/Label/Label/Label.type.d.ts +3 -0
- package/dist/components/Form/Label/Label/Label.view.d.ts +4 -0
- package/dist/components/Form/Label/Label.d.ts +3 -0
- package/dist/components/Form/Password/Password/Password.props.d.ts +34 -0
- package/dist/components/Form/Password/Password/Password.state.d.ts +5 -0
- package/dist/components/Form/Password/Password/Password.view.d.ts +4 -0
- package/dist/components/Form/Password/Password.d.ts +6 -0
- package/dist/components/Form/Password/example/Default.d.ts +2 -0
- package/dist/components/Form/Password/example/DisabledInput.d.ts +2 -0
- package/dist/components/Form/Password/example/ErrorInput.d.ts +2 -0
- package/dist/components/Form/Password/example/FormikErrorInput.d.ts +2 -0
- package/dist/components/Form/Password/example/FormikHelperText.d.ts +2 -0
- package/dist/components/Form/Password/example/HelperText.d.ts +2 -0
- package/dist/components/Form/Select/Select/Select.props.d.ts +234 -0
- package/dist/components/Form/Select/Select/Select.state.d.ts +16 -0
- package/dist/components/Form/Select/Select/Select.style.d.ts +4 -0
- package/dist/components/Form/Select/Select/Select.view.d.ts +5 -0
- package/dist/components/Form/Select/Select.d.ts +6 -0
- package/dist/components/Form/Select/examples/Color.d.ts +2 -0
- package/dist/components/Form/Select/examples/Default.d.ts +2 -0
- package/dist/components/Form/Select/examples/Disabled.d.ts +2 -0
- package/dist/components/Form/Select/examples/Error.d.ts +2 -0
- package/dist/components/Form/Select/examples/Form.d.ts +2 -0
- package/dist/components/Form/Select/examples/Formik.d.ts +2 -0
- package/dist/components/Form/Select/examples/HelperText.d.ts +2 -0
- package/dist/components/Form/Select/examples/Multiple.d.ts +2 -0
- package/dist/components/Form/Select/examples/ReadOnlyInput.d.ts +2 -0
- package/dist/components/Form/Select/examples/Shadow.d.ts +2 -0
- package/dist/components/Form/Select/examples/SizeInput.d.ts +2 -0
- package/dist/components/Form/Select/examples/StylesInput.d.ts +2 -0
- package/dist/components/Form/Switch/Switch/Switch.props.d.ts +72 -0
- package/dist/components/Form/Switch/Switch/Switch.state.d.ts +8 -0
- package/dist/components/Form/Switch/Switch/Switch.style.d.ts +5 -0
- package/dist/components/Form/Switch/Switch/Switch.view.d.ts +4 -0
- package/dist/components/Form/Switch/Switch.d.ts +3 -0
- package/dist/components/Form/Switch/examples/ChildSwitch.d.ts +2 -0
- package/dist/components/Form/Switch/examples/ColorScheme.d.ts +2 -0
- package/dist/components/Form/Switch/examples/Default.d.ts +2 -0
- package/dist/components/Form/Switch/examples/DisabledInput.d.ts +2 -0
- package/dist/components/Form/Switch/examples/FormSwitch.d.ts +2 -0
- package/dist/components/Form/Switch/examples/Formik.d.ts +2 -0
- package/dist/components/Form/Switch/examples/ReadOnlyInput.d.ts +2 -0
- package/dist/components/Form/Switch/examples/Shadow.d.ts +2 -0
- package/dist/components/Form/Switch/examples/SizeInput.d.ts +2 -0
- package/dist/components/Form/Switch/examples/StylesInput.d.ts +2 -0
- package/dist/components/Form/TextArea/TextArea/TextArea.props.d.ts +144 -0
- package/dist/components/Form/TextArea/TextArea/TextArea.state.d.ts +12 -0
- package/dist/components/Form/TextArea/TextArea/TextArea.type.d.ts +11 -0
- package/dist/components/Form/TextArea/TextArea/TextArea.view.d.ts +4 -0
- package/dist/components/Form/TextArea/TextArea.d.ts +6 -0
- package/dist/components/Form/TextArea/examples/ColorScheme.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/Default.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/DisabledInput.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/ErrorInput.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/FormikErrorInput.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/FormikHelperText.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/HelperText.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/LabelInput.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/MaxRowCol.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/Placeholder.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/ReadOnlyInput.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/ShadowArea.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/ShapeInput.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/SizeInput.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/StylesInput.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/VariantsInputs.d.ts +2 -0
- package/dist/components/Form/TextArea/examples/index.d.ts +15 -0
- package/dist/components/Form/TextField/TextField/TextField.props.d.ts +124 -0
- package/dist/components/Form/TextField/TextField/TextField.state.d.ts +12 -0
- package/dist/components/Form/TextField/TextField/TextField.view.d.ts +4 -0
- package/dist/components/Form/TextField/TextField.d.ts +6 -0
- package/dist/components/Form/TextField/examples/ClearInput.d.ts +2 -0
- package/dist/components/Form/TextField/examples/ColorScheme.d.ts +2 -0
- package/dist/components/Form/TextField/examples/Default.d.ts +2 -0
- package/dist/components/Form/TextField/examples/DisabledInput.d.ts +2 -0
- package/dist/components/Form/TextField/examples/ErrorInput.d.ts +2 -0
- package/dist/components/Form/TextField/examples/FormikErrorInput.d.ts +2 -0
- package/dist/components/Form/TextField/examples/FormikHelperText.d.ts +2 -0
- package/dist/components/Form/TextField/examples/HelperText.d.ts +2 -0
- package/dist/components/Form/TextField/examples/LabelInput.d.ts +2 -0
- package/dist/components/Form/TextField/examples/LeftChild.d.ts +2 -0
- package/dist/components/Form/TextField/examples/Placeholder.d.ts +2 -0
- package/dist/components/Form/TextField/examples/ReadOnlyInput.d.ts +2 -0
- package/dist/components/Form/TextField/examples/RightChild.d.ts +2 -0
- package/dist/components/Form/TextField/examples/ShapeInput.d.ts +2 -0
- package/dist/components/Form/TextField/examples/SizeInput.d.ts +2 -0
- package/dist/components/Form/TextField/examples/StylesInput.d.ts +2 -0
- package/dist/components/Form/TextField/examples/VariantsInputs.d.ts +2 -0
- package/dist/components/Form/TextField/examples/index.d.ts +17 -0
- package/dist/components/Layout/Center/Center/Center.props.d.ts +16 -0
- package/dist/components/Layout/Center/Center/Center.view.d.ts +4 -0
- package/dist/components/Layout/Center/Center.d.ts +3 -0
- package/dist/components/Layout/Horizontal/Horizontal/Horizontal.props.d.ts +24 -0
- package/dist/components/Layout/Horizontal/Horizontal/Horizontal.view.d.ts +4 -0
- package/dist/components/Layout/Horizontal/Horizontal.d.ts +3 -0
- package/dist/components/Layout/Horizontal/examples/Default.d.ts +2 -0
- package/dist/components/Layout/Horizontal/examples/Justify.d.ts +2 -0
- package/dist/components/Layout/Horizontal/examples/Reversed.d.ts +2 -0
- package/dist/components/Layout/Horizontal/examples/Wrap.d.ts +2 -0
- package/dist/components/Layout/Horizontal/examples/index.d.ts +4 -0
- package/dist/components/Layout/Input/FieldContainer/FieldContainer/FieldContainer.props.d.ts +24 -0
- package/dist/components/Layout/Input/FieldContainer/FieldContainer.d.ts +3 -0
- package/dist/components/Layout/Input/FieldContent/FieldContent/FieldContent.props.d.ts +74 -0
- package/dist/components/Layout/Input/FieldContent/FieldContent.d.ts +3 -0
- package/dist/components/Layout/Input/FieldIcons/FieldIcons/FieldIcons.props.d.ts +11 -0
- package/dist/components/Layout/Input/FieldIcons/FieldIcons.d.ts +3 -0
- package/dist/components/Layout/Input/FieldLabel/FieldLabel/FieldLabel.props.d.ts +30 -0
- package/dist/components/Layout/Input/FieldLabel/FieldLabel.d.ts +3 -0
- package/dist/components/Layout/Input/FieldLayout/FieldLayout/FieldLayout.props.d.ts +28 -0
- package/dist/components/Layout/Input/FieldLayout/FieldLayout.d.ts +3 -0
- package/dist/components/Layout/Input/FieldWrapper/FieldWrapper.d.ts +3 -0
- package/dist/components/Layout/Input/FieldWrapper/FieldWrapper.props.d.ts +11 -0
- package/dist/components/Layout/Input/HelperText/HelperText.d.ts +3 -0
- package/dist/components/Layout/Input/HelperText/HelperText.props.d.ts +20 -0
- package/dist/components/Layout/Input/index.d.ts +7 -0
- package/dist/components/Layout/Vertical/Vertical/Vertical.props.d.ts +24 -0
- package/dist/components/Layout/Vertical/Vertical/Vertical.type.d.ts +2 -0
- package/dist/components/Layout/Vertical/Vertical/Vertical.view.d.ts +4 -0
- package/dist/components/Layout/Vertical/Vertical.d.ts +3 -0
- package/dist/components/Layout/Vertical/examples/Default.d.ts +2 -0
- package/dist/components/Layout/Vertical/examples/Justify.d.ts +2 -0
- package/dist/components/Layout/Vertical/examples/Reversed.d.ts +2 -0
- package/dist/components/Layout/Vertical/examples/Wrap.d.ts +2 -0
- package/dist/components/Layout/Vertical/examples/index.d.ts +5 -0
- package/dist/components/Layout/View/View.d.ts +2 -0
- package/dist/components/Layout/configs/Input.style.d.ts +16 -0
- package/dist/components/Layout/configs/Input.type.d.ts +12 -0
- package/dist/components/Link/Link/Link.props.d.ts +47 -0
- package/dist/components/Link/Link/Link.state.d.ts +5 -0
- package/dist/components/Link/Link/Link.style.d.ts +2 -0
- package/dist/components/Link/Link/Link.view.d.ts +4 -0
- package/dist/components/Link/Link.d.ts +6 -0
- package/dist/components/Link/examples/Default.d.ts +2 -0
- package/dist/components/Link/examples/IsExternal.d.ts +2 -0
- package/dist/components/Link/examples/Underline.d.ts +2 -0
- package/dist/components/Loader/Loader/Loader.props.d.ts +93 -0
- package/dist/components/Loader/Loader/Loader.style.d.ts +4 -0
- package/dist/components/Loader/Loader/Loader.view.d.ts +4 -0
- package/dist/components/Loader/Loader.d.ts +6 -0
- package/dist/components/Loader/examples/ColorLoader.d.ts +2 -0
- package/dist/components/Loader/examples/DefaultLoader.d.ts +2 -0
- package/dist/components/Loader/examples/PositionLoader.d.ts +2 -0
- package/dist/components/Loader/examples/SizeLoader.d.ts +2 -0
- package/dist/components/Loader/examples/SpeedLoader.d.ts +2 -0
- package/dist/components/Loader/examples/TextLoader.d.ts +2 -0
- package/dist/components/Loader/examples/VariantLoader.d.ts +2 -0
- package/dist/components/Loader/examples/index.d.ts +7 -0
- package/dist/components/Modal/Examples/BlurModal.d.ts +2 -0
- package/dist/components/Modal/Examples/CloseButtonModal.d.ts +2 -0
- package/dist/components/Modal/Examples/DefaultModal.d.ts +2 -0
- package/dist/components/Modal/Examples/FullScreenModal.d.ts +2 -0
- package/dist/components/Modal/Examples/ModalPosition.d.ts +2 -0
- package/dist/components/Modal/Examples/PreventCloseModal.d.ts +2 -0
- package/dist/components/Modal/Examples/ScrollModal.d.ts +2 -0
- package/dist/components/Modal/Examples/ShadowModal.d.ts +2 -0
- package/dist/components/Modal/Examples/VariantModal.d.ts +2 -0
- package/dist/components/Modal/Examples/index.d.ts +9 -0
- package/dist/components/Modal/Modal/Modal.props.d.ts +178 -0
- package/dist/components/Modal/Modal/Modal.style.d.ts +5 -0
- package/dist/components/Modal/Modal/Modal.view.d.ts +7 -0
- package/dist/components/Modal/Modal.d.ts +6 -0
- package/dist/components/Svg/ArrowDown.d.ts +8 -0
- package/dist/components/Svg/ArrowUp.d.ts +8 -0
- package/dist/components/Svg/Check.d.ts +8 -0
- package/dist/components/Svg/Close.d.ts +8 -0
- package/dist/components/Svg/CloseEye.d.ts +8 -0
- package/dist/components/Svg/DustBin.d.ts +7 -0
- package/dist/components/Svg/Edit.d.ts +8 -0
- package/dist/components/Svg/ExternalLink.d.ts +8 -0
- package/dist/components/Svg/Indeterminate.d.ts +8 -0
- package/dist/components/Svg/OpenEye.d.ts +8 -0
- package/dist/components/Svg/Profile.d.ts +8 -0
- package/dist/components/Svg/RightArrow.d.ts +8 -0
- package/dist/components/Svg/index.d.ts +12 -0
- package/dist/components/Text/Text/Text.props.d.ts +77 -0
- package/dist/components/Text/Text/Text.style.d.ts +2 -0
- package/dist/components/Text/Text/Text.view.d.ts +4 -0
- package/dist/components/Text/Text.d.ts +6 -0
- package/dist/components/Wrapper.d.ts +6 -0
- package/dist/components/index.d.ts +18 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -0
- package/dist/web.cjs.development.js +27 -0
- package/dist/web.cjs.development.js.map +1 -0
- package/dist/web.cjs.production.min.js +2 -0
- package/dist/web.cjs.production.min.js.map +1 -0
- package/dist/web.esm.js +23 -0
- package/dist/web.esm.js.map +1 -0
- package/package.json +153 -0
- package/src/components/Button/Button/Button.props.ts +79 -0
- package/src/components/Button/Button/Button.state.ts +7 -0
- package/src/components/Button/Button/Button.style.ts +95 -0
- package/src/components/Button/Button/Button.type.d.ts +11 -0
- package/src/components/Button/Button/Button.view.tsx +116 -0
- package/src/components/Button/Button.md +165 -0
- package/src/components/Button/Button.tsx +24 -0
- package/src/components/Button/examples/AutoFocusButton.tsx +13 -0
- package/src/components/Button/examples/BorderedButtons.tsx +14 -0
- package/src/components/Button/examples/ColoredButtons.tsx +12 -0
- package/src/components/Button/examples/DefaultButton.tsx +4 -0
- package/src/components/Button/examples/DisabledButton.tsx +13 -0
- package/src/components/Button/examples/IconButtons.tsx +23 -0
- package/src/components/Button/examples/LoadingButtons.tsx +28 -0
- package/src/components/Button/examples/ShadowButton.tsx +6 -0
- package/src/components/Button/examples/SizeButtons.tsx +16 -0
- package/src/components/Button/examples/VariantButtons.tsx +20 -0
- package/src/components/Button/examples/index.ts +9 -0
- package/src/components/Form/Checkbox/Checkbox/Checkbox.props.ts +118 -0
- package/src/components/Form/Checkbox/Checkbox/Checkbox.state.ts +15 -0
- package/src/components/Form/Checkbox/Checkbox/Checkbox.style.ts +29 -0
- package/src/components/Form/Checkbox/Checkbox/Checkbox.type.d.ts +8 -0
- package/src/components/Form/Checkbox/Checkbox/Checkbox.view.tsx +98 -0
- package/src/components/Form/Checkbox/Checkbox.md +128 -0
- package/src/components/Form/Checkbox/Checkbox.tsx +15 -0
- package/src/components/Form/Checkbox/examples/ColorScheme.tsx +12 -0
- package/src/components/Form/Checkbox/examples/Default.tsx +5 -0
- package/src/components/Form/Checkbox/examples/DisabledInput.tsx +5 -0
- package/src/components/Form/Checkbox/examples/ErrorCheckbox.tsx +5 -0
- package/src/components/Form/Checkbox/examples/FormCheckout.tsx +46 -0
- package/src/components/Form/Checkbox/examples/IconCheckbox.tsx +8 -0
- package/src/components/Form/Checkbox/examples/IndeterminateCheckbox.tsx +5 -0
- package/src/components/Form/Checkbox/examples/ReadOnlyInput.tsx +5 -0
- package/src/components/Form/Checkbox/examples/Shadow.tsx +11 -0
- package/src/components/Form/Checkbox/examples/SizeInput.tsx +18 -0
- package/src/components/Form/Checkbox/examples/StylesInput.tsx +22 -0
- package/src/components/Form/Checkbox/examples/index.ts +11 -0
- package/src/components/Form/CountryPicker/CountryPicker/CountryPicker.props.ts +187 -0
- package/src/components/Form/CountryPicker/CountryPicker/CountryPicker.state.ts +28 -0
- package/src/components/Form/CountryPicker/CountryPicker/CountryPicker.style.ts +17 -0
- package/src/components/Form/CountryPicker/CountryPicker/CountryPicker.type.d.ts +22 -0
- package/src/components/Form/CountryPicker/CountryPicker/CountryPicker.view.tsx +234 -0
- package/src/components/Form/CountryPicker/CountryPicker.md +206 -0
- package/src/components/Form/CountryPicker/CountryPicker.tsx +16 -0
- package/src/components/Form/CountryPicker/countries.json +1453 -0
- package/src/components/Form/CountryPicker/examples/Color.tsx +12 -0
- package/src/components/Form/CountryPicker/examples/Default.tsx +4 -0
- package/src/components/Form/CountryPicker/examples/Disabled.tsx +5 -0
- package/src/components/Form/CountryPicker/examples/Error.tsx +4 -0
- package/src/components/Form/CountryPicker/examples/Form.tsx +23 -0
- package/src/components/Form/CountryPicker/examples/Formik.tsx +39 -0
- package/src/components/Form/CountryPicker/examples/HelperText.tsx +5 -0
- package/src/components/Form/CountryPicker/examples/ReadOnlyInput.tsx +5 -0
- package/src/components/Form/CountryPicker/examples/Shadow.tsx +4 -0
- package/src/components/Form/CountryPicker/examples/Shape.tsx +13 -0
- package/src/components/Form/CountryPicker/examples/SizeInput.tsx +16 -0
- package/src/components/Form/CountryPicker/examples/StylesInput.tsx +19 -0
- package/src/components/Form/CountryPicker/examples/Variant.tsx +13 -0
- package/src/components/Form/CountryPicker/examples/index.ts +12 -0
- package/src/components/Form/CountryPicker/styles.css +7 -0
- package/src/components/Form/DatePicker/DatePicker/DatePicker.props.ts +113 -0
- package/src/components/Form/DatePicker/DatePicker/DatePicker.state.ts +17 -0
- package/src/components/Form/DatePicker/DatePicker/DatePicker.style.ts +17 -0
- package/src/components/Form/DatePicker/DatePicker/DatePicker.type.d.ts +15 -0
- package/src/components/Form/DatePicker/DatePicker/DatePicker.view.tsx +118 -0
- package/src/components/Form/DatePicker/DatePicker.md +115 -0
- package/src/components/Form/DatePicker/DatePicker.tsx +15 -0
- package/src/components/Form/DatePicker/examples/ColorScheme.tsx +12 -0
- package/src/components/Form/DatePicker/examples/Default.tsx +4 -0
- package/src/components/Form/DatePicker/examples/DisabledInput.tsx +5 -0
- package/src/components/Form/DatePicker/examples/ErrorCheckbox.tsx +4 -0
- package/src/components/Form/DatePicker/examples/FormCheckout.tsx +23 -0
- package/src/components/Form/DatePicker/examples/Formik.tsx +35 -0
- package/src/components/Form/DatePicker/examples/ReadOnlyInput.tsx +5 -0
- package/src/components/Form/DatePicker/examples/Shadow.tsx +10 -0
- package/src/components/Form/DatePicker/examples/SizeInput.tsx +16 -0
- package/src/components/Form/DatePicker/examples/StylesInput.tsx +14 -0
- package/src/components/Form/DatePicker/examples/helperTextDatePicker.tsx +6 -0
- package/src/components/Form/DatePicker/examples/index.ts +11 -0
- package/src/components/Form/Label/Label/Label.props.ts +36 -0
- package/src/components/Form/Label/Label/Label.style.ts +35 -0
- package/src/components/Form/Label/Label/Label.type.ts +14 -0
- package/src/components/Form/Label/Label/Label.view.tsx +35 -0
- package/src/components/Form/Label/Label.tsx +8 -0
- package/src/components/Form/Password/Password/Password.props.ts +36 -0
- package/src/components/Form/Password/Password/Password.state.ts +6 -0
- package/src/components/Form/Password/Password/Password.type.d.ts +14 -0
- package/src/components/Form/Password/Password/Password.view.tsx +32 -0
- package/src/components/Form/Password/Password.md +108 -0
- package/src/components/Form/Password/Password.tsx +15 -0
- package/src/components/Form/Password/example/Default.tsx +9 -0
- package/src/components/Form/Password/example/DisabledInput.tsx +17 -0
- package/src/components/Form/Password/example/ErrorInput.tsx +66 -0
- package/src/components/Form/Password/example/FormikErrorInput.tsx +61 -0
- package/src/components/Form/Password/example/FormikHelperText.tsx +65 -0
- package/src/components/Form/Password/example/HelperText.tsx +65 -0
- package/src/components/Form/Select/Select/Select.props.ts +262 -0
- package/src/components/Form/Select/Select/Select.state.ts +19 -0
- package/src/components/Form/Select/Select/Select.style.ts +19 -0
- package/src/components/Form/Select/Select/Select.type.d.ts +15 -0
- package/src/components/Form/Select/Select/Select.view.tsx +342 -0
- package/src/components/Form/Select/Select.md +165 -0
- package/src/components/Form/Select/Select.tsx +16 -0
- package/src/components/Form/Select/examples/Color.tsx +12 -0
- package/src/components/Form/Select/examples/Default.tsx +4 -0
- package/src/components/Form/Select/examples/Disabled.tsx +5 -0
- package/src/components/Form/Select/examples/Error.tsx +4 -0
- package/src/components/Form/Select/examples/Form.tsx +23 -0
- package/src/components/Form/Select/examples/Formik.tsx +41 -0
- package/src/components/Form/Select/examples/HelperText.tsx +7 -0
- package/src/components/Form/Select/examples/Multiple.tsx +6 -0
- package/src/components/Form/Select/examples/ReadOnlyInput.tsx +5 -0
- package/src/components/Form/Select/examples/Shadow.tsx +11 -0
- package/src/components/Form/Select/examples/SizeInput.tsx +16 -0
- package/src/components/Form/Select/examples/StylesInput.tsx +15 -0
- package/src/components/Form/Switch/Switch/Switch.props.ts +91 -0
- package/src/components/Form/Switch/Switch/Switch.state.ts +11 -0
- package/src/components/Form/Switch/Switch/Switch.style.ts +72 -0
- package/src/components/Form/Switch/Switch/Switch.type.d.ts +6 -0
- package/src/components/Form/Switch/Switch/Switch.view.tsx +78 -0
- package/src/components/Form/Switch/Switch.md +148 -0
- package/src/components/Form/Switch/Switch.tsx +12 -0
- package/src/components/Form/Switch/examples/ChildSwitch.tsx +20 -0
- package/src/components/Form/Switch/examples/ColorScheme.tsx +5 -0
- package/src/components/Form/Switch/examples/Default.tsx +4 -0
- package/src/components/Form/Switch/examples/DisabledInput.tsx +7 -0
- package/src/components/Form/Switch/examples/FormSwitch.tsx +22 -0
- package/src/components/Form/Switch/examples/Formik.tsx +30 -0
- package/src/components/Form/Switch/examples/ReadOnlyInput.tsx +7 -0
- package/src/components/Form/Switch/examples/Shadow.tsx +11 -0
- package/src/components/Form/Switch/examples/SizeInput.tsx +21 -0
- package/src/components/Form/Switch/examples/StylesInput.tsx +34 -0
- package/src/components/Form/TextArea/TextArea/TextArea.props.ts +154 -0
- package/src/components/Form/TextArea/TextArea/TextArea.state.ts +21 -0
- package/src/components/Form/TextArea/TextArea/TextArea.type.ts +15 -0
- package/src/components/Form/TextArea/TextArea/TextArea.view.tsx +143 -0
- package/src/components/Form/TextArea/TextArea.md +169 -0
- package/src/components/Form/TextArea/TextArea.tsx +15 -0
- package/src/components/Form/TextArea/examples/ColorScheme.tsx +13 -0
- package/src/components/Form/TextArea/examples/Default.tsx +5 -0
- package/src/components/Form/TextArea/examples/DisabledInput.tsx +7 -0
- package/src/components/Form/TextArea/examples/ErrorInput.tsx +50 -0
- package/src/components/Form/TextArea/examples/FormikErrorInput.tsx +52 -0
- package/src/components/Form/TextArea/examples/FormikHelperText.tsx +51 -0
- package/src/components/Form/TextArea/examples/HelperText.tsx +49 -0
- package/src/components/Form/TextArea/examples/LabelInput.tsx +23 -0
- package/src/components/Form/TextArea/examples/MaxRowCol.tsx +7 -0
- package/src/components/Form/TextArea/examples/Placeholder.tsx +23 -0
- package/src/components/Form/TextArea/examples/ReadOnlyInput.tsx +7 -0
- package/src/components/Form/TextArea/examples/ShadowArea.tsx +28 -0
- package/src/components/Form/TextArea/examples/ShapeInput.tsx +15 -0
- package/src/components/Form/TextArea/examples/SizeInput.tsx +16 -0
- package/src/components/Form/TextArea/examples/StylesInput.tsx +34 -0
- package/src/components/Form/TextArea/examples/VariantsInputs.tsx +15 -0
- package/src/components/Form/TextArea/examples/index.ts +15 -0
- package/src/components/Form/TextArea/styles.css +7 -0
- package/src/components/Form/TextField/TextField/TextField.props.ts +134 -0
- package/src/components/Form/TextField/TextField/TextField.state.ts +21 -0
- package/src/components/Form/TextField/TextField/TextField.type.d.ts +15 -0
- package/src/components/Form/TextField/TextField/TextField.view.tsx +170 -0
- package/src/components/Form/TextField/TextField.md +193 -0
- package/src/components/Form/TextField/TextField.tsx +14 -0
- package/src/components/Form/TextField/examples/ClearInput.tsx +13 -0
- package/src/components/Form/TextField/examples/ColorScheme.tsx +13 -0
- package/src/components/Form/TextField/examples/Default.tsx +23 -0
- package/src/components/Form/TextField/examples/DisabledInput.tsx +7 -0
- package/src/components/Form/TextField/examples/ErrorInput.tsx +74 -0
- package/src/components/Form/TextField/examples/FormikErrorInput.tsx +76 -0
- package/src/components/Form/TextField/examples/FormikHelperText.tsx +62 -0
- package/src/components/Form/TextField/examples/HelperText.tsx +60 -0
- package/src/components/Form/TextField/examples/LabelInput.tsx +23 -0
- package/src/components/Form/TextField/examples/LeftChild.tsx +8 -0
- package/src/components/Form/TextField/examples/Placeholder.tsx +23 -0
- package/src/components/Form/TextField/examples/ReadOnlyInput.tsx +7 -0
- package/src/components/Form/TextField/examples/RightChild.tsx +8 -0
- package/src/components/Form/TextField/examples/ShapeInput.tsx +15 -0
- package/src/components/Form/TextField/examples/SizeInput.tsx +16 -0
- package/src/components/Form/TextField/examples/StylesInput.tsx +35 -0
- package/src/components/Form/TextField/examples/VariantsInputs.tsx +15 -0
- package/src/components/Form/TextField/examples/index.ts +17 -0
- package/src/components/Form/TextField/styles.css +7 -0
- package/src/components/Layout/Center/Center/Center.props.ts +18 -0
- package/src/components/Layout/Center/Center/Center.view.tsx +12 -0
- package/src/components/Layout/Center/Center.md +17 -0
- package/src/components/Layout/Center/Center.tsx +11 -0
- package/src/components/Layout/Horizontal/Horizontal/Horizontal.props.ts +26 -0
- package/src/components/Layout/Horizontal/Horizontal/Horizontal.view.tsx +24 -0
- package/src/components/Layout/Horizontal/Horizontal.md +107 -0
- package/src/components/Layout/Horizontal/Horizontal.tsx +11 -0
- package/src/components/Layout/Horizontal/examples/Default.tsx +11 -0
- package/src/components/Layout/Horizontal/examples/Justify.tsx +25 -0
- package/src/components/Layout/Horizontal/examples/Reversed.tsx +11 -0
- package/src/components/Layout/Horizontal/examples/Wrap.tsx +29 -0
- package/src/components/Layout/Horizontal/examples/index.ts +4 -0
- package/src/components/Layout/Input/FieldContainer/FieldContainer/FieldContainer.props.ts +25 -0
- package/src/components/Layout/Input/FieldContainer/FieldContainer.tsx +17 -0
- package/src/components/Layout/Input/FieldContent/FieldContent/FieldContent.props.ts +75 -0
- package/src/components/Layout/Input/FieldContent/FieldContent.tsx +55 -0
- package/src/components/Layout/Input/FieldIcons/FieldIcons/FieldIcons.props.ts +12 -0
- package/src/components/Layout/Input/FieldIcons/FieldIcons.tsx +19 -0
- package/src/components/Layout/Input/FieldLabel/FieldLabel/FieldLabel.props.ts +31 -0
- package/src/components/Layout/Input/FieldLabel/FieldLabel.tsx +30 -0
- package/src/components/Layout/Input/FieldLayout/FieldLayout/FieldLayout.props.ts +29 -0
- package/src/components/Layout/Input/FieldLayout/FieldLayout.tsx +33 -0
- package/src/components/Layout/Input/FieldWrapper/FieldWrapper.props.ts +12 -0
- package/src/components/Layout/Input/FieldWrapper/FieldWrapper.tsx +11 -0
- package/src/components/Layout/Input/HelperText/HelperText.props.ts +21 -0
- package/src/components/Layout/Input/HelperText/HelperText.tsx +22 -0
- package/src/components/Layout/Input/index.ts +7 -0
- package/src/components/Layout/Vertical/Vertical/Vertical.props.ts +26 -0
- package/src/components/Layout/Vertical/Vertical/Vertical.type.ts +3 -0
- package/src/components/Layout/Vertical/Vertical/Vertical.view.tsx +23 -0
- package/src/components/Layout/Vertical/Vertical.md +120 -0
- package/src/components/Layout/Vertical/Vertical.tsx +12 -0
- package/src/components/Layout/Vertical/examples/Default.tsx +11 -0
- package/src/components/Layout/Vertical/examples/Justify.tsx +26 -0
- package/src/components/Layout/Vertical/examples/Reversed.tsx +11 -0
- package/src/components/Layout/Vertical/examples/Wrap.tsx +30 -0
- package/src/components/Layout/Vertical/examples/index.tsx +5 -0
- package/src/components/Layout/View/View.tsx +2 -0
- package/src/components/Layout/configs/Input.style.ts +45 -0
- package/src/components/Layout/configs/Input.type.ts +18 -0
- package/src/components/Link/Link/Link.props.ts +50 -0
- package/src/components/Link/Link/Link.state.ts +6 -0
- package/src/components/Link/Link/Link.style.ts +14 -0
- package/src/components/Link/Link/Link.type.d.ts +8 -0
- package/src/components/Link/Link/Link.view.tsx +44 -0
- package/src/components/Link/Link.md +61 -0
- package/src/components/Link/Link.tsx +15 -0
- package/src/components/Link/examples/Default.tsx +5 -0
- package/src/components/Link/examples/IsExternal.tsx +10 -0
- package/src/components/Link/examples/Underline.tsx +23 -0
- package/src/components/Loader/Loader/Loader.props.ts +105 -0
- package/src/components/Loader/Loader/Loader.style.ts +25 -0
- package/src/components/Loader/Loader/Loader.type.d.ts +4 -0
- package/src/components/Loader/Loader/Loader.view.tsx +138 -0
- package/src/components/Loader/Loader.md +111 -0
- package/src/components/Loader/Loader.tsx +11 -0
- package/src/components/Loader/examples/ColorLoader.tsx +13 -0
- package/src/components/Loader/examples/DefaultLoader.tsx +4 -0
- package/src/components/Loader/examples/PositionLoader.tsx +19 -0
- package/src/components/Loader/examples/SizeLoader.tsx +12 -0
- package/src/components/Loader/examples/SpeedLoader.tsx +12 -0
- package/src/components/Loader/examples/TextLoader.tsx +8 -0
- package/src/components/Loader/examples/VariantLoader.tsx +12 -0
- package/src/components/Loader/examples/index.ts +7 -0
- package/src/components/Modal/Examples/BlurModal.tsx +38 -0
- package/src/components/Modal/Examples/CloseButtonModal.tsx +44 -0
- package/src/components/Modal/Examples/DefaultModal.tsx +38 -0
- package/src/components/Modal/Examples/FullScreenModal.tsx +28 -0
- package/src/components/Modal/Examples/ModalPosition.tsx +61 -0
- package/src/components/Modal/Examples/PreventCloseModal.tsx +27 -0
- package/src/components/Modal/Examples/ScrollModal.tsx +41 -0
- package/src/components/Modal/Examples/ShadowModal.tsx +29 -0
- package/src/components/Modal/Examples/VariantModal.tsx +48 -0
- package/src/components/Modal/Examples/index.ts +9 -0
- package/src/components/Modal/Modal/Modal.props.ts +202 -0
- package/src/components/Modal/Modal/Modal.style.ts +23 -0
- package/src/components/Modal/Modal/Modal.type.d.ts +7 -0
- package/src/components/Modal/Modal/Modal.view.tsx +169 -0
- package/src/components/Modal/Modal.md +509 -0
- package/src/components/Modal/Modal.tsx +18 -0
- package/src/components/Svg/ArrowDown.tsx +32 -0
- package/src/components/Svg/ArrowUp.tsx +32 -0
- package/src/components/Svg/Check.tsx +28 -0
- package/src/components/Svg/Close.tsx +31 -0
- package/src/components/Svg/CloseEye.tsx +26 -0
- package/src/components/Svg/DustBin.tsx +29 -0
- package/src/components/Svg/Edit.tsx +34 -0
- package/src/components/Svg/ExternalLink.tsx +31 -0
- package/src/components/Svg/Indeterminate.tsx +21 -0
- package/src/components/Svg/OpenEye.tsx +26 -0
- package/src/components/Svg/Profile.tsx +40 -0
- package/src/components/Svg/RightArrow.tsx +44 -0
- package/src/components/Svg/index.tsx +12 -0
- package/src/components/Text/Text/Text.props.ts +84 -0
- package/src/components/Text/Text/Text.style.ts +34 -0
- package/src/components/Text/Text/Text.type.d.ts +14 -0
- package/src/components/Text/Text/Text.view.tsx +96 -0
- package/src/components/Text/Text.md +163 -0
- package/src/components/Text/Text.tsx +13 -0
- package/src/components/Wrapper.tsx +19 -0
- package/src/components/index.tsx +18 -0
|
@@ -0,0 +1,193 @@
|
|
|
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
|
+
```
|
|
@@ -0,0 +1,14 @@
|
|
|
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;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,76 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
};
|