@ray-js/components 0.5.3 → 0.5.5
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/lib/Button/Button.native.js +229 -0
- package/lib/Button/Button.wechat.js +2 -2
- package/lib/Checkbox/Checkbox.native.js +118 -0
- package/lib/Checkbox/Checkbox.wechat.js +2 -2
- package/lib/CheckboxGroup/CheckboxGroup.native.js +99 -0
- package/lib/CheckboxGroup/CheckboxGroup.wechat.js +2 -2
- package/lib/ClickableSimplified/index.native.js +166 -0
- package/lib/CoverView/CoverView.js +7 -1
- package/lib/DatePicker/DatePicker.native.js +449 -0
- package/lib/DatePicker/DatePicker.wechat.js +2 -2
- package/lib/Form/Form.native.js +8 -0
- package/lib/Form/Form.wechat.js +2 -2
- package/lib/Icon/Icon.native.js +48 -0
- package/lib/Image/Image.native.js +219 -0
- package/lib/Image/Image.wechat.js +2 -2
- package/lib/Input/Input.native.js +212 -0
- package/lib/Input/Input.wechat.js +2 -2
- package/lib/IpcPlayer/IpcPlayer.js +7 -1
- package/lib/Label/Label.native.js +29 -0
- package/lib/Label/Label.wechat.js +2 -2
- package/lib/LinearGradient/LinearGradient.native.js +60 -0
- package/lib/Modal/Modal.native.js +98 -0
- package/lib/Motion/Fade/index.native.js +3 -0
- package/lib/Motion/PullUp/index.native.js +3 -0
- package/lib/Motion/PushDown/index.native.js +3 -0
- package/lib/Motion/ScaleFadeIn/index.native.js +3 -0
- package/lib/Motion/ScalePullDown/index.native.js +3 -0
- package/lib/PageContainer/PageContainer.js +90 -1
- package/lib/PageContainer/PageContainer.wechat.js +2 -2
- package/lib/Picker/Picker.native.js +181 -0
- package/lib/Picker/Picker.wechat.js +2 -2
- package/lib/PickerView/PickerView.native.js +175 -0
- package/lib/PickerView/PickerView.wechat.js +4 -5
- package/lib/PickerViewColumn/PickerViewColumn.native.js +175 -0
- package/lib/RadialGradient/RadialGradient.native.js +52 -0
- package/lib/Radio/Radio.native.js +132 -0
- package/lib/Radio/Radio.wechat.js +2 -2
- package/lib/RadioGroup/RadioGroup.native.js +99 -0
- package/lib/RadioGroup/RadioGroup.wechat.js +2 -2
- package/lib/ScrollView/ScrollView.native.js +283 -0
- package/lib/ScrollView/ScrollView.wechat.js +2 -2
- package/lib/Slider/Slider.native.js +114 -0
- package/lib/Slider/Slider.wechat.js +2 -2
- package/lib/Swiper/Swiper.native.js +68 -0
- package/lib/Swiper/Swiper.wechat.js +3 -4
- package/lib/SwiperItem/SwiperItem.js +14 -1
- package/lib/Switch/Switch.native.js +128 -0
- package/lib/Switch/Switch.wechat.js +2 -2
- package/lib/Text/Text.native.js +37 -0
- package/lib/Text/Text.wechat.js +2 -2
- package/lib/Textarea/Textarea.native.js +26 -0
- package/lib/Textarea/Textarea.wechat.js +2 -2
- package/lib/TimePicker/TimePicker.native.js +319 -0
- package/lib/TimePicker/TimePicker.wechat.js +2 -2
- package/lib/View/View.native.js +35 -0
- package/lib/View/View.wechat.js +3 -3
- package/package.json +7 -7
- package/lib/Button/Button.android.js +0 -1
- package/lib/Button/Button.ios.js +0 -1
- package/lib/Button/Button.web.js +0 -15
- package/lib/Button/index.android.js +0 -1
- package/lib/Button/index.ios.js +0 -1
- package/lib/Button/index.tuya.js +0 -3
- package/lib/Button/index.web.js +0 -3
- package/lib/Button/index.wechat.js +0 -3
- package/lib/Button/props.android.js +0 -1
- package/lib/Button/props.ios.js +0 -1
- package/lib/Button/props.tuya.js +0 -10
- package/lib/Button/props.web.js +0 -10
- package/lib/Button/props.wechat.js +0 -10
- package/lib/Checkbox/Checkbox.android.js +0 -1
- package/lib/Checkbox/Checkbox.ios.js +0 -1
- package/lib/Checkbox/Checkbox.web.js +0 -10
- package/lib/Checkbox/index.android.js +0 -1
- package/lib/Checkbox/index.ios.js +0 -1
- package/lib/Checkbox/index.tuya.js +0 -3
- package/lib/Checkbox/index.web.js +0 -3
- package/lib/Checkbox/index.wechat.js +0 -3
- package/lib/Checkbox/props.android.js +0 -1
- package/lib/Checkbox/props.ios.js +0 -1
- package/lib/Checkbox/props.tuya.js +0 -1
- package/lib/Checkbox/props.web.js +0 -1
- package/lib/Checkbox/props.wechat.js +0 -1
- package/lib/CheckboxGroup/CheckboxGroup.android.js +0 -1
- package/lib/CheckboxGroup/CheckboxGroup.ios.js +0 -1
- package/lib/CheckboxGroup/CheckboxGroup.web.js +0 -52
- package/lib/CheckboxGroup/index.android.js +0 -1
- package/lib/CheckboxGroup/index.ios.js +0 -1
- package/lib/CheckboxGroup/index.tuya.js +0 -3
- package/lib/CheckboxGroup/index.web.js +0 -3
- package/lib/CheckboxGroup/index.wechat.js +0 -3
- package/lib/CheckboxGroup/props.android.js +0 -1
- package/lib/CheckboxGroup/props.ios.js +0 -1
- package/lib/CheckboxGroup/props.tuya.js +0 -1
- package/lib/CheckboxGroup/props.web.js +0 -1
- package/lib/CheckboxGroup/props.wechat.js +0 -1
- package/lib/ClickableSimplified/index.android.js +0 -1
- package/lib/ClickableSimplified/index.ios.js +0 -1
- package/lib/CoverView/CoverView.android.js +0 -1
- package/lib/CoverView/CoverView.ios.js +0 -1
- package/lib/CoverView/CoverView.web.js +0 -7
- package/lib/CoverView/index.android.js +0 -1
- package/lib/CoverView/index.ios.js +0 -1
- package/lib/CoverView/index.tuya.js +0 -2
- package/lib/CoverView/index.web.js +0 -2
- package/lib/CoverView/index.wechat.js +0 -2
- package/lib/CoverView/props.android.js +0 -1
- package/lib/CoverView/props.ios.js +0 -1
- package/lib/CoverView/props.tuya.js +0 -1
- package/lib/CoverView/props.web.js +0 -1
- package/lib/CoverView/props.wechat.js +0 -1
- package/lib/DatePicker/DatePicker.android.js +0 -1
- package/lib/DatePicker/DatePicker.ios.js +0 -1
- package/lib/DatePicker/DatePicker.web.js +0 -61
- package/lib/DatePicker/index.android.js +0 -1
- package/lib/DatePicker/index.ios.js +0 -1
- package/lib/DatePicker/index.tuya.js +0 -3
- package/lib/DatePicker/index.web.js +0 -3
- package/lib/DatePicker/index.wechat.js +0 -3
- package/lib/DatePicker/props.android.js +0 -1
- package/lib/DatePicker/props.ios.js +0 -1
- package/lib/DatePicker/props.tuya.js +0 -7
- package/lib/DatePicker/props.web.js +0 -7
- package/lib/DatePicker/props.wechat.js +0 -7
- package/lib/Form/Form.android.js +0 -1
- package/lib/Form/Form.ios.js +0 -1
- package/lib/Form/Form.web.js +0 -37
- package/lib/Form/index.android.js +0 -1
- package/lib/Form/index.ios.js +0 -1
- package/lib/Form/index.tuya.js +0 -3
- package/lib/Form/index.web.js +0 -3
- package/lib/Form/index.wechat.js +0 -3
- package/lib/Form/props.android.js +0 -1
- package/lib/Form/props.ios.js +0 -1
- package/lib/Form/props.tuya.js +0 -1
- package/lib/Form/props.web.js +0 -1
- package/lib/Form/props.wechat.js +0 -1
- package/lib/Icon/Icon.android.js +0 -1
- package/lib/Icon/Icon.ios.js +0 -1
- package/lib/Icon/Icon.web.js +0 -23
- package/lib/Icon/iconfont/iconfont.android.js +0 -1
- package/lib/Icon/iconfont/iconfont.ios.js +0 -1
- package/lib/Icon/iconfont/iconfont.tuya.js +0 -47
- package/lib/Icon/iconfont/iconfont.web.js +0 -47
- package/lib/Icon/iconfont/iconfont.wechat.js +0 -47
- package/lib/Icon/index.android.js +0 -1
- package/lib/Icon/index.ios.js +0 -1
- package/lib/Icon/index.tuya.js +0 -3
- package/lib/Icon/index.web.js +0 -3
- package/lib/Icon/index.wechat.js +0 -3
- package/lib/Icon/props.android.js +0 -1
- package/lib/Icon/props.ios.js +0 -1
- package/lib/Icon/props.tuya.js +0 -5
- package/lib/Icon/props.web.js +0 -5
- package/lib/Icon/props.wechat.js +0 -5
- package/lib/Image/Image.android.js +0 -1
- package/lib/Image/Image.ios.js +0 -1
- package/lib/Image/Image.web.js +0 -39
- package/lib/Image/index.android.js +0 -1
- package/lib/Image/index.ios.js +0 -1
- package/lib/Image/index.tuya.js +0 -3
- package/lib/Image/index.web.js +0 -3
- package/lib/Image/index.wechat.js +0 -3
- package/lib/Image/props.android.js +0 -1
- package/lib/Image/props.ios.js +0 -1
- package/lib/Image/props.tuya.js +0 -4
- package/lib/Image/props.web.js +0 -4
- package/lib/Image/props.wechat.js +0 -4
- package/lib/Input/Input.android.js +0 -1
- package/lib/Input/Input.ios.js +0 -1
- package/lib/Input/Input.web.js +0 -76
- package/lib/Input/index.android.js +0 -1
- package/lib/Input/index.ios.js +0 -1
- package/lib/Input/index.tuya.js +0 -3
- package/lib/Input/index.web.js +0 -3
- package/lib/Input/index.wechat.js +0 -3
- package/lib/Input/props.android.js +0 -1
- package/lib/Input/props.ios.js +0 -1
- package/lib/Input/props.tuya.js +0 -7
- package/lib/Input/props.web.js +0 -7
- package/lib/Input/props.wechat.js +0 -7
- package/lib/IpcPlayer/IpcPlayer.android.js +0 -1
- package/lib/IpcPlayer/IpcPlayer.ios.js +0 -1
- package/lib/IpcPlayer/IpcPlayer.web.js +0 -7
- package/lib/IpcPlayer/index.android.js +0 -1
- package/lib/IpcPlayer/index.ios.js +0 -1
- package/lib/IpcPlayer/index.tuya.js +0 -3
- package/lib/IpcPlayer/index.web.js +0 -3
- package/lib/IpcPlayer/index.wechat.js +0 -3
- package/lib/IpcPlayer/props.android.js +0 -1
- package/lib/IpcPlayer/props.ios.js +0 -1
- package/lib/IpcPlayer/props.tuya.js +0 -20
- package/lib/IpcPlayer/props.web.js +0 -20
- package/lib/IpcPlayer/props.wechat.js +0 -20
- package/lib/Label/Label.android.js +0 -1
- package/lib/Label/Label.ios.js +0 -1
- package/lib/Label/Label.web.js +0 -17
- package/lib/Label/index.android.js +0 -1
- package/lib/Label/index.ios.js +0 -1
- package/lib/Label/index.tuya.js +0 -3
- package/lib/Label/index.web.js +0 -3
- package/lib/Label/index.wechat.js +0 -3
- package/lib/Label/props.android.js +0 -1
- package/lib/Label/props.ios.js +0 -1
- package/lib/Label/props.tuya.js +0 -1
- package/lib/Label/props.web.js +0 -1
- package/lib/Label/props.wechat.js +0 -1
- package/lib/LinearGradient/LinearGradient.android.js +0 -1
- package/lib/LinearGradient/LinearGradient.ios.js +0 -1
- package/lib/LinearGradient/LinearGradient.web.js +0 -8
- package/lib/LinearGradient/index.android.js +0 -1
- package/lib/LinearGradient/index.ios.js +0 -1
- package/lib/LinearGradient/index.tuya.js +0 -3
- package/lib/LinearGradient/index.web.js +0 -3
- package/lib/LinearGradient/index.wechat.js +0 -3
- package/lib/LinearGradient/props.android.js +0 -1
- package/lib/LinearGradient/props.ios.js +0 -1
- package/lib/LinearGradient/props.tuya.js +0 -11
- package/lib/LinearGradient/props.web.js +0 -11
- package/lib/LinearGradient/props.wechat.js +0 -11
- package/lib/Modal/Modal.android.js +0 -1
- package/lib/Modal/Modal.ios.js +0 -1
- package/lib/Modal/Modal.web.js +0 -10
- package/lib/Modal/index.android.js +0 -1
- package/lib/Modal/index.ios.js +0 -1
- package/lib/Modal/index.tuya.js +0 -3
- package/lib/Modal/index.web.js +0 -3
- package/lib/Modal/index.wechat.js +0 -3
- package/lib/Modal/props.android.js +0 -1
- package/lib/Modal/props.ios.js +0 -1
- package/lib/Modal/props.tuya.js +0 -1
- package/lib/Modal/props.web.js +0 -1
- package/lib/Modal/props.wechat.js +0 -1
- package/lib/Motion/Fade/index.android.js +0 -1
- package/lib/Motion/Fade/index.ios.js +0 -1
- package/lib/Motion/Fade/index.web.js +0 -28
- package/lib/Motion/PullUp/index.android.js +0 -1
- package/lib/Motion/PullUp/index.ios.js +0 -1
- package/lib/Motion/PullUp/index.web.js +0 -28
- package/lib/Motion/PushDown/index.android.js +0 -1
- package/lib/Motion/PushDown/index.ios.js +0 -1
- package/lib/Motion/PushDown/index.web.js +0 -28
- package/lib/Motion/ScaleFadeIn/index.android.js +0 -1
- package/lib/Motion/ScaleFadeIn/index.ios.js +0 -1
- package/lib/Motion/ScaleFadeIn/index.web.js +0 -28
- package/lib/Motion/ScalePullDown/index.android.js +0 -1
- package/lib/Motion/ScalePullDown/index.ios.js +0 -1
- package/lib/Motion/ScalePullDown/index.web.js +0 -28
- package/lib/Motion/index.android.js +0 -1
- package/lib/Motion/index.ios.js +0 -1
- package/lib/Motion/index.tuya.js +0 -14
- package/lib/Motion/index.web.js +0 -14
- package/lib/Motion/index.wechat.js +0 -14
- package/lib/Motion/props.android.js +0 -1
- package/lib/Motion/props.ios.js +0 -1
- package/lib/Motion/props.tuya.js +0 -62
- package/lib/Motion/props.web.js +0 -62
- package/lib/Motion/props.wechat.js +0 -62
- package/lib/MovableArea/MovableArea.android.js +0 -1
- package/lib/MovableArea/MovableArea.ios.js +0 -1
- package/lib/MovableArea/MovableArea.tuya.js +0 -11
- package/lib/MovableArea/MovableArea.wechat.js +0 -11
- package/lib/MovableArea/index.android.js +0 -1
- package/lib/MovableArea/index.ios.js +0 -1
- package/lib/MovableArea/index.tuya.js +0 -3
- package/lib/MovableArea/index.web.js +0 -3
- package/lib/MovableArea/index.wechat.js +0 -3
- package/lib/MovableArea/props.android.js +0 -1
- package/lib/MovableArea/props.ios.js +0 -1
- package/lib/MovableArea/props.tuya.js +0 -3
- package/lib/MovableArea/props.web.js +0 -3
- package/lib/MovableArea/props.wechat.js +0 -3
- package/lib/MovableView/MovableView.android.js +0 -1
- package/lib/MovableView/MovableView.ios.js +0 -1
- package/lib/MovableView/MovableView.tuya.js +0 -11
- package/lib/MovableView/MovableView.wechat.js +0 -11
- package/lib/MovableView/index.android.js +0 -1
- package/lib/MovableView/index.ios.js +0 -1
- package/lib/MovableView/index.tuya.js +0 -3
- package/lib/MovableView/index.web.js +0 -3
- package/lib/MovableView/index.wechat.js +0 -3
- package/lib/MovableView/props.android.js +0 -1
- package/lib/MovableView/props.ios.js +0 -1
- package/lib/MovableView/props.tuya.js +0 -15
- package/lib/MovableView/props.web.js +0 -15
- package/lib/MovableView/props.wechat.js +0 -15
- package/lib/PageContainer/PageContainer.android.js +0 -1
- package/lib/PageContainer/PageContainer.ios.js +0 -1
- package/lib/PageContainer/PageContainer.web.js +0 -90
- package/lib/PageContainer/index.android.js +0 -1
- package/lib/PageContainer/index.ios.js +0 -1
- package/lib/PageContainer/index.tuya.js +0 -3
- package/lib/PageContainer/index.web.js +0 -3
- package/lib/PageContainer/index.wechat.js +0 -3
- package/lib/PageContainer/props.android.js +0 -1
- package/lib/PageContainer/props.ios.js +0 -1
- package/lib/PageContainer/props.tuya.js +0 -9
- package/lib/PageContainer/props.web.js +0 -9
- package/lib/PageContainer/props.wechat.js +0 -9
- package/lib/Picker/Picker.android.js +0 -1
- package/lib/Picker/Picker.ios.js +0 -1
- package/lib/Picker/Picker.web.js +0 -74
- package/lib/Picker/index.android.js +0 -1
- package/lib/Picker/index.ios.js +0 -1
- package/lib/Picker/index.tuya.js +0 -3
- package/lib/Picker/index.web.js +0 -3
- package/lib/Picker/index.wechat.js +0 -3
- package/lib/Picker/props.android.js +0 -1
- package/lib/Picker/props.ios.js +0 -1
- package/lib/Picker/props.tuya.js +0 -4
- package/lib/Picker/props.web.js +0 -4
- package/lib/Picker/props.wechat.js +0 -4
- package/lib/PickerView/PickerView.android.js +0 -1
- package/lib/PickerView/PickerView.ios.js +0 -1
- package/lib/PickerView/PickerView.web.js +0 -76
- package/lib/PickerView/index.android.js +0 -1
- package/lib/PickerView/index.ios.js +0 -1
- package/lib/PickerView/index.tuya.js +0 -3
- package/lib/PickerView/index.web.js +0 -3
- package/lib/PickerView/index.wechat.js +0 -3
- package/lib/PickerView/props.android.js +0 -1
- package/lib/PickerView/props.ios.js +0 -1
- package/lib/PickerView/props.tuya.js +0 -1
- package/lib/PickerView/props.web.js +0 -1
- package/lib/PickerView/props.wechat.js +0 -1
- package/lib/PickerViewColumn/PickerViewColumn.android.js +0 -1
- package/lib/PickerViewColumn/PickerViewColumn.ios.js +0 -1
- package/lib/PickerViewColumn/PickerViewColumn.web.js +0 -14
- package/lib/PickerViewColumn/index.android.js +0 -1
- package/lib/PickerViewColumn/index.ios.js +0 -1
- package/lib/PickerViewColumn/index.tuya.js +0 -3
- package/lib/PickerViewColumn/index.web.js +0 -3
- package/lib/PickerViewColumn/index.wechat.js +0 -3
- package/lib/PickerViewColumn/props.android.js +0 -1
- package/lib/PickerViewColumn/props.ios.js +0 -1
- package/lib/PickerViewColumn/props.tuya.js +0 -1
- package/lib/PickerViewColumn/props.web.js +0 -1
- package/lib/PickerViewColumn/props.wechat.js +0 -1
- package/lib/RadialGradient/RadialGradient.android.js +0 -1
- package/lib/RadialGradient/RadialGradient.ios.js +0 -1
- package/lib/RadialGradient/RadialGradient.web.js +0 -8
- package/lib/RadialGradient/index.android.js +0 -1
- package/lib/RadialGradient/index.ios.js +0 -1
- package/lib/RadialGradient/index.tuya.js +0 -3
- package/lib/RadialGradient/index.web.js +0 -3
- package/lib/RadialGradient/index.wechat.js +0 -3
- package/lib/RadialGradient/props.android.js +0 -1
- package/lib/RadialGradient/props.ios.js +0 -1
- package/lib/RadialGradient/props.tuya.js +0 -16
- package/lib/RadialGradient/props.web.js +0 -16
- package/lib/RadialGradient/props.wechat.js +0 -16
- package/lib/Radio/Radio.android.js +0 -1
- package/lib/Radio/Radio.ios.js +0 -1
- package/lib/Radio/Radio.web.js +0 -10
- package/lib/Radio/index.android.js +0 -1
- package/lib/Radio/index.ios.js +0 -1
- package/lib/Radio/index.tuya.js +0 -3
- package/lib/Radio/index.web.js +0 -3
- package/lib/Radio/index.wechat.js +0 -3
- package/lib/Radio/props.android.js +0 -1
- package/lib/Radio/props.ios.js +0 -1
- package/lib/Radio/props.tuya.js +0 -1
- package/lib/Radio/props.web.js +0 -1
- package/lib/Radio/props.wechat.js +0 -1
- package/lib/RadioGroup/RadioGroup.android.js +0 -1
- package/lib/RadioGroup/RadioGroup.ios.js +0 -1
- package/lib/RadioGroup/RadioGroup.web.js +0 -57
- package/lib/RadioGroup/index.android.js +0 -1
- package/lib/RadioGroup/index.ios.js +0 -1
- package/lib/RadioGroup/index.tuya.js +0 -3
- package/lib/RadioGroup/index.web.js +0 -3
- package/lib/RadioGroup/index.wechat.js +0 -3
- package/lib/RadioGroup/props.android.js +0 -1
- package/lib/RadioGroup/props.ios.js +0 -1
- package/lib/RadioGroup/props.tuya.js +0 -1
- package/lib/RadioGroup/props.web.js +0 -1
- package/lib/RadioGroup/props.wechat.js +0 -1
- package/lib/RichText/RichText.android.js +0 -1
- package/lib/RichText/RichText.ios.js +0 -1
- package/lib/RichText/RichText.tuya.js +0 -9
- package/lib/RichText/RichText.wechat.js +0 -9
- package/lib/RichText/index.android.js +0 -1
- package/lib/RichText/index.ios.js +0 -1
- package/lib/RichText/index.tuya.js +0 -3
- package/lib/RichText/index.web.js +0 -3
- package/lib/RichText/index.wechat.js +0 -3
- package/lib/RichText/props.android.js +0 -0
- package/lib/RichText/props.ios.js +0 -0
- package/lib/RichText/props.tuya.js +0 -1
- package/lib/RichText/props.web.js +0 -1
- package/lib/RichText/props.wechat.js +0 -1
- package/lib/ScrollView/ScrollView.android.js +0 -1
- package/lib/ScrollView/ScrollView.ios.js +0 -1
- package/lib/ScrollView/ScrollView.web.js +0 -54
- package/lib/ScrollView/index.android.js +0 -1
- package/lib/ScrollView/index.ios.js +0 -1
- package/lib/ScrollView/index.tuya.js +0 -3
- package/lib/ScrollView/index.web.js +0 -3
- package/lib/ScrollView/index.wechat.js +0 -3
- package/lib/ScrollView/props.android.js +0 -1
- package/lib/ScrollView/props.ios.js +0 -1
- package/lib/ScrollView/props.tuya.js +0 -5
- package/lib/ScrollView/props.web.js +0 -5
- package/lib/ScrollView/props.wechat.js +0 -5
- package/lib/Slider/Slider.android.js +0 -1
- package/lib/Slider/Slider.ios.js +0 -1
- package/lib/Slider/Slider.web.js +0 -39
- package/lib/Slider/index.android.js +0 -1
- package/lib/Slider/index.ios.js +0 -1
- package/lib/Slider/index.tuya.js +0 -3
- package/lib/Slider/index.web.js +0 -3
- package/lib/Slider/index.wechat.js +0 -3
- package/lib/Slider/props.android.js +0 -1
- package/lib/Slider/props.ios.js +0 -1
- package/lib/Slider/props.tuya.js +0 -11
- package/lib/Slider/props.web.js +0 -11
- package/lib/Slider/props.wechat.js +0 -11
- package/lib/Swiper/Swiper.android.js +0 -1
- package/lib/Swiper/Swiper.ios.js +0 -1
- package/lib/Swiper/Swiper.web.js +0 -74
- package/lib/Swiper/index.android.js +0 -1
- package/lib/Swiper/index.ios.js +0 -1
- package/lib/Swiper/index.tuya.js +0 -3
- package/lib/Swiper/index.web.js +0 -3
- package/lib/Swiper/index.wechat.js +0 -3
- package/lib/Swiper/props.android.js +0 -1
- package/lib/Swiper/props.ios.js +0 -1
- package/lib/Swiper/props.tuya.js +0 -16
- package/lib/Swiper/props.web.js +0 -16
- package/lib/Swiper/props.wechat.js +0 -16
- package/lib/SwiperItem/SwiperItem.android.js +0 -1
- package/lib/SwiperItem/SwiperItem.ios.js +0 -1
- package/lib/SwiperItem/SwiperItem.web.js +0 -14
- package/lib/SwiperItem/index.android.js +0 -1
- package/lib/SwiperItem/index.ios.js +0 -1
- package/lib/SwiperItem/index.tuya.js +0 -3
- package/lib/SwiperItem/index.web.js +0 -3
- package/lib/SwiperItem/index.wechat.js +0 -3
- package/lib/SwiperItem/props.android.js +0 -1
- package/lib/SwiperItem/props.ios.js +0 -1
- package/lib/SwiperItem/props.tuya.js +0 -1
- package/lib/SwiperItem/props.web.js +0 -1
- package/lib/SwiperItem/props.wechat.js +0 -1
- package/lib/Switch/Switch.android.js +0 -1
- package/lib/Switch/Switch.ios.js +0 -1
- package/lib/Switch/Switch.web.js +0 -27
- package/lib/Switch/index.android.js +0 -1
- package/lib/Switch/index.ios.js +0 -1
- package/lib/Switch/index.tuya.js +0 -3
- package/lib/Switch/index.web.js +0 -3
- package/lib/Switch/index.wechat.js +0 -3
- package/lib/Switch/props.android.js +0 -1
- package/lib/Switch/props.ios.js +0 -1
- package/lib/Switch/props.tuya.js +0 -5
- package/lib/Switch/props.web.js +0 -5
- package/lib/Switch/props.wechat.js +0 -5
- package/lib/Text/Text.android.js +0 -1
- package/lib/Text/Text.ios.js +0 -1
- package/lib/Text/Text.web.js +0 -13
- package/lib/Text/index.android.js +0 -1
- package/lib/Text/index.ios.js +0 -1
- package/lib/Text/index.tuya.js +0 -3
- package/lib/Text/index.web.js +0 -3
- package/lib/Text/index.wechat.js +0 -3
- package/lib/Text/props.android.js +0 -1
- package/lib/Text/props.ios.js +0 -1
- package/lib/Text/props.tuya.js +0 -1
- package/lib/Text/props.web.js +0 -1
- package/lib/Text/props.wechat.js +0 -1
- package/lib/Textarea/Textarea.android.js +0 -1
- package/lib/Textarea/Textarea.ios.js +0 -1
- package/lib/Textarea/Textarea.web.js +0 -66
- package/lib/Textarea/index.android.js +0 -1
- package/lib/Textarea/index.ios.js +0 -1
- package/lib/Textarea/index.tuya.js +0 -3
- package/lib/Textarea/index.web.js +0 -3
- package/lib/Textarea/index.wechat.js +0 -3
- package/lib/Textarea/props.android.js +0 -1
- package/lib/Textarea/props.ios.js +0 -1
- package/lib/Textarea/props.tuya.js +0 -1
- package/lib/Textarea/props.web.js +0 -1
- package/lib/Textarea/props.wechat.js +0 -1
- package/lib/TimePicker/TimePicker.android.js +0 -1
- package/lib/TimePicker/TimePicker.ios.js +0 -1
- package/lib/TimePicker/TimePicker.web.js +0 -41
- package/lib/TimePicker/index.android.js +0 -1
- package/lib/TimePicker/index.ios.js +0 -1
- package/lib/TimePicker/index.tuya.js +0 -3
- package/lib/TimePicker/index.web.js +0 -3
- package/lib/TimePicker/index.wechat.js +0 -3
- package/lib/TimePicker/props.android.js +0 -1
- package/lib/TimePicker/props.ios.js +0 -1
- package/lib/TimePicker/props.tuya.js +0 -6
- package/lib/TimePicker/props.web.js +0 -6
- package/lib/TimePicker/props.wechat.js +0 -6
- package/lib/View/View.android.js +0 -1
- package/lib/View/View.ios.js +0 -1
- package/lib/View/View.web.js +0 -71
- package/lib/View/index.android.js +0 -1
- package/lib/View/index.ios.js +0 -1
- package/lib/View/index.tuya.js +0 -3
- package/lib/View/index.web.js +0 -3
- package/lib/View/index.wechat.js +0 -3
- package/lib/View/props.android.js +0 -1
- package/lib/View/props.ios.js +0 -1
- package/lib/View/props.tuya.js +0 -4
- package/lib/View/props.web.js +0 -4
- package/lib/View/props.wechat.js +0 -4
- package/lib/assets/icons.android.js +0 -1
- package/lib/assets/icons.ios.js +0 -1
- package/lib/assets/icons.tuya.js +0 -7
- package/lib/assets/icons.web.js +0 -7
- package/lib/assets/icons.wechat.js +0 -7
- package/lib/core/index.android.js +0 -1
- package/lib/core/index.ios.js +0 -1
- package/lib/core/index.tuya.js +0 -25
- package/lib/core/index.web.js +0 -25
- package/lib/core/index.wechat.js +0 -25
- package/lib/index.android.js +0 -1
- package/lib/index.ios.js +0 -1
- package/lib/index.tuya.js +0 -33
- package/lib/index.web.js +0 -33
- package/lib/index.wechat.js +0 -33
- package/lib/types/event.android.js +0 -0
- package/lib/types/event.ios.js +0 -0
- package/lib/types/event.tuya.js +0 -1
- package/lib/types/event.web.js +0 -1
- package/lib/types/event.wechat.js +0 -1
- package/lib/types/index.android.js +0 -1
- package/lib/types/index.ios.js +0 -1
- package/lib/types/index.tuya.js +0 -9
- package/lib/types/index.web.js +0 -9
- package/lib/types/index.wechat.js +0 -9
- package/lib/utils/handleProps.android.js +0 -1
- package/lib/utils/handleProps.ios.js +0 -1
- package/lib/utils/handleProps.tuya.js +0 -78
- package/lib/utils/handleProps.web.js +0 -78
- package/lib/utils/handleProps.wechat.js +0 -78
- package/lib/utils/index.android.js +0 -1
- package/lib/utils/index.ios.js +0 -1
- package/lib/utils/index.tuya.js +0 -90
- package/lib/utils/index.web.js +0 -90
- package/lib/utils/index.wechat.js +0 -90
- package/lib/utils/interface.android.js +0 -1
- package/lib/utils/interface.ios.js +0 -1
- package/lib/utils/interface.tuya.js +0 -1
- package/lib/utils/interface.web.js +0 -1
- package/lib/utils/interface.wechat.js +0 -1
@@ -0,0 +1,229 @@
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
4
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
6
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
8
|
+
import "core-js/modules/es.array.concat.js";
|
9
|
+
import "core-js/modules/es.array.map.js";
|
10
|
+
import "core-js/modules/es.array.index-of.js";
|
11
|
+
import React from 'react';
|
12
|
+
import { Animated, Image, Easing, StyleSheet, View, Text, TouchableWithoutFeedback } from 'react-native';
|
13
|
+
import { iconList } from '../assets/icons';
|
14
|
+
import { defaultButtonProps } from './props';
|
15
|
+
import { extracteTextStyle } from '../utils';
|
16
|
+
|
17
|
+
var Loading = function (props) {
|
18
|
+
var rotate = React.useRef(new Animated.Value(0)).current;
|
19
|
+
var tintColor = props.tintColor;
|
20
|
+
React.useEffect(function () {
|
21
|
+
var animation = Animated.loop(Animated.timing(rotate, {
|
22
|
+
toValue: 1,
|
23
|
+
duration: 1000,
|
24
|
+
easing: Easing.linear,
|
25
|
+
useNativeDriver: true,
|
26
|
+
isInteraction: false
|
27
|
+
}));
|
28
|
+
animation.start();
|
29
|
+
return function () {
|
30
|
+
animation.stop();
|
31
|
+
};
|
32
|
+
}, []);
|
33
|
+
var rotateDeg = rotate.interpolate({
|
34
|
+
inputRange: [0, 1],
|
35
|
+
outputRange: ['0deg', '360deg']
|
36
|
+
});
|
37
|
+
return /*#__PURE__*/React.createElement(Animated.View, {
|
38
|
+
style: [styles.loading, {
|
39
|
+
transform: [{
|
40
|
+
rotate: rotateDeg
|
41
|
+
}]
|
42
|
+
}]
|
43
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
44
|
+
source: iconList.loading,
|
45
|
+
style: [styles.loadingImg, {
|
46
|
+
tintColor: tintColor
|
47
|
+
}]
|
48
|
+
}));
|
49
|
+
};
|
50
|
+
|
51
|
+
var Button = /*#__PURE__*/function (_React$Component) {
|
52
|
+
_inherits(Button, _React$Component);
|
53
|
+
|
54
|
+
var _super = _createSuper(Button);
|
55
|
+
|
56
|
+
function Button() {
|
57
|
+
var _this;
|
58
|
+
|
59
|
+
_classCallCheck(this, Button);
|
60
|
+
|
61
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
62
|
+
args[_key] = arguments[_key];
|
63
|
+
}
|
64
|
+
|
65
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
66
|
+
|
67
|
+
_defineProperty(_assertThisInitialized(_this), "$touchable", /*#__PURE__*/React.createRef());
|
68
|
+
|
69
|
+
_defineProperty(_assertThisInitialized(_this), "isTouchEnd", false);
|
70
|
+
|
71
|
+
_defineProperty(_assertThisInitialized(_this), "pressInTimer", null);
|
72
|
+
|
73
|
+
_defineProperty(_assertThisInitialized(_this), "pressOutTimer", null);
|
74
|
+
|
75
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
76
|
+
isHover: false
|
77
|
+
});
|
78
|
+
|
79
|
+
_defineProperty(_assertThisInitialized(_this), "onPress", function () {
|
80
|
+
var _this$props = _this.props,
|
81
|
+
disabled = _this$props.disabled,
|
82
|
+
onClick = _this$props.onClick;
|
83
|
+
!disabled && typeof onClick === 'function' && onClick({
|
84
|
+
type: 'click'
|
85
|
+
});
|
86
|
+
});
|
87
|
+
|
88
|
+
_defineProperty(_assertThisInitialized(_this), "onPressIn", function () {
|
89
|
+
var _this$props2 = _this.props,
|
90
|
+
hoverStartTime = _this$props2.hoverStartTime,
|
91
|
+
hoverStyle = _this$props2.hoverStyle;
|
92
|
+
_this.isTouchEnd = false;
|
93
|
+
|
94
|
+
if (hoverStyle) {
|
95
|
+
_this.pressInTimer = setTimeout(function () {
|
96
|
+
_this.setState({
|
97
|
+
isHover: true
|
98
|
+
}, function () {
|
99
|
+
if (_this.isTouchEnd) {
|
100
|
+
_this.stopHover();
|
101
|
+
}
|
102
|
+
});
|
103
|
+
|
104
|
+
clearTimeout(_this.pressInTimer);
|
105
|
+
}, hoverStartTime);
|
106
|
+
}
|
107
|
+
});
|
108
|
+
|
109
|
+
_defineProperty(_assertThisInitialized(_this), "stopHover", function () {
|
110
|
+
var hoverStayTime = _this.props.hoverStayTime;
|
111
|
+
_this.pressOutTimer = setTimeout(function () {
|
112
|
+
_this.setState({
|
113
|
+
isHover: false
|
114
|
+
});
|
115
|
+
|
116
|
+
clearTimeout(_this.pressOutTimer);
|
117
|
+
}, hoverStayTime);
|
118
|
+
});
|
119
|
+
|
120
|
+
_defineProperty(_assertThisInitialized(_this), "onPressOut", function () {
|
121
|
+
var hoverStyle = _this.props.hoverStyle;
|
122
|
+
var isHover = _this.state.isHover;
|
123
|
+
_this.isTouchEnd = true;
|
124
|
+
|
125
|
+
if (hoverStyle && isHover) {
|
126
|
+
_this.stopHover();
|
127
|
+
}
|
128
|
+
});
|
129
|
+
|
130
|
+
_defineProperty(_assertThisInitialized(_this), "_simulateNativePress", function (evt) {
|
131
|
+
var node = _this.$touchable.current;
|
132
|
+
node && node.props.onPress && node.props.onPress(evt);
|
133
|
+
});
|
134
|
+
|
135
|
+
return _this;
|
136
|
+
}
|
137
|
+
|
138
|
+
_createClass(Button, [{
|
139
|
+
key: "componentWillUnmount",
|
140
|
+
value: function componentWillUnmount() {
|
141
|
+
clearTimeout(this.pressOutTimer);
|
142
|
+
clearTimeout(this.pressInTimer);
|
143
|
+
}
|
144
|
+
}, {
|
145
|
+
key: "render",
|
146
|
+
value: function render() {
|
147
|
+
var _this$props3 = this.props,
|
148
|
+
loading = _this$props3.loading,
|
149
|
+
style = _this$props3.style,
|
150
|
+
size = _this$props3.size,
|
151
|
+
children = _this$props3.children,
|
152
|
+
disabled = _this$props3.disabled,
|
153
|
+
type = _this$props3.type,
|
154
|
+
plain = _this$props3.plain,
|
155
|
+
hoverStyle = _this$props3.hoverStyle;
|
156
|
+
var isDefaultSize = size === 'default';
|
157
|
+
var isDefaultType = type === 'default';
|
158
|
+
var isPrimaryType = type === 'primary';
|
159
|
+
var borderColor = isPrimaryType ? '#007AFF' : isDefaultType ? 'rgba(0, 0, 0, 0.2)' : '#FF4444';
|
160
|
+
var backgroundColor = disabled ? 'rgba(0, 0, 0, 0.2)' : plain ? 'transparent' : isPrimaryType ? '#007AFF' : '#FFF';
|
161
|
+
var textColor = disabled ? '#FFF' : plain ? borderColor : isDefaultType ? '#007AFF' : type === 'warn' ? '#FF4444' : '#FFFFFF';
|
162
|
+
var textHoverStyle = this.state.isHover ? extracteTextStyle(hoverStyle) : {};
|
163
|
+
return /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
|
164
|
+
onPress: this.onPress,
|
165
|
+
onLongPress: this.onPress,
|
166
|
+
onPressIn: this.onPressIn,
|
167
|
+
onPressOut: this.onPressOut,
|
168
|
+
ref: this.$touchable,
|
169
|
+
disabled: disabled
|
170
|
+
}, /*#__PURE__*/React.createElement(View, {
|
171
|
+
style: [styles.btn, !isDefaultSize && styles.btnMini, {
|
172
|
+
backgroundColor: backgroundColor
|
173
|
+
}, plain && {
|
174
|
+
borderWidth: 1,
|
175
|
+
borderColor: borderColor
|
176
|
+
}, style, this.state.isHover && hoverStyle]
|
177
|
+
}, loading && /*#__PURE__*/React.createElement(Loading, {
|
178
|
+
tintColor: textColor
|
179
|
+
}), Array.isArray(children) ? children.map(function (c, i) {
|
180
|
+
return /*#__PURE__*/React.createElement(Text, {
|
181
|
+
key: i,
|
182
|
+
style: [styles.btnText, !isDefaultSize && styles.btnTextMini, {
|
183
|
+
color: textColor
|
184
|
+
}, textHoverStyle]
|
185
|
+
}, c);
|
186
|
+
}) : ['string', 'number'].indexOf(_typeof(children)) > -1 ? /*#__PURE__*/React.createElement(Text, {
|
187
|
+
style: [styles.btnText, !isDefaultSize && styles.btnTextMini, {
|
188
|
+
color: textColor
|
189
|
+
}, textHoverStyle]
|
190
|
+
}, children) : children));
|
191
|
+
}
|
192
|
+
}]);
|
193
|
+
|
194
|
+
return Button;
|
195
|
+
}(React.Component);
|
196
|
+
|
197
|
+
_defineProperty(Button, "displayName", '_Button');
|
198
|
+
|
199
|
+
_defineProperty(Button, "defaultProps", defaultButtonProps);
|
200
|
+
|
201
|
+
export default Button;
|
202
|
+
var styles = StyleSheet.create({
|
203
|
+
btn: {
|
204
|
+
flexDirection: 'row',
|
205
|
+
justifyContent: 'center',
|
206
|
+
alignItems: 'center',
|
207
|
+
paddingHorizontal: 14,
|
208
|
+
height: 46,
|
209
|
+
backgroundColor: '#F8F8F8',
|
210
|
+
borderRadius: 5
|
211
|
+
},
|
212
|
+
loading: {
|
213
|
+
marginRight: 5
|
214
|
+
},
|
215
|
+
loadingImg: {
|
216
|
+
width: 20,
|
217
|
+
height: 20
|
218
|
+
},
|
219
|
+
btnMini: {
|
220
|
+
height: 30
|
221
|
+
},
|
222
|
+
btnText: {
|
223
|
+
fontSize: 18,
|
224
|
+
color: '#000'
|
225
|
+
},
|
226
|
+
btnTextMini: {
|
227
|
+
fontSize: 13
|
228
|
+
}
|
229
|
+
});
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { Button as _Button } from "@ray-core/wechat/esm/hostComponents/Button/index";
|
2
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
4
3
|
var _excluded = ["style", "id", "className", "disabled", "loading", "onClick", "hoverClassName", "size", "formType"];
|
5
4
|
import * as React from 'react';
|
6
5
|
import clsx from 'clsx';
|
7
6
|
import { inlineStyle } from '@ray-js/framework-shared';
|
7
|
+
import { Button as RemaxButton } from '@ray-core/wechat';
|
8
8
|
import { defaultButtonProps } from './props';
|
9
9
|
import styles from './index.module.less';
|
10
10
|
|
@@ -21,7 +21,7 @@ var Button = function (props) {
|
|
21
21
|
formType = props.formType,
|
22
22
|
restProps = _objectWithoutProperties(props, _excluded);
|
23
23
|
|
24
|
-
return /*#__PURE__*/React.createElement(
|
24
|
+
return /*#__PURE__*/React.createElement(RemaxButton, _extends({
|
25
25
|
id: id,
|
26
26
|
style: inlineStyle(style),
|
27
27
|
className: clsx('ray-button', styles.button, className),
|
@@ -0,0 +1,118 @@
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
5
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
7
|
+
import React from 'react';
|
8
|
+
import { TouchableWithoutFeedback, StyleSheet, View } from 'react-native';
|
9
|
+
import Icon from '../Icon';
|
10
|
+
|
11
|
+
var Checkbox = /*#__PURE__*/function (_React$Component) {
|
12
|
+
_inherits(Checkbox, _React$Component);
|
13
|
+
|
14
|
+
var _super = _createSuper(Checkbox);
|
15
|
+
|
16
|
+
function Checkbox(props) {
|
17
|
+
var _this;
|
18
|
+
|
19
|
+
_classCallCheck(this, Checkbox);
|
20
|
+
|
21
|
+
_this = _super.call(this, props);
|
22
|
+
|
23
|
+
_defineProperty(_assertThisInitialized(_this), "$touchable", /*#__PURE__*/React.createRef());
|
24
|
+
|
25
|
+
_defineProperty(_assertThisInitialized(_this), "_simulateNativePress", function (evt) {
|
26
|
+
var node = _this.$touchable.current;
|
27
|
+
node && node.props.onPress && node.props.onPress(evt);
|
28
|
+
});
|
29
|
+
|
30
|
+
_defineProperty(_assertThisInitialized(_this), "onPress", function () {
|
31
|
+
var _this$props = _this.props,
|
32
|
+
disabled = _this$props.disabled,
|
33
|
+
onChange = _this$props.onChange,
|
34
|
+
value = _this$props.value;
|
35
|
+
if (disabled) return;
|
36
|
+
var checked = !_this.state.checked;
|
37
|
+
typeof onChange === 'function' && onChange({
|
38
|
+
value: value,
|
39
|
+
checked: checked,
|
40
|
+
type: 'change'
|
41
|
+
});
|
42
|
+
|
43
|
+
_this.setState({
|
44
|
+
checked: checked
|
45
|
+
});
|
46
|
+
});
|
47
|
+
|
48
|
+
_this.state = {
|
49
|
+
checked: props.checked
|
50
|
+
};
|
51
|
+
return _this;
|
52
|
+
}
|
53
|
+
|
54
|
+
_createClass(Checkbox, [{
|
55
|
+
key: "componentDidUpdate",
|
56
|
+
value: function componentDidUpdate(prevProps) {
|
57
|
+
if (prevProps.checked !== this.props.checked) {
|
58
|
+
this.setState({
|
59
|
+
checked: !!this.props.checked
|
60
|
+
});
|
61
|
+
}
|
62
|
+
}
|
63
|
+
}, {
|
64
|
+
key: "render",
|
65
|
+
value: function render() {
|
66
|
+
var _this$props2 = this.props,
|
67
|
+
style = _this$props2.style,
|
68
|
+
color = _this$props2.color,
|
69
|
+
disabled = _this$props2.disabled;
|
70
|
+
var checked = this.state.checked;
|
71
|
+
return /*#__PURE__*/React.createElement(TouchableWithoutFeedback, {
|
72
|
+
onPress: this.onPress,
|
73
|
+
ref: this.$touchable
|
74
|
+
}, /*#__PURE__*/React.createElement(View, {
|
75
|
+
style: [styles.wrapper, {
|
76
|
+
backgroundColor: disabled ? 'rgba(0,0,0,0.2)' : checked ? '#007AFF' : '#FFF',
|
77
|
+
borderColor: disabled ? 'rgba(0,0,0,0.2)' : checked ? '#007AFF' : 'rgba(0,0,0,0.2)'
|
78
|
+
}, style]
|
79
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
80
|
+
type: "success_no_circle",
|
81
|
+
size: 12,
|
82
|
+
color: color,
|
83
|
+
style: [styles.wrapperIcon, checked && styles.wrapperCheckedIcon]
|
84
|
+
}), /*#__PURE__*/React.createElement(View, {
|
85
|
+
style: {
|
86
|
+
flexGrow: 0
|
87
|
+
}
|
88
|
+
}, this.props.children)));
|
89
|
+
}
|
90
|
+
}]);
|
91
|
+
|
92
|
+
return Checkbox;
|
93
|
+
}(React.Component);
|
94
|
+
|
95
|
+
_defineProperty(Checkbox, "displayName", '_Checkbox');
|
96
|
+
|
97
|
+
_defineProperty(Checkbox, "defaultProps", {
|
98
|
+
value: '',
|
99
|
+
color: '#FFF'
|
100
|
+
});
|
101
|
+
|
102
|
+
export default Checkbox;
|
103
|
+
var styles = StyleSheet.create({
|
104
|
+
wrapper: {
|
105
|
+
alignItems: 'center',
|
106
|
+
justifyContent: 'center',
|
107
|
+
width: 18,
|
108
|
+
height: 18,
|
109
|
+
borderWidth: 1,
|
110
|
+
borderRadius: 4
|
111
|
+
},
|
112
|
+
wrapperIcon: {
|
113
|
+
opacity: 0
|
114
|
+
},
|
115
|
+
wrapperCheckedIcon: {
|
116
|
+
opacity: 1
|
117
|
+
}
|
118
|
+
});
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { Checkbox as _Checkbox } from "@ray-core/wechat/esm/hostComponents/Checkbox/index";
|
2
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
4
3
|
var _excluded = ["className", "style", "id", "color"];
|
5
4
|
import clsx from 'clsx';
|
6
5
|
import * as React from 'react';
|
7
6
|
import { inlineStyle } from '@ray-js/framework-shared';
|
7
|
+
import { Checkbox as RemaxCheckbox } from '@ray-core/wechat';
|
8
8
|
|
9
9
|
var Checkbox = function (props) {
|
10
10
|
var className = props.className,
|
@@ -13,7 +13,7 @@ var Checkbox = function (props) {
|
|
13
13
|
color = props.color,
|
14
14
|
restProps = _objectWithoutProperties(props, _excluded);
|
15
15
|
|
16
|
-
return /*#__PURE__*/React.createElement(
|
16
|
+
return /*#__PURE__*/React.createElement(RemaxCheckbox, _extends({
|
17
17
|
id: id,
|
18
18
|
style: inlineStyle(style),
|
19
19
|
color: color || '#007aff',
|
@@ -0,0 +1,99 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
5
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
6
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
7
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
9
|
+
import "core-js/modules/es.array.map.js";
|
10
|
+
import "core-js/modules/es.array.filter.js";
|
11
|
+
import "core-js/modules/es.object.to-string.js";
|
12
|
+
import "core-js/modules/es.array.concat.js";
|
13
|
+
import React from 'react';
|
14
|
+
import { View, Text } from 'react-native';
|
15
|
+
import Checkbox from '../Checkbox';
|
16
|
+
|
17
|
+
var CheckboxGroup = /*#__PURE__*/function (_React$Component) {
|
18
|
+
_inherits(CheckboxGroup, _React$Component);
|
19
|
+
|
20
|
+
var _super = _createSuper(CheckboxGroup);
|
21
|
+
|
22
|
+
function CheckboxGroup(props) {
|
23
|
+
var _this;
|
24
|
+
|
25
|
+
_classCallCheck(this, CheckboxGroup);
|
26
|
+
|
27
|
+
_this = _super.call(this, props);
|
28
|
+
|
29
|
+
_defineProperty(_assertThisInitialized(_this), "getValueData", function (options) {
|
30
|
+
return options.filter(function (item) {
|
31
|
+
return item.checked;
|
32
|
+
}).map(function (item) {
|
33
|
+
return item.value;
|
34
|
+
});
|
35
|
+
});
|
36
|
+
|
37
|
+
_defineProperty(_assertThisInitialized(_this), "_handleChange", function (event, index) {
|
38
|
+
var onChange = _this.props.onChange;
|
39
|
+
var options = _this.state.options;
|
40
|
+
var newOptions = options.concat([]);
|
41
|
+
newOptions[index] = _objectSpread(_objectSpread({}, newOptions[index]), event);
|
42
|
+
|
43
|
+
_this.setState({
|
44
|
+
options: newOptions
|
45
|
+
});
|
46
|
+
|
47
|
+
typeof onChange === 'function' && onChange({
|
48
|
+
type: 'change',
|
49
|
+
value: _this.getValueData(newOptions)
|
50
|
+
});
|
51
|
+
});
|
52
|
+
|
53
|
+
_this.state = {
|
54
|
+
options: props.options
|
55
|
+
};
|
56
|
+
return _this;
|
57
|
+
}
|
58
|
+
|
59
|
+
_createClass(CheckboxGroup, [{
|
60
|
+
key: "render",
|
61
|
+
value: function render() {
|
62
|
+
var _this2 = this;
|
63
|
+
|
64
|
+
var _this$props = this.props,
|
65
|
+
style = _this$props.style,
|
66
|
+
disabled = _this$props.disabled;
|
67
|
+
var options = this.state.options;
|
68
|
+
return /*#__PURE__*/React.createElement(View, {
|
69
|
+
style: [{
|
70
|
+
flexDirection: 'row'
|
71
|
+
}, style]
|
72
|
+
}, options.length && options.map(function (item, index) {
|
73
|
+
var data = disabled ? _objectSpread(_objectSpread({}, item), {}, {
|
74
|
+
disabled: disabled
|
75
|
+
}) : item;
|
76
|
+
return /*#__PURE__*/React.createElement(View, {
|
77
|
+
style: {
|
78
|
+
flexDirection: 'row',
|
79
|
+
alignItems: 'center',
|
80
|
+
paddingLeft: index ? 5 : 0
|
81
|
+
},
|
82
|
+
key: Math.random()
|
83
|
+
}, /*#__PURE__*/React.createElement(Checkbox, _extends({}, data, {
|
84
|
+
onChange: function onChange(event) {
|
85
|
+
return _this2._handleChange(event, index);
|
86
|
+
}
|
87
|
+
})), item.label && /*#__PURE__*/React.createElement(Text, {
|
88
|
+
style: {
|
89
|
+
marginLeft: 5
|
90
|
+
}
|
91
|
+
}, item.label));
|
92
|
+
}));
|
93
|
+
}
|
94
|
+
}]);
|
95
|
+
|
96
|
+
return CheckboxGroup;
|
97
|
+
}(React.Component);
|
98
|
+
|
99
|
+
export { CheckboxGroup as default };
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import { CheckboxGroup as _CheckboxGroup } from "@ray-core/wechat/esm/hostComponents/CheckboxGroup/index";
|
2
1
|
import "core-js/modules/es.function.name.js";
|
3
2
|
import "core-js/modules/es.array.map.js";
|
4
3
|
import * as React from 'react';
|
4
|
+
import { CheckboxGroup as RemaxCheckboxGroup } from '@ray-core/wechat';
|
5
5
|
import Checkbox from '../Checkbox';
|
6
6
|
import Label from '../Label';
|
7
7
|
|
@@ -12,7 +12,7 @@ var CheckboxGroup = function (props) {
|
|
12
12
|
_props$onChange = props.onChange,
|
13
13
|
onChange = _props$onChange === void 0 ? function () {} : _props$onChange,
|
14
14
|
children = props.children;
|
15
|
-
return /*#__PURE__*/React.createElement(
|
15
|
+
return /*#__PURE__*/React.createElement(RemaxCheckboxGroup, {
|
16
16
|
name: name,
|
17
17
|
onChange: function handleOnChange(e) {
|
18
18
|
!disabled && onChange(e);
|
@@ -0,0 +1,166 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
4
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
6
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
8
|
+
|
9
|
+
/**
|
10
|
+
* ✔ hoverStyle: Convert hoverClass to hoverStyle.
|
11
|
+
* ✔ hoverStartTime
|
12
|
+
* ✔ hoverStayTime
|
13
|
+
* ✔ onClick
|
14
|
+
* ✔ onLongClick
|
15
|
+
* ✔ onTouchStart
|
16
|
+
* ✔ onTouchEnd
|
17
|
+
*/
|
18
|
+
import React from 'react';
|
19
|
+
import { PanResponder } from 'react-native';
|
20
|
+
import { omit, getClickEvent, getTouchEvent } from '../utils';
|
21
|
+
export default function ClickableSimplified(WrappedComponent) {
|
22
|
+
var _class;
|
23
|
+
|
24
|
+
return _class = /*#__PURE__*/function (_React$Component) {
|
25
|
+
_inherits(_Clickable, _React$Component);
|
26
|
+
|
27
|
+
var _super = _createSuper(_Clickable);
|
28
|
+
|
29
|
+
function _Clickable(props) {
|
30
|
+
var _this;
|
31
|
+
|
32
|
+
_classCallCheck(this, _Clickable);
|
33
|
+
|
34
|
+
_this = _super.call(this, props);
|
35
|
+
|
36
|
+
_defineProperty(_assertThisInitialized(_this), "startTimestamp", 0);
|
37
|
+
|
38
|
+
_defineProperty(_assertThisInitialized(_this), "setStartTimer", function () {
|
39
|
+
var _this$props = _this.props,
|
40
|
+
hoverStyle = _this$props.hoverStyle,
|
41
|
+
hoverStartTime = _this$props.hoverStartTime;
|
42
|
+
|
43
|
+
if (hoverStyle) {
|
44
|
+
_this.startTimer && clearTimeout(_this.startTimer);
|
45
|
+
_this.startTimer = setTimeout(function () {
|
46
|
+
_this.setState({
|
47
|
+
hoverable: true
|
48
|
+
});
|
49
|
+
}, hoverStartTime);
|
50
|
+
}
|
51
|
+
});
|
52
|
+
|
53
|
+
_defineProperty(_assertThisInitialized(_this), "setStayTimer", function () {
|
54
|
+
var _this$props2 = _this.props,
|
55
|
+
hoverStyle = _this$props2.hoverStyle,
|
56
|
+
hoverStayTime = _this$props2.hoverStayTime;
|
57
|
+
|
58
|
+
if (hoverStyle) {
|
59
|
+
_this.stayTimer && clearTimeout(_this.stayTimer);
|
60
|
+
_this.stayTimer = setTimeout(function () {
|
61
|
+
_this.state.hoverable && _this.setState({
|
62
|
+
hoverable: false
|
63
|
+
});
|
64
|
+
}, hoverStayTime);
|
65
|
+
}
|
66
|
+
});
|
67
|
+
|
68
|
+
_defineProperty(_assertThisInitialized(_this), "handleStartShouldSetPanResponder", function () {
|
69
|
+
var _this$props3 = _this.props,
|
70
|
+
hoverStyle = _this$props3.hoverStyle,
|
71
|
+
onClick = _this$props3.onClick,
|
72
|
+
onLongClick = _this$props3.onLongClick,
|
73
|
+
onTouchStart = _this$props3.onTouchStart,
|
74
|
+
onTouchEnd = _this$props3.onTouchEnd;
|
75
|
+
return !!(hoverStyle || onClick || onLongClick || onTouchStart || onTouchEnd);
|
76
|
+
});
|
77
|
+
|
78
|
+
_defineProperty(_assertThisInitialized(_this), "handlePanResponderGrant", function (evt) {
|
79
|
+
var onTouchStart = _this.props.onTouchStart;
|
80
|
+
onTouchStart && onTouchStart(getTouchEvent(evt, 'touchstart'));
|
81
|
+
_this.startTimestamp = evt.nativeEvent.timestamp;
|
82
|
+
|
83
|
+
_this.setStartTimer();
|
84
|
+
});
|
85
|
+
|
86
|
+
_defineProperty(_assertThisInitialized(_this), "handlePanResponderRelease", function (evt, gestureState) {
|
87
|
+
var _this$props4 = _this.props,
|
88
|
+
onClick = _this$props4.onClick,
|
89
|
+
onLongClick = _this$props4.onLongClick,
|
90
|
+
onTouchEnd = _this$props4.onTouchEnd;
|
91
|
+
onTouchEnd && onTouchEnd(getTouchEvent(evt, 'touchend'));
|
92
|
+
var endTimestamp = evt.nativeEvent.timestamp;
|
93
|
+
var gapTime = endTimestamp - _this.startTimestamp;
|
94
|
+
var hasMove = Math.abs(gestureState.dx) >= 1 || Math.abs(gestureState.dy) >= 1;
|
95
|
+
|
96
|
+
if (!hasMove) {
|
97
|
+
if (gapTime <= 350) {
|
98
|
+
onClick && onClick(getClickEvent(evt, 'click'));
|
99
|
+
} else {
|
100
|
+
onLongClick && onLongClick(getClickEvent(evt, 'longclick'));
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
_this.setStayTimer();
|
105
|
+
});
|
106
|
+
|
107
|
+
_this.state = {
|
108
|
+
hoverable: false
|
109
|
+
};
|
110
|
+
_this.panResponder = PanResponder.create({
|
111
|
+
onStartShouldSetPanResponder: _this.handleStartShouldSetPanResponder,
|
112
|
+
onShouldBlockNativeResponder: function onShouldBlockNativeResponder() {
|
113
|
+
return false;
|
114
|
+
},
|
115
|
+
onPanResponderGrant: function onPanResponderGrant(evt) {
|
116
|
+
return _this.handlePanResponderGrant(evt);
|
117
|
+
},
|
118
|
+
onPanResponderTerminationRequest: function onPanResponderTerminationRequest() {
|
119
|
+
return true;
|
120
|
+
},
|
121
|
+
onPanResponderRelease: function onPanResponderRelease(evt, gestureState) {
|
122
|
+
return _this.handlePanResponderRelease(evt, gestureState);
|
123
|
+
},
|
124
|
+
onPanResponderTerminate: function onPanResponderTerminate() {
|
125
|
+
_this.setStayTimer();
|
126
|
+
}
|
127
|
+
});
|
128
|
+
return _this;
|
129
|
+
}
|
130
|
+
|
131
|
+
_createClass(_Clickable, [{
|
132
|
+
key: "componentWillUnmount",
|
133
|
+
value: function componentWillUnmount() {
|
134
|
+
this.startTimer && clearTimeout(this.startTimer);
|
135
|
+
this.stayTimer && clearTimeout(this.stayTimer);
|
136
|
+
}
|
137
|
+
}, {
|
138
|
+
key: "render",
|
139
|
+
value: function render() {
|
140
|
+
var _this$props5 = this.props,
|
141
|
+
style = _this$props5.style,
|
142
|
+
hoverStyle = _this$props5.hoverStyle,
|
143
|
+
onClick = _this$props5.onClick,
|
144
|
+
onLongClick = _this$props5.onLongClick,
|
145
|
+
onTouchStart = _this$props5.onTouchStart,
|
146
|
+
onTouchEnd = _this$props5.onTouchEnd;
|
147
|
+
var hoverable = this.state.hoverable;
|
148
|
+
|
149
|
+
if (!hoverStyle && !onClick && !onLongClick && !onTouchStart && !onTouchEnd) {
|
150
|
+
return /*#__PURE__*/React.createElement(WrappedComponent, this.props);
|
151
|
+
}
|
152
|
+
|
153
|
+
return /*#__PURE__*/React.createElement(WrappedComponent, _extends({}, omit(this.props, ['style', 'hoverStyle', 'hoverStartTime', 'hoverStayTime', 'onClick', 'onLongClick', 'onTouchStart', 'onTouchEnd']), this.panResponder.panHandlers, {
|
154
|
+
style: [{
|
155
|
+
backgroundColor: 'transparent'
|
156
|
+
}, style, hoverable && hoverStyle]
|
157
|
+
}));
|
158
|
+
}
|
159
|
+
}]);
|
160
|
+
|
161
|
+
return _Clickable;
|
162
|
+
}(React.Component), _defineProperty(_class, "defaultProps", {
|
163
|
+
hoverStartTime: 20,
|
164
|
+
hoverStayTime: 70
|
165
|
+
}), _class;
|
166
|
+
}
|
@@ -1 +1,7 @@
|
|
1
|
-
|
1
|
+
import React from 'react';
|
2
|
+
|
3
|
+
var CoverView = function () {
|
4
|
+
return /*#__PURE__*/React.createElement("div", null, "web\u7AEF\u6682\u672A\u5B9E\u73B0");
|
5
|
+
};
|
6
|
+
|
7
|
+
export default CoverView;
|