@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":"animation.js","
|
|
1
|
+
{"version":3,"file":"animation.js","sources":["../../../../src/components/atoms/Switch/animation.ts"],"sourcesContent":["import { Animated, Easing } from 'react-native';\n\nconst ANIMATION_SPEED = 140;\n\nexport const transitionSwitch = (\n active: boolean,\n translate: number,\n transitionValue: Animated.Value,\n animatedColor: Animated.Value\n): void => {\n if (translate <= 0) return;\n\n if (active) {\n Animated.timing(transitionValue, {\n toValue: translate,\n duration: ANIMATION_SPEED,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }).start();\n Animated.timing(animatedColor, {\n toValue: 1,\n duration: ANIMATION_SPEED,\n useNativeDriver: false,\n }).start();\n return;\n }\n\n Animated.timing(transitionValue, {\n toValue: 0,\n duration: ANIMATION_SPEED,\n easing: Easing.out(Easing.ease),\n useNativeDriver: true,\n }).start();\n Animated.timing(animatedColor, {\n toValue: 0,\n duration: ANIMATION_SPEED,\n useNativeDriver: false,\n }).start();\n};\n"],"names":[],"mappings":";;AAEA,MAAM,eAAkB,GAAA,GAAA,CAAA;AAEjB,MAAM,gBAAmB,GAAA,CAC9B,MACA,EAAA,SAAA,EACA,iBACA,aACS,KAAA;AACT,EAAA,IAAI,SAAa,IAAA,CAAA;AAAG,IAAA,OAAA;AAEpB,EAAA,IAAI,MAAQ,EAAA;AACV,IAAA,QAAA,CAAS,OAAO,eAAiB,EAAA;AAAA,MAC/B,OAAS,EAAA,SAAA;AAAA,MACT,QAAU,EAAA,eAAA;AAAA,MACV,MAAQ,EAAA,MAAA,CAAO,GAAI,CAAA,MAAA,CAAO,IAAI,CAAA;AAAA,MAC9B,eAAiB,EAAA,IAAA;AAAA,KAClB,EAAE,KAAM,EAAA,CAAA;AACT,IAAA,QAAA,CAAS,OAAO,aAAe,EAAA;AAAA,MAC7B,OAAS,EAAA,CAAA;AAAA,MACT,QAAU,EAAA,eAAA;AAAA,MACV,eAAiB,EAAA,KAAA;AAAA,KAClB,EAAE,KAAM,EAAA,CAAA;AACT,IAAA,OAAA;AAAA,GACF;AAEA,EAAA,QAAA,CAAS,OAAO,eAAiB,EAAA;AAAA,IAC/B,OAAS,EAAA,CAAA;AAAA,IACT,QAAU,EAAA,eAAA;AAAA,IACV,MAAQ,EAAA,MAAA,CAAO,GAAI,CAAA,MAAA,CAAO,IAAI,CAAA;AAAA,IAC9B,eAAiB,EAAA,IAAA;AAAA,GAClB,EAAE,KAAM,EAAA,CAAA;AACT,EAAA,QAAA,CAAS,OAAO,aAAe,EAAA;AAAA,IAC7B,OAAS,EAAA,CAAA;AAAA,IACT,QAAU,EAAA,eAAA;AAAA,IACV,eAAiB,EAAA,KAAA;AAAA,GAClB,EAAE,KAAM,EAAA,CAAA;AACX;;;;"}
|
|
@@ -1,16 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Animated } from 'react-native';
|
|
3
1
|
export declare const SWITCH_BODY_WIDTH = "40px";
|
|
4
2
|
export declare const SWITCH_PIN_WIDTH = "16px";
|
|
5
|
-
export declare const StyledSwitchContent: import("@emotion/native").StyledComponent<
|
|
6
|
-
|
|
7
|
-
} & {
|
|
8
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
-
as?: import("react").ElementType<any> | undefined;
|
|
10
|
-
} & Partial<import("@tecsinapse/react-core").ThemeProviderProps>, {}, {}>;
|
|
11
|
-
export declare const StyledSwitch: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
|
|
12
|
-
children?: import("react").ReactNode;
|
|
13
|
-
} & {
|
|
14
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
15
|
-
as?: import("react").ElementType<any> | undefined;
|
|
16
|
-
} & Partial<import("@tecsinapse/react-core").ThemeProviderProps>, {}, {}>;
|
|
3
|
+
export declare const StyledSwitchContent: import("@emotion/native").StyledComponent<any, {}, {}>;
|
|
4
|
+
export declare const StyledSwitch: import("@emotion/native").StyledComponent<any, {}, {}>;
|
|
@@ -1,24 +1,29 @@
|
|
|
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 from '@emotion/native';
|
|
6
2
|
import { Animated } from 'react-native';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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 { RFValueStr } from '../../../utils/ResponsiveFontSize.js';
|
|
11
|
+
|
|
12
|
+
const SWITCH_BODY_WIDTH = "40px";
|
|
13
|
+
const SWITCH_PIN_WIDTH = "16px";
|
|
14
|
+
const StyledSwitchContent = styled(Animated.View)`
|
|
15
|
+
border-radius: ${({ theme }) => theme.borderRadius.pill};
|
|
16
|
+
padding: 0 ${({ theme }) => theme.spacing.micro};
|
|
17
|
+
justify-content: center;
|
|
18
|
+
width: ${RFValueStr(SWITCH_BODY_WIDTH)};
|
|
19
|
+
height: ${RFValueStr("22px")};
|
|
20
|
+
`;
|
|
21
|
+
const StyledSwitch = styled(Animated.View)`
|
|
22
|
+
border-radius: ${({ theme }) => theme.borderRadius.pill};
|
|
23
|
+
background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};
|
|
24
|
+
width: ${RFValueStr(SWITCH_PIN_WIDTH)};
|
|
25
|
+
height: ${RFValueStr("16px")};
|
|
26
|
+
`;
|
|
27
|
+
|
|
28
|
+
export { SWITCH_BODY_WIDTH, SWITCH_PIN_WIDTH, StyledSwitch, StyledSwitchContent };
|
|
29
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/atoms/Switch/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { Animated } from 'react-native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { RFValueStr } from '../../../utils';\n\nexport const SWITCH_BODY_WIDTH = '40px';\nexport const SWITCH_PIN_WIDTH = '16px';\n\nexport const StyledSwitchContent = styled(Animated.View)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.pill};\n padding: 0 ${({ theme }) => theme.spacing.micro};\n justify-content: center;\n width: ${RFValueStr(SWITCH_BODY_WIDTH)};\n height: ${RFValueStr('22px')};\n`;\n\nexport const StyledSwitch = styled(Animated.View)<Partial<StyleProps>>`\n border-radius: ${({ theme }) => theme.borderRadius.pill};\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n width: ${RFValueStr(SWITCH_PIN_WIDTH)};\n height: ${RFValueStr('16px')};\n`;\n"],"names":[],"mappings":";;;;;;;;;;;AAKO,MAAM,iBAAoB,GAAA,OAAA;AAC1B,MAAM,gBAAmB,GAAA,OAAA;AAEnB,MAAA,mBAAA,GAAsB,MAAO,CAAA,QAAA,CAAS,IAAI,CAAA,CAAA;AAAA,iBAAA,EACpC,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,aAAA,EACtC,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,OAAQ,CAAA,KAAA,CAAA;AAAA;AAAA,SAAA,EAEjC,WAAW,iBAAiB,CAAA,CAAA;AAAA,UAAA,EAC3B,WAAW,MAAM,CAAA,CAAA;AAAA,EAAA;AAGhB,MAAA,YAAA,GAAe,MAAO,CAAA,QAAA,CAAS,IAAI,CAAA,CAAA;AAAA,iBAAA,EAC7B,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,oBAAA,EAC/B,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,aAAc,CAAA,YAAA,CAAA;AAAA,SAAA,EAC9C,WAAW,gBAAgB,CAAA,CAAA;AAAA,UAAA,EAC1B,WAAW,MAAM,CAAA,CAAA;AAAA;;;;"}
|
|
@@ -1,74 +1,80 @@
|
|
|
1
|
-
|
|
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
-
|
|
7
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
-
|
|
9
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
-
|
|
11
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12
|
-
|
|
13
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
14
|
-
|
|
15
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
-
|
|
17
|
-
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; }
|
|
18
|
-
|
|
19
|
-
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; }
|
|
20
|
-
|
|
21
|
-
import React, { useCallback, useState } from 'react';
|
|
1
|
+
import React__default, { useState, useCallback } from 'react';
|
|
22
2
|
import { Animated } from 'react-native';
|
|
23
|
-
import
|
|
24
|
-
import {
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
3
|
+
import PressableSurface from '../PressableSurface/PressableSurface.js';
|
|
4
|
+
import { StyledTagContainer, StyledLeftIcon, StyledCloseIcon } from './styled.js';
|
|
5
|
+
|
|
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
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
const Tag = (_a) => {
|
|
38
|
+
var _b = _a, {
|
|
39
|
+
value,
|
|
40
|
+
icon,
|
|
41
|
+
variant = "small",
|
|
42
|
+
dismiss: canDismiss = false,
|
|
43
|
+
onDismiss,
|
|
44
|
+
style
|
|
45
|
+
} = _b, rest = __objRest(_b, [
|
|
46
|
+
"value",
|
|
47
|
+
"icon",
|
|
48
|
+
"variant",
|
|
49
|
+
"dismiss",
|
|
50
|
+
"onDismiss",
|
|
51
|
+
"style"
|
|
52
|
+
]);
|
|
53
|
+
const [dismiss, setDismiss] = useState(false);
|
|
54
|
+
const fadeAnim = React__default.useRef(new Animated.Value(1)).current;
|
|
55
|
+
const duration = 300;
|
|
56
|
+
const fadeOut = () => {
|
|
46
57
|
Animated.timing(fadeAnim, {
|
|
47
58
|
toValue: 0,
|
|
48
|
-
duration
|
|
59
|
+
duration,
|
|
49
60
|
useNativeDriver: true
|
|
50
61
|
}).start();
|
|
51
62
|
};
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
63
|
+
const handleDismiss = useCallback(() => {
|
|
64
|
+
onDismiss == null ? void 0 : onDismiss();
|
|
55
65
|
fadeOut();
|
|
56
|
-
setTimeout(
|
|
57
|
-
return setDismiss(true);
|
|
58
|
-
}, duration);
|
|
66
|
+
setTimeout(() => setDismiss(true), duration);
|
|
59
67
|
}, [onDismiss]);
|
|
60
|
-
return
|
|
61
|
-
variant
|
|
62
|
-
style: [{
|
|
63
|
-
opacity: fadeAnim
|
|
64
|
-
}, style],
|
|
68
|
+
return /* @__PURE__ */ React__default.createElement(StyledTagContainer, __spreadProps(__spreadValues({}, rest), {
|
|
69
|
+
variant,
|
|
70
|
+
style: [{ opacity: fadeAnim }, style],
|
|
65
71
|
visible: !dismiss
|
|
66
|
-
}), icon &&
|
|
67
|
-
size: icon.size ||
|
|
68
|
-
colorVariant: icon.colorVariant ||
|
|
69
|
-
}, icon)), value, canDismiss &&
|
|
72
|
+
}), icon && /* @__PURE__ */ React__default.createElement(StyledLeftIcon, __spreadValues({
|
|
73
|
+
size: icon.size || "micro",
|
|
74
|
+
colorVariant: icon.colorVariant || "primary"
|
|
75
|
+
}, icon)), value, canDismiss && /* @__PURE__ */ React__default.createElement(PressableSurface, {
|
|
70
76
|
onPress: handleDismiss
|
|
71
|
-
},
|
|
77
|
+
}, /* @__PURE__ */ React__default.createElement(StyledCloseIcon, {
|
|
72
78
|
name: "close-outline",
|
|
73
79
|
type: "ionicon",
|
|
74
80
|
size: "centi",
|
|
@@ -76,5 +82,5 @@ var Tag = function Tag(_ref) {
|
|
|
76
82
|
})));
|
|
77
83
|
};
|
|
78
84
|
|
|
79
|
-
export default
|
|
80
|
-
//# sourceMappingURL=Tag.js.map
|
|
85
|
+
export { Tag as default };
|
|
86
|
+
//# sourceMappingURL=Tag.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.js","
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Animated, ViewProps } from 'react-native';\nimport { IconProps } from '../Icon';\nimport { PressableSurface } from '../PressableSurface';\nimport { StyledCloseIcon, StyledLeftIcon, StyledTagContainer } from './styled';\n\nexport interface TagProps extends ViewProps {\n value: React.ReactNode;\n icon?: IconProps;\n dismiss?: boolean;\n onDismiss?: () => void;\n variant?: 'small' | 'default';\n}\n\nconst Tag: React.FC<TagProps> = ({\n value,\n icon,\n variant = 'small',\n dismiss: canDismiss = false,\n onDismiss,\n style,\n ...rest\n}): JSX.Element => {\n const [dismiss, setDismiss] = useState(false);\n const fadeAnim = React.useRef(new Animated.Value(1)).current;\n const duration = 300;\n\n const fadeOut = () => {\n Animated.timing(fadeAnim, {\n toValue: 0,\n duration,\n useNativeDriver: true,\n }).start();\n };\n\n const handleDismiss = useCallback(() => {\n onDismiss?.();\n fadeOut();\n setTimeout(() => setDismiss(true), duration);\n }, [onDismiss]);\n\n return (\n <StyledTagContainer\n {...rest}\n variant={variant}\n style={[{ opacity: fadeAnim as unknown as number }, style]}\n visible={!dismiss}\n >\n {icon && (\n <StyledLeftIcon\n size={icon.size || 'micro'}\n colorVariant={icon.colorVariant || 'primary'}\n {...icon}\n />\n )}\n {value}\n {canDismiss && (\n <PressableSurface onPress={handleDismiss}>\n <StyledCloseIcon\n name=\"close-outline\"\n type=\"ionicon\"\n size=\"centi\"\n fontColor=\"medium\"\n />\n </PressableSurface>\n )}\n </StyledTagContainer>\n );\n};\n\nexport default Tag;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAcM,MAAA,GAAA,GAA0B,CAAC,EAQd,KAAA;AARc,EAC/B,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,KAAA;AAAA,IACA,IAAA;AAAA,IACA,OAAU,GAAA,OAAA;AAAA,IACV,SAAS,UAAa,GAAA,KAAA;AAAA,IACtB,SAAA;AAAA,IACA,KAAA;AAAA,GApBF,GAciC,EAO5B,EAAA,IAAA,GAAA,SAAA,CAP4B,EAO5B,EAAA;AAAA,IANH,OAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,IACA,SAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAI,SAAS,KAAK,CAAA,CAAA;AAC5C,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,UAAU,MAAM;AACpB,IAAA,QAAA,CAAS,OAAO,QAAU,EAAA;AAAA,MACxB,OAAS,EAAA,CAAA;AAAA,MACT,QAAA;AAAA,MACA,eAAiB,EAAA,IAAA;AAAA,KAClB,EAAE,KAAM,EAAA,CAAA;AAAA,GACX,CAAA;AAEA,EAAM,MAAA,aAAA,GAAgB,YAAY,MAAM;AACtC,IAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,EAAA,CAAA;AACA,IAAQ,OAAA,EAAA,CAAA;AACR,IAAA,UAAA,CAAW,MAAM,UAAA,CAAW,IAAI,CAAA,EAAG,QAAQ,CAAA,CAAA;AAAA,GAC7C,EAAG,CAAC,SAAS,CAAC,CAAA,CAAA;AAEd,EACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,qDACK,IADL,CAAA,EAAA;AAAA,IAEC,OAAA;AAAA,IACA,OAAO,CAAC,EAAE,OAAS,EAAA,QAAA,IAAiC,KAAK,CAAA;AAAA,IACzD,SAAS,CAAC,OAAA;AAAA,GAAA,CAAA,EAET,wBACEA,cAAA,CAAA,aAAA,CAAA,cAAA,EAAA,cAAA,CAAA;AAAA,IACC,IAAA,EAAM,KAAK,IAAQ,IAAA,OAAA;AAAA,IACnB,YAAA,EAAc,KAAK,YAAgB,IAAA,SAAA;AAAA,GAAA,EAC/B,IACN,CAAA,CAAA,EAED,KACA,EAAA,UAAA,oBACEA,cAAA,CAAA,aAAA,CAAA,gBAAA,EAAA;AAAA,IAAiB,OAAS,EAAA,aAAA;AAAA,GAAA,kBACxBA,cAAA,CAAA,aAAA,CAAA,eAAA,EAAA;AAAA,IACC,IAAK,EAAA,eAAA;AAAA,IACL,IAAK,EAAA,SAAA;AAAA,IACL,IAAK,EAAA,OAAA;AAAA,IACL,SAAU,EAAA,QAAA;AAAA,GACZ,CACF,CAEJ,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,39 +1,35 @@
|
|
|
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 { Animated } from 'react-native';
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
var smallVariant = function smallVariant(_ref) {
|
|
10
|
-
var theme = _ref.theme,
|
|
11
|
-
variant = _ref.variant;
|
|
12
|
-
return variant === 'small' && css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", ";\n padding: ", " ", ";\n "])), theme.borderRadius.micro, theme.spacing.nano, theme.spacing.mili);
|
|
13
|
-
};
|
|
3
|
+
import Icon from '../Icon/Icon.js';
|
|
14
4
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
5
|
+
const smallVariant = ({ theme, variant }) => variant === "small" && css`
|
|
6
|
+
border-radius: ${theme.borderRadius.micro};
|
|
7
|
+
padding: ${theme.spacing.nano} ${theme.spacing.mili};
|
|
8
|
+
`;
|
|
9
|
+
const defaultVariant = ({ theme, variant }) => variant === "default" && css`
|
|
10
|
+
border-radius: ${theme.borderRadius.mili};
|
|
11
|
+
padding: ${theme.spacing.micro} ${theme.spacing.centi};
|
|
12
|
+
`;
|
|
13
|
+
const StyledTagContainerBase = styled(Animated.View)`
|
|
14
|
+
background-color: ${({ theme }) => theme.miscellaneous.bodyColor};
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
align-self: center;
|
|
19
|
+
display: ${({ visible }) => visible ? "flex" : "none"};
|
|
20
|
+
`;
|
|
21
|
+
const StyledTagContainer = styled(StyledTagContainerBase)(
|
|
22
|
+
(props) => css`
|
|
23
|
+
${smallVariant(props)}
|
|
24
|
+
${defaultVariant(props)}
|
|
25
|
+
`
|
|
26
|
+
);
|
|
27
|
+
const StyledLeftIcon = styled(Icon)`
|
|
28
|
+
margin-right: ${({ theme }) => theme.spacing.micro};
|
|
29
|
+
`;
|
|
30
|
+
const StyledCloseIcon = styled(Icon)`
|
|
31
|
+
margin-left: ${({ theme }) => theme.spacing.nano};
|
|
32
|
+
`;
|
|
20
33
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return theme.miscellaneous.bodyColor;
|
|
24
|
-
}, function (_ref4) {
|
|
25
|
-
var visible = _ref4.visible;
|
|
26
|
-
return visible ? 'flex' : 'none';
|
|
27
|
-
});
|
|
28
|
-
export var StyledTagContainer = styled(StyledTagContainerBase)(function (props) {
|
|
29
|
-
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n ", "\n "])), smallVariant(props), defaultVariant(props));
|
|
30
|
-
});
|
|
31
|
-
export var StyledLeftIcon = styled(Icon)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-right: ", ";\n"])), function (_ref5) {
|
|
32
|
-
var theme = _ref5.theme;
|
|
33
|
-
return theme.spacing.micro;
|
|
34
|
-
});
|
|
35
|
-
export var StyledCloseIcon = styled(Icon)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left: ", ";\n"])), function (_ref6) {
|
|
36
|
-
var theme = _ref6.theme;
|
|
37
|
-
return theme.spacing.nano;
|
|
38
|
-
});
|
|
39
|
-
//# sourceMappingURL=styled.js.map
|
|
34
|
+
export { StyledCloseIcon, StyledLeftIcon, StyledTagContainer };
|
|
35
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/atoms/Tag/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { Animated, ViewProps } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { Icon, IconProps } from '../Icon';\nimport { TagProps } from './Tag';\n\nconst smallVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'small' &&\n css`\n border-radius: ${theme.borderRadius.micro};\n padding: ${theme.spacing.nano} ${theme.spacing.mili};\n `;\n\nconst defaultVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'default' &&\n css`\n border-radius: ${theme.borderRadius.mili};\n padding: ${theme.spacing.micro} ${theme.spacing.centi};\n `;\n\nconst StyledTagContainerBase = styled(Animated.View)<\n Partial<TagProps> & Partial<StyleProps> & ViewProps & { visible: boolean }\n>`\n background-color: ${({ theme }) => theme.miscellaneous.bodyColor};\n flex-direction: row;\n justify-content: center;\n align-items: center;\n align-self: center;\n display: ${({ visible }) => (visible ? 'flex' : 'none')};\n`;\n\nexport const StyledTagContainer = styled(StyledTagContainerBase)(\n props => css`\n ${smallVariant(props)}\n ${defaultVariant(props)}\n `\n);\n\nexport const StyledLeftIcon = styled(Icon)<Partial<StyleProps> & IconProps>`\n margin-right: ${({ theme }) => theme.spacing.micro};\n`;\n\nexport const StyledCloseIcon = styled(Icon)<Partial<StyleProps> & IconProps>`\n margin-left: ${({ theme }) => theme.spacing.nano};\n`;\n"],"names":[],"mappings":";;;;AAMA,MAAM,eAAe,CAAC,EAAE,OAAO,OAAQ,EAAA,KACrC,YAAY,OACZ,IAAA,GAAA,CAAA;AAAA,mBAAA,EACmB,MAAM,YAAa,CAAA,KAAA,CAAA;AAAA,aAAA,EACzB,KAAM,CAAA,OAAA,CAAQ,IAAQ,CAAA,CAAA,EAAA,KAAA,CAAM,OAAQ,CAAA,IAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAGnD,MAAM,iBAAiB,CAAC,EAAE,OAAO,OAAQ,EAAA,KACvC,YAAY,SACZ,IAAA,GAAA,CAAA;AAAA,mBAAA,EACmB,MAAM,YAAa,CAAA,IAAA,CAAA;AAAA,aAAA,EACzB,KAAM,CAAA,OAAA,CAAQ,KAAS,CAAA,CAAA,EAAA,KAAA,CAAM,OAAQ,CAAA,KAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAGpD,MAAM,sBAAA,GAAyB,MAAO,CAAA,QAAA,CAAS,IAAI,CAAA,CAAA;AAAA,oBAAA,EAG7B,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,aAAc,CAAA,SAAA,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAAA,EAK5C,CAAC,EAAE,OAAQ,EAAA,KAAO,UAAU,MAAS,GAAA,MAAA,CAAA;AAAA,CAAA,CAAA;AAGrC,MAAA,kBAAA,GAAqB,OAAO,sBAAsB,CAAA;AAAA,EAC7D,CAAS,KAAA,KAAA,GAAA,CAAA;AAAA,IAAA,EACL,aAAa,KAAK,CAAA,CAAA;AAAA,IAAA,EAClB,eAAe,KAAK,CAAA,CAAA;AAAA,EAAA,CAAA;AAE1B,EAAA;AAEa,MAAA,cAAA,GAAiB,OAAO,IAAI,CAAA,CAAA;AAAA,gBAAA,EACvB,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,OAAQ,CAAA,KAAA,CAAA;AAAA,EAAA;AAGlC,MAAA,eAAA,GAAkB,OAAO,IAAI,CAAA,CAAA;AAAA,eAAA,EACzB,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,OAAQ,CAAA,IAAA,CAAA;AAAA;;;;"}
|
|
@@ -1,47 +1,76 @@
|
|
|
1
|
-
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { StyledColoredText } from './styled.js';
|
|
3
|
+
import { getLabel } from './functions.js';
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
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 Text = (_a) => {
|
|
37
|
+
var _b = _a, {
|
|
38
|
+
children,
|
|
39
|
+
style,
|
|
40
|
+
fontColor = "dark",
|
|
41
|
+
colorTone = "medium",
|
|
42
|
+
colorVariant,
|
|
43
|
+
fontWeight = "regular",
|
|
44
|
+
typography = "base",
|
|
45
|
+
numberOfLines,
|
|
46
|
+
ellipsizeMode,
|
|
47
|
+
textTransform = "none",
|
|
48
|
+
capitalFirst = false
|
|
49
|
+
} = _b, rest = __objRest(_b, [
|
|
50
|
+
"children",
|
|
51
|
+
"style",
|
|
52
|
+
"fontColor",
|
|
53
|
+
"colorTone",
|
|
54
|
+
"colorVariant",
|
|
55
|
+
"fontWeight",
|
|
56
|
+
"typography",
|
|
57
|
+
"numberOfLines",
|
|
58
|
+
"ellipsizeMode",
|
|
59
|
+
"textTransform",
|
|
60
|
+
"capitalFirst"
|
|
61
|
+
]);
|
|
62
|
+
return /* @__PURE__ */ React__default.createElement(StyledColoredText, __spreadProps(__spreadValues({}, rest), {
|
|
63
|
+
style,
|
|
64
|
+
fontColor,
|
|
65
|
+
colorTone,
|
|
66
|
+
colorVariant,
|
|
67
|
+
fontWeight,
|
|
68
|
+
typography,
|
|
69
|
+
numberOfLines,
|
|
70
|
+
ellipsizeMode,
|
|
71
|
+
textTransform
|
|
43
72
|
}), getLabel(children, capitalFirst));
|
|
44
73
|
};
|
|
45
74
|
|
|
46
|
-
export default
|
|
47
|
-
//# sourceMappingURL=Text.js.map
|
|
75
|
+
export { Text as default };
|
|
76
|
+
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../../src/components/atoms/Text/Text.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n FontStackType,\n FontWeightType,\n TypographyVariationType,\n} from '@tecsinapse/react-core';\nimport { StyleProp, TextStyle } from 'react-native';\nimport { StyledColoredText } from './styled';\nimport { getLabel } from './functions';\n\nexport interface TextProps {\n /** Font theme text color */\n fontColor?: FontColorType;\n /** Font theme weight */\n fontWeight?: FontWeightType;\n /** Font theme sizes */\n typography?: TypographyVariationType;\n /** Font theme stack */\n fontStack?: FontStackType;\n /** Palette theme colors. You can specify this prop to override theme fontColor */\n colorVariant?: ColorType;\n /** Palette theme colors gradation */\n colorTone?: ColorGradationType;\n numberOfLines?: number;\n ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';\n textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';\n capitalFirst?: boolean;\n style?: StyleProp<TextStyle>;\n children?: React.ReactNode;\n}\n\n/** NOTE: When using colors, be careful to not override fontColor by using colorVariant and colorTone, referent to theme colors and not text colors. */\nconst Text: FC<TextProps> = ({\n children,\n style,\n fontColor = 'dark',\n colorTone = 'medium',\n colorVariant,\n fontWeight = 'regular',\n typography = 'base',\n numberOfLines,\n ellipsizeMode,\n textTransform = 'none',\n capitalFirst = false,\n ...rest\n}): JSX.Element => {\n return (\n <StyledColoredText\n {...rest}\n style={style}\n fontColor={fontColor}\n colorTone={colorTone}\n colorVariant={colorVariant}\n fontWeight={fontWeight}\n typography={typography}\n numberOfLines={numberOfLines}\n ellipsizeMode={ellipsizeMode}\n textTransform={textTransform}\n >\n {getLabel(children, capitalFirst)}\n </StyledColoredText>\n );\n};\n\nexport default Text;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCM,MAAA,IAAA,GAAsB,CAAC,EAaV,KAAA;AAbU,EAC3B,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,SAAY,GAAA,MAAA;AAAA,IACZ,SAAY,GAAA,QAAA;AAAA,IACZ,YAAA;AAAA,IACA,UAAa,GAAA,SAAA;AAAA,IACb,UAAa,GAAA,MAAA;AAAA,IACb,aAAA;AAAA,IACA,aAAA;AAAA,IACA,aAAgB,GAAA,MAAA;AAAA,IAChB,YAAe,GAAA,KAAA;AAAA,GA9CjB,GAmC6B,EAYxB,EAAA,IAAA,GAAA,SAAA,CAZwB,EAYxB,EAAA;AAAA,IAXH,UAAA;AAAA,IACA,OAAA;AAAA,IACA,WAAA;AAAA,IACA,WAAA;AAAA,IACA,cAAA;AAAA,IACA,YAAA;AAAA,IACA,YAAA;AAAA,IACA,eAAA;AAAA,IACA,eAAA;AAAA,IACA,eAAA;AAAA,IACA,cAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,oDACK,IADL,CAAA,EAAA;AAAA,IAEC,KAAA;AAAA,IACA,SAAA;AAAA,IACA,SAAA;AAAA,IACA,YAAA;AAAA,IACA,UAAA;AAAA,IACA,UAAA;AAAA,IACA,aAAA;AAAA,IACA,aAAA;AAAA,IACA,aAAA;AAAA,GAEC,CAAA,EAAA,QAAA,CAAS,QAAU,EAAA,YAAY,CAClC,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=functions.js.map
|
|
1
|
+
const getFirstCapitalCharacter = (value) => value.charAt(0).toUpperCase().concat(value.slice(1));
|
|
2
|
+
const getLabel = (children, capitalFirst) => typeof children === "string" && capitalFirst ? getFirstCapitalCharacter(children) : children;
|
|
3
|
+
|
|
4
|
+
export { getFirstCapitalCharacter, getLabel };
|
|
5
|
+
//# sourceMappingURL=functions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","
|
|
1
|
+
{"version":3,"file":"functions.js","sources":["../../../../src/components/atoms/Text/functions.ts"],"sourcesContent":["export const getFirstCapitalCharacter = (value: string): string =>\n value.charAt(0).toUpperCase().concat(value.slice(1));\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const getLabel = (children, capitalFirst: boolean) =>\n typeof children === 'string' && capitalFirst\n ? getFirstCapitalCharacter(children)\n : children;\n"],"names":[],"mappings":"AAAO,MAAM,wBAA2B,GAAA,CAAC,KACvC,KAAA,KAAA,CAAM,MAAO,CAAA,CAAC,CAAE,CAAA,WAAA,EAAc,CAAA,MAAA,CAAO,KAAM,CAAA,KAAA,CAAM,CAAC,CAAC,EAAA;AAGxC,MAAA,QAAA,GAAW,CAAC,QAAA,EAAU,YACjC,KAAA,OAAO,aAAa,QAAY,IAAA,YAAA,GAC5B,wBAAyB,CAAA,QAAQ,CACjC,GAAA;;;;"}
|
|
@@ -1,20 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { TextProps } from '@tecsinapse/react-core';
|
|
3
2
|
import { Text as RNText } from 'react-native';
|
|
4
|
-
export declare const StyledText: import("@emotion/native").StyledComponent<
|
|
5
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
6
|
-
as?: import("react").ElementType<any> | undefined;
|
|
7
|
-
} & TextProps & Partial<import("@tecsinapse/react-core").ThemeProviderProps>, {}, {
|
|
3
|
+
export declare const StyledText: import("@emotion/native").StyledComponent<any, {}, {
|
|
8
4
|
ref?: import("react").Ref<RNText> | undefined;
|
|
9
5
|
}>;
|
|
10
|
-
export declare const StyledColoredText: import("@emotion/native").StyledComponent<
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
} & TextProps & Partial<import("@tecsinapse/react-core").ThemeProviderProps> & {
|
|
14
|
-
ref?: import("react").Ref<RNText> | undefined;
|
|
15
|
-
} & {
|
|
16
|
-
children?: import("react").ReactNode;
|
|
17
|
-
} & {
|
|
18
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
19
|
-
as?: import("react").ElementType<any> | undefined;
|
|
20
|
-
}, {}, {}>;
|
|
6
|
+
export declare const StyledColoredText: import("@emotion/native").StyledComponent<any, {}, {}>;
|