@tecsinapse/react-core 1.20.0 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/components/atoms/Avatar/Avatar.d.ts +1 -1
- package/dist/components/atoms/Avatar/Avatar.js +30 -42
- package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/components/atoms/Avatar/Avatar.stories.d.ts +9 -0
- package/dist/components/atoms/Avatar/helpers.js +6 -11
- package/dist/components/atoms/Avatar/helpers.js.map +1 -1
- package/dist/components/atoms/Avatar/styled.js +41 -54
- package/dist/components/atoms/Avatar/styled.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.js +17 -23
- package/dist/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/components/atoms/Badge/styled.js +44 -31
- package/dist/components/atoms/Badge/styled.js.map +1 -1
- package/dist/components/atoms/BoxContent/BoxContent.js +38 -18
- package/dist/components/atoms/BoxContent/BoxContent.js.map +1 -1
- package/dist/components/atoms/BoxContent/BoxContent.stories.d.ts +9 -0
- package/dist/components/atoms/BoxContent/styled.d.ts +1 -1
- package/dist/components/atoms/BoxContent/styled.js +53 -73
- package/dist/components/atoms/BoxContent/styled.js.map +1 -1
- package/dist/components/atoms/Button/Button.js +77 -51
- package/dist/components/atoms/Button/Button.js.map +1 -1
- package/dist/components/atoms/Button/States/BaseState.d.ts +1 -1
- package/dist/components/atoms/Button/States/BaseState.js +27 -36
- package/dist/components/atoms/Button/States/BaseState.js.map +1 -1
- package/dist/components/atoms/Button/States/Error.d.ts +1 -1
- package/dist/components/atoms/Button/States/Error.js +28 -17
- package/dist/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/components/atoms/Button/States/Loading.d.ts +1 -1
- package/dist/components/atoms/Button/States/Loading.js +26 -35
- package/dist/components/atoms/Button/States/Loading.js.map +1 -1
- package/dist/components/atoms/Button/States/Success.d.ts +1 -1
- package/dist/components/atoms/Button/States/Success.js +28 -17
- package/dist/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/components/atoms/Button/States/styled.js +17 -39
- package/dist/components/atoms/Button/States/styled.js.map +1 -1
- package/dist/components/atoms/Button/styled.js +52 -50
- package/dist/components/atoms/Button/styled.js.map +1 -1
- package/dist/components/atoms/Card/Card.js +52 -28
- package/dist/components/atoms/Card/Card.js.map +1 -1
- package/dist/components/atoms/Card/Card.stories.d.ts +9 -0
- package/dist/components/atoms/Card/Footer/Footer.js +10 -21
- package/dist/components/atoms/Card/Footer/Footer.js.map +1 -1
- package/dist/components/atoms/Card/Header/Header.js +10 -21
- package/dist/components/atoms/Card/Header/Header.js.map +1 -1
- package/dist/components/atoms/Card/styled.js +14 -17
- package/dist/components/atoms/Card/styled.js.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +66 -39
- package/dist/components/atoms/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.stories.d.ts +9 -0
- package/dist/components/atoms/Checkbox/styled.js +39 -68
- package/dist/components/atoms/Checkbox/styled.js.map +1 -1
- package/dist/components/atoms/Divider/Divider.js +38 -18
- package/dist/components/atoms/Divider/Divider.js.map +1 -1
- package/dist/components/atoms/Divider/Divider.stories.d.ts +9 -0
- package/dist/components/atoms/Divider/styled.js +30 -43
- package/dist/components/atoms/Divider/styled.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButton.js +68 -47
- package/dist/components/atoms/GroupButton/GroupButton.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButton.stories.d.ts +8 -0
- package/dist/components/atoms/GroupButton/GroupButtonOption.js +16 -23
- package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/components/atoms/GroupButton/styled.js +113 -124
- package/dist/components/atoms/GroupButton/styled.js.map +1 -1
- package/dist/components/atoms/Icon/Icon.js +64 -31
- package/dist/components/atoms/Icon/Icon.js.map +1 -1
- package/dist/components/atoms/Icon/Icon.stories.d.ts +9 -0
- package/dist/components/atoms/Icon/helpers.d.ts +2 -2
- package/dist/components/atoms/Icon/helpers.js +110 -77
- package/dist/components/atoms/Icon/helpers.js.map +1 -1
- package/dist/components/atoms/Input/Hint.js +19 -34
- package/dist/components/atoms/Input/Hint.js.map +1 -1
- package/dist/components/atoms/Input/InputContainer/InputContainer.js +81 -44
- package/dist/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
- package/dist/components/atoms/Input/InputElement/InputElement.js +68 -40
- package/dist/components/atoms/Input/InputElement/InputElement.js.map +1 -1
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js +109 -83
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +67 -31
- package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/styled.js +9 -12
- package/dist/components/atoms/Input/PressableInputContainer/styled.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useInputFocus.d.ts +1 -1
- package/dist/components/atoms/Input/hooks/useInputFocus.js +8 -12
- package/dist/components/atoms/Input/hooks/useInputFocus.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useNumberMask.d.ts +2 -2
- package/dist/components/atoms/Input/hooks/useNumberMask.js +67 -66
- package/dist/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useStringMask.d.ts +1 -1
- package/dist/components/atoms/Input/hooks/useStringMask.js +49 -60
- package/dist/components/atoms/Input/hooks/useStringMask.js.map +1 -1
- package/dist/components/atoms/Input/styled.js +106 -144
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/Paper/Paper.js +47 -21
- package/dist/components/atoms/Paper/Paper.js.map +1 -1
- package/dist/components/atoms/Paper/Paper.stories.d.ts +9 -0
- package/dist/components/atoms/Paper/styled.js +14 -17
- package/dist/components/atoms/Paper/styled.js.map +1 -1
- package/dist/components/atoms/PressableSurface/PressableSurface.js +78 -68
- package/dist/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
- package/dist/components/atoms/ProgressBar/ProgressBar.js +88 -44
- package/dist/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/atoms/ProgressBar/ProgressBar.stories.d.ts +9 -0
- package/dist/components/atoms/ProgressBar/styled.js +39 -51
- package/dist/components/atoms/ProgressBar/styled.js.map +1 -1
- package/dist/components/atoms/RadioButton/RadioButton.js +60 -33
- package/dist/components/atoms/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/atoms/RadioButton/RadioButton.stories.d.ts +9 -0
- package/dist/components/atoms/RadioButton/styled.js +28 -44
- package/dist/components/atoms/RadioButton/styled.js.map +1 -1
- package/dist/components/atoms/Switch/Switch.js +94 -73
- package/dist/components/atoms/Switch/Switch.js.map +1 -1
- package/dist/components/atoms/Switch/Switch.stories.d.ts +9 -0
- package/dist/components/atoms/Switch/animation.js +12 -20
- package/dist/components/atoms/Switch/animation.js.map +1 -1
- package/dist/components/atoms/Switch/styled.js +36 -44
- package/dist/components/atoms/Switch/styled.js.map +1 -1
- package/dist/components/atoms/Tag/Tag.js +65 -45
- package/dist/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/components/atoms/Tag/styled.js +43 -63
- package/dist/components/atoms/Tag/styled.js.map +1 -1
- package/dist/components/atoms/Text/Text.js +71 -37
- package/dist/components/atoms/Text/Text.js.map +1 -1
- package/dist/components/atoms/Text/Text.stories.d.ts +9 -0
- package/dist/components/atoms/Text/functions.js +5 -10
- package/dist/components/atoms/Text/functions.js.map +1 -1
- package/dist/components/atoms/Text/styled.js +29 -67
- package/dist/components/atoms/Text/styled.js.map +1 -1
- package/dist/components/atoms/shared/PaperAndCard.d.ts +1 -1
- package/dist/components/atoms/shared/PaperAndCard.js +17 -32
- package/dist/components/atoms/shared/PaperAndCard.js.map +1 -1
- package/dist/components/molecules/Calendar/Calendar.js +148 -98
- package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/components/molecules/Calendar/Calendar.stories.d.ts +8 -0
- package/dist/components/molecules/Calendar/components/MonthWeek.js +92 -125
- package/dist/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
- package/dist/components/molecules/Calendar/components/Weekdays.js +16 -29
- package/dist/components/molecules/Calendar/components/Weekdays.js.map +1 -1
- package/dist/components/molecules/Calendar/styled.js +88 -91
- package/dist/components/molecules/Calendar/styled.js.map +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js +133 -86
- package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/molecules/DatePicker/styled.js +34 -40
- package/dist/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js +150 -85
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/styled.js +10 -18
- package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +174 -146
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/Selector.js +101 -69
- package/dist/components/molecules/DateTimeSelector/Selector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/styled.js +67 -105
- package/dist/components/molecules/DateTimeSelector/styled.js.map +1 -1
- package/dist/components/molecules/Grid/functions.d.ts +1 -1
- package/dist/components/molecules/Grid/functions.js +22 -16
- package/dist/components/molecules/Grid/functions.js.map +1 -1
- package/dist/components/molecules/HintInputContainer/HintInputContainer.js +84 -36
- package/dist/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconComponent.js +38 -31
- package/dist/components/molecules/IconTextButton/IconComponent.js.map +1 -1
- package/dist/components/molecules/InputPassword/InputPasswordIcon.js +53 -28
- package/dist/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
- package/dist/components/molecules/InputPassword/styled.js +15 -18
- package/dist/components/molecules/InputPassword/styled.js.map +1 -1
- package/dist/components/molecules/Snackbar/Snackbar.d.ts +1 -1
- package/dist/components/molecules/Snackbar/Snackbar.js +64 -71
- package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/molecules/Snackbar/styled.js +92 -73
- package/dist/components/molecules/Snackbar/styled.js.map +1 -1
- package/dist/components/molecules/TextArea/TextArea.js +63 -72
- package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
- package/dist/components/molecules/TextArea/styled.js +33 -27
- package/dist/components/molecules/TextArea/styled.js.map +1 -1
- package/dist/hooks/useDebouncedState.js +14 -14
- package/dist/hooks/useDebouncedState.js.map +1 -1
- package/dist/hooks/useTheme.js +5 -8
- package/dist/hooks/useTheme.js.map +1 -1
- package/dist/index.js +141 -455
- package/dist/index.js.map +1 -1
- package/dist/styles/ThemeProvider.js +13 -19
- package/dist/styles/ThemeProvider.js.map +1 -1
- package/dist/styles/definitions.js +107 -104
- package/dist/styles/definitions.js.map +1 -1
- package/dist/styles/light.js +47 -36
- package/dist/styles/light.js.map +1 -1
- package/dist/utils/IPhoneXHelper.js +13 -19
- package/dist/utils/IPhoneXHelper.js.map +1 -1
- package/dist/utils/ResponsiveFontSize.d.ts +1 -1
- package/dist/utils/ResponsiveFontSize.js +22 -42
- package/dist/utils/ResponsiveFontSize.js.map +1 -1
- package/dist/utils/extractNumbersFromString.js +6 -11
- package/dist/utils/extractNumbersFromString.js.map +1 -1
- package/dist/utils/formatWithMask.js +23 -20
- package/dist/utils/formatWithMask.js.map +1 -1
- package/dist/utils/lightenDarkenColor.js +19 -15
- package/dist/utils/lightenDarkenColor.js.map +1 -1
- package/dist/utils/masks.js +16 -18
- package/dist/utils/masks.js.map +1 -1
- package/dist/utils/variantComplement.js +24 -25
- package/dist/utils/variantComplement.js.map +1 -1
- package/esm/components/atoms/Avatar/Avatar.d.ts +1 -1
- package/esm/components/atoms/Avatar/Avatar.js +25 -43
- package/esm/components/atoms/Avatar/Avatar.js.map +1 -1
- package/esm/components/atoms/Avatar/helpers.js +6 -8
- package/esm/components/atoms/Avatar/helpers.js.map +1 -1
- package/esm/components/atoms/Avatar/styled.js +32 -30
- package/esm/components/atoms/Avatar/styled.js.map +1 -1
- package/esm/components/atoms/Badge/Badge.js +15 -16
- package/esm/components/atoms/Badge/Badge.js.map +1 -1
- package/esm/components/atoms/Badge/styled.js +34 -15
- package/esm/components/atoms/Badge/styled.js.map +1 -1
- package/esm/components/atoms/BoxContent/BoxContent.js +35 -15
- package/esm/components/atoms/BoxContent/BoxContent.js.map +1 -1
- package/esm/components/atoms/BoxContent/styled.d.ts +3 -16
- package/esm/components/atoms/BoxContent/styled.js +48 -49
- package/esm/components/atoms/BoxContent/styled.js.map +1 -1
- package/esm/components/atoms/Button/Button.js +79 -56
- package/esm/components/atoms/Button/Button.js.map +1 -1
- package/esm/components/atoms/Button/States/BaseState.d.ts +1 -1
- package/esm/components/atoms/Button/States/BaseState.js +22 -22
- package/esm/components/atoms/Button/States/BaseState.js.map +1 -1
- package/esm/components/atoms/Button/States/Error.d.ts +1 -1
- package/esm/components/atoms/Button/States/Error.js +26 -7
- package/esm/components/atoms/Button/States/Error.js.map +1 -1
- package/esm/components/atoms/Button/States/Loading.d.ts +1 -1
- package/esm/components/atoms/Button/States/Loading.js +20 -20
- package/esm/components/atoms/Button/States/Loading.js.map +1 -1
- package/esm/components/atoms/Button/States/Success.d.ts +1 -1
- package/esm/components/atoms/Button/States/Success.js +26 -7
- package/esm/components/atoms/Button/States/Success.js.map +1 -1
- package/esm/components/atoms/Button/States/styled.d.ts +2 -11
- package/esm/components/atoms/Button/States/styled.js +13 -22
- package/esm/components/atoms/Button/States/styled.js.map +1 -1
- package/esm/components/atoms/Button/styled.js +43 -35
- package/esm/components/atoms/Button/styled.js.map +1 -1
- package/esm/components/atoms/Card/Card.js +52 -27
- package/esm/components/atoms/Card/Card.js.map +1 -1
- package/esm/components/atoms/Card/Footer/Footer.js +6 -10
- package/esm/components/atoms/Card/Footer/Footer.js.map +1 -1
- package/esm/components/atoms/Card/Header/Header.js +6 -10
- package/esm/components/atoms/Card/Header/Header.js.map +1 -1
- package/esm/components/atoms/Card/styled.d.ts +1 -8
- package/esm/components/atoms/Card/styled.js +11 -9
- package/esm/components/atoms/Card/styled.js.map +1 -1
- package/esm/components/atoms/Checkbox/Checkbox.js +66 -40
- package/esm/components/atoms/Checkbox/Checkbox.js.map +1 -1
- package/esm/components/atoms/Checkbox/styled.d.ts +3 -7
- package/esm/components/atoms/Checkbox/styled.js +35 -48
- package/esm/components/atoms/Checkbox/styled.js.map +1 -1
- package/esm/components/atoms/Divider/Divider.js +35 -15
- package/esm/components/atoms/Divider/Divider.js.map +1 -1
- package/esm/components/atoms/Divider/styled.d.ts +1 -13
- package/esm/components/atoms/Divider/styled.js +21 -25
- package/esm/components/atoms/Divider/styled.js.map +1 -1
- package/esm/components/atoms/GroupButton/GroupButton.js +83 -62
- package/esm/components/atoms/GroupButton/GroupButton.js.map +1 -1
- package/esm/components/atoms/GroupButton/GroupButtonOption.js +13 -13
- package/esm/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/esm/components/atoms/GroupButton/styled.js +101 -84
- package/esm/components/atoms/GroupButton/styled.js.map +1 -1
- package/esm/components/atoms/Icon/Icon.js +64 -33
- package/esm/components/atoms/Icon/Icon.js.map +1 -1
- package/esm/components/atoms/Icon/helpers.d.ts +1 -1
- package/esm/components/atoms/Icon/helpers.js +88 -64
- package/esm/components/atoms/Icon/helpers.js.map +1 -1
- package/esm/components/atoms/Input/Hint.js +18 -26
- package/esm/components/atoms/Input/Hint.js.map +1 -1
- package/esm/components/atoms/Input/InputContainer/InputContainer.js +88 -55
- package/esm/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
- package/esm/components/atoms/Input/InputElement/InputElement.js +64 -34
- package/esm/components/atoms/Input/InputElement/InputElement.js.map +1 -1
- package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js +102 -87
- package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
- package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +50 -25
- package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
- package/esm/components/atoms/Input/PressableInputContainer/styled.js +6 -5
- package/esm/components/atoms/Input/PressableInputContainer/styled.js.map +1 -1
- package/esm/components/atoms/Input/hooks/useInputFocus.d.ts +1 -1
- package/esm/components/atoms/Input/hooks/useInputFocus.js +11 -26
- package/esm/components/atoms/Input/hooks/useInputFocus.js.map +1 -1
- package/esm/components/atoms/Input/hooks/useNumberMask.d.ts +2 -2
- package/esm/components/atoms/Input/hooks/useNumberMask.js +67 -84
- package/esm/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
- package/esm/components/atoms/Input/hooks/useStringMask.d.ts +1 -1
- package/esm/components/atoms/Input/hooks/useStringMask.js +58 -79
- package/esm/components/atoms/Input/hooks/useStringMask.js.map +1 -1
- package/esm/components/atoms/Input/styled.js +91 -89
- package/esm/components/atoms/Input/styled.js.map +1 -1
- package/esm/components/atoms/Paper/Paper.js +45 -20
- package/esm/components/atoms/Paper/Paper.js.map +1 -1
- package/esm/components/atoms/Paper/styled.d.ts +1 -9
- package/esm/components/atoms/Paper/styled.js +11 -9
- package/esm/components/atoms/Paper/styled.js.map +1 -1
- package/esm/components/atoms/PressableSurface/PressableSurface.js +83 -66
- package/esm/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
- package/esm/components/atoms/ProgressBar/ProgressBar.js +79 -64
- package/esm/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
- package/esm/components/atoms/ProgressBar/styled.js +30 -24
- package/esm/components/atoms/ProgressBar/styled.js.map +1 -1
- package/esm/components/atoms/RadioButton/RadioButton.js +61 -35
- package/esm/components/atoms/RadioButton/RadioButton.js.map +1 -1
- package/esm/components/atoms/RadioButton/styled.js +24 -28
- package/esm/components/atoms/RadioButton/styled.js.map +1 -1
- package/esm/components/atoms/Switch/Switch.js +88 -62
- package/esm/components/atoms/Switch/Switch.js.map +1 -1
- package/esm/components/atoms/Switch/animation.js +7 -5
- package/esm/components/atoms/Switch/animation.js.map +1 -1
- package/esm/components/atoms/Switch/styled.d.ts +2 -14
- package/esm/components/atoms/Switch/styled.js +27 -22
- package/esm/components/atoms/Switch/styled.js.map +1 -1
- package/esm/components/atoms/Tag/Tag.js +69 -63
- package/esm/components/atoms/Tag/Tag.js.map +1 -1
- package/esm/components/atoms/Tag/styled.js +31 -35
- package/esm/components/atoms/Tag/styled.js.map +1 -1
- package/esm/components/atoms/Text/Text.js +72 -43
- package/esm/components/atoms/Text/Text.js.map +1 -1
- package/esm/components/atoms/Text/functions.js +5 -7
- package/esm/components/atoms/Text/functions.js.map +1 -1
- package/esm/components/atoms/Text/styled.d.ts +2 -16
- package/esm/components/atoms/Text/styled.js +19 -43
- package/esm/components/atoms/Text/styled.js.map +1 -1
- package/esm/components/atoms/shared/PaperAndCard.d.ts +1 -3
- package/esm/components/atoms/shared/PaperAndCard.js +16 -20
- package/esm/components/atoms/shared/PaperAndCard.js.map +1 -1
- package/esm/components/molecules/Calendar/Calendar.js +130 -124
- package/esm/components/molecules/Calendar/Calendar.js.map +1 -1
- package/esm/components/molecules/Calendar/components/MonthWeek.js +80 -98
- package/esm/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
- package/esm/components/molecules/Calendar/components/Weekdays.js +19 -25
- package/esm/components/molecules/Calendar/components/Weekdays.js.map +1 -1
- package/esm/components/molecules/Calendar/styled.js +79 -52
- package/esm/components/molecules/Calendar/styled.js.map +1 -1
- package/esm/components/molecules/DatePicker/DatePicker.js +131 -95
- package/esm/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/esm/components/molecules/DatePicker/styled.js +25 -19
- package/esm/components/molecules/DatePicker/styled.js.map +1 -1
- package/esm/components/molecules/DateTimePicker/DateTimePicker.js +155 -102
- package/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/esm/components/molecules/DateTimePicker/styled.js +8 -10
- package/esm/components/molecules/DateTimePicker/styled.js.map +1 -1
- package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +175 -179
- package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/esm/components/molecules/DateTimeSelector/Selector.js +93 -82
- package/esm/components/molecules/DateTimeSelector/Selector.js.map +1 -1
- package/esm/components/molecules/DateTimeSelector/styled.js +54 -52
- package/esm/components/molecules/DateTimeSelector/styled.js.map +1 -1
- package/esm/components/molecules/Grid/functions.d.ts +1 -1
- package/esm/components/molecules/Grid/functions.js +23 -13
- package/esm/components/molecules/Grid/functions.js.map +1 -1
- package/esm/components/molecules/HintInputContainer/HintInputContainer.js +71 -36
- package/esm/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
- package/esm/components/molecules/IconTextButton/IconComponent.js +31 -17
- package/esm/components/molecules/IconTextButton/IconComponent.js.map +1 -1
- package/esm/components/molecules/InputPassword/InputPasswordIcon.js +48 -24
- package/esm/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
- package/esm/components/molecules/InputPassword/styled.js +12 -9
- package/esm/components/molecules/InputPassword/styled.js.map +1 -1
- package/esm/components/molecules/Snackbar/Snackbar.d.ts +1 -1
- package/esm/components/molecules/Snackbar/Snackbar.js +64 -65
- package/esm/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/esm/components/molecules/Snackbar/styled.js +84 -48
- package/esm/components/molecules/Snackbar/styled.js.map +1 -1
- package/esm/components/molecules/TextArea/TextArea.js +66 -67
- package/esm/components/molecules/TextArea/TextArea.js.map +1 -1
- package/esm/components/molecules/TextArea/styled.d.ts +2 -12
- package/esm/components/molecules/TextArea/styled.js +25 -12
- package/esm/components/molecules/TextArea/styled.js.map +1 -1
- package/esm/hooks/useDebouncedState.js +13 -28
- package/esm/hooks/useDebouncedState.js.map +1 -1
- package/esm/hooks/useTheme.js +6 -5
- package/esm/hooks/useTheme.js.map +1 -1
- package/esm/index.js +55 -36
- package/esm/index.js.map +1 -1
- package/esm/styles/ThemeProvider.js +10 -9
- package/esm/styles/ThemeProvider.js.map +1 -1
- package/esm/styles/definitions.js +107 -117
- package/esm/styles/definitions.js.map +1 -1
- package/esm/styles/light.js +44 -31
- package/esm/styles/light.js.map +1 -1
- package/esm/utils/IPhoneXHelper.js +11 -9
- package/esm/utils/IPhoneXHelper.js.map +1 -1
- package/esm/utils/ResponsiveFontSize.d.ts +1 -1
- package/esm/utils/ResponsiveFontSize.js +26 -31
- package/esm/utils/ResponsiveFontSize.js.map +1 -1
- package/esm/utils/extractNumbersFromString.js +5 -7
- package/esm/utils/extractNumbersFromString.js.map +1 -1
- package/esm/utils/formatWithMask.js +20 -13
- package/esm/utils/formatWithMask.js.map +1 -1
- package/esm/utils/lightenDarkenColor.js +23 -14
- package/esm/utils/lightenDarkenColor.js.map +1 -1
- package/esm/utils/masks.js +18 -17
- package/esm/utils/masks.js.map +1 -1
- package/esm/utils/variantComplement.js +23 -21
- package/esm/utils/variantComplement.js.map +1 -1
- package/package.json +4 -7
- package/rollup.config.js +36 -0
- package/src/components/atoms/Avatar/Avatar.stories.tsx +2 -3
- package/src/components/atoms/Avatar/Avatar.tsx +1 -1
- package/src/components/atoms/Button/States/BaseState.tsx +1 -1
- package/src/components/atoms/Button/States/Error.tsx +2 -2
- package/src/components/atoms/Button/States/Loading.tsx +1 -1
- package/src/components/atoms/Button/States/Success.tsx +2 -2
- package/src/components/atoms/Icon/Icon.tsx +6 -2
- package/src/components/atoms/Icon/helpers.ts +18 -16
- package/src/components/molecules/Grid/functions.ts +2 -6
- package/src/components/molecules/IconTextButton/IconComponent.tsx +2 -6
- package/src/components/molecules/IconTextButton/{IconTextButton.tsx → IconTextButton.ts} +0 -0
- package/src/components/molecules/Snackbar/Snackbar.tsx +1 -1
- package/tsconfig.build.json +2 -1
- package/babel.config.esm.js +0 -34
- package/dist/components/atoms/Avatar/index.js +0 -16
- package/dist/components/atoms/Avatar/index.js.map +0 -1
- package/dist/components/atoms/Badge/index.js +0 -16
- package/dist/components/atoms/Badge/index.js.map +0 -1
- package/dist/components/atoms/BoxContent/index.js +0 -16
- package/dist/components/atoms/BoxContent/index.js.map +0 -1
- package/dist/components/atoms/Button/States/index.js +0 -32
- package/dist/components/atoms/Button/States/index.js.map +0 -1
- package/dist/components/atoms/Button/index.js +0 -36
- package/dist/components/atoms/Button/index.js.map +0 -1
- package/dist/components/atoms/Card/Footer/index.js +0 -16
- package/dist/components/atoms/Card/Footer/index.js.map +0 -1
- package/dist/components/atoms/Card/Header/index.js +0 -16
- package/dist/components/atoms/Card/Header/index.js.map +0 -1
- package/dist/components/atoms/Card/index.js +0 -16
- package/dist/components/atoms/Card/index.js.map +0 -1
- package/dist/components/atoms/Checkbox/index.js +0 -16
- package/dist/components/atoms/Checkbox/index.js.map +0 -1
- package/dist/components/atoms/Divider/index.js +0 -16
- package/dist/components/atoms/Divider/index.js.map +0 -1
- package/dist/components/atoms/GroupButton/index.js +0 -24
- package/dist/components/atoms/GroupButton/index.js.map +0 -1
- package/dist/components/atoms/Icon/index.js +0 -16
- package/dist/components/atoms/Icon/index.js.map +0 -1
- package/dist/components/atoms/Input/PressableInputContainer/index.js +0 -16
- package/dist/components/atoms/Input/PressableInputContainer/index.js.map +0 -1
- package/dist/components/atoms/Input/index.js +0 -113
- package/dist/components/atoms/Input/index.js.map +0 -1
- package/dist/components/atoms/Paper/index.js +0 -16
- package/dist/components/atoms/Paper/index.js.map +0 -1
- package/dist/components/atoms/PressableSurface/index.js +0 -16
- package/dist/components/atoms/PressableSurface/index.js.map +0 -1
- package/dist/components/atoms/ProgressBar/index.js +0 -16
- package/dist/components/atoms/ProgressBar/index.js.map +0 -1
- package/dist/components/atoms/RadioButton/index.js +0 -16
- package/dist/components/atoms/RadioButton/index.js.map +0 -1
- package/dist/components/atoms/Switch/index.js +0 -16
- package/dist/components/atoms/Switch/index.js.map +0 -1
- package/dist/components/atoms/Tag/index.js +0 -16
- package/dist/components/atoms/Tag/index.js.map +0 -1
- package/dist/components/atoms/Text/index.js +0 -16
- package/dist/components/atoms/Text/index.js.map +0 -1
- package/dist/components/molecules/Calendar/components/index.js +0 -24
- package/dist/components/molecules/Calendar/components/index.js.map +0 -1
- package/dist/components/molecules/Calendar/index.js +0 -16
- package/dist/components/molecules/Calendar/index.js.map +0 -1
- package/dist/components/molecules/DatePicker/index.js +0 -16
- package/dist/components/molecules/DatePicker/index.js.map +0 -1
- package/dist/components/molecules/DateTimePicker/index.js +0 -16
- package/dist/components/molecules/DateTimePicker/index.js.map +0 -1
- package/dist/components/molecules/DateTimeSelector/index.js +0 -16
- package/dist/components/molecules/DateTimeSelector/index.js.map +0 -1
- package/dist/components/molecules/Grid/index.js +0 -20
- package/dist/components/molecules/Grid/index.js.map +0 -1
- package/dist/components/molecules/HintInputContainer/index.js +0 -16
- package/dist/components/molecules/HintInputContainer/index.js.map +0 -1
- package/dist/components/molecules/HintInputContainer/styled.js +0 -2
- package/dist/components/molecules/HintInputContainer/styled.js.map +0 -1
- package/dist/components/molecules/IconTextButton/IconTextButton.js +0 -6
- package/dist/components/molecules/IconTextButton/IconTextButton.js.map +0 -1
- package/dist/components/molecules/IconTextButton/index.js +0 -16
- package/dist/components/molecules/IconTextButton/index.js.map +0 -1
- package/dist/components/molecules/IconTextButton/styled.d.ts +0 -4
- package/dist/components/molecules/IconTextButton/styled.js +0 -29
- package/dist/components/molecules/IconTextButton/styled.js.map +0 -1
- package/dist/components/molecules/InputPassword/index.js +0 -16
- package/dist/components/molecules/InputPassword/index.js.map +0 -1
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +0 -6
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +0 -1
- package/dist/components/molecules/LabeledSwitch/index.js +0 -6
- package/dist/components/molecules/LabeledSwitch/index.js.map +0 -1
- package/dist/components/molecules/Snackbar/index.js +0 -16
- package/dist/components/molecules/Snackbar/index.js.map +0 -1
- package/dist/components/molecules/TextArea/index.js +0 -24
- package/dist/components/molecules/TextArea/index.js.map +0 -1
- package/dist/hooks/index.js +0 -22
- package/dist/hooks/index.js.map +0 -1
- package/dist/types/defaults.js +0 -6
- package/dist/types/defaults.js.map +0 -1
- package/dist/utils/index.js +0 -103
- package/dist/utils/index.js.map +0 -1
- package/esm/components/atoms/Avatar/index.js +0 -2
- package/esm/components/atoms/Avatar/index.js.map +0 -1
- package/esm/components/atoms/Badge/index.js +0 -2
- package/esm/components/atoms/Badge/index.js.map +0 -1
- package/esm/components/atoms/BoxContent/index.js +0 -2
- package/esm/components/atoms/BoxContent/index.js.map +0 -1
- package/esm/components/atoms/Button/States/index.js +0 -4
- package/esm/components/atoms/Button/States/index.js.map +0 -1
- package/esm/components/atoms/Button/index.js +0 -3
- package/esm/components/atoms/Button/index.js.map +0 -1
- package/esm/components/atoms/Card/Footer/index.js +0 -2
- package/esm/components/atoms/Card/Footer/index.js.map +0 -1
- package/esm/components/atoms/Card/Header/index.js +0 -2
- package/esm/components/atoms/Card/Header/index.js.map +0 -1
- package/esm/components/atoms/Card/index.js +0 -2
- package/esm/components/atoms/Card/index.js.map +0 -1
- package/esm/components/atoms/Checkbox/index.js +0 -2
- package/esm/components/atoms/Checkbox/index.js.map +0 -1
- package/esm/components/atoms/Divider/index.js +0 -2
- package/esm/components/atoms/Divider/index.js.map +0 -1
- package/esm/components/atoms/GroupButton/index.js +0 -3
- package/esm/components/atoms/GroupButton/index.js.map +0 -1
- package/esm/components/atoms/Icon/index.js +0 -2
- package/esm/components/atoms/Icon/index.js.map +0 -1
- package/esm/components/atoms/Input/PressableInputContainer/index.js +0 -2
- package/esm/components/atoms/Input/PressableInputContainer/index.js.map +0 -1
- package/esm/components/atoms/Input/index.js +0 -10
- package/esm/components/atoms/Input/index.js.map +0 -1
- package/esm/components/atoms/Paper/index.js +0 -2
- package/esm/components/atoms/Paper/index.js.map +0 -1
- package/esm/components/atoms/PressableSurface/index.js +0 -2
- package/esm/components/atoms/PressableSurface/index.js.map +0 -1
- package/esm/components/atoms/ProgressBar/index.js +0 -2
- package/esm/components/atoms/ProgressBar/index.js.map +0 -1
- package/esm/components/atoms/RadioButton/index.js +0 -2
- package/esm/components/atoms/RadioButton/index.js.map +0 -1
- package/esm/components/atoms/Switch/index.js +0 -2
- package/esm/components/atoms/Switch/index.js.map +0 -1
- package/esm/components/atoms/Tag/index.js +0 -2
- package/esm/components/atoms/Tag/index.js.map +0 -1
- package/esm/components/atoms/Text/index.js +0 -2
- package/esm/components/atoms/Text/index.js.map +0 -1
- package/esm/components/molecules/Calendar/components/index.js +0 -3
- package/esm/components/molecules/Calendar/components/index.js.map +0 -1
- package/esm/components/molecules/Calendar/index.js +0 -2
- package/esm/components/molecules/Calendar/index.js.map +0 -1
- package/esm/components/molecules/DatePicker/index.js +0 -2
- package/esm/components/molecules/DatePicker/index.js.map +0 -1
- package/esm/components/molecules/DateTimePicker/index.js +0 -2
- package/esm/components/molecules/DateTimePicker/index.js.map +0 -1
- package/esm/components/molecules/DateTimeSelector/index.js +0 -2
- package/esm/components/molecules/DateTimeSelector/index.js.map +0 -1
- package/esm/components/molecules/Grid/index.js +0 -2
- package/esm/components/molecules/Grid/index.js.map +0 -1
- package/esm/components/molecules/HintInputContainer/index.js +0 -2
- package/esm/components/molecules/HintInputContainer/index.js.map +0 -1
- package/esm/components/molecules/HintInputContainer/styled.js +0 -2
- package/esm/components/molecules/HintInputContainer/styled.js.map +0 -1
- package/esm/components/molecules/IconTextButton/IconTextButton.js +0 -2
- package/esm/components/molecules/IconTextButton/IconTextButton.js.map +0 -1
- package/esm/components/molecules/IconTextButton/index.js +0 -2
- package/esm/components/molecules/IconTextButton/index.js.map +0 -1
- package/esm/components/molecules/IconTextButton/styled.d.ts +0 -11
- package/esm/components/molecules/IconTextButton/styled.js +0 -14
- package/esm/components/molecules/IconTextButton/styled.js.map +0 -1
- package/esm/components/molecules/InputPassword/index.js +0 -2
- package/esm/components/molecules/InputPassword/index.js.map +0 -1
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +0 -2
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +0 -1
- package/esm/components/molecules/LabeledSwitch/index.js +0 -2
- package/esm/components/molecules/LabeledSwitch/index.js.map +0 -1
- package/esm/components/molecules/Snackbar/index.js +0 -2
- package/esm/components/molecules/Snackbar/index.js.map +0 -1
- package/esm/components/molecules/TextArea/index.js +0 -3
- package/esm/components/molecules/TextArea/index.js.map +0 -1
- package/esm/hooks/index.js +0 -3
- package/esm/hooks/index.js.map +0 -1
- package/esm/types/defaults.js +0 -2
- package/esm/types/defaults.js.map +0 -1
- package/esm/utils/index.js +0 -8
- package/esm/utils/index.js.map +0 -1
- package/src/components/molecules/IconTextButton/styled.ts +0 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponsiveFontSize.js","
|
|
1
|
+
{"version":3,"file":"ResponsiveFontSize.js","sources":["../../src/utils/ResponsiveFontSize.ts"],"sourcesContent":["import { Dimensions, Platform, StatusBar } from 'react-native';\nimport { extractNumbersFromString } from './extractNumbersFromString';\nimport { isIphoneX } from './IPhoneXHelper';\n\nconst STANDARD_SCREEN_HEIGHT = 680;\n\n/**\n * Use this function when you want to scale a percentage number\n * to a reasonable value that will fit better on most of devices.\n *\n * @param percent\n * @returns\n */\nexport const RFPercentage = (percent: number) => {\n if (Platform.OS === 'web') return percent;\n const { height, width } = Dimensions.get('window');\n const standardLength = width > height ? width : height;\n const offset =\n width > height\n ? 0\n : Platform.OS === 'ios'\n ? 78\n : StatusBar.currentHeight || 0; // iPhone X style SafeAreaView size in portrait\n const deviceHeight =\n isIphoneX() || Platform.OS === 'android'\n ? standardLength - offset\n : standardLength;\n const heightPercent = (percent * deviceHeight) / 100;\n return Math.round(heightPercent);\n};\n\n/**\n * Use this function when you want to scale a font size based on pixel unit\n * to a reasonable value that will fit better on most of devices.\n *\n * @param fontSize\n * @param standardScreenHeight\n * @returns\n */\nexport const RFValue = (\n fontSize: number,\n standardScreenHeight: number = STANDARD_SCREEN_HEIGHT\n) => {\n if (Platform.OS === 'web') return fontSize;\n const { height, width } = Dimensions.get('window');\n const standardLength = width > height ? width : height;\n const offset =\n width > height\n ? 0\n : Platform.OS === 'ios'\n ? 78\n : StatusBar.currentHeight || 0; // iPhone X style SafeAreaView size in portrait\n const deviceHeight =\n isIphoneX() || Platform.OS === 'android'\n ? standardLength - offset\n : standardLength;\n const heightPercent = (fontSize * deviceHeight) / standardScreenHeight;\n return Math.round(heightPercent);\n};\n\n/**\n * Same as RFValue, however you can provide string values. E.g: '10px', '-5px'.\n *\n * @param fontSize\n * @param standardScreenHeight\n * @returns\n */\nexport const RFValueStr = (fontSize: string, standardScreenHeight?: number) => {\n const _fontSize = extractNumbersFromString(fontSize);\n return `${RFValue(_fontSize, standardScreenHeight)}px`;\n};\n"],"names":[],"mappings":";;;;AAIA,MAAM,sBAAyB,GAAA,GAAA,CAAA;AASlB,MAAA,YAAA,GAAe,CAAC,OAAoB,KAAA;AAC/C,EAAA,IAAI,SAAS,EAAO,KAAA,KAAA;AAAO,IAAO,OAAA,OAAA,CAAA;AAClC,EAAA,MAAM,EAAE,MAAQ,EAAA,KAAA,EAAU,GAAA,UAAA,CAAW,IAAI,QAAQ,CAAA,CAAA;AACjD,EAAM,MAAA,cAAA,GAAiB,KAAQ,GAAA,MAAA,GAAS,KAAQ,GAAA,MAAA,CAAA;AAChD,EAAM,MAAA,MAAA,GACJ,QAAQ,MACJ,GAAA,CAAA,GACA,SAAS,EAAO,KAAA,KAAA,GAChB,EACA,GAAA,SAAA,CAAU,aAAiB,IAAA,CAAA,CAAA;AACjC,EAAA,MAAM,eACJ,SAAU,EAAA,IAAK,SAAS,EAAO,KAAA,SAAA,GAC3B,iBAAiB,MACjB,GAAA,cAAA,CAAA;AACN,EAAM,MAAA,aAAA,GAAiB,UAAU,YAAgB,GAAA,GAAA,CAAA;AACjD,EAAO,OAAA,IAAA,CAAK,MAAM,aAAa,CAAA,CAAA;AACjC,EAAA;AAUO,MAAM,OAAU,GAAA,CACrB,QACA,EAAA,oBAAA,GAA+B,sBAC5B,KAAA;AACH,EAAA,IAAI,SAAS,EAAO,KAAA,KAAA;AAAO,IAAO,OAAA,QAAA,CAAA;AAClC,EAAA,MAAM,EAAE,MAAQ,EAAA,KAAA,EAAU,GAAA,UAAA,CAAW,IAAI,QAAQ,CAAA,CAAA;AACjD,EAAM,MAAA,cAAA,GAAiB,KAAQ,GAAA,MAAA,GAAS,KAAQ,GAAA,MAAA,CAAA;AAChD,EAAM,MAAA,MAAA,GACJ,QAAQ,MACJ,GAAA,CAAA,GACA,SAAS,EAAO,KAAA,KAAA,GAChB,EACA,GAAA,SAAA,CAAU,aAAiB,IAAA,CAAA,CAAA;AACjC,EAAA,MAAM,eACJ,SAAU,EAAA,IAAK,SAAS,EAAO,KAAA,SAAA,GAC3B,iBAAiB,MACjB,GAAA,cAAA,CAAA;AACN,EAAM,MAAA,aAAA,GAAiB,WAAW,YAAgB,GAAA,oBAAA,CAAA;AAClD,EAAO,OAAA,IAAA,CAAK,MAAM,aAAa,CAAA,CAAA;AACjC,EAAA;AASa,MAAA,UAAA,GAAa,CAAC,QAAA,EAAkB,oBAAkC,KAAA;AAC7E,EAAM,MAAA,SAAA,GAAY,yBAAyB,QAAQ,CAAA,CAAA;AACnD,EAAO,OAAA,CAAA,EAAG,OAAQ,CAAA,SAAA,EAAW,oBAAoB,CAAA,CAAA,EAAA,CAAA,CAAA;AACnD;;;;"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=extractNumbersFromString.js.map
|
|
1
|
+
const extractNumbersFromString = (value) => Number(extractDigitsFromString(value));
|
|
2
|
+
const extractDigitsFromString = (value) => value.replace(/[^0-9]/g, "");
|
|
3
|
+
|
|
4
|
+
export { extractDigitsFromString, extractNumbersFromString };
|
|
5
|
+
//# sourceMappingURL=extractNumbersFromString.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extractNumbersFromString.js","
|
|
1
|
+
{"version":3,"file":"extractNumbersFromString.js","sources":["../../src/utils/extractNumbersFromString.ts"],"sourcesContent":["export const extractNumbersFromString = (value: string): number =>\n Number(extractDigitsFromString(value));\n\nexport const extractDigitsFromString = (value: string): string =>\n value.replace(/[^0-9]/g, '');\n"],"names":[],"mappings":"AAAO,MAAM,2BAA2B,CAAC,KAAA,KACvC,MAAO,CAAA,uBAAA,CAAwB,KAAK,CAAC,EAAA;AAEhC,MAAM,0BAA0B,CAAC,KAAA,KACtC,KAAM,CAAA,OAAA,CAAQ,WAAW,EAAE;;;;"}
|
|
@@ -1,19 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import 'react';
|
|
2
|
+
import '../components/atoms/Text/styled.js';
|
|
3
|
+
import '../components/atoms/Input/styled.js';
|
|
4
|
+
import { getInternalNumberAndMask } from '../components/atoms/Input/hooks/useNumberMask.js';
|
|
5
|
+
import { getMask, mergeMask } from '../components/atoms/Input/hooks/useStringMask.js';
|
|
6
|
+
import '../components/atoms/Input/InputElement/InputElement.js';
|
|
7
|
+
import '../components/atoms/Input/InputMaskElement/InputMaskElement.js';
|
|
8
|
+
import '../components/atoms/Input/PressableInputContainer/styled.js';
|
|
2
9
|
import currency from 'currency.js';
|
|
3
|
-
export var formatWithMask = function formatWithMask(mask, value) {
|
|
4
|
-
if (Array.isArray(mask) || typeof mask === 'function') {
|
|
5
|
-
var selectedMask = getMask(mask, String(value));
|
|
6
10
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
const formatWithMask = (mask, value) => {
|
|
12
|
+
if (Array.isArray(mask) || typeof mask === "function") {
|
|
13
|
+
const selectedMask = getMask(mask, String(value));
|
|
14
|
+
const { formatted } = mergeMask(String(value), selectedMask);
|
|
15
|
+
return formatted || "";
|
|
11
16
|
} else {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
const { internalNumber, mergedOptions } = getInternalNumberAndMask(
|
|
18
|
+
value,
|
|
19
|
+
mask
|
|
20
|
+
);
|
|
16
21
|
return currency(internalNumber).format(mergedOptions);
|
|
17
22
|
}
|
|
18
23
|
};
|
|
19
|
-
|
|
24
|
+
|
|
25
|
+
export { formatWithMask };
|
|
26
|
+
//# sourceMappingURL=formatWithMask.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatWithMask.js","
|
|
1
|
+
{"version":3,"file":"formatWithMask.js","sources":["../../src/utils/formatWithMask.ts"],"sourcesContent":["import {\n MaskType,\n CurrencyOptions,\n getMask,\n mergeMask,\n getInternalNumberAndMask,\n} from '../components/atoms/Input';\nimport currency from 'currency.js';\n\nexport const formatWithMask = (\n mask: (MaskType[] | ((value: string) => MaskType[])) | CurrencyOptions,\n value: string | number\n): string | number => {\n if (Array.isArray(mask) || typeof mask === 'function') {\n const selectedMask = getMask(mask, String(value));\n const { formatted } = mergeMask(String(value), selectedMask);\n return formatted || '';\n } else {\n const { internalNumber, mergedOptions } = getInternalNumberAndMask(\n value,\n mask\n );\n return currency(internalNumber).format(mergedOptions);\n }\n};\n"],"names":[],"mappings":";;;;;;;;;;AASa,MAAA,cAAA,GAAiB,CAC5B,IAAA,EACA,KACoB,KAAA;AACpB,EAAA,IAAI,MAAM,OAAQ,CAAA,IAAI,CAAK,IAAA,OAAO,SAAS,UAAY,EAAA;AACrD,IAAA,MAAM,YAAe,GAAA,OAAA,CAAQ,IAAM,EAAA,MAAA,CAAO,KAAK,CAAC,CAAA,CAAA;AAChD,IAAA,MAAM,EAAE,SAAU,EAAA,GAAI,UAAU,MAAO,CAAA,KAAK,GAAG,YAAY,CAAA,CAAA;AAC3D,IAAA,OAAO,SAAa,IAAA,EAAA,CAAA;AAAA,GACf,MAAA;AACL,IAAM,MAAA,EAAE,cAAgB,EAAA,aAAA,EAAkB,GAAA,wBAAA;AAAA,MACxC,KAAA;AAAA,MACA,IAAA;AAAA,KACF,CAAA;AACA,IAAA,OAAO,QAAS,CAAA,cAAc,CAAE,CAAA,MAAA,CAAO,aAAa,CAAA,CAAA;AAAA,GACtD;AACF;;;;"}
|
|
@@ -1,18 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
if (color[0] == '#') {
|
|
1
|
+
const lightenDarkenColor = (color, variation) => {
|
|
2
|
+
let usePound = false;
|
|
3
|
+
if (color[0] == "#") {
|
|
5
4
|
color = color.slice(1);
|
|
6
5
|
usePound = true;
|
|
7
6
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
if (
|
|
16
|
-
|
|
7
|
+
const num = parseInt(color, 16);
|
|
8
|
+
let r = (num >> 16) + variation;
|
|
9
|
+
if (r > 255)
|
|
10
|
+
r = 255;
|
|
11
|
+
else if (r < 0)
|
|
12
|
+
r = 0;
|
|
13
|
+
let b = (num >> 8 & 255) + variation;
|
|
14
|
+
if (b > 255)
|
|
15
|
+
b = 255;
|
|
16
|
+
else if (b < 0)
|
|
17
|
+
b = 0;
|
|
18
|
+
let g = (num & 255) + variation;
|
|
19
|
+
if (g > 255)
|
|
20
|
+
g = 255;
|
|
21
|
+
else if (g < 0)
|
|
22
|
+
g = 0;
|
|
23
|
+
return (usePound ? "#" : "") + (g | b << 8 | r << 16).toString(16);
|
|
17
24
|
};
|
|
18
|
-
|
|
25
|
+
|
|
26
|
+
export { lightenDarkenColor };
|
|
27
|
+
//# sourceMappingURL=lightenDarkenColor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lightenDarkenColor.js","
|
|
1
|
+
{"version":3,"file":"lightenDarkenColor.js","sources":["../../src/utils/lightenDarkenColor.ts"],"sourcesContent":["export const lightenDarkenColor = (color: string, variation: number) => {\n let usePound = false;\n\n if (color[0] == '#') {\n color = color.slice(1);\n usePound = true;\n }\n\n const num = parseInt(color, 16);\n\n let r = (num >> 16) + variation;\n if (r > 255) r = 255;\n else if (r < 0) r = 0;\n\n let b = ((num >> 8) & 0x00ff) + variation;\n if (b > 255) b = 255;\n else if (b < 0) b = 0;\n\n let g = (num & 0x0000ff) + variation;\n if (g > 255) g = 255;\n else if (g < 0) g = 0;\n\n return (usePound ? '#' : '') + (g | (b << 8) | (r << 16)).toString(16);\n};\n"],"names":[],"mappings":"AAAa,MAAA,kBAAA,GAAqB,CAAC,KAAA,EAAe,SAAsB,KAAA;AACtE,EAAA,IAAI,QAAW,GAAA,KAAA,CAAA;AAEf,EAAI,IAAA,KAAA,CAAM,MAAM,GAAK,EAAA;AACnB,IAAQ,KAAA,GAAA,KAAA,CAAM,MAAM,CAAC,CAAA,CAAA;AACrB,IAAW,QAAA,GAAA,IAAA,CAAA;AAAA,GACb;AAEA,EAAM,MAAA,GAAA,GAAM,QAAS,CAAA,KAAA,EAAO,EAAE,CAAA,CAAA;AAE9B,EAAI,IAAA,CAAA,GAAA,CAAK,OAAO,EAAM,IAAA,SAAA,CAAA;AACtB,EAAA,IAAI,CAAI,GAAA,GAAA;AAAK,IAAI,CAAA,GAAA,GAAA,CAAA;AAAA,OAAA,IACR,CAAI,GAAA,CAAA;AAAG,IAAI,CAAA,GAAA,CAAA,CAAA;AAEpB,EAAI,IAAA,CAAA,GAAA,CAAM,GAAO,IAAA,CAAA,GAAK,GAAU,IAAA,SAAA,CAAA;AAChC,EAAA,IAAI,CAAI,GAAA,GAAA;AAAK,IAAI,CAAA,GAAA,GAAA,CAAA;AAAA,OAAA,IACR,CAAI,GAAA,CAAA;AAAG,IAAI,CAAA,GAAA,CAAA,CAAA;AAEpB,EAAI,IAAA,CAAA,GAAA,CAAK,MAAM,GAAY,IAAA,SAAA,CAAA;AAC3B,EAAA,IAAI,CAAI,GAAA,GAAA;AAAK,IAAI,CAAA,GAAA,GAAA,CAAA;AAAA,OAAA,IACR,CAAI,GAAA,CAAA;AAAG,IAAI,CAAA,GAAA,CAAA,CAAA;AAEpB,EAAQ,OAAA,CAAA,QAAA,GAAW,MAAM,EAAO,IAAA,CAAA,CAAA,GAAK,KAAK,CAAM,GAAA,CAAA,IAAK,EAAK,EAAA,QAAA,CAAS,EAAE,CAAA,CAAA;AACvE;;;;"}
|
package/esm/utils/masks.js
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { extractDigitsFromString } from './extractNumbersFromString';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { extractDigitsFromString } from './extractNumbersFromString.js';
|
|
2
|
+
|
|
3
|
+
const Masks = {
|
|
4
|
+
CPF: ["999.999.999-99"],
|
|
5
|
+
CNPJ: ["99.999.999/9999-99"],
|
|
6
|
+
DATE: ["99/99/9999"],
|
|
7
|
+
MONTH_YEAR: ["99/9999"],
|
|
8
|
+
CEP: ["99999-999"],
|
|
9
|
+
PHONE: ["(99) 9999-9999"],
|
|
10
|
+
PHONE_EXTENDED: ["(99) 99999-9999"],
|
|
11
|
+
COMBINED_PHONE: (value) => {
|
|
12
|
+
const onlyNumbers = extractDigitsFromString(value);
|
|
13
|
+
const isCellPhoneExtended = onlyNumbers.length === 11;
|
|
14
|
+
return (value == null ? void 0 : value.length) <= 14 && !isCellPhoneExtended ? Masks.PHONE : Masks.PHONE_EXTENDED;
|
|
14
15
|
},
|
|
15
|
-
COMBINED_CPF_CNPJ:
|
|
16
|
-
return (value === null || value === void 0 ? void 0 : value.length) <= 14 ? Masks.CPF : Masks.CNPJ;
|
|
17
|
-
}
|
|
16
|
+
COMBINED_CPF_CNPJ: (value) => (value == null ? void 0 : value.length) <= 14 ? Masks.CPF : Masks.CNPJ
|
|
18
17
|
};
|
|
19
|
-
|
|
18
|
+
|
|
19
|
+
export { Masks };
|
|
20
|
+
//# sourceMappingURL=masks.js.map
|
package/esm/utils/masks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"masks.js","
|
|
1
|
+
{"version":3,"file":"masks.js","sources":["../../src/utils/masks.ts"],"sourcesContent":["// NOTE: Add here all individually utils, then you can use it on input components everywhere.\nimport { extractDigitsFromString } from './extractNumbersFromString';\n\nexport const Masks = {\n CPF: ['999.999.999-99'],\n CNPJ: ['99.999.999/9999-99'],\n DATE: ['99/99/9999'],\n MONTH_YEAR: ['99/9999'],\n CEP: ['99999-999'],\n PHONE: ['(99) 9999-9999'],\n PHONE_EXTENDED: ['(99) 99999-9999'],\n COMBINED_PHONE: (value: string) => {\n const onlyNumbers = extractDigitsFromString(value);\n // Value is number extended, but without mask.\n const isCellPhoneExtended = onlyNumbers.length === 11;\n\n // Value in formatted mode\n return value?.length <= 14 && !isCellPhoneExtended\n ? Masks.PHONE\n : Masks.PHONE_EXTENDED;\n },\n COMBINED_CPF_CNPJ: (value: string) =>\n value?.length <= 14 ? Masks.CPF : Masks.CNPJ,\n};\n"],"names":[],"mappings":";;AAGO,MAAM,KAAQ,GAAA;AAAA,EACnB,GAAA,EAAK,CAAC,gBAAgB,CAAA;AAAA,EACtB,IAAA,EAAM,CAAC,oBAAoB,CAAA;AAAA,EAC3B,IAAA,EAAM,CAAC,YAAY,CAAA;AAAA,EACnB,UAAA,EAAY,CAAC,SAAS,CAAA;AAAA,EACtB,GAAA,EAAK,CAAC,WAAW,CAAA;AAAA,EACjB,KAAA,EAAO,CAAC,gBAAgB,CAAA;AAAA,EACxB,cAAA,EAAgB,CAAC,iBAAiB,CAAA;AAAA,EAClC,cAAA,EAAgB,CAAC,KAAkB,KAAA;AACjC,IAAM,MAAA,WAAA,GAAc,wBAAwB,KAAK,CAAA,CAAA;AAEjD,IAAM,MAAA,mBAAA,GAAsB,YAAY,MAAW,KAAA,EAAA,CAAA;AAGnD,IAAA,OAAA,CAAO,+BAAO,MAAU,KAAA,EAAA,IAAM,CAAC,mBAC3B,GAAA,KAAA,CAAM,QACN,KAAM,CAAA,cAAA,CAAA;AAAA,GACZ;AAAA,EACA,iBAAA,EAAmB,CAAC,KAClB,KAAA,CAAA,KAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAO,WAAU,EAAK,GAAA,KAAA,CAAM,MAAM,KAAM,CAAA,IAAA;AAC5C;;;;"}
|
|
@@ -1,26 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
filled:
|
|
3
|
-
outlined:
|
|
4
|
-
text:
|
|
1
|
+
const fontColorVC = {
|
|
2
|
+
filled: "light",
|
|
3
|
+
outlined: "orange",
|
|
4
|
+
text: "orange"
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
filled:
|
|
8
|
-
outlined:
|
|
9
|
-
text:
|
|
6
|
+
const colorVC = {
|
|
7
|
+
filled: "primary",
|
|
8
|
+
outlined: "primary",
|
|
9
|
+
text: "primary"
|
|
10
10
|
};
|
|
11
|
-
|
|
12
|
-
filled:
|
|
13
|
-
outlined:
|
|
14
|
-
text:
|
|
11
|
+
const colorGradationVC = {
|
|
12
|
+
filled: "dark",
|
|
13
|
+
outlined: "dark",
|
|
14
|
+
text: "dark"
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
filled:
|
|
18
|
-
outlined:
|
|
19
|
-
text:
|
|
16
|
+
const borderColorVC = {
|
|
17
|
+
filled: "primary",
|
|
18
|
+
outlined: "primary",
|
|
19
|
+
text: "primary"
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
filled:
|
|
23
|
-
outlined:
|
|
24
|
-
text:
|
|
21
|
+
const borderColorGradationVC = {
|
|
22
|
+
filled: "dark",
|
|
23
|
+
outlined: "dark",
|
|
24
|
+
text: "dark"
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
export { borderColorGradationVC, borderColorVC, colorGradationVC, colorVC, fontColorVC };
|
|
28
|
+
//# sourceMappingURL=variantComplement.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variantComplement.js","
|
|
1
|
+
{"version":3,"file":"variantComplement.js","sources":["../../src/utils/variantComplement.ts"],"sourcesContent":["import {\n ColorGradationType,\n ColorType,\n FontColorType,\n VariantType,\n} from '../types/defaults';\n\nexport const fontColorVC: Record<VariantType, FontColorType> = {\n filled: 'light',\n outlined: 'orange',\n text: 'orange',\n};\n\nexport const colorVC: Record<VariantType, ColorType> = {\n filled: 'primary',\n outlined: 'primary',\n text: 'primary',\n};\n\nexport const colorGradationVC: Record<VariantType, ColorGradationType> = {\n filled: 'dark',\n outlined: 'dark',\n text: 'dark',\n};\n\nexport const borderColorVC: Record<VariantType, ColorType> = {\n filled: 'primary',\n outlined: 'primary',\n text: 'primary',\n};\n\nexport const borderColorGradationVC: Record<VariantType, ColorGradationType> = {\n filled: 'dark',\n outlined: 'dark',\n text: 'dark',\n};\n"],"names":[],"mappings":"AAOO,MAAM,WAAkD,GAAA;AAAA,EAC7D,MAAQ,EAAA,OAAA;AAAA,EACR,QAAU,EAAA,QAAA;AAAA,EACV,IAAM,EAAA,QAAA;AACR,EAAA;AAEO,MAAM,OAA0C,GAAA;AAAA,EACrD,MAAQ,EAAA,SAAA;AAAA,EACR,QAAU,EAAA,SAAA;AAAA,EACV,IAAM,EAAA,SAAA;AACR,EAAA;AAEO,MAAM,gBAA4D,GAAA;AAAA,EACvE,MAAQ,EAAA,MAAA;AAAA,EACR,QAAU,EAAA,MAAA;AAAA,EACV,IAAM,EAAA,MAAA;AACR,EAAA;AAEO,MAAM,aAAgD,GAAA;AAAA,EAC3D,MAAQ,EAAA,SAAA;AAAA,EACR,QAAU,EAAA,SAAA;AAAA,EACV,IAAM,EAAA,SAAA;AACR,EAAA;AAEO,MAAM,sBAAkE,GAAA;AAAA,EAC7E,MAAQ,EAAA,MAAA;AAAA,EACR,QAAU,EAAA,MAAA;AAAA,EACV,IAAM,EAAA,MAAA;AACR;;;;"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tecsinapse/react-core",
|
|
3
3
|
"description": "TecSinapse hybrid React components",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.21.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "esm/index.js",
|
|
8
8
|
"types": "dist/index.d.ts",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"start": "yarn build:es --watch",
|
|
11
|
-
"build:es": "yarn
|
|
12
|
-
"build:
|
|
13
|
-
"build:esm": "cross-env BABEL_ENV=build babel src --root-mode upward --out-dir esm --source-maps --extensions .ts,.tsx --delete-dir-on-start --no-comments --config-file ./babel.config.esm.js",
|
|
14
|
-
"build:declaration": "yarn build:declaration:cjs && yarn build:declaration:esm",
|
|
11
|
+
"build:es": "yarn rollup --config",
|
|
12
|
+
"build:declaration": "run-p build:declaration:cjs build:declaration:esm",
|
|
15
13
|
"build:declaration:cjs": "tsc --project tsconfig.build.json",
|
|
16
14
|
"build:declaration:esm": "tsc --project tsconfig.build.esm.json",
|
|
17
15
|
"build:declaration:watch": "tsc --project tsconfig.build.json --watch",
|
|
@@ -35,9 +33,8 @@
|
|
|
35
33
|
"homepage": "https://tecsinapse.github.io/design-system/",
|
|
36
34
|
"peerDependencies": {
|
|
37
35
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
38
|
-
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
39
36
|
"react-native": "^0.64.0",
|
|
40
37
|
"react-native-vector-icons": "^8.1.0 || ^9.0.0"
|
|
41
38
|
},
|
|
42
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "92debfcee6bd043a295edc3697e3795dccabf8f6"
|
|
43
40
|
}
|
package/rollup.config.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import esbuild from 'rollup-plugin-esbuild';
|
|
2
|
+
|
|
3
|
+
const outputDefaultConfig = {
|
|
4
|
+
preserveModules: true,
|
|
5
|
+
preserveModulesRoot: 'src',
|
|
6
|
+
sourcemap: true,
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default [
|
|
10
|
+
{
|
|
11
|
+
input: ['./src/index.ts'],
|
|
12
|
+
output: [
|
|
13
|
+
{
|
|
14
|
+
dir: 'esm',
|
|
15
|
+
format: 'esm',
|
|
16
|
+
...outputDefaultConfig,
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
dir: 'dist',
|
|
20
|
+
format: 'cjs',
|
|
21
|
+
exports: 'auto',
|
|
22
|
+
...outputDefaultConfig,
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
plugins: [esbuild({ tsconfig: 'tsconfig.build.json' })],
|
|
26
|
+
external: [
|
|
27
|
+
'react',
|
|
28
|
+
'react-native',
|
|
29
|
+
'react-native-vector-icons',
|
|
30
|
+
'@emotion/native',
|
|
31
|
+
'@emotion/react',
|
|
32
|
+
'currency.js',
|
|
33
|
+
'date-fns',
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Avatar, AvatarProps } from './Avatar';
|
|
2
|
+
import { default as Avatar, AvatarProps } from './Avatar';
|
|
3
3
|
import { Story } from '@storybook/react';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
@@ -13,8 +13,7 @@ export const Base = Template.bind({});
|
|
|
13
13
|
|
|
14
14
|
Base.args = {
|
|
15
15
|
source: {
|
|
16
|
-
uri:
|
|
17
|
-
'https://www.shareicon.net/data/512x512/2016/05/24/770117_people_512x512.png',
|
|
16
|
+
uri: 'https://www.shareicon.net/data/512x512/2016/05/24/770117_people_512x512.png',
|
|
18
17
|
},
|
|
19
18
|
name: 'João',
|
|
20
19
|
onPress: () => alert('onPress callback'),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { ButtonStateProps } from '../Button';
|
|
3
|
-
import { BaseState } from './BaseState';
|
|
3
|
+
import { default as BaseState } from './BaseState';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const Error: FC<ButtonStateProps> = props => {
|
|
6
6
|
return <BaseState {...props} icon="close-circle-outline" />;
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -5,7 +5,7 @@ import { Text } from '../../Text';
|
|
|
5
5
|
import { ButtonStateProps } from '../Button';
|
|
6
6
|
import { getStyledTextButton, StyledIndicator } from './styled';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const Loading: FC<ButtonStateProps> = ({
|
|
9
9
|
text,
|
|
10
10
|
textComponent = Text,
|
|
11
11
|
fontColor = 'light',
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { ButtonStateProps } from '../Button';
|
|
3
|
-
import { BaseState } from './BaseState';
|
|
3
|
+
import { default as BaseState } from './BaseState';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const Success: FC<ButtonStateProps> = props => {
|
|
6
6
|
return <BaseState {...props} icon="checkmark-circle-outline" />;
|
|
7
7
|
};
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
|
-
import { StyleProp, TextStyle } from 'react-native';
|
|
2
|
+
import { StyleProp, TextStyle, Text } from 'react-native';
|
|
3
3
|
import { useTheme } from '@emotion/react';
|
|
4
4
|
import {
|
|
5
5
|
ColorGradationType,
|
|
@@ -42,7 +42,11 @@ const Icon: FC<IconProps> = ({
|
|
|
42
42
|
const color = getIconColor(colorVariant, colorTone, fontColor, theme);
|
|
43
43
|
const RNVIcon = getIconComponent(type, size);
|
|
44
44
|
|
|
45
|
-
return
|
|
45
|
+
return (
|
|
46
|
+
<React.Suspense fallback={<Text> </Text>}>
|
|
47
|
+
<RNVIcon {...rest} style={style} name={name} color={color} />
|
|
48
|
+
</React.Suspense>
|
|
49
|
+
);
|
|
46
50
|
};
|
|
47
51
|
|
|
48
52
|
export default Icon;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { lazy } from 'react';
|
|
1
2
|
import {
|
|
2
3
|
ColorGradationType,
|
|
3
4
|
ColorType,
|
|
@@ -24,74 +25,75 @@ export const getIconComponent = (type: IconType, size: IconSizeType): any => {
|
|
|
24
25
|
switch (type) {
|
|
25
26
|
case 'zocial':
|
|
26
27
|
return getStyledIcon(
|
|
27
|
-
|
|
28
|
+
lazy(() => import('react-native-vector-icons/dist/Zocial')),
|
|
28
29
|
size
|
|
29
30
|
);
|
|
30
31
|
case 'octicon':
|
|
31
32
|
return getStyledIcon(
|
|
32
|
-
|
|
33
|
+
lazy(() => import('react-native-vector-icons/dist/Octicons')),
|
|
33
34
|
size
|
|
34
35
|
);
|
|
35
36
|
case 'material':
|
|
36
37
|
return getStyledIcon(
|
|
37
|
-
|
|
38
|
+
lazy(() => import('react-native-vector-icons/dist/MaterialIcons')),
|
|
38
39
|
size
|
|
39
40
|
);
|
|
40
41
|
case 'material-community':
|
|
41
42
|
return getStyledIcon(
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
lazy(
|
|
44
|
+
() => import('react-native-vector-icons/dist/MaterialCommunityIcons')
|
|
45
|
+
),
|
|
44
46
|
size
|
|
45
47
|
);
|
|
46
48
|
case 'ionicon':
|
|
47
49
|
return getStyledIcon(
|
|
48
|
-
|
|
50
|
+
lazy(() => import('react-native-vector-icons/dist/Ionicons')),
|
|
49
51
|
size
|
|
50
52
|
);
|
|
51
53
|
case 'foundation':
|
|
52
54
|
return getStyledIcon(
|
|
53
|
-
|
|
55
|
+
lazy(() => import('react-native-vector-icons/dist/Foundation')),
|
|
54
56
|
size
|
|
55
57
|
);
|
|
56
58
|
case 'evilicon':
|
|
57
59
|
return getStyledIcon(
|
|
58
|
-
|
|
60
|
+
lazy(() => import('react-native-vector-icons/dist/EvilIcons')),
|
|
59
61
|
size
|
|
60
62
|
);
|
|
61
63
|
case 'entypo':
|
|
62
64
|
return getStyledIcon(
|
|
63
|
-
|
|
65
|
+
lazy(() => import('react-native-vector-icons/dist/Entypo')),
|
|
64
66
|
size
|
|
65
67
|
);
|
|
66
68
|
case 'font-awesome':
|
|
67
69
|
return getStyledIcon(
|
|
68
|
-
|
|
70
|
+
lazy(() => import('react-native-vector-icons/dist/FontAwesome')),
|
|
69
71
|
size
|
|
70
72
|
);
|
|
71
73
|
case 'font-awesome-5':
|
|
72
74
|
return getStyledIcon(
|
|
73
|
-
|
|
75
|
+
lazy(() => import('react-native-vector-icons/dist/FontAwesome5')),
|
|
74
76
|
size
|
|
75
77
|
);
|
|
76
78
|
case 'simple-line-icon':
|
|
77
79
|
return getStyledIcon(
|
|
78
|
-
|
|
80
|
+
lazy(() => import('react-native-vector-icons/dist/SimpleLineIcons')),
|
|
79
81
|
size
|
|
80
82
|
);
|
|
81
83
|
case 'feather':
|
|
82
84
|
return getStyledIcon(
|
|
83
|
-
|
|
85
|
+
lazy(() => import('react-native-vector-icons/dist/Feather')),
|
|
84
86
|
size
|
|
85
87
|
);
|
|
86
88
|
case 'antdesign':
|
|
87
89
|
case 'ant-design':
|
|
88
90
|
return getStyledIcon(
|
|
89
|
-
|
|
91
|
+
lazy(() => import('react-native-vector-icons/dist/AntDesign')),
|
|
90
92
|
size
|
|
91
93
|
);
|
|
92
94
|
case 'fontisto':
|
|
93
95
|
return getStyledIcon(
|
|
94
|
-
|
|
96
|
+
lazy(() => import('react-native-vector-icons/dist/Fontisto')),
|
|
95
97
|
size
|
|
96
98
|
);
|
|
97
99
|
default:
|
|
@@ -99,7 +101,7 @@ export const getIconComponent = (type: IconType, size: IconSizeType): any => {
|
|
|
99
101
|
return getStyledIcon(customIcons[type], size);
|
|
100
102
|
}
|
|
101
103
|
return getStyledIcon(
|
|
102
|
-
|
|
104
|
+
lazy(() => import('react-native-vector-icons/dist/MaterialIcons')),
|
|
103
105
|
size
|
|
104
106
|
);
|
|
105
107
|
}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
GridSpacing,
|
|
4
|
-
PaddingPosition,
|
|
5
|
-
Spacing,
|
|
6
|
-
} from '@tecsinapse/react-core';
|
|
1
|
+
import { GridSpacing, PaddingPosition, Spacing } from '@tecsinapse/react-core';
|
|
2
|
+
import { extractNumbersFromString } from '../../../utils';
|
|
7
3
|
|
|
8
4
|
export const getGridItemPadding = (
|
|
9
5
|
pos: PaddingPosition,
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ButtonSizeType,
|
|
3
|
-
FontColor,
|
|
4
|
-
Icon,
|
|
5
|
-
IconProps,
|
|
6
|
-
} from '@tecsinapse/react-core';
|
|
1
|
+
import { ButtonSizeType, FontColor, IconProps } from '@tecsinapse/react-core';
|
|
7
2
|
import React, { FC } from 'react';
|
|
3
|
+
import { Icon } from '../../atoms/Icon';
|
|
8
4
|
|
|
9
5
|
interface IconComponentProps {
|
|
10
6
|
iconProps?: IconProps;
|
|
File without changes
|