@tecsinapse/react-core 1.19.0 → 1.20.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 +11 -0
- package/babel.config.esm.js +34 -0
- package/dist/components/atoms/Avatar/Avatar.js +12 -8
- package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/components/atoms/Avatar/helpers.js +3 -1
- package/dist/components/atoms/Avatar/helpers.js.map +1 -1
- package/dist/components/atoms/Avatar/index.d.ts +2 -1
- package/dist/components/atoms/Avatar/index.js +11 -9
- package/dist/components/atoms/Avatar/index.js.map +1 -1
- package/dist/components/atoms/Avatar/styled.js +38 -39
- package/dist/components/atoms/Avatar/styled.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.js +11 -8
- package/dist/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/components/atoms/Badge/index.d.ts +2 -1
- package/dist/components/atoms/Badge/index.js +11 -9
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/Badge/styled.js +15 -24
- package/dist/components/atoms/Badge/styled.js.map +1 -1
- package/dist/components/atoms/BoxContent/BoxContent.js +8 -5
- package/dist/components/atoms/BoxContent/BoxContent.js.map +1 -1
- package/dist/components/atoms/BoxContent/index.d.ts +2 -1
- package/dist/components/atoms/BoxContent/index.js +11 -9
- package/dist/components/atoms/BoxContent/index.js.map +1 -1
- package/dist/components/atoms/BoxContent/styled.js +62 -57
- package/dist/components/atoms/BoxContent/styled.js.map +1 -1
- package/dist/components/atoms/Button/Button.js +19 -16
- package/dist/components/atoms/Button/Button.js.map +1 -1
- package/dist/components/atoms/Button/States/BaseState.js +11 -8
- package/dist/components/atoms/Button/States/BaseState.js.map +1 -1
- package/dist/components/atoms/Button/States/Error.js +3 -1
- package/dist/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/components/atoms/Button/States/Loading.js +10 -7
- package/dist/components/atoms/Button/States/Loading.js.map +1 -1
- package/dist/components/atoms/Button/States/Success.js +3 -1
- package/dist/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/components/atoms/Button/States/index.js +21 -8
- package/dist/components/atoms/Button/States/index.js.map +1 -1
- package/dist/components/atoms/Button/States/styled.js +31 -19
- package/dist/components/atoms/Button/States/styled.js.map +1 -1
- package/dist/components/atoms/Button/index.d.ts +2 -1
- package/dist/components/atoms/Button/index.js +29 -16
- package/dist/components/atoms/Button/index.js.map +1 -1
- package/dist/components/atoms/Button/styled.js +33 -36
- package/dist/components/atoms/Button/styled.js.map +1 -1
- package/dist/components/atoms/Card/Card.js +11 -7
- package/dist/components/atoms/Card/Card.js.map +1 -1
- package/dist/components/atoms/Card/Footer/Footer.js +12 -7
- package/dist/components/atoms/Card/Footer/Footer.js.map +1 -1
- package/dist/components/atoms/Card/Footer/index.d.ts +2 -1
- package/dist/components/atoms/Card/Footer/index.js +11 -9
- package/dist/components/atoms/Card/Footer/index.js.map +1 -1
- package/dist/components/atoms/Card/Header/Header.js +12 -7
- package/dist/components/atoms/Card/Header/Header.js.map +1 -1
- package/dist/components/atoms/Card/Header/index.d.ts +2 -1
- package/dist/components/atoms/Card/Header/index.js +11 -9
- package/dist/components/atoms/Card/Header/index.js.map +1 -1
- package/dist/components/atoms/Card/index.d.ts +2 -1
- package/dist/components/atoms/Card/index.js +11 -9
- package/dist/components/atoms/Card/index.js.map +1 -1
- package/dist/components/atoms/Card/styled.js +8 -5
- package/dist/components/atoms/Card/styled.js.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +15 -11
- package/dist/components/atoms/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/atoms/Checkbox/index.d.ts +2 -1
- package/dist/components/atoms/Checkbox/index.js +11 -9
- package/dist/components/atoms/Checkbox/index.js.map +1 -1
- package/dist/components/atoms/Checkbox/styled.js +62 -44
- package/dist/components/atoms/Checkbox/styled.js.map +1 -1
- package/dist/components/atoms/Divider/Divider.js +8 -5
- package/dist/components/atoms/Divider/Divider.js.map +1 -1
- package/dist/components/atoms/Divider/index.d.ts +2 -1
- package/dist/components/atoms/Divider/index.js +11 -9
- package/dist/components/atoms/Divider/index.js.map +1 -1
- package/dist/components/atoms/Divider/styled.js +33 -26
- package/dist/components/atoms/Divider/styled.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButton.js +24 -20
- package/dist/components/atoms/GroupButton/GroupButton.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.js +9 -6
- package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/components/atoms/GroupButton/index.d.ts +4 -2
- package/dist/components/atoms/GroupButton/index.js +18 -14
- package/dist/components/atoms/GroupButton/index.js.map +1 -1
- package/dist/components/atoms/GroupButton/styled.js +97 -100
- package/dist/components/atoms/GroupButton/styled.js.map +1 -1
- package/dist/components/atoms/Icon/Icon.js +14 -11
- package/dist/components/atoms/Icon/Icon.js.map +1 -1
- package/dist/components/atoms/Icon/helpers.js +13 -7
- package/dist/components/atoms/Icon/helpers.js.map +1 -1
- package/dist/components/atoms/Icon/index.d.ts +2 -1
- package/dist/components/atoms/Icon/index.js +11 -9
- package/dist/components/atoms/Icon/index.js.map +1 -1
- package/dist/components/atoms/Input/Hint.js +9 -6
- package/dist/components/atoms/Input/Hint.js.map +1 -1
- package/dist/components/atoms/Input/InputContainer/InputContainer.js +22 -19
- package/dist/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
- package/dist/components/atoms/Input/InputElement/InputElement.js +12 -9
- package/dist/components/atoms/Input/InputElement/InputElement.js.map +1 -1
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js +16 -13
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +11 -8
- package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/index.d.ts +2 -1
- package/dist/components/atoms/Input/PressableInputContainer/index.js +11 -9
- package/dist/components/atoms/Input/PressableInputContainer/index.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/styled.js +9 -4
- package/dist/components/atoms/Input/PressableInputContainer/styled.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useInputFocus.js +5 -2
- package/dist/components/atoms/Input/hooks/useInputFocus.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useNumberMask.js +7 -4
- package/dist/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useStringMask.js +10 -5
- package/dist/components/atoms/Input/hooks/useStringMask.js.map +1 -1
- package/dist/components/atoms/Input/index.d.ts +8 -4
- package/dist/components/atoms/Input/index.js +66 -35
- package/dist/components/atoms/Input/index.js.map +1 -1
- package/dist/components/atoms/Input/styled.js +119 -106
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/Paper/Paper.js +13 -8
- package/dist/components/atoms/Paper/Paper.js.map +1 -1
- package/dist/components/atoms/Paper/index.d.ts +2 -1
- package/dist/components/atoms/Paper/index.js +11 -9
- package/dist/components/atoms/Paper/index.js.map +1 -1
- package/dist/components/atoms/Paper/styled.js +8 -5
- package/dist/components/atoms/Paper/styled.js.map +1 -1
- package/dist/components/atoms/PressableSurface/PressableSurface.js +27 -18
- package/dist/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
- package/dist/components/atoms/PressableSurface/index.d.ts +2 -1
- package/dist/components/atoms/PressableSurface/index.js +11 -9
- package/dist/components/atoms/PressableSurface/index.js.map +1 -1
- package/dist/components/atoms/ProgressBar/ProgressBar.js +20 -15
- package/dist/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/atoms/ProgressBar/index.d.ts +2 -1
- package/dist/components/atoms/ProgressBar/index.js +11 -9
- package/dist/components/atoms/ProgressBar/index.js.map +1 -1
- package/dist/components/atoms/ProgressBar/styled.js +38 -29
- package/dist/components/atoms/ProgressBar/styled.js.map +1 -1
- package/dist/components/atoms/RadioButton/RadioButton.js +15 -11
- package/dist/components/atoms/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/atoms/RadioButton/index.d.ts +2 -1
- package/dist/components/atoms/RadioButton/index.js +11 -9
- package/dist/components/atoms/RadioButton/index.js.map +1 -1
- package/dist/components/atoms/RadioButton/styled.js +38 -29
- package/dist/components/atoms/RadioButton/styled.js.map +1 -1
- package/dist/components/atoms/Switch/Switch.js +15 -12
- package/dist/components/atoms/Switch/Switch.js.map +1 -1
- package/dist/components/atoms/Switch/animation.js +3 -1
- package/dist/components/atoms/Switch/animation.js.map +1 -1
- package/dist/components/atoms/Switch/index.d.ts +2 -1
- package/dist/components/atoms/Switch/index.js +11 -9
- package/dist/components/atoms/Switch/index.js.map +1 -1
- package/dist/components/atoms/Switch/styled.js +29 -22
- package/dist/components/atoms/Switch/styled.js.map +1 -1
- package/dist/components/atoms/Tag/Tag.js +14 -11
- package/dist/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/components/atoms/Tag/index.d.ts +2 -1
- package/dist/components/atoms/Tag/index.js +11 -9
- package/dist/components/atoms/Tag/index.js.map +1 -1
- package/dist/components/atoms/Tag/styled.js +47 -43
- package/dist/components/atoms/Tag/styled.js.map +1 -1
- package/dist/components/atoms/Text/Text.js +18 -15
- package/dist/components/atoms/Text/Text.js.map +1 -1
- package/dist/components/atoms/Text/functions.js +3 -1
- package/dist/components/atoms/Text/functions.js.map +1 -1
- package/dist/components/atoms/Text/index.d.ts +2 -1
- package/dist/components/atoms/Text/index.js +11 -9
- package/dist/components/atoms/Text/index.js.map +1 -1
- package/dist/components/atoms/Text/styled.js +51 -33
- package/dist/components/atoms/Text/styled.js.map +1 -1
- package/dist/components/atoms/shared/PaperAndCard.js +29 -20
- package/dist/components/atoms/shared/PaperAndCard.js.map +1 -1
- package/dist/components/molecules/Calendar/Calendar.js +20 -16
- package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/components/molecules/Calendar/components/MonthWeek.js +16 -12
- package/dist/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
- package/dist/components/molecules/Calendar/components/Weekdays.js +9 -6
- package/dist/components/molecules/Calendar/components/Weekdays.js.map +1 -1
- package/dist/components/molecules/Calendar/components/index.js +15 -6
- package/dist/components/molecules/Calendar/components/index.js.map +1 -1
- package/dist/components/molecules/Calendar/index.d.ts +2 -1
- package/dist/components/molecules/Calendar/index.js +11 -12
- package/dist/components/molecules/Calendar/index.js.map +1 -1
- package/dist/components/molecules/Calendar/styled.js +58 -70
- package/dist/components/molecules/Calendar/styled.js.map +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js +33 -30
- package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/molecules/DatePicker/index.d.ts +2 -1
- package/dist/components/molecules/DatePicker/index.js +11 -9
- package/dist/components/molecules/DatePicker/index.js.map +1 -1
- package/dist/components/molecules/DatePicker/styled.js +19 -13
- package/dist/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js +42 -39
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/index.d.ts +2 -1
- package/dist/components/molecules/DateTimePicker/index.js +11 -9
- package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/styled.js +13 -6
- package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +28 -26
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/Selector.js +18 -14
- package/dist/components/molecules/DateTimeSelector/Selector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/index.d.ts +2 -1
- package/dist/components/molecules/DateTimeSelector/index.js +11 -10
- package/dist/components/molecules/DateTimeSelector/index.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/styled.js +88 -68
- package/dist/components/molecules/DateTimeSelector/styled.js.map +1 -1
- package/dist/components/molecules/Grid/functions.js +6 -2
- package/dist/components/molecules/Grid/functions.js.map +1 -1
- package/dist/components/molecules/Grid/index.js +15 -5
- package/dist/components/molecules/Grid/index.js.map +1 -1
- package/dist/components/molecules/HintInputContainer/HintInputContainer.js +18 -14
- package/dist/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
- package/dist/components/molecules/HintInputContainer/index.js +9 -4
- package/dist/components/molecules/HintInputContainer/index.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconComponent.js +13 -8
- package/dist/components/molecules/IconTextButton/IconComponent.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconTextButton.js +3 -1
- package/dist/components/molecules/IconTextButton/index.d.ts +1 -1
- package/dist/components/molecules/IconTextButton/index.js +9 -9
- package/dist/components/molecules/IconTextButton/index.js.map +1 -1
- package/dist/components/molecules/IconTextButton/styled.js +15 -14
- package/dist/components/molecules/IconTextButton/styled.js.map +1 -1
- package/dist/components/molecules/InputPassword/InputPasswordIcon.js +9 -6
- package/dist/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
- package/dist/components/molecules/InputPassword/index.js +9 -4
- package/dist/components/molecules/InputPassword/index.js.map +1 -1
- package/dist/components/molecules/InputPassword/styled.js +13 -6
- package/dist/components/molecules/InputPassword/styled.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +3 -1
- package/dist/components/molecules/LabeledSwitch/index.d.ts +1 -1
- package/dist/components/molecules/LabeledSwitch/index.js +3 -7
- package/dist/components/molecules/LabeledSwitch/index.js.map +1 -1
- package/dist/components/molecules/Snackbar/Snackbar.js +24 -20
- package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/molecules/Snackbar/index.d.ts +2 -1
- package/dist/components/molecules/Snackbar/index.js +11 -9
- package/dist/components/molecules/Snackbar/index.js.map +1 -1
- package/dist/components/molecules/Snackbar/styled.js +52 -76
- package/dist/components/molecules/Snackbar/styled.js.map +1 -1
- package/dist/components/molecules/TextArea/TextArea.js +29 -26
- package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
- package/dist/components/molecules/TextArea/index.d.ts +2 -1
- package/dist/components/molecules/TextArea/index.js +17 -11
- package/dist/components/molecules/TextArea/index.js.map +1 -1
- package/dist/components/molecules/TextArea/styled.js +15 -13
- package/dist/components/molecules/TextArea/styled.js.map +1 -1
- package/dist/hooks/index.js +15 -6
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useDebouncedState.js +5 -2
- package/dist/hooks/useDebouncedState.js.map +1 -1
- package/dist/hooks/useTheme.js +3 -1
- package/dist/hooks/useTheme.js.map +1 -1
- package/dist/index.d.ts +57 -29
- package/dist/index.js +303 -187
- package/dist/index.js.map +1 -1
- package/dist/styles/ThemeProvider.js +8 -5
- package/dist/styles/ThemeProvider.js.map +1 -1
- package/dist/styles/definitions.js +6 -3
- package/dist/styles/definitions.js.map +1 -1
- package/dist/styles/light.js +3 -1
- package/dist/styles/light.js.map +1 -1
- package/dist/types/defaults.js +3 -1
- package/dist/utils/IPhoneXHelper.js +3 -1
- package/dist/utils/IPhoneXHelper.js.map +1 -1
- package/dist/utils/ResponsiveFontSize.js +6 -3
- package/dist/utils/ResponsiveFontSize.js.map +1 -1
- package/dist/utils/extractNumbersFromString.js +3 -1
- package/dist/utils/extractNumbersFromString.js.map +1 -1
- package/dist/utils/formatWithMask.js +3 -1
- package/dist/utils/formatWithMask.js.map +1 -1
- package/dist/utils/index.js +51 -12
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/lightenDarkenColor.js +3 -1
- package/dist/utils/lightenDarkenColor.js.map +1 -1
- package/dist/utils/masks.js +5 -3
- package/dist/utils/masks.js.map +1 -1
- package/dist/utils/variantComplement.js +3 -1
- package/dist/utils/variantComplement.js.map +1 -1
- package/esm/components/atoms/Avatar/Avatar.d.ts +14 -0
- package/esm/components/atoms/Avatar/Avatar.js +50 -0
- package/esm/components/atoms/Avatar/Avatar.js.map +1 -0
- package/esm/components/atoms/Avatar/helpers.d.ts +1 -0
- package/esm/components/atoms/Avatar/helpers.js +12 -0
- package/esm/components/atoms/Avatar/helpers.js.map +1 -0
- package/esm/components/atoms/Avatar/index.d.ts +2 -0
- package/esm/components/atoms/Avatar/index.js +2 -0
- package/esm/components/atoms/Avatar/index.js.map +1 -0
- package/esm/components/atoms/Avatar/styled.d.ts +28 -0
- package/esm/components/atoms/Avatar/styled.js +33 -0
- package/esm/components/atoms/Avatar/styled.js.map +1 -0
- package/esm/components/atoms/Badge/Badge.d.ts +11 -0
- package/esm/components/atoms/Badge/Badge.js +20 -0
- package/esm/components/atoms/Badge/Badge.js.map +1 -0
- package/esm/components/atoms/Badge/index.d.ts +2 -0
- package/esm/components/atoms/Badge/index.js +2 -0
- package/esm/components/atoms/Badge/index.js.map +1 -0
- package/esm/components/atoms/Badge/styled.d.ts +15 -0
- package/esm/components/atoms/Badge/styled.js +20 -0
- package/esm/components/atoms/Badge/styled.js.map +1 -0
- package/esm/components/atoms/BoxContent/BoxContent.d.ts +7 -0
- package/esm/components/atoms/BoxContent/BoxContent.js +18 -0
- package/esm/components/atoms/BoxContent/BoxContent.js.map +1 -0
- package/esm/components/atoms/BoxContent/index.d.ts +2 -0
- package/esm/components/atoms/BoxContent/index.js +2 -0
- package/esm/components/atoms/BoxContent/index.js.map +1 -0
- package/esm/components/atoms/BoxContent/styled.d.ts +24 -0
- package/esm/components/atoms/BoxContent/styled.js +55 -0
- package/esm/components/atoms/BoxContent/styled.js.map +1 -0
- package/esm/components/atoms/Button/Button.d.ts +28 -0
- package/esm/components/atoms/Button/Button.js +76 -0
- package/esm/components/atoms/Button/Button.js.map +1 -0
- package/esm/components/atoms/Button/States/BaseState.d.ts +7 -0
- package/esm/components/atoms/Button/States/BaseState.js +29 -0
- package/esm/components/atoms/Button/States/BaseState.js.map +1 -0
- package/esm/components/atoms/Button/States/Error.d.ts +4 -0
- package/esm/components/atoms/Button/States/Error.js +11 -0
- package/esm/components/atoms/Button/States/Error.js.map +1 -0
- package/esm/components/atoms/Button/States/Loading.d.ts +4 -0
- package/esm/components/atoms/Button/States/Loading.js +26 -0
- package/esm/components/atoms/Button/States/Loading.js.map +1 -0
- package/esm/components/atoms/Button/States/Success.d.ts +4 -0
- package/esm/components/atoms/Button/States/Success.js +11 -0
- package/esm/components/atoms/Button/States/Success.js.map +1 -0
- package/esm/components/atoms/Button/States/index.d.ts +3 -0
- package/esm/components/atoms/Button/States/index.js +4 -0
- package/esm/components/atoms/Button/States/index.js.map +1 -0
- package/esm/components/atoms/Button/States/styled.d.ts +16 -0
- package/esm/components/atoms/Button/States/styled.js +25 -0
- package/esm/components/atoms/Button/States/styled.js.map +1 -0
- package/esm/components/atoms/Button/index.d.ts +3 -0
- package/esm/components/atoms/Button/index.js +3 -0
- package/esm/components/atoms/Button/index.js.map +1 -0
- package/esm/components/atoms/Button/styled.d.ts +8 -0
- package/esm/components/atoms/Button/styled.js +42 -0
- package/esm/components/atoms/Button/styled.js.map +1 -0
- package/esm/components/atoms/Card/Card.d.ts +9 -0
- package/esm/components/atoms/Card/Card.js +33 -0
- package/esm/components/atoms/Card/Card.js.map +1 -0
- package/esm/components/atoms/Card/Footer/Footer.d.ts +7 -0
- package/esm/components/atoms/Card/Footer/Footer.js +13 -0
- package/esm/components/atoms/Card/Footer/Footer.js.map +1 -0
- package/esm/components/atoms/Card/Footer/index.d.ts +2 -0
- package/esm/components/atoms/Card/Footer/index.js +2 -0
- package/esm/components/atoms/Card/Footer/index.js.map +1 -0
- package/esm/components/atoms/Card/Header/Header.d.ts +7 -0
- package/esm/components/atoms/Card/Header/Header.js +13 -0
- package/esm/components/atoms/Card/Header/Header.js.map +1 -0
- package/esm/components/atoms/Card/Header/index.d.ts +2 -0
- package/esm/components/atoms/Card/Header/index.js +2 -0
- package/esm/components/atoms/Card/Header/index.js.map +1 -0
- package/esm/components/atoms/Card/index.d.ts +2 -0
- package/esm/components/atoms/Card/index.js +2 -0
- package/esm/components/atoms/Card/index.js.map +1 -0
- package/esm/components/atoms/Card/styled.d.ts +8 -0
- package/esm/components/atoms/Card/styled.js +11 -0
- package/esm/components/atoms/Card/styled.js.map +1 -0
- package/esm/components/atoms/Checkbox/Checkbox.d.ts +14 -0
- package/esm/components/atoms/Checkbox/Checkbox.js +56 -0
- package/esm/components/atoms/Checkbox/Checkbox.js.map +1 -0
- package/esm/components/atoms/Checkbox/index.d.ts +2 -0
- package/esm/components/atoms/Checkbox/index.js +2 -0
- package/esm/components/atoms/Checkbox/index.js.map +1 -0
- package/esm/components/atoms/Checkbox/styled.d.ts +27 -0
- package/esm/components/atoms/Checkbox/styled.js +50 -0
- package/esm/components/atoms/Checkbox/styled.js.map +1 -0
- package/esm/components/atoms/Divider/Divider.d.ts +8 -0
- package/esm/components/atoms/Divider/Divider.js +18 -0
- package/esm/components/atoms/Divider/Divider.js.map +1 -0
- package/esm/components/atoms/Divider/index.d.ts +2 -0
- package/esm/components/atoms/Divider/index.js +2 -0
- package/esm/components/atoms/Divider/index.js.map +1 -0
- package/esm/components/atoms/Divider/styled.d.ts +13 -0
- package/esm/components/atoms/Divider/styled.js +28 -0
- package/esm/components/atoms/Divider/styled.js.map +1 -0
- package/esm/components/atoms/GroupButton/GroupButton.d.ts +32 -0
- package/esm/components/atoms/GroupButton/GroupButton.js +78 -0
- package/esm/components/atoms/GroupButton/GroupButton.js.map +1 -0
- package/esm/components/atoms/GroupButton/GroupButtonOption.d.ts +9 -0
- package/esm/components/atoms/GroupButton/GroupButtonOption.js +19 -0
- package/esm/components/atoms/GroupButton/GroupButtonOption.js.map +1 -0
- package/esm/components/atoms/GroupButton/index.d.ts +4 -0
- package/esm/components/atoms/GroupButton/index.js +3 -0
- package/esm/components/atoms/GroupButton/index.js.map +1 -0
- package/esm/components/atoms/GroupButton/styled.d.ts +42 -0
- package/esm/components/atoms/GroupButton/styled.js +97 -0
- package/esm/components/atoms/GroupButton/styled.js.map +1 -0
- package/esm/components/atoms/Icon/Icon.d.ts +14 -0
- package/esm/components/atoms/Icon/Icon.js +37 -0
- package/esm/components/atoms/Icon/Icon.js.map +1 -0
- package/esm/components/atoms/Icon/helpers.d.ts +4 -0
- package/esm/components/atoms/Icon/helpers.js +78 -0
- package/esm/components/atoms/Icon/helpers.js.map +1 -0
- package/esm/components/atoms/Icon/index.d.ts +2 -0
- package/esm/components/atoms/Icon/index.js +2 -0
- package/esm/components/atoms/Icon/index.js.map +1 -0
- package/esm/components/atoms/Input/Hint.d.ts +10 -0
- package/esm/components/atoms/Input/Hint.js +41 -0
- package/esm/components/atoms/Input/Hint.js.map +1 -0
- package/esm/components/atoms/Input/InputContainer/InputContainer.d.ts +29 -0
- package/esm/components/atoms/Input/InputContainer/InputContainer.js +66 -0
- package/esm/components/atoms/Input/InputContainer/InputContainer.js.map +1 -0
- package/esm/components/atoms/Input/InputElement/InputElement.d.ts +13 -0
- package/esm/components/atoms/Input/InputElement/InputElement.js +37 -0
- package/esm/components/atoms/Input/InputElement/InputElement.js.map +1 -0
- package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.d.ts +16 -0
- package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js +92 -0
- package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -0
- package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.d.ts +10 -0
- package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +30 -0
- package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -0
- package/esm/components/atoms/Input/PressableInputContainer/index.d.ts +2 -0
- package/esm/components/atoms/Input/PressableInputContainer/index.js +2 -0
- package/esm/components/atoms/Input/PressableInputContainer/index.js.map +1 -0
- package/esm/components/atoms/Input/PressableInputContainer/styled.d.ts +5 -0
- package/esm/components/atoms/Input/PressableInputContainer/styled.js +7 -0
- package/esm/components/atoms/Input/PressableInputContainer/styled.js.map +1 -0
- package/esm/components/atoms/Input/hooks/useInputFocus.d.ts +5 -0
- package/esm/components/atoms/Input/hooks/useInputFocus.js +40 -0
- package/esm/components/atoms/Input/hooks/useInputFocus.js.map +1 -0
- package/esm/components/atoms/Input/hooks/useNumberMask.d.ts +8 -0
- package/esm/components/atoms/Input/hooks/useNumberMask.js +108 -0
- package/esm/components/atoms/Input/hooks/useNumberMask.js.map +1 -0
- package/esm/components/atoms/Input/hooks/useStringMask.d.ts +8 -0
- package/esm/components/atoms/Input/hooks/useStringMask.js +116 -0
- package/esm/components/atoms/Input/hooks/useStringMask.js.map +1 -0
- package/esm/components/atoms/Input/index.d.ts +13 -0
- package/esm/components/atoms/Input/index.js +10 -0
- package/esm/components/atoms/Input/index.js.map +1 -0
- package/esm/components/atoms/Input/styled.d.ts +64 -0
- package/esm/components/atoms/Input/styled.js +93 -0
- package/esm/components/atoms/Input/styled.js.map +1 -0
- package/esm/components/atoms/Paper/Paper.d.ts +8 -0
- package/esm/components/atoms/Paper/Paper.js +24 -0
- package/esm/components/atoms/Paper/Paper.js.map +1 -0
- package/esm/components/atoms/Paper/index.d.ts +2 -0
- package/esm/components/atoms/Paper/index.js +2 -0
- package/esm/components/atoms/Paper/index.js.map +1 -0
- package/esm/components/atoms/Paper/styled.d.ts +9 -0
- package/esm/components/atoms/Paper/styled.js +11 -0
- package/esm/components/atoms/Paper/styled.js.map +1 -0
- package/esm/components/atoms/PressableSurface/PressableSurface.d.ts +10 -0
- package/esm/components/atoms/PressableSurface/PressableSurface.js +86 -0
- package/esm/components/atoms/PressableSurface/PressableSurface.js.map +1 -0
- package/esm/components/atoms/PressableSurface/index.d.ts +2 -0
- package/esm/components/atoms/PressableSurface/index.js +2 -0
- package/esm/components/atoms/PressableSurface/index.js.map +1 -0
- package/esm/components/atoms/ProgressBar/ProgressBar.d.ts +18 -0
- package/esm/components/atoms/ProgressBar/ProgressBar.js +90 -0
- package/esm/components/atoms/ProgressBar/ProgressBar.js.map +1 -0
- package/esm/components/atoms/ProgressBar/index.d.ts +2 -0
- package/esm/components/atoms/ProgressBar/index.js +2 -0
- package/esm/components/atoms/ProgressBar/index.js.map +1 -0
- package/esm/components/atoms/ProgressBar/styled.d.ts +20 -0
- package/esm/components/atoms/ProgressBar/styled.js +26 -0
- package/esm/components/atoms/ProgressBar/styled.js.map +1 -0
- package/esm/components/atoms/RadioButton/RadioButton.d.ts +14 -0
- package/esm/components/atoms/RadioButton/RadioButton.js +51 -0
- package/esm/components/atoms/RadioButton/RadioButton.js.map +1 -0
- package/esm/components/atoms/RadioButton/index.d.ts +2 -0
- package/esm/components/atoms/RadioButton/index.js +2 -0
- package/esm/components/atoms/RadioButton/index.js.map +1 -0
- package/esm/components/atoms/RadioButton/styled.d.ts +27 -0
- package/esm/components/atoms/RadioButton/styled.js +30 -0
- package/esm/components/atoms/RadioButton/styled.js.map +1 -0
- package/esm/components/atoms/Switch/Switch.d.ts +16 -0
- package/esm/components/atoms/Switch/Switch.js +87 -0
- package/esm/components/atoms/Switch/Switch.js.map +1 -0
- package/esm/components/atoms/Switch/animation.d.ts +2 -0
- package/esm/components/atoms/Switch/animation.js +33 -0
- package/esm/components/atoms/Switch/animation.js.map +1 -0
- package/esm/components/atoms/Switch/index.d.ts +2 -0
- package/esm/components/atoms/Switch/index.js +2 -0
- package/esm/components/atoms/Switch/index.js.map +1 -0
- package/esm/components/atoms/Switch/styled.d.ts +16 -0
- package/esm/components/atoms/Switch/styled.js +24 -0
- package/esm/components/atoms/Switch/styled.js.map +1 -0
- package/esm/components/atoms/Tag/Tag.d.ts +12 -0
- package/esm/components/atoms/Tag/Tag.js +80 -0
- package/esm/components/atoms/Tag/Tag.js.map +1 -0
- package/esm/components/atoms/Tag/index.d.ts +2 -0
- package/esm/components/atoms/Tag/index.js +2 -0
- package/esm/components/atoms/Tag/index.js.map +1 -0
- package/esm/components/atoms/Tag/styled.d.ts +24 -0
- package/esm/components/atoms/Tag/styled.js +39 -0
- package/esm/components/atoms/Tag/styled.js.map +1 -0
- package/esm/components/atoms/Text/Text.d.ts +19 -0
- package/esm/components/atoms/Text/Text.js +47 -0
- package/esm/components/atoms/Text/Text.js.map +1 -0
- package/esm/components/atoms/Text/functions.d.ts +2 -0
- package/esm/components/atoms/Text/functions.js +7 -0
- package/esm/components/atoms/Text/functions.js.map +1 -0
- package/esm/components/atoms/Text/index.d.ts +2 -0
- package/esm/components/atoms/Text/index.js +2 -0
- package/esm/components/atoms/Text/index.js.map +1 -0
- package/esm/components/atoms/Text/styled.d.ts +20 -0
- package/esm/components/atoms/Text/styled.js +46 -0
- package/esm/components/atoms/Text/styled.js.map +1 -0
- package/esm/components/atoms/shared/PaperAndCard.d.ts +5 -0
- package/esm/components/atoms/shared/PaperAndCard.js +25 -0
- package/esm/components/atoms/shared/PaperAndCard.js.map +1 -0
- package/esm/components/molecules/Calendar/Calendar.d.ts +20 -0
- package/esm/components/molecules/Calendar/Calendar.js +144 -0
- package/esm/components/molecules/Calendar/Calendar.js.map +1 -0
- package/esm/components/molecules/Calendar/components/MonthWeek.d.ts +13 -0
- package/esm/components/molecules/Calendar/components/MonthWeek.js +128 -0
- package/esm/components/molecules/Calendar/components/MonthWeek.js.map +1 -0
- package/esm/components/molecules/Calendar/components/Weekdays.d.ts +8 -0
- package/esm/components/molecules/Calendar/components/Weekdays.js +29 -0
- package/esm/components/molecules/Calendar/components/Weekdays.js.map +1 -0
- package/esm/components/molecules/Calendar/components/index.d.ts +2 -0
- package/esm/components/molecules/Calendar/components/index.js +3 -0
- package/esm/components/molecules/Calendar/components/index.js.map +1 -0
- package/esm/components/molecules/Calendar/index.d.ts +2 -0
- package/esm/components/molecules/Calendar/index.js +2 -0
- package/esm/components/molecules/Calendar/index.js.map +1 -0
- package/esm/components/molecules/Calendar/styled.d.ts +61 -0
- package/esm/components/molecules/Calendar/styled.js +56 -0
- package/esm/components/molecules/Calendar/styled.js.map +1 -0
- package/esm/components/molecules/DatePicker/DatePicker.d.ts +19 -0
- package/esm/components/molecules/DatePicker/DatePicker.js +120 -0
- package/esm/components/molecules/DatePicker/DatePicker.js.map +1 -0
- package/esm/components/molecules/DatePicker/index.d.ts +2 -0
- package/esm/components/molecules/DatePicker/index.js +2 -0
- package/esm/components/molecules/DatePicker/index.js.map +1 -0
- package/esm/components/molecules/DatePicker/styled.d.ts +15 -0
- package/esm/components/molecules/DatePicker/styled.js +22 -0
- package/esm/components/molecules/DatePicker/styled.js.map +1 -0
- package/esm/components/molecules/DateTimePicker/DateTimePicker.d.ts +17 -0
- package/esm/components/molecules/DateTimePicker/DateTimePicker.js +122 -0
- package/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -0
- package/esm/components/molecules/DateTimePicker/index.d.ts +2 -0
- package/esm/components/molecules/DateTimePicker/index.js +2 -0
- package/esm/components/molecules/DateTimePicker/index.js.map +1 -0
- package/esm/components/molecules/DateTimePicker/styled.d.ts +8 -0
- package/esm/components/molecules/DateTimePicker/styled.js +12 -0
- package/esm/components/molecules/DateTimePicker/styled.js.map +1 -0
- package/esm/components/molecules/DateTimeSelector/DateTimeSelector.d.ts +28 -0
- package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +219 -0
- package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -0
- package/esm/components/molecules/DateTimeSelector/Selector.d.ts +17 -0
- package/esm/components/molecules/DateTimeSelector/Selector.js +113 -0
- package/esm/components/molecules/DateTimeSelector/Selector.js.map +1 -0
- package/esm/components/molecules/DateTimeSelector/index.d.ts +2 -0
- package/esm/components/molecules/DateTimeSelector/index.js +2 -0
- package/esm/components/molecules/DateTimeSelector/index.js.map +1 -0
- package/esm/components/molecules/DateTimeSelector/styled.d.ts +52 -0
- package/esm/components/molecules/DateTimeSelector/styled.js +54 -0
- package/esm/components/molecules/DateTimeSelector/styled.js.map +1 -0
- package/esm/components/molecules/Grid/functions.d.ts +3 -0
- package/esm/components/molecules/Grid/functions.js +16 -0
- package/esm/components/molecules/Grid/functions.js.map +1 -0
- package/esm/components/molecules/Grid/index.d.ts +42 -0
- package/esm/components/molecules/Grid/index.js +2 -0
- package/esm/components/molecules/Grid/index.js.map +1 -0
- package/esm/components/molecules/HintInputContainer/HintInputContainer.d.ts +17 -0
- package/esm/components/molecules/HintInputContainer/HintInputContainer.js +46 -0
- package/esm/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -0
- package/esm/components/molecules/HintInputContainer/index.d.ts +2 -0
- package/esm/components/molecules/HintInputContainer/index.js +2 -0
- package/esm/components/molecules/HintInputContainer/index.js.map +1 -0
- package/esm/components/molecules/HintInputContainer/styled.d.ts +0 -0
- package/esm/components/molecules/HintInputContainer/styled.js +2 -0
- package/esm/components/molecules/HintInputContainer/styled.js.map +1 -0
- package/esm/components/molecules/IconTextButton/IconComponent.d.ts +9 -0
- package/esm/components/molecules/IconTextButton/IconComponent.js +20 -0
- package/esm/components/molecules/IconTextButton/IconComponent.js.map +1 -0
- package/esm/components/molecules/IconTextButton/IconTextButton.d.ts +8 -0
- package/esm/components/molecules/IconTextButton/IconTextButton.js +2 -0
- package/esm/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
- package/esm/components/molecules/IconTextButton/index.d.ts +2 -0
- package/esm/components/molecules/IconTextButton/index.js +2 -0
- package/esm/components/molecules/IconTextButton/index.js.map +1 -0
- package/esm/components/molecules/IconTextButton/styled.d.ts +11 -0
- package/esm/components/molecules/IconTextButton/styled.js +14 -0
- package/esm/components/molecules/IconTextButton/styled.js.map +1 -0
- package/esm/components/molecules/InputPassword/InputPasswordIcon.d.ts +8 -0
- package/esm/components/molecules/InputPassword/InputPasswordIcon.js +33 -0
- package/esm/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -0
- package/esm/components/molecules/InputPassword/index.d.ts +1 -0
- package/esm/components/molecules/InputPassword/index.js +2 -0
- package/esm/components/molecules/InputPassword/index.js.map +1 -0
- package/esm/components/molecules/InputPassword/styled.d.ts +7 -0
- package/esm/components/molecules/InputPassword/styled.js +11 -0
- package/esm/components/molecules/InputPassword/styled.js.map +1 -0
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +7 -0
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +2 -0
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
- package/esm/components/molecules/LabeledSwitch/index.d.ts +1 -0
- package/esm/components/molecules/LabeledSwitch/index.js +2 -0
- package/esm/components/molecules/LabeledSwitch/index.js.map +1 -0
- package/esm/components/molecules/Snackbar/Snackbar.d.ts +19 -0
- package/esm/components/molecules/Snackbar/Snackbar.js +103 -0
- package/esm/components/molecules/Snackbar/Snackbar.js.map +1 -0
- package/esm/components/molecules/Snackbar/index.d.ts +2 -0
- package/esm/components/molecules/Snackbar/index.js +2 -0
- package/esm/components/molecules/Snackbar/index.js.map +1 -0
- package/esm/components/molecules/Snackbar/styled.d.ts +47 -0
- package/esm/components/molecules/Snackbar/styled.js +54 -0
- package/esm/components/molecules/Snackbar/styled.js.map +1 -0
- package/esm/components/molecules/TextArea/TextArea.d.ts +14 -0
- package/esm/components/molecules/TextArea/TextArea.js +77 -0
- package/esm/components/molecules/TextArea/TextArea.js.map +1 -0
- package/esm/components/molecules/TextArea/index.d.ts +3 -0
- package/esm/components/molecules/TextArea/index.js +3 -0
- package/esm/components/molecules/TextArea/index.js.map +1 -0
- package/esm/components/molecules/TextArea/styled.d.ts +12 -0
- package/esm/components/molecules/TextArea/styled.js +14 -0
- package/esm/components/molecules/TextArea/styled.js.map +1 -0
- package/esm/hooks/index.d.ts +2 -0
- package/esm/hooks/index.js +3 -0
- package/esm/hooks/index.js.map +1 -0
- package/esm/hooks/useDebouncedState.d.ts +2 -0
- package/esm/hooks/useDebouncedState.js +31 -0
- package/esm/hooks/useDebouncedState.js.map +1 -0
- package/esm/hooks/useTheme.d.ts +2 -0
- package/esm/hooks/useTheme.js +5 -0
- package/esm/hooks/useTheme.js.map +1 -0
- package/esm/index.d.ts +64 -0
- package/esm/index.js +36 -0
- package/esm/index.js.map +1 -0
- package/esm/styles/ThemeProvider.d.ts +4 -0
- package/esm/styles/ThemeProvider.js +13 -0
- package/esm/styles/ThemeProvider.js.map +1 -0
- package/esm/styles/definitions.d.ts +45 -0
- package/esm/styles/definitions.js +168 -0
- package/esm/styles/definitions.js.map +1 -0
- package/esm/styles/light.d.ts +2 -0
- package/esm/styles/light.js +42 -0
- package/esm/styles/light.js.map +1 -0
- package/esm/types/defaults.d.ts +134 -0
- package/esm/types/defaults.js +2 -0
- package/esm/types/defaults.js.map +1 -0
- package/esm/utils/IPhoneXHelper.d.ts +4 -0
- package/esm/utils/IPhoneXHelper.js +23 -0
- package/esm/utils/IPhoneXHelper.js.map +1 -0
- package/esm/utils/ResponsiveFontSize.d.ts +3 -0
- package/esm/utils/ResponsiveFontSize.js +37 -0
- package/esm/utils/ResponsiveFontSize.js.map +1 -0
- package/esm/utils/extractNumbersFromString.d.ts +2 -0
- package/esm/utils/extractNumbersFromString.js +7 -0
- package/esm/utils/extractNumbersFromString.js.map +1 -0
- package/esm/utils/formatWithMask.d.ts +3 -0
- package/esm/utils/formatWithMask.js +19 -0
- package/esm/utils/formatWithMask.js.map +1 -0
- package/esm/utils/index.d.ts +7 -0
- package/esm/utils/index.js +8 -0
- package/esm/utils/index.js.map +1 -0
- package/esm/utils/lightenDarkenColor.d.ts +1 -0
- package/esm/utils/lightenDarkenColor.js +18 -0
- package/esm/utils/lightenDarkenColor.js.map +1 -0
- package/esm/utils/masks.d.ts +11 -0
- package/esm/utils/masks.js +19 -0
- package/esm/utils/masks.js.map +1 -0
- package/esm/utils/variantComplement.d.ts +6 -0
- package/esm/utils/variantComplement.js +26 -0
- package/esm/utils/variantComplement.js.map +1 -0
- package/package.json +9 -4
- package/src/components/atoms/Avatar/index.ts +2 -1
- package/src/components/atoms/Badge/index.ts +2 -1
- package/src/components/atoms/BoxContent/index.ts +2 -1
- package/src/components/atoms/Button/index.ts +3 -3
- package/src/components/atoms/Card/Footer/index.ts +2 -1
- package/src/components/atoms/Card/Header/index.ts +2 -1
- package/src/components/atoms/Card/index.ts +2 -1
- package/src/components/atoms/Checkbox/index.ts +2 -1
- package/src/components/atoms/Divider/index.ts +2 -1
- package/src/components/atoms/GroupButton/index.ts +4 -9
- package/src/components/atoms/Icon/index.ts +2 -1
- package/src/components/atoms/Input/PressableInputContainer/index.ts +2 -4
- package/src/components/atoms/Input/index.ts +8 -14
- package/src/components/atoms/Paper/index.ts +2 -1
- package/src/components/atoms/PressableSurface/index.ts +2 -4
- package/src/components/atoms/ProgressBar/index.ts +2 -1
- package/src/components/atoms/RadioButton/index.ts +2 -1
- package/src/components/atoms/Switch/index.ts +2 -1
- package/src/components/atoms/Tag/index.ts +2 -1
- package/src/components/atoms/Text/index.ts +2 -1
- package/src/components/molecules/Calendar/index.ts +2 -2
- package/src/components/molecules/DatePicker/index.ts +2 -1
- package/src/components/molecules/DateTimePicker/index.ts +2 -4
- package/src/components/molecules/DateTimeSelector/index.ts +2 -2
- package/src/components/molecules/IconTextButton/index.ts +4 -1
- package/src/components/molecules/LabeledSwitch/index.ts +1 -1
- package/src/components/molecules/Snackbar/index.ts +2 -1
- package/src/components/molecules/TextArea/index.ts +2 -1
- package/src/index.ts +64 -56
- package/tsconfig.build.esm.json +10 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
var _excluded = ["style"],
|
|
2
|
+
_excluded2 = ["options", "renderOption", "renderKey", "onChange", "value", "disableAllOptions"];
|
|
3
|
+
|
|
4
|
+
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); }
|
|
5
|
+
|
|
6
|
+
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; }
|
|
7
|
+
|
|
8
|
+
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; }
|
|
9
|
+
|
|
10
|
+
import { useTheme } from '@emotion/react';
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { StyledDivider, StyledGroupButton, StyledOption, StyledPressable } from './styled';
|
|
13
|
+
|
|
14
|
+
var GroupButton = function GroupButton(_ref) {
|
|
15
|
+
var style = _ref.style,
|
|
16
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
|
|
18
|
+
return React.createElement(StyledGroupButton, {
|
|
19
|
+
style: style
|
|
20
|
+
}, groupOptions(rest));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
var groupOptions = function groupOptions(_ref2) {
|
|
24
|
+
var options = _ref2.options,
|
|
25
|
+
renderOption = _ref2.renderOption,
|
|
26
|
+
renderKey = _ref2.renderKey,
|
|
27
|
+
onChange = _ref2.onChange,
|
|
28
|
+
value = _ref2.value,
|
|
29
|
+
disableAllOptions = _ref2.disableAllOptions,
|
|
30
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
31
|
+
|
|
32
|
+
var theme = useTheme();
|
|
33
|
+
return options === null || options === void 0 ? void 0 : options.map(function (option, idx) {
|
|
34
|
+
var _option$options2;
|
|
35
|
+
|
|
36
|
+
var optionValue = option.value,
|
|
37
|
+
_option$options = option.options;
|
|
38
|
+
_option$options = _option$options === void 0 ? {} : _option$options;
|
|
39
|
+
var activeStyle = _option$options.activeStyle,
|
|
40
|
+
inactiveStyle = _option$options.inactiveStyle,
|
|
41
|
+
activeBackgroundColor = _option$options.activeBackgroundColor,
|
|
42
|
+
activeBackgroundColorTone = _option$options.activeBackgroundColorTone,
|
|
43
|
+
inactiveBackgroundColor = _option$options.inactiveBackgroundColor,
|
|
44
|
+
inactiveBackgroundColorTone = _option$options.inactiveBackgroundColorTone,
|
|
45
|
+
_option$options$disab = _option$options.disabled,
|
|
46
|
+
disabled = _option$options$disab === void 0 ? disableAllOptions || ((_option$options2 = option.options) === null || _option$options2 === void 0 ? void 0 : _option$options2.disabled) : _option$options$disab;
|
|
47
|
+
var key = renderKey === null || renderKey === void 0 ? void 0 : renderKey(optionValue);
|
|
48
|
+
var active = key === (renderKey === null || renderKey === void 0 ? void 0 : renderKey(value));
|
|
49
|
+
var isFirst = idx === 0;
|
|
50
|
+
var isLast = idx === options.length - 1;
|
|
51
|
+
var colors = theme.miscellaneous.surfaceColor;
|
|
52
|
+
|
|
53
|
+
if (active) {
|
|
54
|
+
colors = theme.color[activeBackgroundColor || 'secondary'][activeBackgroundColorTone || 'medium'];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
if (!active && (inactiveBackgroundColor || inactiveBackgroundColorTone)) {
|
|
58
|
+
colors = theme.color[inactiveBackgroundColor || 'secondary'][inactiveBackgroundColorTone || 'medium'];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return React.createElement(StyledOption, {
|
|
62
|
+
key: key
|
|
63
|
+
}, React.createElement(StyledPressable, _extends({}, rest, option.options, {
|
|
64
|
+
disabled: disabled,
|
|
65
|
+
isActive: active,
|
|
66
|
+
isFirstOption: isFirst,
|
|
67
|
+
isLastOption: isLast,
|
|
68
|
+
onPress: function onPress() {
|
|
69
|
+
return onChange === null || onChange === void 0 ? void 0 : onChange(optionValue);
|
|
70
|
+
},
|
|
71
|
+
surfaceColor: colors,
|
|
72
|
+
style: active ? activeStyle : inactiveStyle
|
|
73
|
+
}), renderOption === null || renderOption === void 0 ? void 0 : renderOption(option.value, active)), !isLast && React.createElement(StyledDivider, null));
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export default GroupButton;
|
|
78
|
+
//# sourceMappingURL=GroupButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupButton.js","names":["useTheme","React","StyledDivider","StyledGroupButton","StyledOption","StyledPressable","GroupButton","style","rest","groupOptions","options","renderOption","renderKey","onChange","value","disableAllOptions","theme","map","option","idx","optionValue","activeStyle","inactiveStyle","activeBackgroundColor","activeBackgroundColorTone","inactiveBackgroundColor","inactiveBackgroundColorTone","disabled","key","active","isFirst","isLast","length","colors","miscellaneous","surfaceColor","color"],"sources":["../../../../src/components/atoms/GroupButton/GroupButton.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport React from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport {\n ColorGradationType,\n ColorType,\n ThemeProp,\n} from '../../../types/defaults';\nimport { ButtonSizeType } from '../Button';\nimport {\n StyledDivider,\n StyledGroupButton,\n StyledOption,\n StyledPressable,\n} from './styled';\n\nexport interface GroupButtonOptions {\n activeBackgroundColor?: ColorType;\n activeBackgroundColorTone?: ColorGradationType;\n activeBorderColor?: ColorType;\n activeBorderColorTone?: ColorGradationType;\n inactiveBackgroundColor?: ColorType;\n inactiveBackgroundColorTone?: ColorGradationType;\n inactiveBorderColor?: ColorType;\n inactiveBorderColorTone?: ColorGradationType;\n activeStyle?: StyleProp<ViewStyle>;\n inactiveStyle?: StyleProp<ViewStyle>;\n disabled?: boolean;\n}\n\nexport interface GroupButtonValue<T> {\n value: T;\n options?: GroupButtonOptions;\n}\n\nexport interface GroupButtonProps<T> {\n value: T;\n options: GroupButtonValue<T>[];\n renderKey: (option?: T) => string | number | undefined;\n renderOption: (option: T, active: boolean) => JSX.Element;\n onChange: (option: T) => void;\n buttonSize?: ButtonSizeType;\n style?: StyleProp<ViewStyle>;\n disableAllOptions?: boolean;\n}\n\nconst GroupButton = <T,>({ style, ...rest }: GroupButtonProps<T>) => {\n return (\n <StyledGroupButton style={style}>{groupOptions(rest)}</StyledGroupButton>\n );\n};\n\nconst groupOptions = <T,>({\n options,\n renderOption,\n renderKey,\n onChange,\n value,\n disableAllOptions,\n ...rest\n}: Partial<GroupButtonProps<T>>) => {\n const theme = useTheme() as ThemeProp;\n return options?.map((option, idx) => {\n const {\n value: optionValue,\n options: {\n activeStyle,\n inactiveStyle,\n activeBackgroundColor,\n activeBackgroundColorTone,\n inactiveBackgroundColor,\n inactiveBackgroundColorTone,\n disabled = disableAllOptions || option.options?.disabled,\n } = {},\n } = option;\n\n const key = renderKey?.(optionValue);\n const active = key === renderKey?.(value);\n const isFirst = idx === 0;\n const isLast = idx === options.length - 1;\n\n let colors = theme.miscellaneous.surfaceColor;\n if (active) {\n colors =\n theme.color[activeBackgroundColor || 'secondary'][\n activeBackgroundColorTone || 'medium'\n ];\n }\n\n if (!active && (inactiveBackgroundColor || inactiveBackgroundColorTone)) {\n colors =\n theme.color[inactiveBackgroundColor || 'secondary'][\n inactiveBackgroundColorTone || 'medium'\n ];\n }\n\n return (\n <StyledOption key={key}>\n <StyledPressable\n {...rest}\n {...option.options}\n disabled={disabled}\n isActive={active}\n isFirstOption={isFirst}\n isLastOption={isLast}\n onPress={() => onChange?.(optionValue)}\n surfaceColor={colors}\n style={active ? activeStyle : inactiveStyle}\n >\n {renderOption?.(option.value, active)}\n </StyledPressable>\n {!isLast && <StyledDivider />}\n </StyledOption>\n );\n });\n};\n\nexport default GroupButton;\n"],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { TextProps } from '../Text';
|
|
3
|
+
export interface GroupButtonOptionProps {
|
|
4
|
+
active: boolean;
|
|
5
|
+
description: string;
|
|
6
|
+
TextComponent?: FC<TextProps>;
|
|
7
|
+
}
|
|
8
|
+
declare const GroupButtonOption: ({ TextComponent, active, description, }: GroupButtonOptionProps) => JSX.Element;
|
|
9
|
+
export default GroupButtonOption;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text } from '../Text';
|
|
3
|
+
import { getStyledGroupItemText } from './styled';
|
|
4
|
+
|
|
5
|
+
var GroupButtonOption = function GroupButtonOption(_ref) {
|
|
6
|
+
var _ref$TextComponent = _ref.TextComponent,
|
|
7
|
+
TextComponent = _ref$TextComponent === void 0 ? Text : _ref$TextComponent,
|
|
8
|
+
active = _ref.active,
|
|
9
|
+
description = _ref.description;
|
|
10
|
+
var StyledText = getStyledGroupItemText(TextComponent);
|
|
11
|
+
return React.createElement(StyledText, {
|
|
12
|
+
fontWeight: "bold",
|
|
13
|
+
typography: "sub",
|
|
14
|
+
active: active
|
|
15
|
+
}, description);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export default GroupButtonOption;
|
|
19
|
+
//# sourceMappingURL=GroupButtonOption.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GroupButtonOption.js","names":["React","Text","getStyledGroupItemText","GroupButtonOption","TextComponent","active","description","StyledText"],"sources":["../../../../src/components/atoms/GroupButton/GroupButtonOption.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Text, TextProps } from '../Text';\nimport { getStyledGroupItemText } from './styled';\n\nexport interface GroupButtonOptionProps {\n active: boolean;\n description: string;\n TextComponent?: FC<TextProps>;\n}\n\nconst GroupButtonOption = ({\n TextComponent = Text,\n active,\n description,\n}: GroupButtonOptionProps): JSX.Element => {\n const StyledText = getStyledGroupItemText(TextComponent);\n return (\n <StyledText fontWeight=\"bold\" typography=\"sub\" active={active}>\n {description}\n </StyledText>\n );\n};\n\nexport default GroupButtonOption;\n"],"mappings":"AAAA,OAAOA,KAAP,MAA0B,OAA1B;AACA,SAASC,IAAT,QAAgC,SAAhC;AACA,SAASC,sBAAT,QAAuC,UAAvC;;AAQA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,OAIiB;EAAA,8BAHzCC,aAGyC;EAAA,IAHzCA,aAGyC,mCAHzBH,IAGyB;EAAA,IAFzCI,MAEyC,QAFzCA,MAEyC;EAAA,IADzCC,WACyC,QADzCA,WACyC;EACzC,IAAMC,UAAU,GAAGL,sBAAsB,CAACE,aAAD,CAAzC;EACA,OACE,oBAAC,UAAD;IAAY,UAAU,EAAC,MAAvB;IAA8B,UAAU,EAAC,KAAzC;IAA+C,MAAM,EAAEC;EAAvD,GACGC,WADH,CADF;AAKD,CAXD;;AAaA,eAAeH,iBAAf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","GroupButton","GroupButtonOption"],"sources":["../../../../src/components/atoms/GroupButton/index.ts"],"sourcesContent":["export { default as GroupButton } from './GroupButton';\nexport type { GroupButtonProps, GroupButtonValue } from './GroupButton';\nexport { default as GroupButtonOption } from './GroupButtonOption';\nexport type { GroupButtonOptionProps } from './GroupButtonOption';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,WAApB,QAAuC,eAAvC;AAEA,SAASD,OAAO,IAAIE,iBAApB,QAA6C,qBAA7C"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ButtonSizeType } from '../Button';
|
|
3
|
+
import { TextProps } from '../Text';
|
|
4
|
+
import { GroupButtonOptions } from './GroupButton';
|
|
5
|
+
import { GroupButtonOptionProps } from './GroupButtonOption';
|
|
6
|
+
interface PressableOptions extends GroupButtonOptions {
|
|
7
|
+
isActive: boolean;
|
|
8
|
+
isFirstOption: boolean;
|
|
9
|
+
isLastOption: boolean;
|
|
10
|
+
buttonSize?: ButtonSizeType;
|
|
11
|
+
}
|
|
12
|
+
export declare const StyledGroupButton: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
13
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
14
|
+
as?: import("react").ElementType<any> | undefined;
|
|
15
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
16
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const getStyledGroupItemText: (component: FC<TextProps>) => import("@emotion/native").StyledComponent<TextProps & {
|
|
19
|
+
children?: import("react").ReactNode;
|
|
20
|
+
} & {
|
|
21
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
22
|
+
as?: import("react").ElementType<any> | undefined;
|
|
23
|
+
} & Partial<GroupButtonOptionProps> & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
|
|
24
|
+
export declare const StyledOption: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
25
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
26
|
+
as?: import("react").ElementType<any> | undefined;
|
|
27
|
+
}, {}, {
|
|
28
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
29
|
+
}>;
|
|
30
|
+
export declare const StyledDivider: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
31
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
32
|
+
as?: import("react").ElementType<any> | undefined;
|
|
33
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
34
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
35
|
+
}>;
|
|
36
|
+
export declare const StyledPressable: import("@emotion/native").StyledComponent<import("../PressableSurface").PressableSurfaceProps & {
|
|
37
|
+
children?: import("react").ReactNode;
|
|
38
|
+
} & {
|
|
39
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
40
|
+
as?: import("react").ElementType<any> | undefined;
|
|
41
|
+
} & PressableOptions & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
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
|
+
import styled, { css } from '@emotion/native';
|
|
6
|
+
import { RFValueStr } from '../../../utils';
|
|
7
|
+
import { PressableSurface } from '../PressableSurface';
|
|
8
|
+
export var StyledGroupButton = styled.View(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n flex-direction: row;\n"])));
|
|
9
|
+
|
|
10
|
+
var disabledStyles = function disabledStyles(_ref) {
|
|
11
|
+
var disabled = _ref.disabled,
|
|
12
|
+
isActive = _ref.isActive;
|
|
13
|
+
return disabled && !isActive && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n background-color: #dcdcdc;\n "])));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export var getStyledGroupItemText = function getStyledGroupItemText(component) {
|
|
17
|
+
return styled(component)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n color: ", ";\n "])), function (_ref2) {
|
|
18
|
+
var active = _ref2.active,
|
|
19
|
+
theme = _ref2.theme;
|
|
20
|
+
return active ? theme.miscellaneous.surfaceColor : theme.color.secondary.medium;
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
var activeStyles = function activeStyles(_ref3) {
|
|
25
|
+
var theme = _ref3.theme,
|
|
26
|
+
isActive = _ref3.isActive,
|
|
27
|
+
_ref3$activeBorderCol = _ref3.activeBorderColor,
|
|
28
|
+
activeBorderColor = _ref3$activeBorderCol === void 0 ? 'secondary' : _ref3$activeBorderCol,
|
|
29
|
+
_ref3$activeBorderCol2 = _ref3.activeBorderColorTone,
|
|
30
|
+
activeBorderColorTone = _ref3$activeBorderCol2 === void 0 ? 'medium' : _ref3$activeBorderCol2;
|
|
31
|
+
return isActive && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n border-color: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.color[activeBorderColor][activeBorderColorTone]);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
var inactiveStyles = function inactiveStyles(_ref4) {
|
|
35
|
+
var theme = _ref4.theme,
|
|
36
|
+
isActive = _ref4.isActive,
|
|
37
|
+
inactiveBackgroundColor = _ref4.inactiveBackgroundColor,
|
|
38
|
+
inactiveBackgroundColorTone = _ref4.inactiveBackgroundColorTone,
|
|
39
|
+
_ref4$inactiveBorderC = _ref4.inactiveBorderColor,
|
|
40
|
+
inactiveBorderColor = _ref4$inactiveBorderC === void 0 ? 'secondary' : _ref4$inactiveBorderC,
|
|
41
|
+
_ref4$inactiveBorderC2 = _ref4.inactiveBorderColorTone,
|
|
42
|
+
inactiveBorderColorTone = _ref4$inactiveBorderC2 === void 0 ? 'light' : _ref4$inactiveBorderC2;
|
|
43
|
+
|
|
44
|
+
if (!isActive && inactiveBackgroundColor && inactiveBackgroundColorTone) {
|
|
45
|
+
return css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-color: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.color[inactiveBorderColor][inactiveBorderColorTone]);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
if (!isActive) {
|
|
49
|
+
return css(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n border-color: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.color[inactiveBorderColor][inactiveBorderColorTone]);
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var leftStyles = function leftStyles(_ref5) {
|
|
54
|
+
var theme = _ref5.theme,
|
|
55
|
+
isFirstOption = _ref5.isFirstOption;
|
|
56
|
+
return isFirstOption && css(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n border-top-left-radius: ", ";\n border-bottom-left-radius: ", ";\n border-left-width: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.borderRadius.mili, theme === null || theme === void 0 ? void 0 : theme.borderRadius.mili, theme === null || theme === void 0 ? void 0 : theme.borderWidth.pico);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
var rightStyles = function rightStyles(_ref6) {
|
|
60
|
+
var theme = _ref6.theme,
|
|
61
|
+
isLastOption = _ref6.isLastOption;
|
|
62
|
+
return isLastOption && css(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n border-top-right-radius: ", ";\n border-bottom-right-radius: ", ";\n border-right-width: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.borderRadius.mili, theme === null || theme === void 0 ? void 0 : theme.borderRadius.mili, theme === null || theme === void 0 ? void 0 : theme.borderWidth.pico);
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
var sizeStyles = function sizeStyles(_ref7) {
|
|
66
|
+
var theme = _ref7.theme,
|
|
67
|
+
_ref7$buttonSize = _ref7.buttonSize,
|
|
68
|
+
buttonSize = _ref7$buttonSize === void 0 ? 'small' : _ref7$buttonSize;
|
|
69
|
+
|
|
70
|
+
switch (buttonSize) {
|
|
71
|
+
case 'small':
|
|
72
|
+
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n min-height: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.spacing.mili, theme === null || theme === void 0 ? void 0 : theme.spacing.deca, RFValueStr('34px'));
|
|
73
|
+
|
|
74
|
+
default:
|
|
75
|
+
return css(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n padding: ", " ", ";\n min-height: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.spacing.mili, theme === null || theme === void 0 ? void 0 : theme.spacing.kilo, RFValueStr('44px'));
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
var StyledPressableBase = styled(PressableSurface)(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n border-top-width: ", ";\n border-bottom-width: ", ";\n justify-content: center;\n align-items: center;\n flex: 1;\n"])), function (_ref8) {
|
|
80
|
+
var theme = _ref8.theme;
|
|
81
|
+
return theme.borderWidth.pico;
|
|
82
|
+
}, function (_ref9) {
|
|
83
|
+
var theme = _ref9.theme;
|
|
84
|
+
return theme.borderWidth.pico;
|
|
85
|
+
});
|
|
86
|
+
export var StyledOption = styled.View(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n flex-direction: row;\n flex: 1;\n"])));
|
|
87
|
+
export var StyledDivider = styled.View(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n width: ", ";\n background-color: ", "; ;\n"])), function (_ref10) {
|
|
88
|
+
var theme = _ref10.theme;
|
|
89
|
+
return theme.borderWidth.pico;
|
|
90
|
+
}, function (_ref11) {
|
|
91
|
+
var theme = _ref11.theme;
|
|
92
|
+
return theme.color.secondary.light;
|
|
93
|
+
});
|
|
94
|
+
export var StyledPressable = styled(StyledPressableBase)(function (props) {
|
|
95
|
+
return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n "])), activeStyles(props), inactiveStyles(props), leftStyles(props), rightStyles(props), sizeStyles(props), disabledStyles(props));
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","names":["styled","css","RFValueStr","PressableSurface","StyledGroupButton","View","disabledStyles","disabled","isActive","getStyledGroupItemText","component","active","theme","miscellaneous","surfaceColor","color","secondary","medium","activeStyles","activeBorderColor","activeBorderColorTone","inactiveStyles","inactiveBackgroundColor","inactiveBackgroundColorTone","inactiveBorderColor","inactiveBorderColorTone","leftStyles","isFirstOption","borderRadius","mili","borderWidth","pico","rightStyles","isLastOption","sizeStyles","buttonSize","spacing","deca","kilo","StyledPressableBase","StyledOption","StyledDivider","light","StyledPressable","props"],"sources":["../../../../src/components/atoms/GroupButton/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { FC } from 'react';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils';\nimport { ButtonSizeType } from '../Button';\nimport { PressableSurface } from '../PressableSurface';\nimport { TextProps } from '../Text';\nimport { GroupButtonOptions } from './GroupButton';\nimport { GroupButtonOptionProps } from './GroupButtonOption';\n\ninterface PressableOptions extends GroupButtonOptions {\n isActive: boolean;\n isFirstOption: boolean;\n isLastOption: boolean;\n buttonSize?: ButtonSizeType;\n}\n\nexport const StyledGroupButton = styled.View<Partial<StyleProps>>`\n flex-direction: row;\n`;\n\n// TO FIXED: hexa color to theme definitions\nconst disabledStyles = ({\n disabled,\n isActive,\n}: PressableOptions & Partial<StyleProps>) =>\n disabled &&\n !isActive &&\n css`\n background-color: #dcdcdc;\n `;\n\nexport const getStyledGroupItemText = (component: FC<TextProps>) => {\n return styled(component)<\n Partial<GroupButtonOptionProps> & Partial<StyleProps>\n >`\n color: ${({ active, theme }) =>\n active ? theme.miscellaneous.surfaceColor : theme.color.secondary.medium};\n `;\n};\n\nconst activeStyles = ({\n theme,\n isActive,\n activeBorderColor = 'secondary',\n activeBorderColorTone = 'medium',\n}: PressableOptions & Partial<StyleProps>) =>\n isActive &&\n css`\n border-color: ${theme?.color[activeBorderColor][activeBorderColorTone]};\n `;\n\nconst inactiveStyles = ({\n theme,\n isActive,\n inactiveBackgroundColor,\n inactiveBackgroundColorTone,\n inactiveBorderColor = 'secondary',\n inactiveBorderColorTone = 'light',\n}: PressableOptions & Partial<StyleProps>) => {\n if (!isActive && inactiveBackgroundColor && inactiveBackgroundColorTone) {\n return css`\n border-color: ${theme?.color[inactiveBorderColor][\n inactiveBorderColorTone\n ]};\n `;\n }\n\n if (!isActive) {\n return css`\n border-color: ${theme?.color[inactiveBorderColor][\n inactiveBorderColorTone\n ]};\n `;\n }\n};\n\nconst leftStyles = ({\n theme,\n isFirstOption,\n}: PressableOptions & Partial<StyleProps>) =>\n isFirstOption &&\n css`\n border-top-left-radius: ${theme?.borderRadius.mili};\n border-bottom-left-radius: ${theme?.borderRadius.mili};\n border-left-width: ${theme?.borderWidth.pico};\n `;\n\nconst rightStyles = ({\n theme,\n isLastOption,\n}: PressableOptions & Partial<StyleProps>) =>\n isLastOption &&\n css`\n border-top-right-radius: ${theme?.borderRadius.mili};\n border-bottom-right-radius: ${theme?.borderRadius.mili};\n border-right-width: ${theme?.borderWidth.pico};\n `;\n\nconst sizeStyles = ({\n theme,\n buttonSize = 'small',\n}: PressableOptions & Partial<StyleProps>) => {\n switch (buttonSize) {\n case 'small':\n return css`\n padding: ${theme?.spacing.mili} ${theme?.spacing.deca};\n min-height: ${RFValueStr('34px')};\n `;\n default:\n return css`\n padding: ${theme?.spacing.mili} ${theme?.spacing.kilo};\n min-height: ${RFValueStr('44px')};\n `;\n }\n};\n\nconst StyledPressableBase = styled(PressableSurface)<\n PressableOptions & Partial<StyleProps>\n>`\n border-top-width: ${({ theme }) => theme.borderWidth.pico};\n border-bottom-width: ${({ theme }) => theme.borderWidth.pico};\n justify-content: center;\n align-items: center;\n flex: 1;\n`;\n\nexport const StyledOption = styled.View`\n flex-direction: row;\n flex: 1;\n`;\n\nexport const StyledDivider = styled.View<Partial<StyleProps>>`\n width: ${({ theme }) => theme.borderWidth.pico};\n background-color: ${({ theme }) => theme.color.secondary.light}; ;\n`;\n\nexport const StyledPressable = styled(StyledPressableBase)(\n (props: PressableOptions & Partial<StyleProps>) => css`\n ${activeStyles(props)}\n ${inactiveStyles(props)}\n ${leftStyles(props)}\n ${rightStyles(props)}\n ${sizeStyles(props)}\n ${disabledStyles(props)}\n `\n);\n"],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { StyleProp, TextStyle } from 'react-native';
|
|
3
|
+
import { ColorGradationType, ColorType, FontColorType, IconSizeType, IconType } from '@tecsinapse/react-core';
|
|
4
|
+
export interface IconProps {
|
|
5
|
+
name: string;
|
|
6
|
+
size?: IconSizeType;
|
|
7
|
+
type: IconType;
|
|
8
|
+
fontColor?: FontColorType;
|
|
9
|
+
colorVariant?: ColorType;
|
|
10
|
+
colorTone?: ColorGradationType;
|
|
11
|
+
style?: StyleProp<TextStyle>;
|
|
12
|
+
}
|
|
13
|
+
declare const Icon: FC<IconProps>;
|
|
14
|
+
export default Icon;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
var _excluded = ["name", "size", "type", "style", "fontColor", "colorVariant", "colorTone"];
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
+
|
|
7
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
|
+
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { useTheme } from '@emotion/react';
|
|
11
|
+
import { getIconColor, getIconComponent } from './helpers';
|
|
12
|
+
|
|
13
|
+
var Icon = function Icon(_ref) {
|
|
14
|
+
var name = _ref.name,
|
|
15
|
+
_ref$size = _ref.size,
|
|
16
|
+
size = _ref$size === void 0 ? 'centi' : _ref$size,
|
|
17
|
+
type = _ref.type,
|
|
18
|
+
style = _ref.style,
|
|
19
|
+
_ref$fontColor = _ref.fontColor,
|
|
20
|
+
fontColor = _ref$fontColor === void 0 ? 'dark' : _ref$fontColor,
|
|
21
|
+
colorVariant = _ref.colorVariant,
|
|
22
|
+
_ref$colorTone = _ref.colorTone,
|
|
23
|
+
colorTone = _ref$colorTone === void 0 ? 'medium' : _ref$colorTone,
|
|
24
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
25
|
+
|
|
26
|
+
var theme = useTheme();
|
|
27
|
+
var color = getIconColor(colorVariant, colorTone, fontColor, theme);
|
|
28
|
+
var RNVIcon = getIconComponent(type, size);
|
|
29
|
+
return React.createElement(RNVIcon, _extends({}, rest, {
|
|
30
|
+
style: style,
|
|
31
|
+
name: name,
|
|
32
|
+
color: color
|
|
33
|
+
}));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export default Icon;
|
|
37
|
+
//# sourceMappingURL=Icon.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.js","names":["React","useTheme","getIconColor","getIconComponent","Icon","name","size","type","style","fontColor","colorVariant","colorTone","rest","theme","color","RNVIcon"],"sources":["../../../../src/components/atoms/Icon/Icon.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, TextStyle } from 'react-native';\nimport { useTheme } from '@emotion/react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { getIconColor, getIconComponent } from './helpers';\n\nexport interface IconProps {\n /** Name of the icon. You must use the same icons from react-native-vector-icons */\n name: string;\n /** Default icon sizes from theme */\n size?: IconSizeType;\n /** Icon family. You must use the same icons from react-native-vector-icons */\n type: IconType;\n /** Font theme fill color */\n fontColor?: FontColorType;\n /** Palette theme fill color */\n colorVariant?: ColorType;\n /** Palette theme gradation fill color */\n colorTone?: ColorGradationType;\n style?: StyleProp<TextStyle>;\n}\n\n/** NOTE: When using colors, the order matters if you're trying to merge multiple types. */\nconst Icon: FC<IconProps> = ({\n name,\n size = 'centi',\n type,\n style,\n fontColor = 'dark',\n colorVariant,\n colorTone = 'medium',\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n const color = getIconColor(colorVariant, colorTone, fontColor, theme);\n const RNVIcon = getIconComponent(type, size);\n\n return <RNVIcon {...rest} style={style} name={name} color={color} />;\n};\n\nexport default Icon;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAA0B,OAA1B;AAEA,SAASC,QAAT,QAAyB,gBAAzB;AASA,SAASC,YAAT,EAAuBC,gBAAvB,QAA+C,WAA/C;;AAmBA,IAAMC,IAAmB,GAAG,SAAtBA,IAAsB,OAStB;EAAA,IARJC,IAQI,QARJA,IAQI;EAAA,qBAPJC,IAOI;EAAA,IAPJA,IAOI,0BAPG,OAOH;EAAA,IANJC,IAMI,QANJA,IAMI;EAAA,IALJC,KAKI,QALJA,KAKI;EAAA,0BAJJC,SAII;EAAA,IAJJA,SAII,+BAJQ,MAIR;EAAA,IAHJC,YAGI,QAHJA,YAGI;EAAA,0BAFJC,SAEI;EAAA,IAFJA,SAEI,+BAFQ,QAER;EAAA,IADDC,IACC;;EACJ,IAAMC,KAAK,GAAGZ,QAAQ,EAAtB;EACA,IAAMa,KAAK,GAAGZ,YAAY,CAACQ,YAAD,EAAeC,SAAf,EAA0BF,SAA1B,EAAqCI,KAArC,CAA1B;EACA,IAAME,OAAO,GAAGZ,gBAAgB,CAACI,IAAD,EAAOD,IAAP,CAAhC;EAEA,OAAO,oBAAC,OAAD,eAAaM,IAAb;IAAmB,KAAK,EAAEJ,KAA1B;IAAiC,IAAI,EAAEH,IAAvC;IAA6C,KAAK,EAAES;EAApD,GAAP;AACD,CAfD;;AAiBA,eAAeV,IAAf"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ColorGradationType, ColorType, FontColorType, IconSizeType, IconType, ThemeProp } from '@tecsinapse/react-core';
|
|
2
|
+
export declare const registerCustomIconType: (id: string, customIcon: any) => void;
|
|
3
|
+
export declare const getIconComponent: (type: IconType, size: IconSizeType) => any;
|
|
4
|
+
export declare const getIconColor: (colorVariant: ColorType | undefined, colorGradation: ColorGradationType | undefined, fontColor: FontColorType, theme: ThemeProp) => string;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
var _templateObject;
|
|
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
|
+
import styled from '@emotion/native';
|
|
6
|
+
var customIcons = {};
|
|
7
|
+
export var registerCustomIconType = function registerCustomIconType(id, customIcon) {
|
|
8
|
+
customIcons[id] = customIcon;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
var getStyledIcon = function getStyledIcon(Component, size) {
|
|
12
|
+
return styled(Component)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n font-size: ", ";\n text-align: center;\n"])), function (_ref) {
|
|
13
|
+
var theme = _ref.theme;
|
|
14
|
+
return theme.iconSize[size];
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export var getIconComponent = function getIconComponent(type, size) {
|
|
19
|
+
switch (type) {
|
|
20
|
+
case 'zocial':
|
|
21
|
+
return getStyledIcon(require('react-native-vector-icons/dist/Zocial')["default"], size);
|
|
22
|
+
|
|
23
|
+
case 'octicon':
|
|
24
|
+
return getStyledIcon(require('react-native-vector-icons/dist/Octicons')["default"], size);
|
|
25
|
+
|
|
26
|
+
case 'material':
|
|
27
|
+
return getStyledIcon(require('react-native-vector-icons/dist/MaterialIcons')["default"], size);
|
|
28
|
+
|
|
29
|
+
case 'material-community':
|
|
30
|
+
return getStyledIcon(require('react-native-vector-icons/dist/MaterialCommunityIcons')["default"], size);
|
|
31
|
+
|
|
32
|
+
case 'ionicon':
|
|
33
|
+
return getStyledIcon(require('react-native-vector-icons/dist/Ionicons')["default"], size);
|
|
34
|
+
|
|
35
|
+
case 'foundation':
|
|
36
|
+
return getStyledIcon(require('react-native-vector-icons/dist/Foundation')["default"], size);
|
|
37
|
+
|
|
38
|
+
case 'evilicon':
|
|
39
|
+
return getStyledIcon(require('react-native-vector-icons/dist/EvilIcons')["default"], size);
|
|
40
|
+
|
|
41
|
+
case 'entypo':
|
|
42
|
+
return getStyledIcon(require('react-native-vector-icons/dist/Entypo')["default"], size);
|
|
43
|
+
|
|
44
|
+
case 'font-awesome':
|
|
45
|
+
return getStyledIcon(require('react-native-vector-icons/dist/FontAwesome')["default"], size);
|
|
46
|
+
|
|
47
|
+
case 'font-awesome-5':
|
|
48
|
+
return getStyledIcon(require('react-native-vector-icons/dist/FontAwesome5')["default"], size);
|
|
49
|
+
|
|
50
|
+
case 'simple-line-icon':
|
|
51
|
+
return getStyledIcon(require('react-native-vector-icons/dist/SimpleLineIcons')["default"], size);
|
|
52
|
+
|
|
53
|
+
case 'feather':
|
|
54
|
+
return getStyledIcon(require('react-native-vector-icons/dist/Feather')["default"], size);
|
|
55
|
+
|
|
56
|
+
case 'antdesign':
|
|
57
|
+
case 'ant-design':
|
|
58
|
+
return getStyledIcon(require('react-native-vector-icons/dist/AntDesign')["default"], size);
|
|
59
|
+
|
|
60
|
+
case 'fontisto':
|
|
61
|
+
return getStyledIcon(require('react-native-vector-icons/dist/Fontisto')["default"], size);
|
|
62
|
+
|
|
63
|
+
default:
|
|
64
|
+
if (Object.prototype.hasOwnProperty.call(customIcons, type)) {
|
|
65
|
+
return getStyledIcon(customIcons[type], size);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return getStyledIcon(require('react-native-vector-icons/dist/MaterialIcons')["default"], size);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
export var getIconColor = function getIconColor(colorVariant, colorGradation, fontColor, theme) {
|
|
72
|
+
if (colorVariant && colorGradation) {
|
|
73
|
+
return theme.color[colorVariant][colorGradation];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return theme.font.color[fontColor];
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.js","names":["styled","customIcons","registerCustomIconType","id","customIcon","getStyledIcon","Component","size","theme","iconSize","getIconComponent","type","require","Object","prototype","hasOwnProperty","call","getIconColor","colorVariant","colorGradation","fontColor","color","font"],"sources":["../../../../src/components/atoms/Icon/helpers.ts"],"sourcesContent":["import {\n ColorGradationType,\n ColorType,\n FontColorType,\n IconSizeType,\n IconType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport styled from '@emotion/native';\n\n/* eslint-disable */\nconst customIcons: any = {};\n\nexport const registerCustomIconType = (id: string, customIcon: any) => {\n customIcons[id] = customIcon;\n};\n\nconst getStyledIcon = (Component, size) => styled(Component)`\n font-size: ${({ theme }) => theme.iconSize[size]};\n text-align: center;\n`;\n\nexport const getIconComponent = (type: IconType, size: IconSizeType): any => {\n switch (type) {\n case 'zocial':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Zocial').default,\n size\n );\n case 'octicon':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Octicons').default,\n size\n );\n case 'material':\n return getStyledIcon(\n require('react-native-vector-icons/dist/MaterialIcons').default,\n size\n );\n case 'material-community':\n return getStyledIcon(\n require('react-native-vector-icons/dist/MaterialCommunityIcons')\n .default,\n size\n );\n case 'ionicon':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Ionicons').default,\n size\n );\n case 'foundation':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Foundation').default,\n size\n );\n case 'evilicon':\n return getStyledIcon(\n require('react-native-vector-icons/dist/EvilIcons').default,\n size\n );\n case 'entypo':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Entypo').default,\n size\n );\n case 'font-awesome':\n return getStyledIcon(\n require('react-native-vector-icons/dist/FontAwesome').default,\n size\n );\n case 'font-awesome-5':\n return getStyledIcon(\n require('react-native-vector-icons/dist/FontAwesome5').default,\n size\n );\n case 'simple-line-icon':\n return getStyledIcon(\n require('react-native-vector-icons/dist/SimpleLineIcons').default,\n size\n );\n case 'feather':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Feather').default,\n size\n );\n case 'antdesign':\n case 'ant-design':\n return getStyledIcon(\n require('react-native-vector-icons/dist/AntDesign').default,\n size\n );\n case 'fontisto':\n return getStyledIcon(\n require('react-native-vector-icons/dist/Fontisto').default,\n size\n );\n default:\n if (Object.prototype.hasOwnProperty.call(customIcons, type)) {\n return getStyledIcon(customIcons[type], size);\n }\n return getStyledIcon(\n require('react-native-vector-icons/dist/MaterialIcons').default,\n size\n );\n }\n};\n/* eslint-enable */\nexport const getIconColor = (\n colorVariant: ColorType | undefined,\n colorGradation: ColorGradationType | undefined,\n fontColor: FontColorType,\n theme: ThemeProp\n): string => {\n if (colorVariant && colorGradation) {\n return theme.color[colorVariant][colorGradation];\n }\n return theme.font.color[fontColor];\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","Icon"],"sources":["../../../../src/components/atoms/Icon/index.ts"],"sourcesContent":["export { default as Icon } from './Icon';\nexport type { IconProps } from './Icon';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,IAApB,QAAgC,QAAhC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { InputVariantType } from '../Input';
|
|
3
|
+
import { TextProps } from '../Text';
|
|
4
|
+
interface HintProps {
|
|
5
|
+
text?: string;
|
|
6
|
+
variant: InputVariantType;
|
|
7
|
+
TextComponent?: FC<TextProps>;
|
|
8
|
+
}
|
|
9
|
+
declare const Hint: FC<HintProps>;
|
|
10
|
+
export default Hint;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text } from '../Text';
|
|
3
|
+
import { StyledHintContainer, StyledHintIcon } from './styled';
|
|
4
|
+
|
|
5
|
+
var Hint = function Hint(_ref) {
|
|
6
|
+
var variant = _ref.variant,
|
|
7
|
+
text = _ref.text,
|
|
8
|
+
_ref$TextComponent = _ref.TextComponent,
|
|
9
|
+
TextComponent = _ref$TextComponent === void 0 ? Text : _ref$TextComponent;
|
|
10
|
+
var color;
|
|
11
|
+
var icon;
|
|
12
|
+
|
|
13
|
+
switch (variant) {
|
|
14
|
+
case 'default':
|
|
15
|
+
color = 'secondary';
|
|
16
|
+
break;
|
|
17
|
+
|
|
18
|
+
case 'error':
|
|
19
|
+
color = 'error';
|
|
20
|
+
icon = 'close-circle-outline';
|
|
21
|
+
break;
|
|
22
|
+
|
|
23
|
+
case 'success':
|
|
24
|
+
color = 'success';
|
|
25
|
+
icon = 'checkmark-circle-outline';
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return React.createElement(StyledHintContainer, null, icon && React.createElement(StyledHintIcon, {
|
|
30
|
+
name: icon,
|
|
31
|
+
type: "ionicon",
|
|
32
|
+
size: "centi",
|
|
33
|
+
colorVariant: color
|
|
34
|
+
}), React.createElement(TextComponent, {
|
|
35
|
+
typography: "label",
|
|
36
|
+
colorVariant: color
|
|
37
|
+
}, text));
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export default Hint;
|
|
41
|
+
//# sourceMappingURL=Hint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Hint.js","names":["React","Text","StyledHintContainer","StyledHintIcon","Hint","variant","text","TextComponent","color","icon"],"sources":["../../../../src/components/atoms/Input/Hint.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { ColorType } from '../../../types/defaults';\nimport { InputVariantType } from '../Input';\nimport { Text, TextProps } from '../Text';\nimport { StyledHintContainer, StyledHintIcon } from './styled';\n\ninterface HintProps {\n text?: string;\n variant: InputVariantType;\n TextComponent?: FC<TextProps>;\n}\n\nconst Hint: FC<HintProps> = ({ variant, text, TextComponent = Text }) => {\n let color: ColorType;\n let icon;\n\n switch (variant) {\n case 'default':\n color = 'secondary';\n break;\n case 'error':\n color = 'error';\n icon = 'close-circle-outline';\n break;\n case 'success':\n color = 'success';\n icon = 'checkmark-circle-outline';\n break;\n }\n\n return (\n <StyledHintContainer>\n {icon && (\n <StyledHintIcon\n name={icon}\n type=\"ionicon\"\n size=\"centi\"\n colorVariant={color}\n />\n )}\n <TextComponent typography=\"label\" colorVariant={color}>\n {text}\n </TextComponent>\n </StyledHintContainer>\n );\n};\n\nexport default Hint;\n"],"mappings":"AAAA,OAAOA,KAAP,MAA0B,OAA1B;AAGA,SAASC,IAAT,QAAgC,SAAhC;AACA,SAASC,mBAAT,EAA8BC,cAA9B,QAAoD,UAApD;;AAQA,IAAMC,IAAmB,GAAG,SAAtBA,IAAsB,OAA6C;EAAA,IAA1CC,OAA0C,QAA1CA,OAA0C;EAAA,IAAjCC,IAAiC,QAAjCA,IAAiC;EAAA,8BAA3BC,aAA2B;EAAA,IAA3BA,aAA2B,mCAAXN,IAAW;EACvE,IAAIO,KAAJ;EACA,IAAIC,IAAJ;;EAEA,QAAQJ,OAAR;IACE,KAAK,SAAL;MACEG,KAAK,GAAG,WAAR;MACA;;IACF,KAAK,OAAL;MACEA,KAAK,GAAG,OAAR;MACAC,IAAI,GAAG,sBAAP;MACA;;IACF,KAAK,SAAL;MACED,KAAK,GAAG,SAAR;MACAC,IAAI,GAAG,0BAAP;MACA;EAXJ;;EAcA,OACE,oBAAC,mBAAD,QACGA,IAAI,IACH,oBAAC,cAAD;IACE,IAAI,EAAEA,IADR;IAEE,IAAI,EAAC,SAFP;IAGE,IAAI,EAAC,OAHP;IAIE,YAAY,EAAED;EAJhB,EAFJ,EASE,oBAAC,aAAD;IAAe,UAAU,EAAC,OAA1B;IAAkC,YAAY,EAAEA;EAAhD,GACGF,IADH,CATF,CADF;AAeD,CAjCD;;AAmCA,eAAeF,IAAf"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
import { InputElementProps } from '..';
|
|
4
|
+
import { ColorGradationType, ColorType, FontColorType, FontStackType, FontWeightType, TypographyVariationType } from '@tecsinapse/react-core';
|
|
5
|
+
import { TextProps } from '../../Text';
|
|
6
|
+
export declare type InputVariantType = 'default' | 'error' | 'success';
|
|
7
|
+
export interface InputContainerProps {
|
|
8
|
+
label?: string;
|
|
9
|
+
labelColor?: FontColorType;
|
|
10
|
+
labelColorVariant?: ColorType;
|
|
11
|
+
labelColorTone?: ColorGradationType;
|
|
12
|
+
labelTypography?: TypographyVariationType;
|
|
13
|
+
labelStack?: FontStackType;
|
|
14
|
+
LabelComponent?: FC<TextProps>;
|
|
15
|
+
labelWeight?: FontWeightType;
|
|
16
|
+
leftComponent?: JSX.Element;
|
|
17
|
+
rightComponent?: JSX.Element;
|
|
18
|
+
borderColor?: ColorType;
|
|
19
|
+
borderColorGradation?: ColorGradationType;
|
|
20
|
+
style?: StyleProp<ViewStyle>;
|
|
21
|
+
inputContainerStyle?: StyleProp<ViewStyle>;
|
|
22
|
+
focused?: boolean;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
variant?: InputVariantType;
|
|
25
|
+
hint?: string;
|
|
26
|
+
hintComponent?: JSX.Element;
|
|
27
|
+
}
|
|
28
|
+
declare const InputContainer: FC<InputContainerProps & Partial<InputElementProps>>;
|
|
29
|
+
export default InputContainer;
|