@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","names":["leftIconStyles","leftComponent","theme","css","spacing","centi","rightIconStyles","rightComponent","disabledContainerStyles","disabled","disabledInputStyles","color","secondary","light","focusedStyles","focused","borderColor","borderWidth","nano","dark","StyledIconContent","styled","View","zIndex","default","StyledInputContainer","RFValueStr","StyledInputElementBase","TextInput","font","stack","typography","base","fontSize","weight","bold","StyledLabelContainer","props","micro","StyledBorderKeeperBase","miscellaneous","surfaceColor","borderColorGradation","borderRadius","mili","pico","StyledBorderKeeper","StyledInputElement","StyledHintContainer","StyledHintIcon","Icon"],"sources":["../../../../src/components/atoms/Input/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { TextInput } from 'react-native';\nimport { InputElementProps } from '.';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils/ResponsiveFontSize';\nimport { Icon } from '../Icon';\nimport { InputContainerProps } from './InputContainer/InputContainer';\n\nconst leftIconStyles = ({\n leftComponent,\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n !leftComponent &&\n css`\n padding-left: ${theme.spacing.centi};\n `;\n\nconst rightIconStyles = ({\n rightComponent,\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n !rightComponent &&\n css`\n padding-right: ${theme.spacing.centi};\n `;\n\nconst disabledContainerStyles = ({\n disabled,\n}: Partial<InputContainerProps> & StyleProps) =>\n disabled &&\n css`\n background-color: transparent;\n `;\n\nexport const disabledInputStyles = ({\n disabled,\n theme,\n}: Partial<InputContainerProps> & Partial<StyleProps>) =>\n disabled &&\n css`\n color: ${theme?.color.secondary.light};\n `;\n\nconst focusedStyles = ({\n focused,\n borderColor = 'secondary',\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n focused &&\n css`\n border-width: ${theme.borderWidth.nano};\n border-color: ${theme.color[borderColor].dark};\n `;\n\nexport const StyledIconContent = styled.View<Partial<StyleProps>>`\n z-index: ${({ theme }) => theme.zIndex.default};\n flex-direction: row;\n align-items: center;\n`;\n\nexport const StyledInputContainer = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>`\n flex-direction: row;\n align-items: center;\n min-height: ${RFValueStr('44px')};\n`;\n\nexport const StyledInputElementBase = styled(TextInput)<\n InputElementProps & Partial<StyleProps>\n>`\n font-family: ${({ theme }) => `'${theme.font.stack.default}'`};\n font-size: ${({ theme }) => theme.typography.base.fontSize};\n font-weight: ${({ theme }) => theme.font.weight.bold};\n color: ${({ theme }) => theme.font.color.dark};\n`;\n\nexport const StyledLabelContainer = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>(\n props => css`\n flex: 1;\n padding: ${props.theme.spacing.micro} 0;\n ${leftIconStyles(props)}\n ${rightIconStyles(props)}\n `\n);\n\nconst StyledBorderKeeperBase = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>`\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n border-color: ${({\n theme,\n borderColor = 'secondary',\n borderColorGradation = 'light',\n }) => theme.color[borderColor][borderColorGradation]};\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n border-width: ${({ theme }) => theme.borderWidth.pico};\n position: absolute;\n width: 100%;\n height: 100%;\n`;\n\nexport const StyledBorderKeeper = styled(StyledBorderKeeperBase)<\n Partial<StyleProps>\n>(\n props => css`\n ${focusedStyles(props)}\n ${disabledContainerStyles(props)}\n `\n);\n\nexport const StyledInputElement = styled(StyledInputElementBase)<\n InputElementProps & Partial<StyleProps>\n>(\n props => css`\n ${disabledInputStyles(props)}\n `\n);\n\nexport const StyledHintContainer = styled.View<Partial<StyleProps>>`\n margin-top: ${({ theme }) => theme.spacing.micro};\n flex-direction: row;\n align-items: center;\n`;\n\nexport const StyledHintIcon = styled(Icon)<Partial<StyleProps>>`\n margin-right: ${({ theme }) => theme.spacing.micro};\n`;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"styled.js","names":["leftIconStyles","leftComponent","theme","css","spacing","centi","rightIconStyles","rightComponent","disabledContainerStyles","disabled","disabledInputStyles","color","secondary","light","focusedStyles","focused","borderColor","borderWidth","nano","dark","StyledIconContent","styled","View","zIndex","default","StyledInputContainer","RFValueStr","StyledInputElementBase","TextInput","font","stack","typography","base","fontSize","weight","bold","StyledLabelContainer","props","micro","StyledBorderKeeperBase","miscellaneous","surfaceColor","borderColorGradation","borderRadius","mili","pico","StyledBorderKeeper","StyledInputElement","StyledHintContainer","StyledHintIcon","Icon"],"sources":["../../../../src/components/atoms/Input/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { TextInput } from 'react-native';\nimport { InputElementProps } from '.';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils/ResponsiveFontSize';\nimport { Icon } from '../Icon';\nimport { InputContainerProps } from './InputContainer/InputContainer';\n\nconst leftIconStyles = ({\n leftComponent,\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n !leftComponent &&\n css`\n padding-left: ${theme.spacing.centi};\n `;\n\nconst rightIconStyles = ({\n rightComponent,\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n !rightComponent &&\n css`\n padding-right: ${theme.spacing.centi};\n `;\n\nconst disabledContainerStyles = ({\n disabled,\n}: Partial<InputContainerProps> & StyleProps) =>\n disabled &&\n css`\n background-color: transparent;\n `;\n\nexport const disabledInputStyles = ({\n disabled,\n theme,\n}: Partial<InputContainerProps> & Partial<StyleProps>) =>\n disabled &&\n css`\n color: ${theme?.color.secondary.light};\n `;\n\nconst focusedStyles = ({\n focused,\n borderColor = 'secondary',\n theme,\n}: Partial<InputContainerProps> & StyleProps) =>\n focused &&\n css`\n border-width: ${theme.borderWidth.nano};\n border-color: ${theme.color[borderColor].dark};\n `;\n\nexport const StyledIconContent = styled.View<Partial<StyleProps>>`\n z-index: ${({ theme }) => theme.zIndex.default};\n flex-direction: row;\n align-items: center;\n`;\n\nexport const StyledInputContainer = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>`\n flex-direction: row;\n align-items: center;\n min-height: ${RFValueStr('44px')};\n`;\n\nexport const StyledInputElementBase = styled(TextInput)<\n InputElementProps & Partial<StyleProps>\n>`\n font-family: ${({ theme }) => `'${theme.font.stack.default}'`};\n font-size: ${({ theme }) => theme.typography.base.fontSize};\n font-weight: ${({ theme }) => theme.font.weight.bold};\n color: ${({ theme }) => theme.font.color.dark};\n`;\n\nexport const StyledLabelContainer = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>(\n props => css`\n flex: 1;\n padding: ${props.theme.spacing.micro} 0;\n ${leftIconStyles(props)}\n ${rightIconStyles(props)}\n `\n);\n\nconst StyledBorderKeeperBase = styled.View<\n Partial<InputContainerProps> & Partial<StyleProps>\n>`\n background-color: ${({ theme }) => theme.miscellaneous.surfaceColor};\n border-color: ${({\n theme,\n borderColor = 'secondary',\n borderColorGradation = 'light',\n }) => theme.color[borderColor][borderColorGradation]};\n border-radius: ${({ theme }) => theme.borderRadius.mili};\n border-width: ${({ theme }) => theme.borderWidth.pico};\n position: absolute;\n width: 100%;\n height: 100%;\n`;\n\nexport const StyledBorderKeeper = styled(StyledBorderKeeperBase)<\n Partial<StyleProps>\n>(\n props => css`\n ${focusedStyles(props)}\n ${disabledContainerStyles(props)}\n `\n);\n\nexport const StyledInputElement = styled(StyledInputElementBase)<\n InputElementProps & Partial<StyleProps>\n>(\n props => css`\n ${disabledInputStyles(props)}\n `\n);\n\nexport const StyledHintContainer = styled.View<Partial<StyleProps>>`\n margin-top: ${({ theme }) => theme.spacing.micro};\n flex-direction: row;\n align-items: center;\n`;\n\nexport const StyledHintIcon = styled(Icon)<Partial<StyleProps>>`\n margin-right: ${({ theme }) => theme.spacing.micro};\n`;\n"],"mappings":"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"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -11,13 +13,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
11
13
|
|
|
12
14
|
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); }
|
|
13
15
|
|
|
14
|
-
const Paper =
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
16
|
+
const Paper = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
children,
|
|
19
|
+
elevated = false,
|
|
20
|
+
...rest
|
|
21
|
+
} = _ref;
|
|
22
|
+
return _react.default.createElement(_styled.StyledPaper, _extends({}, rest, {
|
|
23
|
+
elevated: elevated
|
|
24
|
+
}), children);
|
|
25
|
+
};
|
|
21
26
|
|
|
22
27
|
var _default = Paper;
|
|
23
28
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Paper.js","names":["Paper","children","elevated","rest"],"sources":["../../../../src/components/atoms/Paper/Paper.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport { StyledPaper } from './styled';\n\nexport interface PaperProps {\n /** Creates elevation shadow */\n elevated?: boolean;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Paper: FC<PaperProps> = ({\n children,\n elevated = false,\n ...rest\n}): JSX.Element => (\n <StyledPaper {...rest} elevated={elevated}>\n {children}\n </StyledPaper>\n);\n\nexport default Paper;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Paper.js","names":["Paper","children","elevated","rest"],"sources":["../../../../src/components/atoms/Paper/Paper.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { StyleProp, ViewStyle } from 'react-native';\nimport { StyledPaper } from './styled';\n\nexport interface PaperProps {\n /** Creates elevation shadow */\n elevated?: boolean;\n style?: StyleProp<ViewStyle>;\n}\n\nconst Paper: FC<PaperProps> = ({\n children,\n elevated = false,\n ...rest\n}): JSX.Element => (\n <StyledPaper {...rest} elevated={elevated}>\n {children}\n </StyledPaper>\n);\n\nexport default Paper;\n"],"mappings":";;;;;;;AAAA;;AAEA;;;;;;AAQA,MAAMA,KAAqB,GAAG;EAAA,IAAC;IAC7BC,QAD6B;IAE7BC,QAAQ,GAAG,KAFkB;IAG7B,GAAGC;EAH0B,CAAD;EAAA,OAK5B,6BAAC,mBAAD,eAAiBA,IAAjB;IAAuB,QAAQ,EAAED;EAAjC,IACGD,QADH,CAL4B;AAAA,CAA9B;;eAUeD,K"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default as Paper
|
|
1
|
+
export { default as Paper } from './Paper';
|
|
2
|
+
export type { PaperProps } from './Paper';
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "Paper", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _Paper.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
5
12
|
|
|
6
|
-
var _Paper =
|
|
13
|
+
var _Paper = _interopRequireDefault(require("./Paper"));
|
|
7
14
|
|
|
8
|
-
|
|
9
|
-
exports.PaperProps = _Paper.PaperProps;
|
|
10
|
-
|
|
11
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
-
|
|
13
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Paper/index.ts"],"sourcesContent":["export { default as Paper
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/Paper/index.ts"],"sourcesContent":["export { default as Paper } from './Paper';\nexport type { PaperProps } from './Paper';\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.StyledPaper = void 0;
|
|
5
7
|
|
|
6
8
|
var _reactNative = require("react-native");
|
|
@@ -9,13 +11,14 @@ var _native = _interopRequireWildcard(require("@emotion/native"));
|
|
|
9
11
|
|
|
10
12
|
var _PaperAndCard = require("../shared/PaperAndCard");
|
|
11
13
|
|
|
14
|
+
var _templateObject;
|
|
15
|
+
|
|
12
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
17
|
|
|
14
18
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
`);
|
|
20
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
21
|
+
|
|
22
|
+
const StyledPaper = (0, _native.default)(_reactNative.Animated.View)(props => (0, _native.css)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n "])), (0, _PaperAndCard.baseStyles)(props), (0, _PaperAndCard.elevatedStyles)(props)));
|
|
20
23
|
exports.StyledPaper = StyledPaper;
|
|
21
24
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","names":["StyledPaper","styled","Animated","View","props","css","baseStyles","elevatedStyles"],"sources":["../../../../src/components/atoms/Paper/styled.ts"],"sourcesContent":["import { Animated } from 'react-native';\nimport styled, { css } from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { PaperProps } from './Paper';\nimport { baseStyles, elevatedStyles } from '../shared/PaperAndCard';\n\nexport const StyledPaper = styled(Animated.View)<\n PaperProps & Partial<StyleProps>\n>(\n props => css`\n ${baseStyles(props)}\n ${elevatedStyles(props)}\n `\n);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"styled.js","names":["StyledPaper","styled","Animated","View","props","css","baseStyles","elevatedStyles"],"sources":["../../../../src/components/atoms/Paper/styled.ts"],"sourcesContent":["import { Animated } from 'react-native';\nimport styled, { css } from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\nimport { PaperProps } from './Paper';\nimport { baseStyles, elevatedStyles } from '../shared/PaperAndCard';\n\nexport const StyledPaper = styled(Animated.View)<\n PaperProps & Partial<StyleProps>\n>(\n props => css`\n ${baseStyles(props)}\n ${elevatedStyles(props)}\n `\n);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAGA;;;;;;;;;;AAEO,MAAMA,WAAW,GAAG,IAAAC,eAAA,EAAOC,qBAAA,CAASC,IAAhB,EAGzBC,KAAK,QAAIC,WAAJ,+FACD,IAAAC,wBAAA,EAAWF,KAAX,CADC,EAED,IAAAG,4BAAA,EAAeH,KAAf,CAFC,CAHoB,CAApB"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var _react = require("@emotion/react");
|
|
@@ -17,15 +19,16 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
17
19
|
|
|
18
20
|
const COLOR_VARIATION_FACTOR = 25;
|
|
19
21
|
|
|
20
|
-
const PressableSurface =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
const PressableSurface = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
children,
|
|
25
|
+
surfaceColor,
|
|
26
|
+
effect,
|
|
27
|
+
effectIntensity,
|
|
28
|
+
effectStyle,
|
|
29
|
+
style,
|
|
30
|
+
...rest
|
|
31
|
+
} = _ref;
|
|
29
32
|
const theme = (0, _react.useTheme)();
|
|
30
33
|
let effectBaseColor = theme.miscellaneous.surfaceColor;
|
|
31
34
|
let bgColor = 'transparent';
|
|
@@ -60,9 +63,12 @@ const prepareStyle = (props, effectColor, bgColor) => {
|
|
|
60
63
|
}, style];
|
|
61
64
|
|
|
62
65
|
if (effectStyle) {
|
|
63
|
-
return
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
return _ref2 => {
|
|
67
|
+
let {
|
|
68
|
+
pressed
|
|
69
|
+
} = _ref2;
|
|
70
|
+
return [composedStyle, effectStyle(pressed)];
|
|
71
|
+
};
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
switch (effect) {
|
|
@@ -78,11 +84,14 @@ const prepareStyle = (props, effectColor, bgColor) => {
|
|
|
78
84
|
};
|
|
79
85
|
|
|
80
86
|
const applyEffectStyle = (style, variation) => {
|
|
81
|
-
return
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
return _ref3 => {
|
|
88
|
+
let {
|
|
89
|
+
pressed
|
|
90
|
+
} = _ref3;
|
|
91
|
+
return [style, pressed && {
|
|
92
|
+
backgroundColor: variation
|
|
93
|
+
}];
|
|
94
|
+
};
|
|
86
95
|
};
|
|
87
96
|
|
|
88
97
|
var _default = PressableSurface;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PressableSurface.js","names":["COLOR_VARIATION_FACTOR","PressableSurface","children","surfaceColor","effect","effectIntensity","effectStyle","style","rest","theme","useTheme","effectBaseColor","miscellaneous","bgColor","readyStyle","prepareStyle","props","effectColor","lighten","lightenDarkenColor","darken","composedStyle","backgroundColor","pressed","applyEffectStyle","variation"],"sources":["../../../../src/components/atoms/PressableSurface/PressableSurface.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport React, { FC } from 'react';\nimport { Pressable, PressableProps, StyleProp, ViewStyle } from 'react-native';\nimport { ThemeProp } from '../../../types/defaults';\nimport { lightenDarkenColor } from '../../../utils';\n\nconst COLOR_VARIATION_FACTOR = 25;\n\nexport interface PressableSurfaceProps extends PressableProps {\n effect?: 'darken' | 'lighten' | 'none';\n surfaceColor?: string;\n effectIntensity?: number;\n effectStyle?: (pressed: boolean) => StyleProp<ViewStyle>;\n}\n\nconst PressableSurface: FC<PressableSurfaceProps> = ({\n children,\n surfaceColor,\n effect,\n effectIntensity,\n effectStyle,\n style,\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n let effectBaseColor = theme.miscellaneous.surfaceColor;\n let bgColor = 'transparent';\n\n if (surfaceColor) {\n effectBaseColor = surfaceColor;\n bgColor = effectBaseColor;\n }\n\n const readyStyle = prepareStyle(\n { effect, effectIntensity, style, effectStyle },\n effectBaseColor,\n bgColor\n );\n return (\n <Pressable {...rest} style={readyStyle}>\n {children}\n </Pressable>\n );\n};\n\nconst prepareStyle = (\n props: PressableSurfaceProps,\n effectColor: string,\n bgColor: string\n): any => {\n const {\n effect = 'darken',\n effectIntensity = COLOR_VARIATION_FACTOR,\n style,\n effectStyle,\n } = props;\n\n const lighten = lightenDarkenColor(effectColor, effectIntensity);\n const darken = lightenDarkenColor(effectColor, -effectIntensity);\n const composedStyle = [{ backgroundColor: bgColor }, style];\n\n if (effectStyle) {\n return ({ pressed }) => [composedStyle, effectStyle(pressed)];\n }\n\n switch (effect) {\n case 'darken':\n return applyEffectStyle(composedStyle, darken);\n\n case 'lighten':\n return applyEffectStyle(composedStyle, lighten);\n\n case 'none':\n return composedStyle;\n }\n};\n\nconst applyEffectStyle = (style: any, variation: string) => {\n return ({ pressed }) => [style, pressed && { backgroundColor: variation }];\n};\n\nexport default PressableSurface;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PressableSurface.js","names":["COLOR_VARIATION_FACTOR","PressableSurface","children","surfaceColor","effect","effectIntensity","effectStyle","style","rest","theme","useTheme","effectBaseColor","miscellaneous","bgColor","readyStyle","prepareStyle","props","effectColor","lighten","lightenDarkenColor","darken","composedStyle","backgroundColor","pressed","applyEffectStyle","variation"],"sources":["../../../../src/components/atoms/PressableSurface/PressableSurface.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport React, { FC } from 'react';\nimport { Pressable, PressableProps, StyleProp, ViewStyle } from 'react-native';\nimport { ThemeProp } from '../../../types/defaults';\nimport { lightenDarkenColor } from '../../../utils';\n\nconst COLOR_VARIATION_FACTOR = 25;\n\nexport interface PressableSurfaceProps extends PressableProps {\n effect?: 'darken' | 'lighten' | 'none';\n surfaceColor?: string;\n effectIntensity?: number;\n effectStyle?: (pressed: boolean) => StyleProp<ViewStyle>;\n}\n\nconst PressableSurface: FC<PressableSurfaceProps> = ({\n children,\n surfaceColor,\n effect,\n effectIntensity,\n effectStyle,\n style,\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n let effectBaseColor = theme.miscellaneous.surfaceColor;\n let bgColor = 'transparent';\n\n if (surfaceColor) {\n effectBaseColor = surfaceColor;\n bgColor = effectBaseColor;\n }\n\n const readyStyle = prepareStyle(\n { effect, effectIntensity, style, effectStyle },\n effectBaseColor,\n bgColor\n );\n return (\n <Pressable {...rest} style={readyStyle}>\n {children}\n </Pressable>\n );\n};\n\nconst prepareStyle = (\n props: PressableSurfaceProps,\n effectColor: string,\n bgColor: string\n): any => {\n const {\n effect = 'darken',\n effectIntensity = COLOR_VARIATION_FACTOR,\n style,\n effectStyle,\n } = props;\n\n const lighten = lightenDarkenColor(effectColor, effectIntensity);\n const darken = lightenDarkenColor(effectColor, -effectIntensity);\n const composedStyle = [{ backgroundColor: bgColor }, style];\n\n if (effectStyle) {\n return ({ pressed }) => [composedStyle, effectStyle(pressed)];\n }\n\n switch (effect) {\n case 'darken':\n return applyEffectStyle(composedStyle, darken);\n\n case 'lighten':\n return applyEffectStyle(composedStyle, lighten);\n\n case 'none':\n return composedStyle;\n }\n};\n\nconst applyEffectStyle = (style: any, variation: string) => {\n return ({ pressed }) => [style, pressed && { backgroundColor: variation }];\n};\n\nexport default PressableSurface;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;;;AAEA,MAAMA,sBAAsB,GAAG,EAA/B;;AASA,MAAMC,gBAA2C,GAAG,QAQ9C;EAAA,IAR+C;IACnDC,QADmD;IAEnDC,YAFmD;IAGnDC,MAHmD;IAInDC,eAJmD;IAKnDC,WALmD;IAMnDC,KANmD;IAOnD,GAAGC;EAPgD,CAQ/C;EACJ,MAAMC,KAAK,GAAG,IAAAC,eAAA,GAAd;EACA,IAAIC,eAAe,GAAGF,KAAK,CAACG,aAAN,CAAoBT,YAA1C;EACA,IAAIU,OAAO,GAAG,aAAd;;EAEA,IAAIV,YAAJ,EAAkB;IAChBQ,eAAe,GAAGR,YAAlB;IACAU,OAAO,GAAGF,eAAV;EACD;;EAED,MAAMG,UAAU,GAAGC,YAAY,CAC7B;IAAEX,MAAF;IAAUC,eAAV;IAA2BE,KAA3B;IAAkCD;EAAlC,CAD6B,EAE7BK,eAF6B,EAG7BE,OAH6B,CAA/B;EAKA,OACE,8BAAC,sBAAD,eAAeL,IAAf;IAAqB,KAAK,EAAEM;EAA5B,IACGZ,QADH,CADF;AAKD,CA5BD;;AA8BA,MAAMa,YAAY,GAAG,CACnBC,KADmB,EAEnBC,WAFmB,EAGnBJ,OAHmB,KAIX;EACR,MAAM;IACJT,MAAM,GAAG,QADL;IAEJC,eAAe,GAAGL,sBAFd;IAGJO,KAHI;IAIJD;EAJI,IAKFU,KALJ;EAOA,MAAME,OAAO,GAAG,IAAAC,yBAAA,EAAmBF,WAAnB,EAAgCZ,eAAhC,CAAhB;EACA,MAAMe,MAAM,GAAG,IAAAD,yBAAA,EAAmBF,WAAnB,EAAgC,CAACZ,eAAjC,CAAf;EACA,MAAMgB,aAAa,GAAG,CAAC;IAAEC,eAAe,EAAET;EAAnB,CAAD,EAA+BN,KAA/B,CAAtB;;EAEA,IAAID,WAAJ,EAAiB;IACf,OAAO;MAAA,IAAC;QAAEiB;MAAF,CAAD;MAAA,OAAiB,CAACF,aAAD,EAAgBf,WAAW,CAACiB,OAAD,CAA3B,CAAjB;IAAA,CAAP;EACD;;EAED,QAAQnB,MAAR;IACE,KAAK,QAAL;MACE,OAAOoB,gBAAgB,CAACH,aAAD,EAAgBD,MAAhB,CAAvB;;IAEF,KAAK,SAAL;MACE,OAAOI,gBAAgB,CAACH,aAAD,EAAgBH,OAAhB,CAAvB;;IAEF,KAAK,MAAL;MACE,OAAOG,aAAP;EARJ;AAUD,CA9BD;;AAgCA,MAAMG,gBAAgB,GAAG,CAACjB,KAAD,EAAakB,SAAb,KAAmC;EAC1D,OAAO;IAAA,IAAC;MAAEF;IAAF,CAAD;IAAA,OAAiB,CAAChB,KAAD,EAAQgB,OAAO,IAAI;MAAED,eAAe,EAAEG;IAAnB,CAAnB,CAAjB;EAAA,CAAP;AACD,CAFD;;eAIexB,gB"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default as PressableSurface
|
|
1
|
+
export { default as PressableSurface } from './PressableSurface';
|
|
2
|
+
export type { PressableSurfaceProps } from './PressableSurface';
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "PressableSurface", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _PressableSurface.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
5
12
|
|
|
6
|
-
var _PressableSurface =
|
|
13
|
+
var _PressableSurface = _interopRequireDefault(require("./PressableSurface"));
|
|
7
14
|
|
|
8
|
-
|
|
9
|
-
exports.PressableSurfaceProps = _PressableSurface.PressableSurfaceProps;
|
|
10
|
-
|
|
11
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
-
|
|
13
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/PressableSurface/index.ts"],"sourcesContent":["export {
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/PressableSurface/index.ts"],"sourcesContent":["export { default as PressableSurface } from './PressableSurface';\nexport type { PressableSurfaceProps } from './PressableSurface';\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var _react = require("@emotion/react");
|
|
@@ -17,17 +19,18 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
19
|
|
|
18
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
19
21
|
|
|
20
|
-
const ProgressBar =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
const ProgressBar = _ref => {
|
|
23
|
+
let {
|
|
24
|
+
segments: _segments = 1,
|
|
25
|
+
valueMin = 0,
|
|
26
|
+
valueNow: _valueNow,
|
|
27
|
+
valueMax = 100,
|
|
28
|
+
color = 'primary',
|
|
29
|
+
colorTone = 'medium',
|
|
30
|
+
animate,
|
|
31
|
+
animationParameters,
|
|
32
|
+
...rest
|
|
33
|
+
} = _ref;
|
|
31
34
|
const theme = (0, _react.useTheme)();
|
|
32
35
|
const animationValue = React.useRef(new _reactNative.Animated.Value(0)).current;
|
|
33
36
|
const valueNow = typeof _valueNow === 'string' ? (0, _utils.extractNumbersFromString)(_valueNow) : _valueNow;
|
|
@@ -40,9 +43,11 @@ const ProgressBar = ({
|
|
|
40
43
|
const min = segmentWidth * index;
|
|
41
44
|
const minmax = (totalProgress - min) / (max - min);
|
|
42
45
|
const width = (minmax > 1 ? 1 : minmax < 0 ? 0 : minmax) * 100;
|
|
43
|
-
let progressPercent =
|
|
46
|
+
let progressPercent = "".concat(width, "%");
|
|
44
47
|
|
|
45
48
|
if (animate && animationParameters) {
|
|
49
|
+
var _animationValue$inter;
|
|
50
|
+
|
|
46
51
|
_reactNative.Animated.timing(animationValue, {
|
|
47
52
|
toValue: 1,
|
|
48
53
|
duration: animationParameters.duration / items.length,
|
|
@@ -50,8 +55,8 @@ const ProgressBar = ({
|
|
|
50
55
|
delay: animationParameters.direction === 'right' ? index * (animationParameters.duration / items.length) : (items.length - index - 1) * (animationParameters.duration / items.length)
|
|
51
56
|
}).start();
|
|
52
57
|
|
|
53
|
-
const rangeAnimation = (animationParameters
|
|
54
|
-
progressPercent = animationValue.interpolate
|
|
58
|
+
const rangeAnimation = (animationParameters === null || animationParameters === void 0 ? void 0 : animationParameters.direction) === 'right' ? ["".concat(valueMin < 0 ? 0 : valueMin, "%"), "".concat(width, "%")] : ["".concat(valueMax, "%"), "".concat(width, "%")];
|
|
59
|
+
progressPercent = (_animationValue$inter = animationValue.interpolate) === null || _animationValue$inter === void 0 ? void 0 : _animationValue$inter.call(animationValue, {
|
|
55
60
|
inputRange: [0, 1],
|
|
56
61
|
outputRange: rangeAnimation
|
|
57
62
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","names":["ProgressBar","segments","_segments","valueMin","valueNow","_valueNow","valueMax","color","colorTone","animate","animationParameters","rest","theme","useTheme","animationValue","React","useRef","Animated","Value","current","extractNumbersFromString","totalProgress","Math","max","segmentWidth","items","Array","keys","segmentsRender","map","index","min","minmax","width","progressPercent","timing","toValue","duration","length","useNativeDriver","delay","direction","start","rangeAnimation","interpolate","inputRange","outputRange","borderRightWidth","backgroundColor"],"sources":["../../../../src/components/atoms/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport * as React from 'react';\nimport { Animated, ViewProps } from 'react-native';\nimport {\n ColorGradationType,\n ColorType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { extractNumbersFromString } from '../../../utils';\nimport { Container, Progress, Segment } from './styled';\n\nexport interface ProgressBarProps extends ViewProps {\n /** Number of segments. Defaults to 1. Set to 1 when 0 or less */\n segments?: number;\n /** Minimum possible value (0% of the bar). Defaults to 0 */\n valueMin?: number;\n /** Maximum possible value (100% of the bar). Defaults to 100 */\n valueMax?: number;\n /** Current value */\n valueNow: number | string;\n /** Filled partition color. Defaults to 'primary' */\n color?: ColorType;\n /** Filled partition color tone. Defaults to 'medium' */\n colorTone?: ColorGradationType;\n /** Animation */\n animate: boolean;\n /** Parameters animation */\n animationParameters?: { direction: 'left' | 'right'; duration: number };\n}\n\nconst ProgressBar: React.FC<ProgressBarProps> = ({\n segments: _segments = 1,\n valueMin = 0,\n valueNow: _valueNow,\n valueMax = 100,\n color = 'primary',\n colorTone = 'medium',\n animate,\n animationParameters,\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n const animationValue = React.useRef(new Animated.Value(0)).current;\n\n const valueNow =\n typeof _valueNow === 'string'\n ? extractNumbersFromString(_valueNow)\n : _valueNow;\n\n const totalProgress = ((valueNow - valueMin) / (valueMax - valueMin)) * 100;\n const segments = Math.max(1, _segments);\n const segmentWidth = 100 / Math.max(segments);\n\n const items = [...Array(segments).keys()];\n\n const segmentsRender = items.map(index => {\n const max = segmentWidth * (index + 1);\n const min = segmentWidth * index;\n const minmax = (totalProgress - min) / (max - min);\n const width = (minmax > 1 ? 1 : minmax < 0 ? 0 : minmax) * 100;\n\n let progressPercent: string | Animated.AnimatedInterpolation = `${width}%`;\n\n if (animate && animationParameters) {\n Animated.timing(animationValue, {\n toValue: 1,\n duration: animationParameters.duration / items.length,\n useNativeDriver: false,\n delay:\n animationParameters.direction === 'right'\n ? index * (animationParameters.duration / items.length)\n : (items.length - index - 1) *\n (animationParameters.duration / items.length),\n }).start();\n\n const rangeAnimation =\n animationParameters?.direction === 'right'\n ? [`${valueMin < 0 ? 0 : valueMin}%`, `${width}%`]\n : [`${valueMax}%`, `${width}%`];\n\n progressPercent = animationValue.interpolate?.({\n inputRange: [0, 1],\n outputRange: rangeAnimation,\n });\n }\n\n return (\n <Segment\n key={index}\n style={{\n borderRightWidth: index == segments - 1 ? 0 : 2,\n }}\n >\n <Progress\n style={{\n width: progressPercent,\n backgroundColor: theme.color[color][colorTone],\n borderRightWidth: width > 0 && width < 100 ? 2 : 0,\n }}\n />\n </Segment>\n );\n });\n\n return <Container {...rest}>{segmentsRender}</Container>;\n};\n\nexport default ProgressBar;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","names":["ProgressBar","segments","_segments","valueMin","valueNow","_valueNow","valueMax","color","colorTone","animate","animationParameters","rest","theme","useTheme","animationValue","React","useRef","Animated","Value","current","extractNumbersFromString","totalProgress","Math","max","segmentWidth","items","Array","keys","segmentsRender","map","index","min","minmax","width","progressPercent","timing","toValue","duration","length","useNativeDriver","delay","direction","start","rangeAnimation","interpolate","inputRange","outputRange","borderRightWidth","backgroundColor"],"sources":["../../../../src/components/atoms/ProgressBar/ProgressBar.tsx"],"sourcesContent":["import { useTheme } from '@emotion/react';\nimport * as React from 'react';\nimport { Animated, ViewProps } from 'react-native';\nimport {\n ColorGradationType,\n ColorType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { extractNumbersFromString } from '../../../utils';\nimport { Container, Progress, Segment } from './styled';\n\nexport interface ProgressBarProps extends ViewProps {\n /** Number of segments. Defaults to 1. Set to 1 when 0 or less */\n segments?: number;\n /** Minimum possible value (0% of the bar). Defaults to 0 */\n valueMin?: number;\n /** Maximum possible value (100% of the bar). Defaults to 100 */\n valueMax?: number;\n /** Current value */\n valueNow: number | string;\n /** Filled partition color. Defaults to 'primary' */\n color?: ColorType;\n /** Filled partition color tone. Defaults to 'medium' */\n colorTone?: ColorGradationType;\n /** Animation */\n animate: boolean;\n /** Parameters animation */\n animationParameters?: { direction: 'left' | 'right'; duration: number };\n}\n\nconst ProgressBar: React.FC<ProgressBarProps> = ({\n segments: _segments = 1,\n valueMin = 0,\n valueNow: _valueNow,\n valueMax = 100,\n color = 'primary',\n colorTone = 'medium',\n animate,\n animationParameters,\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n const animationValue = React.useRef(new Animated.Value(0)).current;\n\n const valueNow =\n typeof _valueNow === 'string'\n ? extractNumbersFromString(_valueNow)\n : _valueNow;\n\n const totalProgress = ((valueNow - valueMin) / (valueMax - valueMin)) * 100;\n const segments = Math.max(1, _segments);\n const segmentWidth = 100 / Math.max(segments);\n\n const items = [...Array(segments).keys()];\n\n const segmentsRender = items.map(index => {\n const max = segmentWidth * (index + 1);\n const min = segmentWidth * index;\n const minmax = (totalProgress - min) / (max - min);\n const width = (minmax > 1 ? 1 : minmax < 0 ? 0 : minmax) * 100;\n\n let progressPercent: string | Animated.AnimatedInterpolation = `${width}%`;\n\n if (animate && animationParameters) {\n Animated.timing(animationValue, {\n toValue: 1,\n duration: animationParameters.duration / items.length,\n useNativeDriver: false,\n delay:\n animationParameters.direction === 'right'\n ? index * (animationParameters.duration / items.length)\n : (items.length - index - 1) *\n (animationParameters.duration / items.length),\n }).start();\n\n const rangeAnimation =\n animationParameters?.direction === 'right'\n ? [`${valueMin < 0 ? 0 : valueMin}%`, `${width}%`]\n : [`${valueMax}%`, `${width}%`];\n\n progressPercent = animationValue.interpolate?.({\n inputRange: [0, 1],\n outputRange: rangeAnimation,\n });\n }\n\n return (\n <Segment\n key={index}\n style={{\n borderRightWidth: index == segments - 1 ? 0 : 2,\n }}\n >\n <Progress\n style={{\n width: progressPercent,\n backgroundColor: theme.color[color][colorTone],\n borderRightWidth: width > 0 && width < 100 ? 2 : 0,\n }}\n />\n </Segment>\n );\n });\n\n return <Container {...rest}>{segmentsRender}</Container>;\n};\n\nexport default ProgressBar;\n"],"mappings":"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"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default as ProgressBar
|
|
1
|
+
export { default as ProgressBar } from './ProgressBar';
|
|
2
|
+
export type { ProgressBarProps } from './ProgressBar';
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
4
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "ProgressBar", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _ProgressBar.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
5
12
|
|
|
6
|
-
var _ProgressBar =
|
|
13
|
+
var _ProgressBar = _interopRequireDefault(require("./ProgressBar"));
|
|
7
14
|
|
|
8
|
-
|
|
9
|
-
exports.ProgressBarProps = _ProgressBar.ProgressBarProps;
|
|
10
|
-
|
|
11
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
-
|
|
13
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/ProgressBar/index.ts"],"sourcesContent":["export { default as ProgressBar
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../../src/components/atoms/ProgressBar/index.ts"],"sourcesContent":["export { default as ProgressBar } from './ProgressBar';\nexport type { ProgressBarProps } from './ProgressBar';\n"],"mappings":";;;;;;;;;;;;AAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.Segment = exports.Progress = exports.Container = void 0;
|
|
5
7
|
|
|
6
8
|
var _native = _interopRequireDefault(require("@emotion/native"));
|
|
@@ -9,37 +11,44 @@ var _reactNative = require("react-native");
|
|
|
9
11
|
|
|
10
12
|
var _utils = require("../../../utils");
|
|
11
13
|
|
|
14
|
+
var _templateObject, _templateObject2, _templateObject3;
|
|
15
|
+
|
|
12
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
height:
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
theme
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
19
|
+
|
|
20
|
+
const Container = _native.default.View(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n height: ", ";\n border-radius: ", ";\n width: 100%;\n flex-direction: row;\n overflow: hidden;\n"])), _ref => {
|
|
21
|
+
let {
|
|
22
|
+
theme
|
|
23
|
+
} = _ref;
|
|
24
|
+
return theme.spacing.mili;
|
|
25
|
+
}, _ref2 => {
|
|
26
|
+
let {
|
|
27
|
+
theme
|
|
28
|
+
} = _ref2;
|
|
29
|
+
return theme.spacing.mili;
|
|
30
|
+
});
|
|
31
|
+
|
|
26
32
|
exports.Container = Container;
|
|
27
|
-
|
|
28
|
-
flex: 1
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
|
|
34
|
+
const Segment = _native.default.View(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n flex: 1;\n background-color: ", ";\n border-right-width: ", ";\n border-color: ", ";\n"])), _ref3 => {
|
|
35
|
+
let {
|
|
36
|
+
theme
|
|
37
|
+
} = _ref3;
|
|
38
|
+
return theme.color.secondary.light;
|
|
39
|
+
}, (0, _utils.RFValueStr)('2px'), _ref4 => {
|
|
40
|
+
let {
|
|
41
|
+
theme
|
|
42
|
+
} = _ref4;
|
|
43
|
+
return theme.color.secondary.xlight;
|
|
44
|
+
});
|
|
45
|
+
|
|
37
46
|
exports.Segment = Segment;
|
|
38
|
-
const Progress = (0, _native.default)(_reactNative.Animated.View)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
const Progress = (0, _native.default)(_reactNative.Animated.View)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n height: 100%;\n border-color: ", ";\n"])), _ref5 => {
|
|
48
|
+
let {
|
|
49
|
+
theme
|
|
50
|
+
} = _ref5;
|
|
51
|
+
return theme.color.secondary.xlight;
|
|
52
|
+
});
|
|
44
53
|
exports.Progress = Progress;
|
|
45
54
|
//# sourceMappingURL=styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled.js","names":["Container","styled","View","theme","spacing","mili","Segment","color","secondary","light","RFValueStr","xlight","Progress","Animated"],"sources":["../../../../src/components/atoms/ProgressBar/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { Animated } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils';\n\nexport const Container = styled.View<Partial<StyleProps>>`\n display: flex;\n height: ${({ theme }) => theme.spacing.mili};\n border-radius: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n flex-direction: row;\n overflow: hidden;\n`;\n\nexport const Segment = styled.View<Partial<StyleProps>>`\n flex: 1;\n background-color: ${({ theme }) => theme.color.secondary.light};\n border-right-width: ${RFValueStr('2px')};\n border-color: ${({ theme }) => theme.color.secondary.xlight};\n`;\n\nexport const Progress = styled(Animated.View)<Partial<StyleProps>>`\n height: 100%;\n border-color: ${({ theme }) => theme.color.secondary.xlight};\n`;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"styled.js","names":["Container","styled","View","theme","spacing","mili","Segment","color","secondary","light","RFValueStr","xlight","Progress","Animated"],"sources":["../../../../src/components/atoms/ProgressBar/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { Animated } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { RFValueStr } from '../../../utils';\n\nexport const Container = styled.View<Partial<StyleProps>>`\n display: flex;\n height: ${({ theme }) => theme.spacing.mili};\n border-radius: ${({ theme }) => theme.spacing.mili};\n width: 100%;\n flex-direction: row;\n overflow: hidden;\n`;\n\nexport const Segment = styled.View<Partial<StyleProps>>`\n flex: 1;\n background-color: ${({ theme }) => theme.color.secondary.light};\n border-right-width: ${RFValueStr('2px')};\n border-color: ${({ theme }) => theme.color.secondary.xlight};\n`;\n\nexport const Progress = styled(Animated.View)<Partial<StyleProps>>`\n height: 100%;\n border-color: ${({ theme }) => theme.color.secondary.xlight};\n`;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;;;;;;;AAEO,MAAMA,SAAS,GAAGC,eAAA,CAAOC,IAAV,gMAEV;EAAA,IAAC;IAAEC;EAAF,CAAD;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CAFU,EAGH;EAAA,IAAC;IAAEF;EAAF,CAAD;EAAA,OAAeA,KAAK,CAACC,OAAN,CAAcC,IAA7B;AAAA,CAHG,CAAf;;;;AASA,MAAMC,OAAO,GAAGL,eAAA,CAAOC,IAAV,qKAEE;EAAA,IAAC;IAAEC;EAAF,CAAD;EAAA,OAAeA,KAAK,CAACI,KAAN,CAAYC,SAAZ,CAAsBC,KAArC;AAAA,CAFF,EAGI,IAAAC,iBAAA,EAAW,KAAX,CAHJ,EAIF;EAAA,IAAC;IAAEP;EAAF,CAAD;EAAA,OAAeA,KAAK,CAACI,KAAN,CAAYC,SAAZ,CAAsBG,MAArC;AAAA,CAJE,CAAb;;;AAOA,MAAMC,QAAQ,GAAG,IAAAX,eAAA,EAAOY,qBAAA,CAASX,IAAhB,CAAH,kHAEH;EAAA,IAAC;IAAEC;EAAF,CAAD;EAAA,OAAeA,KAAK,CAACI,KAAN,CAAYC,SAAZ,CAAsBG,MAArC;AAAA,CAFG,CAAd"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
exports
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
4
6
|
exports.default = void 0;
|
|
5
7
|
|
|
6
8
|
var _react = _interopRequireDefault(require("react"));
|
|
@@ -15,16 +17,18 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
15
17
|
|
|
16
18
|
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); }
|
|
17
19
|
|
|
18
|
-
const RadioButton =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
const RadioButton = _ref => {
|
|
21
|
+
let {
|
|
22
|
+
children,
|
|
23
|
+
onChange,
|
|
24
|
+
checked,
|
|
25
|
+
labelPosition = 'right',
|
|
26
|
+
disabled = false,
|
|
27
|
+
color = 'primary',
|
|
28
|
+
colorTone = 'medium',
|
|
29
|
+
...rest
|
|
30
|
+
} = _ref;
|
|
31
|
+
|
|
28
32
|
const handleChange = () => {
|
|
29
33
|
onChange && onChange(!checked);
|
|
30
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioButton.js","names":["RadioButton","children","onChange","checked","labelPosition","disabled","color","colorTone","rest","handleChange"],"sources":["../../../../src/components/atoms/RadioButton/RadioButton.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Pressable, StyleProp, ViewStyle } from 'react-native';\nimport { ColorGradationType, ColorType } from '../../../types/defaults';\nimport { Icon } from '../Icon';\nimport { IconViewStyled, IconWrapper, ScaledView, ViewStyled } from './styled';\n\nexport interface RadioButtonProps {\n /** Element is checked */\n checked?: boolean;\n /** Change handler */\n onChange?: (checked: boolean) => void;\n /** Position of children */\n labelPosition?: 'left' | 'right';\n /** Element is not clickable */\n disabled?: boolean;\n /** Color definition from theme */\n color?: ColorType;\n /** Color gradation from theme */\n colorTone?: ColorGradationType;\n style?: StyleProp<ViewStyle>;\n}\n\nconst RadioButton: FC<RadioButtonProps> = ({\n children,\n onChange,\n checked,\n labelPosition = 'right',\n disabled = false,\n color = 'primary',\n colorTone = 'medium',\n ...rest\n}): JSX.Element => {\n const handleChange = () => {\n onChange && onChange(!checked);\n };\n\n return (\n <Pressable\n {...rest}\n disabled={disabled}\n onPress={handleChange}\n accessibilityRole=\"radio\"\n >\n <ViewStyled>\n {labelPosition === 'left' && children}\n {checked && (\n <IconViewStyled>\n <IconWrapper>\n <ScaledView>\n <Icon\n name=\"circle\"\n colorVariant={color}\n colorTone={colorTone}\n type=\"material-community\"\n size=\"centi\"\n />\n </ScaledView>\n </IconWrapper>\n </IconViewStyled>\n )}\n {!checked && (\n <IconViewStyled>\n <IconWrapper>\n <ScaledView>\n <Icon\n name=\"circle\"\n fontColor=\"light\"\n type=\"material-community\"\n size=\"centi\"\n />\n </ScaledView>\n </IconWrapper>\n </IconViewStyled>\n )}\n {labelPosition === 'right' && children}\n </ViewStyled>\n </Pressable>\n );\n};\n\nexport default RadioButton;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"RadioButton.js","names":["RadioButton","children","onChange","checked","labelPosition","disabled","color","colorTone","rest","handleChange"],"sources":["../../../../src/components/atoms/RadioButton/RadioButton.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { Pressable, StyleProp, ViewStyle } from 'react-native';\nimport { ColorGradationType, ColorType } from '../../../types/defaults';\nimport { Icon } from '../Icon';\nimport { IconViewStyled, IconWrapper, ScaledView, ViewStyled } from './styled';\n\nexport interface RadioButtonProps {\n /** Element is checked */\n checked?: boolean;\n /** Change handler */\n onChange?: (checked: boolean) => void;\n /** Position of children */\n labelPosition?: 'left' | 'right';\n /** Element is not clickable */\n disabled?: boolean;\n /** Color definition from theme */\n color?: ColorType;\n /** Color gradation from theme */\n colorTone?: ColorGradationType;\n style?: StyleProp<ViewStyle>;\n}\n\nconst RadioButton: FC<RadioButtonProps> = ({\n children,\n onChange,\n checked,\n labelPosition = 'right',\n disabled = false,\n color = 'primary',\n colorTone = 'medium',\n ...rest\n}): JSX.Element => {\n const handleChange = () => {\n onChange && onChange(!checked);\n };\n\n return (\n <Pressable\n {...rest}\n disabled={disabled}\n onPress={handleChange}\n accessibilityRole=\"radio\"\n >\n <ViewStyled>\n {labelPosition === 'left' && children}\n {checked && (\n <IconViewStyled>\n <IconWrapper>\n <ScaledView>\n <Icon\n name=\"circle\"\n colorVariant={color}\n colorTone={colorTone}\n type=\"material-community\"\n size=\"centi\"\n />\n </ScaledView>\n </IconWrapper>\n </IconViewStyled>\n )}\n {!checked && (\n <IconViewStyled>\n <IconWrapper>\n <ScaledView>\n <Icon\n name=\"circle\"\n fontColor=\"light\"\n type=\"material-community\"\n size=\"centi\"\n />\n </ScaledView>\n </IconWrapper>\n </IconViewStyled>\n )}\n {labelPosition === 'right' && children}\n </ViewStyled>\n </Pressable>\n );\n};\n\nexport default RadioButton;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;;;;;AAkBA,MAAMA,WAAiC,GAAG,QASvB;EAAA,IATwB;IACzCC,QADyC;IAEzCC,QAFyC;IAGzCC,OAHyC;IAIzCC,aAAa,GAAG,OAJyB;IAKzCC,QAAQ,GAAG,KAL8B;IAMzCC,KAAK,GAAG,SANiC;IAOzCC,SAAS,GAAG,QAP6B;IAQzC,GAAGC;EARsC,CASxB;;EACjB,MAAMC,YAAY,GAAG,MAAM;IACzBP,QAAQ,IAAIA,QAAQ,CAAC,CAACC,OAAF,CAApB;EACD,CAFD;;EAIA,OACE,6BAAC,sBAAD,eACMK,IADN;IAEE,QAAQ,EAAEH,QAFZ;IAGE,OAAO,EAAEI,YAHX;IAIE,iBAAiB,EAAC;EAJpB,IAME,6BAAC,kBAAD,QACGL,aAAa,KAAK,MAAlB,IAA4BH,QAD/B,EAEGE,OAAO,IACN,6BAAC,sBAAD,QACE,6BAAC,mBAAD,QACE,6BAAC,kBAAD,QACE,6BAAC,UAAD;IACE,IAAI,EAAC,QADP;IAEE,YAAY,EAAEG,KAFhB;IAGE,SAAS,EAAEC,SAHb;IAIE,IAAI,EAAC,oBAJP;IAKE,IAAI,EAAC;EALP,EADF,CADF,CADF,CAHJ,EAiBG,CAACJ,OAAD,IACC,6BAAC,sBAAD,QACE,6BAAC,mBAAD,QACE,6BAAC,kBAAD,QACE,6BAAC,UAAD;IACE,IAAI,EAAC,QADP;IAEE,SAAS,EAAC,OAFZ;IAGE,IAAI,EAAC,oBAHP;IAIE,IAAI,EAAC;EAJP,EADF,CADF,CADF,CAlBJ,EA+BGC,aAAa,KAAK,OAAlB,IAA6BH,QA/BhC,CANF,CADF;AA0CD,CAxDD;;eA0DeD,W"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default as RadioButton
|
|
1
|
+
export { default as RadioButton } from './RadioButton';
|
|
2
|
+
export type { RadioButtonProps } from './RadioButton';
|