@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,61 @@
|
|
|
1
|
+
### **Import**
|
|
2
|
+
|
|
3
|
+
```tsx static
|
|
4
|
+
import { Link } from "app-studio";
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
### **Default**
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
<Link>Click Me</Link>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### **Underline**
|
|
14
|
+
|
|
15
|
+
“**_underline_**” modifies the text decoration of the link. It has a type TextDecorationStyle.
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { Vertical } from "../Layout/Vertical/Vertical";
|
|
19
|
+
import { Text } from "../Text/Text";
|
|
20
|
+
|
|
21
|
+
<Vertical gap={10}>
|
|
22
|
+
<Link href="https://www.npmjs.com/package/app-studio" underline="default">
|
|
23
|
+
Default
|
|
24
|
+
</Link>
|
|
25
|
+
<Link
|
|
26
|
+
href="https://www.npmjs.com/package/app-studio"
|
|
27
|
+
underline="hover"
|
|
28
|
+
color="black"
|
|
29
|
+
>
|
|
30
|
+
Hover
|
|
31
|
+
</Link>
|
|
32
|
+
<Link
|
|
33
|
+
href="https://www.npmjs.com/package/app-studio"
|
|
34
|
+
underline="underline"
|
|
35
|
+
color="theme.primary"
|
|
36
|
+
>
|
|
37
|
+
<Text>Underline</Text>
|
|
38
|
+
</Link>
|
|
39
|
+
</Vertical>;
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### **IsExternal**
|
|
43
|
+
|
|
44
|
+
“**_isExternal_**” enables the opening of URL links in a new tab. When set to true, it adds an icon on the right side of the link content, visually indicating that it is an external link.
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
import { Text } from "../Text/Text";
|
|
48
|
+
<Link
|
|
49
|
+
href={"https://www.npmjs.com/package/app-studio"}
|
|
50
|
+
iconSize="md"
|
|
51
|
+
isExternal
|
|
52
|
+
>
|
|
53
|
+
<Text size="2xl">External</Text>
|
|
54
|
+
</Link>;
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Types
|
|
58
|
+
|
|
59
|
+
```tsx static
|
|
60
|
+
type TextDecorationStyle = "default" | "hover" | "underline";
|
|
61
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { LinkProps } from './Link/Link.props';
|
|
4
|
+
import { useLinkState } from './Link/Link.state';
|
|
5
|
+
import LinkView from './Link/Link.view';
|
|
6
|
+
|
|
7
|
+
const LinkComponent: React.FC<LinkProps> = (props) => {
|
|
8
|
+
const linkStates = useLinkState();
|
|
9
|
+
return <LinkView {...linkStates} {...props} />;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Link allows users to navigate from page to page. It have a similar appearance as the hyperlink.
|
|
14
|
+
*/
|
|
15
|
+
export const Link = LinkComponent;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text } from 'src/components';
|
|
3
|
+
|
|
4
|
+
import { Link } from '../Link';
|
|
5
|
+
|
|
6
|
+
export const ExternalLink = () => (
|
|
7
|
+
<Link href={'https://www.npmjs.com/package/app-studio'} isExternal iconSize="md">
|
|
8
|
+
<Text size="2xl">External</Text>
|
|
9
|
+
</Link>
|
|
10
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text, Vertical } from 'src/components';
|
|
3
|
+
|
|
4
|
+
import { Link } from '../Link';
|
|
5
|
+
|
|
6
|
+
export const UnderlineLink = () => (
|
|
7
|
+
<Vertical gap={10}>
|
|
8
|
+
<Link href={'https://www.npmjs.com/package/app-studio'} underline="default">
|
|
9
|
+
Default
|
|
10
|
+
</Link>
|
|
11
|
+
<Link href={'https://www.npmjs.com/package/app-studio'} underline="hover">
|
|
12
|
+
Hover
|
|
13
|
+
</Link>
|
|
14
|
+
<Link
|
|
15
|
+
href={'https://www.npmjs.com/package/app-studio'}
|
|
16
|
+
underline="underline"
|
|
17
|
+
color="theme.primary"
|
|
18
|
+
textDecorationColor="theme.primary"
|
|
19
|
+
>
|
|
20
|
+
<Text>Underline</Text>
|
|
21
|
+
</Link>
|
|
22
|
+
</Vertical>
|
|
23
|
+
);
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { LoaderType, Size, Speed, TextPosition } from './Loader.type';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Props for the Loader component.
|
|
7
|
+
*/
|
|
8
|
+
export interface LoaderProps {
|
|
9
|
+
/**
|
|
10
|
+
* The text content.
|
|
11
|
+
*/
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* The color of the loader.
|
|
16
|
+
*/
|
|
17
|
+
loaderColor?: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The type of loader.
|
|
21
|
+
*/
|
|
22
|
+
type?: LoaderType;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The color of the text.
|
|
26
|
+
*/
|
|
27
|
+
textColor?: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The position where to place the children.
|
|
31
|
+
*/
|
|
32
|
+
textPosition?: TextPosition;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The width and height of the loader.
|
|
36
|
+
*/
|
|
37
|
+
size?: number | Size;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The rotation speed of the loader.
|
|
41
|
+
*/
|
|
42
|
+
speed?: Speed;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Additional properties.
|
|
46
|
+
*/
|
|
47
|
+
[x: string]: any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface DefaultSpinnerProps {
|
|
51
|
+
/**
|
|
52
|
+
* To set the spinner height and width
|
|
53
|
+
*/
|
|
54
|
+
size?: number | Size;
|
|
55
|
+
/**
|
|
56
|
+
* To set the rate at which the spinner moves
|
|
57
|
+
*/
|
|
58
|
+
speed?: Speed;
|
|
59
|
+
/**
|
|
60
|
+
* To change the spinner color
|
|
61
|
+
*/
|
|
62
|
+
color?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Other props
|
|
65
|
+
* */
|
|
66
|
+
[x: string]: any;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface DottedProps {
|
|
70
|
+
/**
|
|
71
|
+
* To set the spinner height and width
|
|
72
|
+
*/
|
|
73
|
+
size?: number | Size;
|
|
74
|
+
/**
|
|
75
|
+
* To set the rate at which the spinner moves
|
|
76
|
+
*/
|
|
77
|
+
speed?: Speed;
|
|
78
|
+
/**
|
|
79
|
+
* To change the spinner color
|
|
80
|
+
*/
|
|
81
|
+
color?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Other properties
|
|
84
|
+
*/
|
|
85
|
+
[x: string]: any;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export interface QuarterProps {
|
|
89
|
+
/**
|
|
90
|
+
* To set the spinner height and width
|
|
91
|
+
*/
|
|
92
|
+
size?: number | Size;
|
|
93
|
+
/**
|
|
94
|
+
* To set the rate at which the spinner moves
|
|
95
|
+
*/
|
|
96
|
+
speed?: Speed;
|
|
97
|
+
/**
|
|
98
|
+
* To change the spinner color
|
|
99
|
+
*/
|
|
100
|
+
color?: string;
|
|
101
|
+
/**
|
|
102
|
+
*Other properties
|
|
103
|
+
*/
|
|
104
|
+
[x: string]: any;
|
|
105
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Size, Speed } from './Loader.type';
|
|
2
|
+
|
|
3
|
+
export const DefaultEllipsisSpeeds: Record<Speed, number> = {
|
|
4
|
+
fast: 0.4,
|
|
5
|
+
normal: 0.6,
|
|
6
|
+
slow: 0.8,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const DefaultSizes: Record<Size, number> = {
|
|
10
|
+
xs: 14,
|
|
11
|
+
sm: 18,
|
|
12
|
+
md: 22,
|
|
13
|
+
lg: 26,
|
|
14
|
+
xl: 30,
|
|
15
|
+
'2xl': 40,
|
|
16
|
+
'3xl': 50,
|
|
17
|
+
'4xl': 60,
|
|
18
|
+
'5xl': 70,
|
|
19
|
+
'6xl': 80,
|
|
20
|
+
};
|
|
21
|
+
export const DefaultSpeeds: Record<Speed, number> = {
|
|
22
|
+
fast: 50,
|
|
23
|
+
normal: 100,
|
|
24
|
+
slow: 300,
|
|
25
|
+
};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { useTheme } from 'app-studio';
|
|
3
|
+
import { Center, View } from 'src/components';
|
|
4
|
+
|
|
5
|
+
import { DefaultSpinnerProps, DottedProps, LoaderProps, QuarterProps } from '../Loader/Loader.props';
|
|
6
|
+
|
|
7
|
+
import { DefaultSizes, DefaultSpeeds } from './Loader.style';
|
|
8
|
+
|
|
9
|
+
const DefaultSpinner: React.FC<DefaultSpinnerProps> = ({
|
|
10
|
+
size = 'md',
|
|
11
|
+
speed = 'normal',
|
|
12
|
+
color = 'theme.loading',
|
|
13
|
+
...props
|
|
14
|
+
}) => {
|
|
15
|
+
const theme = useTheme();
|
|
16
|
+
const colorStyle = theme.getColor(color);
|
|
17
|
+
const sizeStyle = typeof size === 'number' ? size : DefaultSizes[size];
|
|
18
|
+
|
|
19
|
+
const [angle, setAngle] = useState(0);
|
|
20
|
+
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
const intervalId = setInterval(() => {
|
|
23
|
+
setAngle((prevAngle) => prevAngle + 45);
|
|
24
|
+
}, DefaultSpeeds[speed]);
|
|
25
|
+
|
|
26
|
+
return () => clearInterval(intervalId);
|
|
27
|
+
}, [speed]);
|
|
28
|
+
|
|
29
|
+
return (
|
|
30
|
+
<svg
|
|
31
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
32
|
+
width={`${sizeStyle}px`}
|
|
33
|
+
height={`${sizeStyle}px`}
|
|
34
|
+
viewBox="0 0 24 24"
|
|
35
|
+
fill="none"
|
|
36
|
+
stroke={colorStyle}
|
|
37
|
+
strokeWidth="2"
|
|
38
|
+
strokeLinecap="round"
|
|
39
|
+
strokeLinejoin="round"
|
|
40
|
+
style={{ transform: `rotate(${angle}deg)` }}
|
|
41
|
+
{...props}
|
|
42
|
+
>
|
|
43
|
+
<g id="SVGRepo_bgCarrier" strokeWidth="0"></g>
|
|
44
|
+
<g id="SVGRepo_tracerCarrier" strokeLinecap="round" strokeLinejoin="round"></g>
|
|
45
|
+
<g id="SVGRepo_iconCarrier">
|
|
46
|
+
<path d="M21 12a9 9 0 11-6.219-8.56"></path>
|
|
47
|
+
</g>
|
|
48
|
+
</svg>
|
|
49
|
+
);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const Dotted: React.FC<DottedProps> = ({ size = 'md', speed = 'normal', color = 'theme.loading', ...props }) => {
|
|
53
|
+
const theme = useTheme();
|
|
54
|
+
const colorStyle = theme.getColor(color);
|
|
55
|
+
const sizeStyle = typeof size === 'number' ? size : DefaultSizes[size];
|
|
56
|
+
|
|
57
|
+
const [angle, setAngle] = useState(0);
|
|
58
|
+
|
|
59
|
+
useEffect(() => {
|
|
60
|
+
const intervalId = setInterval(() => {
|
|
61
|
+
setAngle((prevAngle) => prevAngle + 45);
|
|
62
|
+
}, DefaultSpeeds[speed]);
|
|
63
|
+
|
|
64
|
+
return () => clearInterval(intervalId);
|
|
65
|
+
}, [speed]);
|
|
66
|
+
|
|
67
|
+
return (
|
|
68
|
+
<svg
|
|
69
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
70
|
+
viewBox="0 0 50 50"
|
|
71
|
+
width={`${sizeStyle}px`}
|
|
72
|
+
height={`${sizeStyle}px`}
|
|
73
|
+
style={{ transform: `rotate(${angle}deg)` }}
|
|
74
|
+
{...props}
|
|
75
|
+
>
|
|
76
|
+
<circle cx="10" cy="25" r="4" fill={colorStyle} />
|
|
77
|
+
<circle cx="25" cy="25" r="4" fill={colorStyle} />
|
|
78
|
+
<circle cx="40" cy="25" r="4" fill={colorStyle} />
|
|
79
|
+
</svg>
|
|
80
|
+
);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const Quarter: React.FC<QuarterProps> = ({ size = 'md', speed = 'normal', color = 'theme.loading', ...props }) => {
|
|
84
|
+
const theme = useTheme();
|
|
85
|
+
const colorStyle = theme.getColor(color);
|
|
86
|
+
const sizeStyle = typeof size === 'number' ? size : DefaultSizes[size];
|
|
87
|
+
|
|
88
|
+
const [angle, setAngle] = useState(0);
|
|
89
|
+
|
|
90
|
+
useEffect(() => {
|
|
91
|
+
const intervalId = setInterval(() => {
|
|
92
|
+
setAngle((prevAngle) => prevAngle + 45);
|
|
93
|
+
}, DefaultSpeeds[speed]);
|
|
94
|
+
|
|
95
|
+
return () => clearInterval(intervalId);
|
|
96
|
+
}, [speed]);
|
|
97
|
+
|
|
98
|
+
return (
|
|
99
|
+
<svg
|
|
100
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
101
|
+
viewBox="0 0 50 50"
|
|
102
|
+
width={`${sizeStyle}px`}
|
|
103
|
+
height={`${sizeStyle}px`}
|
|
104
|
+
style={{ transform: `rotate(${angle}deg)` }}
|
|
105
|
+
{...props}
|
|
106
|
+
>
|
|
107
|
+
<circle cx="25" cy="25" r="20" fill="none" stroke={colorStyle} strokeWidth="5" strokeDasharray="1,10" />
|
|
108
|
+
</svg>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
const LoaderView: React.FC<LoaderProps> = ({
|
|
112
|
+
size,
|
|
113
|
+
children,
|
|
114
|
+
textColor,
|
|
115
|
+
loaderColor,
|
|
116
|
+
type = 'default',
|
|
117
|
+
speed = 'normal',
|
|
118
|
+
textPosition = 'right',
|
|
119
|
+
...props
|
|
120
|
+
}) => {
|
|
121
|
+
const style = { size, speed, color: loaderColor };
|
|
122
|
+
|
|
123
|
+
const variants = {
|
|
124
|
+
default: <DefaultSpinner {...style} />,
|
|
125
|
+
dotted: <Dotted {...style} />,
|
|
126
|
+
quarter: <Quarter {...style} />,
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<Center gap={10} flexDirection={textPosition === 'top' || textPosition === 'bottom' ? 'column' : 'row'} {...props}>
|
|
131
|
+
{(textPosition === 'left' || textPosition === 'top') && children && <View color={textColor}>{children}</View>}
|
|
132
|
+
{variants[type]}
|
|
133
|
+
{(textPosition === 'right' || textPosition === 'bottom') && children && <View color={textColor}>{children}</View>}
|
|
134
|
+
</Center>
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
export default LoaderView;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
### Import
|
|
2
|
+
|
|
3
|
+
```tsx static
|
|
4
|
+
import { Loading } from 'app-studio';
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
### Default
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
<Loading />
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### Sizes
|
|
14
|
+
|
|
15
|
+
“**_size_**” changes the the loader size. It has type “Size” with a default value of “_md_”.
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { Horizontal } from '../Layout/Horizontal/Horizontal';
|
|
19
|
+
|
|
20
|
+
<Horizontal wrap="nowrap">
|
|
21
|
+
{['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl'].map((size) => (
|
|
22
|
+
<Loading key={size} size={size} />
|
|
23
|
+
))}
|
|
24
|
+
</Horizontal>;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Types
|
|
28
|
+
|
|
29
|
+
“**_type_**” property is used to change the default loader. It has a type "LoaderType”.
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { Horizontal } from '../Layout/Horizontal/Horizontal';
|
|
33
|
+
|
|
34
|
+
<Horizontal justifyContent="space-evenly">
|
|
35
|
+
{['default', 'quarter', 'dotted'].map((type) => (
|
|
36
|
+
<Loading key={type} type={type} />
|
|
37
|
+
))}
|
|
38
|
+
</Horizontal>;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Speed
|
|
42
|
+
|
|
43
|
+
“**_speed_**” makes the loader rotate faster. It has a type “[Speed”](https://www.notion.so/c8ba3ae395a0419c8e55a250b7744f69).
|
|
44
|
+
|
|
45
|
+
```tsx
|
|
46
|
+
import { Horizontal } from '../Layout/Horizontal/Horizontal';
|
|
47
|
+
|
|
48
|
+
<Horizontal justifyContent="space-evenly">
|
|
49
|
+
{['slow', 'normal', 'fast'].map((speed) => (
|
|
50
|
+
<Loading key={speed} speed={speed} />
|
|
51
|
+
))}
|
|
52
|
+
</Horizontal>;
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Color
|
|
56
|
+
|
|
57
|
+
“**_color_**” changes the style colour of the text and the loader.
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
import { Horizontal } from '../Layout/Horizontal/Horizontal';
|
|
61
|
+
|
|
62
|
+
<Horizontal justifyContent="space-evenly">
|
|
63
|
+
<Loading loaderColor="black" textColor="black">
|
|
64
|
+
Submitting
|
|
65
|
+
</Loading>
|
|
66
|
+
<Loading loaderColor="theme.primary" textColor="theme.primary" textPosition="left">
|
|
67
|
+
Submitting
|
|
68
|
+
</Loading>
|
|
69
|
+
</Horizontal>;
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### TextPosition
|
|
73
|
+
|
|
74
|
+
“**_text_**” includes a description with the loader.
|
|
75
|
+
|
|
76
|
+
```tsx
|
|
77
|
+
import { Horizontal } from '../Layout/Horizontal/Horizontal';
|
|
78
|
+
|
|
79
|
+
<Horizontal justifyContent="space-evenly">
|
|
80
|
+
<Loading loaderColor="black" textColor="black">
|
|
81
|
+
Submitting
|
|
82
|
+
</Loading>
|
|
83
|
+
<Loading loaderColor="theme.primary" textColor="theme.primary" textPosition="top">
|
|
84
|
+
Submitting
|
|
85
|
+
</Loading>
|
|
86
|
+
<Loading loaderColor="theme.primary" textColor="theme.primary" textPosition="bottom">
|
|
87
|
+
Submitting
|
|
88
|
+
</Loading>
|
|
89
|
+
<Loading loaderColor="theme.primary" textColor="theme.primary" textPosition="left">
|
|
90
|
+
Submitting
|
|
91
|
+
</Loading>
|
|
92
|
+
</Horizontal>;
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Types
|
|
96
|
+
|
|
97
|
+
```tsx static
|
|
98
|
+
type LoaderType = 'default' | 'quarter' | 'dotted';
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
```tsx static
|
|
102
|
+
type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
```tsx static
|
|
106
|
+
type TextPosition = 'top' | 'right' | 'bottom' | 'left';
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
```tsx static
|
|
110
|
+
type Speed = 'fast' | 'normal' | 'slow';
|
|
111
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { LoaderProps } from './Loader/Loader.props';
|
|
4
|
+
import LoaderView from './Loader/Loader.view';
|
|
5
|
+
|
|
6
|
+
const LoadingComponent: React.FC<LoaderProps> = (props) => <LoaderView {...props} />;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* It gives the user an insight about an action being processed. It may have an undefined waiting time or display the process length.
|
|
10
|
+
*/
|
|
11
|
+
export const Loading = LoadingComponent;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Horizontal, Loading } from 'src/components';
|
|
3
|
+
|
|
4
|
+
export const StyleLoader = () => (
|
|
5
|
+
<Horizontal gap={15} wrap="nowrap">
|
|
6
|
+
<Loading loaderColor="black" textColor="black">
|
|
7
|
+
Submitting
|
|
8
|
+
</Loading>
|
|
9
|
+
<Loading loaderColor="theme.primary" textColor="theme.primary" textPosition="left">
|
|
10
|
+
Submitting
|
|
11
|
+
</Loading>
|
|
12
|
+
</Horizontal>
|
|
13
|
+
);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Loading, Vertical } from 'src/components';
|
|
3
|
+
|
|
4
|
+
export const PositionLoader = () => (
|
|
5
|
+
<Vertical gap={15}>
|
|
6
|
+
<Loading loaderColor="black" textColor="black">
|
|
7
|
+
Submitting
|
|
8
|
+
</Loading>
|
|
9
|
+
<Loading loaderColor="theme.primary" textColor="theme.primary" textPosition="top">
|
|
10
|
+
Submitting
|
|
11
|
+
</Loading>
|
|
12
|
+
<Loading loaderColor="theme.primary" textColor="theme.primary" textPosition="bottom">
|
|
13
|
+
Submitting
|
|
14
|
+
</Loading>
|
|
15
|
+
<Loading loaderColor="theme.primary" textColor="theme.primary" textPosition="left">
|
|
16
|
+
Submitting
|
|
17
|
+
</Loading>
|
|
18
|
+
</Vertical>
|
|
19
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Loading, Vertical } from 'src/components';
|
|
3
|
+
|
|
4
|
+
import { Size } from '../Loader/Loader.type';
|
|
5
|
+
|
|
6
|
+
export const SizeLoader = () => (
|
|
7
|
+
<Vertical wrap="nowrap">
|
|
8
|
+
{['xs', 'sm', 'md', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl'].map((size) => (
|
|
9
|
+
<Loading key={size} size={size as Size} />
|
|
10
|
+
))}
|
|
11
|
+
</Vertical>
|
|
12
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Horizontal, Loading } from 'src/components';
|
|
3
|
+
|
|
4
|
+
import { Speed } from '../Loader/Loader.type';
|
|
5
|
+
|
|
6
|
+
export const SpeedLoader = () => (
|
|
7
|
+
<Horizontal justifyContent="space-evenly">
|
|
8
|
+
{['slow', 'normal', 'fast'].map((speed) => (
|
|
9
|
+
<Loading key={speed} speed={speed as Speed} />
|
|
10
|
+
))}
|
|
11
|
+
</Horizontal>
|
|
12
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Horizontal, Loading } from 'src/components';
|
|
3
|
+
|
|
4
|
+
import { LoaderType } from '../Loader/Loader.type';
|
|
5
|
+
|
|
6
|
+
export const TypeLoader = () => (
|
|
7
|
+
<Horizontal justifyContent="space-evenly">
|
|
8
|
+
{['default', 'quarter', 'dotted'].map((type) => (
|
|
9
|
+
<Loading key={type} type={type as LoaderType} />
|
|
10
|
+
))}
|
|
11
|
+
</Horizontal>
|
|
12
|
+
);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { StyleLoader } from 'src/components/Loader/examples/ColorLoader';
|
|
2
|
+
export { DefaultLoader } from 'src/components/Loader/examples/DefaultLoader';
|
|
3
|
+
export { PositionLoader } from 'src/components/Loader/examples/PositionLoader';
|
|
4
|
+
export { SizeLoader } from 'src/components/Loader/examples/SizeLoader';
|
|
5
|
+
export { SpeedLoader } from 'src/components/Loader/examples/SpeedLoader';
|
|
6
|
+
export { TextLoader } from 'src/components/Loader/examples/TextLoader';
|
|
7
|
+
export { TypeLoader } from 'src/components/Loader/examples/VariantLoader';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Button, Text } from 'src/components';
|
|
4
|
+
|
|
5
|
+
import Modal from '../Modal';
|
|
6
|
+
|
|
7
|
+
export const BlurModal = () => {
|
|
8
|
+
const [show, setShow] = useState(false);
|
|
9
|
+
return (
|
|
10
|
+
<>
|
|
11
|
+
<Button onPress={() => setShow(true)} isAuto>
|
|
12
|
+
Blur Overlay
|
|
13
|
+
</Button>
|
|
14
|
+
|
|
15
|
+
{show && (
|
|
16
|
+
<Modal.Overlay isOpen={show} onClose={() => setShow(false)} blur={10}>
|
|
17
|
+
<Modal.Container>
|
|
18
|
+
<Modal.Header buttonPosition="none">
|
|
19
|
+
<Text size="lg" weight="semiBold">
|
|
20
|
+
Title
|
|
21
|
+
</Text>
|
|
22
|
+
</Modal.Header>
|
|
23
|
+
<Modal.Body>
|
|
24
|
+
<Text isTruncated maxLines={2}>
|
|
25
|
+
Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget
|
|
26
|
+
quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. Praesent commodo cursus magna, vel
|
|
27
|
+
scelerisque nisl consectetur et.
|
|
28
|
+
</Text>
|
|
29
|
+
</Modal.Body>
|
|
30
|
+
<Modal.Footer>
|
|
31
|
+
<Button onPress={() => setShow(false)}>Cancel</Button>
|
|
32
|
+
</Modal.Footer>
|
|
33
|
+
</Modal.Container>
|
|
34
|
+
</Modal.Overlay>
|
|
35
|
+
)}
|
|
36
|
+
</>
|
|
37
|
+
);
|
|
38
|
+
};
|