@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":"Badge.js","
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../../src/components/atoms/Badge/Badge.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport { ColorGradationType, ColorType } from '@tecsinapse/react-core';\nimport { BadgeStyle, ViewStyled } from './styled';\n\nexport interface BadgeProps {\n color: ColorType;\n tone?: ColorGradationType;\n style?: StyleProp<ViewStyle>;\n value: React.ReactNode;\n}\n\nconst Badge: FC<BadgeProps> = ({\n children,\n style,\n color = 'primary',\n tone = 'medium',\n value,\n}): JSX.Element => {\n return (\n <ViewStyled>\n {children}\n <BadgeStyle style={style} color={color} tone={tone}>\n {value}\n </BadgeStyle>\n </ViewStyled>\n );\n};\n\nexport default Badge;\n"],"names":["React"],"mappings":";;;AAYA,MAAM,QAAwB,CAAC;AAAA,EAC7B,QAAA;AAAA,EACA,KAAA;AAAA,EACA,KAAQ,GAAA,SAAA;AAAA,EACR,IAAO,GAAA,QAAA;AAAA,EACP,KAAA;AACF,CAAmB,KAAA;AACjB,EACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,UACE,EAAA,IAAA,EAAA,QAAA,kBACAA,cAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,IAAW,KAAA;AAAA,IAAc,KAAA;AAAA,IAAc,IAAA;AAAA,GAAA,EACrC,KACH,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,20 +1,39 @@
|
|
|
1
|
-
var _templateObject, _templateObject2;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
-
|
|
5
1
|
import styled, { css } from '@emotion/native';
|
|
6
2
|
import { View } from 'react-native';
|
|
7
|
-
import
|
|
3
|
+
import 'react';
|
|
4
|
+
import '../Text/styled.js';
|
|
5
|
+
import '../Input/styled.js';
|
|
6
|
+
import 'currency.js';
|
|
7
|
+
import '../Input/InputElement/InputElement.js';
|
|
8
|
+
import '../Input/InputMaskElement/InputMaskElement.js';
|
|
9
|
+
import '../Input/PressableInputContainer/styled.js';
|
|
10
|
+
import { RFValue } from '../../../utils/ResponsiveFontSize.js';
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const baseStyle = ({
|
|
13
|
+
theme,
|
|
14
|
+
color = "primary",
|
|
15
|
+
tone = "medium"
|
|
16
|
+
}) => {
|
|
17
|
+
return css`
|
|
18
|
+
border-radius: ${theme.borderRadius.pill};
|
|
19
|
+
background-color: ${theme.color[color][tone]};
|
|
20
|
+
position: absolute;
|
|
21
|
+
align-items: center;
|
|
22
|
+
display: flex;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
height: ${theme.iconSize.centi};
|
|
25
|
+
width: ${theme.iconSize.centi};
|
|
26
|
+
top: ${`${RFValue(-4)}px`};
|
|
27
|
+
right: ${`${RFValue(-4)}px`};
|
|
28
|
+
`;
|
|
16
29
|
};
|
|
30
|
+
const BadgeStyle = styled(View)(baseStyle);
|
|
31
|
+
const ViewStyled = styled(View)`
|
|
32
|
+
align-items: center;
|
|
33
|
+
justify-content: center;
|
|
34
|
+
position: relative;
|
|
35
|
+
align-self: center;
|
|
36
|
+
`;
|
|
17
37
|
|
|
18
|
-
export
|
|
19
|
-
|
|
20
|
-
//# sourceMappingURL=styled.js.map
|
|
38
|
+
export { BadgeStyle, ViewStyled };
|
|
39
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/atoms/Badge/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { View } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValue } from '../../../utils';\nimport { BadgeProps } from './Badge';\n\nconst baseStyle = ({\n theme,\n color = 'primary',\n tone = 'medium',\n}: StyleProps & Partial<BadgeProps>) => {\n return css`\n border-radius: ${theme.borderRadius.pill};\n background-color: ${theme.color[color][tone]};\n position: absolute;\n align-items: center;\n display: flex;\n justify-content: center;\n height: ${theme.iconSize.centi};\n width: ${theme.iconSize.centi};\n top: ${`${RFValue(-4)}px`};\n right: ${`${RFValue(-4)}px`};\n `;\n};\n\nexport const BadgeStyle =\n styled(View)<Partial<StyleProps & BadgeProps>>(baseStyle);\n\nexport const ViewStyled = styled(View)<Partial<StyleProps & BadgeProps>>`\n align-items: center;\n justify-content: center;\n position: relative;\n align-self: center;\n`;\n"],"names":[],"mappings":";;;;;;;;;;;AAMA,MAAM,YAAY,CAAC;AAAA,EACjB,KAAA;AAAA,EACA,KAAQ,GAAA,SAAA;AAAA,EACR,IAAO,GAAA,QAAA;AACT,CAAwC,KAAA;AACtC,EAAO,OAAA,GAAA,CAAA;AAAA,mBAAA,EACY,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,sBAChB,EAAA,KAAA,CAAM,MAAM,KAAO,CAAA,CAAA,IAAA,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAA,EAK7B,MAAM,QAAS,CAAA,KAAA,CAAA;AAAA,WAAA,EAChB,MAAM,QAAS,CAAA,KAAA,CAAA;AAAA,SACjB,EAAA,CAAA,EAAG,QAAQ,CAAE,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA;AAAA,WACX,EAAA,CAAA,EAAG,QAAQ,CAAE,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAE1B,CAAA,CAAA;AAEO,MAAM,UACX,GAAA,MAAA,CAAO,IAAI,CAAA,CAAoC,SAAS,EAAA;AAE7C,MAAA,UAAA,GAAa,OAAO,IAAI,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;"}
|
|
@@ -1,18 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { StyledBoxContent } from './styled.js';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
const BoxContent = (_a) => {
|
|
33
|
+
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
34
|
+
return /* @__PURE__ */ React__default.createElement(StyledBoxContent, __spreadValues({}, rest), children);
|
|
15
35
|
};
|
|
16
36
|
|
|
17
|
-
export default
|
|
18
|
-
//# sourceMappingURL=BoxContent.js.map
|
|
37
|
+
export { BoxContent as default };
|
|
38
|
+
//# sourceMappingURL=BoxContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoxContent.js","
|
|
1
|
+
{"version":3,"file":"BoxContent.js","sources":["../../../../src/components/atoms/BoxContent/BoxContent.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ViewProps } from 'react-native';\nimport { StyledBoxContent } from './styled';\n\nexport interface BoxContentProps extends ViewProps {\n variant: 'top' | 'bottom' | 'left' | 'right';\n}\n\nconst BoxContent: FC<BoxContentProps> = ({ children, ...rest }) => {\n return <StyledBoxContent {...rest}>{children}</StyledBoxContent>;\n};\n\nexport default BoxContent;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQM,MAAA,UAAA,GAAkC,CAAC,EAA0B,KAAA;AAA1B,EAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EAR3C,QAAA,EAAA,GAQyC,EAAe,EAAA,IAAA,GAAA,SAAA,CAAf,IAAe,CAAb,UAAA,CAAA,CAAA,CAAA;AACzC,EAAO,uBAAAA,cAAA,CAAA,aAAA,CAAC,gBAAqB,EAAA,cAAA,CAAA,EAAA,EAAA,IAAA,CAAA,EAAO,QAAS,CAAA,CAAA;AAC/C;;;;"}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { View } from 'react-native';
|
|
4
|
-
export declare const elevatedStyles: ({ theme }: Partial<StyleProps>) => {
|
|
5
|
-
shadowColor: string | undefined;
|
|
1
|
+
export declare const elevatedStyles: ({ theme }: StyleProps) => {
|
|
2
|
+
shadowColor: any;
|
|
6
3
|
shadowOffset: {
|
|
7
4
|
width: number;
|
|
8
5
|
height: number;
|
|
@@ -11,14 +8,4 @@ export declare const elevatedStyles: ({ theme }: Partial<StyleProps>) => {
|
|
|
11
8
|
shadowRadius: number;
|
|
12
9
|
elevation: number;
|
|
13
10
|
}[];
|
|
14
|
-
export declare const StyledBoxContent: import("@emotion/native").StyledComponent<
|
|
15
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
-
as?: import("react").ElementType<any> | undefined;
|
|
17
|
-
} & Partial<import("@tecsinapse/react-core").ThemeProviderProps> & {
|
|
18
|
-
ref?: import("react").Ref<View> | undefined;
|
|
19
|
-
} & {
|
|
20
|
-
children?: import("react").ReactNode;
|
|
21
|
-
} & {
|
|
22
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
23
|
-
as?: import("react").ElementType<any> | undefined;
|
|
24
|
-
}, {}, {}>;
|
|
11
|
+
export declare const StyledBoxContent: import("@emotion/native").StyledComponent<any, {}, {}>;
|
|
@@ -1,55 +1,54 @@
|
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
2
|
-
|
|
3
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
-
|
|
5
1
|
import styled, { css } from '@emotion/native';
|
|
6
2
|
import { View } from 'react-native';
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
shadowColor: theme
|
|
11
|
-
shadowOffset: {
|
|
12
|
-
width: 0,
|
|
13
|
-
height: 2
|
|
14
|
-
},
|
|
3
|
+
|
|
4
|
+
const elevatedStyles = ({ theme }) => [
|
|
5
|
+
css({
|
|
6
|
+
shadowColor: theme == null ? void 0 : theme.miscellaneous.shadow,
|
|
7
|
+
shadowOffset: { width: 0, height: 2 },
|
|
15
8
|
shadowOpacity: 0.25,
|
|
16
9
|
shadowRadius: 3.84,
|
|
17
10
|
elevation: 5
|
|
18
|
-
})
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
11
|
+
})
|
|
12
|
+
];
|
|
13
|
+
const topStyles = ({ theme, variant }) => variant === "top" && css`
|
|
14
|
+
border-bottom-left-radius: ${theme.borderRadius.deca};
|
|
15
|
+
border-bottom-right-radius: ${theme.borderRadius.deca};
|
|
16
|
+
`;
|
|
17
|
+
const bottomStyles = ({
|
|
18
|
+
theme,
|
|
19
|
+
variant
|
|
20
|
+
}) => variant === "bottom" && css`
|
|
21
|
+
border-top-left-radius: ${theme.borderRadius.deca};
|
|
22
|
+
border-top-right-radius: ${theme.borderRadius.deca};
|
|
23
|
+
`;
|
|
24
|
+
const leftStyles = ({
|
|
25
|
+
theme,
|
|
26
|
+
variant
|
|
27
|
+
}) => variant === "left" && css`
|
|
28
|
+
border-top-right-radius: ${theme.borderRadius.deca};
|
|
29
|
+
border-bottom-right-radius: ${theme.borderRadius.deca};
|
|
30
|
+
`;
|
|
31
|
+
const rightStyles = ({
|
|
32
|
+
theme,
|
|
33
|
+
variant
|
|
34
|
+
}) => variant === "right" && css`
|
|
35
|
+
border-top-left-radius: ${theme.borderRadius.deca};
|
|
36
|
+
border-bottom-left-radius: ${theme.borderRadius.deca};
|
|
37
|
+
`;
|
|
38
|
+
const StyledBoxContentBase = styled(View)`
|
|
39
|
+
background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};
|
|
40
|
+
min-height: ${({ theme }) => theme.spacing.kilo};
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
`;
|
|
43
|
+
const StyledBoxContent = styled(StyledBoxContentBase)(
|
|
44
|
+
(props) => css`
|
|
45
|
+
${elevatedStyles(props)}
|
|
46
|
+
${topStyles(props)}
|
|
47
|
+
${bottomStyles(props)}
|
|
48
|
+
${leftStyles(props)}
|
|
49
|
+
${rightStyles(props)}
|
|
50
|
+
`
|
|
51
|
+
);
|
|
44
52
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
return theme.miscellaneous.surfaceColor;
|
|
48
|
-
}, function (_ref7) {
|
|
49
|
-
var theme = _ref7.theme;
|
|
50
|
-
return theme.spacing.kilo;
|
|
51
|
-
});
|
|
52
|
-
export var StyledBoxContent = styled(StyledBoxContentBase)(function (props) {
|
|
53
|
-
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n ", "\n ", "\n "])), elevatedStyles(props), topStyles(props), bottomStyles(props), leftStyles(props), rightStyles(props));
|
|
54
|
-
});
|
|
55
|
-
//# sourceMappingURL=styled.js.map
|
|
53
|
+
export { StyledBoxContent, elevatedStyles };
|
|
54
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/atoms/BoxContent/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { View } from 'react-native';\nimport { BoxContentProps } from './BoxContent';\n\nexport const elevatedStyles = ({ theme }: Partial<StyleProps>) => [\n css({\n shadowColor: theme?.miscellaneous.shadow,\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.25,\n shadowRadius: 3.84,\n elevation: 5,\n }),\n];\n\nconst topStyles = ({ theme, variant }: Partial<BoxContentProps> & StyleProps) =>\n variant === 'top' &&\n css`\n border-bottom-left-radius: ${theme.borderRadius.deca};\n border-bottom-right-radius: ${theme.borderRadius.deca};\n `;\n\nconst bottomStyles = ({\n theme,\n variant,\n}: Partial<BoxContentProps> & StyleProps) =>\n variant === 'bottom' &&\n css`\n border-top-left-radius: ${theme.borderRadius.deca};\n border-top-right-radius: ${theme.borderRadius.deca};\n `;\n\nconst leftStyles = ({\n theme,\n variant,\n}: Partial<BoxContentProps> & StyleProps) =>\n variant === 'left' &&\n css`\n border-top-right-radius: ${theme.borderRadius.deca};\n border-bottom-right-radius: ${theme.borderRadius.deca};\n `;\n\nconst rightStyles = ({\n theme,\n variant,\n}: Partial<BoxContentProps> & StyleProps) =>\n variant === 'right' &&\n css`\n border-top-left-radius: ${theme.borderRadius.deca};\n border-bottom-left-radius: ${theme.borderRadius.deca};\n `;\n\nconst StyledBoxContentBase = styled(View)<Partial<StyleProps>>`\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n min-height: ${({ theme }) => theme.spacing.kilo};\n overflow: hidden;\n`;\n\nexport const StyledBoxContent = styled(StyledBoxContentBase)(\n props => css`\n ${elevatedStyles(props)}\n ${topStyles(props)}\n ${bottomStyles(props)}\n ${leftStyles(props)}\n ${rightStyles(props)}\n `\n);\n"],"names":[],"mappings":";;;AAKO,MAAM,cAAiB,GAAA,CAAC,EAAE,KAAA,EAAiC,KAAA;AAAA,EAChE,GAAI,CAAA;AAAA,IACF,WAAA,EAAa,+BAAO,aAAc,CAAA,MAAA;AAAA,IAClC,YAAc,EAAA,EAAE,KAAO,EAAA,CAAA,EAAG,QAAQ,CAAE,EAAA;AAAA,IACpC,aAAe,EAAA,IAAA;AAAA,IACf,YAAc,EAAA,IAAA;AAAA,IACd,SAAW,EAAA,CAAA;AAAA,GACZ,CAAA;AACH,EAAA;AAEA,MAAM,YAAY,CAAC,EAAE,OAAO,OAAQ,EAAA,KAClC,YAAY,KACZ,IAAA,GAAA,CAAA;AAAA,+BAAA,EAC+B,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,gCAAA,EAClB,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAGrD,MAAM,eAAe,CAAC;AAAA,EACpB,KAAA;AAAA,EACA,OAAA;AACF,CAAA,KACE,YAAY,QACZ,IAAA,GAAA,CAAA;AAAA,4BAAA,EAC4B,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,6BAAA,EAClB,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAGlD,MAAM,aAAa,CAAC;AAAA,EAClB,KAAA;AAAA,EACA,OAAA;AACF,CAAA,KACE,YAAY,MACZ,IAAA,GAAA,CAAA;AAAA,6BAAA,EAC6B,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,gCAAA,EAChB,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAGrD,MAAM,cAAc,CAAC;AAAA,EACnB,KAAA;AAAA,EACA,OAAA;AACF,CAAA,KACE,YAAY,OACZ,IAAA,GAAA,CAAA;AAAA,4BAAA,EAC4B,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,+BAAA,EAChB,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAGpD,MAAM,oBAAA,GAAuB,OAAO,IAAI,CAAA,CAAA;AAAA,oBAAA,EAClB,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,aAAc,CAAA,YAAA,CAAA;AAAA,cAAA,EACzC,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,OAAQ,CAAA,IAAA,CAAA;AAAA;AAAA,CAAA,CAAA;AAIhC,MAAA,gBAAA,GAAmB,OAAO,oBAAoB,CAAA;AAAA,EACzD,CAAS,KAAA,KAAA,GAAA,CAAA;AAAA,IAAA,EACL,eAAe,KAAK,CAAA,CAAA;AAAA,IAAA,EACpB,UAAU,KAAK,CAAA,CAAA;AAAA,EAAA,EACjB,aAAa,KAAK,CAAA,CAAA;AAAA,EAAA,EAClB,WAAW,KAAK,CAAA,CAAA;AAAA,EAAA,EAChB,YAAY,KAAK,CAAA,CAAA;AAAA,EAAA,CAAA;AAErB;;;;"}
|
|
@@ -1,76 +1,99 @@
|
|
|
1
|
-
var _excluded = ["children", "style", "color", "variant", "tone", "state", "loadingComponent", "errorComponent", "successComponent", "size", "frozen", "disabled"];
|
|
2
|
-
|
|
3
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
-
|
|
5
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
-
|
|
7
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
|
-
|
|
9
1
|
import { useTheme } from '@emotion/react';
|
|
10
|
-
import
|
|
11
|
-
import { StyledButton } from './styled';
|
|
12
|
-
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { StyledButton } from './styled.js';
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defProps = Object.defineProperties;
|
|
7
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __objRest = (source, exclude) => {
|
|
25
|
+
var target = {};
|
|
26
|
+
for (var prop in source)
|
|
27
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
if (source != null && __getOwnPropSymbols)
|
|
30
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
+
target[prop] = source[prop];
|
|
33
|
+
}
|
|
34
|
+
return target;
|
|
35
|
+
};
|
|
36
|
+
const Button = (_a) => {
|
|
37
|
+
var _b = _a, {
|
|
38
|
+
children,
|
|
39
|
+
style,
|
|
40
|
+
color = "primary",
|
|
41
|
+
variant = "filled",
|
|
42
|
+
tone = "medium",
|
|
43
|
+
state = "default",
|
|
44
|
+
loadingComponent,
|
|
45
|
+
errorComponent,
|
|
46
|
+
successComponent,
|
|
47
|
+
size,
|
|
48
|
+
frozen,
|
|
49
|
+
disabled
|
|
50
|
+
} = _b, rest = __objRest(_b, [
|
|
51
|
+
"children",
|
|
52
|
+
"style",
|
|
53
|
+
"color",
|
|
54
|
+
"variant",
|
|
55
|
+
"tone",
|
|
56
|
+
"state",
|
|
57
|
+
"loadingComponent",
|
|
58
|
+
"errorComponent",
|
|
59
|
+
"successComponent",
|
|
60
|
+
"size",
|
|
61
|
+
"frozen",
|
|
62
|
+
"disabled"
|
|
63
|
+
]);
|
|
64
|
+
const theme = useTheme();
|
|
65
|
+
const _frozen = frozen || state === "loading";
|
|
66
|
+
let _color;
|
|
38
67
|
switch (state) {
|
|
39
|
-
case
|
|
40
|
-
_color =
|
|
68
|
+
case "error":
|
|
69
|
+
_color = "error";
|
|
41
70
|
break;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
_color = 'success';
|
|
71
|
+
case "success":
|
|
72
|
+
_color = "success";
|
|
45
73
|
break;
|
|
46
|
-
|
|
47
74
|
default:
|
|
48
75
|
_color = color;
|
|
49
76
|
break;
|
|
50
77
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if (variant === 'filled') {
|
|
78
|
+
let _surfaceColor;
|
|
79
|
+
if (variant === "filled") {
|
|
55
80
|
_surfaceColor = theme.color[_color][tone];
|
|
56
81
|
}
|
|
57
|
-
|
|
58
82
|
if (disabled) {
|
|
59
83
|
_surfaceColor = theme.color[_color].light;
|
|
60
84
|
}
|
|
61
|
-
|
|
62
|
-
return React.createElement(StyledButton, _extends({}, rest, {
|
|
85
|
+
return /* @__PURE__ */ React__default.createElement(StyledButton, __spreadProps(__spreadValues({}, rest), {
|
|
63
86
|
accessibilityRole: "button",
|
|
64
|
-
style
|
|
87
|
+
style,
|
|
65
88
|
color: _color,
|
|
66
|
-
tone
|
|
89
|
+
tone,
|
|
67
90
|
surfaceColor: _surfaceColor,
|
|
68
|
-
variant
|
|
69
|
-
size
|
|
91
|
+
variant,
|
|
92
|
+
size,
|
|
70
93
|
disabled: _frozen || disabled,
|
|
71
94
|
frozen: disabled
|
|
72
|
-
}), state ===
|
|
95
|
+
}), state === "loading" && loadingComponent, state === "error" && errorComponent, state === "success" && successComponent, state === "default" && children);
|
|
73
96
|
};
|
|
74
97
|
|
|
75
|
-
export default
|
|
76
|
-
//# sourceMappingURL=Button.js.map
|
|
98
|
+
export { Button as default };
|
|
99
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../../src/components/atoms/Button/Button.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport React, { FC } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport {\n BorderRadiusType,\n ColorGradationType,\n ColorType,\n FontColorType,\n ThemeProp,\n VariantType,\n} from '../../../types/defaults';\nimport { PressableSurfaceProps } from '../PressableSurface';\nimport { TextProps } from '../Text';\nimport { StyledButton } from './styled';\n\nexport type ButtonSizeType = 'small' | 'default';\n\nexport type ButtonStateType = 'loading' | 'error' | 'success' | 'default';\n\nexport interface ButtonStateProps {\n buttonSize?: ButtonSizeType;\n fontColor?: FontColorType;\n textComponent?: React.FC<TextProps>;\n text?: string;\n}\n\nexport interface ButtonProps extends PressableSurfaceProps {\n style?: StyleProp<ViewStyle>;\n color?: ColorType;\n variant?: VariantType;\n tone?: ColorGradationType;\n frozen?: boolean | null;\n borderRadius?: BorderRadiusType;\n size?: ButtonSizeType;\n state?: ButtonStateType;\n loadingComponent?: JSX.Element;\n errorComponent?: JSX.Element;\n successComponent?: JSX.Element;\n}\n\nconst Button: FC<ButtonProps> = ({\n children,\n style,\n color = 'primary',\n variant = 'filled',\n tone = 'medium',\n state = 'default',\n loadingComponent,\n errorComponent,\n successComponent,\n size,\n frozen,\n disabled,\n ...rest\n}): JSX.Element => {\n const theme = useTheme() as ThemeProp;\n const _frozen = frozen || state === 'loading';\n let _color: ColorType;\n switch (state) {\n case 'error':\n _color = 'error';\n break;\n\n case 'success':\n _color = 'success';\n break;\n\n default:\n _color = color;\n break;\n }\n\n let _surfaceColor;\n if (variant === 'filled') {\n _surfaceColor = theme.color[_color][tone];\n }\n\n if (disabled) {\n _surfaceColor = theme.color[_color].light;\n }\n\n return (\n <StyledButton\n {...rest}\n accessibilityRole=\"button\"\n style={style}\n color={_color}\n tone={tone}\n surfaceColor={_surfaceColor}\n variant={variant}\n size={size}\n disabled={_frozen || disabled}\n frozen={disabled}\n >\n {state === 'loading' && loadingComponent}\n {state === 'error' && errorComponent}\n {state === 'success' && successComponent}\n {state === 'default' && children}\n </StyledButton>\n );\n};\n\nexport default Button;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCM,MAAA,MAAA,GAA0B,CAAC,EAcd,KAAA;AAdc,EAC/B,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAQ,GAAA,SAAA;AAAA,IACR,OAAU,GAAA,QAAA;AAAA,IACV,IAAO,GAAA,QAAA;AAAA,IACP,KAAQ,GAAA,SAAA;AAAA,IACR,gBAAA;AAAA,IACA,cAAA;AAAA,IACA,gBAAA;AAAA,IACA,IAAA;AAAA,IACA,MAAA;AAAA,IACA,QAAA;AAAA,GApDF,GAwCiC,EAa5B,EAAA,IAAA,GAAA,SAAA,CAb4B,EAa5B,EAAA;AAAA,IAZH,UAAA;AAAA,IACA,OAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,OAAA;AAAA,IACA,kBAAA;AAAA,IACA,gBAAA;AAAA,IACA,kBAAA;AAAA,IACA,MAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AACvB,EAAM,MAAA,OAAA,GAAU,UAAU,KAAU,KAAA,SAAA,CAAA;AACpC,EAAI,IAAA,MAAA,CAAA;AACJ,EAAA,QAAQ,KAAO;AAAA,IACb,KAAK,OAAA;AACH,MAAS,MAAA,GAAA,OAAA,CAAA;AACT,MAAA,MAAA;AAAA,IAEF,KAAK,SAAA;AACH,MAAS,MAAA,GAAA,SAAA,CAAA;AACT,MAAA,MAAA;AAAA,IAEF;AACE,MAAS,MAAA,GAAA,KAAA,CAAA;AACT,MAAA,MAAA;AAAA,GACJ;AAEA,EAAI,IAAA,aAAA,CAAA;AACJ,EAAA,IAAI,YAAY,QAAU,EAAA;AACxB,IAAgB,aAAA,GAAA,KAAA,CAAM,MAAM,MAAQ,CAAA,CAAA,IAAA,CAAA,CAAA;AAAA,GACtC;AAEA,EAAA,IAAI,QAAU,EAAA;AACZ,IAAgB,aAAA,GAAA,KAAA,CAAM,MAAM,MAAQ,CAAA,CAAA,KAAA,CAAA;AAAA,GACtC;AAEA,EACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,+CACK,IADL,CAAA,EAAA;AAAA,IAEC,iBAAkB,EAAA,QAAA;AAAA,IAClB,KAAA;AAAA,IACA,KAAO,EAAA,MAAA;AAAA,IACP,IAAA;AAAA,IACA,YAAc,EAAA,aAAA;AAAA,IACd,OAAA;AAAA,IACA,IAAA;AAAA,IACA,UAAU,OAAW,IAAA,QAAA;AAAA,IACrB,MAAQ,EAAA,QAAA;AAAA,GAEP,CAAA,EAAA,KAAA,KAAU,SAAa,IAAA,gBAAA,EACvB,KAAU,KAAA,OAAA,IAAW,cACrB,EAAA,KAAA,KAAU,SAAa,IAAA,gBAAA,EACvB,KAAU,KAAA,SAAA,IAAa,QAC1B,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { getStyledTextButton } from './styled';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return React.createElement(React.Fragment, null, React.createElement(Icon, {
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import Icon from '../../Icon/Icon.js';
|
|
3
|
+
import Text from '../../Text/Text.js';
|
|
4
|
+
import { getStyledTextButton } from './styled.js';
|
|
5
|
+
|
|
6
|
+
const BaseState = ({
|
|
7
|
+
textComponent = Text,
|
|
8
|
+
buttonSize = "default",
|
|
9
|
+
fontColor = "light",
|
|
10
|
+
icon,
|
|
11
|
+
text
|
|
12
|
+
}) => {
|
|
13
|
+
const typo = buttonSize === "default" ? "base" : "sub";
|
|
14
|
+
const iconSize = buttonSize === "default" ? "deca" : "centi";
|
|
15
|
+
const StyledText = getStyledTextButton(textComponent);
|
|
16
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(Icon, {
|
|
18
17
|
name: icon,
|
|
19
18
|
type: "ionicon",
|
|
20
|
-
fontColor
|
|
19
|
+
fontColor,
|
|
21
20
|
size: iconSize
|
|
22
|
-
}), text &&
|
|
21
|
+
}), text && /* @__PURE__ */ React__default.createElement(StyledText, {
|
|
23
22
|
typography: typo,
|
|
24
23
|
fontWeight: "bold",
|
|
25
|
-
fontColor
|
|
24
|
+
fontColor
|
|
26
25
|
}, text));
|
|
27
26
|
};
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
|
|
28
|
+
export { BaseState as default };
|
|
29
|
+
//# sourceMappingURL=BaseState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseState.js","
|
|
1
|
+
{"version":3,"file":"BaseState.js","sources":["../../../../../src/components/atoms/Button/States/BaseState.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport {\n IconSizeType,\n TypographyVariationType,\n} from '../../../../types/defaults';\nimport { Icon } from '../../Icon';\nimport { Text } from '../../Text';\nimport { ButtonStateProps } from '../Button';\nimport { getStyledTextButton } from './styled';\n\nexport interface BaseStateProps extends ButtonStateProps {\n icon: string;\n}\n\nconst BaseState: FC<BaseStateProps> = ({\n textComponent = Text,\n buttonSize = 'default',\n fontColor = 'light',\n icon,\n text,\n}) => {\n const typo: TypographyVariationType =\n buttonSize === 'default' ? 'base' : 'sub';\n const iconSize: IconSizeType = buttonSize === 'default' ? 'deca' : 'centi';\n const StyledText = getStyledTextButton(textComponent);\n return (\n <>\n <Icon name={icon} type=\"ionicon\" fontColor={fontColor} size={iconSize} />\n {text && (\n <StyledText typography={typo} fontWeight=\"bold\" fontColor={fontColor}>\n {text}\n </StyledText>\n )}\n </>\n );\n};\n\nexport default BaseState;\n"],"names":["React"],"mappings":";;;;;AAcA,MAAM,YAAgC,CAAC;AAAA,EACrC,aAAgB,GAAA,IAAA;AAAA,EAChB,UAAa,GAAA,SAAA;AAAA,EACb,SAAY,GAAA,OAAA;AAAA,EACZ,IAAA;AAAA,EACA,IAAA;AACF,CAAM,KAAA;AACJ,EAAM,MAAA,IAAA,GACJ,UAAe,KAAA,SAAA,GAAY,MAAS,GAAA,KAAA,CAAA;AACtC,EAAM,MAAA,QAAA,GAAyB,UAAe,KAAA,SAAA,GAAY,MAAS,GAAA,OAAA,CAAA;AACnE,EAAM,MAAA,UAAA,GAAa,oBAAoB,aAAa,CAAA,CAAA;AACpD,EAAA,mGAEKA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAK,IAAM,EAAA,IAAA;AAAA,IAAM,IAAK,EAAA,SAAA;AAAA,IAAU,SAAA;AAAA,IAAsB,IAAM,EAAA,QAAA;AAAA,GAAU,CAAA,EACtE,wBACEA,cAAA,CAAA,aAAA,CAAA,UAAA,EAAA;AAAA,IAAW,UAAY,EAAA,IAAA;AAAA,IAAM,UAAW,EAAA,MAAA;AAAA,IAAO,SAAA;AAAA,GAAA,EAC7C,IACH,CAEJ,CAAA,CAAA;AAEJ;;;;"}
|