@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,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button, Center } from 'src/components';
|
|
3
|
+
import { DustBinSvg } from 'src/components/Svg';
|
|
4
|
+
|
|
5
|
+
import { Shape } from '../Button/Button.type';
|
|
6
|
+
|
|
7
|
+
export const IconButtons = () => (
|
|
8
|
+
<Center gap={15}>
|
|
9
|
+
<Button icon={<DustBinSvg size={24} />} height={48}>
|
|
10
|
+
Delete
|
|
11
|
+
</Button>
|
|
12
|
+
<Button
|
|
13
|
+
height={48}
|
|
14
|
+
icon={<DustBinSvg size={24} />}
|
|
15
|
+
shape={'pillShaped' as Shape}
|
|
16
|
+
iconPosition="right"
|
|
17
|
+
colorScheme="theme.secondary"
|
|
18
|
+
>
|
|
19
|
+
Delete
|
|
20
|
+
</Button>
|
|
21
|
+
<Button icon={<DustBinSvg size={24} />} colorScheme="theme.primary" isIconRounded isAuto />
|
|
22
|
+
</Center>
|
|
23
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button, Loading, Vertical } from 'src/components';
|
|
3
|
+
|
|
4
|
+
export const LoadingButtons = () => (
|
|
5
|
+
<Vertical gap={15}>
|
|
6
|
+
<Button isLoading isFilled>
|
|
7
|
+
{<Loading />}
|
|
8
|
+
</Button>
|
|
9
|
+
<Button isLoading isFilled>
|
|
10
|
+
<Loading
|
|
11
|
+
type="dotted"
|
|
12
|
+
styles={{
|
|
13
|
+
loader: { color: 'color.white' },
|
|
14
|
+
text: {
|
|
15
|
+
color: 'color.black',
|
|
16
|
+
},
|
|
17
|
+
}}
|
|
18
|
+
>
|
|
19
|
+
Loading
|
|
20
|
+
</Loading>
|
|
21
|
+
</Button>
|
|
22
|
+
<Button isLoading isFilled>
|
|
23
|
+
<Loading type="quarter" textPosition="right" styles={{ loader: { color: 'color.black' }, text: { color: 'color.black' } }}>
|
|
24
|
+
Submitting
|
|
25
|
+
</Loading>
|
|
26
|
+
</Button>
|
|
27
|
+
</Vertical>
|
|
28
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button, Vertical } from 'src/components';
|
|
3
|
+
|
|
4
|
+
import { Size } from '../Button/Button.type';
|
|
5
|
+
|
|
6
|
+
export const ButtonSizes = () => (
|
|
7
|
+
<Vertical gap={10}>
|
|
8
|
+
{['xs', 'sm', 'md', 'lg', 'xl'].map((size, index) => (
|
|
9
|
+
<Button key={index} size={size as Size}>
|
|
10
|
+
Button
|
|
11
|
+
</Button>
|
|
12
|
+
))}
|
|
13
|
+
<Button isAuto>Auto Width</Button>
|
|
14
|
+
<Button isFilled>Fill Width</Button>
|
|
15
|
+
</Vertical>
|
|
16
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Button, Vertical } from 'src/components';
|
|
3
|
+
|
|
4
|
+
import { Variant } from '../Button/Button.type';
|
|
5
|
+
|
|
6
|
+
export const VariantButtons = () => (
|
|
7
|
+
<Vertical gap={15}>
|
|
8
|
+
{['filled', 'outline', 'link', 'ghost'].map((variant, index) => (
|
|
9
|
+
<Button
|
|
10
|
+
key={index}
|
|
11
|
+
externalHref="https://www.npmjs.com/package/app-studio"
|
|
12
|
+
variant={variant as Variant}
|
|
13
|
+
colorScheme="theme.primary"
|
|
14
|
+
isFilled
|
|
15
|
+
>
|
|
16
|
+
{variant}
|
|
17
|
+
</Button>
|
|
18
|
+
))}
|
|
19
|
+
</Vertical>
|
|
20
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from 'src/components/Button/examples/BorderedButtons';
|
|
2
|
+
export * from 'src/components/Button/examples/ColoredButtons';
|
|
3
|
+
export * from 'src/components/Button/examples/DefaultButton';
|
|
4
|
+
export * from 'src/components/Button/examples/DisabledButton';
|
|
5
|
+
export * from 'src/components/Button/examples/IconButtons';
|
|
6
|
+
export * from 'src/components/Button/examples/LoadingButtons';
|
|
7
|
+
export * from 'src/components/Button/examples/ShadowButton';
|
|
8
|
+
export * from 'src/components/Button/examples/SizeButtons';
|
|
9
|
+
export * from 'src/components/Button/examples/VariantButtons';
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
import { Elevation } from 'src/utils/elevation';
|
|
3
|
+
import { Shadow } from 'app-studio';
|
|
4
|
+
|
|
5
|
+
import { CheckboxStyles, Size } from './Checkbox.type';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Represents the properties for a checkbox component.
|
|
9
|
+
*/
|
|
10
|
+
export interface CheckboxProps {
|
|
11
|
+
/**
|
|
12
|
+
* The identifier for the checkbox.
|
|
13
|
+
*/
|
|
14
|
+
id?: string;
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Custom icon to be displayed when the checkbox is checked.
|
|
18
|
+
*/
|
|
19
|
+
icon?: React.ReactNode;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Indicates whether the checkbox has an error.
|
|
23
|
+
*/
|
|
24
|
+
error?: boolean;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* The name of the checkbox element.
|
|
28
|
+
*/
|
|
29
|
+
name?: string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The label of the checkbox.
|
|
33
|
+
*/
|
|
34
|
+
label?: string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Changes the background color of the checkbox.
|
|
38
|
+
*/
|
|
39
|
+
colorScheme?: string;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Give control on the selected state of the checkbox component.
|
|
43
|
+
*/
|
|
44
|
+
isChecked?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Allows you to set the initial state of the checkbox without controlling its value
|
|
47
|
+
*/
|
|
48
|
+
defaultIsSelected?: boolean;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* If true, the checkbox cannot be interacted with.
|
|
52
|
+
*/
|
|
53
|
+
isReadOnly?: boolean;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* If true, the checkbox is disabled and cannot be selected.
|
|
57
|
+
*/
|
|
58
|
+
isDisabled?: boolean;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Indicates that the checkbox is neither checked nor unchecked.
|
|
62
|
+
*/
|
|
63
|
+
isIndeterminate?: boolean;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Handler function called when the controlled checkbox value changes.
|
|
67
|
+
*/
|
|
68
|
+
onChange?: Function;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Handler function called when the checkbox value changes on iOS and Android devices.
|
|
72
|
+
*/
|
|
73
|
+
onValueChange?: Function;
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* CSS styles
|
|
77
|
+
*/
|
|
78
|
+
styles?: CheckboxStyles;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Sets the height and width of the checkbox.
|
|
82
|
+
*/
|
|
83
|
+
size?: Size;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Sets a shadow effect for the checkbox.
|
|
87
|
+
*/
|
|
88
|
+
shadow?: Shadow | Elevation | CSSProperties;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Other additional properties.
|
|
92
|
+
*/
|
|
93
|
+
[x: string]: any;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface CheckboxViewProps extends CheckboxProps {
|
|
97
|
+
/**
|
|
98
|
+
* Indicates whether the checkbox is currently being hovered.
|
|
99
|
+
*/
|
|
100
|
+
isHovered?: boolean;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* A function to set the hovered state of the checkbox.
|
|
104
|
+
* @param hovered - The hovered state to set.
|
|
105
|
+
*/
|
|
106
|
+
setIsHovered?: (hovered: boolean) => void;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Indicates whether the checkbox is selected/checked.
|
|
110
|
+
*/
|
|
111
|
+
isChecked?: boolean;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* A function to set the selected state of the checkbox.
|
|
115
|
+
* @param selected - The selected state to set.
|
|
116
|
+
*/
|
|
117
|
+
setIsChecked?: (selected: boolean) => void;
|
|
118
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { CheckboxProps } from './Checkbox.props';
|
|
4
|
+
|
|
5
|
+
export const useCheckboxState = ({ defaultIsSelected = false }: CheckboxProps) => {
|
|
6
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
|
7
|
+
const [isSelected, setIsSelected] = React.useState<boolean>(defaultIsSelected);
|
|
8
|
+
|
|
9
|
+
return {
|
|
10
|
+
isHovered,
|
|
11
|
+
setIsHovered,
|
|
12
|
+
isSelected,
|
|
13
|
+
setIsSelected,
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
|
|
3
|
+
import { Size } from './Checkbox.type';
|
|
4
|
+
|
|
5
|
+
export const Sizes: Record<Size, CSSProperties> = {
|
|
6
|
+
xs: { height: 8, width: 8 },
|
|
7
|
+
sm: { height: 12, width: 12 },
|
|
8
|
+
md: { height: 18, width: 18 },
|
|
9
|
+
lg: { height: 24, width: 24 },
|
|
10
|
+
xl: { height: 30, width: 30 },
|
|
11
|
+
'2xl': { height: 36, width: 36 },
|
|
12
|
+
'3xl': { height: 42, width: 42 },
|
|
13
|
+
'4xl': { height: 48, width: 48 },
|
|
14
|
+
'5xl': { height: 54, width: 54 },
|
|
15
|
+
'6xl': { height: 60, width: 60 },
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export const IconSizes: Record<Size, number> = {
|
|
19
|
+
xs: 6,
|
|
20
|
+
sm: 12,
|
|
21
|
+
md: 18,
|
|
22
|
+
lg: 24,
|
|
23
|
+
xl: 30,
|
|
24
|
+
'2xl': 36,
|
|
25
|
+
'3xl': 42,
|
|
26
|
+
'4xl': 48,
|
|
27
|
+
'5xl': 54,
|
|
28
|
+
'6xl': 60,
|
|
29
|
+
};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Typography } from 'app-studio';
|
|
3
|
+
import { Center } from 'src/components';
|
|
4
|
+
import { Label } from 'src/components/Form/Label/Label';
|
|
5
|
+
import { CheckSvg, IndeterminateSvg } from 'src/components/Svg';
|
|
6
|
+
|
|
7
|
+
import { CheckboxViewProps } from './Checkbox.props';
|
|
8
|
+
import { IconSizes, Sizes } from './Checkbox.style';
|
|
9
|
+
|
|
10
|
+
const CheckboxView: React.FC<CheckboxViewProps> = ({
|
|
11
|
+
id,
|
|
12
|
+
icon,
|
|
13
|
+
name,
|
|
14
|
+
label,
|
|
15
|
+
isChecked,
|
|
16
|
+
onChange,
|
|
17
|
+
onValueChange,
|
|
18
|
+
shadow = {},
|
|
19
|
+
size = 'md',
|
|
20
|
+
colorScheme = 'theme.primary',
|
|
21
|
+
error = false,
|
|
22
|
+
isSelected = false,
|
|
23
|
+
isHovered = false,
|
|
24
|
+
isDisabled = false,
|
|
25
|
+
isReadOnly = false,
|
|
26
|
+
isIndeterminate = false,
|
|
27
|
+
defaultIsSelected = false,
|
|
28
|
+
setIsSelected = () => {},
|
|
29
|
+
setIsHovered = () => {},
|
|
30
|
+
styles = { checkbox: {}, label: {} },
|
|
31
|
+
...props
|
|
32
|
+
}) => {
|
|
33
|
+
const handleHover = () => setIsHovered(!isHovered);
|
|
34
|
+
|
|
35
|
+
const handleChange = () => {
|
|
36
|
+
if (!isReadOnly && !isDisabled) {
|
|
37
|
+
if (isChecked === undefined) {
|
|
38
|
+
setIsSelected(!isSelected);
|
|
39
|
+
} else {
|
|
40
|
+
if (onChange) onChange(!isChecked);
|
|
41
|
+
if (onValueChange) onValueChange(!isChecked);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const checkboxStyle = {
|
|
47
|
+
container: {
|
|
48
|
+
gap: 10,
|
|
49
|
+
display: 'flex',
|
|
50
|
+
alignItems: 'center',
|
|
51
|
+
height: 'fit-content',
|
|
52
|
+
width: 'fit-content',
|
|
53
|
+
color: error ? 'theme.error' : isDisabled ? 'theme.disabled' : 'color.blueGray.700',
|
|
54
|
+
cursor: isDisabled ? 'not-allowed' : isReadOnly ? 'default' : 'pointer',
|
|
55
|
+
...styles['label'],
|
|
56
|
+
},
|
|
57
|
+
checkbox: {
|
|
58
|
+
...(isDisabled
|
|
59
|
+
? { backgroundColor: 'theme.disabled' }
|
|
60
|
+
: ((isChecked || isSelected) && !isIndeterminate) || isIndeterminate
|
|
61
|
+
? { backgroundColor: colorScheme }
|
|
62
|
+
: {
|
|
63
|
+
borderWidth: 2,
|
|
64
|
+
borderColor: error ? 'theme.error' : isHovered ? 'color.grey.500' : 'color.grey.300',
|
|
65
|
+
borderStyle: 'solid',
|
|
66
|
+
}),
|
|
67
|
+
borderRadius: 3,
|
|
68
|
+
filter: isHovered ? 'brightness(0.9)' : undefined,
|
|
69
|
+
...Sizes[size],
|
|
70
|
+
...shadow,
|
|
71
|
+
...styles['checkbox'],
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<Label
|
|
77
|
+
htmlFor={id}
|
|
78
|
+
as="checkbox"
|
|
79
|
+
onPress={handleChange}
|
|
80
|
+
onMouseEnter={handleHover}
|
|
81
|
+
onMouseLeave={handleHover}
|
|
82
|
+
size={Typography.fontSizes[size]}
|
|
83
|
+
{...checkboxStyle.container}
|
|
84
|
+
{...props}
|
|
85
|
+
>
|
|
86
|
+
<Center {...checkboxStyle.checkbox}>
|
|
87
|
+
{isIndeterminate ? (
|
|
88
|
+
<IndeterminateSvg />
|
|
89
|
+
) : (
|
|
90
|
+
(isChecked || isSelected) && (icon ?? <CheckSvg size={IconSizes[size]} />)
|
|
91
|
+
)}
|
|
92
|
+
</Center>
|
|
93
|
+
{label}
|
|
94
|
+
</Label>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
export default CheckboxView;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
### **Import**
|
|
2
|
+
|
|
3
|
+
```tsx static
|
|
4
|
+
import { Checkbox } from "app-studio";
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
### **Default**
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
<Checkbox>Agree to Terms and Conditions</Checkbox>
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### **Disabled**
|
|
14
|
+
|
|
15
|
+
“isDisabled” makes the Checkbox unusable and un-clickable with a “disabled” look.
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<Checkbox isDisabled>Disable</Checkbox>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### **Read Only**
|
|
22
|
+
|
|
23
|
+
“isReadOnly” makes the field readable but not writable. Can only read the element.
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
<Checkbox isReadOnly isChecked>
|
|
27
|
+
Read Only
|
|
28
|
+
</Checkbox>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### **Indeterminate**
|
|
32
|
+
|
|
33
|
+
“isIndeterminant” indicates that the checkbox is never checked or unchecked.
|
|
34
|
+
|
|
35
|
+
```tsx
|
|
36
|
+
<Checkbox id="indeterminate" name="indeterminate" isIndeterminate>
|
|
37
|
+
Select All
|
|
38
|
+
</Checkbox>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### **Size**
|
|
42
|
+
|
|
43
|
+
"size" property allows you to adjust the size of the checkbox. By default, it is set to "md" (medium) size.
|
|
44
|
+
|
|
45
|
+
```jsx
|
|
46
|
+
import { Vertical } from "../../Layout/Vertical/Vertical";
|
|
47
|
+
|
|
48
|
+
<Vertical gap={10}>
|
|
49
|
+
<Checkbox name="xs" size="xs" isChecked>
|
|
50
|
+
xs
|
|
51
|
+
</Checkbox>
|
|
52
|
+
<Checkbox name="sm" size="sm" isChecked>
|
|
53
|
+
sm
|
|
54
|
+
</Checkbox>
|
|
55
|
+
<Checkbox name="md" size="md" isChecked>
|
|
56
|
+
md
|
|
57
|
+
</Checkbox>
|
|
58
|
+
<Checkbox name="lg" size="lg" isChecked>
|
|
59
|
+
lg
|
|
60
|
+
</Checkbox>
|
|
61
|
+
<Checkbox name="xl" size="xl" isChecked>
|
|
62
|
+
xl
|
|
63
|
+
</Checkbox>
|
|
64
|
+
</Vertical>;
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### **ColorScheme**
|
|
68
|
+
|
|
69
|
+
“colorScheme” allows you to modify the background color of the Checkbox. It accepts a value from the "ColorThemes" type, with the default color set to "theme.primary".
|
|
70
|
+
|
|
71
|
+
```tsx
|
|
72
|
+
import { Horizontal } from "../../Layout/Horizontal/Horizontal";
|
|
73
|
+
|
|
74
|
+
<Horizontal justify="space-evenly" gap={10}>
|
|
75
|
+
{["theme.primary", "theme.secondary", "theme.error", "theme.success", "theme.warning"].map(
|
|
76
|
+
(color, index) => (
|
|
77
|
+
<Checkbox key={index} name="name" colorScheme={color} isChecked>
|
|
78
|
+
{color}
|
|
79
|
+
</Checkbox>
|
|
80
|
+
)
|
|
81
|
+
)}
|
|
82
|
+
</Horizontal>;
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### **Shadow**
|
|
86
|
+
|
|
87
|
+
"shadow" attribute applies a shadow effect to the Checkbox.
|
|
88
|
+
|
|
89
|
+
```tsx
|
|
90
|
+
<Checkbox shadow={{ boxShadow: "0 2px 4px rgba(0, 0, 0, 0.2)" }}>
|
|
91
|
+
Accept
|
|
92
|
+
</Checkbox>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### **Styles**
|
|
96
|
+
|
|
97
|
+
“styles” enables you to customize the styling of the input field.
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
<Checkbox
|
|
101
|
+
styles={{
|
|
102
|
+
checkbox: { borderRadius: 10,
|
|
103
|
+
borderColor: 'theme.primary',
|
|
104
|
+
borderStyle: 'solid',
|
|
105
|
+
borderWidth: 1 },
|
|
106
|
+
label: { color: "teal" },
|
|
107
|
+
}}
|
|
108
|
+
>
|
|
109
|
+
Enable
|
|
110
|
+
</Checkbox>
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Types
|
|
114
|
+
|
|
115
|
+
#### Sizes
|
|
116
|
+
|
|
117
|
+
```tsx static
|
|
118
|
+
type Size = "xs" | "sm" | "md" | "lg" | "xl";
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### Styles
|
|
122
|
+
|
|
123
|
+
```tsx static
|
|
124
|
+
type CheckboxStyles = {
|
|
125
|
+
checkbox?: CSSProperties;
|
|
126
|
+
label?: CSSProperties;
|
|
127
|
+
};
|
|
128
|
+
```
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { CheckboxProps } from './Checkbox/Checkbox.props';
|
|
4
|
+
import { useCheckboxState } from './Checkbox/Checkbox.state';
|
|
5
|
+
import CheckboxView from './Checkbox/Checkbox.view';
|
|
6
|
+
|
|
7
|
+
const CheckboxComponent: React.FC<CheckboxProps> = (props) => {
|
|
8
|
+
const checkboxStates = useCheckboxState(props);
|
|
9
|
+
return <CheckboxView {...checkboxStates} {...props} />;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Checkbox allows users to select one or more options from a list of choices.
|
|
14
|
+
*/
|
|
15
|
+
export const Checkbox = CheckboxComponent;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
3
|
+
|
|
4
|
+
import { Checkbox } from '../Checkbox';
|
|
5
|
+
|
|
6
|
+
export const ColorCheckbox = () => (
|
|
7
|
+
<Vertical gap={15}>
|
|
8
|
+
{['theme.primary', 'theme.secondary', 'theme.error', 'theme.success', 'theme.warning'].map((color) => (
|
|
9
|
+
<Checkbox key={color} name="name" colorScheme={color} label={color} defaultIsSelected />
|
|
10
|
+
))}
|
|
11
|
+
</Vertical>
|
|
12
|
+
);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { Button } from 'src/components';
|
|
3
|
+
import { Vertical } from 'src/components/Layout/Vertical/examples';
|
|
4
|
+
import { View } from 'src/components/Layout/View/View';
|
|
5
|
+
|
|
6
|
+
import { Checkbox } from '../Checkbox';
|
|
7
|
+
|
|
8
|
+
export const FormCheckbox = () => {
|
|
9
|
+
const [isOnionChecked, setIsOnionChecked] = useState(false);
|
|
10
|
+
const [isCarrotChecked, setIsCarrotChecked] = useState(false);
|
|
11
|
+
|
|
12
|
+
const handleSubmit = (event: any) => {
|
|
13
|
+
event.preventDefault();
|
|
14
|
+
|
|
15
|
+
const selectedVegetables: Array<string> = [];
|
|
16
|
+
if (isOnionChecked) selectedVegetables.push('onion');
|
|
17
|
+
if (isCarrotChecked) selectedVegetables.push('carrot');
|
|
18
|
+
alert(`You selected: ${selectedVegetables.join(', ')}`);
|
|
19
|
+
};
|
|
20
|
+
return (
|
|
21
|
+
<form onSubmit={handleSubmit}>
|
|
22
|
+
<Vertical gap={10}>
|
|
23
|
+
<View>Choose your vegetables:</View>
|
|
24
|
+
<Checkbox
|
|
25
|
+
id="onion"
|
|
26
|
+
name="onion"
|
|
27
|
+
label="onion"
|
|
28
|
+
value="onion"
|
|
29
|
+
isChecked={isOnionChecked}
|
|
30
|
+
onChange={setIsOnionChecked}
|
|
31
|
+
/>
|
|
32
|
+
<Checkbox
|
|
33
|
+
id="carrot"
|
|
34
|
+
name="carrot"
|
|
35
|
+
label="carrot"
|
|
36
|
+
value="carrot"
|
|
37
|
+
isChecked={isCarrotChecked}
|
|
38
|
+
onChange={setIsCarrotChecked}
|
|
39
|
+
/>
|
|
40
|
+
<Button type="submit" onPress={handleSubmit}>
|
|
41
|
+
Submit
|
|
42
|
+
</Button>
|
|
43
|
+
</Vertical>
|
|
44
|
+
</form>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EditSvg } from 'src/components/Svg';
|
|
3
|
+
|
|
4
|
+
import { Checkbox } from '../Checkbox';
|
|
5
|
+
|
|
6
|
+
export const IconCheckbox = () => (
|
|
7
|
+
<Checkbox id="child" name="child" colorScheme="theme.error" icon={<EditSvg size={14} />} label="Label" />
|
|
8
|
+
);
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Checkbox } from 'src/components';
|
|
3
|
+
|
|
4
|
+
export const ShadowCheckbox = () => (
|
|
5
|
+
<Checkbox
|
|
6
|
+
id="shadowCheckbox"
|
|
7
|
+
name="shadowCheckbox"
|
|
8
|
+
shadow={{ boxShadow: 'rgb(249, 115, 22) 0px 4px 14px 0px' }}
|
|
9
|
+
defaultIsSelected
|
|
10
|
+
/>
|
|
11
|
+
);
|