@tecsinapse/react-core 1.19.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -0
- package/babel.config.esm.js +34 -0
- package/dist/components/atoms/Avatar/Avatar.js +12 -8
- package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/components/atoms/Avatar/helpers.js +3 -1
- package/dist/components/atoms/Avatar/helpers.js.map +1 -1
- package/dist/components/atoms/Avatar/index.d.ts +2 -1
- package/dist/components/atoms/Avatar/index.js +11 -9
- package/dist/components/atoms/Avatar/index.js.map +1 -1
- package/dist/components/atoms/Avatar/styled.js +38 -39
- package/dist/components/atoms/Avatar/styled.js.map +1 -1
- package/dist/components/atoms/Badge/Badge.js +11 -8
- package/dist/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/components/atoms/Badge/index.d.ts +2 -1
- package/dist/components/atoms/Badge/index.js +11 -9
- package/dist/components/atoms/Badge/index.js.map +1 -1
- package/dist/components/atoms/Badge/styled.js +15 -24
- package/dist/components/atoms/Badge/styled.js.map +1 -1
- package/dist/components/atoms/BoxContent/BoxContent.js +8 -5
- package/dist/components/atoms/BoxContent/BoxContent.js.map +1 -1
- package/dist/components/atoms/BoxContent/index.d.ts +2 -1
- package/dist/components/atoms/BoxContent/index.js +11 -9
- package/dist/components/atoms/BoxContent/index.js.map +1 -1
- package/dist/components/atoms/BoxContent/styled.js +62 -57
- package/dist/components/atoms/BoxContent/styled.js.map +1 -1
- package/dist/components/atoms/Button/Button.js +19 -16
- package/dist/components/atoms/Button/Button.js.map +1 -1
- package/dist/components/atoms/Button/States/BaseState.js +11 -8
- package/dist/components/atoms/Button/States/BaseState.js.map +1 -1
- package/dist/components/atoms/Button/States/Error.js +3 -1
- package/dist/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/components/atoms/Button/States/Loading.js +10 -7
- package/dist/components/atoms/Button/States/Loading.js.map +1 -1
- package/dist/components/atoms/Button/States/Success.js +3 -1
- package/dist/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/components/atoms/Button/States/index.js +21 -8
- package/dist/components/atoms/Button/States/index.js.map +1 -1
- package/dist/components/atoms/Button/States/styled.js +31 -19
- package/dist/components/atoms/Button/States/styled.js.map +1 -1
- package/dist/components/atoms/Button/index.d.ts +2 -1
- package/dist/components/atoms/Button/index.js +29 -16
- package/dist/components/atoms/Button/index.js.map +1 -1
- package/dist/components/atoms/Button/styled.js +33 -36
- package/dist/components/atoms/Button/styled.js.map +1 -1
- package/dist/components/atoms/Card/Card.js +11 -7
- package/dist/components/atoms/Card/Card.js.map +1 -1
- package/dist/components/atoms/Card/Footer/Footer.js +12 -7
- package/dist/components/atoms/Card/Footer/Footer.js.map +1 -1
- package/dist/components/atoms/Card/Footer/index.d.ts +2 -1
- package/dist/components/atoms/Card/Footer/index.js +11 -9
- package/dist/components/atoms/Card/Footer/index.js.map +1 -1
- package/dist/components/atoms/Card/Header/Header.js +12 -7
- package/dist/components/atoms/Card/Header/Header.js.map +1 -1
- package/dist/components/atoms/Card/Header/index.d.ts +2 -1
- package/dist/components/atoms/Card/Header/index.js +11 -9
- package/dist/components/atoms/Card/Header/index.js.map +1 -1
- package/dist/components/atoms/Card/index.d.ts +2 -1
- package/dist/components/atoms/Card/index.js +11 -9
- package/dist/components/atoms/Card/index.js.map +1 -1
- package/dist/components/atoms/Card/styled.js +8 -5
- package/dist/components/atoms/Card/styled.js.map +1 -1
- package/dist/components/atoms/Checkbox/Checkbox.js +15 -11
- package/dist/components/atoms/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/atoms/Checkbox/index.d.ts +2 -1
- package/dist/components/atoms/Checkbox/index.js +11 -9
- package/dist/components/atoms/Checkbox/index.js.map +1 -1
- package/dist/components/atoms/Checkbox/styled.js +62 -44
- package/dist/components/atoms/Checkbox/styled.js.map +1 -1
- package/dist/components/atoms/Divider/Divider.js +8 -5
- package/dist/components/atoms/Divider/Divider.js.map +1 -1
- package/dist/components/atoms/Divider/index.d.ts +2 -1
- package/dist/components/atoms/Divider/index.js +11 -9
- package/dist/components/atoms/Divider/index.js.map +1 -1
- package/dist/components/atoms/Divider/styled.js +33 -26
- package/dist/components/atoms/Divider/styled.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButton.js +24 -20
- package/dist/components/atoms/GroupButton/GroupButton.js.map +1 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.js +9 -6
- package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/components/atoms/GroupButton/index.d.ts +4 -2
- package/dist/components/atoms/GroupButton/index.js +18 -14
- package/dist/components/atoms/GroupButton/index.js.map +1 -1
- package/dist/components/atoms/GroupButton/styled.js +97 -100
- package/dist/components/atoms/GroupButton/styled.js.map +1 -1
- package/dist/components/atoms/Icon/Icon.js +14 -11
- package/dist/components/atoms/Icon/Icon.js.map +1 -1
- package/dist/components/atoms/Icon/helpers.js +13 -7
- package/dist/components/atoms/Icon/helpers.js.map +1 -1
- package/dist/components/atoms/Icon/index.d.ts +2 -1
- package/dist/components/atoms/Icon/index.js +11 -9
- package/dist/components/atoms/Icon/index.js.map +1 -1
- package/dist/components/atoms/Input/Hint.js +9 -6
- package/dist/components/atoms/Input/Hint.js.map +1 -1
- package/dist/components/atoms/Input/InputContainer/InputContainer.js +22 -19
- package/dist/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
- package/dist/components/atoms/Input/InputElement/InputElement.js +12 -9
- package/dist/components/atoms/Input/InputElement/InputElement.js.map +1 -1
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js +16 -13
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +11 -8
- package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/index.d.ts +2 -1
- package/dist/components/atoms/Input/PressableInputContainer/index.js +11 -9
- package/dist/components/atoms/Input/PressableInputContainer/index.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/styled.js +9 -4
- package/dist/components/atoms/Input/PressableInputContainer/styled.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useInputFocus.js +5 -2
- package/dist/components/atoms/Input/hooks/useInputFocus.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useNumberMask.js +7 -4
- package/dist/components/atoms/Input/hooks/useNumberMask.js.map +1 -1
- package/dist/components/atoms/Input/hooks/useStringMask.js +10 -5
- package/dist/components/atoms/Input/hooks/useStringMask.js.map +1 -1
- package/dist/components/atoms/Input/index.d.ts +8 -4
- package/dist/components/atoms/Input/index.js +66 -35
- package/dist/components/atoms/Input/index.js.map +1 -1
- package/dist/components/atoms/Input/styled.js +119 -106
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/Paper/Paper.js +13 -8
- package/dist/components/atoms/Paper/Paper.js.map +1 -1
- package/dist/components/atoms/Paper/index.d.ts +2 -1
- package/dist/components/atoms/Paper/index.js +11 -9
- package/dist/components/atoms/Paper/index.js.map +1 -1
- package/dist/components/atoms/Paper/styled.js +8 -5
- package/dist/components/atoms/Paper/styled.js.map +1 -1
- package/dist/components/atoms/PressableSurface/PressableSurface.js +27 -18
- package/dist/components/atoms/PressableSurface/PressableSurface.js.map +1 -1
- package/dist/components/atoms/PressableSurface/index.d.ts +2 -1
- package/dist/components/atoms/PressableSurface/index.js +11 -9
- package/dist/components/atoms/PressableSurface/index.js.map +1 -1
- package/dist/components/atoms/ProgressBar/ProgressBar.js +20 -15
- package/dist/components/atoms/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/atoms/ProgressBar/index.d.ts +2 -1
- package/dist/components/atoms/ProgressBar/index.js +11 -9
- package/dist/components/atoms/ProgressBar/index.js.map +1 -1
- package/dist/components/atoms/ProgressBar/styled.js +38 -29
- package/dist/components/atoms/ProgressBar/styled.js.map +1 -1
- package/dist/components/atoms/RadioButton/RadioButton.js +15 -11
- package/dist/components/atoms/RadioButton/RadioButton.js.map +1 -1
- package/dist/components/atoms/RadioButton/index.d.ts +2 -1
- package/dist/components/atoms/RadioButton/index.js +11 -9
- package/dist/components/atoms/RadioButton/index.js.map +1 -1
- package/dist/components/atoms/RadioButton/styled.js +38 -29
- package/dist/components/atoms/RadioButton/styled.js.map +1 -1
- package/dist/components/atoms/Switch/Switch.js +15 -12
- package/dist/components/atoms/Switch/Switch.js.map +1 -1
- package/dist/components/atoms/Switch/animation.js +3 -1
- package/dist/components/atoms/Switch/animation.js.map +1 -1
- package/dist/components/atoms/Switch/index.d.ts +2 -1
- package/dist/components/atoms/Switch/index.js +11 -9
- package/dist/components/atoms/Switch/index.js.map +1 -1
- package/dist/components/atoms/Switch/styled.js +29 -22
- package/dist/components/atoms/Switch/styled.js.map +1 -1
- package/dist/components/atoms/Tag/Tag.js +14 -11
- package/dist/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/components/atoms/Tag/index.d.ts +2 -1
- package/dist/components/atoms/Tag/index.js +11 -9
- package/dist/components/atoms/Tag/index.js.map +1 -1
- package/dist/components/atoms/Tag/styled.js +47 -43
- package/dist/components/atoms/Tag/styled.js.map +1 -1
- package/dist/components/atoms/Text/Text.js +18 -15
- package/dist/components/atoms/Text/Text.js.map +1 -1
- package/dist/components/atoms/Text/functions.js +3 -1
- package/dist/components/atoms/Text/functions.js.map +1 -1
- package/dist/components/atoms/Text/index.d.ts +2 -1
- package/dist/components/atoms/Text/index.js +11 -9
- package/dist/components/atoms/Text/index.js.map +1 -1
- package/dist/components/atoms/Text/styled.js +51 -33
- package/dist/components/atoms/Text/styled.js.map +1 -1
- package/dist/components/atoms/shared/PaperAndCard.js +29 -20
- package/dist/components/atoms/shared/PaperAndCard.js.map +1 -1
- package/dist/components/molecules/Calendar/Calendar.js +20 -16
- package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/components/molecules/Calendar/components/MonthWeek.js +16 -12
- package/dist/components/molecules/Calendar/components/MonthWeek.js.map +1 -1
- package/dist/components/molecules/Calendar/components/Weekdays.js +9 -6
- package/dist/components/molecules/Calendar/components/Weekdays.js.map +1 -1
- package/dist/components/molecules/Calendar/components/index.js +15 -6
- package/dist/components/molecules/Calendar/components/index.js.map +1 -1
- package/dist/components/molecules/Calendar/index.d.ts +2 -1
- package/dist/components/molecules/Calendar/index.js +11 -12
- package/dist/components/molecules/Calendar/index.js.map +1 -1
- package/dist/components/molecules/Calendar/styled.js +58 -70
- package/dist/components/molecules/Calendar/styled.js.map +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js +33 -30
- package/dist/components/molecules/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/molecules/DatePicker/index.d.ts +2 -1
- package/dist/components/molecules/DatePicker/index.js +11 -9
- package/dist/components/molecules/DatePicker/index.js.map +1 -1
- package/dist/components/molecules/DatePicker/styled.js +19 -13
- package/dist/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js +42 -39
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/index.d.ts +2 -1
- package/dist/components/molecules/DateTimePicker/index.js +11 -9
- package/dist/components/molecules/DateTimePicker/index.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/styled.js +13 -6
- package/dist/components/molecules/DateTimePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +28 -26
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/Selector.js +18 -14
- package/dist/components/molecules/DateTimeSelector/Selector.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/index.d.ts +2 -1
- package/dist/components/molecules/DateTimeSelector/index.js +11 -10
- package/dist/components/molecules/DateTimeSelector/index.js.map +1 -1
- package/dist/components/molecules/DateTimeSelector/styled.js +88 -68
- package/dist/components/molecules/DateTimeSelector/styled.js.map +1 -1
- package/dist/components/molecules/Grid/functions.js +6 -2
- package/dist/components/molecules/Grid/functions.js.map +1 -1
- package/dist/components/molecules/Grid/index.js +15 -5
- package/dist/components/molecules/Grid/index.js.map +1 -1
- package/dist/components/molecules/HintInputContainer/HintInputContainer.js +18 -14
- package/dist/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -1
- package/dist/components/molecules/HintInputContainer/index.js +9 -4
- package/dist/components/molecules/HintInputContainer/index.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconComponent.js +13 -8
- package/dist/components/molecules/IconTextButton/IconComponent.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconTextButton.js +3 -1
- package/dist/components/molecules/IconTextButton/index.d.ts +1 -1
- package/dist/components/molecules/IconTextButton/index.js +9 -9
- package/dist/components/molecules/IconTextButton/index.js.map +1 -1
- package/dist/components/molecules/IconTextButton/styled.js +15 -14
- package/dist/components/molecules/IconTextButton/styled.js.map +1 -1
- package/dist/components/molecules/InputPassword/InputPasswordIcon.js +9 -6
- package/dist/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -1
- package/dist/components/molecules/InputPassword/index.js +9 -4
- package/dist/components/molecules/InputPassword/index.js.map +1 -1
- package/dist/components/molecules/InputPassword/styled.js +13 -6
- package/dist/components/molecules/InputPassword/styled.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +3 -1
- package/dist/components/molecules/LabeledSwitch/index.d.ts +1 -1
- package/dist/components/molecules/LabeledSwitch/index.js +3 -7
- package/dist/components/molecules/LabeledSwitch/index.js.map +1 -1
- package/dist/components/molecules/Snackbar/Snackbar.js +24 -20
- package/dist/components/molecules/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/molecules/Snackbar/index.d.ts +2 -1
- package/dist/components/molecules/Snackbar/index.js +11 -9
- package/dist/components/molecules/Snackbar/index.js.map +1 -1
- package/dist/components/molecules/Snackbar/styled.js +52 -76
- package/dist/components/molecules/Snackbar/styled.js.map +1 -1
- package/dist/components/molecules/TextArea/TextArea.js +29 -26
- package/dist/components/molecules/TextArea/TextArea.js.map +1 -1
- package/dist/components/molecules/TextArea/index.d.ts +2 -1
- package/dist/components/molecules/TextArea/index.js +17 -11
- package/dist/components/molecules/TextArea/index.js.map +1 -1
- package/dist/components/molecules/TextArea/styled.js +15 -13
- package/dist/components/molecules/TextArea/styled.js.map +1 -1
- package/dist/hooks/index.js +15 -6
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useDebouncedState.js +5 -2
- package/dist/hooks/useDebouncedState.js.map +1 -1
- package/dist/hooks/useTheme.js +3 -1
- package/dist/hooks/useTheme.js.map +1 -1
- package/dist/index.d.ts +57 -29
- package/dist/index.js +303 -187
- package/dist/index.js.map +1 -1
- package/dist/styles/ThemeProvider.js +8 -5
- package/dist/styles/ThemeProvider.js.map +1 -1
- package/dist/styles/definitions.js +6 -3
- package/dist/styles/definitions.js.map +1 -1
- package/dist/styles/light.js +3 -1
- package/dist/styles/light.js.map +1 -1
- package/dist/types/defaults.js +3 -1
- package/dist/utils/IPhoneXHelper.js +3 -1
- package/dist/utils/IPhoneXHelper.js.map +1 -1
- package/dist/utils/ResponsiveFontSize.js +6 -3
- package/dist/utils/ResponsiveFontSize.js.map +1 -1
- package/dist/utils/extractNumbersFromString.js +3 -1
- package/dist/utils/extractNumbersFromString.js.map +1 -1
- package/dist/utils/formatWithMask.js +3 -1
- package/dist/utils/formatWithMask.js.map +1 -1
- package/dist/utils/index.js +51 -12
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/lightenDarkenColor.js +3 -1
- package/dist/utils/lightenDarkenColor.js.map +1 -1
- package/dist/utils/masks.js +5 -3
- package/dist/utils/masks.js.map +1 -1
- package/dist/utils/variantComplement.js +3 -1
- package/dist/utils/variantComplement.js.map +1 -1
- package/esm/components/atoms/Avatar/Avatar.d.ts +14 -0
- package/esm/components/atoms/Avatar/Avatar.js +50 -0
- package/esm/components/atoms/Avatar/Avatar.js.map +1 -0
- package/esm/components/atoms/Avatar/helpers.d.ts +1 -0
- package/esm/components/atoms/Avatar/helpers.js +12 -0
- package/esm/components/atoms/Avatar/helpers.js.map +1 -0
- package/esm/components/atoms/Avatar/index.d.ts +2 -0
- package/esm/components/atoms/Avatar/index.js +2 -0
- package/esm/components/atoms/Avatar/index.js.map +1 -0
- package/esm/components/atoms/Avatar/styled.d.ts +28 -0
- package/esm/components/atoms/Avatar/styled.js +33 -0
- package/esm/components/atoms/Avatar/styled.js.map +1 -0
- package/esm/components/atoms/Badge/Badge.d.ts +11 -0
- package/esm/components/atoms/Badge/Badge.js +20 -0
- package/esm/components/atoms/Badge/Badge.js.map +1 -0
- package/esm/components/atoms/Badge/index.d.ts +2 -0
- package/esm/components/atoms/Badge/index.js +2 -0
- package/esm/components/atoms/Badge/index.js.map +1 -0
- package/esm/components/atoms/Badge/styled.d.ts +15 -0
- package/esm/components/atoms/Badge/styled.js +20 -0
- package/esm/components/atoms/Badge/styled.js.map +1 -0
- package/esm/components/atoms/BoxContent/BoxContent.d.ts +7 -0
- package/esm/components/atoms/BoxContent/BoxContent.js +18 -0
- package/esm/components/atoms/BoxContent/BoxContent.js.map +1 -0
- package/esm/components/atoms/BoxContent/index.d.ts +2 -0
- package/esm/components/atoms/BoxContent/index.js +2 -0
- package/esm/components/atoms/BoxContent/index.js.map +1 -0
- package/esm/components/atoms/BoxContent/styled.d.ts +24 -0
- package/esm/components/atoms/BoxContent/styled.js +55 -0
- package/esm/components/atoms/BoxContent/styled.js.map +1 -0
- package/esm/components/atoms/Button/Button.d.ts +28 -0
- package/esm/components/atoms/Button/Button.js +76 -0
- package/esm/components/atoms/Button/Button.js.map +1 -0
- package/esm/components/atoms/Button/States/BaseState.d.ts +7 -0
- package/esm/components/atoms/Button/States/BaseState.js +29 -0
- package/esm/components/atoms/Button/States/BaseState.js.map +1 -0
- package/esm/components/atoms/Button/States/Error.d.ts +4 -0
- package/esm/components/atoms/Button/States/Error.js +11 -0
- package/esm/components/atoms/Button/States/Error.js.map +1 -0
- package/esm/components/atoms/Button/States/Loading.d.ts +4 -0
- package/esm/components/atoms/Button/States/Loading.js +26 -0
- package/esm/components/atoms/Button/States/Loading.js.map +1 -0
- package/esm/components/atoms/Button/States/Success.d.ts +4 -0
- package/esm/components/atoms/Button/States/Success.js +11 -0
- package/esm/components/atoms/Button/States/Success.js.map +1 -0
- package/esm/components/atoms/Button/States/index.d.ts +3 -0
- package/esm/components/atoms/Button/States/index.js +4 -0
- package/esm/components/atoms/Button/States/index.js.map +1 -0
- package/esm/components/atoms/Button/States/styled.d.ts +16 -0
- package/esm/components/atoms/Button/States/styled.js +25 -0
- package/esm/components/atoms/Button/States/styled.js.map +1 -0
- package/esm/components/atoms/Button/index.d.ts +3 -0
- package/esm/components/atoms/Button/index.js +3 -0
- package/esm/components/atoms/Button/index.js.map +1 -0
- package/esm/components/atoms/Button/styled.d.ts +8 -0
- package/esm/components/atoms/Button/styled.js +42 -0
- package/esm/components/atoms/Button/styled.js.map +1 -0
- package/esm/components/atoms/Card/Card.d.ts +9 -0
- package/esm/components/atoms/Card/Card.js +33 -0
- package/esm/components/atoms/Card/Card.js.map +1 -0
- package/esm/components/atoms/Card/Footer/Footer.d.ts +7 -0
- package/esm/components/atoms/Card/Footer/Footer.js +13 -0
- package/esm/components/atoms/Card/Footer/Footer.js.map +1 -0
- package/esm/components/atoms/Card/Footer/index.d.ts +2 -0
- package/esm/components/atoms/Card/Footer/index.js +2 -0
- package/esm/components/atoms/Card/Footer/index.js.map +1 -0
- package/esm/components/atoms/Card/Header/Header.d.ts +7 -0
- package/esm/components/atoms/Card/Header/Header.js +13 -0
- package/esm/components/atoms/Card/Header/Header.js.map +1 -0
- package/esm/components/atoms/Card/Header/index.d.ts +2 -0
- package/esm/components/atoms/Card/Header/index.js +2 -0
- package/esm/components/atoms/Card/Header/index.js.map +1 -0
- package/esm/components/atoms/Card/index.d.ts +2 -0
- package/esm/components/atoms/Card/index.js +2 -0
- package/esm/components/atoms/Card/index.js.map +1 -0
- package/esm/components/atoms/Card/styled.d.ts +8 -0
- package/esm/components/atoms/Card/styled.js +11 -0
- package/esm/components/atoms/Card/styled.js.map +1 -0
- package/esm/components/atoms/Checkbox/Checkbox.d.ts +14 -0
- package/esm/components/atoms/Checkbox/Checkbox.js +56 -0
- package/esm/components/atoms/Checkbox/Checkbox.js.map +1 -0
- package/esm/components/atoms/Checkbox/index.d.ts +2 -0
- package/esm/components/atoms/Checkbox/index.js +2 -0
- package/esm/components/atoms/Checkbox/index.js.map +1 -0
- package/esm/components/atoms/Checkbox/styled.d.ts +27 -0
- package/esm/components/atoms/Checkbox/styled.js +50 -0
- package/esm/components/atoms/Checkbox/styled.js.map +1 -0
- package/esm/components/atoms/Divider/Divider.d.ts +8 -0
- package/esm/components/atoms/Divider/Divider.js +18 -0
- package/esm/components/atoms/Divider/Divider.js.map +1 -0
- package/esm/components/atoms/Divider/index.d.ts +2 -0
- package/esm/components/atoms/Divider/index.js +2 -0
- package/esm/components/atoms/Divider/index.js.map +1 -0
- package/esm/components/atoms/Divider/styled.d.ts +13 -0
- package/esm/components/atoms/Divider/styled.js +28 -0
- package/esm/components/atoms/Divider/styled.js.map +1 -0
- package/esm/components/atoms/GroupButton/GroupButton.d.ts +32 -0
- package/esm/components/atoms/GroupButton/GroupButton.js +78 -0
- package/esm/components/atoms/GroupButton/GroupButton.js.map +1 -0
- package/esm/components/atoms/GroupButton/GroupButtonOption.d.ts +9 -0
- package/esm/components/atoms/GroupButton/GroupButtonOption.js +19 -0
- package/esm/components/atoms/GroupButton/GroupButtonOption.js.map +1 -0
- package/esm/components/atoms/GroupButton/index.d.ts +4 -0
- package/esm/components/atoms/GroupButton/index.js +3 -0
- package/esm/components/atoms/GroupButton/index.js.map +1 -0
- package/esm/components/atoms/GroupButton/styled.d.ts +42 -0
- package/esm/components/atoms/GroupButton/styled.js +97 -0
- package/esm/components/atoms/GroupButton/styled.js.map +1 -0
- package/esm/components/atoms/Icon/Icon.d.ts +14 -0
- package/esm/components/atoms/Icon/Icon.js +37 -0
- package/esm/components/atoms/Icon/Icon.js.map +1 -0
- package/esm/components/atoms/Icon/helpers.d.ts +4 -0
- package/esm/components/atoms/Icon/helpers.js +78 -0
- package/esm/components/atoms/Icon/helpers.js.map +1 -0
- package/esm/components/atoms/Icon/index.d.ts +2 -0
- package/esm/components/atoms/Icon/index.js +2 -0
- package/esm/components/atoms/Icon/index.js.map +1 -0
- package/esm/components/atoms/Input/Hint.d.ts +10 -0
- package/esm/components/atoms/Input/Hint.js +41 -0
- package/esm/components/atoms/Input/Hint.js.map +1 -0
- package/esm/components/atoms/Input/InputContainer/InputContainer.d.ts +29 -0
- package/esm/components/atoms/Input/InputContainer/InputContainer.js +66 -0
- package/esm/components/atoms/Input/InputContainer/InputContainer.js.map +1 -0
- package/esm/components/atoms/Input/InputElement/InputElement.d.ts +13 -0
- package/esm/components/atoms/Input/InputElement/InputElement.js +37 -0
- package/esm/components/atoms/Input/InputElement/InputElement.js.map +1 -0
- package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.d.ts +16 -0
- package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js +92 -0
- package/esm/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -0
- package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.d.ts +10 -0
- package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +30 -0
- package/esm/components/atoms/Input/PressableInputContainer/PressableInputContainer.js.map +1 -0
- package/esm/components/atoms/Input/PressableInputContainer/index.d.ts +2 -0
- package/esm/components/atoms/Input/PressableInputContainer/index.js +2 -0
- package/esm/components/atoms/Input/PressableInputContainer/index.js.map +1 -0
- package/esm/components/atoms/Input/PressableInputContainer/styled.d.ts +5 -0
- package/esm/components/atoms/Input/PressableInputContainer/styled.js +7 -0
- package/esm/components/atoms/Input/PressableInputContainer/styled.js.map +1 -0
- package/esm/components/atoms/Input/hooks/useInputFocus.d.ts +5 -0
- package/esm/components/atoms/Input/hooks/useInputFocus.js +40 -0
- package/esm/components/atoms/Input/hooks/useInputFocus.js.map +1 -0
- package/esm/components/atoms/Input/hooks/useNumberMask.d.ts +8 -0
- package/esm/components/atoms/Input/hooks/useNumberMask.js +108 -0
- package/esm/components/atoms/Input/hooks/useNumberMask.js.map +1 -0
- package/esm/components/atoms/Input/hooks/useStringMask.d.ts +8 -0
- package/esm/components/atoms/Input/hooks/useStringMask.js +116 -0
- package/esm/components/atoms/Input/hooks/useStringMask.js.map +1 -0
- package/esm/components/atoms/Input/index.d.ts +13 -0
- package/esm/components/atoms/Input/index.js +10 -0
- package/esm/components/atoms/Input/index.js.map +1 -0
- package/esm/components/atoms/Input/styled.d.ts +64 -0
- package/esm/components/atoms/Input/styled.js +93 -0
- package/esm/components/atoms/Input/styled.js.map +1 -0
- package/esm/components/atoms/Paper/Paper.d.ts +8 -0
- package/esm/components/atoms/Paper/Paper.js +24 -0
- package/esm/components/atoms/Paper/Paper.js.map +1 -0
- package/esm/components/atoms/Paper/index.d.ts +2 -0
- package/esm/components/atoms/Paper/index.js +2 -0
- package/esm/components/atoms/Paper/index.js.map +1 -0
- package/esm/components/atoms/Paper/styled.d.ts +9 -0
- package/esm/components/atoms/Paper/styled.js +11 -0
- package/esm/components/atoms/Paper/styled.js.map +1 -0
- package/esm/components/atoms/PressableSurface/PressableSurface.d.ts +10 -0
- package/esm/components/atoms/PressableSurface/PressableSurface.js +86 -0
- package/esm/components/atoms/PressableSurface/PressableSurface.js.map +1 -0
- package/esm/components/atoms/PressableSurface/index.d.ts +2 -0
- package/esm/components/atoms/PressableSurface/index.js +2 -0
- package/esm/components/atoms/PressableSurface/index.js.map +1 -0
- package/esm/components/atoms/ProgressBar/ProgressBar.d.ts +18 -0
- package/esm/components/atoms/ProgressBar/ProgressBar.js +90 -0
- package/esm/components/atoms/ProgressBar/ProgressBar.js.map +1 -0
- package/esm/components/atoms/ProgressBar/index.d.ts +2 -0
- package/esm/components/atoms/ProgressBar/index.js +2 -0
- package/esm/components/atoms/ProgressBar/index.js.map +1 -0
- package/esm/components/atoms/ProgressBar/styled.d.ts +20 -0
- package/esm/components/atoms/ProgressBar/styled.js +26 -0
- package/esm/components/atoms/ProgressBar/styled.js.map +1 -0
- package/esm/components/atoms/RadioButton/RadioButton.d.ts +14 -0
- package/esm/components/atoms/RadioButton/RadioButton.js +51 -0
- package/esm/components/atoms/RadioButton/RadioButton.js.map +1 -0
- package/esm/components/atoms/RadioButton/index.d.ts +2 -0
- package/esm/components/atoms/RadioButton/index.js +2 -0
- package/esm/components/atoms/RadioButton/index.js.map +1 -0
- package/esm/components/atoms/RadioButton/styled.d.ts +27 -0
- package/esm/components/atoms/RadioButton/styled.js +30 -0
- package/esm/components/atoms/RadioButton/styled.js.map +1 -0
- package/esm/components/atoms/Switch/Switch.d.ts +16 -0
- package/esm/components/atoms/Switch/Switch.js +87 -0
- package/esm/components/atoms/Switch/Switch.js.map +1 -0
- package/esm/components/atoms/Switch/animation.d.ts +2 -0
- package/esm/components/atoms/Switch/animation.js +33 -0
- package/esm/components/atoms/Switch/animation.js.map +1 -0
- package/esm/components/atoms/Switch/index.d.ts +2 -0
- package/esm/components/atoms/Switch/index.js +2 -0
- package/esm/components/atoms/Switch/index.js.map +1 -0
- package/esm/components/atoms/Switch/styled.d.ts +16 -0
- package/esm/components/atoms/Switch/styled.js +24 -0
- package/esm/components/atoms/Switch/styled.js.map +1 -0
- package/esm/components/atoms/Tag/Tag.d.ts +12 -0
- package/esm/components/atoms/Tag/Tag.js +80 -0
- package/esm/components/atoms/Tag/Tag.js.map +1 -0
- package/esm/components/atoms/Tag/index.d.ts +2 -0
- package/esm/components/atoms/Tag/index.js +2 -0
- package/esm/components/atoms/Tag/index.js.map +1 -0
- package/esm/components/atoms/Tag/styled.d.ts +24 -0
- package/esm/components/atoms/Tag/styled.js +39 -0
- package/esm/components/atoms/Tag/styled.js.map +1 -0
- package/esm/components/atoms/Text/Text.d.ts +19 -0
- package/esm/components/atoms/Text/Text.js +47 -0
- package/esm/components/atoms/Text/Text.js.map +1 -0
- package/esm/components/atoms/Text/functions.d.ts +2 -0
- package/esm/components/atoms/Text/functions.js +7 -0
- package/esm/components/atoms/Text/functions.js.map +1 -0
- package/esm/components/atoms/Text/index.d.ts +2 -0
- package/esm/components/atoms/Text/index.js +2 -0
- package/esm/components/atoms/Text/index.js.map +1 -0
- package/esm/components/atoms/Text/styled.d.ts +20 -0
- package/esm/components/atoms/Text/styled.js +46 -0
- package/esm/components/atoms/Text/styled.js.map +1 -0
- package/esm/components/atoms/shared/PaperAndCard.d.ts +5 -0
- package/esm/components/atoms/shared/PaperAndCard.js +25 -0
- package/esm/components/atoms/shared/PaperAndCard.js.map +1 -0
- package/esm/components/molecules/Calendar/Calendar.d.ts +20 -0
- package/esm/components/molecules/Calendar/Calendar.js +144 -0
- package/esm/components/molecules/Calendar/Calendar.js.map +1 -0
- package/esm/components/molecules/Calendar/components/MonthWeek.d.ts +13 -0
- package/esm/components/molecules/Calendar/components/MonthWeek.js +128 -0
- package/esm/components/molecules/Calendar/components/MonthWeek.js.map +1 -0
- package/esm/components/molecules/Calendar/components/Weekdays.d.ts +8 -0
- package/esm/components/molecules/Calendar/components/Weekdays.js +29 -0
- package/esm/components/molecules/Calendar/components/Weekdays.js.map +1 -0
- package/esm/components/molecules/Calendar/components/index.d.ts +2 -0
- package/esm/components/molecules/Calendar/components/index.js +3 -0
- package/esm/components/molecules/Calendar/components/index.js.map +1 -0
- package/esm/components/molecules/Calendar/index.d.ts +2 -0
- package/esm/components/molecules/Calendar/index.js +2 -0
- package/esm/components/molecules/Calendar/index.js.map +1 -0
- package/esm/components/molecules/Calendar/styled.d.ts +61 -0
- package/esm/components/molecules/Calendar/styled.js +56 -0
- package/esm/components/molecules/Calendar/styled.js.map +1 -0
- package/esm/components/molecules/DatePicker/DatePicker.d.ts +19 -0
- package/esm/components/molecules/DatePicker/DatePicker.js +120 -0
- package/esm/components/molecules/DatePicker/DatePicker.js.map +1 -0
- package/esm/components/molecules/DatePicker/index.d.ts +2 -0
- package/esm/components/molecules/DatePicker/index.js +2 -0
- package/esm/components/molecules/DatePicker/index.js.map +1 -0
- package/esm/components/molecules/DatePicker/styled.d.ts +15 -0
- package/esm/components/molecules/DatePicker/styled.js +22 -0
- package/esm/components/molecules/DatePicker/styled.js.map +1 -0
- package/esm/components/molecules/DateTimePicker/DateTimePicker.d.ts +17 -0
- package/esm/components/molecules/DateTimePicker/DateTimePicker.js +122 -0
- package/esm/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -0
- package/esm/components/molecules/DateTimePicker/index.d.ts +2 -0
- package/esm/components/molecules/DateTimePicker/index.js +2 -0
- package/esm/components/molecules/DateTimePicker/index.js.map +1 -0
- package/esm/components/molecules/DateTimePicker/styled.d.ts +8 -0
- package/esm/components/molecules/DateTimePicker/styled.js +12 -0
- package/esm/components/molecules/DateTimePicker/styled.js.map +1 -0
- package/esm/components/molecules/DateTimeSelector/DateTimeSelector.d.ts +28 -0
- package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +219 -0
- package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -0
- package/esm/components/molecules/DateTimeSelector/Selector.d.ts +17 -0
- package/esm/components/molecules/DateTimeSelector/Selector.js +113 -0
- package/esm/components/molecules/DateTimeSelector/Selector.js.map +1 -0
- package/esm/components/molecules/DateTimeSelector/index.d.ts +2 -0
- package/esm/components/molecules/DateTimeSelector/index.js +2 -0
- package/esm/components/molecules/DateTimeSelector/index.js.map +1 -0
- package/esm/components/molecules/DateTimeSelector/styled.d.ts +52 -0
- package/esm/components/molecules/DateTimeSelector/styled.js +54 -0
- package/esm/components/molecules/DateTimeSelector/styled.js.map +1 -0
- package/esm/components/molecules/Grid/functions.d.ts +3 -0
- package/esm/components/molecules/Grid/functions.js +16 -0
- package/esm/components/molecules/Grid/functions.js.map +1 -0
- package/esm/components/molecules/Grid/index.d.ts +42 -0
- package/esm/components/molecules/Grid/index.js +2 -0
- package/esm/components/molecules/Grid/index.js.map +1 -0
- package/esm/components/molecules/HintInputContainer/HintInputContainer.d.ts +17 -0
- package/esm/components/molecules/HintInputContainer/HintInputContainer.js +46 -0
- package/esm/components/molecules/HintInputContainer/HintInputContainer.js.map +1 -0
- package/esm/components/molecules/HintInputContainer/index.d.ts +2 -0
- package/esm/components/molecules/HintInputContainer/index.js +2 -0
- package/esm/components/molecules/HintInputContainer/index.js.map +1 -0
- package/esm/components/molecules/HintInputContainer/styled.d.ts +0 -0
- package/esm/components/molecules/HintInputContainer/styled.js +2 -0
- package/esm/components/molecules/HintInputContainer/styled.js.map +1 -0
- package/esm/components/molecules/IconTextButton/IconComponent.d.ts +9 -0
- package/esm/components/molecules/IconTextButton/IconComponent.js +20 -0
- package/esm/components/molecules/IconTextButton/IconComponent.js.map +1 -0
- package/esm/components/molecules/IconTextButton/IconTextButton.d.ts +8 -0
- package/esm/components/molecules/IconTextButton/IconTextButton.js +2 -0
- package/esm/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
- package/esm/components/molecules/IconTextButton/index.d.ts +2 -0
- package/esm/components/molecules/IconTextButton/index.js +2 -0
- package/esm/components/molecules/IconTextButton/index.js.map +1 -0
- package/esm/components/molecules/IconTextButton/styled.d.ts +11 -0
- package/esm/components/molecules/IconTextButton/styled.js +14 -0
- package/esm/components/molecules/IconTextButton/styled.js.map +1 -0
- package/esm/components/molecules/InputPassword/InputPasswordIcon.d.ts +8 -0
- package/esm/components/molecules/InputPassword/InputPasswordIcon.js +33 -0
- package/esm/components/molecules/InputPassword/InputPasswordIcon.js.map +1 -0
- package/esm/components/molecules/InputPassword/index.d.ts +1 -0
- package/esm/components/molecules/InputPassword/index.js +2 -0
- package/esm/components/molecules/InputPassword/index.js.map +1 -0
- package/esm/components/molecules/InputPassword/styled.d.ts +7 -0
- package/esm/components/molecules/InputPassword/styled.js +11 -0
- package/esm/components/molecules/InputPassword/styled.js.map +1 -0
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +7 -0
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +2 -0
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
- package/esm/components/molecules/LabeledSwitch/index.d.ts +1 -0
- package/esm/components/molecules/LabeledSwitch/index.js +2 -0
- package/esm/components/molecules/LabeledSwitch/index.js.map +1 -0
- package/esm/components/molecules/Snackbar/Snackbar.d.ts +19 -0
- package/esm/components/molecules/Snackbar/Snackbar.js +103 -0
- package/esm/components/molecules/Snackbar/Snackbar.js.map +1 -0
- package/esm/components/molecules/Snackbar/index.d.ts +2 -0
- package/esm/components/molecules/Snackbar/index.js +2 -0
- package/esm/components/molecules/Snackbar/index.js.map +1 -0
- package/esm/components/molecules/Snackbar/styled.d.ts +47 -0
- package/esm/components/molecules/Snackbar/styled.js +54 -0
- package/esm/components/molecules/Snackbar/styled.js.map +1 -0
- package/esm/components/molecules/TextArea/TextArea.d.ts +14 -0
- package/esm/components/molecules/TextArea/TextArea.js +77 -0
- package/esm/components/molecules/TextArea/TextArea.js.map +1 -0
- package/esm/components/molecules/TextArea/index.d.ts +3 -0
- package/esm/components/molecules/TextArea/index.js +3 -0
- package/esm/components/molecules/TextArea/index.js.map +1 -0
- package/esm/components/molecules/TextArea/styled.d.ts +12 -0
- package/esm/components/molecules/TextArea/styled.js +14 -0
- package/esm/components/molecules/TextArea/styled.js.map +1 -0
- package/esm/hooks/index.d.ts +2 -0
- package/esm/hooks/index.js +3 -0
- package/esm/hooks/index.js.map +1 -0
- package/esm/hooks/useDebouncedState.d.ts +2 -0
- package/esm/hooks/useDebouncedState.js +31 -0
- package/esm/hooks/useDebouncedState.js.map +1 -0
- package/esm/hooks/useTheme.d.ts +2 -0
- package/esm/hooks/useTheme.js +5 -0
- package/esm/hooks/useTheme.js.map +1 -0
- package/esm/index.d.ts +64 -0
- package/esm/index.js +36 -0
- package/esm/index.js.map +1 -0
- package/esm/styles/ThemeProvider.d.ts +4 -0
- package/esm/styles/ThemeProvider.js +13 -0
- package/esm/styles/ThemeProvider.js.map +1 -0
- package/esm/styles/definitions.d.ts +45 -0
- package/esm/styles/definitions.js +168 -0
- package/esm/styles/definitions.js.map +1 -0
- package/esm/styles/light.d.ts +2 -0
- package/esm/styles/light.js +42 -0
- package/esm/styles/light.js.map +1 -0
- package/esm/types/defaults.d.ts +134 -0
- package/esm/types/defaults.js +2 -0
- package/esm/types/defaults.js.map +1 -0
- package/esm/utils/IPhoneXHelper.d.ts +4 -0
- package/esm/utils/IPhoneXHelper.js +23 -0
- package/esm/utils/IPhoneXHelper.js.map +1 -0
- package/esm/utils/ResponsiveFontSize.d.ts +3 -0
- package/esm/utils/ResponsiveFontSize.js +37 -0
- package/esm/utils/ResponsiveFontSize.js.map +1 -0
- package/esm/utils/extractNumbersFromString.d.ts +2 -0
- package/esm/utils/extractNumbersFromString.js +7 -0
- package/esm/utils/extractNumbersFromString.js.map +1 -0
- package/esm/utils/formatWithMask.d.ts +3 -0
- package/esm/utils/formatWithMask.js +19 -0
- package/esm/utils/formatWithMask.js.map +1 -0
- package/esm/utils/index.d.ts +7 -0
- package/esm/utils/index.js +8 -0
- package/esm/utils/index.js.map +1 -0
- package/esm/utils/lightenDarkenColor.d.ts +1 -0
- package/esm/utils/lightenDarkenColor.js +18 -0
- package/esm/utils/lightenDarkenColor.js.map +1 -0
- package/esm/utils/masks.d.ts +11 -0
- package/esm/utils/masks.js +19 -0
- package/esm/utils/masks.js.map +1 -0
- package/esm/utils/variantComplement.d.ts +6 -0
- package/esm/utils/variantComplement.js +26 -0
- package/esm/utils/variantComplement.js.map +1 -0
- package/package.json +9 -4
- package/src/components/atoms/Avatar/index.ts +2 -1
- package/src/components/atoms/Badge/index.ts +2 -1
- package/src/components/atoms/BoxContent/index.ts +2 -1
- package/src/components/atoms/Button/index.ts +3 -3
- package/src/components/atoms/Card/Footer/index.ts +2 -1
- package/src/components/atoms/Card/Header/index.ts +2 -1
- package/src/components/atoms/Card/index.ts +2 -1
- package/src/components/atoms/Checkbox/index.ts +2 -1
- package/src/components/atoms/Divider/index.ts +2 -1
- package/src/components/atoms/GroupButton/index.ts +4 -9
- package/src/components/atoms/Icon/index.ts +2 -1
- package/src/components/atoms/Input/PressableInputContainer/index.ts +2 -4
- package/src/components/atoms/Input/index.ts +8 -14
- package/src/components/atoms/Paper/index.ts +2 -1
- package/src/components/atoms/PressableSurface/index.ts +2 -4
- package/src/components/atoms/ProgressBar/index.ts +2 -1
- package/src/components/atoms/RadioButton/index.ts +2 -1
- package/src/components/atoms/Switch/index.ts +2 -1
- package/src/components/atoms/Tag/index.ts +2 -1
- package/src/components/atoms/Text/index.ts +2 -1
- package/src/components/molecules/Calendar/index.ts +2 -2
- package/src/components/molecules/DatePicker/index.ts +2 -1
- package/src/components/molecules/DateTimePicker/index.ts +2 -4
- package/src/components/molecules/DateTimeSelector/index.ts +2 -2
- package/src/components/molecules/IconTextButton/index.ts +4 -1
- package/src/components/molecules/LabeledSwitch/index.ts +1 -1
- package/src/components/molecules/Snackbar/index.ts +2 -1
- package/src/components/molecules/TextArea/index.ts +2 -1
- package/src/index.ts +64 -56
- package/tsconfig.build.esm.json +10 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
|
|
3
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
+
|
|
5
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
6
|
+
|
|
7
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
8
|
+
|
|
9
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
10
|
+
|
|
11
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
12
|
+
|
|
13
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
14
|
+
|
|
15
|
+
import { useCallback, useState } from 'react';
|
|
16
|
+
export var mergeMask = function mergeMask() {
|
|
17
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
18
|
+
var mask = arguments.length > 1 ? arguments[1] : undefined;
|
|
19
|
+
var formatted = '';
|
|
20
|
+
var raw = '';
|
|
21
|
+
var iMask = 0;
|
|
22
|
+
var iChars = 0;
|
|
23
|
+
|
|
24
|
+
while (!(iMask === mask.length || iChars === value.length)) {
|
|
25
|
+
var maskChar = mask[iMask];
|
|
26
|
+
var valueChar = value[iChars];
|
|
27
|
+
|
|
28
|
+
if (maskChar === valueChar) {
|
|
29
|
+
formatted += maskChar;
|
|
30
|
+
iChars++;
|
|
31
|
+
iMask++;
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
var rawValueChar = value[iChars];
|
|
36
|
+
|
|
37
|
+
if (_typeof(maskChar) === 'object') {
|
|
38
|
+
iChars++;
|
|
39
|
+
var maskCharRegex = Array.isArray(maskChar) ? maskChar[0] : maskChar;
|
|
40
|
+
var matchRegex = RegExp(maskCharRegex).test(valueChar);
|
|
41
|
+
|
|
42
|
+
if (matchRegex) {
|
|
43
|
+
formatted += valueChar;
|
|
44
|
+
raw += rawValueChar;
|
|
45
|
+
iMask++;
|
|
46
|
+
}
|
|
47
|
+
} else {
|
|
48
|
+
formatted += maskChar;
|
|
49
|
+
iMask++;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
raw: raw,
|
|
55
|
+
formatted: formatted
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
export var getMask = function getMask(mask, newValue) {
|
|
59
|
+
var maskArray;
|
|
60
|
+
var regexArray = [];
|
|
61
|
+
|
|
62
|
+
if (typeof mask === 'function') {
|
|
63
|
+
maskArray = mask(newValue);
|
|
64
|
+
} else {
|
|
65
|
+
maskArray = mask;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
maskArray.forEach(function (exp) {
|
|
69
|
+
if (typeof exp !== 'string') {
|
|
70
|
+
if (Array.isArray(exp)) regexArray.push(exp);else regexArray.push(exp);
|
|
71
|
+
} else {
|
|
72
|
+
for (var i = 0; i < exp.length; i++) {
|
|
73
|
+
if (exp[i] === '\\') {
|
|
74
|
+
regexArray.push(exp[i + 1]);
|
|
75
|
+
i++;
|
|
76
|
+
} else {
|
|
77
|
+
if (exp[i] === '9') regexArray.push(/\d/);else if (exp[i] === 'a') regexArray.push(/[a-zA-Z]/);else regexArray.push(exp[i]);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
return regexArray;
|
|
83
|
+
};
|
|
84
|
+
export var useStringMask = function useStringMask(mask, defaultValue) {
|
|
85
|
+
var applyMask = useCallback(function () {
|
|
86
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
87
|
+
var selectedMask = getMask(mask, value);
|
|
88
|
+
|
|
89
|
+
var _mergeMask = mergeMask(value, selectedMask),
|
|
90
|
+
formatted = _mergeMask.formatted,
|
|
91
|
+
raw = _mergeMask.raw;
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
raw: raw,
|
|
95
|
+
formatted: formatted
|
|
96
|
+
};
|
|
97
|
+
}, [mask]);
|
|
98
|
+
|
|
99
|
+
var _useState = useState(applyMask(defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.toString())),
|
|
100
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
101
|
+
value = _useState2[0],
|
|
102
|
+
setValue = _useState2[1];
|
|
103
|
+
|
|
104
|
+
var handleChangeValue = useCallback(function (formattedValue) {
|
|
105
|
+
var _applyMask = applyMask(formattedValue === null || formattedValue === void 0 ? void 0 : formattedValue.toString()),
|
|
106
|
+
raw = _applyMask.raw,
|
|
107
|
+
formatted = _applyMask.formatted;
|
|
108
|
+
|
|
109
|
+
setValue({
|
|
110
|
+
raw: raw,
|
|
111
|
+
formatted: formatted
|
|
112
|
+
});
|
|
113
|
+
}, [applyMask, setValue]);
|
|
114
|
+
return [value, handleChangeValue];
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=useStringMask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStringMask.js","names":["useCallback","useState","mergeMask","value","mask","formatted","raw","iMask","iChars","length","maskChar","valueChar","rawValueChar","maskCharRegex","Array","isArray","matchRegex","RegExp","test","getMask","newValue","maskArray","regexArray","forEach","exp","push","i","useStringMask","defaultValue","applyMask","selectedMask","toString","setValue","handleChangeValue","formattedValue"],"sources":["../../../../../src/components/atoms/Input/hooks/useStringMask.ts"],"sourcesContent":["import { useCallback, useState } from 'react';\n\nexport interface MaskValue {\n formatted?: string;\n raw?: string | number;\n}\n\nexport type MaskType = string | RegExp | Array<RegExp>;\n\n/**\n * TODO:\n * @param value\n * @param mask\n * @returns\n */\nexport const mergeMask = (value = '', mask: MaskType[]): MaskValue => {\n let formatted = '';\n let raw = '';\n let iMask = 0;\n let iChars = 0;\n\n while (!(iMask === mask.length || iChars === value.length)) {\n const maskChar = mask[iMask];\n const valueChar = value[iChars];\n\n if (maskChar === valueChar) {\n formatted += maskChar;\n iChars++;\n iMask++;\n continue;\n }\n\n const rawValueChar = value[iChars];\n\n if (typeof maskChar === 'object') {\n iChars++;\n\n const maskCharRegex = Array.isArray(maskChar) ? maskChar[0] : maskChar;\n const matchRegex = RegExp(maskCharRegex).test(valueChar);\n\n if (matchRegex) {\n formatted += valueChar;\n raw += rawValueChar;\n iMask++;\n }\n } else {\n formatted += maskChar;\n iMask++;\n }\n }\n\n return { raw, formatted };\n};\n\nexport const getMask = (\n mask: MaskType[] | ((value: string) => MaskType[]),\n newValue: string\n): MaskType[] => {\n let maskArray: MaskType[];\n const regexArray: MaskType[] = [];\n\n if (typeof mask === 'function') {\n maskArray = mask(newValue);\n } else {\n maskArray = mask;\n }\n\n maskArray.forEach(exp => {\n if (typeof exp !== 'string') {\n if (Array.isArray(exp)) regexArray.push(exp);\n else regexArray.push(exp);\n } else {\n for (let i = 0; i < exp.length; i++) {\n if (exp[i] === '\\\\') {\n regexArray.push(exp[i + 1]);\n i++;\n } else {\n if (exp[i] === '9') regexArray.push(/\\d/);\n else if (exp[i] === 'a') regexArray.push(/[a-zA-Z]/);\n else regexArray.push(exp[i]);\n }\n }\n }\n });\n\n return regexArray;\n};\n\n/**\n * TODO:\n * @param mask\n * @param defaultValue\n * @returns\n */\nexport const useStringMask = (\n mask: MaskType[] | ((value: string) => MaskType[]),\n defaultValue?: string | number\n): [MaskValue, (text: string | number) => void] => {\n const applyMask = useCallback(\n (value = ''): MaskValue => {\n const selectedMask = getMask(mask, value);\n const { formatted, raw } = mergeMask(value, selectedMask);\n\n return {\n raw,\n formatted,\n };\n },\n [mask]\n );\n\n const [value, setValue] = useState<MaskValue>(\n applyMask(defaultValue?.toString())\n );\n\n const handleChangeValue = useCallback(\n (formattedValue: string | number) => {\n const { raw, formatted } = applyMask(formattedValue?.toString());\n setValue({\n raw,\n formatted,\n });\n },\n [applyMask, setValue]\n );\n\n return [value, handleChangeValue];\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { default as Hint } from './Hint';
|
|
2
|
+
export * from './hooks/useInputFocus';
|
|
3
|
+
export * from './hooks/useNumberMask';
|
|
4
|
+
export * from './hooks/useStringMask';
|
|
5
|
+
export { default as InputContainer } from './InputContainer/InputContainer';
|
|
6
|
+
export type { InputContainerProps, InputVariantType, } from './InputContainer/InputContainer';
|
|
7
|
+
export { default as InputElement } from './InputElement/InputElement';
|
|
8
|
+
export type { InputElementProps } from './InputElement/InputElement';
|
|
9
|
+
export { default as InputMaskElement } from './InputMaskElement/InputMaskElement';
|
|
10
|
+
export type { InputMaskElementProps } from './InputMaskElement/InputMaskElement';
|
|
11
|
+
export { PressableInputContainer } from './PressableInputContainer';
|
|
12
|
+
export type { PressableInputContainerProps } from './PressableInputContainer';
|
|
13
|
+
export { StyledBorderKeeper, disabledInputStyles } from './styled';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as Hint } from './Hint';
|
|
2
|
+
export * from './hooks/useInputFocus';
|
|
3
|
+
export * from './hooks/useNumberMask';
|
|
4
|
+
export * from './hooks/useStringMask';
|
|
5
|
+
export { default as InputContainer } from './InputContainer/InputContainer';
|
|
6
|
+
export { default as InputElement } from './InputElement/InputElement';
|
|
7
|
+
export { default as InputMaskElement } from './InputMaskElement/InputMaskElement';
|
|
8
|
+
export { PressableInputContainer } from './PressableInputContainer';
|
|
9
|
+
export { StyledBorderKeeper, disabledInputStyles } from './styled';
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","Hint","InputContainer","InputElement","InputMaskElement","PressableInputContainer","StyledBorderKeeper","disabledInputStyles"],"sources":["../../../../src/components/atoms/Input/index.ts"],"sourcesContent":["export { default as Hint } from './Hint';\nexport * from './hooks/useInputFocus';\nexport * from './hooks/useNumberMask';\nexport * from './hooks/useStringMask';\nexport { default as InputContainer } from './InputContainer/InputContainer';\nexport type {\n InputContainerProps,\n InputVariantType,\n} from './InputContainer/InputContainer';\nexport { default as InputElement } from './InputElement/InputElement';\nexport type { InputElementProps } from './InputElement/InputElement';\nexport { default as InputMaskElement } from './InputMaskElement/InputMaskElement';\nexport type { InputMaskElementProps } from './InputMaskElement/InputMaskElement';\nexport { PressableInputContainer } from './PressableInputContainer';\nexport type { PressableInputContainerProps } from './PressableInputContainer';\nexport { StyledBorderKeeper, disabledInputStyles } from './styled';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,IAApB,QAAgC,QAAhC;AACA,cAAc,uBAAd;AACA,cAAc,uBAAd;AACA,cAAc,uBAAd;AACA,SAASD,OAAO,IAAIE,cAApB,QAA0C,iCAA1C;AAKA,SAASF,OAAO,IAAIG,YAApB,QAAwC,6BAAxC;AAEA,SAASH,OAAO,IAAII,gBAApB,QAA4C,qCAA5C;AAEA,SAASC,uBAAT,QAAwC,2BAAxC;AAEA,SAASC,kBAAT,EAA6BC,mBAA7B,QAAwD,UAAxD"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextInput } from 'react-native';
|
|
3
|
+
import { InputElementProps } from '.';
|
|
4
|
+
import { StyleProps } from '../../../types/defaults';
|
|
5
|
+
import { InputContainerProps } from './InputContainer/InputContainer';
|
|
6
|
+
export declare const disabledInputStyles: ({ disabled, theme, }: Partial<InputContainerProps> & Partial<StyleProps>) => false | import("@emotion/native").ReactNativeStyle | undefined;
|
|
7
|
+
export declare const StyledIconContent: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
as?: import("react").ElementType<any> | undefined;
|
|
10
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
11
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const StyledInputContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
14
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
15
|
+
as?: import("react").ElementType<any> | undefined;
|
|
16
|
+
} & Partial<InputContainerProps> & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
17
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
18
|
+
}>;
|
|
19
|
+
export declare const StyledInputElementBase: import("@emotion/native").StyledComponent<import("react-native").TextInputProps & {
|
|
20
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
21
|
+
as?: import("react").ElementType<any> | undefined;
|
|
22
|
+
} & InputElementProps & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
23
|
+
ref?: import("react").Ref<TextInput> | undefined;
|
|
24
|
+
}>;
|
|
25
|
+
export declare const StyledLabelContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
26
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
27
|
+
as?: import("react").ElementType<any> | undefined;
|
|
28
|
+
} & Partial<InputContainerProps> & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
29
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const StyledBorderKeeper: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
32
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
33
|
+
as?: import("react").ElementType<any> | undefined;
|
|
34
|
+
} & Partial<InputContainerProps> & Partial<import("../../../types/defaults").ThemeProviderProps> & {
|
|
35
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
36
|
+
} & {
|
|
37
|
+
children?: import("react").ReactNode;
|
|
38
|
+
} & {
|
|
39
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
40
|
+
as?: import("react").ElementType<any> | undefined;
|
|
41
|
+
}, {}, {}>;
|
|
42
|
+
export declare const StyledInputElement: import("@emotion/native").StyledComponent<import("react-native").TextInputProps & {
|
|
43
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
44
|
+
as?: import("react").ElementType<any> | undefined;
|
|
45
|
+
} & InputElementProps & Partial<import("../../../types/defaults").ThemeProviderProps> & {
|
|
46
|
+
ref?: import("react").Ref<TextInput> | undefined;
|
|
47
|
+
} & {
|
|
48
|
+
children?: import("react").ReactNode;
|
|
49
|
+
} & {
|
|
50
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
51
|
+
as?: import("react").ElementType<any> | undefined;
|
|
52
|
+
}, {}, {}>;
|
|
53
|
+
export declare const StyledHintContainer: import("@emotion/native").StyledComponent<import("react-native").ViewProps & {
|
|
54
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
55
|
+
as?: import("react").ElementType<any> | undefined;
|
|
56
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {
|
|
57
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
58
|
+
}>;
|
|
59
|
+
export declare const StyledHintIcon: import("@emotion/native").StyledComponent<import("../Icon").IconProps & {
|
|
60
|
+
children?: import("react").ReactNode;
|
|
61
|
+
} & {
|
|
62
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
63
|
+
as?: import("react").ElementType<any> | undefined;
|
|
64
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8, _templateObject9, _templateObject10, _templateObject11, _templateObject12, _templateObject13, _templateObject14;
|
|
2
|
+
|
|
3
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
+
|
|
5
|
+
import styled, { css } from '@emotion/native';
|
|
6
|
+
import { TextInput } from 'react-native';
|
|
7
|
+
import { RFValueStr } from '../../../utils/ResponsiveFontSize';
|
|
8
|
+
import { Icon } from '../Icon';
|
|
9
|
+
|
|
10
|
+
var leftIconStyles = function leftIconStyles(_ref) {
|
|
11
|
+
var leftComponent = _ref.leftComponent,
|
|
12
|
+
theme = _ref.theme;
|
|
13
|
+
return !leftComponent && css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding-left: ", ";\n "])), theme.spacing.centi);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
var rightIconStyles = function rightIconStyles(_ref2) {
|
|
17
|
+
var rightComponent = _ref2.rightComponent,
|
|
18
|
+
theme = _ref2.theme;
|
|
19
|
+
return !rightComponent && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding-right: ", ";\n "])), theme.spacing.centi);
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
var disabledContainerStyles = function disabledContainerStyles(_ref3) {
|
|
23
|
+
var disabled = _ref3.disabled;
|
|
24
|
+
return disabled && css(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: transparent;\n "])));
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export var disabledInputStyles = function disabledInputStyles(_ref4) {
|
|
28
|
+
var disabled = _ref4.disabled,
|
|
29
|
+
theme = _ref4.theme;
|
|
30
|
+
return disabled && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme === null || theme === void 0 ? void 0 : theme.color.secondary.light);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
var focusedStyles = function focusedStyles(_ref5) {
|
|
34
|
+
var focused = _ref5.focused,
|
|
35
|
+
_ref5$borderColor = _ref5.borderColor,
|
|
36
|
+
borderColor = _ref5$borderColor === void 0 ? 'secondary' : _ref5$borderColor,
|
|
37
|
+
theme = _ref5.theme;
|
|
38
|
+
return focused && css(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n border-width: ", ";\n border-color: ", ";\n "])), theme.borderWidth.nano, theme.color[borderColor].dark);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export var StyledIconContent = styled.View(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n z-index: ", ";\n flex-direction: row;\n align-items: center;\n"])), function (_ref6) {
|
|
42
|
+
var theme = _ref6.theme;
|
|
43
|
+
return theme.zIndex["default"];
|
|
44
|
+
});
|
|
45
|
+
export var StyledInputContainer = styled.View(_templateObject7 || (_templateObject7 = _taggedTemplateLiteral(["\n flex-direction: row;\n align-items: center;\n min-height: ", ";\n"])), RFValueStr('44px'));
|
|
46
|
+
export var StyledInputElementBase = styled(TextInput)(_templateObject8 || (_templateObject8 = _taggedTemplateLiteral(["\n font-family: ", ";\n font-size: ", ";\n font-weight: ", ";\n color: ", ";\n"])), function (_ref7) {
|
|
47
|
+
var theme = _ref7.theme;
|
|
48
|
+
return "'".concat(theme.font.stack["default"], "'");
|
|
49
|
+
}, function (_ref8) {
|
|
50
|
+
var theme = _ref8.theme;
|
|
51
|
+
return theme.typography.base.fontSize;
|
|
52
|
+
}, function (_ref9) {
|
|
53
|
+
var theme = _ref9.theme;
|
|
54
|
+
return theme.font.weight.bold;
|
|
55
|
+
}, function (_ref10) {
|
|
56
|
+
var theme = _ref10.theme;
|
|
57
|
+
return theme.font.color.dark;
|
|
58
|
+
});
|
|
59
|
+
export var StyledLabelContainer = styled.View(function (props) {
|
|
60
|
+
return css(_templateObject9 || (_templateObject9 = _taggedTemplateLiteral(["\n flex: 1;\n padding: ", " 0;\n ", "\n ", "\n "])), props.theme.spacing.micro, leftIconStyles(props), rightIconStyles(props));
|
|
61
|
+
});
|
|
62
|
+
var StyledBorderKeeperBase = styled.View(_templateObject10 || (_templateObject10 = _taggedTemplateLiteral(["\n background-color: ", ";\n border-color: ", ";\n border-radius: ", ";\n border-width: ", ";\n position: absolute;\n width: 100%;\n height: 100%;\n"])), function (_ref11) {
|
|
63
|
+
var theme = _ref11.theme;
|
|
64
|
+
return theme.miscellaneous.surfaceColor;
|
|
65
|
+
}, function (_ref12) {
|
|
66
|
+
var theme = _ref12.theme,
|
|
67
|
+
_ref12$borderColor = _ref12.borderColor,
|
|
68
|
+
borderColor = _ref12$borderColor === void 0 ? 'secondary' : _ref12$borderColor,
|
|
69
|
+
_ref12$borderColorGra = _ref12.borderColorGradation,
|
|
70
|
+
borderColorGradation = _ref12$borderColorGra === void 0 ? 'light' : _ref12$borderColorGra;
|
|
71
|
+
return theme.color[borderColor][borderColorGradation];
|
|
72
|
+
}, function (_ref13) {
|
|
73
|
+
var theme = _ref13.theme;
|
|
74
|
+
return theme.borderRadius.mili;
|
|
75
|
+
}, function (_ref14) {
|
|
76
|
+
var theme = _ref14.theme;
|
|
77
|
+
return theme.borderWidth.pico;
|
|
78
|
+
});
|
|
79
|
+
export var StyledBorderKeeper = styled(StyledBorderKeeperBase)(function (props) {
|
|
80
|
+
return css(_templateObject11 || (_templateObject11 = _taggedTemplateLiteral(["\n ", "\n ", "\n "])), focusedStyles(props), disabledContainerStyles(props));
|
|
81
|
+
});
|
|
82
|
+
export var StyledInputElement = styled(StyledInputElementBase)(function (props) {
|
|
83
|
+
return css(_templateObject12 || (_templateObject12 = _taggedTemplateLiteral(["\n ", "\n "])), disabledInputStyles(props));
|
|
84
|
+
});
|
|
85
|
+
export var StyledHintContainer = styled.View(_templateObject13 || (_templateObject13 = _taggedTemplateLiteral(["\n margin-top: ", ";\n flex-direction: row;\n align-items: center;\n"])), function (_ref15) {
|
|
86
|
+
var theme = _ref15.theme;
|
|
87
|
+
return theme.spacing.micro;
|
|
88
|
+
});
|
|
89
|
+
export var StyledHintIcon = styled(Icon)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n margin-right: ", ";\n"])), function (_ref16) {
|
|
90
|
+
var theme = _ref16.theme;
|
|
91
|
+
return theme.spacing.micro;
|
|
92
|
+
});
|
|
93
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","names":["styled","css","TextInput","RFValueStr","Icon","leftIconStyles","leftComponent","theme","spacing","centi","rightIconStyles","rightComponent","disabledContainerStyles","disabled","disabledInputStyles","color","secondary","light","focusedStyles","focused","borderColor","borderWidth","nano","dark","StyledIconContent","View","zIndex","StyledInputContainer","StyledInputElementBase","font","stack","typography","base","fontSize","weight","bold","StyledLabelContainer","props","micro","StyledBorderKeeperBase","miscellaneous","surfaceColor","borderColorGradation","borderRadius","mili","pico","StyledBorderKeeper","StyledInputElement","StyledHintContainer","StyledHintIcon"],"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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"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var _excluded = ["children", "elevated"];
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
+
|
|
7
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
|
+
|
|
9
|
+
import React from 'react';
|
|
10
|
+
import { StyledPaper } from './styled';
|
|
11
|
+
|
|
12
|
+
var Paper = function Paper(_ref) {
|
|
13
|
+
var children = _ref.children,
|
|
14
|
+
_ref$elevated = _ref.elevated,
|
|
15
|
+
elevated = _ref$elevated === void 0 ? false : _ref$elevated,
|
|
16
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
17
|
+
|
|
18
|
+
return React.createElement(StyledPaper, _extends({}, rest, {
|
|
19
|
+
elevated: elevated
|
|
20
|
+
}), children);
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default Paper;
|
|
24
|
+
//# sourceMappingURL=Paper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Paper.js","names":["React","StyledPaper","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,OAAOA,KAAP,MAA0B,OAA1B;AAEA,SAASC,WAAT,QAA4B,UAA5B;;AAQA,IAAMC,KAAqB,GAAG,SAAxBA,KAAwB;EAAA,IAC5BC,QAD4B,QAC5BA,QAD4B;EAAA,yBAE5BC,QAF4B;EAAA,IAE5BA,QAF4B,8BAEjB,KAFiB;EAAA,IAGzBC,IAHyB;;EAAA,OAK5B,oBAAC,WAAD,eAAiBA,IAAjB;IAAuB,QAAQ,EAAED;EAAjC,IACGD,QADH,CAL4B;AAAA,CAA9B;;AAUA,eAAeD,KAAf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","Paper"],"sources":["../../../../src/components/atoms/Paper/index.ts"],"sourcesContent":["export { default as Paper } from './Paper';\nexport type { PaperProps } from './Paper';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,KAApB,QAAiC,SAAjC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Animated } from 'react-native';
|
|
3
|
+
import { PaperProps } from './Paper';
|
|
4
|
+
export declare const StyledPaper: import("@emotion/native").StyledComponent<Animated.AnimatedProps<import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>> & {
|
|
5
|
+
children?: import("react").ReactNode;
|
|
6
|
+
} & {
|
|
7
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
8
|
+
as?: import("react").ElementType<any> | undefined;
|
|
9
|
+
} & PaperProps & Partial<import("@tecsinapse/react-core").ThemeProviderProps>, {}, {}>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var _templateObject;
|
|
2
|
+
|
|
3
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
+
|
|
5
|
+
import { Animated } from 'react-native';
|
|
6
|
+
import styled, { css } from '@emotion/native';
|
|
7
|
+
import { baseStyles, elevatedStyles } from '../shared/PaperAndCard';
|
|
8
|
+
export var StyledPaper = styled(Animated.View)(function (props) {
|
|
9
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n ", "\n ", "\n "])), baseStyles(props), elevatedStyles(props));
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","names":["Animated","styled","css","baseStyles","elevatedStyles","StyledPaper","View","props"],"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,SAASA,QAAT,QAAyB,cAAzB;AACA,OAAOC,MAAP,IAAiBC,GAAjB,QAA4B,iBAA5B;AAGA,SAASC,UAAT,EAAqBC,cAArB,QAA2C,wBAA3C;AAEA,OAAO,IAAMC,WAAW,GAAGJ,MAAM,CAACD,QAAQ,CAACM,IAAV,CAAN,CAGzB,UAAAC,KAAK;EAAA,OAAIL,GAAJ,8FACDC,UAAU,CAACI,KAAD,CADT,EAEDH,cAAc,CAACG,KAAD,CAFb;AAAA,CAHoB,CAApB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { PressableProps, StyleProp, ViewStyle } from 'react-native';
|
|
3
|
+
export interface PressableSurfaceProps extends PressableProps {
|
|
4
|
+
effect?: 'darken' | 'lighten' | 'none';
|
|
5
|
+
surfaceColor?: string;
|
|
6
|
+
effectIntensity?: number;
|
|
7
|
+
effectStyle?: (pressed: boolean) => StyleProp<ViewStyle>;
|
|
8
|
+
}
|
|
9
|
+
declare const PressableSurface: FC<PressableSurfaceProps>;
|
|
10
|
+
export default PressableSurface;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
var _excluded = ["children", "surfaceColor", "effect", "effectIntensity", "effectStyle", "style"];
|
|
2
|
+
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
|
|
5
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
6
|
+
|
|
7
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
8
|
+
|
|
9
|
+
import { useTheme } from '@emotion/react';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { Pressable } from 'react-native';
|
|
12
|
+
import { lightenDarkenColor } from '../../../utils';
|
|
13
|
+
var COLOR_VARIATION_FACTOR = 25;
|
|
14
|
+
|
|
15
|
+
var PressableSurface = function PressableSurface(_ref) {
|
|
16
|
+
var children = _ref.children,
|
|
17
|
+
surfaceColor = _ref.surfaceColor,
|
|
18
|
+
effect = _ref.effect,
|
|
19
|
+
effectIntensity = _ref.effectIntensity,
|
|
20
|
+
effectStyle = _ref.effectStyle,
|
|
21
|
+
style = _ref.style,
|
|
22
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
|
|
24
|
+
var theme = useTheme();
|
|
25
|
+
var effectBaseColor = theme.miscellaneous.surfaceColor;
|
|
26
|
+
var bgColor = 'transparent';
|
|
27
|
+
|
|
28
|
+
if (surfaceColor) {
|
|
29
|
+
effectBaseColor = surfaceColor;
|
|
30
|
+
bgColor = effectBaseColor;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
var readyStyle = prepareStyle({
|
|
34
|
+
effect: effect,
|
|
35
|
+
effectIntensity: effectIntensity,
|
|
36
|
+
style: style,
|
|
37
|
+
effectStyle: effectStyle
|
|
38
|
+
}, effectBaseColor, bgColor);
|
|
39
|
+
return React.createElement(Pressable, _extends({}, rest, {
|
|
40
|
+
style: readyStyle
|
|
41
|
+
}), children);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
var prepareStyle = function prepareStyle(props, effectColor, bgColor) {
|
|
45
|
+
var _props$effect = props.effect,
|
|
46
|
+
effect = _props$effect === void 0 ? 'darken' : _props$effect,
|
|
47
|
+
_props$effectIntensit = props.effectIntensity,
|
|
48
|
+
effectIntensity = _props$effectIntensit === void 0 ? COLOR_VARIATION_FACTOR : _props$effectIntensit,
|
|
49
|
+
style = props.style,
|
|
50
|
+
effectStyle = props.effectStyle;
|
|
51
|
+
var lighten = lightenDarkenColor(effectColor, effectIntensity);
|
|
52
|
+
var darken = lightenDarkenColor(effectColor, -effectIntensity);
|
|
53
|
+
var composedStyle = [{
|
|
54
|
+
backgroundColor: bgColor
|
|
55
|
+
}, style];
|
|
56
|
+
|
|
57
|
+
if (effectStyle) {
|
|
58
|
+
return function (_ref2) {
|
|
59
|
+
var pressed = _ref2.pressed;
|
|
60
|
+
return [composedStyle, effectStyle(pressed)];
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
switch (effect) {
|
|
65
|
+
case 'darken':
|
|
66
|
+
return applyEffectStyle(composedStyle, darken);
|
|
67
|
+
|
|
68
|
+
case 'lighten':
|
|
69
|
+
return applyEffectStyle(composedStyle, lighten);
|
|
70
|
+
|
|
71
|
+
case 'none':
|
|
72
|
+
return composedStyle;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
var applyEffectStyle = function applyEffectStyle(style, variation) {
|
|
77
|
+
return function (_ref3) {
|
|
78
|
+
var pressed = _ref3.pressed;
|
|
79
|
+
return [style, pressed && {
|
|
80
|
+
backgroundColor: variation
|
|
81
|
+
}];
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export default PressableSurface;
|
|
86
|
+
//# sourceMappingURL=PressableSurface.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PressableSurface.js","names":["useTheme","React","Pressable","lightenDarkenColor","COLOR_VARIATION_FACTOR","PressableSurface","children","surfaceColor","effect","effectIntensity","effectStyle","style","rest","theme","effectBaseColor","miscellaneous","bgColor","readyStyle","prepareStyle","props","effectColor","lighten","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,SAASA,QAAT,QAAyB,gBAAzB;AACA,OAAOC,KAAP,MAA0B,OAA1B;AACA,SAASC,SAAT,QAAgE,cAAhE;AAEA,SAASC,kBAAT,QAAmC,gBAAnC;AAEA,IAAMC,sBAAsB,GAAG,EAA/B;;AASA,IAAMC,gBAA2C,GAAG,SAA9CA,gBAA8C,OAQ9C;EAAA,IAPJC,QAOI,QAPJA,QAOI;EAAA,IANJC,YAMI,QANJA,YAMI;EAAA,IALJC,MAKI,QALJA,MAKI;EAAA,IAJJC,eAII,QAJJA,eAII;EAAA,IAHJC,WAGI,QAHJA,WAGI;EAAA,IAFJC,KAEI,QAFJA,KAEI;EAAA,IADDC,IACC;;EACJ,IAAMC,KAAK,GAAGb,QAAQ,EAAtB;EACA,IAAIc,eAAe,GAAGD,KAAK,CAACE,aAAN,CAAoBR,YAA1C;EACA,IAAIS,OAAO,GAAG,aAAd;;EAEA,IAAIT,YAAJ,EAAkB;IAChBO,eAAe,GAAGP,YAAlB;IACAS,OAAO,GAAGF,eAAV;EACD;;EAED,IAAMG,UAAU,GAAGC,YAAY,CAC7B;IAAEV,MAAM,EAANA,MAAF;IAAUC,eAAe,EAAfA,eAAV;IAA2BE,KAAK,EAALA,KAA3B;IAAkCD,WAAW,EAAXA;EAAlC,CAD6B,EAE7BI,eAF6B,EAG7BE,OAH6B,CAA/B;EAKA,OACE,oBAAC,SAAD,eAAeJ,IAAf;IAAqB,KAAK,EAAEK;EAA5B,IACGX,QADH,CADF;AAKD,CA5BD;;AA8BA,IAAMY,YAAY,GAAG,SAAfA,YAAe,CACnBC,KADmB,EAEnBC,WAFmB,EAGnBJ,OAHmB,EAIX;EACR,oBAKIG,KALJ,CACEX,MADF;EAAA,IACEA,MADF,8BACW,QADX;EAAA,4BAKIW,KALJ,CAEEV,eAFF;EAAA,IAEEA,eAFF,sCAEoBL,sBAFpB;EAAA,IAGEO,KAHF,GAKIQ,KALJ,CAGER,KAHF;EAAA,IAIED,WAJF,GAKIS,KALJ,CAIET,WAJF;EAOA,IAAMW,OAAO,GAAGlB,kBAAkB,CAACiB,WAAD,EAAcX,eAAd,CAAlC;EACA,IAAMa,MAAM,GAAGnB,kBAAkB,CAACiB,WAAD,EAAc,CAACX,eAAf,CAAjC;EACA,IAAMc,aAAa,GAAG,CAAC;IAAEC,eAAe,EAAER;EAAnB,CAAD,EAA+BL,KAA/B,CAAtB;;EAEA,IAAID,WAAJ,EAAiB;IACf,OAAO;MAAA,IAAGe,OAAH,SAAGA,OAAH;MAAA,OAAiB,CAACF,aAAD,EAAgBb,WAAW,CAACe,OAAD,CAA3B,CAAjB;IAAA,CAAP;EACD;;EAED,QAAQjB,MAAR;IACE,KAAK,QAAL;MACE,OAAOkB,gBAAgB,CAACH,aAAD,EAAgBD,MAAhB,CAAvB;;IAEF,KAAK,SAAL;MACE,OAAOI,gBAAgB,CAACH,aAAD,EAAgBF,OAAhB,CAAvB;;IAEF,KAAK,MAAL;MACE,OAAOE,aAAP;EARJ;AAUD,CA9BD;;AAgCA,IAAMG,gBAAgB,GAAG,SAAnBA,gBAAmB,CAACf,KAAD,EAAagB,SAAb,EAAmC;EAC1D,OAAO;IAAA,IAAGF,OAAH,SAAGA,OAAH;IAAA,OAAiB,CAACd,KAAD,EAAQc,OAAO,IAAI;MAAED,eAAe,EAAEG;IAAnB,CAAnB,CAAjB;EAAA,CAAP;AACD,CAFD;;AAIA,eAAetB,gBAAf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","PressableSurface"],"sources":["../../../../src/components/atoms/PressableSurface/index.ts"],"sourcesContent":["export { default as PressableSurface } from './PressableSurface';\nexport type { PressableSurfaceProps } from './PressableSurface';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,gBAApB,QAA4C,oBAA5C"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ViewProps } from 'react-native';
|
|
3
|
+
import { ColorGradationType, ColorType } from '@tecsinapse/react-core';
|
|
4
|
+
export interface ProgressBarProps extends ViewProps {
|
|
5
|
+
segments?: number;
|
|
6
|
+
valueMin?: number;
|
|
7
|
+
valueMax?: number;
|
|
8
|
+
valueNow: number | string;
|
|
9
|
+
color?: ColorType;
|
|
10
|
+
colorTone?: ColorGradationType;
|
|
11
|
+
animate: boolean;
|
|
12
|
+
animationParameters?: {
|
|
13
|
+
direction: 'left' | 'right';
|
|
14
|
+
duration: number;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
declare const ProgressBar: React.FC<ProgressBarProps>;
|
|
18
|
+
export default ProgressBar;
|