@tecsinapse/react-native-kit 1.21.0 → 1.22.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 +16 -0
- package/dist/components/atoms/Avatar/Avatar.d.ts +2 -1
- package/dist/components/atoms/Avatar/Avatar.js +34 -22
- package/dist/components/atoms/Avatar/Avatar.js.map +1 -1
- package/dist/components/atoms/Avatar/index.d.ts +1 -1
- package/dist/components/atoms/Badge/Badge.js +57 -31
- package/dist/components/atoms/Badge/Badge.js.map +1 -1
- package/dist/components/atoms/Badge/index.d.ts +2 -1
- package/dist/components/atoms/BottomNavigator/BottomNavigator.js +69 -40
- package/dist/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/Item.js +66 -32
- package/dist/components/atoms/BottomNavigator/Item.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/index.d.ts +3 -2
- package/dist/components/atoms/BottomNavigator/styled.js +38 -74
- package/dist/components/atoms/BottomNavigator/styled.js.map +1 -1
- package/dist/components/atoms/Button/Button.js +54 -25
- package/dist/components/atoms/Button/Button.js.map +1 -1
- package/dist/components/atoms/Button/States/Error.d.ts +1 -1
- package/dist/components/atoms/Button/States/Error.js +34 -24
- package/dist/components/atoms/Button/States/Error.js.map +1 -1
- package/dist/components/atoms/Button/States/Loading.d.ts +1 -1
- package/dist/components/atoms/Button/States/Loading.js +34 -24
- package/dist/components/atoms/Button/States/Loading.js.map +1 -1
- package/dist/components/atoms/Button/States/Success.d.ts +1 -1
- package/dist/components/atoms/Button/States/Success.js +34 -24
- package/dist/components/atoms/Button/States/Success.js.map +1 -1
- package/dist/components/atoms/Button/index.d.ts +2 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.d.ts +1 -1
- package/dist/components/atoms/GroupButton/GroupButtonOption.js +34 -23
- package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/components/atoms/Header/Header.js +73 -33
- package/dist/components/atoms/Header/Header.js.map +1 -1
- package/dist/components/atoms/Header/index.d.ts +2 -1
- package/dist/components/atoms/Header/styled.js +22 -23
- package/dist/components/atoms/Header/styled.js.map +1 -1
- package/dist/components/atoms/Input/Input.d.ts +1 -1
- package/dist/components/atoms/Input/Input.js +133 -93
- package/dist/components/atoms/Input/Input.js.map +1 -1
- package/dist/components/atoms/Input/index.d.ts +2 -1
- package/dist/components/atoms/Input/styled.js +14 -21
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/InputMask/InputMask.js +135 -91
- package/dist/components/atoms/InputMask/InputMask.js.map +1 -1
- package/dist/components/atoms/InputMask/index.d.ts +2 -1
- package/dist/components/atoms/InputMask/styled.js +17 -22
- package/dist/components/atoms/InputMask/styled.js.map +1 -1
- package/dist/components/atoms/Modal/ModalGroupManager.js +47 -32
- package/dist/components/atoms/Modal/ModalGroupManager.js.map +1 -1
- package/dist/components/atoms/Modal/ModalLifecycleHandler.js +70 -78
- package/dist/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -1
- package/dist/components/atoms/Modal/ui/BaseModalView.js +115 -117
- package/dist/components/atoms/Modal/ui/BaseModalView.js.map +1 -1
- package/dist/components/atoms/Modal/ui/styled.js +31 -31
- package/dist/components/atoms/Modal/ui/styled.js.map +1 -1
- package/dist/components/atoms/Modal/useLazyModalManager.d.ts +1 -1
- package/dist/components/atoms/Modal/useLazyModalManager.js +22 -25
- package/dist/components/atoms/Modal/useLazyModalManager.js.map +1 -1
- package/dist/components/atoms/Modal/useModalManager.d.ts +1 -1
- package/dist/components/atoms/Modal/useModalManager.js +14 -21
- package/dist/components/atoms/Modal/useModalManager.js.map +1 -1
- package/dist/components/atoms/Modal/useModalRemoteControl.js +10 -14
- package/dist/components/atoms/Modal/useModalRemoteControl.js.map +1 -1
- package/dist/components/atoms/Skeleton/Pulse.js +26 -33
- package/dist/components/atoms/Skeleton/Pulse.js.map +1 -1
- package/dist/components/atoms/Skeleton/Skeleton.js +72 -53
- package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/atoms/Skeleton/Wave.js +47 -56
- package/dist/components/atoms/Skeleton/Wave.js.map +1 -1
- package/dist/components/atoms/Skeleton/animation.js +29 -31
- package/dist/components/atoms/Skeleton/animation.js.map +1 -1
- package/dist/components/atoms/Skeleton/index.d.ts +2 -1
- package/dist/components/atoms/Skeleton/styled.js +14 -30
- package/dist/components/atoms/Skeleton/styled.js.map +1 -1
- package/dist/components/atoms/SnappingSlider/SnappingSlider.js +73 -36
- package/dist/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -1
- package/dist/components/atoms/SnappingSlider/index.d.ts +2 -1
- package/dist/components/atoms/Tag/Tag.js +45 -28
- package/dist/components/atoms/Tag/Tag.js.map +1 -1
- package/dist/components/atoms/Tag/index.d.ts +2 -1
- package/dist/components/atoms/Text/Text.js +38 -18
- package/dist/components/atoms/Text/Text.js.map +1 -1
- package/dist/components/atoms/Text/index.d.ts +2 -1
- package/dist/components/atoms/Text/styled.js +21 -28
- package/dist/components/atoms/Text/styled.js.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.js +103 -58
- package/dist/components/atoms/TextArea/TextArea.js.map +1 -1
- package/dist/components/atoms/TextArea/index.d.ts +2 -1
- package/dist/components/atoms/TextArea/styled.js +9 -11
- package/dist/components/atoms/TextArea/styled.js.map +1 -1
- package/dist/components/molecules/Calendar/Calendar.d.ts +1 -1
- package/dist/components/molecules/Calendar/Calendar.js +54 -28
- package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js +67 -46
- 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/styled.js +10 -18
- package/dist/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js +61 -38
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/index.d.ts +2 -1
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js +54 -28
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/components/molecules/Grid/Grid.js +77 -46
- package/dist/components/molecules/Grid/Grid.js.map +1 -1
- package/dist/components/molecules/Grid/Item/Item.d.ts +1 -1
- package/dist/components/molecules/Grid/Item/Item.js +74 -43
- package/dist/components/molecules/Grid/Item/Item.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconTextButton.js +67 -42
- package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
- package/dist/components/molecules/IconTextButton/TextComponent.js +44 -37
- package/dist/components/molecules/IconTextButton/TextComponent.js.map +1 -1
- package/dist/components/molecules/IconTextButton/index.d.ts +2 -1
- package/dist/components/molecules/IconTextButton/styled.js +34 -45
- package/dist/components/molecules/IconTextButton/styled.js.map +1 -1
- package/dist/components/molecules/InputPassword/InputPassword.d.ts +1 -1
- package/dist/components/molecules/InputPassword/InputPassword.js +60 -40
- package/dist/components/molecules/InputPassword/InputPassword.js.map +1 -1
- package/dist/components/molecules/InputPassword/index.d.ts +2 -1
- package/dist/components/molecules/LabeledSwitch/LabelComponent.js +54 -30
- package/dist/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +65 -39
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/index.d.ts +2 -1
- package/dist/components/molecules/LabeledSwitch/styled.js +31 -30
- package/dist/components/molecules/LabeledSwitch/styled.js.map +1 -1
- package/dist/components/molecules/Select/Modal.js +198 -132
- package/dist/components/molecules/Select/Modal.js.map +1 -1
- package/dist/components/molecules/Select/Select.js +194 -115
- package/dist/components/molecules/Select/Select.js.map +1 -1
- package/dist/components/molecules/Select/index.d.ts +2 -1
- package/dist/components/molecules/Select/styled.js +82 -104
- package/dist/components/molecules/Select/styled.js.map +1 -1
- package/dist/components/molecules/Snackbar/Snackbar.d.ts +1 -1
- package/dist/components/molecules/Snackbar/Snackbar.js +51 -30
- 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/styled.js +11 -23
- package/dist/components/molecules/Snackbar/styled.js.map +1 -1
- package/dist/index.d.ts +38 -19
- package/dist/index.js +78 -431
- package/dist/index.js.map +1 -1
- package/dist/utils/date.js +31 -21
- package/dist/utils/date.js.map +1 -1
- package/esm/components/atoms/Avatar/Avatar.d.ts +4 -0
- package/esm/components/atoms/Avatar/Avatar.js +31 -0
- package/esm/components/atoms/Avatar/Avatar.js.map +1 -0
- package/esm/components/atoms/Avatar/index.d.ts +1 -0
- package/esm/components/atoms/Badge/Badge.d.ts +8 -0
- package/esm/components/atoms/Badge/Badge.js +56 -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/BottomNavigator/BottomNavigator.d.ts +13 -0
- package/esm/components/atoms/BottomNavigator/BottomNavigator.js +61 -0
- package/esm/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -0
- package/esm/components/atoms/BottomNavigator/Item.d.ts +19 -0
- package/esm/components/atoms/BottomNavigator/Item.js +58 -0
- package/esm/components/atoms/BottomNavigator/Item.js.map +1 -0
- package/esm/components/atoms/BottomNavigator/index.d.ts +3 -0
- package/esm/components/atoms/BottomNavigator/styled.d.ts +11 -0
- package/esm/components/atoms/BottomNavigator/styled.js +31 -0
- package/esm/components/atoms/BottomNavigator/styled.js.map +1 -0
- package/esm/components/atoms/Button/Button.d.ts +6 -0
- package/esm/components/atoms/Button/Button.js +57 -0
- package/esm/components/atoms/Button/Button.js.map +1 -0
- package/esm/components/atoms/Button/States/Error.d.ts +4 -0
- package/esm/components/atoms/Button/States/Error.js +31 -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 +31 -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 +31 -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/index.d.ts +3 -0
- package/esm/components/atoms/GroupButton/GroupButtonOption.d.ts +2 -0
- package/esm/components/atoms/GroupButton/GroupButtonOption.js +31 -0
- package/esm/components/atoms/GroupButton/GroupButtonOption.js.map +1 -0
- package/esm/components/atoms/GroupButton/index.d.ts +1 -0
- package/esm/components/atoms/Header/Header.d.ts +12 -0
- package/esm/components/atoms/Header/Header.js +62 -0
- package/esm/components/atoms/Header/Header.js.map +1 -0
- package/esm/components/atoms/Header/index.d.ts +2 -0
- package/esm/components/atoms/Header/styled.d.ts +8 -0
- package/esm/components/atoms/Header/styled.js +19 -0
- package/esm/components/atoms/Header/styled.js.map +1 -0
- package/esm/components/atoms/Input/Input.d.ts +9 -0
- package/esm/components/atoms/Input/Input.js +133 -0
- package/esm/components/atoms/Input/Input.js.map +1 -0
- package/esm/components/atoms/Input/index.d.ts +2 -0
- package/esm/components/atoms/Input/styled.d.ts +1 -0
- package/esm/components/atoms/Input/styled.js +13 -0
- package/esm/components/atoms/Input/styled.js.map +1 -0
- package/esm/components/atoms/InputMask/InputMask.d.ts +8 -0
- package/esm/components/atoms/InputMask/InputMask.js +134 -0
- package/esm/components/atoms/InputMask/InputMask.js.map +1 -0
- package/esm/components/atoms/InputMask/index.d.ts +2 -0
- package/esm/components/atoms/InputMask/styled.d.ts +5 -0
- package/esm/components/atoms/InputMask/styled.js +16 -0
- package/esm/components/atoms/InputMask/styled.js.map +1 -0
- package/esm/components/atoms/Modal/ModalGroupManager.d.ts +4 -0
- package/esm/components/atoms/Modal/ModalGroupManager.js +48 -0
- package/esm/components/atoms/Modal/ModalGroupManager.js.map +1 -0
- package/esm/components/atoms/Modal/ModalLifecycleHandler.d.ts +24 -0
- package/esm/components/atoms/Modal/ModalLifecycleHandler.js +101 -0
- package/esm/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -0
- package/esm/components/atoms/Modal/index.d.ts +7 -0
- package/esm/components/atoms/Modal/ui/BaseModalView.d.ts +3 -0
- package/esm/components/atoms/Modal/ui/BaseModalView.js +143 -0
- package/esm/components/atoms/Modal/ui/BaseModalView.js.map +1 -0
- package/esm/components/atoms/Modal/ui/styled.d.ts +6 -0
- package/esm/components/atoms/Modal/ui/styled.js +24 -0
- package/esm/components/atoms/Modal/ui/styled.js.map +1 -0
- package/esm/components/atoms/Modal/ui/types.d.ts +10 -0
- package/esm/components/atoms/Modal/useLazyModalManager.d.ts +8 -0
- package/esm/components/atoms/Modal/useLazyModalManager.js +33 -0
- package/esm/components/atoms/Modal/useLazyModalManager.js.map +1 -0
- package/esm/components/atoms/Modal/useModalManager.d.ts +6 -0
- package/esm/components/atoms/Modal/useModalManager.js +24 -0
- package/esm/components/atoms/Modal/useModalManager.js.map +1 -0
- package/esm/components/atoms/Modal/useModalRemoteControl.d.ts +4 -0
- package/esm/components/atoms/Modal/useModalRemoteControl.js +18 -0
- package/esm/components/atoms/Modal/useModalRemoteControl.js.map +1 -0
- package/esm/components/atoms/Skeleton/Pulse.d.ts +2 -0
- package/esm/components/atoms/Skeleton/Pulse.js +32 -0
- package/esm/components/atoms/Skeleton/Pulse.js.map +1 -0
- package/esm/components/atoms/Skeleton/Skeleton.d.ts +12 -0
- package/esm/components/atoms/Skeleton/Skeleton.js +87 -0
- package/esm/components/atoms/Skeleton/Skeleton.js.map +1 -0
- package/esm/components/atoms/Skeleton/Wave.d.ts +2 -0
- package/esm/components/atoms/Skeleton/Wave.js +50 -0
- package/esm/components/atoms/Skeleton/Wave.js.map +1 -0
- package/esm/components/atoms/Skeleton/animation.d.ts +3 -0
- package/esm/components/atoms/Skeleton/animation.js +45 -0
- package/esm/components/atoms/Skeleton/animation.js.map +1 -0
- package/esm/components/atoms/Skeleton/index.d.ts +2 -0
- package/esm/components/atoms/Skeleton/styled.d.ts +7 -0
- package/esm/components/atoms/Skeleton/styled.js +13 -0
- package/esm/components/atoms/Skeleton/styled.js.map +1 -0
- package/esm/components/atoms/Skeleton/types.d.ts +12 -0
- package/esm/components/atoms/SnappingSlider/SnappingSlider.d.ts +10 -0
- package/esm/components/atoms/SnappingSlider/SnappingSlider.js +79 -0
- package/esm/components/atoms/SnappingSlider/SnappingSlider.js.map +1 -0
- package/esm/components/atoms/SnappingSlider/index.d.ts +2 -0
- package/esm/components/atoms/Tag/Tag.d.ts +7 -0
- package/esm/components/atoms/Tag/Tag.js +47 -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/Text/Text.d.ts +5 -0
- package/esm/components/atoms/Text/Text.js +38 -0
- package/esm/components/atoms/Text/Text.js.map +1 -0
- package/esm/components/atoms/Text/index.d.ts +2 -0
- package/esm/components/atoms/Text/styled.d.ts +10 -0
- package/esm/components/atoms/Text/styled.js +20 -0
- package/esm/components/atoms/Text/styled.js.map +1 -0
- package/esm/components/atoms/TextArea/TextArea.d.ts +5 -0
- package/esm/components/atoms/TextArea/TextArea.js +129 -0
- package/esm/components/atoms/TextArea/TextArea.js.map +1 -0
- package/esm/components/atoms/TextArea/index.d.ts +2 -0
- package/esm/components/atoms/TextArea/styled.d.ts +4 -0
- package/esm/components/atoms/TextArea/styled.js +8 -0
- package/esm/components/atoms/TextArea/styled.js.map +1 -0
- package/esm/components/molecules/Calendar/Calendar.d.ts +1 -0
- package/esm/components/molecules/Calendar/Calendar.js +50 -0
- package/esm/components/molecules/Calendar/Calendar.js.map +1 -0
- package/esm/components/molecules/Calendar/index.d.ts +1 -0
- package/esm/components/molecules/DatePicker/DatePicker.d.ts +3 -0
- package/esm/components/molecules/DatePicker/DatePicker.js +76 -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/styled.d.ts +4 -0
- package/esm/components/molecules/DatePicker/styled.js +9 -0
- package/esm/components/molecules/DatePicker/styled.js.map +1 -0
- package/esm/components/molecules/DateTimePicker/DateTimePicker.d.ts +4 -0
- package/esm/components/molecules/DateTimePicker/DateTimePicker.js +66 -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/DateTimeSelector/DateTimeSelector.d.ts +3 -0
- package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js +50 -0
- package/esm/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -0
- package/esm/components/molecules/DateTimeSelector/index.d.ts +1 -0
- package/esm/components/molecules/Grid/Grid.d.ts +5 -0
- package/esm/components/molecules/Grid/Grid.js +88 -0
- package/esm/components/molecules/Grid/Grid.js.map +1 -0
- package/esm/components/molecules/Grid/Item/Item.d.ts +7 -0
- package/esm/components/molecules/Grid/Item/Item.js +106 -0
- package/esm/components/molecules/Grid/Item/Item.js.map +1 -0
- package/esm/components/molecules/Grid/Item/index.d.ts +1 -0
- package/esm/components/molecules/Grid/index.d.ts +2 -0
- package/esm/components/molecules/IconTextButton/IconTextButton.d.ts +6 -0
- package/esm/components/molecules/IconTextButton/IconTextButton.js +72 -0
- package/esm/components/molecules/IconTextButton/IconTextButton.js.map +1 -0
- package/esm/components/molecules/IconTextButton/TextComponent.d.ts +12 -0
- package/esm/components/molecules/IconTextButton/TextComponent.js +40 -0
- package/esm/components/molecules/IconTextButton/TextComponent.js.map +1 -0
- package/esm/components/molecules/IconTextButton/index.d.ts +2 -0
- package/esm/components/molecules/IconTextButton/styled.d.ts +2 -0
- package/esm/components/molecules/IconTextButton/styled.js +28 -0
- package/esm/components/molecules/IconTextButton/styled.js.map +1 -0
- package/esm/components/molecules/InputPassword/InputPassword.d.ts +6 -0
- package/esm/components/molecules/InputPassword/InputPassword.js +54 -0
- package/esm/components/molecules/InputPassword/InputPassword.js.map +1 -0
- package/esm/components/molecules/InputPassword/index.d.ts +2 -0
- package/esm/components/molecules/LabeledSwitch/LabelComponent.d.ts +13 -0
- package/esm/components/molecules/LabeledSwitch/LabelComponent.js +59 -0
- package/esm/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -0
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.d.ts +8 -0
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js +76 -0
- package/esm/components/molecules/LabeledSwitch/LabeledSwitch.js.map +1 -0
- package/esm/components/molecules/LabeledSwitch/index.d.ts +2 -0
- package/esm/components/molecules/LabeledSwitch/styled.d.ts +9 -0
- package/esm/components/molecules/LabeledSwitch/styled.js +24 -0
- package/esm/components/molecules/LabeledSwitch/styled.js.map +1 -0
- package/esm/components/molecules/Select/Modal.d.ts +7 -0
- package/esm/components/molecules/Select/Modal.js +230 -0
- package/esm/components/molecules/Select/Modal.js.map +1 -0
- package/esm/components/molecules/Select/Select.d.ts +24 -0
- package/esm/components/molecules/Select/Select.js +240 -0
- package/esm/components/molecules/Select/Select.js.map +1 -0
- package/esm/components/molecules/Select/index.d.ts +2 -0
- package/esm/components/molecules/Select/styled.d.ts +41 -0
- package/esm/components/molecules/Select/styled.js +78 -0
- package/esm/components/molecules/Select/styled.js.map +1 -0
- package/esm/components/molecules/Snackbar/Snackbar.d.ts +9 -0
- package/esm/components/molecules/Snackbar/Snackbar.js +51 -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/styled.d.ts +4 -0
- package/esm/components/molecules/Snackbar/styled.js +10 -0
- package/esm/components/molecules/Snackbar/styled.js.map +1 -0
- package/esm/index.d.ts +44 -0
- package/esm/index.js +35 -0
- package/esm/index.js.map +1 -0
- package/esm/utils/date.d.ts +1 -0
- package/esm/utils/date.js +16 -0
- package/esm/utils/date.js.map +1 -0
- package/package.json +8 -5
- package/rollup.config.js +39 -0
- package/src/components/atoms/Avatar/Avatar.tsx +3 -1
- package/src/components/atoms/Avatar/index.ts +1 -1
- package/src/components/atoms/Badge/index.ts +2 -1
- package/src/components/atoms/BottomNavigator/index.ts +3 -5
- package/src/components/atoms/Button/States/Error.tsx +1 -1
- package/src/components/atoms/Button/States/Loading.tsx +1 -1
- package/src/components/atoms/Button/States/Success.tsx +1 -1
- package/src/components/atoms/Button/index.ts +2 -1
- package/src/components/atoms/Header/index.ts +2 -1
- package/src/components/atoms/Input/index.ts +2 -1
- package/src/components/atoms/InputMask/index.ts +2 -1
- package/src/components/atoms/Skeleton/index.ts +2 -1
- package/src/components/atoms/SnappingSlider/index.ts +2 -4
- package/src/components/atoms/Tag/index.ts +2 -1
- package/src/components/atoms/Text/index.ts +2 -1
- package/src/components/atoms/TextArea/index.ts +2 -1
- package/src/components/molecules/DatePicker/index.ts +2 -1
- package/src/components/molecules/DateTimePicker/index.ts +2 -1
- package/src/components/molecules/IconTextButton/index.ts +2 -4
- package/src/components/molecules/InputPassword/index.ts +2 -4
- package/src/components/molecules/LabeledSwitch/index.ts +2 -4
- package/src/components/molecules/Select/Modal.tsx +1 -1
- package/src/components/molecules/Select/Select.tsx +3 -2
- package/src/components/molecules/Select/index.ts +2 -1
- package/src/components/molecules/Snackbar/Snackbar.tsx +1 -1
- package/src/components/molecules/Snackbar/index.ts +2 -1
- package/src/index.ts +37 -46
- package/tsconfig.build.esm.json +10 -0
- package/dist/components/atoms/Avatar/index.js +0 -14
- package/dist/components/atoms/Avatar/index.js.map +0 -1
- package/dist/components/atoms/Badge/index.js +0 -24
- package/dist/components/atoms/Badge/index.js.map +0 -1
- package/dist/components/atoms/BottomNavigator/index.js +0 -32
- package/dist/components/atoms/BottomNavigator/index.js.map +0 -1
- package/dist/components/atoms/Button/States/index.js +0 -32
- package/dist/components/atoms/Button/States/index.js.map +0 -1
- package/dist/components/atoms/Button/index.js +0 -40
- package/dist/components/atoms/Button/index.js.map +0 -1
- package/dist/components/atoms/GroupButton/index.js +0 -16
- package/dist/components/atoms/GroupButton/index.js.map +0 -1
- package/dist/components/atoms/Header/index.js +0 -24
- package/dist/components/atoms/Header/index.js.map +0 -1
- package/dist/components/atoms/Input/index.js +0 -24
- package/dist/components/atoms/Input/index.js.map +0 -1
- package/dist/components/atoms/InputMask/index.js +0 -24
- package/dist/components/atoms/InputMask/index.js.map +0 -1
- package/dist/components/atoms/Modal/index.js +0 -97
- package/dist/components/atoms/Modal/index.js.map +0 -1
- package/dist/components/atoms/Modal/ui/types.js +0 -6
- package/dist/components/atoms/Modal/ui/types.js.map +0 -1
- package/dist/components/atoms/Skeleton/index.js +0 -24
- package/dist/components/atoms/Skeleton/index.js.map +0 -1
- package/dist/components/atoms/Skeleton/types.js +0 -6
- package/dist/components/atoms/Skeleton/types.js.map +0 -1
- package/dist/components/atoms/SnappingSlider/index.js +0 -24
- package/dist/components/atoms/SnappingSlider/index.js.map +0 -1
- package/dist/components/atoms/Tag/index.js +0 -24
- package/dist/components/atoms/Tag/index.js.map +0 -1
- package/dist/components/atoms/Text/index.js +0 -24
- package/dist/components/atoms/Text/index.js.map +0 -1
- package/dist/components/atoms/TextArea/index.js +0 -24
- package/dist/components/atoms/TextArea/index.js.map +0 -1
- package/dist/components/molecules/Calendar/index.js +0 -14
- package/dist/components/molecules/Calendar/index.js.map +0 -1
- package/dist/components/molecules/DatePicker/index.js +0 -20
- package/dist/components/molecules/DatePicker/index.js.map +0 -1
- package/dist/components/molecules/DateTimePicker/index.js +0 -20
- package/dist/components/molecules/DateTimePicker/index.js.map +0 -1
- package/dist/components/molecules/DateTimeSelector/index.js +0 -14
- package/dist/components/molecules/DateTimeSelector/index.js.map +0 -1
- package/dist/components/molecules/Grid/Item/index.js +0 -24
- package/dist/components/molecules/Grid/Item/index.js.map +0 -1
- package/dist/components/molecules/Grid/index.js +0 -24
- package/dist/components/molecules/Grid/index.js.map +0 -1
- package/dist/components/molecules/IconTextButton/index.js +0 -24
- package/dist/components/molecules/IconTextButton/index.js.map +0 -1
- package/dist/components/molecules/InputPassword/index.js +0 -24
- package/dist/components/molecules/InputPassword/index.js.map +0 -1
- package/dist/components/molecules/LabeledSwitch/index.js +0 -24
- package/dist/components/molecules/LabeledSwitch/index.js.map +0 -1
- package/dist/components/molecules/Select/index.js +0 -24
- package/dist/components/molecules/Select/index.js.map +0 -1
- package/dist/components/molecules/Snackbar/index.js +0 -24
- package/dist/components/molecules/Snackbar/index.js.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledView: import("@emotion/native").StyledComponent<any, {}, {
|
|
3
|
+
ref?: import("react").Ref<import("react-native").View> | undefined;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const FloatingButton: import("@emotion/native").StyledComponent<any, {}, {
|
|
6
|
+
ref?: import("react").Ref<any> | undefined;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const Dummy: import("@emotion/native").StyledComponent<any, {}, {}>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import styled from '@emotion/native';
|
|
2
|
+
import { Button } from '@tecsinapse/react-core';
|
|
3
|
+
|
|
4
|
+
const StyledView = styled.View`
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
align-items: center;
|
|
8
|
+
padding: ${({ theme }) => theme.spacing.deca};
|
|
9
|
+
width: 100%;
|
|
10
|
+
`;
|
|
11
|
+
const FloatingButton = styled(Button)`
|
|
12
|
+
aspect-ratio: 1;
|
|
13
|
+
`;
|
|
14
|
+
const Dummy = styled(FloatingButton)`
|
|
15
|
+
background-color: rgba(0, 0, 0, 0);
|
|
16
|
+
`;
|
|
17
|
+
|
|
18
|
+
export { Dummy, FloatingButton, StyledView };
|
|
19
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/atoms/Header/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { Button, ButtonProps, StyleProps } from '@tecsinapse/react-core';\n\nexport const StyledView = styled.View<Partial<StyleProps>>`\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n padding: ${({ theme }) => theme.spacing.deca};\n width: 100%;\n`;\n\nexport const FloatingButton = styled(Button)<ButtonProps & Partial<StyleProps>>`\n aspect-ratio: 1;\n`;\n\nexport const Dummy = styled(FloatingButton)`\n background-color: rgba(0, 0, 0, 0);\n`;\n"],"names":[],"mappings":";;;AAGO,MAAM,aAAa,MAAO,CAAA,IAAA,CAAA;AAAA;AAAA;AAAA;AAAA,WAAA,EAIpB,CAAC,EAAE,KAAM,EAAA,KAAM,MAAM,OAAQ,CAAA,IAAA,CAAA;AAAA;AAAA,EAAA;AAI7B,MAAA,cAAA,GAAiB,OAAO,MAAM,CAAA,CAAA;AAAA;AAAA,EAAA;AAI9B,MAAA,KAAA,GAAQ,OAAO,cAAc,CAAA,CAAA;AAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FontStackType, FontWeightType, InputContainerProps, InputElementProps } from '@tecsinapse/react-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { TextInput } from 'react-native';
|
|
4
|
+
export interface InputNativeProps extends Omit<InputElementProps, 'style'>, InputContainerProps {
|
|
5
|
+
inputFontStack?: FontStackType;
|
|
6
|
+
inputFontWeight?: FontWeightType;
|
|
7
|
+
}
|
|
8
|
+
declare const Input: React.ForwardRefExoticComponent<Pick<InputNativeProps, keyof InputNativeProps> & React.RefAttributes<TextInput>>;
|
|
9
|
+
export default Input;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { useInputFocus, RFValue, InputContainer, Hint } from '@tecsinapse/react-core';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import Text from '../Text/Text.js';
|
|
5
|
+
import { StyledNativeInput } from './styled.js';
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __defProps = Object.defineProperties;
|
|
9
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
10
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
13
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14
|
+
var __spreadValues = (a, b) => {
|
|
15
|
+
for (var prop in b || (b = {}))
|
|
16
|
+
if (__hasOwnProp.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
if (__getOwnPropSymbols)
|
|
19
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
20
|
+
if (__propIsEnum.call(b, prop))
|
|
21
|
+
__defNormalProp(a, prop, b[prop]);
|
|
22
|
+
}
|
|
23
|
+
return a;
|
|
24
|
+
};
|
|
25
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
26
|
+
var __objRest = (source, exclude) => {
|
|
27
|
+
var target = {};
|
|
28
|
+
for (var prop in source)
|
|
29
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
if (source != null && __getOwnPropSymbols)
|
|
32
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
33
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
34
|
+
target[prop] = source[prop];
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
};
|
|
38
|
+
const Input = React__default.forwardRef(
|
|
39
|
+
(_a, ref) => {
|
|
40
|
+
var _b = _a, {
|
|
41
|
+
label,
|
|
42
|
+
labelColor,
|
|
43
|
+
labelColorVariant,
|
|
44
|
+
labelColorTone,
|
|
45
|
+
labelTypography,
|
|
46
|
+
labelStack,
|
|
47
|
+
labelWeight,
|
|
48
|
+
leftComponent,
|
|
49
|
+
rightComponent,
|
|
50
|
+
disabled,
|
|
51
|
+
borderColor,
|
|
52
|
+
borderColorGradation,
|
|
53
|
+
inputFontStack = "default",
|
|
54
|
+
inputFontWeight = "bold",
|
|
55
|
+
inputContainerStyle,
|
|
56
|
+
variant = "default",
|
|
57
|
+
hintComponent,
|
|
58
|
+
hint,
|
|
59
|
+
onFocus,
|
|
60
|
+
onBlur,
|
|
61
|
+
value,
|
|
62
|
+
placeholder
|
|
63
|
+
} = _b, rest = __objRest(_b, [
|
|
64
|
+
"label",
|
|
65
|
+
"labelColor",
|
|
66
|
+
"labelColorVariant",
|
|
67
|
+
"labelColorTone",
|
|
68
|
+
"labelTypography",
|
|
69
|
+
"labelStack",
|
|
70
|
+
"labelWeight",
|
|
71
|
+
"leftComponent",
|
|
72
|
+
"rightComponent",
|
|
73
|
+
"disabled",
|
|
74
|
+
"borderColor",
|
|
75
|
+
"borderColorGradation",
|
|
76
|
+
"inputFontStack",
|
|
77
|
+
"inputFontWeight",
|
|
78
|
+
"inputContainerStyle",
|
|
79
|
+
"variant",
|
|
80
|
+
"hintComponent",
|
|
81
|
+
"hint",
|
|
82
|
+
"onFocus",
|
|
83
|
+
"onBlur",
|
|
84
|
+
"value",
|
|
85
|
+
"placeholder"
|
|
86
|
+
]);
|
|
87
|
+
const _hint = hintComponent || /* @__PURE__ */ React__default.createElement(Hint, {
|
|
88
|
+
TextComponent: Text,
|
|
89
|
+
text: hint,
|
|
90
|
+
variant
|
|
91
|
+
});
|
|
92
|
+
const { focused, handleBlur, handleFocus } = useInputFocus(
|
|
93
|
+
onFocus,
|
|
94
|
+
onBlur,
|
|
95
|
+
!disabled
|
|
96
|
+
);
|
|
97
|
+
const internalStyle = __spreadValues({
|
|
98
|
+
minHeight: RFValue(50)
|
|
99
|
+
}, { inputContainerStyle });
|
|
100
|
+
const onlyLabel = label && !placeholder;
|
|
101
|
+
return /* @__PURE__ */ React__default.createElement(View, null, /* @__PURE__ */ React__default.createElement(InputContainer, {
|
|
102
|
+
label: value ? label : void 0,
|
|
103
|
+
labelColor,
|
|
104
|
+
labelColorVariant,
|
|
105
|
+
labelColorTone,
|
|
106
|
+
labelTypography,
|
|
107
|
+
labelStack,
|
|
108
|
+
labelWeight,
|
|
109
|
+
LabelComponent: Text,
|
|
110
|
+
leftComponent,
|
|
111
|
+
rightComponent,
|
|
112
|
+
borderColor,
|
|
113
|
+
borderColorGradation,
|
|
114
|
+
inputContainerStyle: internalStyle,
|
|
115
|
+
focused,
|
|
116
|
+
disabled,
|
|
117
|
+
variant
|
|
118
|
+
}, /* @__PURE__ */ React__default.createElement(StyledNativeInput, __spreadProps(__spreadValues({}, rest), {
|
|
119
|
+
placeholder: onlyLabel ? label : placeholder,
|
|
120
|
+
value,
|
|
121
|
+
ref,
|
|
122
|
+
fontStack: inputFontStack,
|
|
123
|
+
fontWeight: inputFontWeight,
|
|
124
|
+
disabled,
|
|
125
|
+
onFocus: handleFocus,
|
|
126
|
+
onBlur: handleBlur
|
|
127
|
+
}))), hint && _hint);
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
Input.displayName = "Input";
|
|
131
|
+
|
|
132
|
+
export { Input as default };
|
|
133
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../../src/components/atoms/Input/Input.tsx"],"sourcesContent":["import {\n FontStackType,\n FontWeightType,\n Hint,\n InputContainer,\n InputContainerProps,\n InputElementProps,\n RFValue,\n useInputFocus,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { StyleProp, TextInput, View, ViewStyle } from 'react-native';\nimport { Text } from '../Text';\nimport { StyledNativeInput } from './styled';\n\nexport interface InputNativeProps\n extends Omit<InputElementProps, 'style'>,\n InputContainerProps {\n inputFontStack?: FontStackType;\n inputFontWeight?: FontWeightType;\n}\n\nconst Input = React.forwardRef<TextInput, InputNativeProps>(\n (\n {\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n borderColor,\n borderColorGradation,\n inputFontStack = 'default',\n inputFontWeight = 'bold',\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n value,\n placeholder,\n ...rest\n },\n ref\n ) => {\n const _hint = hintComponent || (\n <Hint TextComponent={Text} text={hint} variant={variant} />\n );\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n const internalStyle: StyleProp<ViewStyle> = {\n minHeight: RFValue(50),\n ...{ inputContainerStyle },\n };\n const onlyLabel = label && !placeholder;\n\n return (\n <View>\n <InputContainer\n label={value ? label : undefined}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={Text}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={internalStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n >\n <StyledNativeInput\n {...rest}\n placeholder={onlyLabel ? label : placeholder}\n value={value}\n ref={ref}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </InputContainer>\n {hint && _hint}\n </View>\n );\n }\n);\n\nInput.displayName = 'Input';\n\nexport default Input;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsBA,MAAM,QAAQA,cAAM,CAAA,UAAA;AAAA,EAClB,CACE,IAyBA,GACG,KAAA;AA1BH,IACE,IAAA,EAAA,GAAA,EAAA,EAAA;AA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,MAAM,aAAsC,GAAA,cAAA,CAAA;AAAA,MAC1C,SAAA,EAAW,QAAQ,EAAE,CAAA;AAAA,KAAA,EAClB,EAAE,mBAAoB,EAAA,CAAA,CAAA;AAE3B,IAAM,MAAA,SAAA,GAAY,SAAS,CAAC,WAAA,CAAA;AAE5B,IACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,4BACEA,cAAA,CAAA,aAAA,CAAA,cAAA,EAAA;AAAA,MACC,KAAA,EAAO,QAAQ,KAAQ,GAAA,KAAA,CAAA;AAAA,MACvB,UAAA;AAAA,MACA,iBAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA;AAAA,MACA,cAAgB,EAAA,IAAA;AAAA,MAChB,aAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,oBAAA;AAAA,MACA,mBAAqB,EAAA,aAAA;AAAA,MACrB,OAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA;AAAA,KAEA,kBAAAA,cAAA,CAAA,aAAA,CAAC,oDACK,IADL,CAAA,EAAA;AAAA,MAEC,WAAA,EAAa,YAAY,KAAQ,GAAA,WAAA;AAAA,MACjC,KAAA;AAAA,MACA,GAAA;AAAA,MACA,SAAW,EAAA,cAAA;AAAA,MACX,UAAY,EAAA,eAAA;AAAA,MACZ,QAAA;AAAA,MACA,OAAS,EAAA,WAAA;AAAA,MACT,MAAQ,EAAA,UAAA;AAAA,KACV,CAAA,CACF,CACC,EAAA,IAAA,IAAQ,KACX,CAAA,CAAA;AAAA,GAEJ;AACF,EAAA;AAEA,KAAA,CAAM,WAAc,GAAA,OAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledNativeInput: import("@emotion/native").StyledComponent<any, {}, {}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import styled from '@emotion/native';
|
|
2
|
+
import { InputElement } from '@tecsinapse/react-core';
|
|
3
|
+
import { fontStyles } from '../Text/styled.js';
|
|
4
|
+
|
|
5
|
+
const StyledNativeInputBase = styled(InputElement)`
|
|
6
|
+
height: ${({ theme }) => theme.typography.h5.lineHeight};
|
|
7
|
+
width: 100%;
|
|
8
|
+
padding: 0;
|
|
9
|
+
`;
|
|
10
|
+
const StyledNativeInput = styled(StyledNativeInputBase)(fontStyles);
|
|
11
|
+
|
|
12
|
+
export { StyledNativeInput };
|
|
13
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/atoms/Input/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { InputElement, StyleProps } from '@tecsinapse/react-core';\nimport { Font, fontStyles } from '../Text/styled';\nimport { InputNativeProps } from './Input';\n\nconst StyledNativeInputBase = styled(InputElement)<\n Partial<InputNativeProps> & Partial<StyleProps>\n>`\n height: ${({ theme }) => theme.typography.h5.lineHeight};\n width: 100%;\n padding: 0;\n`;\n\nexport const StyledNativeInput = styled(StyledNativeInputBase)<\n Font & Partial<InputNativeProps> & Partial<StyleProps>\n>(fontStyles);\n"],"names":[],"mappings":";;;;AAKA,MAAM,qBAAA,GAAwB,OAAO,YAAY,CAAA,CAAA;AAAA,UAAA,EAGrC,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,WAAW,EAAG,CAAA,UAAA,CAAA;AAAA;AAAA;AAAA,CAAA,CAAA;AAKxC,MAAM,iBAAoB,GAAA,MAAA,CAAO,qBAAqB,CAAA,CAE3D,UAAU;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FontStackType, FontWeightType, InputContainerProps, InputMaskElementProps } from '@tecsinapse/react-core';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
export interface InputMaskNativeProps extends Omit<InputMaskElementProps, 'style'>, InputContainerProps {
|
|
4
|
+
inputFontStack?: FontStackType;
|
|
5
|
+
inputFontWeight?: FontWeightType;
|
|
6
|
+
}
|
|
7
|
+
declare const InputMask: FC<InputMaskNativeProps>;
|
|
8
|
+
export default InputMask;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { useInputFocus, Hint } from '@tecsinapse/react-core';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { StyledInputContainer, StyledNativeInputMask } from './styled.js';
|
|
5
|
+
import Text from '../Text/Text.js';
|
|
6
|
+
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __defProps = Object.defineProperties;
|
|
9
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
10
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
13
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14
|
+
var __spreadValues = (a, b) => {
|
|
15
|
+
for (var prop in b || (b = {}))
|
|
16
|
+
if (__hasOwnProp.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
if (__getOwnPropSymbols)
|
|
19
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
20
|
+
if (__propIsEnum.call(b, prop))
|
|
21
|
+
__defNormalProp(a, prop, b[prop]);
|
|
22
|
+
}
|
|
23
|
+
return a;
|
|
24
|
+
};
|
|
25
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
26
|
+
var __objRest = (source, exclude) => {
|
|
27
|
+
var target = {};
|
|
28
|
+
for (var prop in source)
|
|
29
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
if (source != null && __getOwnPropSymbols)
|
|
32
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
33
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
34
|
+
target[prop] = source[prop];
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
};
|
|
38
|
+
const InputMask = React__default.forwardRef(
|
|
39
|
+
(_a, ref) => {
|
|
40
|
+
var _b = _a, {
|
|
41
|
+
label,
|
|
42
|
+
labelColor,
|
|
43
|
+
labelColorVariant,
|
|
44
|
+
labelColorTone,
|
|
45
|
+
labelTypography,
|
|
46
|
+
labelStack,
|
|
47
|
+
labelWeight,
|
|
48
|
+
leftComponent,
|
|
49
|
+
rightComponent,
|
|
50
|
+
disabled,
|
|
51
|
+
style,
|
|
52
|
+
borderColor,
|
|
53
|
+
borderColorGradation,
|
|
54
|
+
inputFontStack = "default",
|
|
55
|
+
inputFontWeight = "bold",
|
|
56
|
+
inputContainerStyle,
|
|
57
|
+
variant = "default",
|
|
58
|
+
hintComponent,
|
|
59
|
+
hint,
|
|
60
|
+
onFocus,
|
|
61
|
+
onBlur,
|
|
62
|
+
value,
|
|
63
|
+
placeholder
|
|
64
|
+
} = _b, rest = __objRest(_b, [
|
|
65
|
+
"label",
|
|
66
|
+
"labelColor",
|
|
67
|
+
"labelColorVariant",
|
|
68
|
+
"labelColorTone",
|
|
69
|
+
"labelTypography",
|
|
70
|
+
"labelStack",
|
|
71
|
+
"labelWeight",
|
|
72
|
+
"leftComponent",
|
|
73
|
+
"rightComponent",
|
|
74
|
+
"disabled",
|
|
75
|
+
"style",
|
|
76
|
+
"borderColor",
|
|
77
|
+
"borderColorGradation",
|
|
78
|
+
"inputFontStack",
|
|
79
|
+
"inputFontWeight",
|
|
80
|
+
"inputContainerStyle",
|
|
81
|
+
"variant",
|
|
82
|
+
"hintComponent",
|
|
83
|
+
"hint",
|
|
84
|
+
"onFocus",
|
|
85
|
+
"onBlur",
|
|
86
|
+
"value",
|
|
87
|
+
"placeholder"
|
|
88
|
+
]);
|
|
89
|
+
const _hint = hintComponent || /* @__PURE__ */ React__default.createElement(Hint, {
|
|
90
|
+
TextComponent: Text,
|
|
91
|
+
text: hint,
|
|
92
|
+
variant
|
|
93
|
+
});
|
|
94
|
+
const { focused, handleBlur, handleFocus } = useInputFocus(
|
|
95
|
+
onFocus,
|
|
96
|
+
onBlur,
|
|
97
|
+
!disabled
|
|
98
|
+
);
|
|
99
|
+
const onlyLabel = label && !placeholder;
|
|
100
|
+
return /* @__PURE__ */ React__default.createElement(View, {
|
|
101
|
+
style
|
|
102
|
+
}, /* @__PURE__ */ React__default.createElement(StyledInputContainer, {
|
|
103
|
+
label: String(value) ? label : void 0,
|
|
104
|
+
labelColor,
|
|
105
|
+
labelColorVariant,
|
|
106
|
+
labelColorTone,
|
|
107
|
+
labelTypography,
|
|
108
|
+
labelStack,
|
|
109
|
+
labelWeight,
|
|
110
|
+
LabelComponent: Text,
|
|
111
|
+
leftComponent,
|
|
112
|
+
rightComponent,
|
|
113
|
+
borderColor,
|
|
114
|
+
borderColorGradation,
|
|
115
|
+
inputContainerStyle,
|
|
116
|
+
focused,
|
|
117
|
+
disabled,
|
|
118
|
+
variant
|
|
119
|
+
}, /* @__PURE__ */ React__default.createElement(StyledNativeInputMask, __spreadProps(__spreadValues({}, rest), {
|
|
120
|
+
placeholder: onlyLabel ? label : placeholder,
|
|
121
|
+
value,
|
|
122
|
+
ref,
|
|
123
|
+
fontStack: inputFontStack,
|
|
124
|
+
fontWeight: inputFontWeight,
|
|
125
|
+
disabled,
|
|
126
|
+
onFocus: handleFocus,
|
|
127
|
+
onBlur: handleBlur
|
|
128
|
+
}))), hint && _hint);
|
|
129
|
+
}
|
|
130
|
+
);
|
|
131
|
+
InputMask.displayName = "InputMask";
|
|
132
|
+
|
|
133
|
+
export { InputMask as default };
|
|
134
|
+
//# sourceMappingURL=InputMask.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputMask.js","sources":["../../../../src/components/atoms/InputMask/InputMask.tsx"],"sourcesContent":["import {\n FontStackType,\n FontWeightType,\n Hint,\n InputContainerProps,\n InputMaskElementProps,\n useInputFocus,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { View } from 'react-native';\nimport { StyledInputContainer, StyledNativeInputMask } from './styled';\nimport { Text } from '../Text';\n\nexport interface InputMaskNativeProps\n extends Omit<InputMaskElementProps, 'style'>,\n InputContainerProps {\n inputFontStack?: FontStackType;\n inputFontWeight?: FontWeightType;\n}\n\nconst InputMask: FC<InputMaskNativeProps> = React.forwardRef(\n (\n {\n label,\n labelColor,\n labelColorVariant,\n labelColorTone,\n labelTypography,\n labelStack,\n labelWeight,\n leftComponent,\n rightComponent,\n disabled,\n style,\n borderColor,\n borderColorGradation,\n inputFontStack = 'default',\n inputFontWeight = 'bold',\n inputContainerStyle,\n variant = 'default',\n hintComponent,\n hint,\n onFocus,\n onBlur,\n value,\n placeholder,\n ...rest\n },\n ref\n ) => {\n const _hint = hintComponent || (\n <Hint TextComponent={Text} text={hint} variant={variant} />\n );\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n const onlyLabel = label && !placeholder;\n\n return (\n <View style={style}>\n <StyledInputContainer\n label={String(value) ? label : undefined}\n labelColor={labelColor}\n labelColorVariant={labelColorVariant}\n labelColorTone={labelColorTone}\n labelTypography={labelTypography}\n labelStack={labelStack}\n labelWeight={labelWeight}\n LabelComponent={Text}\n leftComponent={leftComponent}\n rightComponent={rightComponent}\n borderColor={borderColor}\n borderColorGradation={borderColorGradation}\n inputContainerStyle={inputContainerStyle}\n focused={focused}\n disabled={disabled}\n variant={variant}\n >\n <StyledNativeInputMask\n {...rest}\n placeholder={onlyLabel ? label : placeholder}\n value={value}\n ref={ref}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n </StyledInputContainer>\n {hint && _hint}\n </View>\n );\n }\n);\n\nInputMask.displayName = 'InputMask';\n\nexport default InputMask;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;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,KAAkB,CAAA,CAAA;AAE3D,IAAA,MAAM,EAAE,OAAA,EAAS,UAAY,EAAA,WAAA,EAAgB,GAAA,aAAA;AAAA,MAC3C,OAAA;AAAA,MACA,MAAA;AAAA,MACA,CAAC,QAAA;AAAA,KACH,CAAA;AAEA,IAAM,MAAA,SAAA,GAAY,SAAS,CAAC,WAAA,CAAA;AAE5B,IAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MAAK,KAAA;AAAA,KAAA,kBACHA,cAAA,CAAA,aAAA,CAAA,oBAAA,EAAA;AAAA,MACC,KAAO,EAAA,MAAA,CAAO,KAAK,CAAA,GAAI,KAAQ,GAAA,KAAA,CAAA;AAAA,MAC/B,UAAA;AAAA,MACA,iBAAA;AAAA,MACA,cAAA;AAAA,MACA,eAAA;AAAA,MACA,UAAA;AAAA,MACA,WAAA;AAAA,MACA,cAAgB,EAAA,IAAA;AAAA,MAChB,aAAA;AAAA,MACA,cAAA;AAAA,MACA,WAAA;AAAA,MACA,oBAAA;AAAA,MACA,mBAAA;AAAA,MACA,OAAA;AAAA,MACA,QAAA;AAAA,MACA,OAAA;AAAA,KAEA,kBAAAA,cAAA,CAAA,aAAA,CAAC,wDACK,IADL,CAAA,EAAA;AAAA,MAEC,WAAA,EAAa,YAAY,KAAQ,GAAA,WAAA;AAAA,MACjC,KAAA;AAAA,MACA,GAAA;AAAA,MACA,SAAW,EAAA,cAAA;AAAA,MACX,UAAY,EAAA,eAAA;AAAA,MACZ,QAAA;AAAA,MACA,OAAS,EAAA,WAAA;AAAA,MACT,MAAQ,EAAA,UAAA;AAAA,KACV,CAAA,CACF,CACC,EAAA,IAAA,IAAQ,KACX,CAAA,CAAA;AAAA,GAEJ;AACF,EAAA;AAEA,SAAA,CAAU,WAAc,GAAA,WAAA;;;;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledInputContainer: import("@emotion/native").StyledComponent<any, {}, {
|
|
3
|
+
ref?: import("react").Ref<any> | undefined;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const StyledNativeInputMask: import("@emotion/native").StyledComponent<any, {}, {}>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import styled from '@emotion/native';
|
|
2
|
+
import { InputContainer, RFValueStr, InputMaskElement } from '@tecsinapse/react-core';
|
|
3
|
+
import { fontStyles } from '../Text/styled.js';
|
|
4
|
+
|
|
5
|
+
const StyledInputContainer = styled(InputContainer)`
|
|
6
|
+
min-height: ${RFValueStr("50px")};
|
|
7
|
+
`;
|
|
8
|
+
const StyledNativeInputMaskBase = styled(InputMaskElement)`
|
|
9
|
+
height: ${({ theme }) => theme.typography.h5.lineHeight};
|
|
10
|
+
width: 100%;
|
|
11
|
+
padding: 0;
|
|
12
|
+
`;
|
|
13
|
+
const StyledNativeInputMask = styled(StyledNativeInputMaskBase)(fontStyles);
|
|
14
|
+
|
|
15
|
+
export { StyledInputContainer, StyledNativeInputMask };
|
|
16
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/atoms/InputMask/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport {\n InputContainer,\n InputMaskElement,\n RFValueStr,\n StyleProps,\n} from '@tecsinapse/react-core';\nimport { Font, fontStyles } from '../Text/styled';\nimport { InputMaskNativeProps } from './InputMask';\n\nexport const StyledInputContainer = styled(InputContainer)<Partial<StyleProps>>`\n min-height: ${RFValueStr('50px')};\n`;\n\nconst StyledNativeInputMaskBase = styled(InputMaskElement)<\n Partial<InputMaskNativeProps> & Partial<StyleProps>\n>`\n height: ${({ theme }) => theme.typography.h5.lineHeight};\n width: 100%;\n padding: 0;\n`;\n\nexport const StyledNativeInputMask = styled(StyledNativeInputMaskBase)<\n Font & Partial<InputMaskNativeProps> & Partial<StyleProps>\n>(fontStyles);\n"],"names":[],"mappings":";;;;AAUa,MAAA,oBAAA,GAAuB,OAAO,cAAc,CAAA,CAAA;AAAA,cAAA,EACzC,WAAW,MAAM,CAAA,CAAA;AAAA,EAAA;AAGjC,MAAM,yBAAA,GAA4B,OAAO,gBAAgB,CAAA,CAAA;AAAA,UAAA,EAG7C,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,WAAW,EAAG,CAAA,UAAA,CAAA;AAAA;AAAA;AAAA,CAAA,CAAA;AAKxC,MAAM,qBAAwB,GAAA,MAAA,CAAO,yBAAyB,CAAA,CAEnE,UAAU;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React__default, { useState } from 'react';
|
|
2
|
+
import { Modal } from 'react-native';
|
|
3
|
+
import { createModalLifecycleHandler } from './ModalLifecycleHandler.js';
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __objRest = (source, exclude) => {
|
|
22
|
+
var target = {};
|
|
23
|
+
for (var prop in source)
|
|
24
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
25
|
+
target[prop] = source[prop];
|
|
26
|
+
if (source != null && __getOwnPropSymbols)
|
|
27
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
28
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
}
|
|
31
|
+
return target;
|
|
32
|
+
};
|
|
33
|
+
const modalLifecycle = createModalLifecycleHandler();
|
|
34
|
+
const ModalGroupManager = (_a) => {
|
|
35
|
+
var _b = _a, { children } = _b, others = __objRest(_b, ["children"]);
|
|
36
|
+
modalLifecycle.attach(useState([]));
|
|
37
|
+
const _render = modalLifecycle.render();
|
|
38
|
+
const hasModals = _render.length > 0;
|
|
39
|
+
return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children, /* @__PURE__ */ React__default.createElement(Modal, __spreadValues({
|
|
40
|
+
transparent: true,
|
|
41
|
+
statusBarTranslucent: true,
|
|
42
|
+
animationType: "none",
|
|
43
|
+
visible: hasModals
|
|
44
|
+
}, others), _render));
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { ModalGroupManager, modalLifecycle };
|
|
48
|
+
//# sourceMappingURL=ModalGroupManager.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalGroupManager.js","sources":["../../../../src/components/atoms/Modal/ModalGroupManager.tsx"],"sourcesContent":["import React, { FC, ReactElement, useState } from 'react';\nimport { Modal as RNModal, ModalProps } from 'react-native';\nimport { createModalLifecycleHandler } from './ModalLifecycleHandler';\nimport { IBaseModal } from './ui/types';\n\nexport const modalLifecycle = createModalLifecycleHandler();\n\n/**\n * It's responsable for rendering all the modal components.\n *\n * @param param0\n * @returns\n */\nexport const ModalGroupManager: FC<ModalProps> = ({ children, ...others }) => {\n modalLifecycle.attach(useState<ReactElement<IBaseModal>[]>([]));\n const _render = modalLifecycle.render();\n const hasModals = _render.length > 0;\n\n return (\n <>\n {children}\n <RNModal\n transparent\n statusBarTranslucent\n animationType=\"none\"\n visible={hasModals}\n {...others}\n >\n {_render}\n </RNModal>\n </>\n );\n};\n"],"names":["React","RNModal"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKO,MAAM,iBAAiB,2BAA4B,GAAA;AAQ7C,MAAA,iBAAA,GAAoC,CAAC,EAA4B,KAAA;AAA5B,EAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EAbpD,QAAA,EAAA,GAakD,EAAe,EAAA,MAAA,GAAA,SAAA,CAAf,IAAe,CAAb,UAAA,CAAA,CAAA,CAAA;AAClD,EAAA,cAAA,CAAe,MAAO,CAAA,QAAA,CAAqC,EAAE,CAAC,CAAA,CAAA;AAC9D,EAAM,MAAA,OAAA,GAAU,eAAe,MAAO,EAAA,CAAA;AACtC,EAAM,MAAA,SAAA,GAAY,QAAQ,MAAS,GAAA,CAAA,CAAA;AAEnC,EACE,uBAAAA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA,EACG,0BACAA,cAAA,CAAA,aAAA,CAAAC,KAAA,EAAA,cAAA,CAAA;AAAA,IACC,WAAW,EAAA,IAAA;AAAA,IACX,oBAAoB,EAAA,IAAA;AAAA,IACpB,aAAc,EAAA,MAAA;AAAA,IACd,OAAS,EAAA,SAAA;AAAA,GACL,EAAA,MAAA,CAAA,EAEH,OACH,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Dispatch, ReactElement } from 'react';
|
|
2
|
+
import { IBaseModal } from './ui/types';
|
|
3
|
+
interface ModalNode {
|
|
4
|
+
id: string;
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
lastVisualization?: Date;
|
|
7
|
+
modal: () => ReactElement<IBaseModal>;
|
|
8
|
+
}
|
|
9
|
+
export declare class ModalLifecycleHandler {
|
|
10
|
+
nodeGroup: Map<string, ModalNode>;
|
|
11
|
+
state: [ReactElement<IBaseModal>[], Dispatch<ReactElement<IBaseModal>[]>] | undefined;
|
|
12
|
+
constructor();
|
|
13
|
+
attach: (state: [ReactElement<IBaseModal>[], Dispatch<ReactElement<IBaseModal>[]>]) => void;
|
|
14
|
+
update: () => void;
|
|
15
|
+
render: () => ReactElement<IBaseModal>[];
|
|
16
|
+
sync: (id: string, modal: () => ReactElement<IBaseModal>) => void;
|
|
17
|
+
destroy: (id: string) => void;
|
|
18
|
+
private remove;
|
|
19
|
+
private findNode;
|
|
20
|
+
show: (id: string) => void;
|
|
21
|
+
close: (id: string) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const createModalLifecycleHandler: () => ModalLifecycleHandler;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
10
|
+
var __spreadValues = (a, b) => {
|
|
11
|
+
for (var prop in b || (b = {}))
|
|
12
|
+
if (__hasOwnProp.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
if (__getOwnPropSymbols)
|
|
15
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
16
|
+
if (__propIsEnum.call(b, prop))
|
|
17
|
+
__defNormalProp(a, prop, b[prop]);
|
|
18
|
+
}
|
|
19
|
+
return a;
|
|
20
|
+
};
|
|
21
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
22
|
+
class ModalLifecycleHandler {
|
|
23
|
+
constructor() {
|
|
24
|
+
this.attach = (state) => {
|
|
25
|
+
this.state = state;
|
|
26
|
+
};
|
|
27
|
+
this.update = () => {
|
|
28
|
+
requestAnimationFrame(() => {
|
|
29
|
+
const nodes = Array.from(this.nodeGroup.values()).filter((node) => node.visible || !!node.lastVisualization).sort(
|
|
30
|
+
(nodeA, nodeB) => {
|
|
31
|
+
var _a, _b;
|
|
32
|
+
return (((_a = nodeA.lastVisualization) == null ? void 0 : _a.getTime()) || 0) - (((_b = nodeB.lastVisualization) == null ? void 0 : _b.getTime()) || 0);
|
|
33
|
+
}
|
|
34
|
+
).map((node, index, filteredNodes) => {
|
|
35
|
+
const modalElement = node.modal();
|
|
36
|
+
const { props } = modalElement;
|
|
37
|
+
return React__default.cloneElement(modalElement, __spreadProps(__spreadValues({}, props), {
|
|
38
|
+
key: node.id,
|
|
39
|
+
visible: node.visible,
|
|
40
|
+
isLastShown: filteredNodes.length - 1 === index,
|
|
41
|
+
close: () => this.close(node.id),
|
|
42
|
+
onClose: () => {
|
|
43
|
+
var _a;
|
|
44
|
+
this.remove(node.id);
|
|
45
|
+
(_a = props.onClose) == null ? void 0 : _a.call(props);
|
|
46
|
+
}
|
|
47
|
+
}));
|
|
48
|
+
});
|
|
49
|
+
const [, updateState] = this.state || [];
|
|
50
|
+
updateState == null ? void 0 : updateState(nodes);
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
this.render = () => {
|
|
54
|
+
const [modals] = this.state || [];
|
|
55
|
+
return modals || [];
|
|
56
|
+
};
|
|
57
|
+
this.sync = (id, modal) => {
|
|
58
|
+
if (this.nodeGroup.has(id)) {
|
|
59
|
+
const savedNode = this.findNode(id);
|
|
60
|
+
savedNode && this.nodeGroup.set(id, __spreadProps(__spreadValues({}, savedNode), { modal }));
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
this.nodeGroup.set(id, { id, modal });
|
|
64
|
+
};
|
|
65
|
+
this.destroy = (id) => {
|
|
66
|
+
this.nodeGroup.delete(id);
|
|
67
|
+
this.update();
|
|
68
|
+
};
|
|
69
|
+
this.remove = (id) => {
|
|
70
|
+
const savedNode = this.findNode(id);
|
|
71
|
+
savedNode && this.nodeGroup.set(id, __spreadProps(__spreadValues({}, savedNode), { lastVisualization: void 0 }));
|
|
72
|
+
this.update();
|
|
73
|
+
};
|
|
74
|
+
this.findNode = (id) => {
|
|
75
|
+
const node = this.nodeGroup.get(id);
|
|
76
|
+
!node && console.warn(`No modal was found with the id "${id}"`);
|
|
77
|
+
return node;
|
|
78
|
+
};
|
|
79
|
+
this.show = (id) => {
|
|
80
|
+
const savedNode = this.findNode(id);
|
|
81
|
+
savedNode && this.nodeGroup.set(id, __spreadProps(__spreadValues({}, savedNode), {
|
|
82
|
+
visible: true,
|
|
83
|
+
lastVisualization: new Date()
|
|
84
|
+
}));
|
|
85
|
+
this.update();
|
|
86
|
+
};
|
|
87
|
+
this.close = (id) => {
|
|
88
|
+
const savedNode = this.findNode(id);
|
|
89
|
+
savedNode && this.nodeGroup.set(id, __spreadProps(__spreadValues({}, savedNode), { visible: false }));
|
|
90
|
+
this.update();
|
|
91
|
+
};
|
|
92
|
+
this.nodeGroup = /* @__PURE__ */ new Map();
|
|
93
|
+
this.state = void 0;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
const createModalLifecycleHandler = () => {
|
|
97
|
+
return new ModalLifecycleHandler();
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export { ModalLifecycleHandler, createModalLifecycleHandler };
|
|
101
|
+
//# sourceMappingURL=ModalLifecycleHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModalLifecycleHandler.js","sources":["../../../../src/components/atoms/Modal/ModalLifecycleHandler.ts"],"sourcesContent":["import React, { Dispatch, ReactElement } from 'react';\nimport { IBaseModal } from './ui/types';\n\n/**\n * It Represents a node (usually a modal component) in the modal's lifecycle handler.\n */\ninterface ModalNode {\n id: string;\n visible?: boolean;\n lastVisualization?: Date;\n modal: () => ReactElement<IBaseModal>;\n}\n\n/**\n * Manage all modal's lifecycle.\n */\nexport class ModalLifecycleHandler {\n nodeGroup: Map<string, ModalNode>;\n state:\n | [ReactElement<IBaseModal>[], Dispatch<ReactElement<IBaseModal>[]>]\n | undefined;\n\n constructor() {\n this.nodeGroup = new Map();\n this.state = undefined;\n }\n\n /**\n * Holds the ModalGroupManager state.\n *\n * @param state\n */\n public attach = (\n state: [ReactElement<IBaseModal>[], Dispatch<ReactElement<IBaseModal>[]>]\n ) => {\n this.state = state;\n };\n\n /**\n * Updates all the modal components.\n */\n public update = () => {\n requestAnimationFrame(() => {\n const nodes = Array.from(this.nodeGroup.values())\n .filter(node => node.visible || !!node.lastVisualization)\n .sort(\n (nodeA, nodeB) =>\n (nodeA.lastVisualization?.getTime() || 0) -\n (nodeB.lastVisualization?.getTime() || 0)\n )\n .map((node, index, filteredNodes) => {\n const modalElement = node.modal();\n const { props } = modalElement;\n return React.cloneElement(modalElement, {\n ...props,\n key: node.id,\n visible: node.visible,\n isLastShown: filteredNodes.length - 1 === index,\n close: () => this.close(node.id),\n onClose: () => {\n this.remove(node.id);\n props.onClose?.();\n },\n });\n });\n\n const [, updateState] = this.state || [];\n updateState?.(nodes);\n });\n };\n\n /**\n * Renders all selected modals.\n *\n * @returns\n */\n public render = (): ReactElement<IBaseModal>[] => {\n const [modals] = this.state || [];\n return modals || [];\n };\n\n /**\n * Tells to the lifecycle handler that a modal component needs to be handled.\n *\n * @param id\n * @param modal\n * @returns\n */\n public sync = (id: string, modal: () => ReactElement<IBaseModal>) => {\n if (this.nodeGroup.has(id)) {\n const savedNode = this.findNode(id);\n savedNode && this.nodeGroup.set(id, { ...savedNode, modal });\n return;\n }\n this.nodeGroup.set(id, { id, modal });\n };\n\n /**\n * Destroy a modal from the lifecycle handler.\n *\n * @param id\n */\n public destroy = (id: string) => {\n this.nodeGroup.delete(id);\n this.update();\n };\n\n /**\n * Removes a modal from the rendering stack. It tells to the lifecycle handler that a modal\n * component is no longer used by the application.\n *\n * @param id\n */\n private remove = (id: string) => {\n const savedNode = this.findNode(id);\n savedNode &&\n this.nodeGroup.set(id, { ...savedNode, lastVisualization: undefined });\n this.update();\n };\n\n /**\n * Find a modal node by id.\n *\n * @param id\n */\n private findNode = (id: string) => {\n const node = this.nodeGroup.get(id);\n !node && console.warn(`No modal was found with the id \"${id}\"`);\n return node;\n };\n\n /**\n * Makes a modal appears.\n *\n * @param id\n */\n public show = (id: string) => {\n const savedNode = this.findNode(id);\n savedNode &&\n this.nodeGroup.set(id, {\n ...savedNode,\n visible: true,\n lastVisualization: new Date(),\n });\n this.update();\n };\n\n /**\n * Makes a modal disappears.\n *\n * @param id\n */\n public close = (id: string) => {\n const savedNode = this.findNode(id);\n savedNode && this.nodeGroup.set(id, { ...savedNode, visible: false });\n this.update();\n };\n}\n\n/**\n * Creates a new ModalLifecycleHandlere instance.\n *\n * @returns\n */\nexport const createModalLifecycleHandler = () => {\n return new ModalLifecycleHandler();\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAgBO,MAAM,qBAAsB,CAAA;AAAA,EAMjC,WAAc,GAAA;AAUd,IAAO,IAAA,CAAA,MAAA,GAAS,CACd,KACG,KAAA;AACH,MAAA,IAAA,CAAK,KAAQ,GAAA,KAAA,CAAA;AAAA,KACf,CAAA;AAKA,IAAA,IAAA,CAAO,SAAS,MAAM;AACpB,MAAA,qBAAA,CAAsB,MAAM;AAC1B,QAAA,MAAM,QAAQ,KAAM,CAAA,IAAA,CAAK,IAAK,CAAA,SAAA,CAAU,QAAQ,CAAA,CAC7C,MAAO,CAAA,CAAA,IAAA,KAAQ,KAAK,OAAW,IAAA,CAAC,CAAC,IAAA,CAAK,iBAAiB,CACvD,CAAA,IAAA;AAAA,UACC,CAAC,OAAO,KAAO,KAAA;AA9CzB,YAAA,IAAA,EAAA,EAAA,EAAA,CAAA;AA+Ca,YAAA,OAAA,CAAA,CAAA,CAAA,EAAA,GAAA,KAAA,CAAM,sBAAN,IAAyB,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAA,EAAA,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EAAK,CAAA,CAAA,CAAA,CAAA,CAAA;AAC9D,MAAO,OAAA,IAAA,CAAA;AAAA,KACT,CAAA;AAOA,IAAO,IAAA,CAAA,IAAA,GAAO,CAAC,EAAe,KAAA;AAC5B,MAAM,MAAA,SAAA,GAAY,IAAK,CAAA,QAAA,CAAS,EAAE,CAAA,CAAA;AAClC,MAAA,SAAA,IACE,IAAK,CAAA,SAAA,CAAU,GAAI,CAAA,EAAA,EAAI,iCAClB,SADkB,CAAA,EAAA;AAAA,QAErB,OAAS,EAAA,IAAA;AAAA,QACT,iBAAA,EAAmB,IAAI,IAAK,EAAA;AAAA,OAC7B,CAAA,CAAA,CAAA;AACH,MAAA,IAAA,CAAK,MAAO,EAAA,CAAA;AAAA,KACd,CAAA;AAOA,IAAO,IAAA,CAAA,KAAA,GAAQ,CAAC,EAAe,KAAA;AAC7B,MAAM,MAAA,SAAA,GAAY,IAAK,CAAA,QAAA,CAAS,EAAE,CAAA,CAAA;AAClC,MAAa,SAAA,IAAA,IAAA,CAAK,UAAU,GAAI,CAAA,EAAA,EAAI,iCAAK,SAAL,CAAA,EAAA,EAAgB,OAAS,EAAA,KAAA,EAAO,CAAA,CAAA,CAAA;AACpE,MAAA,IAAA,CAAK,MAAO,EAAA,CAAA;AAAA,KACd,CAAA;AArIE,IAAK,IAAA,CAAA,SAAA,uBAAgB,GAAI,EAAA,CAAA;AACzB,IAAA,IAAA,CAAK,KAAQ,GAAA,KAAA,CAAA,CAAA;AAAA,GACf;AAoIF,CAAA;AAOO,MAAM,8BAA8B,MAAM;AAC/C,EAAA,OAAO,IAAI,qBAAsB,EAAA,CAAA;AACnC;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './ModalGroupManager';
|
|
2
|
+
export * from './ModalLifecycleHandler';
|
|
3
|
+
export * from './ui/BaseModalView';
|
|
4
|
+
export * from './ui/types';
|
|
5
|
+
export * from './useModalManager';
|
|
6
|
+
export * from './useLazyModalManager';
|
|
7
|
+
export * from './useModalRemoteControl';
|