@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,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ScrollViewProps } from 'react-native';
|
|
3
|
+
import { SpacingType } from '@tecsinapse/react-core';
|
|
4
|
+
export interface SnappingSliderProps extends Omit<ScrollViewProps, 'horizontal' | 'snapToOffsets'> {
|
|
5
|
+
showAmount: number;
|
|
6
|
+
scrollAmount: number;
|
|
7
|
+
spacing?: SpacingType;
|
|
8
|
+
}
|
|
9
|
+
declare const SnappingSlider: React.FC<SnappingSliderProps>;
|
|
10
|
+
export default SnappingSlider;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Dimensions, ScrollView, View } from 'react-native';
|
|
3
|
+
import { extractNumbersFromString } from '@tecsinapse/react-core';
|
|
4
|
+
import { useTheme } from '@emotion/react';
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
11
|
+
var __spreadValues = (a, b) => {
|
|
12
|
+
for (var prop in b || (b = {}))
|
|
13
|
+
if (__hasOwnProp.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
if (__getOwnPropSymbols)
|
|
16
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
17
|
+
if (__propIsEnum.call(b, prop))
|
|
18
|
+
__defNormalProp(a, prop, b[prop]);
|
|
19
|
+
}
|
|
20
|
+
return a;
|
|
21
|
+
};
|
|
22
|
+
var __objRest = (source, exclude) => {
|
|
23
|
+
var target = {};
|
|
24
|
+
for (var prop in source)
|
|
25
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
26
|
+
target[prop] = source[prop];
|
|
27
|
+
if (source != null && __getOwnPropSymbols)
|
|
28
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
29
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
30
|
+
target[prop] = source[prop];
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
};
|
|
34
|
+
const SnappingSlider = (_a) => {
|
|
35
|
+
var _b = _a, {
|
|
36
|
+
children,
|
|
37
|
+
showAmount,
|
|
38
|
+
scrollAmount,
|
|
39
|
+
spacing
|
|
40
|
+
} = _b, rest = __objRest(_b, [
|
|
41
|
+
"children",
|
|
42
|
+
"showAmount",
|
|
43
|
+
"scrollAmount",
|
|
44
|
+
"spacing"
|
|
45
|
+
]);
|
|
46
|
+
const theme = useTheme();
|
|
47
|
+
const childCount = React.Children.count(children);
|
|
48
|
+
const screenWidth = Dimensions.get("window").width;
|
|
49
|
+
const totalSlideWidth = Math.round(screenWidth / showAmount);
|
|
50
|
+
const horizontalPadding = spacing ? extractNumbersFromString(theme.spacing[spacing]) / 2 : 0;
|
|
51
|
+
const snapToOffsets = [
|
|
52
|
+
...Array(Math.ceil(childCount / scrollAmount)).keys()
|
|
53
|
+
].map((index) => {
|
|
54
|
+
const offset = totalSlideWidth * scrollAmount * index;
|
|
55
|
+
const padCompensation = horizontalPadding * Math.sign(index);
|
|
56
|
+
return offset + padCompensation;
|
|
57
|
+
});
|
|
58
|
+
return /* @__PURE__ */ React.createElement(ScrollView, __spreadValues({
|
|
59
|
+
horizontal: true,
|
|
60
|
+
snapToOffsets,
|
|
61
|
+
snapToStart: true,
|
|
62
|
+
snapToEnd: true,
|
|
63
|
+
showsHorizontalScrollIndicator: false
|
|
64
|
+
}, rest), React.Children.map(children, (child, index) => {
|
|
65
|
+
const isFirst = index === 0;
|
|
66
|
+
const isLast = index === childCount - 1;
|
|
67
|
+
return /* @__PURE__ */ React.createElement(View, {
|
|
68
|
+
style: {
|
|
69
|
+
width: totalSlideWidth,
|
|
70
|
+
paddingHorizontal: horizontalPadding,
|
|
71
|
+
paddingLeft: isFirst ? 0 : horizontalPadding,
|
|
72
|
+
paddingRight: isLast ? 0 : horizontalPadding
|
|
73
|
+
}
|
|
74
|
+
}, child);
|
|
75
|
+
}));
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
export { SnappingSlider as default };
|
|
79
|
+
//# sourceMappingURL=SnappingSlider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SnappingSlider.js","sources":["../../../../src/components/atoms/SnappingSlider/SnappingSlider.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Dimensions, ScrollView, ScrollViewProps, View } from 'react-native';\nimport {\n extractNumbersFromString,\n SpacingType,\n ThemeProp,\n} from '@tecsinapse/react-core';\nimport { useTheme } from '@emotion/react';\n\nexport interface SnappingSliderProps\n extends Omit<ScrollViewProps, 'horizontal' | 'snapToOffsets'> {\n /**\n * Amount in screen elements.\n * Should never be lower than scrollAmount, otherwise some elements will be skipped.\n */\n showAmount: number;\n\n /**\n * Amount of items to scroll within a single swipe.\n * Should never be greater than showAmount, otherwise some elements will be skipped.\n */\n scrollAmount: number;\n\n /**\n * Spacing between elements.\n * Must be one of [nano, micro, mili, centi, deca, kilo, mega, giga, tera, peta, hexa]\n */\n spacing?: SpacingType;\n}\n\nconst SnappingSlider: React.FC<SnappingSliderProps> = ({\n children,\n showAmount,\n scrollAmount,\n spacing,\n ...rest\n}) => {\n const theme = useTheme() as ThemeProp;\n\n const childCount = React.Children.count(children);\n const screenWidth = Dimensions.get('window').width;\n const totalSlideWidth = Math.round(screenWidth / showAmount);\n const horizontalPadding = spacing\n ? extractNumbersFromString(theme.spacing[spacing]) / 2\n : 0;\n\n const snapToOffsets = [\n ...Array(Math.ceil(childCount / scrollAmount)).keys(),\n ].map(index => {\n const offset = totalSlideWidth * scrollAmount * index;\n const padCompensation = horizontalPadding * Math.sign(index);\n return offset + padCompensation;\n });\n\n return (\n <ScrollView\n horizontal\n snapToOffsets={snapToOffsets}\n snapToStart\n snapToEnd\n showsHorizontalScrollIndicator={false}\n {...rest}\n >\n {React.Children.map(children, (child, index) => {\n const isFirst = index === 0;\n const isLast = index === childCount - 1;\n\n return (\n <View\n style={{\n width: totalSlideWidth,\n paddingHorizontal: horizontalPadding,\n paddingLeft: isFirst ? 0 : horizontalPadding,\n paddingRight: isLast ? 0 : horizontalPadding,\n }}\n >\n {child}\n </View>\n );\n })}\n </ScrollView>\n );\n};\n\nexport default SnappingSlider;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BM,MAAA,cAAA,GAAgD,CAAC,EAMjD,KAAA;AANiD,EACrD,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,OAAA;AAAA,GAlCF,GA8BuD,EAKlD,EAAA,IAAA,GAAA,SAAA,CALkD,EAKlD,EAAA;AAAA,IAJH,UAAA;AAAA,IACA,YAAA;AAAA,IACA,cAAA;AAAA,IACA,SAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,QAAQ,QAAS,EAAA,CAAA;AAEvB,EAAA,MAAM,UAAa,GAAA,KAAA,CAAM,QAAS,CAAA,KAAA,CAAM,QAAQ,CAAA,CAAA;AAChD,EAAA,MAAM,WAAc,GAAA,UAAA,CAAW,GAAI,CAAA,QAAQ,CAAE,CAAA,KAAA,CAAA;AAC7C,EAAA,MAAM,eAAkB,GAAA,IAAA,CAAK,KAAM,CAAA,WAAA,GAAc,UAAU,CAAA,CAAA;AAC3D,EAAA,MAAM,oBAAoB,OACtB,GAAA,wBAAA,CAAyB,MAAM,OAAQ,CAAA,OAAA,CAAQ,IAAI,CACnD,GAAA,CAAA,CAAA;AAEJ,EAAA,MAAM,aAAgB,GAAA;AAAA,IACpB,GAAG,MAAM,IAAK,CAAA,IAAA,CAAK,aAAa,YAAY,CAAC,EAAE,IAAK,EAAA;AAAA,GACtD,CAAE,IAAI,CAAS,KAAA,KAAA;AACb,IAAM,MAAA,MAAA,GAAS,kBAAkB,YAAe,GAAA,KAAA,CAAA;AAChD,IAAA,MAAM,eAAkB,GAAA,iBAAA,GAAoB,IAAK,CAAA,IAAA,CAAK,KAAK,CAAA,CAAA;AAC3D,IAAA,OAAO,MAAS,GAAA,eAAA,CAAA;AAAA,GACjB,CAAA,CAAA;AAED,EAAA,uBACG,KAAA,CAAA,aAAA,CAAA,UAAA,EAAA,cAAA,CAAA;AAAA,IACC,UAAU,EAAA,IAAA;AAAA,IACV,aAAA;AAAA,IACA,WAAW,EAAA,IAAA;AAAA,IACX,SAAS,EAAA,IAAA;AAAA,IACT,8BAAgC,EAAA,KAAA;AAAA,GAAA,EAC5B,OAEH,KAAM,CAAA,QAAA,CAAS,IAAI,QAAU,EAAA,CAAC,OAAO,KAAU,KAAA;AAC9C,IAAA,MAAM,UAAU,KAAU,KAAA,CAAA,CAAA;AAC1B,IAAM,MAAA,MAAA,GAAS,UAAU,UAAa,GAAA,CAAA,CAAA;AAEtC,IAAA,uBACG,KAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,KAAO,EAAA,eAAA;AAAA,QACP,iBAAmB,EAAA,iBAAA;AAAA,QACnB,WAAA,EAAa,UAAU,CAAI,GAAA,iBAAA;AAAA,QAC3B,YAAA,EAAc,SAAS,CAAI,GAAA,iBAAA;AAAA,OAC7B;AAAA,KAAA,EAEC,KACH,CAAA,CAAA;AAAA,GAEH,CACH,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { Tag as Tag$1 } from '@tecsinapse/react-core';
|
|
3
|
+
import Text from '../Text/Text.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 Tag = (_a) => {
|
|
34
|
+
var _b = _a, { value } = _b, rest = __objRest(_b, ["value"]);
|
|
35
|
+
return /* @__PURE__ */ React__default.createElement(Tag$1, __spreadValues({
|
|
36
|
+
value: /* @__PURE__ */ React__default.createElement(Text, {
|
|
37
|
+
colorVariant: "secondary",
|
|
38
|
+
colorTone: "dark",
|
|
39
|
+
fontStack: "default",
|
|
40
|
+
fontWeight: "bold",
|
|
41
|
+
typography: rest.variant === "small" ? "sub" : "base"
|
|
42
|
+
}, value)
|
|
43
|
+
}, rest));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export { Tag as default };
|
|
47
|
+
//# sourceMappingURL=Tag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tag.js","sources":["../../../../src/components/atoms/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\nimport {\n Tag as TagCore,\n TagProps as TagCoreProps,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\n\nexport interface TagProps extends Omit<TagCoreProps, 'value'> {\n value: string;\n}\n\nconst Tag: React.FC<TagProps> = ({ value, ...rest }): JSX.Element => {\n return (\n <TagCore\n value={\n <Text\n colorVariant=\"secondary\"\n colorTone=\"dark\"\n fontStack=\"default\"\n fontWeight=\"bold\"\n typography={rest.variant === 'small' ? 'sub' : 'base'}\n >\n {value}\n </Text>\n }\n {...rest}\n />\n );\n};\n\nexport default Tag;\n"],"names":["React","TagCore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWM,MAAA,GAAA,GAA0B,CAAC,EAAoC,KAAA;AAApC,EAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EAXnC,KAAA,EAAA,GAWiC,EAAY,EAAA,IAAA,GAAA,SAAA,CAAZ,IAAY,CAAV,OAAA,CAAA,CAAA,CAAA;AACjC,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,KAAA,EAAA,cAAA,CAAA;AAAA,IACC,uBACGD,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA;AAAA,MACC,YAAa,EAAA,WAAA;AAAA,MACb,SAAU,EAAA,MAAA;AAAA,MACV,SAAU,EAAA,SAAA;AAAA,MACV,UAAW,EAAA,MAAA;AAAA,MACX,UAAY,EAAA,IAAA,CAAK,OAAY,KAAA,OAAA,GAAU,KAAQ,GAAA,MAAA;AAAA,KAAA,EAE9C,KACH,CAAA;AAAA,GAAA,EAEE,IACN,CAAA,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { StyledNativeText } from './styled.js';
|
|
3
|
+
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
|
+
if (__getOwnPropSymbols)
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
}
|
|
18
|
+
return a;
|
|
19
|
+
};
|
|
20
|
+
var __objRest = (source, exclude) => {
|
|
21
|
+
var target = {};
|
|
22
|
+
for (var prop in source)
|
|
23
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
24
|
+
target[prop] = source[prop];
|
|
25
|
+
if (source != null && __getOwnPropSymbols)
|
|
26
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
27
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
}
|
|
30
|
+
return target;
|
|
31
|
+
};
|
|
32
|
+
const Text = (_a) => {
|
|
33
|
+
var _b = _a, { children } = _b, rest = __objRest(_b, ["children"]);
|
|
34
|
+
return /* @__PURE__ */ React__default.createElement(StyledNativeText, __spreadValues({}, rest), children);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
export { Text as default };
|
|
38
|
+
//# sourceMappingURL=Text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.js","sources":["../../../../src/components/atoms/Text/Text.tsx"],"sourcesContent":["import { TextProps } from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { StyledNativeText } from './styled';\n\nexport type TextNativeProps = TextProps;\n\nconst Text: FC<TextNativeProps> = ({ children, ...rest }): JSX.Element => {\n return <StyledNativeText {...rest}>{children}</StyledNativeText>;\n};\n\nexport default Text;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMM,MAAA,IAAA,GAA4B,CAAC,EAAuC,KAAA;AAAvC,EAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EANrC,QAAA,EAAA,GAMmC,EAAe,EAAA,IAAA,GAAA,SAAA,CAAf,IAAe,CAAb,UAAA,CAAA,CAAA,CAAA;AACnC,EAAO,uBAAAA,cAAA,CAAA,aAAA,CAAC,gBAAqB,EAAA,cAAA,CAAA,EAAA,EAAA,IAAA,CAAA,EAAO,QAAS,CAAA,CAAA;AAC/C;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FontStackType, FontWeightType, StyleProps } from '@tecsinapse/react-core';
|
|
3
|
+
export interface Font {
|
|
4
|
+
fontStack?: FontStackType;
|
|
5
|
+
fontWeight?: FontWeightType;
|
|
6
|
+
}
|
|
7
|
+
export declare const fontStyles: ({ theme, fontStack, fontWeight, }: Partial<Font & Partial<StyleProps>>) => any;
|
|
8
|
+
export declare const StyledNativeText: import("@emotion/native").StyledComponent<any, {}, {
|
|
9
|
+
ref?: import("react").Ref<any> | undefined;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import styled, { css } from '@emotion/native';
|
|
2
|
+
import { Text } from '@tecsinapse/react-core';
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
|
|
5
|
+
const fontStyles = ({
|
|
6
|
+
theme,
|
|
7
|
+
fontStack = "default",
|
|
8
|
+
fontWeight = "regular"
|
|
9
|
+
}) => {
|
|
10
|
+
const fontFamily = (theme == null ? void 0 : theme.font.stack[fontStack]) || "";
|
|
11
|
+
const fontStyle = theme == null ? void 0 : theme.font.files[fontWeight];
|
|
12
|
+
return css`
|
|
13
|
+
${Platform.OS === "android" ? "font-weight: normal;" : void 0}
|
|
14
|
+
font-family: ${fontStyle == null ? void 0 : fontStyle.replace("{0}", fontFamily)};
|
|
15
|
+
`;
|
|
16
|
+
};
|
|
17
|
+
const StyledNativeText = styled(Text)(fontStyles);
|
|
18
|
+
|
|
19
|
+
export { StyledNativeText, fontStyles };
|
|
20
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/atoms/Text/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport {\n FontStackType,\n FontWeightType,\n StyleProps,\n Text,\n} from '@tecsinapse/react-core';\nimport { Platform } from 'react-native';\nimport { TextNativeProps } from './Text';\n\nexport interface Font {\n fontStack?: FontStackType;\n fontWeight?: FontWeightType;\n}\n\nexport const fontStyles = ({\n theme,\n fontStack = 'default',\n fontWeight = 'regular',\n}: Partial<Font & Partial<StyleProps>>) => {\n const fontFamily = theme?.font.stack[fontStack] || '';\n const fontStyle = theme?.font.files[fontWeight];\n return css`\n ${Platform.OS === 'android' ? 'font-weight: normal;' : undefined}\n font-family: ${fontStyle?.replace('{0}', fontFamily)};\n `;\n};\n\nexport const StyledNativeText = styled(Text)<\n Font & Partial<TextNativeProps> & Partial<StyleProps>\n>(fontStyles);\n"],"names":[],"mappings":";;;;AAeO,MAAM,aAAa,CAAC;AAAA,EACzB,KAAA;AAAA,EACA,SAAY,GAAA,SAAA;AAAA,EACZ,UAAa,GAAA,SAAA;AACf,CAA2C,KAAA;AACzC,EAAA,MAAM,UAAa,GAAA,CAAA,KAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAO,IAAK,CAAA,KAAA,CAAM,SAAc,CAAA,KAAA,EAAA,CAAA;AACnD,EAAM,MAAA,SAAA,GAAY,KAAO,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAA,IAAA,CAAK,KAAM,CAAA,UAAA,CAAA,CAAA;AACpC,EAAO,OAAA,GAAA,CAAA;AAAA,IACH,EAAA,QAAA,CAAS,EAAO,KAAA,SAAA,GAAY,sBAAyB,GAAA,KAAA,CAAA,CAAA;AAAA,iBACxC,EAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAW,QAAQ,KAAO,EAAA,UAAA,CAAA,CAAA;AAAA,EAAA,CAAA,CAAA;AAE7C,EAAA;AAEO,MAAM,gBAAmB,GAAA,MAAA,CAAO,IAAI,CAAA,CAEzC,UAAU;;;;"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { useInputFocus, TextArea as TextArea$1 } from '@tecsinapse/react-core';
|
|
3
|
+
import Text from '../Text/Text.js';
|
|
4
|
+
import { StyledNativeInput } from './styled.js';
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defProps = Object.defineProperties;
|
|
8
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
9
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
const TextArea = (_a) => {
|
|
38
|
+
var _b = _a, {
|
|
39
|
+
label,
|
|
40
|
+
labelColor,
|
|
41
|
+
labelColorVariant,
|
|
42
|
+
labelColorTone,
|
|
43
|
+
labelTypography,
|
|
44
|
+
labelStack,
|
|
45
|
+
labelWeight,
|
|
46
|
+
leftComponent,
|
|
47
|
+
rightComponent,
|
|
48
|
+
disabled,
|
|
49
|
+
style,
|
|
50
|
+
borderColor,
|
|
51
|
+
borderColorGradation,
|
|
52
|
+
inputFontStack = "default",
|
|
53
|
+
inputFontWeight = "bold",
|
|
54
|
+
inputContainerStyle,
|
|
55
|
+
variant = "default",
|
|
56
|
+
hintComponent,
|
|
57
|
+
hint,
|
|
58
|
+
onFocus,
|
|
59
|
+
onBlur,
|
|
60
|
+
value,
|
|
61
|
+
maxLength
|
|
62
|
+
} = _b, rest = __objRest(_b, [
|
|
63
|
+
"label",
|
|
64
|
+
"labelColor",
|
|
65
|
+
"labelColorVariant",
|
|
66
|
+
"labelColorTone",
|
|
67
|
+
"labelTypography",
|
|
68
|
+
"labelStack",
|
|
69
|
+
"labelWeight",
|
|
70
|
+
"leftComponent",
|
|
71
|
+
"rightComponent",
|
|
72
|
+
"disabled",
|
|
73
|
+
"style",
|
|
74
|
+
"borderColor",
|
|
75
|
+
"borderColorGradation",
|
|
76
|
+
"inputFontStack",
|
|
77
|
+
"inputFontWeight",
|
|
78
|
+
"inputContainerStyle",
|
|
79
|
+
"variant",
|
|
80
|
+
"hintComponent",
|
|
81
|
+
"hint",
|
|
82
|
+
"onFocus",
|
|
83
|
+
"onBlur",
|
|
84
|
+
"value",
|
|
85
|
+
"maxLength"
|
|
86
|
+
]);
|
|
87
|
+
const { focused, handleBlur, handleFocus } = useInputFocus(
|
|
88
|
+
onFocus,
|
|
89
|
+
onBlur,
|
|
90
|
+
!disabled
|
|
91
|
+
);
|
|
92
|
+
return /* @__PURE__ */ React__default.createElement(TextArea$1, {
|
|
93
|
+
label,
|
|
94
|
+
labelColor,
|
|
95
|
+
labelColorVariant,
|
|
96
|
+
labelColorTone,
|
|
97
|
+
labelTypography,
|
|
98
|
+
labelStack,
|
|
99
|
+
labelWeight,
|
|
100
|
+
LabelComponent: Text,
|
|
101
|
+
leftComponent,
|
|
102
|
+
rightComponent,
|
|
103
|
+
borderColor,
|
|
104
|
+
borderColorGradation,
|
|
105
|
+
inputContainerStyle,
|
|
106
|
+
focused,
|
|
107
|
+
disabled,
|
|
108
|
+
variant,
|
|
109
|
+
value,
|
|
110
|
+
hintComponent,
|
|
111
|
+
hint,
|
|
112
|
+
style,
|
|
113
|
+
TextComponent: Text,
|
|
114
|
+
maxLength
|
|
115
|
+
}, /* @__PURE__ */ React__default.createElement(StyledNativeInput, __spreadProps(__spreadValues({}, rest), {
|
|
116
|
+
fontStack: inputFontStack,
|
|
117
|
+
fontWeight: inputFontWeight,
|
|
118
|
+
disabled,
|
|
119
|
+
onFocus: handleFocus,
|
|
120
|
+
onBlur: handleBlur,
|
|
121
|
+
textAlignVertical: "top",
|
|
122
|
+
multiline: true,
|
|
123
|
+
value,
|
|
124
|
+
maxLength
|
|
125
|
+
})));
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export { TextArea as default };
|
|
129
|
+
//# sourceMappingURL=TextArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.js","sources":["../../../../src/components/atoms/TextArea/TextArea.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport {\n useInputFocus,\n TextAreaProps as ITACore,\n TextArea as TACore,\n} from '@tecsinapse/react-core';\nimport { Text } from '../Text';\nimport { StyledNativeInput } from './styled';\n\nexport type TextAreaProps = Omit<ITACore, 'TextComponent' | 'focused'>;\n\nconst TextArea: FC<TextAreaProps> = ({\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 maxLength,\n ...rest\n}) => {\n const { focused, handleBlur, handleFocus } = useInputFocus(\n onFocus,\n onBlur,\n !disabled\n );\n\n return (\n <TACore\n label={label}\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 value={value}\n hintComponent={hintComponent}\n hint={hint}\n style={style}\n TextComponent={Text}\n maxLength={maxLength}\n >\n <StyledNativeInput\n {...rest}\n fontStack={inputFontStack}\n fontWeight={inputFontWeight}\n disabled={disabled}\n onFocus={handleFocus}\n onBlur={handleBlur}\n textAlignVertical={'top'}\n multiline\n value={value}\n maxLength={maxLength}\n />\n </TACore>\n );\n};\n\nexport default TextArea;\n"],"names":["React","TACore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWM,MAAA,QAAA,GAA8B,CAAC,EAyB/B,KAAA;AAzB+B,EACnC,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,KAAA;AAAA,IACA,UAAA;AAAA,IACA,iBAAA;AAAA,IACA,cAAA;AAAA,IACA,eAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA,aAAA;AAAA,IACA,cAAA;AAAA,IACA,QAAA;AAAA,IACA,KAAA;AAAA,IACA,WAAA;AAAA,IACA,oBAAA;AAAA,IACA,cAAiB,GAAA,SAAA;AAAA,IACjB,eAAkB,GAAA,MAAA;AAAA,IAClB,mBAAA;AAAA,IACA,OAAU,GAAA,SAAA;AAAA,IACV,aAAA;AAAA,IACA,IAAA;AAAA,IACA,OAAA;AAAA,IACA,MAAA;AAAA,IACA,KAAA;AAAA,IACA,SAAA;AAAA,GAlCF,GAWqC,EAwBhC,EAAA,IAAA,GAAA,SAAA,CAxBgC,EAwBhC,EAAA;AAAA,IAvBH,OAAA;AAAA,IACA,YAAA;AAAA,IACA,mBAAA;AAAA,IACA,gBAAA;AAAA,IACA,iBAAA;AAAA,IACA,YAAA;AAAA,IACA,aAAA;AAAA,IACA,eAAA;AAAA,IACA,gBAAA;AAAA,IACA,UAAA;AAAA,IACA,OAAA;AAAA,IACA,aAAA;AAAA,IACA,sBAAA;AAAA,IACA,gBAAA;AAAA,IACA,iBAAA;AAAA,IACA,qBAAA;AAAA,IACA,SAAA;AAAA,IACA,eAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,WAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,EAAE,OAAA,EAAS,UAAY,EAAA,WAAA,EAAgB,GAAA,aAAA;AAAA,IAC3C,OAAA;AAAA,IACA,MAAA;AAAA,IACA,CAAC,QAAA;AAAA,GACH,CAAA;AAEA,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAAC,UAAA,EAAA;AAAA,IACC,KAAA;AAAA,IACA,UAAA;AAAA,IACA,iBAAA;AAAA,IACA,cAAA;AAAA,IACA,eAAA;AAAA,IACA,UAAA;AAAA,IACA,WAAA;AAAA,IACA,cAAgB,EAAA,IAAA;AAAA,IAChB,aAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,oBAAA;AAAA,IACA,mBAAA;AAAA,IACA,OAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,KAAA;AAAA,IACA,aAAA;AAAA,IACA,IAAA;AAAA,IACA,KAAA;AAAA,IACA,aAAe,EAAA,IAAA;AAAA,IACf,SAAA;AAAA,GAEA,kBAAAD,cAAA,CAAA,aAAA,CAAC,oDACK,IADL,CAAA,EAAA;AAAA,IAEC,SAAW,EAAA,cAAA;AAAA,IACX,UAAY,EAAA,eAAA;AAAA,IACZ,QAAA;AAAA,IACA,OAAS,EAAA,WAAA;AAAA,IACT,MAAQ,EAAA,UAAA;AAAA,IACR,iBAAmB,EAAA,KAAA;AAAA,IACnB,SAAS,EAAA,IAAA;AAAA,IACT,KAAA;AAAA,IACA,SAAA;AAAA,GAAA,CACF,CACF,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import styled from '@emotion/native';
|
|
2
|
+
import { TextAreaInputBase } from '@tecsinapse/react-core';
|
|
3
|
+
import { fontStyles } from '../Text/styled.js';
|
|
4
|
+
|
|
5
|
+
const StyledNativeInput = styled(TextAreaInputBase)(fontStyles);
|
|
6
|
+
|
|
7
|
+
export { StyledNativeInput };
|
|
8
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/atoms/TextArea/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { StyleProps, TextAreaInputBase } from '@tecsinapse/react-core';\nimport { Font, fontStyles } from '../Text/styled';\nimport { TextAreaProps } from './TextArea';\n\nexport const StyledNativeInput = styled(TextAreaInputBase)<\n Font & Partial<TextAreaProps> & Partial<StyleProps>\n>(fontStyles);\n"],"names":[],"mappings":";;;;AAKO,MAAM,iBAAoB,GAAA,MAAA,CAAO,iBAAiB,CAAA,CAEvD,UAAU;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Calendar: <T extends SelectionType>({ locale, ...rest }: CalendarProps<T>) => JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Calendar as Calendar$1 } from '@tecsinapse/react-core';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { getLocale } from '../../../utils/date.js';
|
|
4
|
+
import Text from '../../atoms/Text/Text.js';
|
|
5
|
+
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __defProps = Object.defineProperties;
|
|
8
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
9
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
const Calendar = (_a) => {
|
|
38
|
+
var _b = _a, {
|
|
39
|
+
locale
|
|
40
|
+
} = _b, rest = __objRest(_b, [
|
|
41
|
+
"locale"
|
|
42
|
+
]);
|
|
43
|
+
return /* @__PURE__ */ React__default.createElement(Calendar$1, __spreadProps(__spreadValues({}, rest), {
|
|
44
|
+
TextComponent: Text,
|
|
45
|
+
locale: locale != null ? locale : getLocale()
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export { Calendar };
|
|
50
|
+
//# sourceMappingURL=Calendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Calendar.js","sources":["../../../../src/components/molecules/Calendar/Calendar.tsx"],"sourcesContent":["import {\n Calendar as CalendarCore,\n CalendarProps,\n SelectionType,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { getLocale } from '../../../utils/date';\nimport { Text } from '../../atoms/Text';\n\nexport const Calendar = <T extends SelectionType>({\n locale,\n ...rest\n}: CalendarProps<T>): JSX.Element => {\n return (\n <CalendarCore\n {...rest}\n TextComponent={Text}\n locale={locale ?? getLocale()}\n />\n );\n};\n"],"names":["React","CalendarCore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASa,MAAA,QAAA,GAAW,CAA0B,EAGb,KAAA;AAHa,EAChD,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,MAAA;AAAA,GAVF,GASkD,EAE7C,EAAA,IAAA,GAAA,SAAA,CAF6C,EAE7C,EAAA;AAAA,IADH,QAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EACE,uBAAAA,cAAA,CAAA,aAAA,CAACC,6CACK,IADL,CAAA,EAAA;AAAA,IAEC,aAAe,EAAA,IAAA;AAAA,IACf,MAAA,EAAQ,0BAAU,SAAU,EAAA;AAAA,GAC9B,CAAA,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Calendar } from './Calendar';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DatePickerProps, SelectionType } from '@tecsinapse/react-core';
|
|
2
|
+
export declare type NativeDatePickerProps<T extends SelectionType> = Omit<DatePickerProps<T>, 'CalendarComponent' | 'renderCalendar' | 'requestCloseCalendar' | 'requestShowCalendar'>;
|
|
3
|
+
export declare const DatePicker: <T extends SelectionType>({ locale, onChange, ...rest }: NativeDatePickerProps<T>) => JSX.Element;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { DatePicker as DatePicker$1 } from '@tecsinapse/react-core';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { getLocale } from '../../../utils/date.js';
|
|
4
|
+
import '../../atoms/Modal/ModalGroupManager.js';
|
|
5
|
+
import { ModalView } from '../../atoms/Modal/ui/BaseModalView.js';
|
|
6
|
+
import 'uuid';
|
|
7
|
+
import { useLazyModalManager } from '../../atoms/Modal/useLazyModalManager.js';
|
|
8
|
+
import Text from '../../atoms/Text/Text.js';
|
|
9
|
+
import { Calendar } from '../Calendar/Calendar.js';
|
|
10
|
+
import { CalendarBoxContent } from './styled.js';
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __defProps = Object.defineProperties;
|
|
14
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
15
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
16
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
17
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
18
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
19
|
+
var __spreadValues = (a, b) => {
|
|
20
|
+
for (var prop in b || (b = {}))
|
|
21
|
+
if (__hasOwnProp.call(b, prop))
|
|
22
|
+
__defNormalProp(a, prop, b[prop]);
|
|
23
|
+
if (__getOwnPropSymbols)
|
|
24
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
25
|
+
if (__propIsEnum.call(b, prop))
|
|
26
|
+
__defNormalProp(a, prop, b[prop]);
|
|
27
|
+
}
|
|
28
|
+
return a;
|
|
29
|
+
};
|
|
30
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
31
|
+
var __objRest = (source, exclude) => {
|
|
32
|
+
var target = {};
|
|
33
|
+
for (var prop in source)
|
|
34
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
35
|
+
target[prop] = source[prop];
|
|
36
|
+
if (source != null && __getOwnPropSymbols)
|
|
37
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
38
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
39
|
+
target[prop] = source[prop];
|
|
40
|
+
}
|
|
41
|
+
return target;
|
|
42
|
+
};
|
|
43
|
+
const DatePicker = (_a) => {
|
|
44
|
+
var _b = _a, {
|
|
45
|
+
locale,
|
|
46
|
+
onChange
|
|
47
|
+
} = _b, rest = __objRest(_b, [
|
|
48
|
+
"locale",
|
|
49
|
+
"onChange"
|
|
50
|
+
]);
|
|
51
|
+
const modal = useLazyModalManager();
|
|
52
|
+
const handleChange = (value) => {
|
|
53
|
+
onChange == null ? void 0 : onChange(value);
|
|
54
|
+
modal.requestUpdate();
|
|
55
|
+
};
|
|
56
|
+
return /* @__PURE__ */ React__default.createElement(DatePicker$1, __spreadProps(__spreadValues({}, rest), {
|
|
57
|
+
TextComponent: Text,
|
|
58
|
+
CalendarComponent: Calendar,
|
|
59
|
+
locale: locale != null ? locale : getLocale(),
|
|
60
|
+
onChange: handleChange,
|
|
61
|
+
requestShowCalendar: () => modal.show(),
|
|
62
|
+
requestCloseCalendar: () => modal.close(),
|
|
63
|
+
renderCalendar: (calendar, blur) => modal.sync(/* @__PURE__ */ React__default.createElement(NativeModal, {
|
|
64
|
+
onClose: blur
|
|
65
|
+
}, calendar))
|
|
66
|
+
}));
|
|
67
|
+
};
|
|
68
|
+
const NativeModal = (_c) => {
|
|
69
|
+
var _d = _c, { children } = _d, others = __objRest(_d, ["children"]);
|
|
70
|
+
return /* @__PURE__ */ React__default.createElement(ModalView, __spreadValues({
|
|
71
|
+
BoxComponent: CalendarBoxContent
|
|
72
|
+
}, others), children);
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export { DatePicker };
|
|
76
|
+
//# sourceMappingURL=DatePicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sources":["../../../../src/components/molecules/DatePicker/DatePicker.tsx"],"sourcesContent":["import {\n DatePicker as DatePickerCore,\n DatePickerProps,\n SelectionType,\n Value,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { getLocale } from '../../../utils/date';\nimport { IBaseModal, ModalView, useLazyModalManager } from '../../atoms/Modal';\nimport { Text } from '../../atoms/Text';\nimport { Calendar } from '../Calendar';\nimport { CalendarBoxContent } from './styled';\n\nexport type NativeDatePickerProps<T extends SelectionType> = Omit<\n DatePickerProps<T>,\n | 'CalendarComponent'\n | 'renderCalendar'\n | 'requestCloseCalendar'\n | 'requestShowCalendar'\n>;\n\nexport const DatePicker = <T extends SelectionType>({\n locale,\n onChange,\n ...rest\n}: NativeDatePickerProps<T>): JSX.Element => {\n const modal = useLazyModalManager();\n\n const handleChange = (value?: Value<T>) => {\n onChange?.(value);\n modal.requestUpdate();\n };\n\n return (\n <DatePickerCore\n {...rest}\n TextComponent={Text}\n CalendarComponent={Calendar}\n locale={locale ?? getLocale()}\n onChange={handleChange}\n requestShowCalendar={() => modal.show()}\n requestCloseCalendar={() => modal.close()}\n renderCalendar={(calendar, blur) =>\n modal.sync(<NativeModal onClose={blur}>{calendar}</NativeModal>)\n }\n />\n );\n};\n\nconst NativeModal: FC<IBaseModal> = ({ children, ...others }) => {\n return (\n <ModalView BoxComponent={CalendarBoxContent} {...others}>\n {children}\n </ModalView>\n );\n};\n"],"names":["React","DatePickerCore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqBa,MAAA,UAAA,GAAa,CAA0B,EAIP,KAAA;AAJO,EAClD,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,MAAA;AAAA,IACA,QAAA;AAAA,GAvBF,GAqBoD,EAG/C,EAAA,IAAA,GAAA,SAAA,CAH+C,EAG/C,EAAA;AAAA,IAFH,QAAA;AAAA,IACA,UAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,MAAM,QAAQ,mBAAoB,EAAA,CAAA;AAElC,EAAM,MAAA,YAAA,GAAe,CAAC,KAAqB,KAAA;AACzC,IAAW,QAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,QAAA,CAAA,KAAA,CAAA,CAAA;AACX,IAAA,KAAA,CAAM,aAAc,EAAA,CAAA;AAAA,GACtB,CAAA;AAEA,EACE,uBAAAA,cAAA,CAAA,aAAA,CAACC,+CACK,IADL,CAAA,EAAA;AAAA,IAEC,aAAe,EAAA,IAAA;AAAA,IACf,iBAAmB,EAAA,QAAA;AAAA,IACnB,MAAA,EAAQ,0BAAU,SAAU,EAAA;AAAA,IAC5B,QAAU,EAAA,YAAA;AAAA,IACV,mBAAA,EAAqB,MAAM,KAAA,CAAM,IAAK,EAAA;AAAA,IACtC,oBAAA,EAAsB,MAAM,KAAA,CAAM,KAAM,EAAA;AAAA,IACxC,gBAAgB,CAAC,QAAA,EAAU,IACzB,KAAA,KAAA,CAAM,qBAAMD,cAAA,CAAA,aAAA,CAAA,WAAA,EAAA;AAAA,MAAY,OAAS,EAAA,IAAA;AAAA,KAAA,EAAO,QAAS,CAAc,CAAA;AAAA,GAEnE,CAAA,CAAA,CAAA;AAEJ,EAAA;AAEA,MAAM,WAAA,GAA8B,CAAC,EAA4B,KAAA;AAA5B,EAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EAjDvC,QAAA,EAAA,GAiDqC,EAAe,EAAA,MAAA,GAAA,SAAA,CAAf,IAAe,CAAb,UAAA,CAAA,CAAA,CAAA;AACrC,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,SAAA,EAAA,cAAA,CAAA;AAAA,IAAU,YAAc,EAAA,kBAAA;AAAA,GAAA,EAAwB,SAC9C,QACH,CAAA,CAAA;AAEJ,CAAA;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import styled from '@emotion/native';
|
|
2
|
+
import { BoxContent } from '@tecsinapse/react-core';
|
|
3
|
+
|
|
4
|
+
const CalendarBoxContent = styled(BoxContent)`
|
|
5
|
+
background-color: ${({ theme }) => theme.color.secondary.xlight};
|
|
6
|
+
`;
|
|
7
|
+
|
|
8
|
+
export { CalendarBoxContent };
|
|
9
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/molecules/DatePicker/styled.ts"],"sourcesContent":["import styled from '@emotion/native';\nimport { BoxContent, StyleProps } from '@tecsinapse/react-core';\n\nexport const CalendarBoxContent = styled(BoxContent)<Partial<StyleProps>>`\n background-color: ${({ theme }) => theme.color.secondary.xlight};\n`;\n"],"names":[],"mappings":";;;AAGa,MAAA,kBAAA,GAAqB,OAAO,UAAU,CAAA,CAAA;AAAA,oBAAA,EAC7B,CAAC,EAAE,KAAA,EAAY,KAAA,KAAA,CAAM,MAAM,SAAU,CAAA,MAAA,CAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { DateTimePickerProps } from '@tecsinapse/react-core';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
export declare type NativeDateTimePickerProps = Omit<DateTimePickerProps, 'DateTimeSelectorComponent' | 'renderSelector' | 'requestCloseSelector' | 'requestShowSelector'>;
|
|
4
|
+
export declare const DateTimePicker: FC<NativeDateTimePickerProps>;
|