@tecsinapse/react-core 1.17.4 → 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 +42 -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 +63 -58
- package/dist/components/atoms/BoxContent/styled.js.map +1 -1
- package/dist/components/atoms/Button/Button.js +21 -18
- 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 +4 -2
- 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 +4 -2
- 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 +32 -20
- 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 +12 -8
- 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 +17 -13
- 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 +63 -45
- 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.d.ts +1 -1
- package/dist/components/atoms/GroupButton/GroupButton.js +25 -21
- 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 +98 -101
- package/dist/components/atoms/GroupButton/styled.js.map +1 -1
- package/dist/components/atoms/Icon/Icon.js +16 -13
- package/dist/components/atoms/Icon/Icon.js.map +1 -1
- package/dist/components/atoms/Icon/helpers.js +14 -8
- 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.d.ts +1 -1
- package/dist/components/atoms/Input/InputContainer/InputContainer.js +23 -20
- package/dist/components/atoms/Input/InputContainer/InputContainer.js.map +1 -1
- package/dist/components/atoms/Input/InputElement/InputElement.d.ts +3 -4
- package/dist/components/atoms/Input/InputElement/InputElement.js +14 -11
- package/dist/components/atoms/Input/InputElement/InputElement.js.map +1 -1
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.d.ts +3 -4
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js +18 -15
- package/dist/components/atoms/Input/InputMaskElement/InputMaskElement.js.map +1 -1
- package/dist/components/atoms/Input/PressableInputContainer/PressableInputContainer.js +12 -9
- 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 +11 -6
- 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 +120 -107
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/Paper/Paper.js +14 -9
- 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 +28 -19
- 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.d.ts +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 +39 -30
- package/dist/components/atoms/ProgressBar/styled.js.map +1 -1
- package/dist/components/atoms/RadioButton/RadioButton.js +17 -13
- 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 +39 -30
- package/dist/components/atoms/RadioButton/styled.js.map +1 -1
- package/dist/components/atoms/Switch/Switch.d.ts +1 -1
- package/dist/components/atoms/Switch/Switch.js +17 -14
- 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.d.ts +2 -14
- package/dist/components/atoms/Switch/styled.js +30 -23
- package/dist/components/atoms/Switch/styled.js.map +1 -1
- package/dist/components/atoms/Tag/Tag.js +15 -12
- 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 +48 -44
- package/dist/components/atoms/Tag/styled.js.map +1 -1
- package/dist/components/atoms/Text/Text.js +20 -17
- 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 +52 -34
- 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 +59 -71
- package/dist/components/molecules/Calendar/styled.js.map +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js +35 -32
- 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 +20 -14
- package/dist/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js +44 -41
- 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 -25
- 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 +89 -69
- package/dist/components/molecules/DateTimeSelector/styled.js.map +1 -1
- package/dist/components/molecules/Grid/functions.d.ts +3 -0
- package/dist/components/molecules/Grid/functions.js +25 -0
- package/dist/components/molecules/Grid/functions.js.map +1 -0
- package/dist/components/molecules/Grid/index.d.ts +42 -2
- package/dist/components/molecules/Grid/index.js +16 -15
- package/dist/components/molecules/Grid/index.js.map +1 -1
- package/dist/components/molecules/HintInputContainer/HintInputContainer.js +20 -16
- 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/HintInputContainer/styled.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconComponent.d.ts +9 -0
- package/dist/components/molecules/IconTextButton/IconComponent.js +33 -0
- package/dist/components/molecules/IconTextButton/IconComponent.js.map +1 -0
- package/dist/components/molecules/IconTextButton/IconTextButton.d.ts +8 -0
- package/dist/components/molecules/IconTextButton/IconTextButton.js +6 -0
- package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
- package/dist/components/molecules/IconTextButton/index.d.ts +2 -0
- package/dist/components/molecules/IconTextButton/index.js +16 -0
- package/dist/components/molecules/IconTextButton/index.js.map +1 -0
- package/dist/components/molecules/IconTextButton/styled.d.ts +4 -0
- package/dist/components/molecules/IconTextButton/styled.js +29 -0
- package/dist/components/molecules/IconTextButton/styled.js.map +1 -0
- package/dist/components/molecules/InputPassword/InputPasswordIcon.js +10 -7
- 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.d.ts +7 -0
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +6 -0
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
- package/dist/components/molecules/LabeledSwitch/index.d.ts +1 -0
- package/dist/components/molecules/LabeledSwitch/index.js +6 -0
- package/dist/components/molecules/LabeledSwitch/index.js.map +1 -0
- package/dist/components/molecules/Snackbar/Snackbar.js +26 -22
- 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 +53 -77
- package/dist/components/molecules/Snackbar/styled.js.map +1 -1
- package/dist/components/molecules/TextArea/TextArea.d.ts +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.d.ts +2 -14
- 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 +58 -28
- package/dist/index.js +319 -175
- 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.d.ts +2 -1
- package/dist/styles/definitions.js +13 -4
- package/dist/styles/definitions.js.map +1 -1
- package/dist/styles/light.js +5 -2
- package/dist/styles/light.js.map +1 -1
- package/dist/types/defaults.d.ts +8 -2
- package/dist/types/defaults.js +3 -1
- package/dist/types/defaults.js.map +1 -1
- package/dist/utils/IPhoneXHelper.js +6 -4
- package/dist/utils/IPhoneXHelper.js.map +1 -1
- package/dist/utils/ResponsiveFontSize.js +12 -9
- package/dist/utils/ResponsiveFontSize.js.map +1 -1
- package/dist/utils/extractNumbersFromString.js +4 -2
- 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.d.ts +5 -4
- package/dist/utils/index.js +71 -23
- 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.d.ts +6 -0
- package/dist/utils/variantComplement.js +37 -0
- package/dist/utils/variantComplement.js.map +1 -0
- 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 +12 -7
- package/src/components/atoms/Avatar/index.ts +2 -1
- package/src/components/atoms/Badge/index.ts +2 -1
- package/src/components/atoms/Badge/styled.ts +2 -3
- 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/GroupButton.tsx +2 -5
- package/src/components/atoms/GroupButton/index.ts +4 -9
- package/src/components/atoms/Icon/index.ts +2 -1
- package/src/components/atoms/Input/InputContainer/InputContainer.tsx +3 -3
- package/src/components/atoms/Input/InputElement/InputElement.tsx +4 -5
- package/src/components/atoms/Input/InputMaskElement/InputMaskElement.tsx +4 -5
- 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/ProgressBar.tsx +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/Switch.tsx +39 -19
- package/src/components/atoms/Switch/animation.ts +4 -6
- package/src/components/atoms/Switch/index.ts +2 -1
- package/src/components/atoms/Switch/styled.ts +4 -6
- package/src/components/atoms/Tag/Tag.tsx +1 -1
- package/src/components/atoms/Tag/index.ts +2 -1
- package/src/components/atoms/Text/index.ts +2 -1
- package/src/components/atoms/shared/PaperAndCard.ts +1 -1
- package/src/components/molecules/Calendar/index.ts +3 -3
- package/src/components/molecules/DatePicker/DatePicker.tsx +12 -8
- package/src/components/molecules/DatePicker/index.ts +2 -1
- package/src/components/molecules/DateTimePicker/DateTimePicker.tsx +19 -11
- package/src/components/molecules/DateTimePicker/index.ts +2 -4
- package/src/components/molecules/DateTimeSelector/DateTimeSelector.tsx +0 -1
- package/src/components/molecules/DateTimeSelector/index.ts +2 -2
- package/src/components/molecules/Grid/functions.ts +29 -0
- package/src/components/molecules/Grid/index.ts +66 -2
- package/src/components/molecules/HintInputContainer/HintInputContainer.tsx +6 -1
- package/src/components/molecules/IconTextButton/IconComponent.tsx +31 -0
- package/src/components/molecules/IconTextButton/IconTextButton.tsx +10 -0
- package/src/components/molecules/IconTextButton/index.ts +5 -0
- package/src/components/molecules/IconTextButton/styled.ts +20 -0
- package/src/components/molecules/LabeledSwitch/LabeledSwitch.tsx +9 -0
- package/src/components/molecules/LabeledSwitch/index.ts +1 -0
- package/src/components/molecules/Snackbar/Snackbar.tsx +1 -1
- package/src/components/molecules/Snackbar/index.ts +2 -1
- package/src/components/molecules/Snackbar/styled.ts +6 -2
- package/src/components/molecules/TextArea/TextArea.tsx +6 -2
- package/src/components/molecules/TextArea/index.ts +2 -1
- package/src/components/molecules/TextArea/styled.ts +5 -2
- package/src/index.ts +82 -54
- package/src/styles/definitions.ts +8 -1
- package/src/styles/light.ts +2 -0
- package/src/types/defaults.ts +11 -1
- package/src/utils/IPhoneXHelper.ts +27 -22
- package/src/utils/ResponsiveFontSize.ts +55 -36
- package/src/utils/index.ts +5 -4
- package/src/utils/variantComplement.ts +36 -0
- package/tsconfig.build.esm.json +10 -0
- package/dist/components/molecules/Grid/Grid.d.ts +0 -15
- package/dist/components/molecules/Grid/Grid.js +0 -55
- package/dist/components/molecules/Grid/Grid.js.map +0 -1
- package/dist/components/molecules/Grid/Item/Item.d.ts +0 -30
- package/dist/components/molecules/Grid/Item/Item.js +0 -68
- package/dist/components/molecules/Grid/Item/Item.js.map +0 -1
- package/dist/components/molecules/Grid/Item/index.d.ts +0 -1
- package/dist/components/molecules/Grid/Item/index.js +0 -14
- package/dist/components/molecules/Grid/Item/index.js.map +0 -1
- package/src/components/molecules/Grid/Grid.stories.tsx +0 -132
- package/src/components/molecules/Grid/Grid.tsx +0 -87
- package/src/components/molecules/Grid/Item/Item.tsx +0 -93
- package/src/components/molecules/Grid/Item/index.ts +0 -1
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
var _excluded = ["value", "icon", "variant", "dismiss", "onDismiss", "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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
6
|
+
|
|
7
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
8
|
+
|
|
9
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
|
+
|
|
11
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
12
|
+
|
|
13
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
14
|
+
|
|
15
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
16
|
+
|
|
17
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
18
|
+
|
|
19
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
20
|
+
|
|
21
|
+
import React, { useCallback, useState } from 'react';
|
|
22
|
+
import { Animated } from 'react-native';
|
|
23
|
+
import { PressableSurface } from '../PressableSurface';
|
|
24
|
+
import { StyledCloseIcon, StyledLeftIcon, StyledTagContainer } from './styled';
|
|
25
|
+
|
|
26
|
+
var Tag = function Tag(_ref) {
|
|
27
|
+
var value = _ref.value,
|
|
28
|
+
icon = _ref.icon,
|
|
29
|
+
_ref$variant = _ref.variant,
|
|
30
|
+
variant = _ref$variant === void 0 ? 'small' : _ref$variant,
|
|
31
|
+
_ref$dismiss = _ref.dismiss,
|
|
32
|
+
canDismiss = _ref$dismiss === void 0 ? false : _ref$dismiss,
|
|
33
|
+
onDismiss = _ref.onDismiss,
|
|
34
|
+
style = _ref.style,
|
|
35
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
36
|
+
|
|
37
|
+
var _useState = useState(false),
|
|
38
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
39
|
+
dismiss = _useState2[0],
|
|
40
|
+
setDismiss = _useState2[1];
|
|
41
|
+
|
|
42
|
+
var fadeAnim = React.useRef(new Animated.Value(1)).current;
|
|
43
|
+
var duration = 300;
|
|
44
|
+
|
|
45
|
+
var fadeOut = function fadeOut() {
|
|
46
|
+
Animated.timing(fadeAnim, {
|
|
47
|
+
toValue: 0,
|
|
48
|
+
duration: duration,
|
|
49
|
+
useNativeDriver: true
|
|
50
|
+
}).start();
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var handleDismiss = useCallback(function () {
|
|
54
|
+
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
55
|
+
fadeOut();
|
|
56
|
+
setTimeout(function () {
|
|
57
|
+
return setDismiss(true);
|
|
58
|
+
}, duration);
|
|
59
|
+
}, [onDismiss]);
|
|
60
|
+
return React.createElement(StyledTagContainer, _extends({}, rest, {
|
|
61
|
+
variant: variant,
|
|
62
|
+
style: [{
|
|
63
|
+
opacity: fadeAnim
|
|
64
|
+
}, style],
|
|
65
|
+
visible: !dismiss
|
|
66
|
+
}), icon && React.createElement(StyledLeftIcon, _extends({
|
|
67
|
+
size: icon.size || 'micro',
|
|
68
|
+
colorVariant: icon.colorVariant || 'primary'
|
|
69
|
+
}, icon)), value, canDismiss && React.createElement(PressableSurface, {
|
|
70
|
+
onPress: handleDismiss
|
|
71
|
+
}, React.createElement(StyledCloseIcon, {
|
|
72
|
+
name: "close-outline",
|
|
73
|
+
type: "ionicon",
|
|
74
|
+
size: "centi",
|
|
75
|
+
fontColor: "medium"
|
|
76
|
+
})));
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export default Tag;
|
|
80
|
+
//# sourceMappingURL=Tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.js","names":["React","useCallback","useState","Animated","PressableSurface","StyledCloseIcon","StyledLeftIcon","StyledTagContainer","Tag","value","icon","variant","dismiss","canDismiss","onDismiss","style","rest","setDismiss","fadeAnim","useRef","Value","current","duration","fadeOut","timing","toValue","useNativeDriver","start","handleDismiss","setTimeout","opacity","size","colorVariant"],"sources":["../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React, { useCallback, useState } from 'react';\nimport { Animated, ViewProps } from 'react-native';\nimport { IconProps } from '../Icon';\nimport { PressableSurface } from '../PressableSurface';\nimport { StyledCloseIcon, StyledLeftIcon, StyledTagContainer } from './styled';\n\nexport interface TagProps extends ViewProps {\n value: React.ReactNode;\n icon?: IconProps;\n dismiss?: boolean;\n onDismiss?: () => void;\n variant?: 'small' | 'default';\n}\n\nconst Tag: React.FC<TagProps> = ({\n value,\n icon,\n variant = 'small',\n dismiss: canDismiss = false,\n onDismiss,\n style,\n ...rest\n}): JSX.Element => {\n const [dismiss, setDismiss] = useState(false);\n const fadeAnim = React.useRef(new Animated.Value(1)).current;\n const duration = 300;\n\n const fadeOut = () => {\n Animated.timing(fadeAnim, {\n toValue: 0,\n duration,\n useNativeDriver: true,\n }).start();\n };\n\n const handleDismiss = useCallback(() => {\n onDismiss?.();\n fadeOut();\n setTimeout(() => setDismiss(true), duration);\n }, [onDismiss]);\n\n return (\n <StyledTagContainer\n {...rest}\n variant={variant}\n style={[{ opacity: fadeAnim as unknown as number }, style]}\n visible={!dismiss}\n >\n {icon && (\n <StyledLeftIcon\n size={icon.size || 'micro'}\n colorVariant={icon.colorVariant || 'primary'}\n {...icon}\n />\n )}\n {value}\n {canDismiss && (\n <PressableSurface onPress={handleDismiss}>\n <StyledCloseIcon\n name=\"close-outline\"\n type=\"ionicon\"\n size=\"centi\"\n fontColor=\"medium\"\n />\n </PressableSurface>\n )}\n </StyledTagContainer>\n );\n};\n\nexport default Tag;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,QAA7B,QAA6C,OAA7C;AACA,SAASC,QAAT,QAAoC,cAApC;AAEA,SAASC,gBAAT,QAAiC,qBAAjC;AACA,SAASC,eAAT,EAA0BC,cAA1B,EAA0CC,kBAA1C,QAAoE,UAApE;;AAUA,IAAMC,GAAuB,GAAG,SAA1BA,GAA0B,OAQb;EAAA,IAPjBC,KAOiB,QAPjBA,KAOiB;EAAA,IANjBC,IAMiB,QANjBA,IAMiB;EAAA,wBALjBC,OAKiB;EAAA,IALjBA,OAKiB,6BALP,OAKO;EAAA,wBAJjBC,OAIiB;EAAA,IAJRC,UAIQ,6BAJK,KAIL;EAAA,IAHjBC,SAGiB,QAHjBA,SAGiB;EAAA,IAFjBC,KAEiB,QAFjBA,KAEiB;EAAA,IADdC,IACc;;EACjB,gBAA8Bd,QAAQ,CAAC,KAAD,CAAtC;EAAA;EAAA,IAAOU,OAAP;EAAA,IAAgBK,UAAhB;;EACA,IAAMC,QAAQ,GAAGlB,KAAK,CAACmB,MAAN,CAAa,IAAIhB,QAAQ,CAACiB,KAAb,CAAmB,CAAnB,CAAb,EAAoCC,OAArD;EACA,IAAMC,QAAQ,GAAG,GAAjB;;EAEA,IAAMC,OAAO,GAAG,SAAVA,OAAU,GAAM;IACpBpB,QAAQ,CAACqB,MAAT,CAAgBN,QAAhB,EAA0B;MACxBO,OAAO,EAAE,CADe;MAExBH,QAAQ,EAARA,QAFwB;MAGxBI,eAAe,EAAE;IAHO,CAA1B,EAIGC,KAJH;EAKD,CAND;;EAQA,IAAMC,aAAa,GAAG3B,WAAW,CAAC,YAAM;IACtCa,SAAS,SAAT,IAAAA,SAAS,WAAT,YAAAA,SAAS;IACTS,OAAO;IACPM,UAAU,CAAC;MAAA,OAAMZ,UAAU,CAAC,IAAD,CAAhB;IAAA,CAAD,EAAyBK,QAAzB,CAAV;EACD,CAJgC,EAI9B,CAACR,SAAD,CAJ8B,CAAjC;EAMA,OACE,oBAAC,kBAAD,eACME,IADN;IAEE,OAAO,EAAEL,OAFX;IAGE,KAAK,EAAE,CAAC;MAAEmB,OAAO,EAAEZ;IAAX,CAAD,EAA6CH,KAA7C,CAHT;IAIE,OAAO,EAAE,CAACH;EAJZ,IAMGF,IAAI,IACH,oBAAC,cAAD;IACE,IAAI,EAAEA,IAAI,CAACqB,IAAL,IAAa,OADrB;IAEE,YAAY,EAAErB,IAAI,CAACsB,YAAL,IAAqB;EAFrC,GAGMtB,IAHN,EAPJ,EAaGD,KAbH,EAcGI,UAAU,IACT,oBAAC,gBAAD;IAAkB,OAAO,EAAEe;EAA3B,GACE,oBAAC,eAAD;IACE,IAAI,EAAC,eADP;IAEE,IAAI,EAAC,SAFP;IAGE,IAAI,EAAC,OAHP;IAIE,SAAS,EAAC;EAJZ,EADF,CAfJ,CADF;AA2BD,CAtDD;;AAwDA,eAAepB,GAAf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","Tag"],"sources":["../../../../src/components/atoms/Tag/index.ts"],"sourcesContent":["export { default as Tag } from './Tag';\nexport type { TagProps } from './Tag';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,GAApB,QAA+B,OAA/B"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Animated, ViewProps } from 'react-native';
|
|
3
|
+
import { IconProps } from '../Icon';
|
|
4
|
+
import { TagProps } from './Tag';
|
|
5
|
+
export declare const StyledTagContainer: import("@emotion/native").StyledComponent<Animated.AnimatedProps<ViewProps & import("react").RefAttributes<import("react-native").View>> & {
|
|
6
|
+
children?: import("react").ReactNode;
|
|
7
|
+
} & {
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
as?: import("react").ElementType<any> | undefined;
|
|
10
|
+
} & Partial<TagProps> & Partial<import("../../../types/defaults").ThemeProviderProps> & ViewProps & {
|
|
11
|
+
visible: boolean;
|
|
12
|
+
}, {}, {}>;
|
|
13
|
+
export declare const StyledLeftIcon: import("@emotion/native").StyledComponent<IconProps & {
|
|
14
|
+
children?: import("react").ReactNode;
|
|
15
|
+
} & {
|
|
16
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
17
|
+
as?: import("react").ElementType<any> | undefined;
|
|
18
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
|
|
19
|
+
export declare const StyledCloseIcon: import("@emotion/native").StyledComponent<IconProps & {
|
|
20
|
+
children?: import("react").ReactNode;
|
|
21
|
+
} & {
|
|
22
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
23
|
+
as?: import("react").ElementType<any> | undefined;
|
|
24
|
+
} & Partial<import("../../../types/defaults").ThemeProviderProps>, {}, {}>;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
|
|
2
|
+
|
|
3
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
+
|
|
5
|
+
import styled, { css } from '@emotion/native';
|
|
6
|
+
import { Animated } from 'react-native';
|
|
7
|
+
import { Icon } from '../Icon';
|
|
8
|
+
|
|
9
|
+
var smallVariant = function smallVariant(_ref) {
|
|
10
|
+
var theme = _ref.theme,
|
|
11
|
+
variant = _ref.variant;
|
|
12
|
+
return variant === 'small' && css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", ";\n padding: ", " ", ";\n "])), theme.borderRadius.micro, theme.spacing.nano, theme.spacing.mili);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
var defaultVariant = function defaultVariant(_ref2) {
|
|
16
|
+
var theme = _ref2.theme,
|
|
17
|
+
variant = _ref2.variant;
|
|
18
|
+
return variant === 'default' && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n border-radius: ", ";\n padding: ", " ", ";\n "])), theme.borderRadius.mili, theme.spacing.micro, theme.spacing.centi);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
var StyledTagContainerBase = styled(Animated.View)(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n background-color: ", ";\n flex-direction: row;\n justify-content: center;\n align-items: center;\n align-self: center;\n display: ", ";\n"])), function (_ref3) {
|
|
22
|
+
var theme = _ref3.theme;
|
|
23
|
+
return theme.miscellaneous.bodyColor;
|
|
24
|
+
}, function (_ref4) {
|
|
25
|
+
var visible = _ref4.visible;
|
|
26
|
+
return visible ? 'flex' : 'none';
|
|
27
|
+
});
|
|
28
|
+
export var StyledTagContainer = styled(StyledTagContainerBase)(function (props) {
|
|
29
|
+
return css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n ", "\n ", "\n "])), smallVariant(props), defaultVariant(props));
|
|
30
|
+
});
|
|
31
|
+
export var StyledLeftIcon = styled(Icon)(_templateObject5 || (_templateObject5 = _taggedTemplateLiteral(["\n margin-right: ", ";\n"])), function (_ref5) {
|
|
32
|
+
var theme = _ref5.theme;
|
|
33
|
+
return theme.spacing.micro;
|
|
34
|
+
});
|
|
35
|
+
export var StyledCloseIcon = styled(Icon)(_templateObject6 || (_templateObject6 = _taggedTemplateLiteral(["\n margin-left: ", ";\n"])), function (_ref6) {
|
|
36
|
+
var theme = _ref6.theme;
|
|
37
|
+
return theme.spacing.nano;
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","names":["styled","css","Animated","Icon","smallVariant","theme","variant","borderRadius","micro","spacing","nano","mili","defaultVariant","centi","StyledTagContainerBase","View","miscellaneous","bodyColor","visible","StyledTagContainer","props","StyledLeftIcon","StyledCloseIcon"],"sources":["../../../../src/components/atoms/Tag/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { Animated, ViewProps } from 'react-native';\nimport { StyleProps } from '../../../types/defaults';\nimport { Icon, IconProps } from '../Icon';\nimport { TagProps } from './Tag';\n\nconst smallVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'small' &&\n css`\n border-radius: ${theme.borderRadius.micro};\n padding: ${theme.spacing.nano} ${theme.spacing.mili};\n `;\n\nconst defaultVariant = ({ theme, variant }: Partial<TagProps> & StyleProps) =>\n variant === 'default' &&\n css`\n border-radius: ${theme.borderRadius.mili};\n padding: ${theme.spacing.micro} ${theme.spacing.centi};\n `;\n\nconst StyledTagContainerBase = styled(Animated.View)<\n Partial<TagProps> & Partial<StyleProps> & ViewProps & { visible: boolean }\n>`\n background-color: ${({ theme }) => theme.miscellaneous.bodyColor};\n flex-direction: row;\n justify-content: center;\n align-items: center;\n align-self: center;\n display: ${({ visible }) => (visible ? 'flex' : 'none')};\n`;\n\nexport const StyledTagContainer = styled(StyledTagContainerBase)(\n props => css`\n ${smallVariant(props)}\n ${defaultVariant(props)}\n `\n);\n\nexport const StyledLeftIcon = styled(Icon)<Partial<StyleProps> & IconProps>`\n margin-right: ${({ theme }) => theme.spacing.micro};\n`;\n\nexport const StyledCloseIcon = styled(Icon)<Partial<StyleProps> & IconProps>`\n margin-left: ${({ theme }) => theme.spacing.nano};\n`;\n"],"mappings":";;;;AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,iBAA5B;AACA,SAASC,QAAT,QAAoC,cAApC;AAEA,SAASC,IAAT,QAAgC,SAAhC;;AAGA,IAAMC,YAAY,GAAG,SAAfA,YAAe;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,IAAUC,OAAV,QAAUA,OAAV;EAAA,OACnBA,OAAO,KAAK,OAAZ,IACAL,GADA,6HAEmBI,KAAK,CAACE,YAAN,CAAmBC,KAFtC,EAGaH,KAAK,CAACI,OAAN,CAAcC,IAH3B,EAGmCL,KAAK,CAACI,OAAN,CAAcE,IAHjD,CADmB;AAAA,CAArB;;AAOA,IAAMC,cAAc,GAAG,SAAjBA,cAAiB;EAAA,IAAGP,KAAH,SAAGA,KAAH;EAAA,IAAUC,OAAV,SAAUA,OAAV;EAAA,OACrBA,OAAO,KAAK,SAAZ,IACAL,GADA,+HAEmBI,KAAK,CAACE,YAAN,CAAmBI,IAFtC,EAGaN,KAAK,CAACI,OAAN,CAAcD,KAH3B,EAGoCH,KAAK,CAACI,OAAN,CAAcI,KAHlD,CADqB;AAAA,CAAvB;;AAOA,IAAMC,sBAAsB,GAAGd,MAAM,CAACE,QAAQ,CAACa,IAAV,CAAT,0NAGN;EAAA,IAAGV,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACW,aAAN,CAAoBC,SAAnC;AAAA,CAHM,EAQf;EAAA,IAAGC,OAAH,SAAGA,OAAH;EAAA,OAAkBA,OAAO,GAAG,MAAH,GAAY,MAArC;AAAA,CARe,CAA5B;AAWA,OAAO,IAAMC,kBAAkB,GAAGnB,MAAM,CAACc,sBAAD,CAAN,CAChC,UAAAM,KAAK;EAAA,OAAInB,GAAJ,gGACDG,YAAY,CAACgB,KAAD,CADX,EAEDR,cAAc,CAACQ,KAAD,CAFb;AAAA,CAD2B,CAA3B;AAOP,OAAO,IAAMC,cAAc,GAAGrB,MAAM,CAACG,IAAD,CAAT,iGACT;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACI,OAAN,CAAcD,KAA7B;AAAA,CADS,CAApB;AAIP,OAAO,IAAMc,eAAe,GAAGtB,MAAM,CAACG,IAAD,CAAT,gGACX;EAAA,IAAGE,KAAH,SAAGA,KAAH;EAAA,OAAeA,KAAK,CAACI,OAAN,CAAcC,IAA7B;AAAA,CADW,CAArB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { ColorGradationType, ColorType, FontColorType, FontStackType, FontWeightType, TypographyVariationType } from '@tecsinapse/react-core';
|
|
3
|
+
import { StyleProp, TextStyle } from 'react-native';
|
|
4
|
+
export interface TextProps {
|
|
5
|
+
fontColor?: FontColorType;
|
|
6
|
+
fontWeight?: FontWeightType;
|
|
7
|
+
typography?: TypographyVariationType;
|
|
8
|
+
fontStack?: FontStackType;
|
|
9
|
+
colorVariant?: ColorType;
|
|
10
|
+
colorTone?: ColorGradationType;
|
|
11
|
+
numberOfLines?: number;
|
|
12
|
+
ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';
|
|
13
|
+
textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';
|
|
14
|
+
capitalFirst?: boolean;
|
|
15
|
+
style?: StyleProp<TextStyle>;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
declare const Text: FC<TextProps>;
|
|
19
|
+
export default Text;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
var _excluded = ["children", "style", "fontColor", "colorTone", "colorVariant", "fontWeight", "typography", "numberOfLines", "ellipsizeMode", "textTransform", "capitalFirst"];
|
|
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 { StyledColoredText } from './styled';
|
|
11
|
+
import { getLabel } from './functions';
|
|
12
|
+
|
|
13
|
+
var Text = function Text(_ref) {
|
|
14
|
+
var children = _ref.children,
|
|
15
|
+
style = _ref.style,
|
|
16
|
+
_ref$fontColor = _ref.fontColor,
|
|
17
|
+
fontColor = _ref$fontColor === void 0 ? 'dark' : _ref$fontColor,
|
|
18
|
+
_ref$colorTone = _ref.colorTone,
|
|
19
|
+
colorTone = _ref$colorTone === void 0 ? 'medium' : _ref$colorTone,
|
|
20
|
+
colorVariant = _ref.colorVariant,
|
|
21
|
+
_ref$fontWeight = _ref.fontWeight,
|
|
22
|
+
fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
|
|
23
|
+
_ref$typography = _ref.typography,
|
|
24
|
+
typography = _ref$typography === void 0 ? 'base' : _ref$typography,
|
|
25
|
+
numberOfLines = _ref.numberOfLines,
|
|
26
|
+
ellipsizeMode = _ref.ellipsizeMode,
|
|
27
|
+
_ref$textTransform = _ref.textTransform,
|
|
28
|
+
textTransform = _ref$textTransform === void 0 ? 'none' : _ref$textTransform,
|
|
29
|
+
_ref$capitalFirst = _ref.capitalFirst,
|
|
30
|
+
capitalFirst = _ref$capitalFirst === void 0 ? false : _ref$capitalFirst,
|
|
31
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
32
|
+
|
|
33
|
+
return React.createElement(StyledColoredText, _extends({}, rest, {
|
|
34
|
+
style: style,
|
|
35
|
+
fontColor: fontColor,
|
|
36
|
+
colorTone: colorTone,
|
|
37
|
+
colorVariant: colorVariant,
|
|
38
|
+
fontWeight: fontWeight,
|
|
39
|
+
typography: typography,
|
|
40
|
+
numberOfLines: numberOfLines,
|
|
41
|
+
ellipsizeMode: ellipsizeMode,
|
|
42
|
+
textTransform: textTransform
|
|
43
|
+
}), getLabel(children, capitalFirst));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default Text;
|
|
47
|
+
//# sourceMappingURL=Text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.js","names":["React","StyledColoredText","getLabel","Text","children","style","fontColor","colorTone","colorVariant","fontWeight","typography","numberOfLines","ellipsizeMode","textTransform","capitalFirst","rest"],"sources":["../../../../src/components/atoms/Text/Text.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport {\n ColorGradationType,\n ColorType,\n FontColorType,\n FontStackType,\n FontWeightType,\n TypographyVariationType,\n} from '@tecsinapse/react-core';\nimport { StyleProp, TextStyle } from 'react-native';\nimport { StyledColoredText } from './styled';\nimport { getLabel } from './functions';\n\nexport interface TextProps {\n /** Font theme text color */\n fontColor?: FontColorType;\n /** Font theme weight */\n fontWeight?: FontWeightType;\n /** Font theme sizes */\n typography?: TypographyVariationType;\n /** Font theme stack */\n fontStack?: FontStackType;\n /** Palette theme colors. You can specify this prop to override theme fontColor */\n colorVariant?: ColorType;\n /** Palette theme colors gradation */\n colorTone?: ColorGradationType;\n numberOfLines?: number;\n ellipsizeMode?: 'head' | 'middle' | 'tail' | 'clip';\n textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize';\n capitalFirst?: boolean;\n style?: StyleProp<TextStyle>;\n children?: React.ReactNode;\n}\n\n/** NOTE: When using colors, be careful to not override fontColor by using colorVariant and colorTone, referent to theme colors and not text colors. */\nconst Text: FC<TextProps> = ({\n children,\n style,\n fontColor = 'dark',\n colorTone = 'medium',\n colorVariant,\n fontWeight = 'regular',\n typography = 'base',\n numberOfLines,\n ellipsizeMode,\n textTransform = 'none',\n capitalFirst = false,\n ...rest\n}): JSX.Element => {\n return (\n <StyledColoredText\n {...rest}\n style={style}\n fontColor={fontColor}\n colorTone={colorTone}\n colorVariant={colorVariant}\n fontWeight={fontWeight}\n typography={typography}\n numberOfLines={numberOfLines}\n ellipsizeMode={ellipsizeMode}\n textTransform={textTransform}\n >\n {getLabel(children, capitalFirst)}\n </StyledColoredText>\n );\n};\n\nexport default Text;\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAP,MAA0B,OAA1B;AAUA,SAASC,iBAAT,QAAkC,UAAlC;AACA,SAASC,QAAT,QAAyB,aAAzB;;AAwBA,IAAMC,IAAmB,GAAG,SAAtBA,IAAsB,OAaT;EAAA,IAZjBC,QAYiB,QAZjBA,QAYiB;EAAA,IAXjBC,KAWiB,QAXjBA,KAWiB;EAAA,0BAVjBC,SAUiB;EAAA,IAVjBA,SAUiB,+BAVL,MAUK;EAAA,0BATjBC,SASiB;EAAA,IATjBA,SASiB,+BATL,QASK;EAAA,IARjBC,YAQiB,QARjBA,YAQiB;EAAA,2BAPjBC,UAOiB;EAAA,IAPjBA,UAOiB,gCAPJ,SAOI;EAAA,2BANjBC,UAMiB;EAAA,IANjBA,UAMiB,gCANJ,MAMI;EAAA,IALjBC,aAKiB,QALjBA,aAKiB;EAAA,IAJjBC,aAIiB,QAJjBA,aAIiB;EAAA,8BAHjBC,aAGiB;EAAA,IAHjBA,aAGiB,mCAHD,MAGC;EAAA,6BAFjBC,YAEiB;EAAA,IAFjBA,YAEiB,kCAFF,KAEE;EAAA,IADdC,IACc;;EACjB,OACE,oBAAC,iBAAD,eACMA,IADN;IAEE,KAAK,EAAEV,KAFT;IAGE,SAAS,EAAEC,SAHb;IAIE,SAAS,EAAEC,SAJb;IAKE,YAAY,EAAEC,YALhB;IAME,UAAU,EAAEC,UANd;IAOE,UAAU,EAAEC,UAPd;IAQE,aAAa,EAAEC,aARjB;IASE,aAAa,EAAEC,aATjB;IAUE,aAAa,EAAEC;EAVjB,IAYGX,QAAQ,CAACE,QAAD,EAAWU,YAAX,CAZX,CADF;AAgBD,CA9BD;;AAgCA,eAAeX,IAAf"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var getFirstCapitalCharacter = function getFirstCapitalCharacter(value) {
|
|
2
|
+
return value.charAt(0).toUpperCase().concat(value.slice(1));
|
|
3
|
+
};
|
|
4
|
+
export var getLabel = function getLabel(children, capitalFirst) {
|
|
5
|
+
return typeof children === 'string' && capitalFirst ? getFirstCapitalCharacter(children) : children;
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=functions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"functions.js","names":["getFirstCapitalCharacter","value","charAt","toUpperCase","concat","slice","getLabel","children","capitalFirst"],"sources":["../../../../src/components/atoms/Text/functions.ts"],"sourcesContent":["export const getFirstCapitalCharacter = (value: string): string =>\n value.charAt(0).toUpperCase().concat(value.slice(1));\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport const getLabel = (children, capitalFirst: boolean) =>\n typeof children === 'string' && capitalFirst\n ? getFirstCapitalCharacter(children)\n : children;\n"],"mappings":"AAAA,OAAO,IAAMA,wBAAwB,GAAG,SAA3BA,wBAA2B,CAACC,KAAD;EAAA,OACtCA,KAAK,CAACC,MAAN,CAAa,CAAb,EAAgBC,WAAhB,GAA8BC,MAA9B,CAAqCH,KAAK,CAACI,KAAN,CAAY,CAAZ,CAArC,CADsC;AAAA,CAAjC;AAIP,OAAO,IAAMC,QAAQ,GAAG,SAAXA,QAAW,CAACC,QAAD,EAAWC,YAAX;EAAA,OACtB,OAAOD,QAAP,KAAoB,QAApB,IAAgCC,YAAhC,GACIR,wBAAwB,CAACO,QAAD,CAD5B,GAEIA,QAHkB;AAAA,CAAjB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","Text"],"sources":["../../../../src/components/atoms/Text/index.ts"],"sourcesContent":["export { default as Text } from './Text';\nexport type { TextProps } from './Text';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,IAApB,QAAgC,QAAhC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextProps } from '@tecsinapse/react-core';
|
|
3
|
+
import { Text as RNText } from 'react-native';
|
|
4
|
+
export declare const StyledText: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
|
|
5
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
6
|
+
as?: import("react").ElementType<any> | undefined;
|
|
7
|
+
} & TextProps & Partial<import("@tecsinapse/react-core").ThemeProviderProps>, {}, {
|
|
8
|
+
ref?: import("react").Ref<RNText> | undefined;
|
|
9
|
+
}>;
|
|
10
|
+
export declare const StyledColoredText: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
|
|
11
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
+
as?: import("react").ElementType<any> | undefined;
|
|
13
|
+
} & TextProps & Partial<import("@tecsinapse/react-core").ThemeProviderProps> & {
|
|
14
|
+
ref?: import("react").Ref<RNText> | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
children?: import("react").ReactNode;
|
|
17
|
+
} & {
|
|
18
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
19
|
+
as?: import("react").ElementType<any> | undefined;
|
|
20
|
+
}, {}, {}>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var _templateObject, _templateObject2;
|
|
2
|
+
|
|
3
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
|
4
|
+
|
|
5
|
+
import styled, { css } from '@emotion/native';
|
|
6
|
+
import { Text as RNText } from 'react-native';
|
|
7
|
+
export var StyledText = styled(RNText)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: ", ";\n font-weight: ", ";\n font-size: ", ";\n line-height: ", ";\n font-family: ", ";\n text-transform: ", ";\n"])), function (_ref) {
|
|
8
|
+
var theme = _ref.theme,
|
|
9
|
+
_ref$fontColor = _ref.fontColor,
|
|
10
|
+
fontColor = _ref$fontColor === void 0 ? 'dark' : _ref$fontColor;
|
|
11
|
+
return theme.font.color[fontColor];
|
|
12
|
+
}, function (_ref2) {
|
|
13
|
+
var theme = _ref2.theme,
|
|
14
|
+
_ref2$fontWeight = _ref2.fontWeight,
|
|
15
|
+
fontWeight = _ref2$fontWeight === void 0 ? 'regular' : _ref2$fontWeight;
|
|
16
|
+
return theme.font.weight[fontWeight];
|
|
17
|
+
}, function (_ref3) {
|
|
18
|
+
var theme = _ref3.theme,
|
|
19
|
+
_ref3$typography = _ref3.typography,
|
|
20
|
+
typography = _ref3$typography === void 0 ? 'base' : _ref3$typography;
|
|
21
|
+
return theme.typography[typography].fontSize;
|
|
22
|
+
}, function (_ref4) {
|
|
23
|
+
var theme = _ref4.theme,
|
|
24
|
+
_ref4$typography = _ref4.typography,
|
|
25
|
+
typography = _ref4$typography === void 0 ? 'base' : _ref4$typography;
|
|
26
|
+
return theme.typography[typography].lineHeight;
|
|
27
|
+
}, function (_ref5) {
|
|
28
|
+
var theme = _ref5.theme,
|
|
29
|
+
_ref5$fontStack = _ref5.fontStack,
|
|
30
|
+
fontStack = _ref5$fontStack === void 0 ? 'default' : _ref5$fontStack;
|
|
31
|
+
return "'".concat(theme.font.stack[fontStack], "'");
|
|
32
|
+
}, function (_ref6) {
|
|
33
|
+
var _ref6$textTransform = _ref6.textTransform,
|
|
34
|
+
textTransform = _ref6$textTransform === void 0 ? 'none' : _ref6$textTransform;
|
|
35
|
+
return "".concat(textTransform);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
var colorStyles = function colorStyles(_ref7) {
|
|
39
|
+
var colorVariant = _ref7.colorVariant,
|
|
40
|
+
colorTone = _ref7.colorTone,
|
|
41
|
+
theme = _ref7.theme;
|
|
42
|
+
return colorVariant && colorTone && css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n color: ", ";\n "])), theme.color[colorVariant][colorTone]);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export var StyledColoredText = styled(StyledText)(colorStyles);
|
|
46
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","names":["styled","css","Text","RNText","StyledText","theme","fontColor","font","color","fontWeight","weight","typography","fontSize","lineHeight","fontStack","stack","textTransform","colorStyles","colorVariant","colorTone","StyledColoredText"],"sources":["../../../../src/components/atoms/Text/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { StyleProps, TextProps } from '@tecsinapse/react-core';\nimport { Text as RNText } from 'react-native';\n\nexport const StyledText = styled(RNText)<TextProps & Partial<StyleProps>>`\n color: ${({ theme, fontColor = 'dark' }) => theme.font.color[fontColor]};\n font-weight: ${({ theme, fontWeight = 'regular' }) =>\n theme.font.weight[fontWeight]};\n font-size: ${({ theme, typography = 'base' }) =>\n theme.typography[typography].fontSize};\n line-height: ${({ theme, typography = 'base' }) =>\n theme.typography[typography].lineHeight};\n font-family: ${({ theme, fontStack = 'default' }) =>\n `'${theme.font.stack[fontStack]}'`};\n text-transform: ${({ textTransform = 'none' }) => `${textTransform}`};\n`;\n\nconst colorStyles = ({\n colorVariant,\n colorTone,\n theme,\n}: TextProps & StyleProps) =>\n colorVariant &&\n colorTone &&\n css`\n color: ${theme.color[colorVariant][colorTone]};\n `;\n\nexport const StyledColoredText = styled(StyledText)<\n TextProps & Partial<StyleProps>\n>(colorStyles);\n"],"mappings":";;;;AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,iBAA5B;AAEA,SAASC,IAAI,IAAIC,MAAjB,QAA+B,cAA/B;AAEA,OAAO,IAAMC,UAAU,GAAGJ,MAAM,CAACG,MAAD,CAAT,uMACZ;EAAA,IAAGE,KAAH,QAAGA,KAAH;EAAA,0BAAUC,SAAV;EAAA,IAAUA,SAAV,+BAAsB,MAAtB;EAAA,OAAmCD,KAAK,CAACE,IAAN,CAAWC,KAAX,CAAiBF,SAAjB,CAAnC;AAAA,CADY,EAEN;EAAA,IAAGD,KAAH,SAAGA,KAAH;EAAA,6BAAUI,UAAV;EAAA,IAAUA,UAAV,iCAAuB,SAAvB;EAAA,OACbJ,KAAK,CAACE,IAAN,CAAWG,MAAX,CAAkBD,UAAlB,CADa;AAAA,CAFM,EAIR;EAAA,IAAGJ,KAAH,SAAGA,KAAH;EAAA,6BAAUM,UAAV;EAAA,IAAUA,UAAV,iCAAuB,MAAvB;EAAA,OACXN,KAAK,CAACM,UAAN,CAAiBA,UAAjB,EAA6BC,QADlB;AAAA,CAJQ,EAMN;EAAA,IAAGP,KAAH,SAAGA,KAAH;EAAA,6BAAUM,UAAV;EAAA,IAAUA,UAAV,iCAAuB,MAAvB;EAAA,OACbN,KAAK,CAACM,UAAN,CAAiBA,UAAjB,EAA6BE,UADhB;AAAA,CANM,EAQN;EAAA,IAAGR,KAAH,SAAGA,KAAH;EAAA,4BAAUS,SAAV;EAAA,IAAUA,SAAV,gCAAsB,SAAtB;EAAA,kBACTT,KAAK,CAACE,IAAN,CAAWQ,KAAX,CAAiBD,SAAjB,CADS;AAAA,CARM,EAUH;EAAA,gCAAGE,aAAH;EAAA,IAAGA,aAAH,oCAAmB,MAAnB;EAAA,iBAAmCA,aAAnC;AAAA,CAVG,CAAhB;;AAaP,IAAMC,WAAW,GAAG,SAAdA,WAAc;EAAA,IAClBC,YADkB,SAClBA,YADkB;EAAA,IAElBC,SAFkB,SAElBA,SAFkB;EAAA,IAGlBd,KAHkB,SAGlBA,KAHkB;EAAA,OAKlBa,YAAY,IACZC,SADA,IAEAlB,GAFA,8FAGWI,KAAK,CAACG,KAAN,CAAYU,YAAZ,EAA0BC,SAA1B,CAHX,CALkB;AAAA,CAApB;;AAWA,OAAO,IAAMC,iBAAiB,GAAGpB,MAAM,CAACI,UAAD,CAAN,CAE/Ba,WAF+B,CAA1B"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { StyleProps } from '@tecsinapse/react-core';
|
|
2
|
+
export declare const baseStyles: ({ theme }: StyleProps) => any;
|
|
3
|
+
export declare const elevatedStyles: ({ theme, elevated, }: {
|
|
4
|
+
elevated?: boolean | undefined;
|
|
5
|
+
} & import("@tecsinapse/react-core").ThemeProviderProps) => any;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { css } from '@emotion/native';
|
|
6
|
+
export var baseStyles = function baseStyles(_ref) {
|
|
7
|
+
var theme = _ref.theme;
|
|
8
|
+
return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n border-radius: ", ";\n background-color: ", ";\n"])), theme.borderRadius.mili, theme.miscellaneous.surfaceColor);
|
|
9
|
+
};
|
|
10
|
+
export var elevatedStyles = function elevatedStyles(_ref2) {
|
|
11
|
+
var theme = _ref2.theme,
|
|
12
|
+
_ref2$elevated = _ref2.elevated,
|
|
13
|
+
elevated = _ref2$elevated === void 0 ? false : _ref2$elevated;
|
|
14
|
+
return elevated && [css({
|
|
15
|
+
shadowColor: theme.miscellaneous.shadow,
|
|
16
|
+
shadowOffset: {
|
|
17
|
+
width: 0,
|
|
18
|
+
height: 2
|
|
19
|
+
},
|
|
20
|
+
shadowOpacity: 0.05,
|
|
21
|
+
shadowRadius: 5,
|
|
22
|
+
elevation: 2
|
|
23
|
+
})];
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=PaperAndCard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PaperAndCard.js","names":["css","baseStyles","theme","borderRadius","mili","miscellaneous","surfaceColor","elevatedStyles","elevated","shadowColor","shadow","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation"],"sources":["../../../../src/components/atoms/shared/PaperAndCard.ts"],"sourcesContent":["import { css } from '@emotion/native';\nimport { StyleProps } from '@tecsinapse/react-core';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const baseStyles = ({ theme }: StyleProps): any => css`\n border-radius: ${theme.borderRadius.mili};\n background-color: ${theme.miscellaneous.surfaceColor};\n`;\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nexport const elevatedStyles = ({\n theme,\n elevated = false,\n}: { elevated?: boolean } & StyleProps): any =>\n elevated && [\n css({\n shadowColor: theme.miscellaneous.shadow,\n shadowOffset: { width: 0, height: 2 },\n shadowOpacity: 0.05,\n shadowRadius: 5,\n elevation: 2,\n }),\n ];\n/* eslint-enable @typescript-eslint/no-explicit-any */\n"],"mappings":";;;;AAAA,SAASA,GAAT,QAAoB,iBAApB;AAIA,OAAO,IAAMC,UAAU,GAAG,SAAbA,UAAa;EAAA,IAAGC,KAAH,QAAGA,KAAH;EAAA,OAAgCF,GAAhC,2HACPE,KAAK,CAACC,YAAN,CAAmBC,IADZ,EAEJF,KAAK,CAACG,aAAN,CAAoBC,YAFhB;AAAA,CAAnB;AAMP,OAAO,IAAMC,cAAc,GAAG,SAAjBA,cAAiB;EAAA,IAC5BL,KAD4B,SAC5BA,KAD4B;EAAA,2BAE5BM,QAF4B;EAAA,IAE5BA,QAF4B,+BAEjB,KAFiB;EAAA,OAI5BA,QAAQ,IAAI,CACVR,GAAG,CAAC;IACFS,WAAW,EAAEP,KAAK,CAACG,aAAN,CAAoBK,MAD/B;IAEFC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAT;MAAYC,MAAM,EAAE;IAApB,CAFZ;IAGFC,aAAa,EAAE,IAHb;IAIFC,YAAY,EAAE,CAJZ;IAKFC,SAAS,EAAE;EALT,CAAD,CADO,CAJgB;AAAA,CAAvB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ViewProps } from 'react-native';
|
|
3
|
+
import { TextProps } from '../../atoms/Text';
|
|
4
|
+
export declare type SelectionType = 'range' | 'day';
|
|
5
|
+
export declare type DateRange = {
|
|
6
|
+
lowest: Date;
|
|
7
|
+
highest?: Date;
|
|
8
|
+
};
|
|
9
|
+
export declare type Value<T extends SelectionType> = T extends 'range' ? DateRange : Date;
|
|
10
|
+
export interface CalendarProps<T extends SelectionType> extends ViewProps {
|
|
11
|
+
TextComponent?: React.FC<TextProps>;
|
|
12
|
+
year?: number;
|
|
13
|
+
month?: number;
|
|
14
|
+
onChange?: (value?: Value<T>) => void | never;
|
|
15
|
+
type?: T;
|
|
16
|
+
value?: Value<T>;
|
|
17
|
+
locale?: Locale;
|
|
18
|
+
}
|
|
19
|
+
declare function Calendar<T extends SelectionType>({ TextComponent, year: _year, month: _month, value, type, onChange, locale, ...rest }: CalendarProps<T>): JSX.Element;
|
|
20
|
+
export default Calendar;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
var _excluded = ["TextComponent", "year", "month", "value", "type", "onChange", "locale"];
|
|
2
|
+
|
|
3
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
4
|
+
|
|
5
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
6
|
+
|
|
7
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
8
|
+
|
|
9
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
+
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
|
|
13
|
+
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."); }
|
|
14
|
+
|
|
15
|
+
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); }
|
|
16
|
+
|
|
17
|
+
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; }
|
|
18
|
+
|
|
19
|
+
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; }
|
|
20
|
+
|
|
21
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
|
+
|
|
23
|
+
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; }
|
|
24
|
+
|
|
25
|
+
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; }
|
|
26
|
+
|
|
27
|
+
import { add, format, getWeeksInMonth, set } from 'date-fns';
|
|
28
|
+
import * as React from 'react';
|
|
29
|
+
import { View } from 'react-native';
|
|
30
|
+
import { Icon } from '../../atoms/Icon';
|
|
31
|
+
import { Text } from '../../atoms/Text';
|
|
32
|
+
import { Content, Control, getCapitalizedTextComponent, TitleContainer } from './styled';
|
|
33
|
+
import { Weekdays, MonthWeek } from './components';
|
|
34
|
+
var now = set(new Date(), {
|
|
35
|
+
date: 1,
|
|
36
|
+
hours: 0,
|
|
37
|
+
minutes: 0,
|
|
38
|
+
seconds: 0,
|
|
39
|
+
milliseconds: 0
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
function dayOfWeekFromWeekStart(dayOfWeek, weekStartsOn) {
|
|
43
|
+
return dayOfWeek === 0 ? 0 : dayOfWeek - weekStartsOn;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function Calendar(_ref) {
|
|
47
|
+
var _ref$TextComponent = _ref.TextComponent,
|
|
48
|
+
TextComponent = _ref$TextComponent === void 0 ? Text : _ref$TextComponent,
|
|
49
|
+
_year = _ref.year,
|
|
50
|
+
_month = _ref.month,
|
|
51
|
+
value = _ref.value,
|
|
52
|
+
type = _ref.type,
|
|
53
|
+
onChange = _ref.onChange,
|
|
54
|
+
locale = _ref.locale,
|
|
55
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
56
|
+
|
|
57
|
+
var _referenceDate = React.useMemo(function () {
|
|
58
|
+
return _year && _month ? new Date(_year, _month, 1, 0, 0, 0, 0) : _month ? new Date(now.getFullYear(), _month, 1, 0, 0, 0, 0) : now;
|
|
59
|
+
}, [_year, _month]);
|
|
60
|
+
|
|
61
|
+
var _React$useState = React.useState(_referenceDate),
|
|
62
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
63
|
+
referenceDate = _React$useState2[0],
|
|
64
|
+
setReferenceDate = _React$useState2[1];
|
|
65
|
+
|
|
66
|
+
var startingWeekDay = React.useMemo(function () {
|
|
67
|
+
var _locale$options$weekS, _locale$options;
|
|
68
|
+
|
|
69
|
+
return dayOfWeekFromWeekStart(referenceDate.getDay(), (_locale$options$weekS = locale === null || locale === void 0 ? void 0 : (_locale$options = locale.options) === null || _locale$options === void 0 ? void 0 : _locale$options.weekStartsOn) !== null && _locale$options$weekS !== void 0 ? _locale$options$weekS : 0);
|
|
70
|
+
}, [referenceDate, locale]);
|
|
71
|
+
var weeksInMonth = React.useMemo(function () {
|
|
72
|
+
var _locale$options$weekS2, _locale$options2;
|
|
73
|
+
|
|
74
|
+
return getWeeksInMonth(referenceDate, {
|
|
75
|
+
weekStartsOn: (_locale$options$weekS2 = locale === null || locale === void 0 ? void 0 : (_locale$options2 = locale.options) === null || _locale$options2 === void 0 ? void 0 : _locale$options2.weekStartsOn) !== null && _locale$options$weekS2 !== void 0 ? _locale$options$weekS2 : 0
|
|
76
|
+
});
|
|
77
|
+
}, [referenceDate, locale]);
|
|
78
|
+
var Capitalized = React.useMemo(function () {
|
|
79
|
+
return getCapitalizedTextComponent(TextComponent);
|
|
80
|
+
}, [TextComponent]);
|
|
81
|
+
var calendar = React.useMemo(function () {
|
|
82
|
+
return _toConsumableArray(Array(weeksInMonth).keys()).map(function (week) {
|
|
83
|
+
return _toConsumableArray(Array(7).keys()).map(function (weekDayIndex) {
|
|
84
|
+
return add(referenceDate, {
|
|
85
|
+
days: 6 * week + week + weekDayIndex - startingWeekDay
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}, [weeksInMonth, startingWeekDay, referenceDate]);
|
|
90
|
+
var handlePressNext = React.useCallback(function () {
|
|
91
|
+
setReferenceDate(add(referenceDate, {
|
|
92
|
+
months: 1
|
|
93
|
+
}));
|
|
94
|
+
}, [referenceDate, setReferenceDate]);
|
|
95
|
+
var handlePressPrev = React.useCallback(function () {
|
|
96
|
+
setReferenceDate(add(referenceDate, {
|
|
97
|
+
months: -1
|
|
98
|
+
}));
|
|
99
|
+
}, [referenceDate, setReferenceDate]);
|
|
100
|
+
return React.createElement(View, rest, React.createElement(TitleContainer, null, React.createElement(Control, {
|
|
101
|
+
onPress: handlePressPrev,
|
|
102
|
+
align: 'start',
|
|
103
|
+
isLeft: true
|
|
104
|
+
}, React.createElement(Icon, {
|
|
105
|
+
name: 'chevron-left',
|
|
106
|
+
type: 'material-community',
|
|
107
|
+
size: 'kilo',
|
|
108
|
+
colorVariant: 'secondary',
|
|
109
|
+
colorTone: 'medium'
|
|
110
|
+
})), React.createElement(Capitalized, {
|
|
111
|
+
colorVariant: 'secondary',
|
|
112
|
+
colorTone: 'xdark',
|
|
113
|
+
fontWeight: 'bold'
|
|
114
|
+
}, format(referenceDate, 'MMMM yyyy', {
|
|
115
|
+
locale: locale
|
|
116
|
+
})), React.createElement(Control, {
|
|
117
|
+
onPress: handlePressNext,
|
|
118
|
+
align: 'end',
|
|
119
|
+
isRright: true
|
|
120
|
+
}, React.createElement(Icon, {
|
|
121
|
+
name: 'chevron-right',
|
|
122
|
+
type: 'material-community',
|
|
123
|
+
size: 'kilo',
|
|
124
|
+
colorVariant: 'secondary',
|
|
125
|
+
colorTone: 'medium'
|
|
126
|
+
}))), React.createElement(Content, null, React.createElement(Weekdays, {
|
|
127
|
+
locale: locale,
|
|
128
|
+
calendar: calendar,
|
|
129
|
+
Capitalized: Capitalized
|
|
130
|
+
}), calendar.map(function (week, index) {
|
|
131
|
+
return React.createElement(MonthWeek, {
|
|
132
|
+
week: week,
|
|
133
|
+
type: type,
|
|
134
|
+
value: value,
|
|
135
|
+
key: "week-".concat(index),
|
|
136
|
+
onChange: onChange,
|
|
137
|
+
TextComponent: TextComponent,
|
|
138
|
+
referenceDate: referenceDate
|
|
139
|
+
});
|
|
140
|
+
})));
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export default Calendar;
|
|
144
|
+
//# sourceMappingURL=Calendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Calendar.js","names":["add","format","getWeeksInMonth","set","React","View","Icon","Text","Content","Control","getCapitalizedTextComponent","TitleContainer","Weekdays","MonthWeek","now","Date","date","hours","minutes","seconds","milliseconds","dayOfWeekFromWeekStart","dayOfWeek","weekStartsOn","Calendar","TextComponent","_year","year","_month","month","value","type","onChange","locale","rest","_referenceDate","useMemo","getFullYear","useState","referenceDate","setReferenceDate","startingWeekDay","getDay","options","weeksInMonth","Capitalized","calendar","Array","keys","map","week","weekDayIndex","days","handlePressNext","useCallback","months","handlePressPrev","index"],"sources":["../../../../src/components/molecules/Calendar/Calendar.tsx"],"sourcesContent":["import { add, format, getWeeksInMonth, set } from 'date-fns';\nimport * as React from 'react';\nimport { View, ViewProps } from 'react-native';\nimport { Icon } from '../../atoms/Icon';\nimport { Text, TextProps } from '../../atoms/Text';\nimport {\n Content,\n Control,\n getCapitalizedTextComponent,\n TitleContainer,\n} from './styled';\nimport { Weekdays, MonthWeek } from './components';\n\nexport type SelectionType = 'range' | 'day';\n\nexport type DateRange = { lowest: Date; highest?: Date };\n\nexport type Value<T extends SelectionType> = T extends 'range'\n ? DateRange\n : Date;\n\nexport interface CalendarProps<T extends SelectionType> extends ViewProps {\n TextComponent?: React.FC<TextProps>;\n year?: number;\n month?: number;\n onChange?: (value?: Value<T>) => void | never;\n type?: T;\n value?: Value<T>;\n locale?: Locale;\n}\n\nconst now = set(new Date(), {\n date: 1,\n hours: 0,\n minutes: 0,\n seconds: 0,\n milliseconds: 0,\n});\n\nfunction dayOfWeekFromWeekStart(dayOfWeek: number, weekStartsOn: number) {\n return dayOfWeek === 0 ? 0 : dayOfWeek - weekStartsOn;\n}\n\nfunction Calendar<T extends SelectionType>({\n TextComponent = Text,\n year: _year,\n month: _month,\n value,\n type,\n onChange,\n locale,\n ...rest\n}: CalendarProps<T>): JSX.Element {\n const _referenceDate = React.useMemo(\n () =>\n _year && _month\n ? new Date(_year, _month, 1, 0, 0, 0, 0)\n : _month\n ? new Date(now.getFullYear(), _month, 1, 0, 0, 0, 0)\n : now,\n [_year, _month]\n );\n\n const [referenceDate, setReferenceDate] = React.useState(_referenceDate);\n\n const startingWeekDay = React.useMemo(\n () =>\n dayOfWeekFromWeekStart(\n referenceDate.getDay(),\n locale?.options?.weekStartsOn ?? 0\n ),\n [referenceDate, locale]\n );\n\n const weeksInMonth = React.useMemo(\n () =>\n getWeeksInMonth(referenceDate, {\n weekStartsOn: locale?.options?.weekStartsOn ?? 0,\n }),\n [referenceDate, locale]\n );\n\n const Capitalized = React.useMemo(\n () => getCapitalizedTextComponent(TextComponent),\n [TextComponent]\n );\n\n const calendar = React.useMemo(\n () =>\n [...Array(weeksInMonth).keys()].map(week =>\n [...Array(7).keys()].map(weekDayIndex =>\n add(referenceDate, {\n days: 6 * week + week + weekDayIndex - startingWeekDay,\n })\n )\n ),\n [weeksInMonth, startingWeekDay, referenceDate]\n );\n\n const handlePressNext = React.useCallback(() => {\n setReferenceDate(add(referenceDate, { months: 1 }));\n }, [referenceDate, setReferenceDate]);\n\n const handlePressPrev = React.useCallback(() => {\n setReferenceDate(add(referenceDate, { months: -1 }));\n }, [referenceDate, setReferenceDate]);\n\n return (\n <View {...rest}>\n <TitleContainer>\n <Control onPress={handlePressPrev} align={'start'} isLeft>\n <Icon\n name={'chevron-left'}\n type={'material-community'}\n size={'kilo'}\n colorVariant={'secondary'}\n colorTone={'medium'}\n />\n </Control>\n <Capitalized\n colorVariant={'secondary'}\n colorTone={'xdark'}\n fontWeight={'bold'}\n >\n {format(referenceDate, 'MMMM yyyy', { locale })}\n </Capitalized>\n <Control onPress={handlePressNext} align={'end'} isRright>\n <Icon\n name={'chevron-right'}\n type={'material-community'}\n size={'kilo'}\n colorVariant={'secondary'}\n colorTone={'medium'}\n />\n </Control>\n </TitleContainer>\n <Content>\n <Weekdays\n locale={locale}\n calendar={calendar}\n Capitalized={Capitalized}\n />\n {calendar.map((week, index) => (\n <MonthWeek\n week={week}\n type={type}\n value={value}\n key={`week-${index}`}\n onChange={onChange}\n TextComponent={TextComponent}\n referenceDate={referenceDate}\n />\n ))}\n </Content>\n </View>\n );\n}\n\nexport default Calendar;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,GAAT,EAAcC,MAAd,EAAsBC,eAAtB,EAAuCC,GAAvC,QAAkD,UAAlD;AACA,OAAO,KAAKC,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAAgC,cAAhC;AACA,SAASC,IAAT,QAAqB,kBAArB;AACA,SAASC,IAAT,QAAgC,kBAAhC;AACA,SACEC,OADF,EAEEC,OAFF,EAGEC,2BAHF,EAIEC,cAJF,QAKO,UALP;AAMA,SAASC,QAAT,EAAmBC,SAAnB,QAAoC,cAApC;AAoBA,IAAMC,GAAG,GAAGX,GAAG,CAAC,IAAIY,IAAJ,EAAD,EAAa;EAC1BC,IAAI,EAAE,CADoB;EAE1BC,KAAK,EAAE,CAFmB;EAG1BC,OAAO,EAAE,CAHiB;EAI1BC,OAAO,EAAE,CAJiB;EAK1BC,YAAY,EAAE;AALY,CAAb,CAAf;;AAQA,SAASC,sBAAT,CAAgCC,SAAhC,EAAmDC,YAAnD,EAAyE;EACvE,OAAOD,SAAS,KAAK,CAAd,GAAkB,CAAlB,GAAsBA,SAAS,GAAGC,YAAzC;AACD;;AAED,SAASC,QAAT,OASkC;EAAA,8BARhCC,aAQgC;EAAA,IARhCA,aAQgC,mCARhBlB,IAQgB;EAAA,IAP1BmB,KAO0B,QAPhCC,IAOgC;EAAA,IANzBC,MAMyB,QANhCC,KAMgC;EAAA,IALhCC,KAKgC,QALhCA,KAKgC;EAAA,IAJhCC,IAIgC,QAJhCA,IAIgC;EAAA,IAHhCC,QAGgC,QAHhCA,QAGgC;EAAA,IAFhCC,MAEgC,QAFhCA,MAEgC;EAAA,IAD7BC,IAC6B;;EAChC,IAAMC,cAAc,GAAG/B,KAAK,CAACgC,OAAN,CACrB;IAAA,OACEV,KAAK,IAAIE,MAAT,GACI,IAAIb,IAAJ,CAASW,KAAT,EAAgBE,MAAhB,EAAwB,CAAxB,EAA2B,CAA3B,EAA8B,CAA9B,EAAiC,CAAjC,EAAoC,CAApC,CADJ,GAEIA,MAAM,GACN,IAAIb,IAAJ,CAASD,GAAG,CAACuB,WAAJ,EAAT,EAA4BT,MAA5B,EAAoC,CAApC,EAAuC,CAAvC,EAA0C,CAA1C,EAA6C,CAA7C,EAAgD,CAAhD,CADM,GAENd,GALN;EAAA,CADqB,EAOrB,CAACY,KAAD,EAAQE,MAAR,CAPqB,CAAvB;;EAUA,sBAA0CxB,KAAK,CAACkC,QAAN,CAAeH,cAAf,CAA1C;EAAA;EAAA,IAAOI,aAAP;EAAA,IAAsBC,gBAAtB;;EAEA,IAAMC,eAAe,GAAGrC,KAAK,CAACgC,OAAN,CACtB;IAAA;;IAAA,OACEf,sBAAsB,CACpBkB,aAAa,CAACG,MAAd,EADoB,2BAEpBT,MAFoB,aAEpBA,MAFoB,0CAEpBA,MAAM,CAAEU,OAFY,oDAEpB,gBAAiBpB,YAFG,yEAEa,CAFb,CADxB;EAAA,CADsB,EAMtB,CAACgB,aAAD,EAAgBN,MAAhB,CANsB,CAAxB;EASA,IAAMW,YAAY,GAAGxC,KAAK,CAACgC,OAAN,CACnB;IAAA;;IAAA,OACElC,eAAe,CAACqC,aAAD,EAAgB;MAC7BhB,YAAY,4BAAEU,MAAF,aAAEA,MAAF,2CAAEA,MAAM,CAAEU,OAAV,qDAAE,iBAAiBpB,YAAnB,2EAAmC;IADlB,CAAhB,CADjB;EAAA,CADmB,EAKnB,CAACgB,aAAD,EAAgBN,MAAhB,CALmB,CAArB;EAQA,IAAMY,WAAW,GAAGzC,KAAK,CAACgC,OAAN,CAClB;IAAA,OAAM1B,2BAA2B,CAACe,aAAD,CAAjC;EAAA,CADkB,EAElB,CAACA,aAAD,CAFkB,CAApB;EAKA,IAAMqB,QAAQ,GAAG1C,KAAK,CAACgC,OAAN,CACf;IAAA,OACE,mBAAIW,KAAK,CAACH,YAAD,CAAL,CAAoBI,IAApB,EAAJ,EAAgCC,GAAhC,CAAoC,UAAAC,IAAI;MAAA,OACtC,mBAAIH,KAAK,CAAC,CAAD,CAAL,CAASC,IAAT,EAAJ,EAAqBC,GAArB,CAAyB,UAAAE,YAAY;QAAA,OACnCnD,GAAG,CAACuC,aAAD,EAAgB;UACjBa,IAAI,EAAE,IAAIF,IAAJ,GAAWA,IAAX,GAAkBC,YAAlB,GAAiCV;QADtB,CAAhB,CADgC;MAAA,CAArC,CADsC;IAAA,CAAxC,CADF;EAAA,CADe,EASf,CAACG,YAAD,EAAeH,eAAf,EAAgCF,aAAhC,CATe,CAAjB;EAYA,IAAMc,eAAe,GAAGjD,KAAK,CAACkD,WAAN,CAAkB,YAAM;IAC9Cd,gBAAgB,CAACxC,GAAG,CAACuC,aAAD,EAAgB;MAAEgB,MAAM,EAAE;IAAV,CAAhB,CAAJ,CAAhB;EACD,CAFuB,EAErB,CAAChB,aAAD,EAAgBC,gBAAhB,CAFqB,CAAxB;EAIA,IAAMgB,eAAe,GAAGpD,KAAK,CAACkD,WAAN,CAAkB,YAAM;IAC9Cd,gBAAgB,CAACxC,GAAG,CAACuC,aAAD,EAAgB;MAAEgB,MAAM,EAAE,CAAC;IAAX,CAAhB,CAAJ,CAAhB;EACD,CAFuB,EAErB,CAAChB,aAAD,EAAgBC,gBAAhB,CAFqB,CAAxB;EAIA,OACE,oBAAC,IAAD,EAAUN,IAAV,EACE,oBAAC,cAAD,QACE,oBAAC,OAAD;IAAS,OAAO,EAAEsB,eAAlB;IAAmC,KAAK,EAAE,OAA1C;IAAmD,MAAM;EAAzD,GACE,oBAAC,IAAD;IACE,IAAI,EAAE,cADR;IAEE,IAAI,EAAE,oBAFR;IAGE,IAAI,EAAE,MAHR;IAIE,YAAY,EAAE,WAJhB;IAKE,SAAS,EAAE;EALb,EADF,CADF,EAUE,oBAAC,WAAD;IACE,YAAY,EAAE,WADhB;IAEE,SAAS,EAAE,OAFb;IAGE,UAAU,EAAE;EAHd,GAKGvD,MAAM,CAACsC,aAAD,EAAgB,WAAhB,EAA6B;IAAEN,MAAM,EAANA;EAAF,CAA7B,CALT,CAVF,EAiBE,oBAAC,OAAD;IAAS,OAAO,EAAEoB,eAAlB;IAAmC,KAAK,EAAE,KAA1C;IAAiD,QAAQ;EAAzD,GACE,oBAAC,IAAD;IACE,IAAI,EAAE,eADR;IAEE,IAAI,EAAE,oBAFR;IAGE,IAAI,EAAE,MAHR;IAIE,YAAY,EAAE,WAJhB;IAKE,SAAS,EAAE;EALb,EADF,CAjBF,CADF,EA4BE,oBAAC,OAAD,QACE,oBAAC,QAAD;IACE,MAAM,EAAEpB,MADV;IAEE,QAAQ,EAAEa,QAFZ;IAGE,WAAW,EAAED;EAHf,EADF,EAMGC,QAAQ,CAACG,GAAT,CAAa,UAACC,IAAD,EAAOO,KAAP;IAAA,OACZ,oBAAC,SAAD;MACE,IAAI,EAAEP,IADR;MAEE,IAAI,EAAEnB,IAFR;MAGE,KAAK,EAAED,KAHT;MAIE,GAAG,iBAAU2B,KAAV,CAJL;MAKE,QAAQ,EAAEzB,QALZ;MAME,aAAa,EAAEP,aANjB;MAOE,aAAa,EAAEc;IAPjB,EADY;EAAA,CAAb,CANH,CA5BF,CADF;AAiDD;;AAED,eAAef,QAAf"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Value, SelectionType } from '../Calendar';
|
|
3
|
+
import { TextProps } from '@tecsinapse/react-core';
|
|
4
|
+
interface IMonthWeek<T extends SelectionType> {
|
|
5
|
+
TextComponent: React.FC<TextProps>;
|
|
6
|
+
onChange?: (value?: any) => void | never;
|
|
7
|
+
type?: T;
|
|
8
|
+
value?: Value<T>;
|
|
9
|
+
week: Date[];
|
|
10
|
+
referenceDate: Date;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: React.MemoExoticComponent<(<T extends SelectionType>({ week, referenceDate, type, value, TextComponent, onChange, }: IMonthWeek<T>) => JSX.Element)>;
|
|
13
|
+
export default _default;
|