@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,169 @@
|
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
|
+
import { Center, Vertical } from 'src/components';
|
|
3
|
+
import { Horizontal } from 'src/components';
|
|
4
|
+
import { Button } from 'src/components';
|
|
5
|
+
import { View } from 'src/components/Layout/View/View';
|
|
6
|
+
import { CloseSvg } from 'src/components/Svg';
|
|
7
|
+
import { useModalStore } from 'src/store/useModalStore';
|
|
8
|
+
|
|
9
|
+
import { BodyProps, ContainerProps, FooterProps, HeaderProps, OverlayProps } from '../Modal/Modal.props';
|
|
10
|
+
import { ContainerShapes, OverlayAlignments } from '../Modal/Modal.style';
|
|
11
|
+
import { HeaderIconSizes } from '../Modal/Modal.style';
|
|
12
|
+
|
|
13
|
+
export const ModalOverlay: React.FC<OverlayProps> = ({
|
|
14
|
+
children,
|
|
15
|
+
blur,
|
|
16
|
+
isOpen = false,
|
|
17
|
+
isClosePrevented = false,
|
|
18
|
+
onClose = () => {},
|
|
19
|
+
position = 'center',
|
|
20
|
+
...props
|
|
21
|
+
}) => {
|
|
22
|
+
const setOpen = useModalStore((state: any) => state.setOpen);
|
|
23
|
+
const setOnClose = useModalStore((state: any) => state.setOnClose);
|
|
24
|
+
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
setOnClose(onClose);
|
|
27
|
+
if (isOpen) setOpen();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
if (!isOpen) return null;
|
|
31
|
+
|
|
32
|
+
const handleClick = () => {
|
|
33
|
+
if (!isClosePrevented) onClose();
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<Center
|
|
38
|
+
position="fixed"
|
|
39
|
+
top={0}
|
|
40
|
+
left={0}
|
|
41
|
+
width="100%"
|
|
42
|
+
height="100%"
|
|
43
|
+
zIndex={1000}
|
|
44
|
+
onPress={handleClick}
|
|
45
|
+
visibility={isOpen ? 'visible' : 'hidden'}
|
|
46
|
+
>
|
|
47
|
+
<View
|
|
48
|
+
cursor="pointer"
|
|
49
|
+
position="absolute"
|
|
50
|
+
top={0}
|
|
51
|
+
left={0}
|
|
52
|
+
zIndex={1000}
|
|
53
|
+
width="100vw"
|
|
54
|
+
height="100vh"
|
|
55
|
+
display="flex"
|
|
56
|
+
backgroundColor="blackAlpha.500"
|
|
57
|
+
backdropFilter={blur ? `blur(${blur}px)` : undefined}
|
|
58
|
+
onPress={handleClick}
|
|
59
|
+
{...OverlayAlignments[position]}
|
|
60
|
+
{...props}
|
|
61
|
+
>
|
|
62
|
+
{children}
|
|
63
|
+
</View>
|
|
64
|
+
</Center>
|
|
65
|
+
);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const ModalContainer: React.FC<ContainerProps> = ({
|
|
69
|
+
children,
|
|
70
|
+
shadow,
|
|
71
|
+
isFullScreen = false,
|
|
72
|
+
shape = 'rounded',
|
|
73
|
+
...props
|
|
74
|
+
}) => {
|
|
75
|
+
const defaultShadow =
|
|
76
|
+
typeof document !== undefined
|
|
77
|
+
? {
|
|
78
|
+
boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.3)',
|
|
79
|
+
}
|
|
80
|
+
: {
|
|
81
|
+
elevation: 5,
|
|
82
|
+
shadowColor: 'rgba(0, 0, 0, 0.3)',
|
|
83
|
+
shadowOffset: { width: 0, height: 2 },
|
|
84
|
+
shadowOpacity: 1,
|
|
85
|
+
shadowRadius: 8,
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const handleClick = (event: any) => event.stopPropagation();
|
|
89
|
+
return (
|
|
90
|
+
<Vertical
|
|
91
|
+
cursor="default"
|
|
92
|
+
overflow="hidden"
|
|
93
|
+
backgroundColor="white"
|
|
94
|
+
width={isFullScreen ? '100%' : 600}
|
|
95
|
+
height={isFullScreen ? '100%' : 'fit-content'}
|
|
96
|
+
onPress={handleClick}
|
|
97
|
+
{...(shadow ? shadow : defaultShadow)}
|
|
98
|
+
{...ContainerShapes[shape]}
|
|
99
|
+
{...props}
|
|
100
|
+
>
|
|
101
|
+
{children}
|
|
102
|
+
</Vertical>
|
|
103
|
+
);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
export const ModalHeader: React.FC<HeaderProps> = ({
|
|
107
|
+
children,
|
|
108
|
+
buttonColor = 'theme.primary',
|
|
109
|
+
iconSize = 'md',
|
|
110
|
+
buttonPosition = 'right',
|
|
111
|
+
...props
|
|
112
|
+
}) => {
|
|
113
|
+
const onClose = useModalStore((state: any) => state.onClose);
|
|
114
|
+
|
|
115
|
+
const buttonIcon = (
|
|
116
|
+
<Button
|
|
117
|
+
onPress={onClose}
|
|
118
|
+
colorScheme="transparent"
|
|
119
|
+
icon={<CloseSvg size={HeaderIconSizes[iconSize]} color={buttonColor} />}
|
|
120
|
+
padding={0}
|
|
121
|
+
margin={0}
|
|
122
|
+
filter="none"
|
|
123
|
+
isAuto
|
|
124
|
+
/>
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<Horizontal
|
|
129
|
+
justifyContent={buttonPosition === 'none' ? 'center' : 'space-between'}
|
|
130
|
+
alignItems="center"
|
|
131
|
+
paddingVertical={15}
|
|
132
|
+
paddingHorizontal={20}
|
|
133
|
+
{...props}
|
|
134
|
+
>
|
|
135
|
+
{buttonPosition === 'left' && buttonIcon}
|
|
136
|
+
{children}
|
|
137
|
+
{buttonPosition === 'right' && buttonIcon}
|
|
138
|
+
</Horizontal>
|
|
139
|
+
);
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
export const ModalBody: React.FC<BodyProps> = ({ children, ...props }) => {
|
|
143
|
+
const defaultBorder = {
|
|
144
|
+
borderBottomWidth: 2,
|
|
145
|
+
borderTopWidth: 2,
|
|
146
|
+
borderColor: 'rgba(250, 250, 250, 1)',
|
|
147
|
+
borderStyle: 'solid',
|
|
148
|
+
};
|
|
149
|
+
return (
|
|
150
|
+
<View overflowY="auto" paddingVertical={15} paddingHorizontal={20} {...defaultBorder} {...props}>
|
|
151
|
+
{children}
|
|
152
|
+
</View>
|
|
153
|
+
);
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
export const ModalFooter: React.FC<FooterProps> = ({ children, ...props }) => {
|
|
157
|
+
return (
|
|
158
|
+
<Horizontal
|
|
159
|
+
marginTop="auto"
|
|
160
|
+
alignItems="center"
|
|
161
|
+
justifyContent="flex-end"
|
|
162
|
+
paddingVertical={15}
|
|
163
|
+
paddingHorizontal={20}
|
|
164
|
+
{...props}
|
|
165
|
+
>
|
|
166
|
+
{children}
|
|
167
|
+
</Horizontal>
|
|
168
|
+
);
|
|
169
|
+
};
|
|
@@ -0,0 +1,509 @@
|
|
|
1
|
+
### **Import**
|
|
2
|
+
|
|
3
|
+
```tsx static
|
|
4
|
+
import { Modal } from 'app-studio';
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
### **Default**
|
|
8
|
+
|
|
9
|
+
It uses the isOpen and onClose properties to display the modal.
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import { Button } from '../Button/Button';
|
|
13
|
+
import { useState } from 'react';
|
|
14
|
+
|
|
15
|
+
const [show, setShow] = useState(false);
|
|
16
|
+
|
|
17
|
+
<>
|
|
18
|
+
<Button onPress={() => setShow(true)} isAuto>
|
|
19
|
+
Open Modal
|
|
20
|
+
</Button>
|
|
21
|
+
<Modal.Overlay isOpen={show} onClose={() => setShow(false)}>
|
|
22
|
+
<Modal.Container>
|
|
23
|
+
<Modal.Header>Title</Modal.Header>
|
|
24
|
+
<Modal.Body>
|
|
25
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
26
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
27
|
+
nisl consectetur et.
|
|
28
|
+
</Modal.Body>
|
|
29
|
+
<Modal.Footer>
|
|
30
|
+
<Button onPress={() => setShow(false)}>Cancel</Button>
|
|
31
|
+
</Modal.Footer>
|
|
32
|
+
</Modal.Container>
|
|
33
|
+
</Modal.Overlay>
|
|
34
|
+
</>;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## **Modal Overlay**
|
|
38
|
+
|
|
39
|
+
It represents the overlay or backdrop that appears behind the modal content when the modal is displayed.
|
|
40
|
+
|
|
41
|
+
### **FullScreen**
|
|
42
|
+
|
|
43
|
+
“**is*fullScreen***” property changes the width and height of the modal so that it fits the entire screen.
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import { Button } from '../Button/Button';
|
|
47
|
+
import { useState } from 'react';
|
|
48
|
+
|
|
49
|
+
const [show, setShow] = useState(false);
|
|
50
|
+
|
|
51
|
+
<>
|
|
52
|
+
<Button onPress={() => setShow(true)} isAuto>
|
|
53
|
+
Full Screen
|
|
54
|
+
</Button>
|
|
55
|
+
<Modal.Overlay isOpen={show} onClose={() => setShow(false)}>
|
|
56
|
+
<Modal.Container isFullScreen>
|
|
57
|
+
<Modal.Header>Title</Modal.Header>
|
|
58
|
+
<Modal.Body>
|
|
59
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
60
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
61
|
+
nisl consectetur et.
|
|
62
|
+
</Modal.Body>
|
|
63
|
+
<Modal.Footer>
|
|
64
|
+
<Button onPress={() => setShow(false)}>Cancel</Button>
|
|
65
|
+
</Modal.Footer>
|
|
66
|
+
</Modal.Container>
|
|
67
|
+
</Modal.Overlay>
|
|
68
|
+
</>;
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### **Position**
|
|
72
|
+
|
|
73
|
+
“**_position_**” places the modal in the specified direction. It has a default positioning of “center”.
|
|
74
|
+
|
|
75
|
+
```tsx
|
|
76
|
+
import { useState } from 'react';
|
|
77
|
+
import { Button } from '../Button/Button';
|
|
78
|
+
import { Horizontal } from '../Layout/Horizontal/Horizontal';
|
|
79
|
+
|
|
80
|
+
const [showTop, setShowTop] = useState(false);
|
|
81
|
+
const [showBottom, setShowBottom] = useState(false);
|
|
82
|
+
const [showRight, setShowRight] = useState(false);
|
|
83
|
+
const [showLeft, setShowLeft] = useState(false);
|
|
84
|
+
const [showCenter, setShowCenter] = useState(false);
|
|
85
|
+
|
|
86
|
+
<>
|
|
87
|
+
<Horizontal gap={10} wrap="nowrap">
|
|
88
|
+
<Button onPress={() => setShowTop(true)}>Top</Button>
|
|
89
|
+
<Button onPress={() => setShowBottom(true)}>Bottom</Button>
|
|
90
|
+
<Button onPress={() => setShowRight(true)}>Right</Button>
|
|
91
|
+
<Button onPress={() => setShowLeft(true)}>Left</Button>
|
|
92
|
+
<Button onPress={() => setShowCenter(true)}>Center</Button>
|
|
93
|
+
</Horizontal>
|
|
94
|
+
|
|
95
|
+
{showBottom && (
|
|
96
|
+
<Modal.Overlay isOpen={showBottom} onClose={() => setShowBottom(false)} position="bottom">
|
|
97
|
+
<Modal.Container>
|
|
98
|
+
<Modal.Header>Title</Modal.Header>
|
|
99
|
+
<Modal.Body>
|
|
100
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
101
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
102
|
+
nisl consectetur et.
|
|
103
|
+
</Modal.Body>
|
|
104
|
+
<Modal.Footer>
|
|
105
|
+
<Button onPress={() => setShowBottom(false)}>Cancel</Button>
|
|
106
|
+
</Modal.Footer>
|
|
107
|
+
</Modal.Container>
|
|
108
|
+
</Modal.Overlay>
|
|
109
|
+
)}
|
|
110
|
+
{showTop && (
|
|
111
|
+
<Modal.Overlay isOpen={showTop} onClose={() => setShowTop(false)} position="top">
|
|
112
|
+
<Modal.Container>
|
|
113
|
+
<Modal.Header>Title</Modal.Header>
|
|
114
|
+
<Modal.Body>
|
|
115
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
116
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
117
|
+
nisl consectetur et.
|
|
118
|
+
</Modal.Body>
|
|
119
|
+
<Modal.Footer>
|
|
120
|
+
<Button onPress={() => setShowTop(false)}>Cancel</Button>
|
|
121
|
+
</Modal.Footer>
|
|
122
|
+
</Modal.Container>
|
|
123
|
+
</Modal.Overlay>
|
|
124
|
+
)}
|
|
125
|
+
{showLeft && (
|
|
126
|
+
<Modal.Overlay isOpen={showLeft} onClose={() => setShowLeft(false)} position="left">
|
|
127
|
+
<Modal.Container>
|
|
128
|
+
<Modal.Header>Title</Modal.Header>
|
|
129
|
+
<Modal.Body>
|
|
130
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
131
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
132
|
+
nisl consectetur et.
|
|
133
|
+
</Modal.Body>
|
|
134
|
+
<Modal.Footer>
|
|
135
|
+
<Button onPress={() => setShowLeft(false)}>Cancel</Button>
|
|
136
|
+
</Modal.Footer>
|
|
137
|
+
</Modal.Container>
|
|
138
|
+
</Modal.Overlay>
|
|
139
|
+
)}
|
|
140
|
+
{showRight && (
|
|
141
|
+
<Modal.Overlay isOpen={showRight} onClose={() => setShowRight(false)} position="right">
|
|
142
|
+
<Modal.Container>
|
|
143
|
+
<Modal.Header>Title</Modal.Header>
|
|
144
|
+
<Modal.Body>
|
|
145
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
146
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
147
|
+
nisl consectetur et.
|
|
148
|
+
</Modal.Body>
|
|
149
|
+
<Modal.Footer>
|
|
150
|
+
<Button onPress={() => setShowRight(false)}>Cancel</Button>
|
|
151
|
+
</Modal.Footer>
|
|
152
|
+
</Modal.Container>
|
|
153
|
+
</Modal.Overlay>
|
|
154
|
+
)}
|
|
155
|
+
{showCenter && (
|
|
156
|
+
<Modal.Overlay isOpen={showCenter} onClose={() => setShowCenter(false)} position="center">
|
|
157
|
+
<Modal.Container>
|
|
158
|
+
<Modal.Header>Title</Modal.Header>
|
|
159
|
+
<Modal.Body>
|
|
160
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
161
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
162
|
+
nisl consectetur et.
|
|
163
|
+
</Modal.Body>
|
|
164
|
+
<Modal.Footer>
|
|
165
|
+
<Button onPress={() => setShowCenter(false)}>Cancel</Button>
|
|
166
|
+
</Modal.Footer>
|
|
167
|
+
</Modal.Container>
|
|
168
|
+
</Modal.Overlay>
|
|
169
|
+
)}
|
|
170
|
+
</>;
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### **Blur**
|
|
174
|
+
|
|
175
|
+
“**_blur_**” adds a blur effect on the modal overlay.
|
|
176
|
+
|
|
177
|
+
```tsx
|
|
178
|
+
import { useState } from 'react';
|
|
179
|
+
import { Button } from '../Button/Button';
|
|
180
|
+
|
|
181
|
+
const [show, setShow] = useState(false);
|
|
182
|
+
|
|
183
|
+
<>
|
|
184
|
+
<Button onPress={() => setShow(true)}>Blur Overlay</Button>
|
|
185
|
+
<Modal.Overlay isOpen={show} onClose={() => setShow(false)} blur={10}>
|
|
186
|
+
<Modal.Container>
|
|
187
|
+
<Modal.Header>Title</Modal.Header>
|
|
188
|
+
<Modal.Body>
|
|
189
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
190
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
191
|
+
nisl consectetur et.
|
|
192
|
+
</Modal.Body>
|
|
193
|
+
<Modal.Footer>
|
|
194
|
+
<Button onPress={() => setShow(false)}>Cancel</Button>
|
|
195
|
+
</Modal.Footer>
|
|
196
|
+
</Modal.Container>
|
|
197
|
+
</Modal.Overlay>
|
|
198
|
+
</>;
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### **Prevent Close**
|
|
202
|
+
|
|
203
|
+
“**_isClosePrevented_**” prevents the user from closing the modal when clicking outside of it.
|
|
204
|
+
|
|
205
|
+
```tsx
|
|
206
|
+
import { useState } from 'react';
|
|
207
|
+
import { Button } from '../Button/Button';
|
|
208
|
+
|
|
209
|
+
const [show, setShow] = useState(false);
|
|
210
|
+
|
|
211
|
+
<>
|
|
212
|
+
<Button onPress={() => setShow(true)} isAuto>
|
|
213
|
+
Prevent Close on Overlay
|
|
214
|
+
</Button>
|
|
215
|
+
<Modal.Overlay isOpen={show} onClose={() => setShow(false)} isClosePrevented>
|
|
216
|
+
<Modal.Container>
|
|
217
|
+
<Modal.Header>Title</Modal.Header>
|
|
218
|
+
<Modal.Body>
|
|
219
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam.
|
|
220
|
+
Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel scelerisque
|
|
221
|
+
nisl consectetur et.
|
|
222
|
+
</Modal.Body>
|
|
223
|
+
<Modal.Footer>
|
|
224
|
+
<Button onPress={() => setShow(false)}>Cancel</Button>
|
|
225
|
+
</Modal.Footer>
|
|
226
|
+
</Modal.Container>
|
|
227
|
+
</Modal.Overlay>
|
|
228
|
+
</>;
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
## **Modal Container**
|
|
232
|
+
|
|
233
|
+
It represents the main container or wrapper that holds all the content and components of a modal.
|
|
234
|
+
|
|
235
|
+
### **Shapes**
|
|
236
|
+
|
|
237
|
+
“**_shape_**” gives a sharp or rounded edges to the modal container.
|
|
238
|
+
|
|
239
|
+
```tsx
|
|
240
|
+
import { useState } from 'react';
|
|
241
|
+
import { Button } from '../Button/Button';
|
|
242
|
+
import { Text } from '../Text/Text';
|
|
243
|
+
import { Horizontal } from '../Layout/Horizontal/Horizontal';
|
|
244
|
+
|
|
245
|
+
const [showSharp, setShowSharp] = useState(false);
|
|
246
|
+
const [showRounded, setShowRounded] = useState(false);
|
|
247
|
+
|
|
248
|
+
<>
|
|
249
|
+
<Horizontal gap={10}>
|
|
250
|
+
<Button onPress={() => setShowSharp(true)}>Sharp</Button>
|
|
251
|
+
<Button onPress={() => setShowRounded(true)}>Rounded</Button>
|
|
252
|
+
</Horizontal>
|
|
253
|
+
|
|
254
|
+
{showSharp && (
|
|
255
|
+
<Modal.Overlay isOpen={showSharp} onClose={() => setShowSharp(false)}>
|
|
256
|
+
<Modal.Container variant="sharp">
|
|
257
|
+
<Modal.Body>
|
|
258
|
+
<Text isTruncated maxLines={2}>
|
|
259
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget
|
|
260
|
+
quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel
|
|
261
|
+
scelerisque nisl consectetur et.
|
|
262
|
+
</Text>
|
|
263
|
+
</Modal.Body>
|
|
264
|
+
</Modal.Container>
|
|
265
|
+
</Modal.Overlay>
|
|
266
|
+
)}
|
|
267
|
+
{showRounded && (
|
|
268
|
+
<Modal.Overlay isOpen={showRounded} onClose={() => setShowRounded(false)}>
|
|
269
|
+
<Modal.Container variant="rounded">
|
|
270
|
+
<Modal.Body>
|
|
271
|
+
<Text isTruncated maxLines={2}>
|
|
272
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget
|
|
273
|
+
quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel
|
|
274
|
+
scelerisque nisl consectetur et.
|
|
275
|
+
</Text>
|
|
276
|
+
</Modal.Body>
|
|
277
|
+
</Modal.Container>
|
|
278
|
+
</Modal.Overlay>
|
|
279
|
+
)}
|
|
280
|
+
</>;
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### **Shadow**
|
|
284
|
+
|
|
285
|
+
“**_shadow_**” adds a shadow effect on the modal container.
|
|
286
|
+
|
|
287
|
+
```tsx
|
|
288
|
+
import { useState } from 'react';
|
|
289
|
+
import { Button } from '../Button/Button';
|
|
290
|
+
import { Text } from '../Text/Text';
|
|
291
|
+
|
|
292
|
+
const [show, setShow] = useState(false);
|
|
293
|
+
|
|
294
|
+
<>
|
|
295
|
+
<Button onPress={() => setShow(true)}>Shadow</Button>
|
|
296
|
+
|
|
297
|
+
{show && (
|
|
298
|
+
<Modal.Overlay isOpen={show} onClose={() => setShow(false)}>
|
|
299
|
+
<Modal.Container shadow={{ boxShadow: '0px 2px 8px rgba(0, 0, 0, 0.6)' }}>
|
|
300
|
+
<Modal.Body>
|
|
301
|
+
<Text isTruncated maxLines={2}>
|
|
302
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget
|
|
303
|
+
quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel
|
|
304
|
+
scelerisque nisl consectetur et.
|
|
305
|
+
</Text>
|
|
306
|
+
</Modal.Body>
|
|
307
|
+
</Modal.Container>
|
|
308
|
+
</Modal.Overlay>
|
|
309
|
+
)}
|
|
310
|
+
</>;
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## **Modal Header**
|
|
314
|
+
|
|
315
|
+
It represents the header section of a modal, which typically contains a title or heading and optionally other elements such as a close button or additional controls.
|
|
316
|
+
|
|
317
|
+
### **Close Button Alignment**
|
|
318
|
+
|
|
319
|
+
“**_buttonPosition_**” places the closing button found in the header modal in the specified direction. It has a default position of “**right**”.
|
|
320
|
+
|
|
321
|
+
```tsx
|
|
322
|
+
import { useState } from 'react';
|
|
323
|
+
import { Button } from '../Button/Button';
|
|
324
|
+
import { Horizontal } from '../Layout/Horizontal/Horizontal';
|
|
325
|
+
|
|
326
|
+
const [showRight, setShowRight] = useState(false);
|
|
327
|
+
const [showWithout, setShowWithout] = useState(false);
|
|
328
|
+
const [showLeft, setShowLeft] = useState(false);
|
|
329
|
+
|
|
330
|
+
<>
|
|
331
|
+
<Horizontal gap={10}>
|
|
332
|
+
<Button onPress={() => setShowRight(true)} isAuto>
|
|
333
|
+
Close button on the right
|
|
334
|
+
</Button>
|
|
335
|
+
<Button onPress={() => setShowWithout(true)} isAuto>
|
|
336
|
+
Without Close Button
|
|
337
|
+
</Button>
|
|
338
|
+
<Button onPress={() => setShowLeft(true)} isAuto>
|
|
339
|
+
Without Close left
|
|
340
|
+
</Button>
|
|
341
|
+
</Horizontal>
|
|
342
|
+
{showRight && (
|
|
343
|
+
<Modal.Overlay isOpen={showRight} onClose={() => setShowRight(false)}>
|
|
344
|
+
<Modal.Container>
|
|
345
|
+
<Modal.Header> Close Button</Modal.Header>
|
|
346
|
+
<Modal.Body>Cras mattis consectetur purus sit amet fermentum.</Modal.Body>
|
|
347
|
+
<Modal.Footer>
|
|
348
|
+
<Button onPress={() => setShowRight(false)}>Cancel</Button>
|
|
349
|
+
</Modal.Footer>
|
|
350
|
+
</Modal.Container>
|
|
351
|
+
</Modal.Overlay>
|
|
352
|
+
)}
|
|
353
|
+
{showWithout && (
|
|
354
|
+
<Modal.Overlay isOpen={showWithout} onClose={() => setShowWithout(false)}>
|
|
355
|
+
<Modal.Container>
|
|
356
|
+
<Modal.Header buttonPosition="none"> Close Button</Modal.Header>
|
|
357
|
+
<Modal.Body>Cras mattis consectetur purus sit amet fermentum.</Modal.Body>
|
|
358
|
+
<Modal.Footer>
|
|
359
|
+
<Button onPress={() => setShowWithout(false)}>Cancel</Button>
|
|
360
|
+
</Modal.Footer>
|
|
361
|
+
</Modal.Container>
|
|
362
|
+
</Modal.Overlay>
|
|
363
|
+
)}
|
|
364
|
+
{showLeft && (
|
|
365
|
+
<Modal.Overlay isOpen={showLeft} onClose={() => setShowLeft(false)}>
|
|
366
|
+
<Modal.Container>
|
|
367
|
+
<Modal.Header buttonPosition="left">Close Button</Modal.Header>
|
|
368
|
+
<Modal.Body>Cras mattis consectetur purus sit amet fermentum.</Modal.Body>
|
|
369
|
+
<Modal.Footer>
|
|
370
|
+
<Button onPress={() => setShowLeft(false)}>Cancel</Button>
|
|
371
|
+
</Modal.Footer>
|
|
372
|
+
</Modal.Container>
|
|
373
|
+
</Modal.Overlay>
|
|
374
|
+
)}
|
|
375
|
+
</>;
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
## **Modal Body**
|
|
379
|
+
|
|
380
|
+
It represents the main content area of a modal, where the primary information or user interaction elements are displayed.
|
|
381
|
+
|
|
382
|
+
### **LargeContent**
|
|
383
|
+
|
|
384
|
+
A vertical scroll is displayed, if the content height exceed the body height.
|
|
385
|
+
|
|
386
|
+
```tsx
|
|
387
|
+
import { useState } from 'react';
|
|
388
|
+
import { Button } from '../Button/Button';
|
|
389
|
+
import { Text } from '../Text/Text';
|
|
390
|
+
|
|
391
|
+
const [show, setShow] = useState(false);
|
|
392
|
+
|
|
393
|
+
<>
|
|
394
|
+
<Button onPress={() => setShow(true)}>Scroll</Button>
|
|
395
|
+
{show && (
|
|
396
|
+
<Modal.Overlay isOpen={show} onClose={() => setShow(false)}>
|
|
397
|
+
<Modal.Container>
|
|
398
|
+
<Modal.Header buttonPosition="none">
|
|
399
|
+
<Text size="lg" weight="semibold">
|
|
400
|
+
Title
|
|
401
|
+
</Text>
|
|
402
|
+
</Modal.Header>
|
|
403
|
+
<Modal.Body height="200px">
|
|
404
|
+
Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis
|
|
405
|
+
consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur
|
|
406
|
+
purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit
|
|
407
|
+
amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet Cras
|
|
408
|
+
mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis
|
|
409
|
+
consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur
|
|
410
|
+
purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit
|
|
411
|
+
amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet
|
|
412
|
+
fermentum.Cras mattis consectetur purus sit amet fermentum.
|
|
413
|
+
</Modal.Body>
|
|
414
|
+
<Modal.Footer>
|
|
415
|
+
<Button onPress={() => setShow(false)}>Cancel</Button>
|
|
416
|
+
</Modal.Footer>
|
|
417
|
+
</Modal.Container>
|
|
418
|
+
</Modal.Overlay>
|
|
419
|
+
)}
|
|
420
|
+
</>;
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
## **Modal Footer**
|
|
424
|
+
|
|
425
|
+
It represents the footer section of a modal, which typically contains buttons or controls for actions related to the modal's content.
|
|
426
|
+
|
|
427
|
+
```tsx
|
|
428
|
+
import { useState } from 'react';
|
|
429
|
+
import { Button } from '../Button/Button';
|
|
430
|
+
import { Text } from '../Text/Text';
|
|
431
|
+
|
|
432
|
+
const [show, setShow] = useState(false);
|
|
433
|
+
|
|
434
|
+
<>
|
|
435
|
+
<Button onPress={() => setShow(true)}>Footer</Button>
|
|
436
|
+
{show && (
|
|
437
|
+
<Modal.Overlay isOpen={show} onClose={() => setShow(false)}>
|
|
438
|
+
<Modal.Container>
|
|
439
|
+
<Modal.Header buttonPosition="none">
|
|
440
|
+
<Text size="lg" weight="semibold">
|
|
441
|
+
Title
|
|
442
|
+
</Text>
|
|
443
|
+
</Modal.Header>
|
|
444
|
+
<Modal.Body height="200px">
|
|
445
|
+
Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis
|
|
446
|
+
consectetur purus sit amet fermentum.Cras mattis consectetur purus sit amet fermentum.Cras mattis consectetur
|
|
447
|
+
purus sit amet fermentum.
|
|
448
|
+
</Modal.Body>
|
|
449
|
+
<Modal.Footer>
|
|
450
|
+
<Button onPress={() => setShow(false)}>Cancel</Button>
|
|
451
|
+
</Modal.Footer>
|
|
452
|
+
</Modal.Container>
|
|
453
|
+
</Modal.Overlay>
|
|
454
|
+
)}
|
|
455
|
+
</>;
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
## **Types**
|
|
459
|
+
|
|
460
|
+
```tsx static
|
|
461
|
+
type Position = 'top' | 'left' | 'right' | 'bottom' | 'center';
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
```tsx static
|
|
465
|
+
type Shape = 'sharp' | 'rounded';
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
```tsx static
|
|
469
|
+
type CloseButtonPosition = 'left' | 'right' | 'none';
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
```tsx static
|
|
473
|
+
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
## **Default Styles**
|
|
477
|
+
|
|
478
|
+
#### **OverlayAlignments**
|
|
479
|
+
|
|
480
|
+
```tsx static
|
|
481
|
+
const OverlayAlignments: Record<Position, CSSProperties> = {
|
|
482
|
+
center: { justifyContent: 'center', alignItems: 'center' },
|
|
483
|
+
top: { justifyContent: 'center' },
|
|
484
|
+
right: { justifyContent: 'flex-end', alignItems: 'center' },
|
|
485
|
+
bottom: { justifyContent: 'center', alignItems: 'flex-end' },
|
|
486
|
+
left: { alignItems: 'center' },
|
|
487
|
+
};
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
#### **ContainerShapes**
|
|
491
|
+
|
|
492
|
+
```tsx static
|
|
493
|
+
const ContainerShapes: Record<Shape, CSSProperties> = {
|
|
494
|
+
sharp: { borderRadius: 0 },
|
|
495
|
+
rounded: { borderRadius: 4 },
|
|
496
|
+
};
|
|
497
|
+
```
|
|
498
|
+
|
|
499
|
+
#### **HeaderIconSizes**
|
|
500
|
+
|
|
501
|
+
```tsx static
|
|
502
|
+
const HeaderIconSizes: Record<Size, number> = {
|
|
503
|
+
xs: 12,
|
|
504
|
+
sm: 16,
|
|
505
|
+
md: 20,
|
|
506
|
+
lg: 24,
|
|
507
|
+
xl: 28,
|
|
508
|
+
};
|
|
509
|
+
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { ModalType } from './Modal/Modal.props';
|
|
4
|
+
import { ModalBody, ModalContainer, ModalFooter, ModalHeader, ModalOverlay } from './Modal/Modal.view';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* It is a custom content overlay that appears on top of the main screen.
|
|
8
|
+
*/
|
|
9
|
+
// eslint-disable-next-line react/prop-types
|
|
10
|
+
export const Modal: ModalType = ({ children }) => <>{children}</>;
|
|
11
|
+
|
|
12
|
+
Modal.Overlay = ModalOverlay;
|
|
13
|
+
Modal.Container = ModalContainer;
|
|
14
|
+
Modal.Header = ModalHeader;
|
|
15
|
+
Modal.Body = ModalBody;
|
|
16
|
+
Modal.Footer = ModalFooter;
|
|
17
|
+
|
|
18
|
+
export default Modal;
|