@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,20 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import Icon from '../../atoms/Icon/Icon.js';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
+
const IconComponent = ({
|
|
21
|
+
iconProps,
|
|
22
|
+
size = "default",
|
|
23
|
+
defaultFontColor
|
|
24
|
+
}) => {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
return iconProps ? /* @__PURE__ */ React__default.createElement(Icon, __spreadValues({
|
|
27
|
+
size: ((_a = iconProps.size) != null ? _a : size === "small") ? "deca" : "kilo",
|
|
28
|
+
fontColor: (_b = iconProps.fontColor) != null ? _b : defaultFontColor
|
|
29
|
+
}, iconProps)) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null);
|
|
17
30
|
};
|
|
31
|
+
var IconComponent$1 = React__default.memo(IconComponent);
|
|
18
32
|
|
|
19
|
-
export default
|
|
20
|
-
//# sourceMappingURL=IconComponent.js.map
|
|
33
|
+
export { IconComponent$1 as default };
|
|
34
|
+
//# sourceMappingURL=IconComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconComponent.js","
|
|
1
|
+
{"version":3,"file":"IconComponent.js","sources":["../../../../src/components/molecules/IconTextButton/IconComponent.tsx"],"sourcesContent":["import { ButtonSizeType, FontColor, IconProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Icon } from '../../atoms/Icon';\n\ninterface IconComponentProps {\n iconProps?: IconProps;\n size?: ButtonSizeType;\n defaultFontColor: keyof FontColor;\n}\n\nconst IconComponent: FC<IconComponentProps> = ({\n iconProps,\n size = 'default',\n defaultFontColor,\n}) => {\n return iconProps ? (\n <Icon\n size={iconProps.size ?? size === 'small' ? 'deca' : 'kilo'}\n fontColor={iconProps.fontColor ?? defaultFontColor}\n {...iconProps}\n />\n ) : (\n <></>\n );\n};\n\nexport default React.memo(IconComponent);\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;AAUA,MAAM,gBAAwC,CAAC;AAAA,EAC7C,SAAA;AAAA,EACA,IAAO,GAAA,SAAA;AAAA,EACP,gBAAA;AACF,CAAM,KAAA;AAdN,EAAA,IAAA,EAAA,EAAA,EAAA,CAAA;AAeE,EAAA,OAAO,4BACJA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA,cAAA,CAAA;AAAA,IACC,QAAM,EAAU,GAAA,SAAA,CAAA,IAAA,KAAV,IAAkB,GAAA,EAAA,GAAA,IAAA,KAAS,WAAU,MAAS,GAAA,MAAA;AAAA,IACpD,SAAA,EAAA,CAAW,EAAU,GAAA,SAAA,CAAA,SAAA,KAAV,IAAuB,GAAA,EAAA,GAAA,gBAAA;AAAA,GAC9B,EAAA,SAAA,CACN,oBAEEA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA,CAAA,CAAA;AAEN,CAAA,CAAA;AAEA,sBAAeA,cAAA,CAAM,KAAK,aAAa,CAAA;;;;"}
|
|
@@ -1,33 +1,57 @@
|
|
|
1
|
-
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import Icon from '../../atoms/Icon/Icon.js';
|
|
3
|
+
import { StyledPasswordButtonIcon } from './styled.js';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
return
|
|
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 InputPasswordIcon = (_a) => {
|
|
37
|
+
var _b = _a, {
|
|
38
|
+
revealed,
|
|
39
|
+
onChangeState
|
|
40
|
+
} = _b, rest = __objRest(_b, [
|
|
41
|
+
"revealed",
|
|
42
|
+
"onChangeState"
|
|
43
|
+
]);
|
|
44
|
+
const icon = revealed ? "eye-outline" : "eye-off-outline";
|
|
45
|
+
return /* @__PURE__ */ React__default.createElement(StyledPasswordButtonIcon, __spreadProps(__spreadValues({}, rest), {
|
|
20
46
|
variant: "text",
|
|
21
47
|
size: "small",
|
|
22
|
-
onPress:
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
}), React.createElement(Icon, {
|
|
48
|
+
onPress: () => onChangeState(!revealed)
|
|
49
|
+
}), /* @__PURE__ */ React__default.createElement(Icon, {
|
|
26
50
|
name: icon,
|
|
27
51
|
type: "ionicon",
|
|
28
52
|
size: "centi"
|
|
29
53
|
}));
|
|
30
54
|
};
|
|
31
55
|
|
|
32
|
-
export default
|
|
33
|
-
//# sourceMappingURL=InputPasswordIcon.js.map
|
|
56
|
+
export { InputPasswordIcon as default };
|
|
57
|
+
//# sourceMappingURL=InputPasswordIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputPasswordIcon.js","
|
|
1
|
+
{"version":3,"file":"InputPasswordIcon.js","sources":["../../../../src/components/molecules/InputPassword/InputPasswordIcon.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ButtonProps } from '../../atoms/Button';\nimport { Icon } from '../../atoms/Icon';\nimport { StyledPasswordButtonIcon } from './styled';\n\ninterface InputPasswordIconProps extends ButtonProps {\n revealed: boolean;\n onChangeState: (revealed: boolean) => void;\n}\n\nconst InputPasswordIcon: FC<InputPasswordIconProps> = ({\n revealed,\n onChangeState,\n ...rest\n}) => {\n const icon = revealed ? 'eye-outline' : 'eye-off-outline';\n return (\n <StyledPasswordButtonIcon\n {...rest}\n variant=\"text\"\n size=\"small\"\n onPress={() => onChangeState(!revealed)}\n >\n <Icon name={icon} type=\"ionicon\" size=\"centi\" />\n </StyledPasswordButtonIcon>\n );\n};\n\nexport default InputPasswordIcon;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUM,MAAA,iBAAA,GAAgD,CAAC,EAIjD,KAAA;AAJiD,EACrD,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,aAAA;AAAA,GAZF,GAUuD,EAGlD,EAAA,IAAA,GAAA,SAAA,CAHkD,EAGlD,EAAA;AAAA,IAFH,UAAA;AAAA,IACA,eAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAM,MAAA,IAAA,GAAO,WAAW,aAAgB,GAAA,iBAAA,CAAA;AACxC,EACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,2DACK,IADL,CAAA,EAAA;AAAA,IAEC,OAAQ,EAAA,MAAA;AAAA,IACR,IAAK,EAAA,OAAA;AAAA,IACL,OAAS,EAAA,MAAM,aAAc,CAAA,CAAC,QAAQ,CAAA;AAAA,GAAA,CAAA,kBAErCA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,IAAK,IAAM,EAAA,IAAA;AAAA,IAAM,IAAK,EAAA,SAAA;AAAA,IAAU,IAAK,EAAA,OAAA;AAAA,GAAQ,CAChD,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import styled from '@emotion/native';
|
|
2
|
+
import Button from '../../atoms/Button/Button.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
import 'react-native';
|
|
5
|
+
import '@emotion/react';
|
|
6
|
+
import '../../atoms/Text/styled.js';
|
|
7
|
+
import '../../atoms/Button/States/styled.js';
|
|
2
8
|
|
|
3
|
-
|
|
9
|
+
const StyledPasswordButtonIcon = styled(Button)`
|
|
10
|
+
padding: ${({ theme }) => theme.spacing.centi};
|
|
11
|
+
`;
|
|
4
12
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export var StyledPasswordButtonIcon = styled(Button)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: ", ";\n"])), function (_ref) {
|
|
8
|
-
var theme = _ref.theme;
|
|
9
|
-
return theme.spacing.centi;
|
|
10
|
-
});
|
|
11
|
-
//# sourceMappingURL=styled.js.map
|
|
13
|
+
export { StyledPasswordButtonIcon };
|
|
14
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/molecules/InputPassword/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { StyleProps } from '../../../types/defaults';\nimport { Button } from '../../atoms/Button';\n\nexport const StyledPasswordButtonIcon = styled(Button)<Partial<StyleProps>>`\n padding: ${({ theme }) => theme.spacing.centi};\n`;\n"],"names":[],"mappings":";;;;;;;;AAIa,MAAA,wBAAA,GAA2B,OAAO,MAAM,CAAA,CAAA;AAAA,WAAA,EACxC,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,OAAQ,CAAA,KAAA,CAAA;AAAA;;;;"}
|
|
@@ -1,103 +1,102 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
1
|
+
import React__default from 'react';
|
|
4
2
|
import { Animated } from 'react-native';
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
export var Snackbar = function Snackbar(_ref) {
|
|
8
|
-
var children = _ref.children,
|
|
9
|
-
_ref$open = _ref.open,
|
|
10
|
-
open = _ref$open === void 0 ? true : _ref$open,
|
|
11
|
-
onClose = _ref.onClose,
|
|
12
|
-
_ref$dismissable = _ref.dismissable,
|
|
13
|
-
dismissable = _ref$dismissable === void 0 ? false : _ref$dismissable,
|
|
14
|
-
_ref$timeout = _ref.timeout,
|
|
15
|
-
timeout = _ref$timeout === void 0 ? undefined : _ref$timeout,
|
|
16
|
-
leftIcon = _ref.leftIcon,
|
|
17
|
-
_ref$colorTone = _ref.colorTone,
|
|
18
|
-
colorTone = _ref$colorTone === void 0 ? 'xlight' : _ref$colorTone,
|
|
19
|
-
_ref$colorVariant = _ref.colorVariant,
|
|
20
|
-
colorVariant = _ref$colorVariant === void 0 ? 'primary' : _ref$colorVariant,
|
|
21
|
-
_ref$rightIcon = _ref.rightIcon,
|
|
22
|
-
rightIcon = _ref$rightIcon === void 0 ? {
|
|
23
|
-
colorTone: 'medium',
|
|
24
|
-
colorVariant: 'primary'
|
|
25
|
-
} : _ref$rightIcon,
|
|
26
|
-
_ref$anchor = _ref.anchor,
|
|
27
|
-
anchor = _ref$anchor === void 0 ? 'bottom' : _ref$anchor,
|
|
28
|
-
anchorDistance = _ref.anchorDistance,
|
|
29
|
-
style = _ref.style;
|
|
30
|
-
var fadeAnim = React.useRef(new Animated.Value(0)).current;
|
|
31
|
-
var duration = 500;
|
|
3
|
+
import Icon from '../../atoms/Icon/Icon.js';
|
|
4
|
+
import { SnackbarContainer, StyledContainerFlexRow, ContentContainer, IconContainer, TextContainer, DismissContainer, StyledProgressBar } from './styled.js';
|
|
32
5
|
|
|
33
|
-
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defProps = Object.defineProperties;
|
|
8
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
9
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
const Snackbar = ({
|
|
26
|
+
children,
|
|
27
|
+
open = true,
|
|
28
|
+
onClose,
|
|
29
|
+
dismissable = false,
|
|
30
|
+
timeout = void 0,
|
|
31
|
+
leftIcon,
|
|
32
|
+
colorTone = "xlight",
|
|
33
|
+
colorVariant = "primary",
|
|
34
|
+
rightIcon = { colorTone: "medium", colorVariant: "primary" },
|
|
35
|
+
anchor = "bottom",
|
|
36
|
+
anchorDistance,
|
|
37
|
+
style
|
|
38
|
+
}) => {
|
|
39
|
+
const fadeAnim = React__default.useRef(new Animated.Value(0)).current;
|
|
40
|
+
const duration = 500;
|
|
41
|
+
const fadeIn = () => {
|
|
34
42
|
Animated.timing(fadeAnim, {
|
|
35
43
|
toValue: 1,
|
|
36
44
|
useNativeDriver: true,
|
|
37
|
-
duration
|
|
38
|
-
}).start(
|
|
39
|
-
return timeout && fadeOut();
|
|
40
|
-
});
|
|
45
|
+
duration
|
|
46
|
+
}).start(() => timeout && fadeOut());
|
|
41
47
|
};
|
|
42
|
-
|
|
43
|
-
var fadeOut = function fadeOut() {
|
|
48
|
+
const fadeOut = () => {
|
|
44
49
|
Animated.timing(fadeAnim, {
|
|
45
50
|
toValue: 0,
|
|
46
51
|
useNativeDriver: true,
|
|
47
|
-
duration
|
|
52
|
+
duration,
|
|
48
53
|
delay: timeout ? timeout - duration : 0
|
|
49
54
|
}).start();
|
|
50
55
|
};
|
|
51
|
-
|
|
52
|
-
React.useEffect(function () {
|
|
56
|
+
React__default.useEffect(() => {
|
|
53
57
|
if (open) {
|
|
54
58
|
fadeIn();
|
|
55
59
|
}
|
|
56
|
-
|
|
57
60
|
if (open && timeout) {
|
|
58
|
-
setTimeout(
|
|
59
|
-
onClose
|
|
61
|
+
setTimeout(() => {
|
|
62
|
+
onClose == null ? void 0 : onClose();
|
|
60
63
|
}, timeout + duration);
|
|
61
64
|
}
|
|
62
65
|
}, [open, timeout]);
|
|
63
|
-
return
|
|
64
|
-
colorVariant
|
|
65
|
-
colorTone
|
|
66
|
+
return /* @__PURE__ */ React__default.createElement(SnackbarContainer, {
|
|
67
|
+
colorVariant,
|
|
68
|
+
colorTone,
|
|
66
69
|
elevated: true,
|
|
67
|
-
anchor
|
|
68
|
-
anchorDistance
|
|
70
|
+
anchor,
|
|
71
|
+
anchorDistance,
|
|
69
72
|
visible: open,
|
|
70
|
-
style: [{
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
timeout: timeout
|
|
74
|
-
}, React.createElement(StyledContainerFlexRow, null, React.createElement(ContentContainer, null, leftIcon && React.createElement(IconContainer, null, React.createElement(Icon, _extends({}, leftIcon, {
|
|
73
|
+
style: [{ opacity: fadeAnim }, style],
|
|
74
|
+
timeout
|
|
75
|
+
}, /* @__PURE__ */ React__default.createElement(StyledContainerFlexRow, null, /* @__PURE__ */ React__default.createElement(ContentContainer, null, leftIcon && /* @__PURE__ */ React__default.createElement(IconContainer, null, /* @__PURE__ */ React__default.createElement(Icon, __spreadProps(__spreadValues({}, leftIcon), {
|
|
75
76
|
size: "centi"
|
|
76
|
-
}))),
|
|
77
|
+
}))), /* @__PURE__ */ React__default.createElement(TextContainer, null, children)), dismissable && /* @__PURE__ */ React__default.createElement(DismissContainer, {
|
|
77
78
|
effect: "none",
|
|
78
|
-
onPress:
|
|
79
|
+
onPress: () => {
|
|
79
80
|
fadeOut();
|
|
80
|
-
setTimeout(
|
|
81
|
+
setTimeout(() => {
|
|
81
82
|
fadeAnim.setValue(0);
|
|
82
|
-
onClose
|
|
83
|
+
onClose == null ? void 0 : onClose();
|
|
83
84
|
}, duration);
|
|
84
85
|
}
|
|
85
|
-
},
|
|
86
|
+
}, /* @__PURE__ */ React__default.createElement(Icon, __spreadProps(__spreadValues({}, rightIcon), {
|
|
86
87
|
size: "centi",
|
|
87
88
|
name: "close",
|
|
88
89
|
type: "material-community"
|
|
89
|
-
})))), timeout && open &&
|
|
90
|
+
})))), timeout && open && /* @__PURE__ */ React__default.createElement(StyledProgressBar, {
|
|
90
91
|
valueNow: 0,
|
|
91
92
|
valueMax: 100,
|
|
92
93
|
valueMin: 0,
|
|
93
94
|
animate: true,
|
|
94
95
|
color: colorVariant,
|
|
95
96
|
colorTone: "medium",
|
|
96
|
-
animationParameters: {
|
|
97
|
-
direction: 'left',
|
|
98
|
-
duration: timeout
|
|
99
|
-
}
|
|
97
|
+
animationParameters: { direction: "left", duration: timeout }
|
|
100
98
|
}));
|
|
101
99
|
};
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
|
|
101
|
+
export { Snackbar as default };
|
|
102
|
+
//# sourceMappingURL=Snackbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Snackbar.js","
|
|
1
|
+
{"version":3,"file":"Snackbar.js","sources":["../../../../src/components/molecules/Snackbar/Snackbar.tsx"],"sourcesContent":["import React from 'react';\nimport { Animated, StyleProp, ViewStyle } from 'react-native';\nimport { ColorGradationType, ColorType } from '../../../types/defaults';\nimport { Icon, IconProps } from '../../atoms/Icon';\nimport {\n ContentContainer,\n DismissContainer,\n IconContainer,\n SnackbarContainer,\n StyledContainerFlexRow,\n StyledProgressBar,\n TextContainer,\n} from './styled';\n\nexport interface SnackbarProps {\n colorVariant?: ColorType;\n colorTone?: ColorGradationType;\n open: boolean;\n /** Close callback */\n onClose?: () => void;\n /** Snackbar is closable */\n dismissable?: boolean;\n /** Time in miliseconds for auto hide */\n timeout?: number;\n leftIcon?: IconProps;\n /** Properties for close icon */\n rightIcon?: Omit<IconProps, 'name' | 'type'>;\n anchor?: 'top' | 'bottom';\n /** Distance from anchorage (results in px) */\n anchorDistance?: number;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Snackbar: React.FC<SnackbarProps> = ({\n children,\n open = true,\n onClose,\n dismissable = false,\n timeout = undefined,\n leftIcon,\n colorTone = 'xlight',\n colorVariant = 'primary',\n rightIcon = { colorTone: 'medium', colorVariant: 'primary' },\n anchor = 'bottom',\n anchorDistance,\n style,\n}) => {\n const fadeAnim = React.useRef(new Animated.Value(0)).current;\n const duration = 500;\n\n const fadeIn = () => {\n Animated.timing(fadeAnim, {\n toValue: 1,\n useNativeDriver: true,\n duration,\n }).start(() => timeout && fadeOut());\n };\n\n const fadeOut = () => {\n Animated.timing(fadeAnim, {\n toValue: 0,\n useNativeDriver: true,\n duration,\n delay: timeout ? timeout - duration : 0,\n }).start();\n };\n\n React.useEffect(() => {\n if (open) {\n fadeIn();\n }\n if (open && timeout) {\n setTimeout(() => {\n onClose?.();\n }, timeout + duration);\n }\n }, [open, timeout]);\n\n return (\n <SnackbarContainer\n colorVariant={colorVariant}\n colorTone={colorTone}\n elevated\n anchor={anchor}\n anchorDistance={anchorDistance}\n visible={open}\n style={[{ opacity: fadeAnim as unknown as number }, style]}\n timeout={timeout}\n >\n <StyledContainerFlexRow>\n <ContentContainer>\n {leftIcon && (\n <IconContainer>\n <Icon {...leftIcon} size=\"centi\" />\n </IconContainer>\n )}\n <TextContainer>{children}</TextContainer>\n </ContentContainer>\n {dismissable && (\n <DismissContainer\n effect=\"none\"\n onPress={() => {\n fadeOut();\n setTimeout(() => {\n fadeAnim.setValue(0);\n onClose?.();\n }, duration);\n }}\n >\n <Icon\n {...rightIcon}\n size=\"centi\"\n name=\"close\"\n type=\"material-community\"\n />\n </DismissContainer>\n )}\n </StyledContainerFlexRow>\n {timeout && open && (\n <StyledProgressBar\n valueNow={0}\n valueMax={100}\n valueMin={0}\n animate={true}\n color={colorVariant}\n colorTone=\"medium\"\n animationParameters={{ direction: 'left', duration: timeout }}\n />\n )}\n </SnackbarContainer>\n );\n};\n\nexport default Snackbar;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAiCA,MAAM,WAAoC,CAAC;AAAA,EACzC,QAAA;AAAA,EACA,IAAO,GAAA,IAAA;AAAA,EACP,OAAA;AAAA,EACA,WAAc,GAAA,KAAA;AAAA,EACd,OAAU,GAAA,KAAA,CAAA;AAAA,EACV,QAAA;AAAA,EACA,SAAY,GAAA,QAAA;AAAA,EACZ,YAAe,GAAA,SAAA;AAAA,EACf,SAAY,GAAA,EAAE,SAAW,EAAA,QAAA,EAAU,cAAc,SAAU,EAAA;AAAA,EAC3D,MAAS,GAAA,QAAA;AAAA,EACT,cAAA;AAAA,EACA,KAAA;AACF,CAAM,KAAA;AACJ,EAAM,MAAA,QAAA,GAAWA,eAAM,MAAO,CAAA,IAAI,SAAS,KAAM,CAAA,CAAC,CAAC,CAAE,CAAA,OAAA,CAAA;AACrD,EAAA,MAAM,QAAW,GAAA,GAAA,CAAA;AAEjB,EAAA,MAAM,SAAS,MAAM;AACnB,IAAA,QAAA,CAAS,OAAO,QAAU,EAAA;AAAA,MACxB,OAAS,EAAA,CAAA;AAAA,MACT,eAAiB,EAAA,IAAA;AAAA,MACjB,QAAA;AAAA,KACD,CAAE,CAAA,KAAA,CAAM,MAAM,OAAA,IAAW,SAAS,CAAA,CAAA;AAAA,GACrC,CAAA;AAEA,EAAA,MAAM,UAAU,MAAM;AACpB,IAAA,QAAA,CAAS,OAAO,QAAU,EAAA;AAAA,MACxB,OAAS,EAAA,CAAA;AAAA,MACT,eAAiB,EAAA,IAAA;AAAA,MACjB,QAAA;AAAA,MACA,KAAA,EAAO,OAAU,GAAA,OAAA,GAAU,QAAW,GAAA,CAAA;AAAA,KACvC,EAAE,KAAM,EAAA,CAAA;AAAA,GACX,CAAA;AAEA,EAAAA,cAAA,CAAM,UAAU,MAAM;AACpB,IAAA,IAAI,IAAM,EAAA;AACR,MAAO,MAAA,EAAA,CAAA;AAAA,KACT;AACA,IAAA,IAAI,QAAQ,OAAS,EAAA;AACnB,MAAA,UAAA,CAAW,MAAM;AACf,QAAA,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,EAAA,CAAA;AAAA,OACF,EAAG,UAAU,QAAQ,CAAA,CAAA;AAAA,KACvB;AAAA,GACC,EAAA,CAAC,IAAM,EAAA,OAAO,CAAC,CAAA,CAAA;AAElB,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,iBAAA,EAAA;AAAA,IACC,YAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAQ,EAAA,IAAA;AAAA,IACR,MAAA;AAAA,IACA,cAAA;AAAA,IACA,OAAS,EAAA,IAAA;AAAA,IACT,OAAO,CAAC,EAAE,OAAS,EAAA,QAAA,IAAiC,KAAK,CAAA;AAAA,IACzD,OAAA;AAAA,GAEA,kBAAAA,cAAA,CAAA,aAAA,CAAC,8CACEA,cAAA,CAAA,aAAA,CAAA,gBAAA,EAAA,IAAA,EACE,4BACEA,cAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAA,kBACEA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA,aAAA,CAAA,cAAA,CAAA,EAAA,EAAS,QAAT,CAAA,EAAA;AAAA,IAAmB,IAAK,EAAA,OAAA;AAAA,GAAQ,CAAA,CACnC,mBAEDA,cAAA,CAAA,aAAA,CAAA,aAAA,EAAA,IAAA,EAAe,QAAS,CAC3B,CAAA,EACC,+BACEA,cAAA,CAAA,aAAA,CAAA,gBAAA,EAAA;AAAA,IACC,MAAO,EAAA,MAAA;AAAA,IACP,SAAS,MAAM;AACb,MAAQ,OAAA,EAAA,CAAA;AACR,MAAA,UAAA,CAAW,MAAM;AACf,QAAA,QAAA,CAAS,SAAS,CAAC,CAAA,CAAA;AACnB,QAAA,OAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,OAAA,EAAA,CAAA;AAAA,SACC,QAAQ,CAAA,CAAA;AAAA,KACb;AAAA,GAEA,kBAAAA,cAAA,CAAA,aAAA,CAAC,uCACK,SADL,CAAA,EAAA;AAAA,IAEC,IAAK,EAAA,OAAA;AAAA,IACL,IAAK,EAAA,OAAA;AAAA,IACL,IAAK,EAAA,oBAAA;AAAA,GAAA,CACP,CACF,CAEJ,CACC,EAAA,OAAA,IAAW,wBACTA,cAAA,CAAA,aAAA,CAAA,iBAAA,EAAA;AAAA,IACC,QAAU,EAAA,CAAA;AAAA,IACV,QAAU,EAAA,GAAA;AAAA,IACV,QAAU,EAAA,CAAA;AAAA,IACV,OAAS,EAAA,IAAA;AAAA,IACT,KAAO,EAAA,YAAA;AAAA,IACP,SAAU,EAAA,QAAA;AAAA,IACV,mBAAqB,EAAA,EAAE,SAAW,EAAA,MAAA,EAAQ,UAAU,OAAQ,EAAA;AAAA,GAC9D,CAEJ,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,54 +1,90 @@
|
|
|
1
|
-
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10;
|
|
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
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
3
|
+
import 'react';
|
|
4
|
+
import '../../atoms/Text/styled.js';
|
|
5
|
+
import '../../atoms/Input/styled.js';
|
|
6
|
+
import 'currency.js';
|
|
7
|
+
import '../../atoms/Input/InputElement/InputElement.js';
|
|
8
|
+
import '../../atoms/Input/InputMaskElement/InputMaskElement.js';
|
|
9
|
+
import '../../atoms/Input/PressableInputContainer/styled.js';
|
|
10
|
+
import { RFValue } from '../../../utils/ResponsiveFontSize.js';
|
|
11
|
+
import Paper from '../../atoms/Paper/Paper.js';
|
|
12
|
+
import PressableSurface from '../../atoms/PressableSurface/PressableSurface.js';
|
|
13
|
+
import ProgressBar from '../../atoms/ProgressBar/ProgressBar.js';
|
|
11
14
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
const baseStyles = ({
|
|
16
|
+
theme,
|
|
17
|
+
colorTone = "xlight",
|
|
18
|
+
colorVariant = "primary",
|
|
19
|
+
visible
|
|
20
|
+
}) => css`
|
|
21
|
+
padding: 0;
|
|
22
|
+
border-radius: ${theme.borderRadius.mili};
|
|
23
|
+
background-color: ${theme.color[colorVariant][colorTone]};
|
|
24
|
+
position: absolute;
|
|
25
|
+
z-index: ${theme.zIndex.modal};
|
|
26
|
+
display: ${visible ? "flex" : "none"};
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
justify-content: space-between;
|
|
29
|
+
align-items: stretch;
|
|
30
|
+
`;
|
|
31
|
+
const anchorTop = ({
|
|
32
|
+
theme,
|
|
33
|
+
anchor,
|
|
34
|
+
anchorDistance
|
|
35
|
+
}) => {
|
|
36
|
+
return anchor === "top" && css`
|
|
37
|
+
top: ${anchorDistance ? `${RFValue(anchorDistance)}px` : theme.spacing.deca};
|
|
38
|
+
`;
|
|
20
39
|
};
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return anchor ===
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
var anchorBottom = function anchorBottom(_ref3) {
|
|
30
|
-
var theme = _ref3.theme,
|
|
31
|
-
anchor = _ref3.anchor,
|
|
32
|
-
anchorDistance = _ref3.anchorDistance;
|
|
33
|
-
return anchor === 'bottom' && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n bottom: ", ";\n "])), anchorDistance ? "".concat(RFValue(anchorDistance), "px") : theme.spacing.deca);
|
|
40
|
+
const anchorBottom = ({
|
|
41
|
+
theme,
|
|
42
|
+
anchor,
|
|
43
|
+
anchorDistance
|
|
44
|
+
}) => {
|
|
45
|
+
return anchor === "bottom" && css`
|
|
46
|
+
bottom: ${anchorDistance ? `${RFValue(anchorDistance)}px` : theme.spacing.deca};
|
|
47
|
+
`;
|
|
34
48
|
};
|
|
49
|
+
const SnackbarContainer = styled(Paper)(
|
|
50
|
+
(props) => css`
|
|
51
|
+
${baseStyles(props)}
|
|
52
|
+
${anchorBottom(props)}
|
|
53
|
+
${anchorTop(props)}
|
|
54
|
+
`
|
|
55
|
+
);
|
|
56
|
+
const ContentContainer = styled(View)`
|
|
57
|
+
flex-direction: row;
|
|
58
|
+
display: flex;
|
|
59
|
+
align-items: center;
|
|
60
|
+
flex-shrink: 1;
|
|
61
|
+
`;
|
|
62
|
+
const IconContainer = styled(View)`
|
|
63
|
+
flex-direction: row;
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
margin-right: ${({ theme }) => theme.spacing.mili};
|
|
67
|
+
`;
|
|
68
|
+
const DismissContainer = styled(PressableSurface)`
|
|
69
|
+
flex-direction: row;
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
margin-left: ${({ theme }) => theme.spacing.mili};
|
|
73
|
+
`;
|
|
74
|
+
const StyledProgressBar = styled(ProgressBar)`
|
|
75
|
+
border-top-left-radius: 0;
|
|
76
|
+
border-top-right-radius: 0;
|
|
77
|
+
`;
|
|
78
|
+
const StyledContainerFlexRow = styled(View)`
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-direction: row;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
padding: ${({ theme }) => theme.spacing.mili};
|
|
83
|
+
`;
|
|
84
|
+
const TextContainer = styled(View)`
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-shrink: 1;
|
|
87
|
+
`;
|
|
35
88
|
|
|
36
|
-
export
|
|
37
|
-
|
|
38
|
-
});
|
|
39
|
-
export var ContentContainer = styled(View)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n flex-direction: row;\n display: flex;\n align-items: center;\n flex-shrink: 1;\n"])));
|
|
40
|
-
export var IconContainer = styled(View)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n flex-direction: row;\n display: flex;\n align-items: center;\n margin-right: ", ";\n"])), function (_ref4) {
|
|
41
|
-
var theme = _ref4.theme;
|
|
42
|
-
return theme.spacing.mili;
|
|
43
|
-
});
|
|
44
|
-
export var DismissContainer = styled(PressableSurface)(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n flex-direction: row;\n display: flex;\n align-items: center;\n margin-left: ", ";\n"])), function (_ref5) {
|
|
45
|
-
var theme = _ref5.theme;
|
|
46
|
-
return theme.spacing.mili;
|
|
47
|
-
});
|
|
48
|
-
export var StyledProgressBar = styled(ProgressBar)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n"])));
|
|
49
|
-
export var StyledContainerFlexRow = styled(View)(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: ", ";\n"])), function (_ref6) {
|
|
50
|
-
var theme = _ref6.theme;
|
|
51
|
-
return theme.spacing.mili;
|
|
52
|
-
});
|
|
53
|
-
export var TextContainer = styled(View)(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n display: flex;\n flex-shrink: 1;\n"])));
|
|
54
|
-
//# sourceMappingURL=styled.js.map
|
|
89
|
+
export { ContentContainer, DismissContainer, IconContainer, SnackbarContainer, StyledContainerFlexRow, StyledProgressBar, TextContainer };
|
|
90
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/molecules/Snackbar/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { View } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValue } from '../../../utils';\nimport { Paper } from '../../atoms/Paper';\nimport { PressableSurface } from '../../atoms/PressableSurface';\nimport { ProgressBar } from '../../atoms/ProgressBar';\nimport { SnackbarProps } from './Snackbar';\n\nconst baseStyles = ({\n theme,\n colorTone = 'xlight',\n colorVariant = 'primary',\n visible,\n}: StyleProps & Partial<SnackbarProps> & { visible: boolean }) => css`\n padding: 0;\n border-radius: ${theme.borderRadius.mili};\n background-color: ${theme.color[colorVariant][colorTone]};\n position: absolute;\n z-index: ${theme.zIndex.modal};\n display: ${visible ? 'flex' : 'none'};\n flex-direction: column;\n justify-content: space-between;\n align-items: stretch;\n`;\n\nconst anchorTop = ({\n theme,\n anchor,\n anchorDistance,\n}: Partial<SnackbarProps> & StyleProps) => {\n return (\n anchor === 'top' &&\n css`\n top: ${anchorDistance\n ? `${RFValue(anchorDistance)}px`\n : theme.spacing.deca};\n `\n );\n};\n\nconst anchorBottom = ({\n theme,\n anchor,\n anchorDistance,\n}: Partial<SnackbarProps> & StyleProps) => {\n return (\n anchor === 'bottom' &&\n css`\n bottom: ${anchorDistance\n ? `${RFValue(anchorDistance)}px`\n : theme.spacing.deca};\n `\n );\n};\n\nexport const SnackbarContainer = styled(Paper)<\n Partial<SnackbarProps & StyleProps> & { visible: boolean }\n>(\n props => css`\n ${baseStyles(props)}\n ${anchorBottom(props)}\n ${anchorTop(props)}\n `\n);\n\nexport const ContentContainer = styled(View)`\n flex-direction: row;\n display: flex;\n align-items: center;\n flex-shrink: 1;\n`;\n\nexport const IconContainer = styled(View)<Partial<StyleProps>>`\n flex-direction: row;\n display: flex;\n align-items: center;\n margin-right: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const DismissContainer = styled(PressableSurface)<Partial<StyleProps>>`\n flex-direction: row;\n display: flex;\n align-items: center;\n margin-left: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const StyledProgressBar = styled(ProgressBar)<Partial<StyleProps>>`\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n`;\n\nexport const StyledContainerFlexRow = styled(View)<Partial<StyleProps>>`\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: ${({ theme }) => theme.spacing.mili};\n`;\n\nexport const TextContainer = styled(View)`\n display: flex;\n flex-shrink: 1;\n`;\n"],"names":[],"mappings":";;;;;;;;;;;;;;AASA,MAAM,aAAa,CAAC;AAAA,EAClB,KAAA;AAAA,EACA,SAAY,GAAA,QAAA;AAAA,EACZ,YAAe,GAAA,SAAA;AAAA,EACf,OAAA;AACF,CAAkE,KAAA,GAAA,CAAA;AAAA;AAAA,iBAAA,EAE/C,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,oBAChB,EAAA,KAAA,CAAM,MAAM,YAAc,CAAA,CAAA,SAAA,CAAA,CAAA;AAAA;AAAA,WAAA,EAEnC,MAAM,MAAO,CAAA,KAAA,CAAA;AAAA,WAAA,EACb,UAAU,MAAS,GAAA,MAAA,CAAA;AAAA;AAAA;AAAA;AAAA,CAAA,CAAA;AAMhC,MAAM,YAAY,CAAC;AAAA,EACjB,KAAA;AAAA,EACA,MAAA;AAAA,EACA,cAAA;AACF,CAA2C,KAAA;AACzC,EAAA,OACE,WAAW,KACX,IAAA,GAAA,CAAA;AAAA,WAAA,EACS,iBACH,CAAG,EAAA,OAAA,CAAQ,cAAc,CAAA,CAAA,EAAA,CAAA,GACzB,MAAM,OAAQ,CAAA,IAAA,CAAA;AAAA,IAAA,CAAA,CAAA;AAGxB,CAAA,CAAA;AAEA,MAAM,eAAe,CAAC;AAAA,EACpB,KAAA;AAAA,EACA,MAAA;AAAA,EACA,cAAA;AACF,CAA2C,KAAA;AACzC,EAAA,OACE,WAAW,QACX,IAAA,GAAA,CAAA;AAAA,cAAA,EACY,iBACN,CAAG,EAAA,OAAA,CAAQ,cAAc,CAAA,CAAA,EAAA,CAAA,GACzB,MAAM,OAAQ,CAAA,IAAA,CAAA;AAAA,IAAA,CAAA,CAAA;AAGxB,CAAA,CAAA;AAEa,MAAA,iBAAA,GAAoB,OAAO,KAAK,CAAA;AAAA,EAG3C,CAAS,KAAA,KAAA,GAAA,CAAA;AAAA,IAAA,EACL,WAAW,KAAK,CAAA,CAAA;AAAA,IAAA,EAChB,aAAa,KAAK,CAAA,CAAA;AAAA,IAAA,EAClB,UAAU,KAAK,CAAA,CAAA;AAAA,EAAA,CAAA;AAErB,EAAA;AAEa,MAAA,gBAAA,GAAmB,OAAO,IAAI,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAA;AAO9B,MAAA,aAAA,GAAgB,OAAO,IAAI,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA,gBAAA,EAItB,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,OAAQ,CAAA,IAAA,CAAA;AAAA,EAAA;AAGlC,MAAA,gBAAA,GAAmB,OAAO,gBAAgB,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA,eAAA,EAItC,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,OAAQ,CAAA,IAAA,CAAA;AAAA,EAAA;AAGjC,MAAA,iBAAA,GAAoB,OAAO,WAAW,CAAA,CAAA;AAAA;AAAA;AAAA,EAAA;AAKtC,MAAA,sBAAA,GAAyB,OAAO,IAAI,CAAA,CAAA;AAAA;AAAA;AAAA;AAAA,WAAA,EAIpC,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,OAAQ,CAAA,IAAA,CAAA;AAAA,EAAA;AAG7B,MAAA,aAAA,GAAgB,OAAO,IAAI,CAAA,CAAA;AAAA;AAAA;AAAA;;;;"}
|