@tecsinapse/react-core 2.2.1-beta.0 → 2.2.1
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/dist/cjs/components/atoms/Avatar/Avatar.js +1 -0
- package/dist/cjs/components/atoms/Avatar/Avatar.js.map +1 -0
- package/dist/cjs/components/atoms/Avatar/helpers.js +1 -0
- package/dist/cjs/components/atoms/Avatar/helpers.js.map +1 -0
- package/dist/cjs/components/atoms/Avatar/styled.js +1 -0
- package/dist/cjs/components/atoms/Avatar/styled.js.map +1 -0
- package/dist/cjs/components/atoms/Badge/Badge.js +1 -0
- package/dist/cjs/components/atoms/Badge/Badge.js.map +1 -0
- package/dist/cjs/components/atoms/Badge/styled.js +1 -0
- package/dist/cjs/components/atoms/Badge/styled.js.map +1 -0
- package/dist/cjs/components/atoms/BoxContent/BoxContent.js +1 -0
- package/dist/cjs/components/atoms/BoxContent/BoxContent.js.map +1 -0
- package/dist/cjs/components/atoms/BoxContent/styled.js +1 -0
- package/dist/cjs/components/atoms/BoxContent/styled.js.map +1 -0
- package/dist/cjs/components/atoms/Button/Button.js +1 -0
- package/dist/cjs/components/atoms/Button/Button.js.map +1 -0
- package/dist/cjs/components/atoms/Button/States/BaseState.js +1 -0
- package/dist/cjs/components/atoms/Button/States/BaseState.js.map +1 -0
- package/dist/cjs/components/atoms/Button/States/Error.js +1 -0
- package/dist/cjs/components/atoms/Button/States/Error.js.map +1 -0
- package/dist/cjs/components/atoms/Button/States/Loading.js +1 -0
- package/dist/cjs/components/atoms/Button/States/Loading.js.map +1 -0
- package/dist/cjs/components/atoms/Button/States/Success.js +1 -0
- package/dist/cjs/components/atoms/Button/States/Success.js.map +1 -0
- package/dist/cjs/components/atoms/Button/States/styled.js +1 -0
- package/dist/cjs/components/atoms/Button/States/styled.js.map +1 -0
- package/dist/cjs/components/atoms/Button/styled.js +1 -0
- package/dist/cjs/components/atoms/Button/styled.js.map +1 -0
- package/dist/cjs/components/atoms/Card/Card.js +1 -0
- package/dist/cjs/components/atoms/Card/Card.js.map +1 -0
- package/dist/cjs/components/atoms/Card/Footer/Footer.js +1 -0
- package/dist/cjs/components/atoms/Card/Footer/Footer.js.map +1 -0
- package/dist/cjs/components/atoms/Card/Header/Header.js +1 -0
- package/dist/cjs/components/atoms/Card/Header/Header.js.map +1 -0
- package/dist/cjs/components/atoms/Card/styled.js +1 -0
- package/dist/cjs/components/atoms/Card/styled.js.map +1 -0
- package/dist/cjs/components/atoms/Checkbox/Checkbox.js +1 -0
- package/dist/cjs/components/atoms/Checkbox/Checkbox.js.map +1 -0
- package/dist/cjs/components/atoms/Checkbox/styled.js +1 -0
- package/dist/cjs/components/atoms/Checkbox/styled.js.map +1 -0
- package/dist/cjs/components/atoms/Divider/Divider.js +1 -0
- package/dist/cjs/components/atoms/Divider/Divider.js.map +1 -0
- package/dist/cjs/components/atoms/Divider/styled.js +1 -0
- package/dist/cjs/components/atoms/Divider/styled.js.map +1 -0
- package/dist/cjs/components/atoms/GroupButton/GroupButton.js +1 -0
- package/dist/cjs/components/atoms/GroupButton/GroupButton.js.map +1 -0
- package/dist/cjs/components/atoms/GroupButton/GroupButtonOption.js +1 -0
- package/dist/cjs/components/atoms/GroupButton/GroupButtonOption.js.map +1 -0
- package/dist/cjs/components/atoms/GroupButton/styled.js +1 -0
- package/dist/cjs/components/atoms/GroupButton/styled.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/AntDesign.js +1 -0
- package/dist/cjs/components/atoms/Icon/AntDesign.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/Entypo.js +1 -0
- package/dist/cjs/components/atoms/Icon/Entypo.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/Evil.js +1 -0
- package/dist/cjs/components/atoms/Icon/Evil.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/Feather.js +1 -0
- package/dist/cjs/components/atoms/Icon/Feather.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/FontAwesome.js +1 -0
- package/dist/cjs/components/atoms/Icon/FontAwesome.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/FontAwesomeFive.js +1 -0
- package/dist/cjs/components/atoms/Icon/FontAwesomeFive.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/Fontisto.js +1 -0
- package/dist/cjs/components/atoms/Icon/Fontisto.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/Foundation.js +1 -0
- package/dist/cjs/components/atoms/Icon/Foundation.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/Icon.js +1 -0
- package/dist/cjs/components/atoms/Icon/Icon.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/Ionicon.js +1 -0
- package/dist/cjs/components/atoms/Icon/Ionicon.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/Material.js +1 -0
- package/dist/cjs/components/atoms/Icon/Material.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/MaterialCommunity.js +1 -0
- package/dist/cjs/components/atoms/Icon/MaterialCommunity.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/Octicon.js +1 -0
- package/dist/cjs/components/atoms/Icon/Octicon.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/SimpleLine.js +1 -0
- package/dist/cjs/components/atoms/Icon/SimpleLine.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/Zocial.js +1 -0
- package/dist/cjs/components/atoms/Icon/Zocial.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/functions.js +1 -0
- package/dist/cjs/components/atoms/Icon/functions.js.map +1 -0
- package/dist/cjs/components/atoms/Icon/styled.js +1 -0
- package/dist/cjs/components/atoms/Icon/styled.js.map +1 -0
- package/dist/cjs/components/atoms/Input/Hint.js +1 -0
- package/dist/cjs/components/atoms/Input/Hint.js.map +1 -0
- package/dist/{types → cjs}/components/atoms/Input/InputContainer/InputContainer.d.ts +1 -0
- package/dist/cjs/components/atoms/Input/InputContainer/InputContainer.js +1 -0
- package/dist/cjs/components/atoms/Input/InputContainer/InputContainer.js.map +1 -0
- package/dist/cjs/components/atoms/Input/InputElement/InputElement.js +1 -0
- package/dist/cjs/components/atoms/Input/InputElement/InputElement.js.map +1 -0
- package/dist/cjs/components/atoms/Input/InputMaskElement/InputMaskElement.js +1 -0
- package/dist/cjs/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -0
- package/dist/cjs/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +1 -0
- package/dist/cjs/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -0
- package/dist/cjs/components/atoms/Input/PressableInputContainer/styled.js +1 -0
- package/dist/cjs/components/atoms/Input/PressableInputContainer/styled.js.map +1 -0
- package/dist/cjs/components/atoms/Input/hooks/useInputFocus.js +1 -0
- package/dist/cjs/components/atoms/Input/hooks/useInputFocus.js.map +1 -0
- package/dist/cjs/components/atoms/Input/hooks/useNumberMask.js +1 -0
- package/dist/cjs/components/atoms/Input/hooks/useNumberMask.js.map +1 -0
- package/dist/cjs/components/atoms/Input/hooks/useStringMask.js +1 -0
- package/dist/cjs/components/atoms/Input/hooks/useStringMask.js.map +1 -0
- package/dist/cjs/components/atoms/Input/styled.js +1 -0
- package/dist/cjs/components/atoms/Input/styled.js.map +1 -0
- package/dist/cjs/components/atoms/Paper/Paper.js +1 -0
- package/dist/cjs/components/atoms/Paper/Paper.js.map +1 -0
- package/dist/cjs/components/atoms/Paper/styled.js +1 -0
- package/dist/cjs/components/atoms/Paper/styled.js.map +1 -0
- package/dist/cjs/components/atoms/PressableSurface/PressableSurface.js +1 -0
- package/dist/cjs/components/atoms/PressableSurface/PressableSurface.js.map +1 -0
- package/dist/cjs/components/atoms/ProgressBar/ProgressBar.js +1 -0
- package/dist/cjs/components/atoms/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/cjs/components/atoms/ProgressBar/styled.js +1 -0
- package/dist/cjs/components/atoms/ProgressBar/styled.js.map +1 -0
- package/dist/cjs/components/atoms/RadioButton/RadioButton.js +1 -0
- package/dist/cjs/components/atoms/RadioButton/RadioButton.js.map +1 -0
- package/dist/cjs/components/atoms/RadioButton/styled.js +1 -0
- package/dist/cjs/components/atoms/RadioButton/styled.js.map +1 -0
- package/dist/cjs/components/atoms/Switch/Switch.js +1 -0
- package/dist/cjs/components/atoms/Switch/Switch.js.map +1 -0
- package/dist/cjs/components/atoms/Switch/animation.js +1 -0
- package/dist/cjs/components/atoms/Switch/animation.js.map +1 -0
- package/dist/cjs/components/atoms/Switch/styled.js +1 -0
- package/dist/cjs/components/atoms/Switch/styled.js.map +1 -0
- package/dist/cjs/components/atoms/Tag/Tag.js +1 -0
- package/dist/cjs/components/atoms/Tag/Tag.js.map +1 -0
- package/dist/cjs/components/atoms/Tag/styled.js +1 -0
- package/dist/cjs/components/atoms/Tag/styled.js.map +1 -0
- package/dist/{types → cjs}/components/atoms/Text/Text.d.ts +1 -0
- package/dist/cjs/components/atoms/Text/Text.js +1 -0
- package/dist/cjs/components/atoms/Text/Text.js.map +1 -0
- package/dist/cjs/components/atoms/Text/functions.js +1 -0
- package/dist/cjs/components/atoms/Text/functions.js.map +1 -0
- package/dist/cjs/components/atoms/Text/styled.js +1 -0
- package/dist/cjs/components/atoms/Text/styled.js.map +1 -0
- package/dist/cjs/components/atoms/shared/PaperAndCard.js +1 -0
- package/dist/cjs/components/atoms/shared/PaperAndCard.js.map +1 -0
- package/dist/cjs/components/molecules/Calendar/Calendar.js +1 -0
- package/dist/cjs/components/molecules/Calendar/Calendar.js.map +1 -0
- package/dist/cjs/components/molecules/Calendar/components/MonthWeek.js +1 -0
- package/dist/cjs/components/molecules/Calendar/components/MonthWeek.js.map +1 -0
- package/dist/cjs/components/molecules/Calendar/components/Weekdays.js +1 -0
- package/dist/cjs/components/molecules/Calendar/components/Weekdays.js.map +1 -0
- package/dist/cjs/components/molecules/Calendar/styled.js +1 -0
- package/dist/cjs/components/molecules/Calendar/styled.js.map +1 -0
- package/dist/cjs/components/molecules/DatePicker/DatePicker.js +1 -0
- package/dist/cjs/components/molecules/DatePicker/DatePicker.js.map +1 -0
- package/dist/cjs/components/molecules/DatePicker/styled.js +1 -0
- package/dist/cjs/components/molecules/DatePicker/styled.js.map +1 -0
- package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js +1 -0
- package/dist/cjs/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -0
- package/dist/cjs/components/molecules/DateTimePicker/styled.js +1 -0
- package/dist/cjs/components/molecules/DateTimePicker/styled.js.map +1 -0
- package/dist/cjs/components/molecules/DateTimeSelector/DateTimeSelector.js +1 -0
- package/dist/cjs/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -0
- package/dist/cjs/components/molecules/DateTimeSelector/Selector.js +1 -0
- package/dist/cjs/components/molecules/DateTimeSelector/Selector.js.map +1 -0
- package/dist/cjs/components/molecules/DateTimeSelector/styled.js +1 -0
- package/dist/cjs/components/molecules/DateTimeSelector/styled.js.map +1 -0
- package/dist/cjs/components/molecules/Grid/functions.js +1 -0
- package/dist/cjs/components/molecules/Grid/functions.js.map +1 -0
- package/dist/cjs/components/molecules/HintInputContainer/HintInputContainer.js +1 -0
- package/dist/cjs/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -0
- package/dist/cjs/components/molecules/IconTextButton/IconComponent.js +1 -0
- package/dist/cjs/components/molecules/IconTextButton/IconComponent.js.map +1 -0
- package/dist/cjs/components/molecules/InputPassword/InputPasswordIcon.js +1 -0
- package/dist/cjs/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -0
- package/dist/cjs/components/molecules/InputPassword/styled.js +1 -0
- package/dist/cjs/components/molecules/InputPassword/styled.js.map +1 -0
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js +1 -0
- package/dist/cjs/components/molecules/Snackbar/Snackbar.js.map +1 -0
- package/dist/cjs/components/molecules/Snackbar/styled.js +1 -0
- package/dist/cjs/components/molecules/Snackbar/styled.js.map +1 -0
- package/dist/cjs/components/molecules/TextArea/TextArea.js +1 -0
- package/dist/cjs/components/molecules/TextArea/TextArea.js.map +1 -0
- package/dist/cjs/components/molecules/TextArea/styled.js +1 -0
- package/dist/cjs/components/molecules/TextArea/styled.js.map +1 -0
- package/dist/cjs/hooks/useDebouncedState.js +1 -0
- package/dist/cjs/hooks/useDebouncedState.js.map +1 -0
- package/dist/cjs/hooks/useTheme.js +1 -0
- package/dist/cjs/hooks/useTheme.js.map +1 -0
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/styles/ThemeProvider.js +1 -0
- package/dist/cjs/styles/ThemeProvider.js.map +1 -0
- package/dist/cjs/styles/definitions.js +1 -0
- package/dist/cjs/styles/definitions.js.map +1 -0
- package/dist/cjs/styles/light.js +1 -0
- package/dist/cjs/styles/light.js.map +1 -0
- package/dist/cjs/utils/IPhoneXHelper.js +1 -0
- package/dist/cjs/utils/IPhoneXHelper.js.map +1 -0
- package/dist/cjs/utils/ResponsiveFontSize.js +1 -0
- package/dist/cjs/utils/ResponsiveFontSize.js.map +1 -0
- package/dist/cjs/utils/extractNumbersFromString.js +1 -0
- package/dist/cjs/utils/extractNumbersFromString.js.map +1 -0
- package/dist/cjs/utils/formatWithMask.js +1 -0
- package/dist/cjs/utils/formatWithMask.js.map +1 -0
- package/dist/cjs/utils/lightenDarkenColor.js +1 -0
- package/dist/cjs/utils/lightenDarkenColor.js.map +1 -0
- package/dist/cjs/utils/masks.js +1 -0
- package/dist/cjs/utils/masks.js.map +1 -0
- package/dist/cjs/utils/variantComplement.js +1 -0
- package/dist/cjs/utils/variantComplement.js.map +1 -0
- package/dist/esm/components/atoms/Avatar/Avatar.d.ts +14 -0
- package/dist/esm/components/atoms/Avatar/Avatar.js +1 -0
- package/dist/esm/components/atoms/Avatar/Avatar.js.map +1 -0
- package/dist/esm/components/atoms/Avatar/helpers.d.ts +1 -0
- package/dist/esm/components/atoms/Avatar/helpers.js +1 -0
- package/dist/esm/components/atoms/Avatar/helpers.js.map +1 -0
- package/dist/esm/components/atoms/Avatar/index.d.ts +2 -0
- package/dist/esm/components/atoms/Avatar/styled.d.ts +24 -0
- package/dist/esm/components/atoms/Avatar/styled.js +1 -0
- package/dist/esm/components/atoms/Avatar/styled.js.map +1 -0
- package/dist/esm/components/atoms/Badge/Badge.d.ts +12 -0
- package/dist/esm/components/atoms/Badge/Badge.js +1 -0
- package/dist/esm/components/atoms/Badge/Badge.js.map +1 -0
- package/dist/esm/components/atoms/Badge/index.d.ts +2 -0
- package/dist/esm/components/atoms/Badge/styled.d.ts +15 -0
- package/dist/esm/components/atoms/Badge/styled.js +1 -0
- package/dist/esm/components/atoms/Badge/styled.js.map +1 -0
- package/dist/esm/components/atoms/BoxContent/BoxContent.d.ts +7 -0
- package/dist/esm/components/atoms/BoxContent/BoxContent.js +1 -0
- package/dist/esm/components/atoms/BoxContent/BoxContent.js.map +1 -0
- package/dist/esm/components/atoms/BoxContent/index.d.ts +2 -0
- package/dist/esm/components/atoms/BoxContent/styled.d.ts +11 -0
- package/dist/esm/components/atoms/BoxContent/styled.js +1 -0
- package/dist/esm/components/atoms/BoxContent/styled.js.map +1 -0
- package/dist/esm/components/atoms/Button/Button.d.ts +28 -0
- package/dist/esm/components/atoms/Button/Button.js +1 -0
- package/dist/esm/components/atoms/Button/Button.js.map +1 -0
- package/dist/esm/components/atoms/Button/States/BaseState.d.ts +7 -0
- package/dist/esm/components/atoms/Button/States/BaseState.js +1 -0
- package/dist/esm/components/atoms/Button/States/BaseState.js.map +1 -0
- package/dist/esm/components/atoms/Button/States/Error.d.ts +4 -0
- package/dist/esm/components/atoms/Button/States/Error.js +1 -0
- package/dist/esm/components/atoms/Button/States/Error.js.map +1 -0
- package/dist/esm/components/atoms/Button/States/Loading.d.ts +4 -0
- package/dist/esm/components/atoms/Button/States/Loading.js +1 -0
- package/dist/esm/components/atoms/Button/States/Loading.js.map +1 -0
- package/dist/esm/components/atoms/Button/States/Success.d.ts +4 -0
- package/dist/esm/components/atoms/Button/States/Success.js +1 -0
- package/dist/esm/components/atoms/Button/States/Success.js.map +1 -0
- package/dist/esm/components/atoms/Button/States/index.d.ts +3 -0
- package/dist/esm/components/atoms/Button/States/styled.d.ts +7 -0
- package/dist/esm/components/atoms/Button/States/styled.js +1 -0
- package/dist/esm/components/atoms/Button/States/styled.js.map +1 -0
- package/dist/esm/components/atoms/Button/index.d.ts +3 -0
- package/dist/esm/components/atoms/Button/styled.d.ts +6 -0
- package/dist/esm/components/atoms/Button/styled.js +1 -0
- package/dist/esm/components/atoms/Button/styled.js.map +1 -0
- package/dist/esm/components/atoms/Card/Card.d.ts +10 -0
- package/dist/esm/components/atoms/Card/Card.js +1 -0
- package/dist/esm/components/atoms/Card/Card.js.map +1 -0
- package/dist/esm/components/atoms/Card/Footer/Footer.d.ts +8 -0
- package/dist/esm/components/atoms/Card/Footer/Footer.js +1 -0
- package/dist/esm/components/atoms/Card/Footer/Footer.js.map +1 -0
- package/dist/esm/components/atoms/Card/Footer/index.d.ts +2 -0
- package/dist/esm/components/atoms/Card/Header/Header.d.ts +8 -0
- package/dist/esm/components/atoms/Card/Header/Header.js +1 -0
- package/dist/esm/components/atoms/Card/Header/Header.js.map +1 -0
- package/dist/esm/components/atoms/Card/Header/index.d.ts +2 -0
- package/dist/esm/components/atoms/Card/index.d.ts +2 -0
- package/dist/esm/components/atoms/Card/styled.d.ts +1 -0
- package/dist/esm/components/atoms/Card/styled.js +1 -0
- package/dist/esm/components/atoms/Card/styled.js.map +1 -0
- package/dist/esm/components/atoms/Checkbox/Checkbox.d.ts +15 -0
- package/dist/esm/components/atoms/Checkbox/Checkbox.js +1 -0
- package/dist/esm/components/atoms/Checkbox/Checkbox.js.map +1 -0
- package/dist/esm/components/atoms/Checkbox/index.d.ts +2 -0
- package/dist/esm/components/atoms/Checkbox/styled.d.ts +23 -0
- package/dist/esm/components/atoms/Checkbox/styled.js +1 -0
- package/dist/esm/components/atoms/Checkbox/styled.js.map +1 -0
- package/dist/esm/components/atoms/Divider/Divider.d.ts +8 -0
- package/dist/esm/components/atoms/Divider/Divider.js +1 -0
- package/dist/esm/components/atoms/Divider/Divider.js.map +1 -0
- package/dist/esm/components/atoms/Divider/index.d.ts +2 -0
- package/dist/esm/components/atoms/Divider/styled.d.ts +1 -0
- package/dist/esm/components/atoms/Divider/styled.js +1 -0
- package/dist/esm/components/atoms/Divider/styled.js.map +1 -0
- package/dist/esm/components/atoms/GroupButton/GroupButton.d.ts +33 -0
- package/dist/esm/components/atoms/GroupButton/GroupButton.js +1 -0
- package/dist/esm/components/atoms/GroupButton/GroupButton.js.map +1 -0
- package/dist/esm/components/atoms/GroupButton/GroupButtonOption.d.ts +9 -0
- package/dist/esm/components/atoms/GroupButton/GroupButtonOption.js +1 -0
- package/dist/esm/components/atoms/GroupButton/GroupButtonOption.js.map +1 -0
- package/dist/esm/components/atoms/GroupButton/index.d.ts +4 -0
- package/dist/esm/components/atoms/GroupButton/styled.d.ts +38 -0
- package/dist/esm/components/atoms/GroupButton/styled.js +1 -0
- package/dist/esm/components/atoms/GroupButton/styled.js.map +1 -0
- package/dist/esm/components/atoms/Icon/AntDesign.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/AntDesign.js +1 -0
- package/dist/esm/components/atoms/Icon/AntDesign.js.map +1 -0
- package/dist/esm/components/atoms/Icon/Entypo.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/Entypo.js +1 -0
- package/dist/esm/components/atoms/Icon/Entypo.js.map +1 -0
- package/dist/esm/components/atoms/Icon/Evil.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/Evil.js +1 -0
- package/dist/esm/components/atoms/Icon/Evil.js.map +1 -0
- package/dist/esm/components/atoms/Icon/Feather.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/Feather.js +1 -0
- package/dist/esm/components/atoms/Icon/Feather.js.map +1 -0
- package/dist/esm/components/atoms/Icon/FontAwesome.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/FontAwesome.js +1 -0
- package/dist/esm/components/atoms/Icon/FontAwesome.js.map +1 -0
- package/dist/esm/components/atoms/Icon/FontAwesomeFive.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/FontAwesomeFive.js +1 -0
- package/dist/esm/components/atoms/Icon/FontAwesomeFive.js.map +1 -0
- package/dist/esm/components/atoms/Icon/Fontisto.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/Fontisto.js +1 -0
- package/dist/esm/components/atoms/Icon/Fontisto.js.map +1 -0
- package/dist/esm/components/atoms/Icon/Foundation.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/Foundation.js +1 -0
- package/dist/esm/components/atoms/Icon/Foundation.js.map +1 -0
- package/dist/esm/components/atoms/Icon/Icon.d.ts +15 -0
- package/dist/esm/components/atoms/Icon/Icon.js +1 -0
- package/dist/esm/components/atoms/Icon/Icon.js.map +1 -0
- package/dist/esm/components/atoms/Icon/Ionicon.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/Ionicon.js +1 -0
- package/dist/esm/components/atoms/Icon/Ionicon.js.map +1 -0
- package/dist/esm/components/atoms/Icon/Material.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/Material.js +1 -0
- package/dist/esm/components/atoms/Icon/Material.js.map +1 -0
- package/dist/esm/components/atoms/Icon/MaterialCommunity.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/MaterialCommunity.js +1 -0
- package/dist/esm/components/atoms/Icon/MaterialCommunity.js.map +1 -0
- package/dist/esm/components/atoms/Icon/Octicon.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/Octicon.js +1 -0
- package/dist/esm/components/atoms/Icon/Octicon.js.map +1 -0
- package/dist/esm/components/atoms/Icon/SimpleLine.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/SimpleLine.js +1 -0
- package/dist/esm/components/atoms/Icon/SimpleLine.js.map +1 -0
- package/dist/esm/components/atoms/Icon/Zocial.d.ts +4 -0
- package/dist/esm/components/atoms/Icon/Zocial.js +1 -0
- package/dist/esm/components/atoms/Icon/Zocial.js.map +1 -0
- package/dist/esm/components/atoms/Icon/functions.d.ts +6 -0
- package/dist/esm/components/atoms/Icon/functions.js +1 -0
- package/dist/esm/components/atoms/Icon/functions.js.map +1 -0
- package/dist/esm/components/atoms/Icon/index.d.ts +2 -0
- package/dist/esm/components/atoms/Icon/styled.d.ts +3 -0
- package/dist/esm/components/atoms/Icon/styled.js +1 -0
- package/dist/esm/components/atoms/Icon/styled.js.map +1 -0
- package/dist/esm/components/atoms/Icon/types.d.ts +12 -0
- package/dist/esm/components/atoms/Input/Hint.d.ts +10 -0
- package/dist/esm/components/atoms/Input/Hint.js +1 -0
- package/dist/esm/components/atoms/Input/Hint.js.map +1 -0
- package/dist/esm/components/atoms/Input/InputContainer/InputContainer.d.ts +30 -0
- package/dist/esm/components/atoms/Input/InputContainer/InputContainer.js +1 -0
- package/dist/esm/components/atoms/Input/InputContainer/InputContainer.js.map +1 -0
- package/dist/esm/components/atoms/Input/InputElement/InputElement.d.ts +13 -0
- package/dist/esm/components/atoms/Input/InputElement/InputElement.js +1 -0
- package/dist/esm/components/atoms/Input/InputElement/InputElement.js.map +1 -0
- package/dist/esm/components/atoms/Input/InputMaskElement/InputMaskElement.d.ts +16 -0
- package/dist/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js +1 -0
- package/dist/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -0
- package/dist/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.d.ts +11 -0
- package/dist/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +1 -0
- package/dist/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -0
- package/dist/esm/components/atoms/Input/PressableInputContainer/index.d.ts +2 -0
- package/dist/esm/components/atoms/Input/PressableInputContainer/styled.d.ts +5 -0
- package/dist/esm/components/atoms/Input/PressableInputContainer/styled.js +1 -0
- package/dist/esm/components/atoms/Input/PressableInputContainer/styled.js.map +1 -0
- package/dist/esm/components/atoms/Input/hooks/useInputFocus.d.ts +5 -0
- package/dist/esm/components/atoms/Input/hooks/useInputFocus.js +1 -0
- package/dist/esm/components/atoms/Input/hooks/useInputFocus.js.map +1 -0
- package/dist/esm/components/atoms/Input/hooks/useNumberMask.d.ts +8 -0
- package/dist/esm/components/atoms/Input/hooks/useNumberMask.js +1 -0
- package/dist/esm/components/atoms/Input/hooks/useNumberMask.js.map +1 -0
- package/dist/esm/components/atoms/Input/hooks/useStringMask.d.ts +8 -0
- package/dist/esm/components/atoms/Input/hooks/useStringMask.js +1 -0
- package/dist/esm/components/atoms/Input/hooks/useStringMask.js.map +1 -0
- package/dist/esm/components/atoms/Input/index.d.ts +13 -0
- package/dist/esm/components/atoms/Input/styled.d.ts +58 -0
- package/dist/esm/components/atoms/Input/styled.js +1 -0
- package/dist/esm/components/atoms/Input/styled.js.map +1 -0
- package/dist/esm/components/atoms/Paper/Paper.d.ts +9 -0
- package/dist/esm/components/atoms/Paper/Paper.js +1 -0
- package/dist/esm/components/atoms/Paper/Paper.js.map +1 -0
- package/dist/esm/components/atoms/Paper/index.d.ts +2 -0
- package/dist/esm/components/atoms/Paper/styled.d.ts +1 -0
- package/dist/esm/components/atoms/Paper/styled.js +1 -0
- package/dist/esm/components/atoms/Paper/styled.js.map +1 -0
- package/dist/esm/components/atoms/PressableSurface/PressableSurface.d.ts +11 -0
- package/dist/esm/components/atoms/PressableSurface/PressableSurface.js +1 -0
- package/dist/esm/components/atoms/PressableSurface/PressableSurface.js.map +1 -0
- package/dist/esm/components/atoms/PressableSurface/index.d.ts +2 -0
- package/dist/esm/components/atoms/ProgressBar/ProgressBar.d.ts +18 -0
- package/dist/esm/components/atoms/ProgressBar/ProgressBar.js +1 -0
- package/dist/esm/components/atoms/ProgressBar/ProgressBar.js.map +1 -0
- package/dist/esm/components/atoms/ProgressBar/index.d.ts +2 -0
- package/dist/esm/components/atoms/ProgressBar/styled.d.ts +18 -0
- package/dist/esm/components/atoms/ProgressBar/styled.js +1 -0
- package/dist/esm/components/atoms/ProgressBar/styled.js.map +1 -0
- package/dist/esm/components/atoms/RadioButton/RadioButton.d.ts +15 -0
- package/dist/esm/components/atoms/RadioButton/RadioButton.js +1 -0
- package/dist/esm/components/atoms/RadioButton/RadioButton.js.map +1 -0
- package/dist/esm/components/atoms/RadioButton/index.d.ts +2 -0
- package/dist/esm/components/atoms/RadioButton/styled.d.ts +27 -0
- package/dist/esm/components/atoms/RadioButton/styled.js +1 -0
- package/dist/esm/components/atoms/RadioButton/styled.js.map +1 -0
- package/dist/esm/components/atoms/Switch/Switch.d.ts +16 -0
- package/dist/esm/components/atoms/Switch/Switch.js +1 -0
- package/dist/esm/components/atoms/Switch/Switch.js.map +1 -0
- package/dist/esm/components/atoms/Switch/animation.d.ts +2 -0
- package/dist/esm/components/atoms/Switch/animation.js +1 -0
- package/dist/esm/components/atoms/Switch/animation.js.map +1 -0
- package/dist/esm/components/atoms/Switch/index.d.ts +3 -0
- package/dist/esm/components/atoms/Switch/styled.d.ts +4 -0
- package/dist/esm/components/atoms/Switch/styled.js +1 -0
- package/dist/esm/components/atoms/Switch/styled.js.map +1 -0
- package/dist/esm/components/atoms/Tag/Tag.d.ts +15 -0
- package/dist/esm/components/atoms/Tag/Tag.js +1 -0
- package/dist/esm/components/atoms/Tag/Tag.js.map +1 -0
- package/dist/esm/components/atoms/Tag/index.d.ts +2 -0
- package/dist/esm/components/atoms/Tag/styled.d.ts +22 -0
- package/dist/esm/components/atoms/Tag/styled.js +1 -0
- package/dist/esm/components/atoms/Tag/styled.js.map +1 -0
- package/dist/esm/components/atoms/Text/Text.d.ts +20 -0
- package/dist/esm/components/atoms/Text/Text.js +1 -0
- package/dist/esm/components/atoms/Text/Text.js.map +1 -0
- package/dist/esm/components/atoms/Text/functions.d.ts +2 -0
- package/dist/esm/components/atoms/Text/functions.js +1 -0
- package/dist/esm/components/atoms/Text/functions.js.map +1 -0
- package/dist/esm/components/atoms/Text/index.d.ts +2 -0
- package/dist/esm/components/atoms/Text/styled.d.ts +6 -0
- package/dist/esm/components/atoms/Text/styled.js +1 -0
- package/dist/esm/components/atoms/Text/styled.js.map +1 -0
- package/dist/esm/components/atoms/shared/PaperAndCard.d.ts +3 -0
- package/dist/esm/components/atoms/shared/PaperAndCard.js +1 -0
- package/dist/esm/components/atoms/shared/PaperAndCard.js.map +1 -0
- package/dist/esm/components/molecules/Calendar/Calendar.d.ts +20 -0
- package/dist/esm/components/molecules/Calendar/Calendar.js +1 -0
- package/dist/esm/components/molecules/Calendar/Calendar.js.map +1 -0
- package/dist/esm/components/molecules/Calendar/components/MonthWeek.d.ts +13 -0
- package/dist/esm/components/molecules/Calendar/components/MonthWeek.js +1 -0
- package/dist/esm/components/molecules/Calendar/components/MonthWeek.js.map +1 -0
- package/dist/esm/components/molecules/Calendar/components/Weekdays.d.ts +8 -0
- package/dist/esm/components/molecules/Calendar/components/Weekdays.js +1 -0
- package/dist/esm/components/molecules/Calendar/components/Weekdays.js.map +1 -0
- package/dist/esm/components/molecules/Calendar/components/index.d.ts +2 -0
- package/dist/esm/components/molecules/Calendar/index.d.ts +2 -0
- package/dist/esm/components/molecules/Calendar/styled.d.ts +55 -0
- package/dist/esm/components/molecules/Calendar/styled.js +1 -0
- package/dist/esm/components/molecules/Calendar/styled.js.map +1 -0
- package/dist/esm/components/molecules/DatePicker/DatePicker.d.ts +19 -0
- package/dist/esm/components/molecules/DatePicker/DatePicker.js +1 -0
- package/dist/esm/components/molecules/DatePicker/DatePicker.js.map +1 -0
- package/dist/esm/components/molecules/DatePicker/index.d.ts +3 -0
- package/dist/esm/components/molecules/DatePicker/styled.d.ts +11 -0
- package/dist/esm/components/molecules/DatePicker/styled.js +1 -0
- package/dist/esm/components/molecules/DatePicker/styled.js.map +1 -0
- package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.d.ts +17 -0
- package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js +1 -0
- package/dist/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -0
- package/dist/esm/components/molecules/DateTimePicker/index.d.ts +2 -0
- package/dist/esm/components/molecules/DateTimePicker/styled.d.ts +6 -0
- package/dist/esm/components/molecules/DateTimePicker/styled.js +1 -0
- package/dist/esm/components/molecules/DateTimePicker/styled.js.map +1 -0
- package/dist/esm/components/molecules/DateTimeSelector/DateTimeSelector.d.ts +28 -0
- package/dist/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +1 -0
- package/dist/esm/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -0
- package/dist/esm/components/molecules/DateTimeSelector/Selector.d.ts +17 -0
- package/dist/esm/components/molecules/DateTimeSelector/Selector.js +1 -0
- package/dist/esm/components/molecules/DateTimeSelector/Selector.js.map +1 -0
- package/dist/esm/components/molecules/DateTimeSelector/index.d.ts +2 -0
- package/dist/esm/components/molecules/DateTimeSelector/styled.d.ts +48 -0
- package/dist/esm/components/molecules/DateTimeSelector/styled.js +1 -0
- package/dist/esm/components/molecules/DateTimeSelector/styled.js.map +1 -0
- package/dist/esm/components/molecules/Grid/functions.d.ts +3 -0
- package/dist/esm/components/molecules/Grid/functions.js +1 -0
- package/dist/esm/components/molecules/Grid/functions.js.map +1 -0
- package/dist/esm/components/molecules/Grid/index.d.ts +42 -0
- package/dist/esm/components/molecules/HintInputContainer/HintInputContainer.d.ts +17 -0
- package/dist/esm/components/molecules/HintInputContainer/HintInputContainer.js +1 -0
- package/dist/esm/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -0
- package/dist/esm/components/molecules/HintInputContainer/index.d.ts +2 -0
- package/dist/esm/components/molecules/HintInputContainer/styled.d.ts +0 -0
- package/dist/esm/components/molecules/IconTextButton/IconComponent.d.ts +9 -0
- package/dist/esm/components/molecules/IconTextButton/IconComponent.js +1 -0
- package/dist/esm/components/molecules/IconTextButton/IconComponent.js.map +1 -0
- package/dist/esm/components/molecules/IconTextButton/IconTextButton.d.ts +8 -0
- package/dist/esm/components/molecules/IconTextButton/index.d.ts +2 -0
- package/dist/esm/components/molecules/InputPassword/InputPasswordIcon.d.ts +8 -0
- package/dist/esm/components/molecules/InputPassword/InputPasswordIcon.js +1 -0
- package/dist/esm/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -0
- package/dist/esm/components/molecules/InputPassword/index.d.ts +1 -0
- package/dist/esm/components/molecules/InputPassword/styled.d.ts +5 -0
- package/dist/esm/components/molecules/InputPassword/styled.js +1 -0
- package/dist/esm/components/molecules/InputPassword/styled.js.map +1 -0
- package/dist/esm/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +11 -0
- package/dist/esm/components/molecules/LabeledSwitch/index.d.ts +1 -0
- package/dist/esm/components/molecules/Snackbar/Snackbar.d.ts +21 -0
- package/dist/esm/components/molecules/Snackbar/Snackbar.js +1 -0
- package/dist/esm/components/molecules/Snackbar/Snackbar.js.map +1 -0
- package/dist/esm/components/molecules/Snackbar/index.d.ts +2 -0
- package/dist/esm/components/molecules/Snackbar/styled.d.ts +41 -0
- package/dist/esm/components/molecules/Snackbar/styled.js +1 -0
- package/dist/esm/components/molecules/Snackbar/styled.js.map +1 -0
- package/dist/esm/components/molecules/TextArea/TextArea.d.ts +14 -0
- package/dist/esm/components/molecules/TextArea/TextArea.js +1 -0
- package/dist/esm/components/molecules/TextArea/TextArea.js.map +1 -0
- package/dist/esm/components/molecules/TextArea/index.d.ts +3 -0
- package/dist/esm/components/molecules/TextArea/styled.d.ts +2 -0
- package/dist/esm/components/molecules/TextArea/styled.js +1 -0
- package/dist/esm/components/molecules/TextArea/styled.js.map +1 -0
- package/dist/esm/hooks/index.d.ts +2 -0
- package/dist/esm/hooks/useDebouncedState.d.ts +2 -0
- package/dist/esm/hooks/useDebouncedState.js +1 -0
- package/dist/esm/hooks/useDebouncedState.js.map +1 -0
- package/dist/esm/hooks/useTheme.d.ts +2 -0
- package/dist/esm/hooks/useTheme.js +1 -0
- package/dist/esm/hooks/useTheme.js.map +1 -0
- package/dist/esm/index.d.ts +64 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/styles/ThemeProvider.d.ts +4 -0
- package/dist/esm/styles/ThemeProvider.js +1 -0
- package/dist/esm/styles/ThemeProvider.js.map +1 -0
- package/dist/esm/styles/definitions.d.ts +45 -0
- package/dist/esm/styles/definitions.js +1 -0
- package/dist/esm/styles/definitions.js.map +1 -0
- package/dist/esm/styles/light.d.ts +2 -0
- package/dist/esm/styles/light.js +1 -0
- package/dist/esm/styles/light.js.map +1 -0
- package/dist/esm/types/defaults.d.ts +134 -0
- package/dist/esm/utils/IPhoneXHelper.d.ts +4 -0
- package/dist/esm/utils/IPhoneXHelper.js +1 -0
- package/dist/esm/utils/IPhoneXHelper.js.map +1 -0
- package/dist/esm/utils/ResponsiveFontSize.d.ts +3 -0
- package/dist/esm/utils/ResponsiveFontSize.js +1 -0
- package/dist/esm/utils/ResponsiveFontSize.js.map +1 -0
- package/dist/esm/utils/extractNumbersFromString.d.ts +2 -0
- package/dist/esm/utils/extractNumbersFromString.js +1 -0
- package/dist/esm/utils/extractNumbersFromString.js.map +1 -0
- package/dist/esm/utils/formatWithMask.d.ts +3 -0
- package/dist/esm/utils/formatWithMask.js +1 -0
- package/dist/esm/utils/formatWithMask.js.map +1 -0
- package/dist/esm/utils/index.d.ts +7 -0
- package/dist/esm/utils/lightenDarkenColor.d.ts +1 -0
- package/dist/esm/utils/lightenDarkenColor.js +1 -0
- package/dist/esm/utils/lightenDarkenColor.js.map +1 -0
- package/dist/esm/utils/masks.d.ts +11 -0
- package/dist/esm/utils/masks.js +1 -0
- package/dist/esm/utils/masks.js.map +1 -0
- package/dist/esm/utils/variantComplement.d.ts +6 -0
- package/dist/esm/utils/variantComplement.js +1 -0
- package/dist/esm/utils/variantComplement.js.map +1 -0
- package/package.json +6 -4
- /package/dist/{types → cjs}/components/atoms/Avatar/Avatar.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Avatar/Avatar.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Avatar/helpers.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Avatar/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Avatar/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Badge/Badge.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Badge/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Badge/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/BoxContent/BoxContent.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/BoxContent/BoxContent.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/BoxContent/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/BoxContent/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Button/Button.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Button/States/BaseState.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Button/States/Error.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Button/States/Loading.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Button/States/Success.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Button/States/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Button/States/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Button/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Button/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Card/Card.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Card/Card.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Card/Footer/Footer.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Card/Footer/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Card/Header/Header.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Card/Header/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Card/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Card/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Checkbox/Checkbox.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Checkbox/Checkbox.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Checkbox/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Checkbox/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Divider/Divider.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Divider/Divider.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Divider/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Divider/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/GroupButton/GroupButton.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/GroupButton/GroupButton.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/GroupButton/GroupButtonOption.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/GroupButton/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/GroupButton/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/AntDesign.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/Entypo.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/Evil.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/Feather.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/FontAwesome.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/FontAwesomeFive.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/Fontisto.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/Foundation.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/Icon.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/Icon.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/Ionicon.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/Material.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/MaterialCommunity.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/Octicon.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/SimpleLine.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/Zocial.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/functions.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Icon/types.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Input/Hint.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Input/InputElement/InputElement.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Input/InputMaskElement/InputMaskElement.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Input/PressableInputContainer/PressableInputContainer.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Input/PressableInputContainer/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Input/PressableInputContainer/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Input/hooks/useInputFocus.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Input/hooks/useNumberMask.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Input/hooks/useStringMask.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Input/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Input/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Paper/Paper.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Paper/Paper.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Paper/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Paper/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/PressableSurface/PressableSurface.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/PressableSurface/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/ProgressBar/ProgressBar.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/ProgressBar/ProgressBar.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/ProgressBar/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/ProgressBar/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/RadioButton/RadioButton.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/RadioButton/RadioButton.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/RadioButton/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/RadioButton/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Switch/Switch.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Switch/Switch.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Switch/animation.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Switch/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Switch/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Tag/Tag.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Tag/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Tag/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Text/Text.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Text/functions.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Text/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/Text/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/atoms/shared/PaperAndCard.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/Calendar/Calendar.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/Calendar/Calendar.stories.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/Calendar/components/MonthWeek.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/Calendar/components/Weekdays.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/Calendar/components/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/Calendar/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/Calendar/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/DatePicker/DatePicker.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/DatePicker/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/DatePicker/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/DateTimePicker/DateTimePicker.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/DateTimePicker/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/DateTimePicker/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/DateTimeSelector/DateTimeSelector.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/DateTimeSelector/Selector.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/DateTimeSelector/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/DateTimeSelector/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/Grid/functions.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/Grid/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/HintInputContainer/HintInputContainer.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/HintInputContainer/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/HintInputContainer/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/IconTextButton/IconComponent.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/IconTextButton/IconTextButton.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/IconTextButton/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/InputPassword/InputPasswordIcon.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/InputPassword/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/InputPassword/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/LabeledSwitch/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/Snackbar/Snackbar.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/Snackbar/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/Snackbar/styled.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/TextArea/TextArea.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/TextArea/index.d.ts +0 -0
- /package/dist/{types → cjs}/components/molecules/TextArea/styled.d.ts +0 -0
- /package/dist/{types → cjs}/hooks/index.d.ts +0 -0
- /package/dist/{types → cjs}/hooks/useDebouncedState.d.ts +0 -0
- /package/dist/{types → cjs}/hooks/useTheme.d.ts +0 -0
- /package/dist/{types → cjs}/index.d.ts +0 -0
- /package/dist/{types → cjs}/styles/ThemeProvider.d.ts +0 -0
- /package/dist/{types → cjs}/styles/definitions.d.ts +0 -0
- /package/dist/{types → cjs}/styles/light.d.ts +0 -0
- /package/dist/{types → cjs}/types/defaults.d.ts +0 -0
- /package/dist/{types → cjs}/utils/IPhoneXHelper.d.ts +0 -0
- /package/dist/{types → cjs}/utils/ResponsiveFontSize.d.ts +0 -0
- /package/dist/{types → cjs}/utils/extractNumbersFromString.d.ts +0 -0
- /package/dist/{types → cjs}/utils/formatWithMask.d.ts +0 -0
- /package/dist/{types → cjs}/utils/index.d.ts +0 -0
- /package/dist/{types → cjs}/utils/lightenDarkenColor.d.ts +0 -0
- /package/dist/{types → cjs}/utils/masks.d.ts +0 -0
- /package/dist/{types → cjs}/utils/variantComplement.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../../src/components/atoms/Input/PressableInputContainer/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\n\nexport const StyledPressableSurface = styled.Pressable`\n width: 100%;\n`;\n"],"names":[],"mappings":";;AAEO,MAAM,yBAAyB,MAAO,CAAA,SAAA,CAAA;AAAA;AAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInputFocus.js","sources":["../../../../../../src/components/atoms/Input/hooks/useInputFocus.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport const useInputFocus = (\n onFocus?: () => void,\n onBlur?: () => void,\n focusEnabled = true\n) => {\n const [focused, setFocused] = useState<boolean>(false);\n\n const handleFocus = useCallback(() => {\n if (focusEnabled) {\n setFocused(true);\n onFocus && onFocus();\n }\n }, [focusEnabled, setFocused, onFocus]);\n\n const handleBlur = useCallback(() => {\n if (focusEnabled) {\n setFocused(false);\n onBlur && onBlur();\n }\n }, [focusEnabled, setFocused, onBlur]);\n\n return {\n focused,\n handleBlur,\n handleFocus,\n };\n};\n"],"names":[],"mappings":";;AAEO,MAAM,aAAgB,GAAA,CAC3B,OACA,EAAA,MAAA,EACA,eAAe,IACZ,KAAA;AACH,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,SAAkB,KAAK,CAAA,CAAA;AAErD,EAAM,MAAA,WAAA,GAAc,YAAY,MAAM;AACpC,IAAA,IAAI,YAAc,EAAA;AAChB,MAAA,UAAA,CAAW,IAAI,CAAA,CAAA;AACf,MAAA,OAAA,IAAW,OAAQ,EAAA,CAAA;AAAA,KACrB;AAAA,GACC,EAAA,CAAC,YAAc,EAAA,UAAA,EAAY,OAAO,CAAC,CAAA,CAAA;AAEtC,EAAM,MAAA,UAAA,GAAa,YAAY,MAAM;AACnC,IAAA,IAAI,YAAc,EAAA;AAChB,MAAA,UAAA,CAAW,KAAK,CAAA,CAAA;AAChB,MAAA,MAAA,IAAU,MAAO,EAAA,CAAA;AAAA,KACnB;AAAA,GACC,EAAA,CAAC,YAAc,EAAA,UAAA,EAAY,MAAM,CAAC,CAAA,CAAA;AAErC,EAAO,OAAA;AAAA,IACL,OAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,GACF,CAAA;AACF;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import currency from 'currency.js';
|
|
2
|
+
import { MaskValue } from './useStringMask';
|
|
3
|
+
export type CurrencyOptions = currency.Options;
|
|
4
|
+
export declare const getInternalNumberAndMask: (value: string | number, options?: CurrencyOptions) => {
|
|
5
|
+
internalNumber: number;
|
|
6
|
+
mergedOptions: CurrencyOptions;
|
|
7
|
+
};
|
|
8
|
+
export declare const useNumberMask: (options?: CurrencyOptions, defaultValue?: string | number) => [MaskValue, (value: string | number) => void];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNumberMask.js","sources":["../../../../../../src/components/atoms/Input/hooks/useNumberMask.ts"],"sourcesContent":["import currency from 'currency.js';\nimport { useCallback, useState } from 'react';\nimport { extractNumbersFromString } from '../../../../utils/extractNumbersFromString';\nimport { MaskValue } from './useStringMask';\n\nexport type CurrencyOptions = currency.Options;\n\nconst DEFAULT_OPTIONS: CurrencyOptions = {\n symbol: 'R$ ',\n separator: '.',\n decimal: ',',\n precision: 2,\n};\n\nconst getRegex = (precision: number) =>\n new RegExp(`\\\\B(?=(\\\\d{${precision}})(?!\\\\d))`, 'g');\n\nexport const getInternalNumberAndMask = (\n value: string | number,\n options?: CurrencyOptions\n): { internalNumber: number; mergedOptions: CurrencyOptions } => {\n const mergedOptions = { ...DEFAULT_OPTIONS, ...options };\n const { precision = -1 } = mergedOptions;\n\n let internalNumber;\n\n if (typeof value === 'number') {\n if (precision) {\n let stringValue = String(value);\n const decimalIndex = stringValue.indexOf('.');\n const currentPrecision = decimalIndex + precision;\n if (decimalIndex !== -1 && currentPrecision <= stringValue.length) {\n const zeros = stringValue.length + 1 - currentPrecision;\n for (let i = 0; i < zeros; i++) stringValue = stringValue + `0`;\n }\n internalNumber = Number(stringValue);\n } else {\n internalNumber = value;\n }\n } else {\n const onlyNumbers = String(extractNumbersFromString(value));\n const padZeros = String(onlyNumbers).padStart(precision + 1, '0');\n internalNumber = Number(padZeros.replace(getRegex(precision), '.'));\n }\n\n if (internalNumber > Number.MAX_SAFE_INTEGER) {\n internalNumber = Number.MAX_SAFE_INTEGER;\n }\n\n if (internalNumber < Number.MIN_SAFE_INTEGER) {\n internalNumber = Number.MIN_SAFE_INTEGER;\n }\n\n return {\n internalNumber,\n mergedOptions,\n };\n};\n\n/**\n * TODO:\n * @param options\n * @param defaultValue\n * @returns\n */\nexport const useNumberMask = (\n options?: CurrencyOptions,\n defaultValue?: string | number\n): [MaskValue, (value: string | number) => void] => {\n const applyMask = useCallback(\n (value: string | number = 0): MaskValue => {\n const { internalNumber, mergedOptions } = getInternalNumberAndMask(\n value,\n options\n );\n\n return {\n raw: internalNumber,\n formatted: currency(internalNumber).format(mergedOptions),\n };\n },\n [options, getRegex]\n );\n\n const [value, setValue] = useState<MaskValue>(applyMask(defaultValue));\n\n const handleChangeValue = useCallback(\n (formattedValue: string | number) => {\n const { raw, formatted } = applyMask(formattedValue);\n setValue({\n raw,\n formatted,\n });\n },\n [applyMask, setValue]\n );\n\n return [value, handleChangeValue];\n};\n"],"names":["value"],"mappings":";;;;AAOA,MAAM,eAAmC,GAAA;AAAA,EACvC,MAAQ,EAAA,KAAA;AAAA,EACR,SAAW,EAAA,GAAA;AAAA,EACX,OAAS,EAAA,GAAA;AAAA,EACT,SAAW,EAAA,CAAA;AACb,CAAA,CAAA;AAEA,MAAM,QAAA,GAAW,CAAC,SAChB,KAAA,IAAI,OAAO,CAAc,WAAA,EAAA,SAAS,cAAc,GAAG,CAAA,CAAA;AAExC,MAAA,wBAAA,GAA2B,CACtC,KAAA,EACA,OAC+D,KAAA;AAC/D,EAAA,MAAM,aAAgB,GAAA,EAAE,GAAG,eAAA,EAAiB,GAAG,OAAQ,EAAA,CAAA;AACvD,EAAM,MAAA,EAAE,SAAY,GAAA,CAAA,CAAA,EAAO,GAAA,aAAA,CAAA;AAE3B,EAAI,IAAA,cAAA,CAAA;AAEJ,EAAI,IAAA,OAAO,UAAU,QAAU,EAAA;AAC7B,IAAA,IAAI,SAAW,EAAA;AACb,MAAI,IAAA,WAAA,GAAc,OAAO,KAAK,CAAA,CAAA;AAC9B,MAAM,MAAA,YAA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AAA,MAAM,SAAY,GAAA,WAAA;AAAA,IAChB,CAACA,SAAyB,CAAiB,KAAA;AACzC,MAAM,MAAA,EAAE,cAAgB,EAAA,aAAA,EAAkB,GAAA,wBAAA;AAAA,QACxCA,MAAAA;AAAA,QACA,OAAA;AAAA,OACF,CAAA;AAEA,MAAO,OAAA;AAAA,QACL,GAAK,EAAA,cAAA;AAAA,QACL,SAAW,EAAA,QAAA,CAAS,cAAc,CAAA,CAAE,OAAO,aAAa,CAAA;AAAA,OAC1D,CAAA;AAAA,KACF;AAAA,IACA,CAAC,SAAS,QAAQ,CAAA;AAAA,GACpB,CAAA;AAEA,EAAA,MAAM,CAAC,KAAO,EAAA,QAAQ,IAAI,QAAoB,CAAA,SAAA,CAAU,YAAY,CAAC,CAAA,CAAA;AAErE,EAAA,MAAM,iBAAoB,GAAA,WAAA;AAAA,IACxB,CAAC,cAAoC,KAAA;AACnC,MAAA,MAAM,EAAE,GAAA,EAAK,SAAU,EAAA,GAAI,UAAU,cAAc,CAAA,CAAA;AACnD,MAAS,QAAA,CAAA;AAAA,QACP,GAAA;AAAA,QACA,SAAA;AAAA,OACD,CAAA,CAAA;AAAA,KACH;AAAA,IACA,CAAC,WAAW,QAAQ,CAAA;AAAA,GACtB,CAAA;AAEA,EAAO,OAAA,CAAC,OAAO,iBAAiB,CAAA,CAAA;AAClC;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface MaskValue {
|
|
2
|
+
formatted?: string;
|
|
3
|
+
raw?: string | number;
|
|
4
|
+
}
|
|
5
|
+
export type MaskType = string | RegExp | Array<RegExp>;
|
|
6
|
+
export declare const mergeMask: (value: string | undefined, mask: MaskType[]) => MaskValue;
|
|
7
|
+
export declare const getMask: (mask: MaskType[] | ((value: string) => MaskType[]), newValue: string) => MaskType[];
|
|
8
|
+
export declare const useStringMask: (mask: MaskType[] | ((value: string) => MaskType[]), defaultValue?: string | number) => [MaskValue, (text: string | number) => void];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStringMask.js","sources":["../../../../../../src/components/atoms/Input/hooks/useStringMask.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport interface MaskValue {\n formatted?: string;\n raw?: string | number;\n}\n\nexport type MaskType = string | RegExp | Array<RegExp>;\n\n/**\n * TODO:\n * @param value\n * @param mask\n * @returns\n */\nexport const mergeMask = (value = '', mask: MaskType[]): MaskValue => {\n let formatted = '';\n let raw = '';\n let iMask = 0;\n let iChars = 0;\n\n while (!(iMask === mask.length || iChars === value.length)) {\n const maskChar = mask[iMask];\n const valueChar = value[iChars];\n\n if (maskChar === valueChar) {\n formatted += maskChar;\n iChars++;\n iMask++;\n continue;\n }\n\n const rawValueChar = value[iChars];\n\n if (typeof maskChar === 'object') {\n iChars++;\n\n const maskCharRegex = Array.isArray(maskChar) ? maskChar[0] : maskChar;\n const matchRegex = RegExp(maskCharRegex).test(valueChar);\n\n if (matchRegex) {\n formatted += valueChar;\n raw += rawValueChar;\n iMask++;\n }\n } else {\n formatted += maskChar;\n iMask++;\n }\n }\n\n return { raw, formatted };\n};\n\nexport const getMask = (\n mask: MaskType[] | ((value: string) => MaskType[]),\n newValue: string\n): MaskType[] => {\n let maskArray: MaskType[];\n const regexArray: MaskType[] = [];\n\n if (typeof mask === 'function') {\n maskArray = mask(newValue);\n } else {\n maskArray = mask;\n }\n\n maskArray.forEach(exp => {\n if (typeof exp !== 'string') {\n if (Array.isArray(exp)) regexArray.push(exp);\n else regexArray.push(exp);\n } else {\n for (let i = 0; i < exp.length; i++) {\n if (exp[i] === '\\\\') {\n regexArray.push(exp[i + 1]);\n i++;\n } else {\n if (exp[i] === '9') regexArray.push(/\\d/);\n else if (exp[i] === 'a') regexArray.push(/[a-zA-Z]/);\n else regexArray.push(exp[i]);\n }\n }\n }\n });\n\n return regexArray;\n};\n\n/**\n * TODO:\n * @param mask\n * @param defaultValue\n * @returns\n */\nexport const useStringMask = (\n mask: MaskType[] | ((value: string) => MaskType[]),\n defaultValue?: string | number\n): [MaskValue, (text: string | number) => void] => {\n const applyMask = useCallback(\n (value = ''): MaskValue => {\n const selectedMask = getMask(mask, value);\n const { formatted, raw } = mergeMask(value, selectedMask);\n\n return {\n raw,\n formatted,\n };\n },\n [mask]\n );\n\n const [value, setValue] = useState<MaskValue>(\n applyMask(defaultValue?.toString())\n );\n\n const handleChangeValue = useCallback(\n (formattedValue: string | number) => {\n const { raw, formatted } = applyMask(formattedValue?.toString());\n setValue({\n raw,\n formatted,\n });\n },\n [applyMask, setValue]\n );\n\n return [value, handleChangeValue];\n};\n"],"names":["value"],"mappings":";;AAeO,MAAM,SAAY,GAAA,CAAC,KAAQ,GAAA,EAAA,EAAI,IAAgC,KAAA;AACpE,EAAA,IAAI,SAAY,GAAA,EAAA,CAAA;AAChB,EAAA,IAAI,GAAM,GAAA,EAAA,CAAA;AACV,EAAA,IAAI,KAAQ,GAAA,CAAA,CAAA;AACZ,EAAA,IAAI,MAAS,GAAA,CAAA,CAAA;AAEb,EAAA,OAAO,EAAE,KAAU,KAAA,IAAA,CAAK,MAAU,IAAA,MAAA,KAAW,MAAM,MAAS,CAAA,EAAA;AAC1D,IAAM,MAAA,QAAA,GAAW,KAAK,KAAK,CAAA,CAAA;AAC3B,IAAM,MAAA,SAAA,GAAY,MAAM,MAAM,CAAA,CAAA;AAE9B,IAAA,IAAI,aAAa,SAAW,EAAA;AAC1B,MAAa,SAAA,IAAA,QAAA,CAAA;AACb,MAAA,MAAA,EAAA,CAAA;AACA,MAAA,KAAA,EAAA,CAAA;AACA,MAAA,SAAA;AAAA,KACF;AAEA,IAAM,MAAA,YAAA,GAAe,MAAM,MAAM,CAAA,CAAA;AAEjC,IAAI,IAAA,OAAO,aAAa,QAAU,EAAA;AAChC,MAAA,MAAA,EAAA,CAAA;AAEA,MAAA,MAAM,gBAAgB,KAAM,CAAA,OAAA,CAAQ,QAAQ,CAAI,GAAA,QAAA,CAAS,CAAC,CAAI,GAAA,QAAA,CAAA;AAC9D,M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O,OAAA,CAAC,OAAO,iBAAiB,CAAA,CAAA;AAClC;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { default as Hint } from './Hint';
|
|
2
|
+
export * from './hooks/useInputFocus';
|
|
3
|
+
export * from './hooks/useNumberMask';
|
|
4
|
+
export * from './hooks/useStringMask';
|
|
5
|
+
export { default as InputContainer } from './InputContainer/InputContainer';
|
|
6
|
+
export type { InputContainerProps, InputVariantType, } from './InputContainer/InputContainer';
|
|
7
|
+
export { default as InputElement } from './InputElement/InputElement';
|
|
8
|
+
export type { InputElementProps } from './InputElement/InputElement';
|
|
9
|
+
export { default as InputMaskElement } from './InputMaskElement/InputMaskElement';
|
|
10
|
+
export type { InputMaskElementProps } from './InputMaskElement/InputMaskElement';
|
|
11
|
+
export { PressableInputContainer } from './PressableInputContainer';
|
|
12
|
+
export type { PressableInputContainerProps } from './PressableInputContainer';
|
|
13
|
+
export { StyledBorderKeeper, disabledInputStyles } from './styled';
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextInput } from 'react-native';
|
|
3
|
+
import { InputElementProps } from '.';
|
|
4
|
+
import { StyleProps } from '../../../types/defaults';
|
|
5
|
+
import { InputContainerProps } from './InputContainer/InputContainer';
|
|
6
|
+
export declare const disabledInputStyles: ({ disabled, theme, }: Partial<InputContainerProps> & Partial<StyleProps>) => false | import("@emotion/native").ReactNativeStyle | undefined;
|
|
7
|
+
export declare const StyledIconContent: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
as?: import("react").ElementType<any> | undefined;
|
|
10
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
11
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const StyledInputContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
14
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
15
|
+
as?: import("react").ElementType<any> | undefined;
|
|
16
|
+
} & Partial<InputContainerProps> & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
17
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const StyledInputElementBase: import("@emotion/native").StyledComponent<import("react-native").TextInputProps & {
|
|
20
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
21
|
+
as?: import("react").ElementType<any> | undefined;
|
|
22
|
+
} & InputElementProps & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
23
|
+
ref?: import("react").Ref<TextInput> | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const StyledLabelContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
26
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
27
|
+
as?: import("react").ElementType<any> | undefined;
|
|
28
|
+
} & Partial<InputContainerProps> & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
29
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const StyledBorderKeeper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
32
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
33
|
+
as?: import("react").ElementType<any> | undefined;
|
|
34
|
+
} & Partial<InputContainerProps> & Partial<import("../../../types/defaults").ThemeProviderProps> & {
|
|
35
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
36
|
+
} & {
|
|
37
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
38
|
+
as?: import("react").ElementType<any> | undefined;
|
|
39
|
+
}, {}, {}>;
|
|
40
|
+
export declare const StyledInputElement: import("@emotion/native").StyledComponent<import("react-native").TextInputProps & {
|
|
41
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
42
|
+
as?: import("react").ElementType<any> | undefined;
|
|
43
|
+
} & InputElementProps & Partial<import("../../../types/defaults").ThemeProviderProps> & {
|
|
44
|
+
ref?: import("react").Ref<TextInput> | undefined;
|
|
45
|
+
} & {
|
|
46
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
47
|
+
as?: import("react").ElementType<any> | undefined;
|
|
48
|
+
}, {}, {}>;
|
|
49
|
+
export declare const StyledHintContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
50
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
51
|
+
as?: import("react").ElementType<any> | undefined;
|
|
52
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
53
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
54
|
+
}>;
|
|
55
|
+
export declare const StyledHintIcon: import("@emotion/native").StyledComponent<import("../Icon").IconProps & {
|
|
56
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
57
|
+
as?: import("react").ElementType<any> | undefined;
|
|
58
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
|
|
@@ -93,3 +93,4 @@ const StyledHintIcon = styled(Icon)`
|
|
|
93
93
|
`;
|
|
94
94
|
|
|
95
95
|
export { StyledBorderKeeper, StyledHintContainer, StyledHintIcon, StyledIconContent, StyledInputContainer, StyledInputElement, StyledInputElementBase, StyledLabelContainer, disabledInputStyles };
|
|
96
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../src/components/atoms/Input/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { TextInput } from 'react-native';\nimport { InputElementProps } from '.';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils/ResponsiveFontSize';\nimport { InputContainerProps } from './InputContainer/InputContainer';\nimport { Icon } from '../Icon';\nconst leftIconStyles = ({\n leftComponent,\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n !leftComponent &&\n css`\n padding-left: ${theme.spacing.centi};\n `;\n\nconst rightIconStyles = ({\n rightComponent,\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n !rightComponent &&\n css`\n padding-right: ${theme.spacing.centi};\n `;\n\nconst disabledContainerStyles = ({\n disabled,\n}: Partial<InputContainerProps> & StyleProps) =>\n disabled &&\n css`\n background-color: transparent;\n `;\n\nexport const disabledInputStyles = ({\n disabled,\n theme,\n}: Partial<InputContainerProps> & Partial<StyleProps>) =>\n disabled &&\n css`\n color: ${theme?.color.secondary.light};\n `;\n\nconst focusedStyles = ({\n focused,\n borderColor = 'secondary',\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n focused &&\n css`\n border-width: ${theme.borderWidth.nano};\n border-color: ${theme.color[borderColor].dark};\n `;\n\nexport const StyledIconContent = styled.View<Partial<StyleProps>>`\n z-index: ${({ theme }) => theme.zIndex.default};\n flex-direction: row;\n align-items: center;\n`;\n\nexport const StyledInputContainer = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>`\n flex-direction: row;\n align-items: center;\n min-height: ${RFValueStr('44px')};\n`;\n\nexport const StyledInputElementBase = styled(TextInput)<\n InputElementProps & Partial<StyleProps>\n>`\n font-family: ${({ theme }) => `'${theme.font.stack.default}'`};\n font-size: ${({ theme }) => theme.typography.base.fontSize};\n font-weight: ${({ theme }) => theme.font.weight.bold};\n color: ${({ theme }) => theme.font.color.dark};\n`;\n\nexport const StyledLabelContainer = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>(\n props => css`\n flex: 1;\n padding: ${props.theme.spacing.micro} 0;\n ${leftIconStyles(props)}\n ${rightIconStyles(props)}\n `\n);\n\nconst StyledBorderKeeperBase = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>`\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n border-color: ${({\n theme,\n borderColor = 'secondary',\n borderColorGradation = 'light',\n }) => theme.color[borderColor][borderColorGradation]};\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n border-width: ${({ theme }) => theme.borderWidth.pico};\n position: absolute;\n width: 100%;\n height: 100%;\n`;\n\nexport const StyledBorderKeeper = styled(StyledBorderKeeperBase)<\n Partial<StyleProps>\n>(\n props => css`\n ${focusedStyles(props)}\n ${disabledContainerStyles(props)}\n `\n);\n\nexport const StyledInputElement = styled(StyledInputElementBase)<\n InputElementProps & Partial<StyleProps>\n>(\n props => css`\n width: 100%;\n ${disabledInputStyles(props)}\n `\n);\n\nexport const StyledHintContainer = styled.View<Partial<StyleProps>>`\n margin-top: ${({ theme }) => theme.spacing.micro};\n flex-direction: row;\n align-items: center;\n`;\n\nexport const StyledHintIcon = styled(Icon)<Partial<StyleProps>>`\n margin-right: ${({ theme }) => theme.spacing.micro};\n`;\n"],"names":[],"mappings":";;;;;AAOA,MAAM,iBAAiB,CAAC;AAAA,EACtB,aAAA;AAAA,EACA,KAAA;AACF,CAAA,KACE,CAAC,aACD,IAAA,GAAA,CAAA;AAAA,kBACkB,EAAA,KAAA,CAAM,QAAQ,KAAK,CAAA;AAAA,EAAA,CAAA,CAAA;AAGvC,MAAM,kBAAkB,CAAC;AAAA,EACvB,cAAA;AAAA,EACA,KAAA;AACF,CAAA,KACE,CAAC,cACD,IAAA,GAAA,CAAA;AAAA,mBACmB,EAAA,KAAA,CAAM,QAAQ,KAAK,CAAA;AAAA,EAAA,CAAA,CAAA;AAGxC,MAAM,0BAA0B,CAAC;AAAA,EAC/B,QAAA;AACF,CAAA,KACE,QACA,IAAA,GAAA,CAAA;AAAA;AAAA,EAAA,CAAA,CAAA;AAIK,MAAM,sBAAsB,CAAC;AAAA,EAClC,QAAA;AAAA,EACA,KAAA;AACF,CAAA,KACE,QACA,IAAA,GAAA,CAAA;AAAA,WACW,EAAA,KAAA,EAAO,KAAM,CAAA,SAAA,CAAU,KAAK,CAAA;AAAA,EAAA,EAAA;AAGzC,MAAM,gBAAgB,CAAC;AAAA,EACrB,OAAA;AAAA,EACA,WAAc,GAAA,WAAA;AAAA,EACd,KAAA;AACF,CAAA,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3
|
+
export interface PaperProps {
|
|
4
|
+
elevated?: boolean;
|
|
5
|
+
style?: StyleProp<ViewStyle>;
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
declare const Paper: ({ children, elevated, ...rest }: PaperProps) => JSX.Element;
|
|
9
|
+
export default Paper;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Paper.js","sources":["../../../../../src/components/atoms/Paper/Paper.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport { StyledPaper } from './styled';\n\nexport interface PaperProps {\n /** Creates elevation shadow */\n elevated?: boolean;\n style?: StyleProp<ViewStyle>;\n children?: ReactNode;\n}\n\nconst Paper = ({\n children,\n elevated = false,\n ...rest\n}: PaperProps): JSX.Element => (\n <StyledPaper {...rest} elevated={elevated}>\n {children}\n </StyledPaper>\n);\n\nexport default Paper;\n"],"names":["React"],"mappings":";;;AAWA,MAAM,QAAQ,CAAC;AAAA,EACb,QAAA;AAAA,EACA,QAAW,GAAA,KAAA;AAAA,EACX,GAAG,IAAA;AACL,CAAA,qBACGA,cAAA,CAAA,aAAA,CAAA,WAAA,EAAA,EAAa,GAAG,IAAA,EAAM,YACpB,QACH;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledPaper: import("@emotion/native").StyledComponent<any, {}, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../src/components/atoms/Paper/styled.ts"],"sourcesContent":["import { Animated } from 'react-native';\nimport styled, { css } from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { PaperProps } from './Paper';\nimport { baseStyles, elevatedStyles } from '../shared/PaperAndCard';\n\nexport const StyledPaper = styled(Animated.View)<\n PaperProps & Partial<StyleProps>\n>(\n props => css`\n ${baseStyles(props)}\n ${elevatedStyles(props)}\n `\n);\n"],"names":[],"mappings":";;;;AAMa,MAAA,WAAA,GAAc,MAAO,CAAA,QAAA,CAAS,IAAI,CAAA;AAAA,EAG7C,CAAS,KAAA,KAAA,GAAA,CAAA;AAAA,IACL,EAAA,UAAA,CAAW,KAAK,CAAC,CAAA;AAAA,IACjB,EAAA,cAAA,CAAe,KAAK,CAAC,CAAA;AAAA,EAAA,CAAA;AAE3B;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { PressableProps, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
export interface PressableSurfaceProps extends PressableProps {
|
|
4
|
+
effect?: 'darken' | 'lighten' | 'none';
|
|
5
|
+
surfaceColor?: string;
|
|
6
|
+
effectIntensity?: number;
|
|
7
|
+
effectStyle?: (pressed: boolean) => StyleProp<ViewStyle>;
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const PressableSurface: ({ children, surfaceColor, effect, effectIntensity, effectStyle, style, ...rest }: PressableSurfaceProps) => JSX.Element;
|
|
11
|
+
export default PressableSurface;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PressableSurface.js","sources":["../../../../../src/components/atoms/PressableSurface/PressableSurface.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport React, { ReactNode } from 'react';\nimport { Pressable, PressableProps, StyleProp, ViewStyle } from 'react-native';\nimport { ThemeProp } from '../../../types/defaults';\nimport { lightenDarkenColor } from '../../../utils';\n\nconst COLOR_VARIATION_FACTOR = 25;\n\nexport interface PressableSurfaceProps extends PressableProps {\n effect?: 'darken' | 'lighten' | 'none';\n surfaceColor?: string;\n effectIntensity?: number;\n effectStyle?: (pressed: boolean) => StyleProp<ViewStyle>;\n children?: ReactNode;\n}\n\nconst PressableSurface = ({\n children,\n surfaceColor,\n effect,\n effectIntensity,\n effectStyle,\n style,\n ...rest\n}: PressableSurfaceProps): JSX.Element => {\n const theme = useTheme() as ThemeProp;\n let effectBaseColor = theme.miscellaneous.surfaceColor;\n let bgColor = 'transparent';\n\n if (surfaceColor) {\n effectBaseColor = surfaceColor;\n bgColor = effectBaseColor;\n }\n\n const readyStyle = prepareStyle(\n { effect, effectIntensity, style, effectStyle },\n effectBaseColor,\n bgColor\n );\n return (\n <Pressable {...rest} style={readyStyle}>\n {children}\n </Pressable>\n );\n};\n\nconst prepareStyle = (\n props: PressableSurfaceProps,\n effectColor: string,\n bgColor: string\n): any => {\n const {\n effect = 'darken',\n effectIntensity = COLOR_VARIATION_FACTOR,\n style,\n effectStyle,\n } = props;\n\n const lighten = lightenDarkenColor(effectColor, effectIntensity);\n const darken = lightenDarkenColor(effectColor, -effectIntensity);\n const composedStyle = [{ backgroundColor: bgColor }, style];\n\n if (effectStyle) {\n return ({ pressed }) => [composedStyle, effectStyle(pressed)];\n }\n\n switch (effect) {\n case 'darken':\n return applyEffectStyle(composedStyle, darken);\n\n case 'lighten':\n return applyEffectStyle(composedStyle, lighten);\n\n case 'none':\n return composedStyle;\n }\n};\n\nconst applyEffectStyle = (style: any, variation: string) => {\n return ({ pressed }) => [style, pressed && { backgroundColor: variation }];\n};\n\nexport default PressableSurface;\n"],"names":[],"mappings":";;;;;;;;;;;AAMA,MAAM,sBAAyB,GAAA,EAAA,CAAA;AAU/B,MAAM,mBAAmB,CAAC;AAAA,EACxB,QAAA;AAAA,EACA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,eAAA;AAAA,EACA,WAAA;AAAA,EACA,KAAA;AAAA,EACA,GAAG,IAAA;AACL,CAA0C,KAAA;AACxC,EAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AACvB,EAAI,IAAA,eAAA,GAAkB,MAAM,aAAc,CAAA,YAAA,CAAA;AAC1C,EAAA,IAAI,OAAU,GAAA,aAAA,CAAA;AAEd,EAAA,IAAI,YAAc,EAAA;AAChB,IAAkB,eAAA,GAAA,YAAA,CAAA;AAClB,IAAU,OAAA,GAAA,eAAA,CAAA;AAAA,GACZ;AAEA,EAAA,MAAM,UAAa,GAAA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B,EAAA,SAAA,EAAW,CAAA,CAAA;AAC3E,CAAA;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ViewProps } from 'react-native';
|
|
3
|
+
import { ColorGradationType, ColorType } from '@tecsinapse/react-core';
|
|
4
|
+
export interface ProgressBarProps extends ViewProps {
|
|
5
|
+
segments?: number;
|
|
6
|
+
valueMin?: number;
|
|
7
|
+
valueMax?: number;
|
|
8
|
+
valueNow: number | string;
|
|
9
|
+
color?: ColorType;
|
|
10
|
+
colorTone?: ColorGradationType;
|
|
11
|
+
animate?: boolean;
|
|
12
|
+
animationParameters?: {
|
|
13
|
+
direction: 'left' | 'right';
|
|
14
|
+
duration: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
declare const ProgressBar: ({ segments: _segments, valueMin, valueNow: _valueNow, valueMax, color, colorTone, animationParameters, ...rest }: ProgressBarProps) => JSX.Element;
|
|
18
|
+
export default ProgressBar;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sources":["../../../../../src/components/atoms/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import React from 'react';\nimport { useTheme } from '@emotion/react';\nimport { Animated, ViewProps } from 'react-native';\nimport {\n ColorGradationType,\n ColorType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { extractNumbersFromString } from '../../../utils';\nimport { Container, Progress, Segment } from './styled';\n\nexport interface ProgressBarProps extends ViewProps {\n /** Number of segments. Defaults to 1. Set to 1 when 0 or less */\n segments?: number;\n /** Minimum possible value (0% of the bar). Defaults to 0 */\n valueMin?: number;\n /** Maximum possible value (100% of the bar). Defaults to 100 */\n valueMax?: number;\n /** Current value */\n valueNow: number | string;\n /** Filled partition color. Defaults to 'primary' */\n color?: ColorType;\n /** Filled partition color tone. Defaults to 'medium' */\n colorTone?: ColorGradationType;\n /** Animation (temporarily disabled) */\n animate?: boolean;\n /** Parameters animation */\n animationParameters?: { direction: 'left' | 'right'; duration: number };\n}\n\nconst ProgressBar = ({\n segments: _segments = 1,\n valueMin = 0,\n valueNow: _valueNow,\n valueMax = 100,\n color = 'primary',\n colorTone = 'medium',\n animationParameters,\n ...rest\n}: ProgressBarProps): JSX.Element => {\n const theme = useTheme() as ThemeProp;\n const animationValue = React.useRef(new Animated.Value(0)).current;\n const animate = false;\n\n const valueNow =\n typeof _valueNow === 'string'\n ? extractNumbersFromString(_valueNow)\n : _valueNow;\n\n const totalProgress = ((valueNow - valueMin) / (valueMax - valueMin)) * 100;\n const segments = Math.max(1, _segments);\n const segmentWidth = 100 / Math.max(segments);\n\n const items = [...Array(segments).keys()];\n\n const segmentsRender = items.map(index => {\n const max = segmentWidth * (index + 1);\n const min = segmentWidth * index;\n const minmax = (totalProgress - min) / (max - min);\n const width = (minmax > 1 ? 1 : minmax < 0 ? 0 : minmax) * 100;\n\n let progressPercent:\n | string\n | Animated.AnimatedInterpolation<number | string> = `${width}%`;\n\n if (animate && animationParameters) {\n Animated.timing(animationValue, {\n toValue: 1,\n duration: animationParameters.duration / items.length,\n useNativeDriver: false,\n delay:\n animationParameters.direction === 'right'\n ? index * (animationParameters.duration / items.length)\n : (items.length - index - 1) *\n (animationParameters.duration / items.length),\n }).start();\n\n const rangeAnimation =\n animationParameters?.direction === 'right'\n ? [`${valueMin < 0 ? 0 : valueMin}%`, `${width}%`]\n : [`${valueMax}%`, `${width}%`];\n\n progressPercent = animationValue.interpolate?.({\n inputRange: [0, 1],\n outputRange: rangeAnimation,\n });\n }\n\n return (\n <Segment\n key={index}\n style={{\n borderRightWidth: index == segments - 1 ? 0 : 2,\n }}\n >\n <Progress\n style={{\n width: progressPercent,\n backgroundColor: theme.color[color][colorTone],\n borderRightWidth: width > 0 && width < 100 ? 2 : 0,\n }}\n />\n </Segment>\n );\n });\n\n return <Container {...rest}>{segmentsRender}</Container>;\n};\n\nexport default ProgressBar;\n"],"names":["React"],"mappings":";;;;;;;;;;;;AA8BA,MAAM,cAAc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E3D,IAAI,IAAA,eAAA,GAEkD,GAAG,KAAK,CAAA,CAAA,CAAA,CAAA;AAyB9D,IACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,GAAK,EAAA,KAAA;AAAA,QACL,KAAO,EAAA;AAAA,UACL,gBAAkB,EAAA,KAAA,IAAS,QAAW,GAAA,CAAA,GAAI,CAAI,GAAA,CAAA;AAAA,SAChD;AAAA,OAAA;AAAA,sBAEAA,cAAA,CAAA,aAAA;AAAA,QAAC,QAAA;AAAA,QAAA;AAAA,UACC,KAAO,EAAA;AAAA,YACL,KAAO,EAAA,eAAA;AAAA,YACP,eAAiB,EAAA,KAAA,CAAM,KAAM,CAAA,KAAK,EAAE,SAAS,CAAA;AAAA,YAC7C,gBAAkB,EAAA,KAAA,GAAQ,CAAK,IAAA,KAAA,GAAQ,MAAM,CAAI,GAAA,CAAA;AAAA,WACnD;AAAA,SAAA;AAAA,OACF;AAAA,KACF,CAAA;AAAA,GAEH,CAAA,CAAA;AAED,EAAA,uBAAQA,cAAA,CAAA,aAAA,CAAA,SAAA,EAAA,EAAW,GAAG,IAAA,EAAA,EAAO,cAAe,CAAA,CAAA;AAC9C;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Animated } from 'react-native';
|
|
3
|
+
export declare const Container: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
7
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const Segment: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
10
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
11
|
+
as?: import("react").ElementType<any> | undefined;
|
|
12
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
13
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const Progress: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
|
|
16
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
17
|
+
as?: import("react").ElementType<any> | undefined;
|
|
18
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../src/components/atoms/ProgressBar/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { Animated } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils';\n\nexport const Container = styled.View<Partial<StyleProps>>`\n display: flex;\n height: ${({ theme }) => theme.spacing.mili};\n border-radius: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n flex-direction: row;\n overflow: hidden;\n`;\n\nexport const Segment = styled.View<Partial<StyleProps>>`\n flex: 1;\n background-color: ${({ theme }) => theme.color.secondary.light};\n border-right-width: ${RFValueStr('2px')};\n border-color: ${({ theme }) => theme.color.secondary.xlight};\n`;\n\nexport const Progress = styled(Animated.View)<Partial<StyleProps>>`\n height: 100%;\n border-color: ${({ theme }) => theme.color.secondary.xlight};\n`;\n"],"names":[],"mappings":";;;;;;;;;;;AAKO,MAAM,YAAY,MAAO,CAAA,IAAA,CAAA;AAAA;AAAA,UAAA,EAEpB,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,QAAQ,IAAI,CAAA;AAAA,iBAAA,EAC1B,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,QAAQ,IAAI,CAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAM7C,MAAM,UAAU,MAAO,CAAA,IAAA,CAAA;AAAA;AAAA,oBAAA,EAER,CAAC,EAAE,KAAA,OAAY,KAAM,CAAA,KAAA,CAAM,UAAU,KAAK,CAAA;AAAA,sBACxC,EAAA,UAAA,CAAW,KAAK,CAAC,CAAA;AAAA,gBAAA,EACvB,CAAC,EAAE,KAAA,OAAY,KAAM,CAAA,KAAA,CAAM,UAAU,MAAM,CAAA;AAAA,EAAA;AAGhD,MAAA,QAAA,GAAW,MAAO,CAAA,QAAA,CAAS,IAAI,CAAA,CAAA;AAAA;AAAA,gBAAA,EAE1B,CAAC,EAAE,KAAA,OAAY,KAAM,CAAA,KAAA,CAAM,UAAU,MAAM,CAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { ColorGradationType, ColorType } from '../../../types/defaults';
|
|
4
|
+
export interface RadioButtonProps {
|
|
5
|
+
checked?: boolean;
|
|
6
|
+
onChange?: (checked: boolean) => void;
|
|
7
|
+
labelPosition?: 'left' | 'right';
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
color?: ColorType;
|
|
10
|
+
colorTone?: ColorGradationType;
|
|
11
|
+
style?: StyleProp<ViewStyle>;
|
|
12
|
+
children?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
declare const RadioButton: ({ children, onChange, checked, labelPosition, disabled, color, colorTone, ...rest }: RadioButtonProps) => JSX.Element;
|
|
15
|
+
export default RadioButton;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RadioButton.js","sources":["../../../../../src/components/atoms/RadioButton/RadioButton.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Pressable, StyleProp, ViewStyle } from 'react-native';\nimport { ColorGradationType, ColorType } from '../../../types/defaults';\nimport { Icon } from '../Icon';\nimport { IconViewStyled, IconWrapper, ScaledView, ViewStyled } from './styled';\n\nexport interface RadioButtonProps {\n /** Element is checked */\n checked?: boolean;\n /** Change handler */\n onChange?: (checked: boolean) => void;\n /** Position of children */\n labelPosition?: 'left' | 'right';\n /** Element is not clickable */\n disabled?: boolean;\n /** Color definition from theme */\n color?: ColorType;\n /** Color gradation from theme */\n colorTone?: ColorGradationType;\n style?: StyleProp<ViewStyle>;\n children?: ReactNode;\n}\n\nconst RadioButton = ({\n children,\n onChange,\n checked,\n labelPosition = 'right',\n disabled = false,\n color = 'primary',\n colorTone = 'medium',\n ...rest\n}: RadioButtonProps): JSX.Element => {\n const handleChange = () => {\n onChange && onChange(!checked);\n };\n\n return (\n <Pressable\n {...rest}\n disabled={disabled}\n onPress={handleChange}\n accessibilityRole=\"radio\"\n >\n <ViewStyled>\n {labelPosition === 'left' && children}\n {checked && (\n <IconViewStyled>\n <IconWrapper>\n <ScaledView>\n <Icon\n name=\"circle\"\n colorVariant={color}\n colorTone={colorTone}\n type=\"material-community\"\n size=\"centi\"\n />\n </ScaledView>\n </IconWrapper>\n </IconViewStyled>\n )}\n {!checked && (\n <IconViewStyled>\n <IconWrapper>\n <ScaledView>\n <Icon\n name=\"circle\"\n fontColor=\"light\"\n type=\"material-community\"\n size=\"centi\"\n />\n </ScaledView>\n </IconWrapper>\n </IconViewStyled>\n )}\n {labelPosition === 'right' && children}\n </ViewStyled>\n </Pressable>\n );\n};\n\nexport default RadioButton;\n"],"names":["React"],"mappings":";;;;;AAuBA,MAAM,cAAc,CAAC;AAAA,EACnB,QAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAgB,GAAA,OAAA;AAAA,EAChB,QAAW,GAAA,KAAA;AAAA,EACX,KAAQ,GAAA,SAAA;AAAA,EACR,SAAY,GAAA,QAAA;AAAA,EACZ,GAAG,IAAA;AACL,CAAqC,KAAA;AACnC,EAAA,MAAM,eAAe,MAAM;AACzB,IAAY,QAAA,IAAA,QAAA,CAAS,CAAC,OAAO,CAAA,CAAA;AAAA,GAC/B,CAAA;AAEA,EACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,SAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,QAAA;AAAA,MACA,OAAS,EAAA,YAAA;AAAA,MACT,iBAAkB,EAAA,OAAA;AAAA,KAAA;AAAA,oBAElBA,cAAA,CAAA,aAAA,CAAC,UACE,EAAA,IAAA,EAAA,aAAA,KAAkB,MAAU,IAAA,QAAA,EAC5B,OACC,oBAAAA,cAAA,CAAA,aAAA,CAAC,cACC,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA,CAAC,WACC,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA,CAAC,UACC,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,IAAK,EAAA,QAAA;AAAA,QACL,YAAc,EAAA,KAAA;AAAA,QACd,SAAA;AAAA,QACA,IAAK,EAAA,oBAAA;AAAA,QACL,IAAK,EAAA,OAAA;AAAA,OAAA;AAAA,KAET,CACF,CACF,CAED,EAAA,CAAC,OACA,oBAAAA,cAAA,CAAA,aAAA,CAAC,cACC,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA,CAAC,WACC,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA,CAAC,UACC,EAAA,IAAA,kBAAAA,cAAA,CAAA,aAAA;AAAA,MAAC,IAAA;AAAA,MAAA;AAAA,QACC,IAAK,EAAA,QAAA;AAAA,QACL,SAAU,EAAA,OAAA;AAAA,QACV,IAAK,EAAA,oBAAA;AAAA,QACL,IAAK,EAAA,OAAA;AAAA,OAAA;AAAA,KAET,CACF,CACF,CAED,EAAA,aAAA,KAAkB,WAAW,QAChC,CAAA;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { RadioButtonProps } from './RadioButton';
|
|
4
|
+
export declare const IconWrapper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
5
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
6
|
+
as?: import("react").ElementType<any> | undefined;
|
|
7
|
+
} & Partial<RadioButtonProps & import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
8
|
+
ref?: import("react").Ref<View> | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const ScaledView: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any> | undefined;
|
|
13
|
+
}, {}, {
|
|
14
|
+
ref?: import("react").Ref<View> | undefined;
|
|
15
|
+
}>;
|
|
16
|
+
export declare const IconViewStyled: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
17
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
+
as?: import("react").ElementType<any> | undefined;
|
|
19
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
20
|
+
ref?: import("react").Ref<View> | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
export declare const ViewStyled: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
23
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
+
as?: import("react").ElementType<any> | undefined;
|
|
25
|
+
}, {}, {
|
|
26
|
+
ref?: import("react").Ref<View> | undefined;
|
|
27
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../src/components/atoms/RadioButton/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { View } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RadioButtonProps } from './RadioButton';\n\nexport const IconWrapper = styled(View)<Partial<RadioButtonProps & StyleProps>>`\n border-radius: ${({ theme }: StyleProps) => theme.borderRadius.pill};\n border-color: ${({\n theme,\n color = 'primary',\n colorTone = 'medium',\n }: StyleProps & RadioButtonProps) => theme.color[color][colorTone]};\n border-width: ${({ theme }: StyleProps) => theme.borderWidth.nano};\n background-color: ${({ theme }: StyleProps) =>\n theme.miscellaneous.surfaceColor};\n`;\n\nexport const ScaledView = styled(View)`\n transform: scale(0.8);\n`;\n\nexport const IconViewStyled = styled(View)<Partial<StyleProps>>`\n padding: ${({ theme }: StyleProps) => theme.spacing.mili};\n`;\n\nexport const ViewStyled = styled(View)`\n align-items: center;\n flex-direction: row;\n`;\n"],"names":[],"mappings":";;;AAKa,MAAA,WAAA,GAAc,OAAO,IAAI,CAAA,CAAA;AAAA,iBAAA,EACnB,CAAC,EAAE,KAAA,EAAwB,KAAA,KAAA,CAAM,aAAa,IAAI,CAAA;AAAA,gBAAA,EACnD,CAAC;AAAA,EACf,KAAA;AAAA,EACA,KAAQ,GAAA,SAAA;AAAA,EACR,SAAY,GAAA,QAAA;AACd,CAAA,KAAqC,KAAM,CAAA,KAAA,CAAM,KAAK,CAAA,CAAE,SAAS,CAAC,CAAA;AAAA,gBAAA,EAClD,CAAC,EAAE,KAAA,EAAwB,KAAA,KAAA,CAAM,YAAY,IAAI,CAAA;AAAA,oBAAA,EAC7C,CAAC,EAAE,KAAA,EACrB,KAAA,KAAA,CAAM,cAAc,YAAY,CAAA;AAAA,EAAA;AAGvB,MAAA,UAAA,GAAa,OAAO,IAAI,CAAA,CAAA;AAAA;AAAA,EAAA;AAIxB,MAAA,cAAA,GAAiB,OAAO,IAAI,CAAA,CAAA;AAAA,WAAA,EAC5B,CAAC,EAAE,KAAA,EAAwB,KAAA,KAAA,CAAM,QAAQ,IAAI,CAAA;AAAA,EAAA;AAG7C,MAAA,UAAA,GAAa,OAAO,IAAI,CAAA,CAAA;AAAA;AAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { ColorGradationType, ColorType } from '@tecsinapse/react-core';
|
|
4
|
+
export interface SwitchProps {
|
|
5
|
+
onChange: (active: boolean) => void;
|
|
6
|
+
active: boolean;
|
|
7
|
+
activeColor?: ColorType;
|
|
8
|
+
activeColorTone?: ColorGradationType;
|
|
9
|
+
inactiveColor?: ColorType;
|
|
10
|
+
inactiveColorTone?: ColorGradationType;
|
|
11
|
+
style?: StyleProp<ViewStyle>;
|
|
12
|
+
dotStyle?: StyleProp<ViewStyle>;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
}
|
|
15
|
+
declare const Switch: FC<SwitchProps>;
|
|
16
|
+
export default Switch;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.js","sources":["../../../../../src/components/atoms/Switch/Switch.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport React, { FC, useCallback, useEffect } from 'react';\nimport {\n Animated,\n LayoutChangeEvent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\nimport {\n ColorGradationType,\n ColorType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport {\n extractNumbersFromString,\n lightenDarkenColor,\n RFValueStr,\n} from '../../../utils';\nimport { PressableSurface } from '../PressableSurface';\nimport { transitionSwitch } from './animation';\nimport { StyledSwitch, StyledSwitchContent, SWITCH_PIN_WIDTH } from './styled';\n\nexport interface SwitchProps {\n onChange: (active: boolean) => void;\n active: boolean;\n activeColor?: ColorType;\n activeColorTone?: ColorGradationType;\n inactiveColor?: ColorType;\n inactiveColorTone?: ColorGradationType;\n style?: StyleProp<ViewStyle>;\n dotStyle?: StyleProp<ViewStyle>;\n disabled?: boolean;\n}\n\nconst Switch: FC<SwitchProps> = ({\n onChange,\n activeColor = 'primary',\n activeColorTone = 'medium',\n inactiveColor = 'secondary',\n inactiveColorTone = 'light',\n active,\n dotStyle,\n disabled = false,\n ...rest\n}): JSX.Element => {\n const theme = useTheme() as ThemeProp;\n\n const width = React.useRef(0);\n const transitionValue = React.useRef(new Animated.Value(0)).current;\n const animatedColor = React.useRef(new Animated.Value(0)).current;\n\n const calculateTranslate = () => {\n if (width.current > 0) {\n return (\n width.current -\n extractNumbersFromString(theme.spacing.micro) * 2 -\n extractNumbersFromString(RFValueStr(SWITCH_PIN_WIDTH))\n );\n }\n return 0;\n };\n\n const getBackgroundColor = (color: string) => {\n return disabled\n ? lightenDarkenColor(theme.color[inactiveColor][inactiveColorTone], 20)\n : color;\n };\n\n const interpolateColor = animatedColor.interpolate({\n inputRange: [0, 1],\n outputRange: [\n getBackgroundColor(theme.color[inactiveColor][inactiveColorTone]),\n getBackgroundColor(theme.color[activeColor][activeColorTone]),\n ],\n });\n\n useEffect(() => {\n const translate = calculateTranslate();\n transitionSwitch(active, translate, transitionValue, animatedColor);\n }, [active]);\n\n const handleChange = useCallback(() => {\n onChange(!active);\n }, [active, onChange]);\n\n const handleSwitchLayout = (lce: LayoutChangeEvent) => {\n width.current = lce.nativeEvent.layout.width;\n const translate = calculateTranslate();\n transitionSwitch(active, translate, transitionValue, animatedColor);\n };\n\n return (\n <PressableSurface\n {...rest}\n onPress={handleChange}\n effect=\"none\"\n disabled={disabled}\n >\n <StyledSwitchContent\n onLayout={handleSwitchLayout}\n style={{ backgroundColor: interpolateColor }}\n >\n <StyledSwitch\n style={[dotStyle, { transform: [{ translateX: transitionValue }] }]}\n />\n </StyledSwitchContent>\n </PressableSurface>\n );\n};\n\nexport default Switch;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;AAkCA,MAAM,SAA0B,CAAC;AAAA,EAC/B,QAAA;AAAA,EACA,WAAc,GAAA,SAAA;AAAA,EACd,eAAkB,GAAA,QAAA;AAAA,EAClB,aAAgB,GAAA,WAAA;AAAA,EAChB,iBAAoB,GAAA,OAAA;AAAA,EACpB,MAAA;AAAA,EACA,QAAA;AAAA,EACA,QAAW,GAAA,KAAA;AAAA,EACX,GAAG,IAAA;AACL,CAAmB,KAAA;AACjB,EAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,EAAM,MAAA,KAAA,GAAQA,cAAM,CAAA,MAAA,CAAO,CAAC,CAAA,CAAA;AAC5B,EAAM,MAAA,eAAA,GAAkBA,eAAM,MAAO,CAAA,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AAe,YAAY,MAAM;AACrC,IAAA,QAAA,CAAS,CAAC,MAAM,CAAA,CAAA;AAAA,GACf,EAAA,CAAC,MAAQ,EAAA,QAAQ,CAAC,CAAA,CAAA;AAErB,EAAM,MAAA,kBAAA,GAAqB,CAAC,GAA2B,KAAA;AACrD,IAAM,KAAA,CAAA,OAAA,GAAU,GAAI,CAAA,WAAA,CAAY,MAAO,CAAA,KAAA,CAAA;AACvC,IAAA,MAAM,YAAY,kBAAmB,EAAA,CAAA;AACrC,IAAiB,gBAAA,CAAA,MAAA,EAAQ,SAAW,EAAA,eAAA,EAAiB,aAAa,CAAA,CAAA;AAAA,GACpE,CAAA;AAEA,EACE,uBAAAA,cAAA,CAAA,aAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACE,GAAG,IAAA;AAAA,MACJ,OAAS,EAAA,YAAA;AAAA,MACT,MAAO,EAAA,MAAA;AAAA,MACP,QAAA;AAAA,KAAA;AAAA,oBAEAA,cAAA,CAAA,aAAA;AAAA,MAAC,mBAAA;AAAA,MAAA;AAAA,QACC,QAAU,EAAA,kBAAA;AAAA,QACV,KAAA,EAAO,EAAE,eAAA,EAAiB,gBAAiB,EAAA;AAAA,OAAA;AAAA,sBAE3CA,cAAA,CAAA,aAAA;AAAA,QAAC,YAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAO,CAAC,QAAA,EAAU,EAAE,SAAA,EAAW,CAAC,EAAE,UAAY,EAAA,eAAA,EAAiB,CAAA,EAAG,CAAA;AAAA,SAAA;AAAA,OACpE;AAAA,KACF;AAAA,GACF,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"animation.js","sources":["../../../../../src/components/atoms/Switch/animation.ts"],"sourcesContent":["import { Animated, Easing } from 'react-native';\n\nconst ANIMATION_SPEED = 140;\n\nexport const transitionSwitch = (\n active: boolean,\n translate: number,\n transitionValue: Animated.Value,\n animatedColor: Animated.Value\n): void => {\n if (translate <= 0) return;\n\n if (active) {\n Animated.timing(transitionValue, {\n toValue: translate,\n duration: ANIMATION_SPEED,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }).start();\n Animated.timing(animatedColor, {\n toValue: 1,\n duration: ANIMATION_SPEED,\n useNativeDriver: false,\n }).start();\n return;\n }\n\n Animated.timing(transitionValue, {\n toValue: 0,\n duration: ANIMATION_SPEED,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }).start();\n Animated.timing(animatedColor, {\n toValue: 0,\n duration: ANIMATION_SPEED,\n useNativeDriver: false,\n }).start();\n};\n"],"names":[],"mappings":";;AAEA,MAAM,eAAkB,GAAA,GAAA,CAAA;AAEjB,MAAM,gBAAmB,GAAA,CAC9B,MACA,EAAA,SAAA,EACA,iBACA,aACS,KAAA;AACT,EAAA,IAAI,SAAa,IAAA,CAAA;AAAG,IAAA,OAAA;AAEpB,EAAA,IAAI,MAAQ,EAAA;AACV,IAAA,QAAA,CAAS,OAAO,eAAiB,EAAA;AAAA,MAC/B,OAAS,EAAA,SAAA;AAAA,MACT,QAAU,EAAA,eAAA;AAAA,MACV,MAAQ,EAAA,MAAA,CAAO,GAAI,CAAA,MAAA,CAAO,IAAI,CAAA;AAAA,MAC9B,eAAiB,EAAA,IAAA;AAAA,KAClB,EAAE,KAAM,EAAA,CAAA;AACT,IAAA,QAAA,CAAS,OAAO,aAAe,EAAA;AAAA,MAC7B,OAAS,EAAA,CAAA;AAAA,MACT,QAAU,EAAA,eAAA;AAAA,MACV,eAAiB,EAAA,KAAA;AAAA,KAClB,EAAE,KAAM,EAAA,CAAA;AACT,IAAA,OAAA;AAAA,GACF;AAEA,EAAA,QAAA,CAAS,OAAO,eAAiB,EAAA;AAAA,IAC/B,OAAS,EAAA,CAAA;AAAA,IACT,QAAU,EAAA,eAAA;AAAA,IACV,MAAQ,EAAA,MAAA,CAAO,GAAI,CAAA,MAAA,CAAO,IAAI,CAAA;AAAA,IAC9B,eAAiB,EAAA,IAAA;AAAA,GAClB,EAAE,KAAM,EAAA,CAAA;AACT,EAAA,QAAA,CAAS,OAAO,aAAe,EAAA;AAAA,IAC7B,OAAS,EAAA,CAAA;AAAA,IACT,QAAU,EAAA,eAAA;AAAA,IACV,eAAiB,EAAA,KAAA;AAAA,GAClB,EAAE,KAAM,EAAA,CAAA;AACX;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const SWITCH_BODY_WIDTH = "40px";
|
|
2
|
+
export declare const SWITCH_PIN_WIDTH = "16px";
|
|
3
|
+
export declare const StyledSwitchContent: import("@emotion/native").StyledComponent<any, {}, {}>;
|
|
4
|
+
export declare const StyledSwitch: import("@emotion/native").StyledComponent<any, {}, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../src/components/atoms/Switch/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { Animated } from 'react-native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { RFValueStr } from '../../../utils';\n\nexport const SWITCH_BODY_WIDTH = '40px';\nexport const SWITCH_PIN_WIDTH = '16px';\n\nexport const StyledSwitchContent = styled(Animated.View)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.pill};\n padding: 0 ${({ theme }) => theme.spacing.micro};\n justify-content: center;\n width: ${RFValueStr(SWITCH_BODY_WIDTH)};\n height: ${RFValueStr('22px')};\n`;\n\nexport const StyledSwitch = styled(Animated.View)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.pill};\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n width: ${RFValueStr(SWITCH_PIN_WIDTH)};\n height: ${RFValueStr('16px')};\n`;\n"],"names":[],"mappings":";;;;;;;;;;;AAKO,MAAM,iBAAoB,GAAA,OAAA;AAC1B,MAAM,gBAAmB,GAAA,OAAA;AAEnB,MAAA,mBAAA,GAAsB,MAAO,CAAA,QAAA,CAAS,IAAI,CAAA,CAAA;AAAA,iBAAA,EACpC,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,aAAa,IAAI,CAAA;AAAA,aAAA,EAC1C,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,QAAQ,KAAK,CAAA;AAAA;AAAA,SAEtC,EAAA,UAAA,CAAW,iBAAiB,CAAC,CAAA;AAAA,UAC5B,EAAA,UAAA,CAAW,MAAM,CAAC,CAAA;AAAA,EAAA;AAGjB,MAAA,YAAA,GAAe,MAAO,CAAA,QAAA,CAAS,IAAI,CAAA,CAAA;AAAA,iBAAA,EAC7B,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,aAAa,IAAI,CAAA;AAAA,oBAAA,EACnC,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,cAAc,YAAY,CAAA;AAAA,SAC1D,EAAA,UAAA,CAAW,gBAAgB,CAAC,CAAA;AAAA,UAC3B,EAAA,UAAA,CAAW,MAAM,CAAC,CAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewProps } from 'react-native';
|
|
3
|
+
import { IconProps } from '../Icon';
|
|
4
|
+
import { ColorType, ColorGradationType } from '@tecsinapse/react-core';
|
|
5
|
+
export interface TagProps extends ViewProps {
|
|
6
|
+
value: React.ReactNode;
|
|
7
|
+
icon?: IconProps;
|
|
8
|
+
dismiss?: boolean;
|
|
9
|
+
onDismiss?: () => void;
|
|
10
|
+
variant?: 'small' | 'default';
|
|
11
|
+
backgroundColorTone?: ColorType;
|
|
12
|
+
backgroundColorVariant?: ColorGradationType;
|
|
13
|
+
}
|
|
14
|
+
declare const Tag: React.FC<TagProps>;
|
|
15
|
+
export default Tag;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Animated, ViewProps } from 'react-native';\nimport { IconProps } from '../Icon';\nimport { PressableSurface } from '../PressableSurface';\nimport { StyledCloseIcon, StyledLeftIcon, StyledTagContainer } from './styled';\nimport { ColorType, ColorGradationType } from '@tecsinapse/react-core';\n\nexport interface TagProps extends ViewProps {\n value: React.ReactNode;\n icon?: IconProps;\n dismiss?: boolean;\n onDismiss?: () => void;\n variant?: 'small' | 'default';\n backgroundColorTone?: ColorType;\n backgroundColorVariant?: ColorGradationType;\n}\n\nconst Tag: React.FC<TagProps> = ({\n value,\n icon,\n variant = 'small',\n dismiss: canDismiss = false,\n onDismiss,\n style,\n backgroundColorTone = 'secondary',\n backgroundColorVariant = 'xlight',\n ...rest\n}): JSX.Element => {\n const [dismiss, setDismiss] = useState(false);\n const fadeAnim = React.useRef(new Animated.Value(1)).current;\n const duration = 300;\n\n const fadeOut = () => {\n Animated.timing(fadeAnim, {\n toValue: 0,\n duration,\n useNativeDriver: true,\n }).start();\n };\n\n const handleDismiss = useCallback(() => {\n onDismiss?.();\n fadeOut();\n setTimeout(() => setDismiss(true), duration);\n }, [onDismiss]);\n\n return (\n <StyledTagContainer\n backgroundColorTone={backgroundColorTone}\n backgroundColorVariant={backgroundColorVariant}\n variant={variant}\n style={[{ opacity: fadeAnim as unknown as number }, style]}\n visible={!dismiss}\n {...rest}\n >\n {icon && (\n <StyledLeftIcon\n size={icon.size || 'micro'}\n colorVariant={icon.colorVariant || 'primary'}\n {...icon}\n />\n )}\n {value}\n {canDismiss && (\n <PressableSurface onPress={handleDismiss}>\n <StyledCloseIcon\n name=\"close-outline\"\n type=\"ionicon\"\n size=\"centi\"\n fontColor=\"medium\"\n />\n </PressableSurface>\n )}\n </StyledTagContainer>\n );\n};\n\nexport default Tag;\n"],"names":["React"],"mappings":";;;;;AAiBA,MAAM,MAA0B,CAAC;AAAA,EAC/B,KAAA;AAAA,EACA,IAAA;AAAA,EACA,OAAU,GAAA,OAAA;AAAA,EACV,SAAS,UAAa,GAAA,KAAA;AAAA,EACtB,SAAA;AAAA,EACA,KAAA;AAAA,EACA,mBAA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,IAED,KAAA;AAAA,IACA,UACC,oBAAAA,cAAA,CAAA,aAAA,CAAC,gBAAiB,EAAA,EAAA,OAAA,EAAS,aACzB,EAAA,kBAAAA,cAAA,CAAA,aAAA;AAAA,MAAC,eAAA;AAAA,MAAA;AAAA,QACC,IAAK,EAAA,eAAA;AAAA,QACL,IAAK,EAAA,SAAA;AAAA,QACL,IAAK,EAAA,OAAA;AAAA,QACL,SAAU,EAAA,QAAA;AAAA,OAAA;AAAA,KAEd,CAAA;AAAA,GAEJ,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Animated, ViewProps } from 'react-native';
|
|
3
|
+
import { ColorGradationType, ColorType } from '../../../types/defaults';
|
|
4
|
+
import { IconProps } from '../Icon';
|
|
5
|
+
import { TagProps } from './Tag';
|
|
6
|
+
export declare const StyledTagContainer: import("@emotion/native").StyledComponent<Animated.AnimatedProps<ViewProps & import("react").RefAttributes<import("react-native").View>> & {
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
} & Partial<TagProps> & Partial<import("../../../types/defaults").ThemeProviderProps> & ViewProps & {
|
|
10
|
+
visible: boolean;
|
|
11
|
+
} & {
|
|
12
|
+
backgroundColorTone: ColorType;
|
|
13
|
+
backgroundColorVariant: ColorGradationType;
|
|
14
|
+
}, {}, {}>;
|
|
15
|
+
export declare const StyledLeftIcon: import("@emotion/native").StyledComponent<IconProps & {
|
|
16
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
17
|
+
as?: import("react").ElementType<any> | undefined;
|
|
18
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
|
|
19
|
+
export declare const StyledCloseIcon: import("@emotion/native").StyledComponent<IconProps & {
|
|
20
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
21
|
+
as?: import("react").ElementType<any> | undefined;
|
|
22
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../src/components/atoms/Tag/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { Animated, ViewProps } from 'react-native';\nimport {\n ColorGradationType,\n ColorType,\n StyleProps,\n} from '../../../types/defaults';\nimport { Icon, IconProps } from '../Icon';\nimport { TagProps } from './Tag';\n\nconst smallVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'small' &&\n css`\n border-radius: ${theme.borderRadius.micro};\n padding: ${theme.spacing.nano} ${theme.spacing.mili};\n `;\n\nconst backgroundColorTag = ({\n theme,\n backgroundColorTone,\n backgroundColorVariant,\n}: Partial<StyleProps> & {\n backgroundColorTone: ColorType;\n backgroundColorVariant: ColorGradationType;\n}) =>\n css`\n background-color: ${theme?.color[backgroundColorTone][\n backgroundColorVariant\n ]};\n `;\n\nconst defaultVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'default' &&\n css`\n border-radius: ${theme.borderRadius.mili};\n padding: ${theme.spacing.micro} ${theme.spacing.centi};\n `;\n\nconst StyledTagContainerBase = styled(Animated.View)<\n Partial<TagProps> & Partial<StyleProps> & ViewProps & { visible: boolean }\n>`\n background-color: ${({ theme }) => theme.miscellaneous.bodyColor};\n flex-direction: row;\n justify-content: center;\n align-items: center;\n align-self: center;\n display: ${({ visible }) => (visible ? 'flex' : 'none')};\n`;\n\nexport const StyledTagContainer = styled(StyledTagContainerBase)<\n Partial<StyleProps> & {\n backgroundColorTone: ColorType;\n backgroundColorVariant: ColorGradationType;\n }\n>(\n props => css`\n ${smallVariant(props)}\n ${defaultVariant(props)}\n ${backgroundColorTag(props)}\n `\n);\n\nexport const StyledLeftIcon = styled(Icon)<Partial<StyleProps> & IconProps>`\n margin-right: ${({ theme }) => theme.spacing.micro};\n`;\n\nexport const StyledCloseIcon = styled(Icon)<Partial<StyleProps> & IconProps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