@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,154 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { Shadow } from 'app-studio';
|
|
3
|
+
import { Elevation } from 'src/utils/elevation';
|
|
4
|
+
|
|
5
|
+
import { Shape, Size, TextAreaStyles, Variant } from './TextArea.type';
|
|
6
|
+
|
|
7
|
+
export interface TextAreaProps {
|
|
8
|
+
/**
|
|
9
|
+
* Changes the label and border color of the input field.
|
|
10
|
+
*/
|
|
11
|
+
colorScheme?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Sets the initial value of the textarea.
|
|
14
|
+
*/
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Specifies whether the input field should display an error state.
|
|
18
|
+
*/
|
|
19
|
+
error?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Specifies whether the text input is editable or not for iOS and Android.
|
|
22
|
+
*/
|
|
23
|
+
isEditable?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Provides additional information about the input field.
|
|
26
|
+
*/
|
|
27
|
+
helperText?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The input field identifier.
|
|
30
|
+
*/
|
|
31
|
+
id?: string;
|
|
32
|
+
/**
|
|
33
|
+
* Specifies whether the input field is read-only and cannot be edited.
|
|
34
|
+
*/
|
|
35
|
+
isReadOnly?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Specifies whether the input field is disabled and cannot be interacted with.
|
|
38
|
+
*/
|
|
39
|
+
isDisabled?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Specifies whether the input field should be automatically focused.
|
|
42
|
+
*/
|
|
43
|
+
isAutoFocus?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Specifies whether the input field should allow multiple lines of text.
|
|
46
|
+
*/
|
|
47
|
+
isMultiline?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Displays a label above the user input.
|
|
50
|
+
*/
|
|
51
|
+
label?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Specifies the maximum number of rows that the textarea should display.
|
|
54
|
+
*/
|
|
55
|
+
maxRows?: number;
|
|
56
|
+
/**
|
|
57
|
+
* Specifies the maximum number of columns that the textarea should display.
|
|
58
|
+
*/
|
|
59
|
+
maxCols?: number;
|
|
60
|
+
/**
|
|
61
|
+
* The name of the input field.
|
|
62
|
+
*/
|
|
63
|
+
name: string;
|
|
64
|
+
/**
|
|
65
|
+
* Placeholder text to display in the input field until the user enters text.
|
|
66
|
+
*/
|
|
67
|
+
placeholder?: string;
|
|
68
|
+
/**
|
|
69
|
+
* Handler function called when the input field value changes.
|
|
70
|
+
*/
|
|
71
|
+
onChange?: (value: any) => void;
|
|
72
|
+
/**
|
|
73
|
+
* Handler function called when the input field value changes for iOS and Android.
|
|
74
|
+
*/
|
|
75
|
+
onChangeText?: (text: string) => void;
|
|
76
|
+
/**
|
|
77
|
+
* Callback function triggered when the field loses focus.
|
|
78
|
+
*/
|
|
79
|
+
onBlur?: (value: any) => void;
|
|
80
|
+
/**
|
|
81
|
+
* Callback function called when the text input receives focus.
|
|
82
|
+
*/
|
|
83
|
+
onFocus?: () => void;
|
|
84
|
+
/**
|
|
85
|
+
* Sets the text size and padding of the input field.
|
|
86
|
+
*/
|
|
87
|
+
size?: Size;
|
|
88
|
+
/**
|
|
89
|
+
* Applies a shadow effect to the input field.
|
|
90
|
+
*/
|
|
91
|
+
shadow?: Shadow | Elevation | CSSProperties;
|
|
92
|
+
/**
|
|
93
|
+
* Changes the shape or outline of the input field.
|
|
94
|
+
*/
|
|
95
|
+
shape?: Shape;
|
|
96
|
+
/**
|
|
97
|
+
* CSS styles for the input container and field.
|
|
98
|
+
*/
|
|
99
|
+
styles?: TextAreaStyles;
|
|
100
|
+
/**
|
|
101
|
+
* The default value of the input field.
|
|
102
|
+
*/
|
|
103
|
+
value?: string | number;
|
|
104
|
+
/**
|
|
105
|
+
* Changes the style variant of the input field.
|
|
106
|
+
*/
|
|
107
|
+
variant?: Variant;
|
|
108
|
+
/**
|
|
109
|
+
* Additional properties for customization and extension.
|
|
110
|
+
*/
|
|
111
|
+
[x: string]: any;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface TextAreaViewProps extends TextAreaProps {
|
|
115
|
+
/**
|
|
116
|
+
* The hint text displayed in the textarea.
|
|
117
|
+
*/
|
|
118
|
+
hint?: string;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Callback prop to update the hint text.
|
|
122
|
+
*/
|
|
123
|
+
setHint?: Function;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Prop indicating if the textarea is being hovered.
|
|
127
|
+
*/
|
|
128
|
+
isHovered?: boolean;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Callback prop to update the hover state of the textarea.
|
|
132
|
+
*/
|
|
133
|
+
setIsHovered?: Function;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* The current value of the textarea input.
|
|
137
|
+
*/
|
|
138
|
+
inputValue?: string | number;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Callback prop to update the value of the textarea input.
|
|
142
|
+
*/
|
|
143
|
+
setInputValue?: Function;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Prop indicating if the textarea is currently focused.
|
|
147
|
+
*/
|
|
148
|
+
isFocused?: boolean;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Callback prop to update the focus state of the textarea.
|
|
152
|
+
*/
|
|
153
|
+
setIsFocused?: Function;
|
|
154
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { TextAreaProps } from './TextArea.props';
|
|
4
|
+
|
|
5
|
+
export const useTextAreaState = ({ label, placeholder, defaultValue, value }: TextAreaProps) => {
|
|
6
|
+
const [hint, setHint] = useState(label ?? placeholder);
|
|
7
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
8
|
+
const [inputValue, setInputValue] = useState(value || defaultValue || '');
|
|
9
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
hint,
|
|
13
|
+
setHint,
|
|
14
|
+
isHovered,
|
|
15
|
+
setIsHovered,
|
|
16
|
+
inputValue,
|
|
17
|
+
setInputValue,
|
|
18
|
+
isFocused,
|
|
19
|
+
setIsFocused,
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
export type Variant = 'outline' | 'default' | 'unStyled';
|
|
4
|
+
|
|
5
|
+
export type Shape = 'default' | 'sharp' | 'rounded';
|
|
6
|
+
|
|
7
|
+
export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
8
|
+
|
|
9
|
+
export type TextAreaStyles = {
|
|
10
|
+
box?: CSSProperties;
|
|
11
|
+
text?: CSSProperties;
|
|
12
|
+
label?: CSSProperties;
|
|
13
|
+
helperText?: CSSProperties;
|
|
14
|
+
field?: CSSProperties;
|
|
15
|
+
};
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { Element,Typography } from 'app-studio';
|
|
3
|
+
import { FieldContainer, FieldContent, FieldLabel, FieldWrapper } from 'src/components/Layout/Input';
|
|
4
|
+
|
|
5
|
+
import { TextAreaViewProps } from './TextArea.props';
|
|
6
|
+
|
|
7
|
+
const TextAreaView: React.FC<TextAreaViewProps> = ({
|
|
8
|
+
id,
|
|
9
|
+
name,
|
|
10
|
+
hint,
|
|
11
|
+
error,
|
|
12
|
+
value,
|
|
13
|
+
label,
|
|
14
|
+
shadow,
|
|
15
|
+
inputValue,
|
|
16
|
+
helperText,
|
|
17
|
+
placeholder,
|
|
18
|
+
defaultValue,
|
|
19
|
+
size = 'sm',
|
|
20
|
+
shape = 'default',
|
|
21
|
+
variant = 'default',
|
|
22
|
+
colorScheme = 'theme.primary',
|
|
23
|
+
isHovered = false,
|
|
24
|
+
isFocused = false,
|
|
25
|
+
isEditable = false,
|
|
26
|
+
isReadOnly = false,
|
|
27
|
+
isDisabled = false,
|
|
28
|
+
isAutoFocus = false,
|
|
29
|
+
isMultiline = false,
|
|
30
|
+
maxRows = 3,
|
|
31
|
+
maxCols = 30,
|
|
32
|
+
onBlur = () => {},
|
|
33
|
+
onChange,
|
|
34
|
+
onFocus,
|
|
35
|
+
onChangeText,
|
|
36
|
+
setHint = () => {},
|
|
37
|
+
setInputValue = () => {},
|
|
38
|
+
setIsFocused = () => {},
|
|
39
|
+
setIsHovered = () => {},
|
|
40
|
+
styles = { box: {}, text: {}, label: {}, helperText: {}, field: {} },
|
|
41
|
+
...props
|
|
42
|
+
}) => {
|
|
43
|
+
const isWithLabel = !!(isFocused && label);
|
|
44
|
+
|
|
45
|
+
useMemo(() => {
|
|
46
|
+
setHint(isFocused && !inputValue ? placeholder ?? '' : label ?? placeholder);
|
|
47
|
+
}, [inputValue, isFocused, label, placeholder]);
|
|
48
|
+
|
|
49
|
+
const fieldStyles = {
|
|
50
|
+
margin: 0,
|
|
51
|
+
paddingVertical: 8,
|
|
52
|
+
paddingHorizontal: 0,
|
|
53
|
+
width: '100%',
|
|
54
|
+
heigth: '100%',
|
|
55
|
+
border: 'none',
|
|
56
|
+
on: {
|
|
57
|
+
focus: {
|
|
58
|
+
outline: 'none',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
fontSize: Typography.fontSizes[size],
|
|
62
|
+
backgroundColor: 'transparent',
|
|
63
|
+
color: isDisabled ? 'trueGray.600' : 'blueGray.700',
|
|
64
|
+
cursor: isDisabled ? 'not-allowed' : 'auto',
|
|
65
|
+
...styles['field'],
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
const handleHover = () => setIsHovered(!isHovered);
|
|
69
|
+
const handleFocus = () => {
|
|
70
|
+
setIsFocused(true);
|
|
71
|
+
if (onFocus) onFocus();
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
const handleBlur = (event: any) => {
|
|
75
|
+
onBlur(event);
|
|
76
|
+
setIsFocused(false);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const handleChange = (event: React.ChangeEvent<HTMLInputElement> | string) => {
|
|
80
|
+
if (typeof event === 'string') {
|
|
81
|
+
//for ios and android
|
|
82
|
+
setInputValue(event);
|
|
83
|
+
if (onChangeText) onChangeText(event);
|
|
84
|
+
} else {
|
|
85
|
+
setInputValue(event.target.value);
|
|
86
|
+
if (onChange) onChange(event);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
return (
|
|
91
|
+
<FieldContainer helperText={helperText} error={error} styles={styles}>
|
|
92
|
+
<FieldContent
|
|
93
|
+
label={label}
|
|
94
|
+
size={size}
|
|
95
|
+
error={error}
|
|
96
|
+
shape={shape}
|
|
97
|
+
styles={styles}
|
|
98
|
+
shadow={shadow}
|
|
99
|
+
variant={variant}
|
|
100
|
+
value={inputValue}
|
|
101
|
+
color={colorScheme}
|
|
102
|
+
isHovered={isHovered}
|
|
103
|
+
isDisabled={isDisabled}
|
|
104
|
+
isReadOnly={isReadOnly}
|
|
105
|
+
isFocused={isFocused}
|
|
106
|
+
isWithLabel={isWithLabel}
|
|
107
|
+
colorScheme={colorScheme}
|
|
108
|
+
onMouseEnter={handleHover}
|
|
109
|
+
onMouseLeave={handleHover}
|
|
110
|
+
>
|
|
111
|
+
<FieldWrapper>
|
|
112
|
+
{isWithLabel && (
|
|
113
|
+
<FieldLabel htmlFor={id} color={colorScheme} error={error} {...styles}>
|
|
114
|
+
{label}
|
|
115
|
+
</FieldLabel>
|
|
116
|
+
)}
|
|
117
|
+
<Element
|
|
118
|
+
as="textarea"
|
|
119
|
+
id={id}
|
|
120
|
+
name={name}
|
|
121
|
+
rows={maxRows}
|
|
122
|
+
cols={maxCols}
|
|
123
|
+
value={inputValue}
|
|
124
|
+
readOnly={isReadOnly}
|
|
125
|
+
disabled={isDisabled}
|
|
126
|
+
autoFocus={isAutoFocus}
|
|
127
|
+
editable={isEditable}
|
|
128
|
+
placeholder={hint}
|
|
129
|
+
onBlur={handleBlur}
|
|
130
|
+
onFocus={handleFocus}
|
|
131
|
+
onChange={handleChange}
|
|
132
|
+
multiline={isMultiline}
|
|
133
|
+
{...fieldStyles}
|
|
134
|
+
{...props}
|
|
135
|
+
{...(onChangeText && { onChangeText: handleChange })}
|
|
136
|
+
/>
|
|
137
|
+
</FieldWrapper>
|
|
138
|
+
</FieldContent>
|
|
139
|
+
</FieldContainer>
|
|
140
|
+
);
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export default TextAreaView;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
### **Import**
|
|
2
|
+
|
|
3
|
+
```tsx static
|
|
4
|
+
import { TextArea } from "app-studio";
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
### **Default**
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
<TextArea />
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### **Default Value**
|
|
14
|
+
|
|
15
|
+
“**_defaultValue_**” it sets the initial value of the textarea.
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<TextArea defaultValue="Write your thougts here..." />
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### **Disabled**
|
|
22
|
+
|
|
23
|
+
“**_isDisabled_**” makes the text area unusable.
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
<TextArea isDisabled />
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
-
|
|
30
|
+
|
|
31
|
+
### **Read Only**
|
|
32
|
+
|
|
33
|
+
“**_isReadOnly_**” makes the input field readable but not writable. Can only read the element.
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
<TextArea isReadOnly />
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### **Variants**
|
|
40
|
+
|
|
41
|
+
“**_variant_**” changed the text area styles. It has a default value of “default”.
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
import { Vertical } from "../../Layout/Vertical/Vertical";
|
|
45
|
+
|
|
46
|
+
<Vertical gap={10} width="300px">
|
|
47
|
+
{["default", "outline", "unStyled"].map((variant, index) => (
|
|
48
|
+
<TextArea
|
|
49
|
+
key={index}
|
|
50
|
+
name={variant}
|
|
51
|
+
placeholder={variant}
|
|
52
|
+
variant={variant}
|
|
53
|
+
/>
|
|
54
|
+
))}
|
|
55
|
+
</Vertical>;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### **Label**
|
|
59
|
+
|
|
60
|
+
“**_label_**” adds a label above the input field.
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
<TextArea name="label" label="Label" />
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### **Shadow**
|
|
67
|
+
|
|
68
|
+
“**_shadow_**” adds a shadow effect to the text field.
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
<TextArea
|
|
72
|
+
name="surname"
|
|
73
|
+
label="Surname"
|
|
74
|
+
shadow={{ boxShadow: "rgba(0, 0, 0, 0.20) 0px 3px 8px" }}
|
|
75
|
+
/>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### **ColorScheme**
|
|
79
|
+
|
|
80
|
+
“**_colorScheme_**” changes the label and border color .
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
import { Vertical } from "../../Layout/Vertical/Vertical";
|
|
84
|
+
|
|
85
|
+
<Vertical gap={10}>
|
|
86
|
+
<TextArea name="surname" label="Surname" colorScheme="theme.secondary" />
|
|
87
|
+
<TextArea name="name" label="Name" colorScheme="theme.primary" variant="outline" />
|
|
88
|
+
</Vertical>;
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### **Styles**
|
|
92
|
+
|
|
93
|
+
“**_styles_**” changes the the style of the container, field and label.
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
<TextArea
|
|
97
|
+
name="surname"
|
|
98
|
+
label="Surname"
|
|
99
|
+
variant="unStyled"
|
|
100
|
+
styles={{
|
|
101
|
+
box: { borderRadius: 8, padding: 5, borderColor: 'theme.primary',
|
|
102
|
+
borderStyle: 'solid',
|
|
103
|
+
borderWidth: 1, },
|
|
104
|
+
field: { color: "theme.primary" , padding: 0 },
|
|
105
|
+
label: { color: "theme.primary" },
|
|
106
|
+
}}
|
|
107
|
+
/>
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
### **Error**
|
|
111
|
+
|
|
112
|
+
“**_error_**” if true, indicates that the text field value failed the validation criteria.
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
<TextArea error />
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### **HelperText**
|
|
119
|
+
|
|
120
|
+
“**_helperText_**” is a string text used to inform the user that the content of the field is invalid.
|
|
121
|
+
|
|
122
|
+
```tsx
|
|
123
|
+
<TextArea error helperText="Enter thoughts!" />
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### **Types**
|
|
127
|
+
|
|
128
|
+
```tsx static
|
|
129
|
+
type Variant = "outline" | "default" | "unStyled";
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
```tsx static
|
|
133
|
+
type Shape = "default" | "sharp" | "rounded";
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
```tsx static
|
|
137
|
+
type Size =
|
|
138
|
+
| "xs"
|
|
139
|
+
| "sm"
|
|
140
|
+
| "md"
|
|
141
|
+
| "lg"
|
|
142
|
+
| "xl"
|
|
143
|
+
| "2xl"
|
|
144
|
+
| "3xl"
|
|
145
|
+
| "4xl"
|
|
146
|
+
| "5xl"
|
|
147
|
+
| "6xl";
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
```tsx static
|
|
151
|
+
type TextFieldStyles = {
|
|
152
|
+
box?: CSSProperties;
|
|
153
|
+
text?: CSSProperties;
|
|
154
|
+
label?: CSSProperties;
|
|
155
|
+
helperText?: CSSProperties;
|
|
156
|
+
field?: CSSProperties;
|
|
157
|
+
};
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### **Default Values**
|
|
161
|
+
|
|
162
|
+
```tsx static
|
|
163
|
+
const Shapes: Record<Shape, number | string> = {
|
|
164
|
+
default: "6px 6px 0 0",
|
|
165
|
+
sharp: 0,
|
|
166
|
+
rounded: 4,
|
|
167
|
+
pillShaped: 24,
|
|
168
|
+
};
|
|
169
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { TextAreaProps } from './TextArea/TextArea.props';
|
|
4
|
+
import { useTextAreaState } from './TextArea/TextArea.state';
|
|
5
|
+
import TextAreaView from './TextArea/TextArea.view';
|
|
6
|
+
|
|
7
|
+
const TextAreaComponent: React.FC<TextAreaProps> = (props) => {
|
|
8
|
+
const textAreaState = useTextAreaState(props);
|
|
9
|
+
return <TextAreaView {...textAreaState} {...props} />;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Text Area is an component used to create a multi-line input field.
|
|
14
|
+
*/
|
|
15
|
+
export const TextArea = TextAreaComponent;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
3
|
+
|
|
4
|
+
import { TextArea } from '../TextArea';
|
|
5
|
+
|
|
6
|
+
export const ColorArea = () => {
|
|
7
|
+
return (
|
|
8
|
+
<Vertical gap={10}>
|
|
9
|
+
<TextArea name="surname" label="Surname" colorScheme="theme.secondary" />
|
|
10
|
+
<TextArea name="name" label="Name" colorScheme="theme.primary" variant="outline" />
|
|
11
|
+
</Vertical>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Button } from 'src/components';
|
|
4
|
+
import { TextArea } from 'src/components';
|
|
5
|
+
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
6
|
+
|
|
7
|
+
export const ErrorArea = () => {
|
|
8
|
+
const initialValues = {
|
|
9
|
+
thoughts: '',
|
|
10
|
+
};
|
|
11
|
+
const [formValues, setFormValues] = useState(initialValues);
|
|
12
|
+
const [formErrors, setFormErrors] = useState(initialValues);
|
|
13
|
+
|
|
14
|
+
const validate = (values: any) => {
|
|
15
|
+
const errors: any = {};
|
|
16
|
+
|
|
17
|
+
if (!values.thoughts) {
|
|
18
|
+
errors.thoughts = 'Required';
|
|
19
|
+
}
|
|
20
|
+
setFormErrors(errors);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const handleChange = (event: any) => {
|
|
24
|
+
setFormValues({ ...formValues, [event.target.name]: event.target.value });
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const handleSubmit = (event: any) => {
|
|
28
|
+
event.preventDefault();
|
|
29
|
+
validate(formValues);
|
|
30
|
+
if (Object.values(formErrors).length === 0) {
|
|
31
|
+
alert(formValues.thoughts);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
return (
|
|
35
|
+
<form onSubmit={handleSubmit}>
|
|
36
|
+
<Vertical gap={10}>
|
|
37
|
+
<TextArea
|
|
38
|
+
name="thoughts"
|
|
39
|
+
placeholder="Write your thoughts here..."
|
|
40
|
+
error={!!formErrors.thoughts}
|
|
41
|
+
onChange={handleChange}
|
|
42
|
+
colorScheme="theme.secondary"
|
|
43
|
+
/>
|
|
44
|
+
<Button type="submit" height="40px" isAuto>
|
|
45
|
+
Submit
|
|
46
|
+
</Button>
|
|
47
|
+
</Vertical>
|
|
48
|
+
</form>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Field, Form, Formik } from 'formik';
|
|
3
|
+
import { Button } from 'src/components';
|
|
4
|
+
import { TextArea } from 'src/components';
|
|
5
|
+
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
6
|
+
|
|
7
|
+
export const FormikErrorArea = () => {
|
|
8
|
+
const initialValues = {
|
|
9
|
+
thoughts: '',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const validate = (values: any) => {
|
|
13
|
+
const errors: any = {};
|
|
14
|
+
|
|
15
|
+
if (!values.thoughts) {
|
|
16
|
+
errors.thoughts = 'Required';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return errors;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Formik
|
|
24
|
+
initialValues={initialValues}
|
|
25
|
+
validate={validate}
|
|
26
|
+
onSubmit={(values, { setSubmitting }) => {
|
|
27
|
+
setTimeout(() => {
|
|
28
|
+
alert(JSON.stringify(values, null, 2));
|
|
29
|
+
setSubmitting(false);
|
|
30
|
+
}, 400);
|
|
31
|
+
}}
|
|
32
|
+
>
|
|
33
|
+
{({ touched, isSubmitting }) => (
|
|
34
|
+
<Form>
|
|
35
|
+
<Vertical gap={10}>
|
|
36
|
+
<Field
|
|
37
|
+
as={TextArea}
|
|
38
|
+
name="thoughts"
|
|
39
|
+
placeholder="Write your thoughts here..."
|
|
40
|
+
error={touched.thoughts}
|
|
41
|
+
colorScheme="theme.secondary"
|
|
42
|
+
/>
|
|
43
|
+
|
|
44
|
+
<Button type="submit" isDisabled={isSubmitting}>
|
|
45
|
+
Submit
|
|
46
|
+
</Button>
|
|
47
|
+
</Vertical>
|
|
48
|
+
</Form>
|
|
49
|
+
)}
|
|
50
|
+
</Formik>
|
|
51
|
+
);
|
|
52
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Field, Form, Formik } from 'formik';
|
|
3
|
+
import { Button } from 'src/components';
|
|
4
|
+
import { TextArea } from 'src/components';
|
|
5
|
+
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
6
|
+
|
|
7
|
+
export const FormikHelperTextArea = () => {
|
|
8
|
+
const initialValues = {
|
|
9
|
+
thoughts: '',
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
const validate = (values: any) => {
|
|
13
|
+
const errors: any = {};
|
|
14
|
+
|
|
15
|
+
if (!values.thoughts) {
|
|
16
|
+
errors.thoughts = 'Required';
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return errors;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<Formik
|
|
24
|
+
initialValues={initialValues}
|
|
25
|
+
validate={validate}
|
|
26
|
+
onSubmit={(values, { setSubmitting }) => {
|
|
27
|
+
setTimeout(() => {
|
|
28
|
+
alert(JSON.stringify(values, null, 2));
|
|
29
|
+
setSubmitting(false);
|
|
30
|
+
}, 400);
|
|
31
|
+
}}
|
|
32
|
+
>
|
|
33
|
+
{({ errors, touched, isSubmitting }) => (
|
|
34
|
+
<Form>
|
|
35
|
+
<Vertical gap={10}>
|
|
36
|
+
<Field
|
|
37
|
+
as={TextArea}
|
|
38
|
+
name="thoughts"
|
|
39
|
+
placeholder="Write here..."
|
|
40
|
+
error={touched.thoughts && errors.thoughts}
|
|
41
|
+
helperText={touched.thoughts && errors.thoughts}
|
|
42
|
+
/>
|
|
43
|
+
<Button type="submit" isDisabled={isSubmitting}>
|
|
44
|
+
Submit
|
|
45
|
+
</Button>
|
|
46
|
+
</Vertical>
|
|
47
|
+
</Form>
|
|
48
|
+
)}
|
|
49
|
+
</Formik>
|
|
50
|
+
);
|
|
51
|
+
};
|