@tecsinapse/react-native-kit 1.20.0 → 1.22.0-beta.13
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 +8 -0
- package/dist/components/atoms/Avatar/Avatar.d.ts +2 -1
- package/dist/components/atoms/Avatar/Avatar.js +34 -20
- 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 +58 -29
- 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 +71 -39
- package/dist/components/atoms/BottomNavigator/BottomNavigator.js.map +1 -1
- package/dist/components/atoms/BottomNavigator/Item.js +68 -31
- 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 +25 -42
- package/dist/components/atoms/BottomNavigator/styled.js.map +1 -1
- package/dist/components/atoms/Button/Button.js +55 -23
- 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 -22
- 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 -22
- 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 -22
- 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.js +34 -21
- package/dist/components/atoms/GroupButton/GroupButtonOption.js.map +1 -1
- package/dist/components/atoms/Header/Header.js +75 -32
- 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 +14 -15
- package/dist/components/atoms/Header/styled.js.map +1 -1
- package/dist/components/atoms/Input/Input.js +133 -89
- 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 +12 -14
- package/dist/components/atoms/Input/styled.js.map +1 -1
- package/dist/components/atoms/InputMask/InputMask.js +135 -87
- 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 +15 -17
- package/dist/components/atoms/InputMask/styled.js.map +1 -1
- package/dist/components/atoms/Modal/ModalGroupManager.js +47 -29
- package/dist/components/atoms/Modal/ModalGroupManager.js.map +1 -1
- package/dist/components/atoms/Modal/ModalLifecycleHandler.js +94 -87
- package/dist/components/atoms/Modal/ModalLifecycleHandler.js.map +1 -1
- package/dist/components/atoms/Modal/ui/BaseModalView.js +106 -105
- package/dist/components/atoms/Modal/ui/BaseModalView.js.map +1 -1
- package/dist/components/atoms/Modal/ui/styled.js +19 -21
- package/dist/components/atoms/Modal/ui/styled.js.map +1 -1
- package/dist/components/atoms/Modal/useLazyModalManager.js +22 -23
- package/dist/components/atoms/Modal/useLazyModalManager.js.map +1 -1
- package/dist/components/atoms/Modal/useModalManager.js +14 -19
- package/dist/components/atoms/Modal/useModalManager.js.map +1 -1
- package/dist/components/atoms/Modal/useModalRemoteControl.js +10 -12
- package/dist/components/atoms/Modal/useModalRemoteControl.js.map +1 -1
- package/dist/components/atoms/Skeleton/Pulse.js +20 -22
- package/dist/components/atoms/Skeleton/Pulse.js.map +1 -1
- package/dist/components/atoms/Skeleton/Skeleton.js +77 -55
- package/dist/components/atoms/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/atoms/Skeleton/Wave.js +36 -40
- package/dist/components/atoms/Skeleton/Wave.js.map +1 -1
- package/dist/components/atoms/Skeleton/animation.js +29 -29
- 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 +12 -18
- package/dist/components/atoms/Skeleton/styled.js.map +1 -1
- package/dist/components/atoms/SnappingSlider/SnappingSlider.js +76 -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 -25
- 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 -15
- 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 +16 -19
- package/dist/components/atoms/Text/styled.js.map +1 -1
- package/dist/components/atoms/TextArea/TextArea.js +122 -74
- 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 -9
- package/dist/components/atoms/TextArea/styled.js.map +1 -1
- package/dist/components/molecules/Calendar/Calendar.js +54 -25
- package/dist/components/molecules/Calendar/Calendar.js.map +1 -1
- package/dist/components/molecules/DatePicker/DatePicker.js +67 -42
- 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 -11
- package/dist/components/molecules/DatePicker/styled.js.map +1 -1
- package/dist/components/molecules/DateTimePicker/DateTimePicker.js +61 -34
- 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 -25
- package/dist/components/molecules/DateTimeSelector/DateTimeSelector.js.map +1 -1
- package/dist/components/molecules/Grid/Grid.js +79 -42
- package/dist/components/molecules/Grid/Grid.js.map +1 -1
- package/dist/components/molecules/Grid/Item/Item.js +90 -56
- package/dist/components/molecules/Grid/Item/Item.js.map +1 -1
- package/dist/components/molecules/IconTextButton/IconTextButton.js +70 -42
- package/dist/components/molecules/IconTextButton/IconTextButton.js.map +1 -1
- package/dist/components/molecules/IconTextButton/TextComponent.js +38 -26
- 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 +22 -31
- package/dist/components/molecules/IconTextButton/styled.js.map +1 -1
- package/dist/components/molecules/InputPassword/InputPassword.js +60 -37
- 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 +58 -29
- package/dist/components/molecules/LabeledSwitch/LabelComponent.js.map +1 -1
- package/dist/components/molecules/LabeledSwitch/LabeledSwitch.js +70 -41
- 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 +18 -20
- package/dist/components/molecules/LabeledSwitch/styled.js.map +1 -1
- package/dist/components/molecules/Select/Modal.js +206 -133
- package/dist/components/molecules/Select/Modal.js.map +1 -1
- package/dist/components/molecules/Select/Select.js +217 -135
- 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 +54 -83
- 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 +52 -28
- 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 -14
- package/dist/components/molecules/Snackbar/styled.js.map +1 -1
- package/dist/index.d.ts +38 -19
- package/dist/index.js +80 -191
- package/dist/index.js.map +1 -1
- package/dist/utils/date.js +31 -19
- 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 -9
- package/dist/components/atoms/Avatar/index.js.map +0 -1
- package/dist/components/atoms/Badge/index.js +0 -14
- package/dist/components/atoms/Badge/index.js.map +0 -1
- package/dist/components/atoms/BottomNavigator/index.js +0 -18
- package/dist/components/atoms/BottomNavigator/index.js.map +0 -1
- package/dist/components/atoms/Button/States/index.js +0 -19
- package/dist/components/atoms/Button/States/index.js.map +0 -1
- package/dist/components/atoms/Button/index.js +0 -16
- package/dist/components/atoms/Button/index.js.map +0 -1
- package/dist/components/atoms/GroupButton/index.js +0 -11
- package/dist/components/atoms/GroupButton/index.js.map +0 -1
- package/dist/components/atoms/Header/index.js +0 -14
- package/dist/components/atoms/Header/index.js.map +0 -1
- package/dist/components/atoms/Input/index.js +0 -14
- package/dist/components/atoms/Input/index.js.map +0 -1
- package/dist/components/atoms/InputMask/index.js +0 -14
- package/dist/components/atoms/InputMask/index.js.map +0 -1
- package/dist/components/atoms/Modal/index.js +0 -60
- package/dist/components/atoms/Modal/index.js.map +0 -1
- package/dist/components/atoms/Modal/ui/types.js +0 -4
- package/dist/components/atoms/Modal/ui/types.js.map +0 -1
- package/dist/components/atoms/Skeleton/index.js +0 -14
- package/dist/components/atoms/Skeleton/index.js.map +0 -1
- package/dist/components/atoms/Skeleton/types.js +0 -4
- package/dist/components/atoms/Skeleton/types.js.map +0 -1
- package/dist/components/atoms/SnappingSlider/index.js +0 -14
- package/dist/components/atoms/SnappingSlider/index.js.map +0 -1
- package/dist/components/atoms/Tag/index.js +0 -14
- package/dist/components/atoms/Tag/index.js.map +0 -1
- package/dist/components/atoms/Text/index.js +0 -14
- package/dist/components/atoms/Text/index.js.map +0 -1
- package/dist/components/atoms/TextArea/index.js +0 -14
- package/dist/components/atoms/TextArea/index.js.map +0 -1
- package/dist/components/molecules/Calendar/index.js +0 -9
- package/dist/components/molecules/Calendar/index.js.map +0 -1
- package/dist/components/molecules/DatePicker/index.js +0 -10
- package/dist/components/molecules/DatePicker/index.js.map +0 -1
- package/dist/components/molecules/DateTimePicker/index.js +0 -10
- package/dist/components/molecules/DateTimePicker/index.js.map +0 -1
- package/dist/components/molecules/DateTimeSelector/index.js +0 -9
- package/dist/components/molecules/DateTimeSelector/index.js.map +0 -1
- package/dist/components/molecules/Grid/Item/index.js +0 -14
- package/dist/components/molecules/Grid/Item/index.js.map +0 -1
- package/dist/components/molecules/Grid/index.js +0 -15
- package/dist/components/molecules/Grid/index.js.map +0 -1
- package/dist/components/molecules/IconTextButton/index.js +0 -14
- package/dist/components/molecules/IconTextButton/index.js.map +0 -1
- package/dist/components/molecules/InputPassword/index.js +0 -14
- package/dist/components/molecules/InputPassword/index.js.map +0 -1
- package/dist/components/molecules/LabeledSwitch/index.js +0 -14
- package/dist/components/molecules/LabeledSwitch/index.js.map +0 -1
- package/dist/components/molecules/Select/index.js +0 -14
- package/dist/components/molecules/Select/index.js.map +0 -1
- package/dist/components/molecules/Snackbar/index.js +0 -14
- package/dist/components/molecules/Snackbar/index.js.map +0 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import GridItem from './Item/Item.js';
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defProps = Object.defineProperties;
|
|
7
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __objRest = (source, exclude) => {
|
|
25
|
+
var target = {};
|
|
26
|
+
for (var prop in source)
|
|
27
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
if (source != null && __getOwnPropSymbols)
|
|
30
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
+
target[prop] = source[prop];
|
|
33
|
+
}
|
|
34
|
+
return target;
|
|
35
|
+
};
|
|
36
|
+
const Grid = (_a) => {
|
|
37
|
+
var _b = _a, {
|
|
38
|
+
children,
|
|
39
|
+
columns = 12,
|
|
40
|
+
layout,
|
|
41
|
+
style,
|
|
42
|
+
spacing
|
|
43
|
+
} = _b, rest = __objRest(_b, [
|
|
44
|
+
"children",
|
|
45
|
+
"columns",
|
|
46
|
+
"layout",
|
|
47
|
+
"style",
|
|
48
|
+
"spacing"
|
|
49
|
+
]);
|
|
50
|
+
if (layout) {
|
|
51
|
+
const flatLayout = layout.flat();
|
|
52
|
+
return /* @__PURE__ */ React__default.createElement(View, __spreadValues({
|
|
53
|
+
style: [
|
|
54
|
+
style,
|
|
55
|
+
{
|
|
56
|
+
display: "flex",
|
|
57
|
+
flexDirection: "row",
|
|
58
|
+
flexWrap: "wrap"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}, rest), React__default.Children.map(children, (child, index) => /* @__PURE__ */ React__default.createElement(GridItem, {
|
|
62
|
+
key: `child-${index}`,
|
|
63
|
+
columns,
|
|
64
|
+
span: flatLayout[index],
|
|
65
|
+
spacing
|
|
66
|
+
}, child)));
|
|
67
|
+
}
|
|
68
|
+
return /* @__PURE__ */ React__default.createElement(View, __spreadValues({
|
|
69
|
+
style: [
|
|
70
|
+
style,
|
|
71
|
+
{
|
|
72
|
+
display: "flex",
|
|
73
|
+
flexDirection: "row",
|
|
74
|
+
flexWrap: "wrap"
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}, rest), React__default.Children.map(children, (child, index) => {
|
|
78
|
+
var _a2;
|
|
79
|
+
return React__default.cloneElement(child, __spreadProps(__spreadValues({}, child == null ? void 0 : child.props), {
|
|
80
|
+
columns,
|
|
81
|
+
spacing: (_a2 = child == null ? void 0 : child.props.spacing) != null ? _a2 : spacing,
|
|
82
|
+
key: `child-${index}`
|
|
83
|
+
}));
|
|
84
|
+
}));
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export { Grid as default };
|
|
88
|
+
//# sourceMappingURL=Grid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Grid.js","sources":["../../../../src/components/molecules/Grid/Grid.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewProps } from 'react-native';\nimport { GridItem } from './Item';\nimport { IGrid } from '@tecsinapse/react-core';\n\nexport type IGridNative = IGrid & ViewProps;\n\nconst Grid = ({\n children,\n columns = 12,\n layout,\n style,\n spacing,\n ...rest\n}: IGridNative): JSX.Element => {\n if (layout) {\n const flatLayout = layout.flat();\n return (\n <View\n style={[\n style,\n {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n ]}\n {...rest}\n >\n {React.Children.map(children, (child, index) => (\n <GridItem\n key={`child-${index}`}\n columns={columns}\n span={flatLayout[index]}\n spacing={spacing}\n >\n {child}\n </GridItem>\n ))}\n </View>\n );\n }\n\n return (\n <View\n style={[\n style,\n {\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n ]}\n {...rest}\n >\n {React.Children.map(children, (child, index) => {\n return React.cloneElement(child, {\n ...child?.props,\n columns,\n spacing: child?.props.spacing ?? spacing,\n key: `child-${index}`,\n });\n })}\n </View>\n );\n};\n\nexport default Grid;\n"],"names":["React","_a"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOM,MAAA,IAAA,GAAO,CAAC,EAOkB,KAAA;AAPlB,EACZ,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,OAAU,GAAA,EAAA;AAAA,IACV,MAAA;AAAA,IACA,KAAA;AAAA,IACA,OAAA;AAAA,GAZF,GAOc,EAMT,EAAA,IAAA,GAAA,SAAA,CANS,EAMT,EAAA;AAAA,IALH,UAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,IAAI,MAAQ,EAAA;AACV,IAAM,MAAA,UAAA,GAAa,OAAO,IAAK,EAAA,CAAA;AAC/B,IAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA,cAAA,CAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,KAAA;AAAA,QACA;AAAA,UACE,OAAS,EAAA,MAAA;AAAA,UACT,aAAe,EAAA,KAAA;AAAA,UACf,QAAU,EAAA,MAAA;AAAA,SACZ;AAAA,OACF;AAAA,KACI,EAAA,IAAA,CAAA,EAEHA,eAAM,QAAS,CAAA,GAAA,CAAI,UAAU,CAAC,KAAA,EAAO,0BACnCA,cAAA,CAAA,aAAA,CAAA,QAAA,EAAA;AAAA,MACC,KAAK,CAAS,MAAA,EAAA,KAAA,CAAA,CAAA;AAAA,MACd,OAAA;AAAA,MACA,MAAM,UAAW,CAAA,KAAA,CAAA;AAAA,MACjB,OAAA;AAAA,KAEC,EAAA,KACH,CACD,CACH,CAAA,CAAA;AAAA,GAEJ;AAEA,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA,cAAA,CAAA;AAAA,IACC,KAAO,EAAA;AAAA,MACL,KAAA;AAAA,MACA;AAAA,QACE,OAAS,EAAA,MAAA;AAAA,QACT,aAAe,EAAA,KAAA;AAAA,QACf,QAAU,EAAA,MAAA;AAAA,OACZ;AAAA,KACF;AAAA,GAAA,EACI,OAEHA,cAAM,CAAA,QAAA,CAAS,IAAI,QAAU,EAAA,CAAC,OAAO,KAAU,KAAA;AAvDtD,IAAAC,IAAAA,GAAAA,CAAAA;AAwDQ,IAAA,OAAOD,cAAM,CAAA,YAAA,CAAa,KAAO,EAAA,aAAA,CAAA,cAAA,CAAA,EAAA,EAC5B,+BAAO,KADqB,CAAA,EAAA;AAAA,MAE/B,OAAA;AAAA,MACA,UAASC,GAAA,GAAA,KAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,KAAA,CAAO,KAAM,CAAA,OAAA,KAAb,OAAAA,GAAwB,GAAA,OAAA;AAAA,MACjC,KAAK,CAAS,MAAA,EAAA,KAAA,CAAA,CAAA;AAAA,KACf,CAAA,CAAA,CAAA;AAAA,GACF,CACH,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ViewProps } from 'react-native';
|
|
2
|
+
import { IGridItem } from '@tecsinapse/react-core';
|
|
3
|
+
export declare type IGridItemNative = IGridItem & ViewProps & {
|
|
4
|
+
flexBasis?: string | 'auto';
|
|
5
|
+
};
|
|
6
|
+
declare const GridItem: ({ children, span, columns, loadingComponent, loading, spacing: _spacing, wrapper, alignContent, alignItems, alignSelf, flex, flexDirection, flexGrow, flexShrink, justifyContent, flexBasis, style, ...rest }: IGridItemNative) => JSX.Element;
|
|
7
|
+
export default GridItem;
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import { useTheme, getGridItemColumSpan, getGridItemPadding } from '@tecsinapse/react-core';
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defProps = Object.defineProperties;
|
|
7
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __objRest = (source, exclude) => {
|
|
25
|
+
var target = {};
|
|
26
|
+
for (var prop in source)
|
|
27
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
if (source != null && __getOwnPropSymbols)
|
|
30
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
+
target[prop] = source[prop];
|
|
33
|
+
}
|
|
34
|
+
return target;
|
|
35
|
+
};
|
|
36
|
+
const GridItem = (_a) => {
|
|
37
|
+
var _b = _a, {
|
|
38
|
+
children,
|
|
39
|
+
span,
|
|
40
|
+
columns = 12,
|
|
41
|
+
loadingComponent,
|
|
42
|
+
loading = false,
|
|
43
|
+
spacing: _spacing,
|
|
44
|
+
wrapper = false,
|
|
45
|
+
alignContent,
|
|
46
|
+
alignItems,
|
|
47
|
+
alignSelf,
|
|
48
|
+
flex,
|
|
49
|
+
flexDirection,
|
|
50
|
+
flexGrow,
|
|
51
|
+
flexShrink,
|
|
52
|
+
justifyContent,
|
|
53
|
+
flexBasis,
|
|
54
|
+
style
|
|
55
|
+
} = _b, rest = __objRest(_b, [
|
|
56
|
+
"children",
|
|
57
|
+
"span",
|
|
58
|
+
"columns",
|
|
59
|
+
"loadingComponent",
|
|
60
|
+
"loading",
|
|
61
|
+
"spacing",
|
|
62
|
+
"wrapper",
|
|
63
|
+
"alignContent",
|
|
64
|
+
"alignItems",
|
|
65
|
+
"alignSelf",
|
|
66
|
+
"flex",
|
|
67
|
+
"flexDirection",
|
|
68
|
+
"flexGrow",
|
|
69
|
+
"flexShrink",
|
|
70
|
+
"justifyContent",
|
|
71
|
+
"flexBasis",
|
|
72
|
+
"style"
|
|
73
|
+
]);
|
|
74
|
+
const { spacing } = useTheme();
|
|
75
|
+
if (!React__default.Children.only(children)) {
|
|
76
|
+
throw new Error("The number of children in GridItem should be one");
|
|
77
|
+
}
|
|
78
|
+
if (loadingComponent && loading) {
|
|
79
|
+
return loadingComponent;
|
|
80
|
+
}
|
|
81
|
+
const _style = {
|
|
82
|
+
alignContent,
|
|
83
|
+
alignItems,
|
|
84
|
+
alignSelf,
|
|
85
|
+
flex,
|
|
86
|
+
flexDirection,
|
|
87
|
+
flexGrow,
|
|
88
|
+
flexShrink,
|
|
89
|
+
justifyContent,
|
|
90
|
+
boxSizing: "border-box",
|
|
91
|
+
flexBasis: flexBasis != null ? flexBasis : `${getGridItemColumSpan(columns, span)}%`,
|
|
92
|
+
paddingTop: getGridItemPadding("top", _spacing, spacing),
|
|
93
|
+
paddingBottom: getGridItemPadding("bottom", _spacing, spacing),
|
|
94
|
+
paddingRight: getGridItemPadding("right", _spacing, spacing),
|
|
95
|
+
paddingLeft: getGridItemPadding("left", _spacing, spacing)
|
|
96
|
+
};
|
|
97
|
+
const clone = React__default.cloneElement(children, __spreadProps(__spreadValues({}, children == null ? void 0 : children.props), {
|
|
98
|
+
style: wrapper ? children == null ? void 0 : children.props.style : __spreadValues(__spreadValues({}, _style), children == null ? void 0 : children.props.style)
|
|
99
|
+
}));
|
|
100
|
+
return wrapper ? /* @__PURE__ */ React__default.createElement(View, __spreadProps(__spreadValues({}, rest), {
|
|
101
|
+
style: [style, _style]
|
|
102
|
+
}), clone) : clone;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export { GridItem as default };
|
|
106
|
+
//# sourceMappingURL=Item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Item.js","sources":["../../../../../src/components/molecules/Grid/Item/Item.tsx"],"sourcesContent":["import React from 'react';\nimport { View, ViewProps } from 'react-native';\nimport {\n IGridItem,\n useTheme,\n getGridItemColumSpan,\n getGridItemPadding,\n} from '@tecsinapse/react-core';\n\nexport type IGridItemNative = IGridItem &\n ViewProps & {\n /** Only specify this property if the GridItem will be 'dynamic', adjusting itself to content. Use this with `wrapper` for better result. */\n flexBasis?: string | 'auto';\n };\n\nconst GridItem = ({\n children,\n span,\n columns = 12,\n loadingComponent,\n loading = false,\n spacing: _spacing,\n wrapper = false,\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n justifyContent,\n flexBasis,\n style,\n ...rest\n}: IGridItemNative): JSX.Element => {\n const { spacing } = useTheme();\n if (!React.Children.only(children)) {\n throw new Error('The number of children in GridItem should be one');\n }\n if (loadingComponent && loading) {\n return loadingComponent;\n }\n\n const _style = {\n alignContent,\n alignItems,\n alignSelf,\n flex,\n flexDirection,\n flexGrow,\n flexShrink,\n justifyContent,\n boxSizing: 'border-box',\n flexBasis: flexBasis ?? `${getGridItemColumSpan(columns, span)}%`,\n paddingTop: getGridItemPadding('top', _spacing, spacing),\n paddingBottom: getGridItemPadding('bottom', _spacing, spacing),\n paddingRight: getGridItemPadding('right', _spacing, spacing),\n paddingLeft: getGridItemPadding('left', _spacing, spacing),\n };\n\n const clone = React.cloneElement(children, {\n ...children?.props,\n style: wrapper\n ? children?.props.style\n : { ..._style, ...children?.props.style },\n });\n\n return wrapper ? (\n <View {...rest} style={[style, _style]}>\n {clone}\n </View>\n ) : (\n clone\n );\n};\n\nexport default GridItem;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeM,MAAA,QAAA,GAAW,CAAC,EAmBkB,KAAA;AAnBlB,EAChB,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,QAAA;AAAA,IACA,IAAA;AAAA,IACA,OAAU,GAAA,EAAA;AAAA,IACV,gBAAA;AAAA,IACA,OAAU,GAAA,KAAA;AAAA,IACV,OAAS,EAAA,QAAA;AAAA,IACT,OAAU,GAAA,KAAA;AAAA,IACV,YAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,IAAA;AAAA,IACA,aAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,cAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,GAhCF,GAekB,EAkBb,EAAA,IAAA,GAAA,SAAA,CAlBa,EAkBb,EAAA;AAAA,IAjBH,UAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,IACA,kBAAA;AAAA,IACA,SAAA;AAAA,IACA,SAAA;AAAA,IACA,SAAA;AAAA,IACA,cAAA;AAAA,IACA,YAAA;AAAA,IACA,WAAA;AAAA,IACA,MAAA;AAAA,IACA,eAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,gBAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAM,MAAA,EAAE,OAAQ,EAAA,GAAI,QAAS,EAAA,CAAA;AAC7B,EAAA,IAAI,CAACA,cAAA,CAAM,QAAS,CAAA,IAAA,CAAK,QAAQ,CAAG,EAAA;AAClC,IAAM,MAAA,IAAI,MAAM,kDAAkD,CAAA,CAAA;AAAA,GACpE;AACA,EAAA,IAAI,oBAAoB,OAAS,EAAA;AAC/B,IAAO,OAAA,gBAAA,CAAA;AAAA,GACT;AAEA,EAAA,MAAM,MAAS,GAAA;AAAA,IACb,YAAA;AAAA,IACA,UAAA;AAAA,IACA,SAAA;AAAA,IACA,IAAA;AAAA,IACA,aAAA;AAAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,cAAA;AAAA,IACA,SAAW,EAAA,YAAA;AAAA,IACX,SAAW,EAAA,SAAA,IAAA,IAAA,GAAA,SAAA,GAAa,CAAG,EAAA,oBAAA,CAAqB,SAAS,IAAI,CAAA,CAAA,CAAA,CAAA;AAAA,IAC7D,UAAY,EAAA,kBAAA,CAAmB,KAAO,EAAA,QAAA,EAAU,OAAO,CAAA;AAAA,IACvD,aAAe,EAAA,kBAAA,CAAmB,QAAU,EAAA,QAAA,EAAU,OAAO,CAAA;AAAA,IAC7D,YAAc,EAAA,kBAAA,CAAmB,OAAS,EAAA,QAAA,EAAU,OAAO,CAAA;AAAA,IAC3D,WAAa,EAAA,kBAAA,CAAmB,MAAQ,EAAA,QAAA,EAAU,OAAO,CAAA;AAAA,GAC3D,CAAA;AAEA,EAAA,MAAM,QAAQA,cAAM,CAAA,YAAA,CAAa,QAAU,EAAA,aAAA,CAAA,cAAA,CAAA,EAAA,EACtC,qCAAU,KAD4B,CAAA,EAAA;AAAA,IAEzC,KAAA,EAAO,UACH,QAAU,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,QAAA,CAAA,KAAA,CAAM,QAChB,cAAK,CAAA,cAAA,CAAA,EAAA,EAAA,MAAA,CAAA,EAAW,qCAAU,KAAM,CAAA,KAAA,CAAA;AAAA,GACrC,CAAA,CAAA,CAAA;AAED,EAAO,OAAA,OAAA,mBACJA,cAAA,CAAA,aAAA,CAAA,IAAA,EAAA,aAAA,CAAA,cAAA,CAAA,EAAA,EAAS,IAAT,CAAA,EAAA;AAAA,IAAe,KAAA,EAAO,CAAC,KAAA,EAAO,MAAM,CAAA;AAAA,GAAA,CAAA,EAClC,KACH,CAEA,GAAA,KAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GridItem, IGridItemNative } from './Item';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { IconTextButtonProps } from '@tecsinapse/react-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ButtonNativeProps } from '../../atoms/Button';
|
|
4
|
+
export declare type NativeIconTextButtonProps = IconTextButtonProps & Omit<ButtonNativeProps, 'ButtonProps'>;
|
|
5
|
+
declare const IconTextButton: React.FC<NativeIconTextButtonProps>;
|
|
6
|
+
export default IconTextButton;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { IconComponent, fontColorVC } from '@tecsinapse/react-core';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
import { StyledIconTextButton } from './styled.js';
|
|
4
|
+
import TextComponent from './TextComponent.js';
|
|
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 IconTextButton = (_a) => {
|
|
35
|
+
var _b = _a, {
|
|
36
|
+
iconProps,
|
|
37
|
+
iconPosition = "left",
|
|
38
|
+
textProps,
|
|
39
|
+
label,
|
|
40
|
+
variant = "filled",
|
|
41
|
+
size = "default"
|
|
42
|
+
} = _b, rest = __objRest(_b, [
|
|
43
|
+
"iconProps",
|
|
44
|
+
"iconPosition",
|
|
45
|
+
"textProps",
|
|
46
|
+
"label",
|
|
47
|
+
"variant",
|
|
48
|
+
"size"
|
|
49
|
+
]);
|
|
50
|
+
return /* @__PURE__ */ React__default.createElement(StyledIconTextButton, __spreadValues({
|
|
51
|
+
boxed: !label,
|
|
52
|
+
variant
|
|
53
|
+
}, rest), iconPosition === "left" ? /* @__PURE__ */ React__default.createElement(IconComponent, {
|
|
54
|
+
iconProps,
|
|
55
|
+
size,
|
|
56
|
+
defaultFontColor: fontColorVC[variant]
|
|
57
|
+
}) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null), /* @__PURE__ */ React__default.createElement(TextComponent, {
|
|
58
|
+
label,
|
|
59
|
+
defaultFontColor: fontColorVC[variant],
|
|
60
|
+
hasIcon: !!iconProps,
|
|
61
|
+
iconPosition,
|
|
62
|
+
textProps,
|
|
63
|
+
size
|
|
64
|
+
}), iconPosition === "right" ? /* @__PURE__ */ React__default.createElement(IconComponent, {
|
|
65
|
+
iconProps,
|
|
66
|
+
size,
|
|
67
|
+
defaultFontColor: fontColorVC[variant]
|
|
68
|
+
}) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null));
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export { IconTextButton as default };
|
|
72
|
+
//# sourceMappingURL=IconTextButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconTextButton.js","sources":["../../../../src/components/molecules/IconTextButton/IconTextButton.tsx"],"sourcesContent":["import {\n fontColorVC,\n IconComponent,\n IconTextButtonProps,\n} from '@tecsinapse/react-core';\nimport React from 'react';\nimport { ButtonNativeProps } from '../../atoms/Button';\nimport { StyledIconTextButton } from './styled';\nimport TextComponent from './TextComponent';\n\nexport type NativeIconTextButtonProps = IconTextButtonProps &\n Omit<ButtonNativeProps, 'ButtonProps'>;\n\nconst IconTextButton: React.FC<NativeIconTextButtonProps> = ({\n iconProps,\n iconPosition = 'left',\n textProps,\n label,\n variant = 'filled',\n size = 'default',\n ...rest\n}) => {\n return (\n <StyledIconTextButton boxed={!label} variant={variant} {...rest}>\n {iconPosition === 'left' ? (\n <IconComponent\n iconProps={iconProps}\n size={size}\n defaultFontColor={fontColorVC[variant]}\n />\n ) : (\n <></>\n )}\n <TextComponent\n label={label}\n defaultFontColor={fontColorVC[variant]}\n hasIcon={!!iconProps}\n iconPosition={iconPosition}\n textProps={textProps}\n size={size}\n />\n {iconPosition === 'right' ? (\n <IconComponent\n iconProps={iconProps}\n size={size}\n defaultFontColor={fontColorVC[variant]}\n />\n ) : (\n <></>\n )}\n </StyledIconTextButton>\n );\n};\n\nexport default IconTextButton;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAaM,MAAA,cAAA,GAAsD,CAAC,EAQvD,KAAA;AARuD,EAC3D,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,SAAA;AAAA,IACA,YAAe,GAAA,MAAA;AAAA,IACf,SAAA;AAAA,IACA,KAAA;AAAA,IACA,OAAU,GAAA,QAAA;AAAA,IACV,IAAO,GAAA,SAAA;AAAA,GAnBT,GAa6D,EAOxD,EAAA,IAAA,GAAA,SAAA,CAPwD,EAOxD,EAAA;AAAA,IANH,WAAA;AAAA,IACA,cAAA;AAAA,IACA,WAAA;AAAA,IACA,OAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,GAAA,CAAA,CAAA;AAGA,EAAA,uBACGA,cAAA,CAAA,aAAA,CAAA,oBAAA,EAAA,cAAA,CAAA;AAAA,IAAqB,OAAO,CAAC,KAAA;AAAA,IAAO,OAAA;AAAA,GAAsB,EAAA,IAAA,CAAA,EACxD,YAAiB,KAAA,MAAA,mBACfA,cAAA,CAAA,aAAA,CAAA,aAAA,EAAA;AAAA,IACC,SAAA;AAAA,IACA,IAAA;AAAA,IACA,kBAAkB,WAAY,CAAA,OAAA,CAAA;AAAA,GAChC,CAAA,mBAEEA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA,CAAA,kBAEHA,cAAA,CAAA,aAAA,CAAA,aAAA,EAAA;AAAA,IACC,KAAA;AAAA,IACA,kBAAkB,WAAY,CAAA,OAAA,CAAA;AAAA,IAC9B,OAAA,EAAS,CAAC,CAAC,SAAA;AAAA,IACX,YAAA;AAAA,IACA,SAAA;AAAA,IACA,IAAA;AAAA,GACF,CAAA,EACC,YAAiB,KAAA,OAAA,mBACfA,cAAA,CAAA,aAAA,CAAA,aAAA,EAAA;AAAA,IACC,SAAA;AAAA,IACA,IAAA;AAAA,IACA,kBAAkB,WAAY,CAAA,OAAA,CAAA;AAAA,GAChC,CAAA,6EAEE,CAEN,CAAA,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ButtonSizeType, FontColor, IconPositionOptions, TextProps } from '@tecsinapse/react-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
interface TextComponentProps {
|
|
4
|
+
textProps?: TextProps;
|
|
5
|
+
size?: ButtonSizeType;
|
|
6
|
+
defaultFontColor: keyof FontColor;
|
|
7
|
+
label?: string;
|
|
8
|
+
iconPosition?: IconPositionOptions;
|
|
9
|
+
hasIcon?: boolean;
|
|
10
|
+
}
|
|
11
|
+
declare const _default: React.NamedExoticComponent<TextComponentProps>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { StyledText } 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
|
+
const TextComponent = ({
|
|
21
|
+
textProps,
|
|
22
|
+
size = "default",
|
|
23
|
+
defaultFontColor,
|
|
24
|
+
label,
|
|
25
|
+
iconPosition = "left",
|
|
26
|
+
hasIcon = false
|
|
27
|
+
}) => {
|
|
28
|
+
var _a, _b, _c;
|
|
29
|
+
return label ? /* @__PURE__ */ React__default.createElement(StyledText, __spreadValues({
|
|
30
|
+
typography: ((_a = textProps == null ? void 0 : textProps.typography) != null ? _a : size === "small") ? "sub" : "base",
|
|
31
|
+
fontWeight: (_b = textProps == null ? void 0 : textProps.fontWeight) != null ? _b : "bold",
|
|
32
|
+
fontColor: (_c = textProps == null ? void 0 : textProps.fontColor) != null ? _c : defaultFontColor,
|
|
33
|
+
iconPosition,
|
|
34
|
+
hasIcon
|
|
35
|
+
}, textProps), label) : /* @__PURE__ */ React__default.createElement(React__default.Fragment, null);
|
|
36
|
+
};
|
|
37
|
+
var TextComponent$1 = React__default.memo(TextComponent);
|
|
38
|
+
|
|
39
|
+
export { TextComponent$1 as default };
|
|
40
|
+
//# sourceMappingURL=TextComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextComponent.js","sources":["../../../../src/components/molecules/IconTextButton/TextComponent.tsx"],"sourcesContent":["import {\n ButtonSizeType,\n FontColor,\n IconPositionOptions,\n TextProps,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { StyledText } from './styled';\n\ninterface TextComponentProps {\n textProps?: TextProps;\n size?: ButtonSizeType;\n defaultFontColor: keyof FontColor;\n label?: string;\n iconPosition?: IconPositionOptions;\n hasIcon?: boolean;\n}\n\nconst TextComponent: FC<TextComponentProps> = ({\n textProps,\n size = 'default',\n defaultFontColor,\n label,\n iconPosition = 'left',\n hasIcon = false,\n}) => {\n return label ? (\n <StyledText\n typography={textProps?.typography ?? size === 'small' ? 'sub' : 'base'}\n fontWeight={textProps?.fontWeight ?? 'bold'}\n fontColor={textProps?.fontColor ?? defaultFontColor}\n iconPosition={iconPosition}\n hasIcon={hasIcon}\n {...textProps}\n >\n {label}\n </StyledText>\n ) : (\n <></>\n );\n};\n\nexport default React.memo(TextComponent);\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;AAkBA,MAAM,gBAAwC,CAAC;AAAA,EAC7C,SAAA;AAAA,EACA,IAAO,GAAA,SAAA;AAAA,EACP,gBAAA;AAAA,EACA,KAAA;AAAA,EACA,YAAe,GAAA,MAAA;AAAA,EACf,OAAU,GAAA,KAAA;AACZ,CAAM,KAAA;AAzBN,EAAA,IAAA,EAAA,EAAA,EAAA,EAAA,EAAA,CAAA;AA0BE,EAAA,OAAO,wBACJA,cAAA,CAAA,aAAA,CAAA,UAAA,EAAA,cAAA,CAAA;AAAA,IACC,cAAY,EAAW,GAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,UAAA,KAAX,IAAyB,GAAA,EAAA,GAAA,IAAA,KAAS,WAAU,KAAQ,GAAA,MAAA;AAAA,IAChE,UAAA,EAAA,CAAY,EAAW,GAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,UAAA,KAAX,IAAyB,GAAA,EAAA,GAAA,MAAA;AAAA,IACrC,SAAA,EAAA,CAAW,EAAW,GAAA,SAAA,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,SAAA,CAAA,SAAA,KAAX,IAAwB,GAAA,EAAA,GAAA,gBAAA;AAAA,IACnC,YAAA;AAAA,IACA,OAAA;AAAA,GACI,EAAA,SAAA,CAAA,EAEH,KACH,CAAA,mBAEEA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA,CAAA,CAAA;AAEN,CAAA,CAAA;AAEA,sBAAeA,cAAA,CAAM,KAAK,aAAa,CAAA;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import styled, { css } from '@emotion/native';
|
|
2
|
+
import { Button } from '../../atoms/Button/Button.js';
|
|
3
|
+
import '@tecsinapse/react-core';
|
|
4
|
+
import 'react';
|
|
5
|
+
import Text from '../../atoms/Text/Text.js';
|
|
6
|
+
|
|
7
|
+
const boxedStyle = ({ theme }) => `
|
|
8
|
+
padding: ${theme == null ? void 0 : theme.spacing.centi};
|
|
9
|
+
aspect-ratio: 1;
|
|
10
|
+
`;
|
|
11
|
+
const StyledIconTextButton = styled(Button)`
|
|
12
|
+
${({ boxed, theme }) => boxed && boxedStyle({ theme })};
|
|
13
|
+
`;
|
|
14
|
+
const StyledText = styled(Text)`
|
|
15
|
+
${({ theme, iconPosition, hasIcon = false }) => {
|
|
16
|
+
if (hasIcon && iconPosition === "left")
|
|
17
|
+
return css`
|
|
18
|
+
margin-left: ${theme == null ? void 0 : theme.spacing.mili};
|
|
19
|
+
`;
|
|
20
|
+
else if (hasIcon && iconPosition === "right")
|
|
21
|
+
return css`
|
|
22
|
+
margin-right: ${theme == null ? void 0 : theme.spacing.mili};
|
|
23
|
+
`;
|
|
24
|
+
}}
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
export { StyledIconTextButton, StyledText };
|
|
28
|
+
//# sourceMappingURL=styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../src/components/molecules/IconTextButton/styled.ts"],"sourcesContent":["import styled, { css } from '@emotion/native';\nimport { IconPositionOptions, StyleProps } from '@tecsinapse/react-core';\nimport { Button } from '../../atoms/Button';\nimport { Text } from '../../atoms/Text';\n\nconst boxedStyle = ({ theme }: Partial<StyleProps>) => `\n padding: ${theme?.spacing.centi};\n aspect-ratio: 1;\n `;\n\nexport const StyledIconTextButton = styled(Button)<\n Partial<StyleProps> & {\n boxed: boolean;\n }\n>`\n ${({ boxed, theme }) => boxed && boxedStyle({ theme })};\n`;\n\nexport const StyledText = styled(Text)<\n Partial<StyleProps> & {\n iconPosition: IconPositionOptions;\n hasIcon?: boolean;\n }\n>`\n ${({ theme, iconPosition, hasIcon = false }) => {\n if (hasIcon && iconPosition === 'left')\n return css`\n margin-left: ${theme?.spacing.mili};\n `;\n else if (hasIcon && iconPosition === 'right')\n return css`\n margin-right: ${theme?.spacing.mili};\n `;\n }}\n`;\n"],"names":[],"mappings":";;;;;;AAKA,MAAM,UAAa,GAAA,CAAC,EAAE,KAAA,EAAiC,KAAA,CAAA;AAAA,aAAA,EACxC,+BAAO,OAAQ,CAAA,KAAA,CAAA;AAAA;AAAA,EAAA,CAAA,CAAA;AAIjB,MAAA,oBAAA,GAAuB,OAAO,MAAM,CAAA,CAAA;AAAA,EAK7C,EAAA,CAAC,EAAE,KAAO,EAAA,KAAA,OAAY,KAAS,IAAA,UAAA,CAAW,EAAE,KAAA,EAAO,CAAA,CAAA;AAAA,EAAA;AAG1C,MAAA,UAAA,GAAa,OAAO,IAAI,CAAA,CAAA;AAAA,EAAA,EAMjC,CAAC,EAAE,KAAA,EAAO,YAAc,EAAA,OAAA,GAAU,OAAY,KAAA;AAC9C,EAAA,IAAI,WAAW,YAAiB,KAAA,MAAA;AAC9B,IAAO,OAAA,GAAA,CAAA;AAAA,qBAAA,EACU,+BAAO,OAAQ,CAAA,IAAA,CAAA;AAAA,MAAA,CAAA,CAAA;AAAA,OAAA,IAEzB,WAAW,YAAiB,KAAA,OAAA;AACnC,IAAO,OAAA,GAAA,CAAA;AAAA,sBAAA,EACW,+BAAO,OAAQ,CAAA,IAAA,CAAA;AAAA,MAAA,CAAA,CAAA;AAErC,CAAA,CAAA;AAAA;;;;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputNativeProps } from '../../atoms/Input';
|
|
3
|
+
import { TextInput } from 'react-native';
|
|
4
|
+
export declare type InputPasswordNativeProps = InputNativeProps;
|
|
5
|
+
declare const InputPassword: React.ForwardRefExoticComponent<Pick<InputNativeProps, string | number> & React.RefAttributes<TextInput>>;
|
|
6
|
+
export default InputPassword;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { InputPasswordIcon } from '@tecsinapse/react-core';
|
|
2
|
+
import React__default, { useState } from 'react';
|
|
3
|
+
import Input from '../../atoms/Input/Input.js';
|
|
4
|
+
|
|
5
|
+
var __defProp = Object.defineProperty;
|
|
6
|
+
var __defProps = Object.defineProperties;
|
|
7
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
11
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
12
|
+
var __spreadValues = (a, b) => {
|
|
13
|
+
for (var prop in b || (b = {}))
|
|
14
|
+
if (__hasOwnProp.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
if (__getOwnPropSymbols)
|
|
17
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
18
|
+
if (__propIsEnum.call(b, prop))
|
|
19
|
+
__defNormalProp(a, prop, b[prop]);
|
|
20
|
+
}
|
|
21
|
+
return a;
|
|
22
|
+
};
|
|
23
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
24
|
+
var __objRest = (source, exclude) => {
|
|
25
|
+
var target = {};
|
|
26
|
+
for (var prop in source)
|
|
27
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
28
|
+
target[prop] = source[prop];
|
|
29
|
+
if (source != null && __getOwnPropSymbols)
|
|
30
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
31
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
32
|
+
target[prop] = source[prop];
|
|
33
|
+
}
|
|
34
|
+
return target;
|
|
35
|
+
};
|
|
36
|
+
const InputPassword = React__default.forwardRef(
|
|
37
|
+
(_a, ref) => {
|
|
38
|
+
var _b = _a, { rightComponent } = _b, rest = __objRest(_b, ["rightComponent"]);
|
|
39
|
+
const [revealed, setRevealed] = useState(false);
|
|
40
|
+
return /* @__PURE__ */ React__default.createElement(Input, __spreadProps(__spreadValues({}, rest), {
|
|
41
|
+
ref,
|
|
42
|
+
secureTextEntry: !revealed,
|
|
43
|
+
rightComponent: /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, /* @__PURE__ */ React__default.createElement(InputPasswordIcon, {
|
|
44
|
+
onChangeState: setRevealed,
|
|
45
|
+
revealed,
|
|
46
|
+
effect: "none"
|
|
47
|
+
}), rightComponent)
|
|
48
|
+
}));
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
InputPassword.displayName = "InputPassword";
|
|
52
|
+
|
|
53
|
+
export { InputPassword as default };
|
|
54
|
+
//# sourceMappingURL=InputPassword.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InputPassword.js","sources":["../../../../src/components/molecules/InputPassword/InputPassword.tsx"],"sourcesContent":["import { InputPasswordIcon } from '@tecsinapse/react-core';\nimport React, { useState } from 'react';\nimport { Input, InputNativeProps } from '../../atoms/Input';\nimport { TextInput } from 'react-native';\n\nexport type InputPasswordNativeProps = InputNativeProps;\n\nconst InputPassword = React.forwardRef<TextInput, InputPasswordNativeProps>(\n ({ rightComponent, ...rest }, ref) => {\n const [revealed, setRevealed] = useState(false);\n return (\n <Input\n {...rest}\n ref={ref}\n secureTextEntry={!revealed}\n rightComponent={\n <>\n <InputPasswordIcon\n onChangeState={setRevealed}\n revealed={revealed}\n effect=\"none\"\n />\n {rightComponent}\n </>\n }\n />\n );\n }\n);\n\nInputPassword.displayName = 'InputPassword';\n\nexport default InputPassword;\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,gBAAgBA,cAAM,CAAA,UAAA;AAAA,EAC1B,CAAC,IAA6B,GAAQ,KAAA;AAArC,IAAA,IAAA,EAAA,GAAA,EAAA,EAAE,EARL,cAAA,EAAA,GAQG,EAAqB,EAAA,IAAA,GAAA,SAAA,CAArB,IAAqB,CAAnB,gBAAA,CAAA,CAAA,CAAA;AACD,IAAA,MAAM,CAAC,QAAA,EAAU,WAAW,CAAA,GAAI,SAAS,KAAK,CAAA,CAAA;AAC9C,IACE,uBAAAA,cAAA,CAAA,aAAA,CAAC,wCACK,IADL,CAAA,EAAA;AAAA,MAEC,GAAA;AAAA,MACA,iBAAiB,CAAC,QAAA;AAAA,MAClB,cAAA,8FAEKA,cAAA,CAAA,aAAA,CAAA,iBAAA,EAAA;AAAA,QACC,aAAe,EAAA,WAAA;AAAA,QACf,QAAA;AAAA,QACA,MAAO,EAAA,MAAA;AAAA,OACT,GACC,cACH,CAAA;AAAA,KAEJ,CAAA,CAAA,CAAA;AAAA,GAEJ;AACF,EAAA;AAEA,aAAA,CAAc,WAAc,GAAA,eAAA;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { LabelPositionOptions } from '@tecsinapse/react-core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PressableProps } from 'react-native';
|
|
4
|
+
import { TextNativeProps } from '../../atoms/Text';
|
|
5
|
+
export interface LabelComponentProps extends PressableProps {
|
|
6
|
+
label: string;
|
|
7
|
+
labelPosition: LabelPositionOptions;
|
|
8
|
+
labelProps?: TextNativeProps;
|
|
9
|
+
active: boolean;
|
|
10
|
+
switchDisabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const _default: React.NamedExoticComponent<LabelComponentProps>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
import { Pressable } from 'react-native';
|
|
3
|
+
import { StyledLabel } from './styled.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 LabelComponent = (_a) => {
|
|
34
|
+
var _b = _a, {
|
|
35
|
+
label,
|
|
36
|
+
labelPosition,
|
|
37
|
+
labelProps,
|
|
38
|
+
active,
|
|
39
|
+
switchDisabled = false
|
|
40
|
+
} = _b, rest = __objRest(_b, [
|
|
41
|
+
"label",
|
|
42
|
+
"labelPosition",
|
|
43
|
+
"labelProps",
|
|
44
|
+
"active",
|
|
45
|
+
"switchDisabled"
|
|
46
|
+
]);
|
|
47
|
+
var _a2, _b2;
|
|
48
|
+
const defaultFontColor = active && !switchDisabled ? "dark" : "medium";
|
|
49
|
+
const defaultFontWeight = active && !switchDisabled ? "bold" : "regular";
|
|
50
|
+
return /* @__PURE__ */ React__default.createElement(Pressable, __spreadValues({}, rest), /* @__PURE__ */ React__default.createElement(StyledLabel, __spreadValues({
|
|
51
|
+
labelPosition,
|
|
52
|
+
fontColor: (_a2 = labelProps == null ? void 0 : labelProps.fontColor) != null ? _a2 : defaultFontColor,
|
|
53
|
+
fontWeight: (_b2 = labelProps == null ? void 0 : labelProps.fontWeight) != null ? _b2 : defaultFontWeight
|
|
54
|
+
}, labelProps), label));
|
|
55
|
+
};
|
|
56
|
+
var LabelComponent$1 = React__default.memo(LabelComponent);
|
|
57
|
+
|
|
58
|
+
export { LabelComponent$1 as default };
|
|
59
|
+
//# sourceMappingURL=LabelComponent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LabelComponent.js","sources":["../../../../src/components/molecules/LabeledSwitch/LabelComponent.tsx"],"sourcesContent":["import {\n FontColor,\n FontWeight,\n LabelPositionOptions,\n} from '@tecsinapse/react-core';\nimport React, { FC } from 'react';\nimport { Pressable, PressableProps } from 'react-native';\nimport { TextNativeProps } from '../../atoms/Text';\nimport { StyledLabel } from './styled';\n\nexport interface LabelComponentProps extends PressableProps {\n label: string;\n labelPosition: LabelPositionOptions;\n labelProps?: TextNativeProps;\n active: boolean;\n switchDisabled?: boolean;\n}\n\nconst LabelComponent: FC<LabelComponentProps> = ({\n label,\n labelPosition,\n labelProps,\n active,\n switchDisabled = false,\n ...rest\n}) => {\n const defaultFontColor: keyof FontColor =\n active && !switchDisabled ? 'dark' : 'medium';\n const defaultFontWeight: keyof FontWeight =\n active && !switchDisabled ? 'bold' : 'regular';\n\n return (\n <Pressable {...rest}>\n <StyledLabel\n labelPosition={labelPosition}\n fontColor={labelProps?.fontColor ?? defaultFontColor}\n fontWeight={labelProps?.fontWeight ?? defaultFontWeight}\n {...labelProps}\n >\n {label}\n </StyledLabel>\n </Pressable>\n );\n};\n\nexport default React.memo(LabelComponent);\n"],"names":["_a","_b","React"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,MAAM,cAAA,GAA0C,CAAC,EAO3C,KAAA;AAP2C,EAC/C,IAAA,EAAA,GAAA,EAAA,EAAA;AAAA,IAAA,KAAA;AAAA,IACA,aAAA;AAAA,IACA,UAAA;AAAA,IACA,MAAA;AAAA,IACA,cAAiB,GAAA,KAAA;AAAA,GAvBnB,GAkBiD,EAM5C,EAAA,IAAA,GAAA,SAAA,CAN4C,EAM5C,EAAA;AAAA,IALH,OAAA;AAAA,IACA,eAAA;AAAA,IACA,YAAA;AAAA,IACA,QAAA;AAAA,IACA,gBAAA;AAAA,GAAA,CAAA,CAAA;AAvBF,EAAA,IAAAA,GAAAC,EAAAA,GAAAA,CAAAA;AA0BE,EAAA,MAAM,gBACJ,GAAA,MAAA,IAAU,CAAC,cAAA,GAAiB,MAAS,GAAA,QAAA,CAAA;AACvC,EAAA,MAAM,iBACJ,GAAA,MAAA,IAAU,CAAC,cAAA,GAAiB,MAAS,GAAA,SAAA,CAAA;AAEvC,EACE,uBAAAC,cAAA,CAAA,aAAA,CAAC,SAAc,EAAA,cAAA,CAAA,EAAA,EAAA,IAAA,CAAA,kBACZA,cAAA,CAAA,aAAA,CAAA,WAAA,EAAA,cAAA,CAAA;AAAA,IACC,aAAA;AAAA,IACA,SAAWF,EAAAA,CAAAA,GAAAA,GAAA,UAAY,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAA,SAAA,KAAZ,OAAAA,GAAyB,GAAA,gBAAA;AAAA,IACpC,UAAYC,EAAAA,CAAAA,GAAAA,GAAA,UAAY,IAAA,IAAA,GAAA,KAAA,CAAA,GAAA,UAAA,CAAA,UAAA,KAAZ,OAAAA,GAA0B,GAAA,iBAAA;AAAA,GAClC,EAAA,UAAA,CAAA,EAEH,KACH,CACF,CAAA,CAAA;AAEJ,CAAA,CAAA;AAEA,uBAAeC,cAAA,CAAM,KAAK,cAAc,CAAA;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { LabeledSwitchProps } from '@tecsinapse/react-core';
|
|
2
|
+
import { FC } from 'react';
|
|
3
|
+
import { TextNativeProps } from '../../atoms/Text';
|
|
4
|
+
export declare type LabeledSwitchNativeProps = LabeledSwitchProps & {
|
|
5
|
+
labelProps?: TextNativeProps;
|
|
6
|
+
};
|
|
7
|
+
declare const LabeledSwitch: FC<LabeledSwitchNativeProps>;
|
|
8
|
+
export default LabeledSwitch;
|