@ray-js/components 1.4.1 → 1.4.3
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.android.js +1 -0
- package/lib/Button/Button.ios.js +1 -0
- package/lib/Button/Button.native.d.ts +29 -0
- package/lib/Button/Button.tuya.d.ts +4 -0
- package/lib/Button/Button.tuya.js +43 -0
- package/lib/Button/Button.web.js +57 -0
- package/lib/Button/index.android.js +1 -0
- package/lib/Button/index.ios.js +1 -0
- package/lib/Button/index.md +41 -0
- package/lib/Button/index.tuya.js +3 -0
- package/lib/Button/index.web.js +3 -0
- package/lib/Button/index.wechat.js +3 -0
- package/lib/Button/props.android.js +1 -0
- package/lib/Button/props.ios.js +1 -0
- package/lib/Button/props.tuya.js +10 -0
- package/lib/Button/props.web.js +10 -0
- package/lib/Button/props.wechat.js +10 -0
- package/lib/Checkbox/Checkbox.android.js +1 -0
- package/lib/Checkbox/Checkbox.ios.js +1 -0
- package/lib/Checkbox/Checkbox.native.d.ts +28 -0
- package/lib/Checkbox/Checkbox.tuya.d.ts +4 -0
- package/lib/Checkbox/Checkbox.tuya.js +22 -0
- package/lib/Checkbox/Checkbox.web.js +36 -0
- package/lib/Checkbox/index.android.js +1 -0
- package/lib/Checkbox/index.ios.js +1 -0
- package/lib/Checkbox/index.md +33 -0
- package/lib/Checkbox/index.tuya.js +3 -0
- package/lib/Checkbox/index.web.js +3 -0
- package/lib/Checkbox/index.wechat.js +3 -0
- package/lib/Checkbox/props.android.js +1 -0
- package/lib/Checkbox/props.ios.js +1 -0
- package/lib/Checkbox/props.tuya.js +1 -0
- package/lib/Checkbox/props.web.js +1 -0
- package/lib/Checkbox/props.wechat.js +1 -0
- package/lib/CheckboxGroup/CheckboxGroup.android.js +1 -0
- package/lib/CheckboxGroup/CheckboxGroup.ios.js +1 -0
- package/lib/CheckboxGroup/CheckboxGroup.native.d.ts +18 -0
- package/lib/CheckboxGroup/CheckboxGroup.tuya.d.ts +4 -0
- package/lib/CheckboxGroup/CheckboxGroup.tuya.js +35 -0
- package/lib/CheckboxGroup/CheckboxGroup.web.js +9 -0
- package/lib/CheckboxGroup/index.android.js +1 -0
- package/lib/CheckboxGroup/index.ios.js +1 -0
- package/lib/CheckboxGroup/index.md +37 -0
- package/lib/CheckboxGroup/index.tuya.js +3 -0
- package/lib/CheckboxGroup/index.web.js +3 -0
- package/lib/CheckboxGroup/index.wechat.js +3 -0
- package/lib/CheckboxGroup/props.android.js +1 -0
- package/lib/CheckboxGroup/props.ios.js +1 -0
- package/lib/CheckboxGroup/props.tuya.js +1 -0
- package/lib/CheckboxGroup/props.web.js +1 -0
- package/lib/CheckboxGroup/props.wechat.js +1 -0
- package/lib/ClickableSimplified/index.android.js +1 -0
- package/lib/ClickableSimplified/index.ios.js +1 -0
- package/lib/ClickableSimplified/index.native.d.ts +42 -0
- package/lib/DatePicker/DatePicker.android.js +1 -0
- package/lib/DatePicker/DatePicker.d.ts +4 -0
- package/lib/DatePicker/DatePicker.ios.js +1 -0
- package/lib/DatePicker/DatePicker.js +10 -0
- package/lib/DatePicker/DatePicker.native.d.ts +34 -0
- package/lib/DatePicker/DatePicker.tuya.d.ts +4 -0
- package/lib/DatePicker/DatePicker.tuya.js +56 -0
- package/lib/DatePicker/DatePicker.web.js +10 -0
- package/lib/DatePicker/DatePicker.wechat.d.ts +4 -0
- package/lib/DatePicker/DatePicker.wechat.js +56 -0
- package/lib/DatePicker/index.android.js +1 -0
- package/lib/DatePicker/index.d.ts +3 -0
- package/lib/DatePicker/index.ios.js +1 -0
- package/lib/DatePicker/index.js +3 -0
- package/lib/DatePicker/index.md +36 -0
- package/lib/DatePicker/index.module.less +0 -0
- package/lib/DatePicker/index.tuya.js +3 -0
- package/lib/DatePicker/index.web.js +3 -0
- package/lib/DatePicker/index.wechat.js +3 -0
- package/lib/DatePicker/props.android.js +1 -0
- package/lib/DatePicker/props.d.ts +31 -0
- package/lib/DatePicker/props.ios.js +1 -0
- package/lib/DatePicker/props.js +7 -0
- package/lib/DatePicker/props.tuya.js +7 -0
- package/lib/DatePicker/props.web.js +7 -0
- package/lib/DatePicker/props.wechat.js +7 -0
- package/lib/Icon/Icon.android.js +1 -0
- package/lib/Icon/Icon.ios.js +1 -0
- package/lib/Icon/Icon.native.d.ts +15 -0
- package/lib/Icon/Icon.tuya.d.ts +5 -0
- package/lib/Icon/Icon.tuya.js +23 -0
- package/lib/Icon/Icon.web.js +23 -0
- package/lib/Icon/iconfont/iconfont.android.js +1 -0
- package/lib/Icon/iconfont/iconfont.ios.js +1 -0
- package/lib/Icon/iconfont/iconfont.tuya.js +47 -0
- package/lib/Icon/iconfont/iconfont.web.js +47 -0
- package/lib/Icon/iconfont/iconfont.wechat.js +47 -0
- package/lib/Icon/iconfont-rn/iconfont.json +189 -0
- package/lib/Icon/index.android.js +1 -0
- package/lib/Icon/index.ios.js +1 -0
- package/lib/Icon/index.md +29 -0
- package/lib/Icon/index.tuya.js +3 -0
- package/lib/Icon/index.web.js +3 -0
- package/lib/Icon/index.wechat.js +3 -0
- package/lib/Icon/props.android.js +1 -0
- package/lib/Icon/props.ios.js +1 -0
- package/lib/Icon/props.tuya.js +5 -0
- package/lib/Icon/props.web.js +5 -0
- package/lib/Icon/props.wechat.js +5 -0
- package/lib/Image/Image.android.js +1 -0
- package/lib/Image/Image.ios.js +1 -0
- package/lib/Image/Image.native.d.ts +28 -0
- package/lib/Image/Image.tuya.d.ts +4 -0
- package/lib/Image/Image.tuya.js +23 -0
- package/lib/Image/Image.web.js +92 -0
- package/lib/Image/index.android.js +1 -0
- package/lib/Image/index.ios.js +1 -0
- package/lib/Image/index.md +50 -0
- package/lib/Image/index.tuya.js +3 -0
- package/lib/Image/index.web.js +3 -0
- package/lib/Image/index.wechat.js +3 -0
- package/lib/Image/props.android.js +1 -0
- package/lib/Image/props.ios.js +1 -0
- package/lib/Image/props.tuya.js +4 -0
- package/lib/Image/props.web.js +4 -0
- package/lib/Image/props.wechat.js +4 -0
- package/lib/Input/Input.android.js +1 -0
- package/lib/Input/Input.ios.js +1 -0
- package/lib/Input/Input.native.d.ts +32 -0
- package/lib/Input/Input.tuya.d.ts +4 -0
- package/lib/Input/Input.tuya.js +86 -0
- package/lib/Input/Input.web.js +100 -0
- package/lib/Input/index.android.js +1 -0
- package/lib/Input/index.ios.js +1 -0
- package/lib/Input/index.md +43 -0
- package/lib/Input/index.tuya.js +3 -0
- package/lib/Input/index.web.js +3 -0
- package/lib/Input/index.wechat.js +3 -0
- package/lib/Input/props.android.js +1 -0
- package/lib/Input/props.ios.js +1 -0
- package/lib/Input/props.tuya.js +7 -0
- package/lib/Input/props.web.js +7 -0
- package/lib/Input/props.wechat.js +7 -0
- package/lib/Label/Label.android.js +1 -0
- package/lib/Label/Label.ios.js +1 -0
- package/lib/Label/Label.native.d.ts +4 -0
- package/lib/Label/Label.tuya.d.ts +4 -0
- package/lib/Label/Label.tuya.js +21 -0
- package/lib/Label/Label.web.js +24 -0
- package/lib/Label/index.android.js +1 -0
- package/lib/Label/index.ios.js +1 -0
- package/lib/Label/index.tuya.js +3 -0
- package/lib/Label/index.web.js +3 -0
- package/lib/Label/index.wechat.js +3 -0
- package/lib/Label/props.android.js +1 -0
- package/lib/Label/props.ios.js +1 -0
- package/lib/Label/props.tuya.js +1 -0
- package/lib/Label/props.web.js +1 -0
- package/lib/Label/props.wechat.js +1 -0
- package/lib/LinearGradient/LinearGradient.android.js +1 -0
- package/lib/LinearGradient/LinearGradient.d.ts +4 -0
- package/lib/LinearGradient/LinearGradient.ios.js +1 -0
- package/lib/LinearGradient/LinearGradient.js +8 -0
- package/lib/LinearGradient/LinearGradient.native.d.ts +16 -0
- package/lib/LinearGradient/LinearGradient.tuya.d.ts +4 -0
- package/lib/LinearGradient/LinearGradient.tuya.js +56 -0
- package/lib/LinearGradient/LinearGradient.web.js +8 -0
- package/lib/LinearGradient/LinearGradient.wechat.d.ts +4 -0
- package/lib/LinearGradient/LinearGradient.wechat.js +53 -0
- package/lib/LinearGradient/index.android.js +1 -0
- package/lib/LinearGradient/index.d.ts +3 -0
- package/lib/LinearGradient/index.ios.js +1 -0
- package/lib/LinearGradient/index.js +3 -0
- package/lib/LinearGradient/index.md +33 -0
- package/lib/LinearGradient/index.module.less +7 -0
- package/lib/LinearGradient/index.tuya.js +3 -0
- package/lib/LinearGradient/index.web.js +3 -0
- package/lib/LinearGradient/index.wechat.js +3 -0
- package/lib/LinearGradient/props.android.js +1 -0
- package/lib/LinearGradient/props.d.ts +48 -0
- package/lib/LinearGradient/props.ios.js +1 -0
- package/lib/LinearGradient/props.js +11 -0
- package/lib/LinearGradient/props.tuya.js +11 -0
- package/lib/LinearGradient/props.web.js +11 -0
- package/lib/LinearGradient/props.wechat.js +11 -0
- package/lib/Modal/Modal.android.js +1 -0
- package/lib/Modal/Modal.d.ts +4 -0
- package/lib/Modal/Modal.ios.js +1 -0
- package/lib/Modal/Modal.js +10 -0
- package/lib/Modal/Modal.native.d.ts +24 -0
- package/lib/Modal/Modal.tuya.d.ts +4 -0
- package/lib/Modal/Modal.tuya.js +75 -0
- package/lib/Modal/Modal.web.js +10 -0
- package/lib/Modal/Modal.wechat.d.ts +4 -0
- package/lib/Modal/Modal.wechat.js +75 -0
- package/lib/Modal/index.android.js +1 -0
- package/lib/Modal/index.ios.js +1 -0
- package/lib/Modal/index.md +32 -0
- package/lib/Modal/index.module.less +46 -0
- package/lib/Modal/index.tuya.js +3 -0
- package/lib/Modal/index.wechat.js +3 -0
- package/lib/Modal/props.android.js +1 -0
- package/lib/Modal/props.d.ts +16 -0
- package/lib/Modal/props.ios.js +1 -0
- package/lib/Modal/props.js +1 -0
- package/lib/Modal/props.tuya.js +1 -0
- package/lib/Modal/props.web.js +1 -0
- package/lib/Modal/props.wechat.js +1 -0
- package/lib/Motion/Fade/index.android.js +1 -0
- package/lib/Motion/Fade/index.d.ts +4 -0
- package/lib/Motion/Fade/index.ios.js +1 -0
- package/lib/Motion/Fade/index.js +28 -0
- package/lib/Motion/Fade/index.native.d.ts +2 -0
- package/lib/Motion/Fade/index.tuya.d.ts +4 -0
- package/lib/Motion/Fade/index.tuya.js +78 -0
- package/lib/Motion/Fade/index.web.js +28 -0
- package/lib/Motion/Fade/index.wechat.d.ts +4 -0
- package/lib/Motion/Fade/index.wechat.js +78 -0
- package/lib/Motion/PullUp/index.android.js +1 -0
- package/lib/Motion/PullUp/index.d.ts +4 -0
- package/lib/Motion/PullUp/index.ios.js +1 -0
- package/lib/Motion/PullUp/index.js +28 -0
- package/lib/Motion/PullUp/index.native.d.ts +2 -0
- package/lib/Motion/PullUp/index.tuya.d.ts +4 -0
- package/lib/Motion/PullUp/index.tuya.js +82 -0
- package/lib/Motion/PullUp/index.web.js +28 -0
- package/lib/Motion/PullUp/index.wechat.d.ts +4 -0
- package/lib/Motion/PullUp/index.wechat.js +82 -0
- package/lib/Motion/PushDown/index.android.js +1 -0
- package/lib/Motion/PushDown/index.d.ts +4 -0
- package/lib/Motion/PushDown/index.ios.js +1 -0
- package/lib/Motion/PushDown/index.js +28 -0
- package/lib/Motion/PushDown/index.native.d.ts +2 -0
- package/lib/Motion/PushDown/index.tuya.d.ts +4 -0
- package/lib/Motion/PushDown/index.tuya.js +82 -0
- package/lib/Motion/PushDown/index.web.js +28 -0
- package/lib/Motion/PushDown/index.wechat.d.ts +4 -0
- package/lib/Motion/PushDown/index.wechat.js +82 -0
- package/lib/Motion/ScaleFadeIn/index.android.js +1 -0
- package/lib/Motion/ScaleFadeIn/index.d.ts +4 -0
- package/lib/Motion/ScaleFadeIn/index.ios.js +1 -0
- package/lib/Motion/ScaleFadeIn/index.js +28 -0
- package/lib/Motion/ScaleFadeIn/index.native.d.ts +2 -0
- package/lib/Motion/ScaleFadeIn/index.tuya.d.ts +4 -0
- package/lib/Motion/ScaleFadeIn/index.tuya.js +83 -0
- package/lib/Motion/ScaleFadeIn/index.web.js +28 -0
- package/lib/Motion/ScaleFadeIn/index.wechat.d.ts +4 -0
- package/lib/Motion/ScaleFadeIn/index.wechat.js +83 -0
- package/lib/Motion/ScalePullDown/index.android.js +1 -0
- package/lib/Motion/ScalePullDown/index.d.ts +4 -0
- package/lib/Motion/ScalePullDown/index.ios.js +1 -0
- package/lib/Motion/ScalePullDown/index.js +28 -0
- package/lib/Motion/ScalePullDown/index.native.d.ts +2 -0
- package/lib/Motion/ScalePullDown/index.tuya.d.ts +4 -0
- package/lib/Motion/ScalePullDown/index.tuya.js +103 -0
- package/lib/Motion/ScalePullDown/index.web.js +28 -0
- package/lib/Motion/ScalePullDown/index.wechat.d.ts +4 -0
- package/lib/Motion/ScalePullDown/index.wechat.js +103 -0
- package/lib/Motion/index.android.js +1 -0
- package/lib/Motion/index.d.ts +14 -0
- package/lib/Motion/index.ios.js +1 -0
- package/lib/Motion/index.js +14 -0
- package/lib/Motion/index.md +68 -0
- package/lib/Motion/index.tuya.js +14 -0
- package/lib/Motion/index.web.js +14 -0
- package/lib/Motion/index.wechat.js +14 -0
- package/lib/Motion/props.android.js +1 -0
- package/lib/Motion/props.d.ts +92 -0
- package/lib/Motion/props.ios.js +1 -0
- package/lib/Motion/props.js +62 -0
- package/lib/Motion/props.tuya.js +62 -0
- package/lib/Motion/props.web.js +62 -0
- package/lib/Motion/props.wechat.js +62 -0
- package/lib/PageContainer/PageContainer.android.js +1 -0
- package/lib/PageContainer/PageContainer.ios.js +1 -0
- package/lib/PageContainer/PageContainer.tuya.d.ts +3 -0
- package/lib/PageContainer/PageContainer.tuya.js +8 -0
- package/lib/PageContainer/PageContainer.web.js +10 -0
- package/lib/PageContainer/index.android.js +1 -0
- package/lib/PageContainer/index.ios.js +1 -0
- package/lib/PageContainer/index.md +42 -0
- package/lib/PageContainer/index.tuya.js +3 -0
- package/lib/PageContainer/index.web.js +3 -0
- package/lib/PageContainer/index.wechat.js +3 -0
- package/lib/PageContainer/props.android.js +1 -0
- package/lib/PageContainer/props.ios.js +1 -0
- package/lib/PageContainer/props.tuya.js +9 -0
- package/lib/PageContainer/props.web.js +9 -0
- package/lib/PageContainer/props.wechat.js +9 -0
- package/lib/Picker/Picker.android.js +1 -0
- package/lib/Picker/Picker.ios.js +1 -0
- package/lib/Picker/Picker.native.d.ts +22 -0
- package/lib/Picker/Picker.tuya.d.ts +4 -0
- package/lib/Picker/Picker.tuya.js +69 -0
- package/lib/Picker/Picker.web.js +11 -0
- package/lib/Picker/index.android.js +1 -0
- package/lib/Picker/index.ios.js +1 -0
- package/lib/Picker/index.md +35 -0
- package/lib/Picker/index.tuya.js +3 -0
- package/lib/Picker/index.web.js +3 -0
- package/lib/Picker/index.wechat.js +3 -0
- package/lib/Picker/props.android.js +1 -0
- package/lib/Picker/props.d.ts +32 -0
- package/lib/Picker/props.ios.js +1 -0
- package/lib/Picker/props.js +4 -0
- package/lib/Picker/props.tuya.js +4 -0
- package/lib/Picker/props.web.js +4 -0
- package/lib/Picker/props.wechat.js +4 -0
- package/lib/PickerView/PickerView.android.js +1 -0
- package/lib/PickerView/PickerView.ios.js +1 -0
- package/lib/PickerView/PickerView.native.d.ts +31 -0
- package/lib/PickerView/PickerView.tuya.d.ts +4 -0
- package/lib/PickerView/PickerView.tuya.js +71 -0
- package/lib/PickerView/PickerView.web.js +11 -0
- package/lib/PickerView/index.android.js +1 -0
- package/lib/PickerView/index.ios.js +1 -0
- package/lib/PickerView/index.md +32 -0
- package/lib/PickerView/index.tuya.js +3 -0
- package/lib/PickerView/index.web.js +3 -0
- package/lib/PickerView/index.wechat.js +3 -0
- package/lib/PickerView/props.android.js +1 -0
- package/lib/PickerView/props.ios.js +1 -0
- package/lib/PickerView/props.tuya.js +1 -0
- package/lib/PickerView/props.web.js +1 -0
- package/lib/PickerView/props.wechat.js +1 -0
- package/lib/RadialGradient/RadialGradient.android.js +1 -0
- package/lib/RadialGradient/RadialGradient.d.ts +4 -0
- package/lib/RadialGradient/RadialGradient.ios.js +1 -0
- package/lib/RadialGradient/RadialGradient.js +8 -0
- package/lib/RadialGradient/RadialGradient.native.d.ts +17 -0
- package/lib/RadialGradient/RadialGradient.tuya.d.ts +4 -0
- package/lib/RadialGradient/RadialGradient.tuya.js +36 -0
- package/lib/RadialGradient/RadialGradient.web.js +8 -0
- package/lib/RadialGradient/RadialGradient.wechat.d.ts +4 -0
- package/lib/RadialGradient/RadialGradient.wechat.js +36 -0
- package/lib/RadialGradient/index.android.js +1 -0
- package/lib/RadialGradient/index.d.ts +3 -0
- package/lib/RadialGradient/index.ios.js +1 -0
- package/lib/RadialGradient/index.js +3 -0
- package/lib/RadialGradient/index.md +33 -0
- package/lib/RadialGradient/index.module.less +7 -0
- package/lib/RadialGradient/index.tuya.js +3 -0
- package/lib/RadialGradient/index.web.js +3 -0
- package/lib/RadialGradient/index.wechat.js +3 -0
- package/lib/RadialGradient/props.android.js +1 -0
- package/lib/RadialGradient/props.d.ts +54 -0
- package/lib/RadialGradient/props.ios.js +1 -0
- package/lib/RadialGradient/props.js +16 -0
- package/lib/RadialGradient/props.tuya.js +16 -0
- package/lib/RadialGradient/props.web.js +16 -0
- package/lib/RadialGradient/props.wechat.js +16 -0
- package/lib/Radio/Radio.android.js +1 -0
- package/lib/Radio/Radio.ios.js +1 -0
- package/lib/Radio/Radio.native.d.ts +30 -0
- package/lib/Radio/Radio.tuya.d.ts +4 -0
- package/lib/Radio/Radio.tuya.js +22 -0
- package/lib/Radio/Radio.web.js +13 -0
- package/lib/Radio/index.android.js +1 -0
- package/lib/Radio/index.ios.js +1 -0
- package/lib/Radio/index.md +30 -0
- package/lib/Radio/index.tuya.js +3 -0
- package/lib/Radio/index.web.js +3 -0
- package/lib/Radio/index.wechat.js +3 -0
- package/lib/Radio/props.android.js +1 -0
- package/lib/Radio/props.ios.js +1 -0
- package/lib/Radio/props.tuya.js +1 -0
- package/lib/Radio/props.web.js +1 -0
- package/lib/Radio/props.wechat.js +1 -0
- package/lib/RadioGroup/RadioGroup.android.js +1 -0
- package/lib/RadioGroup/RadioGroup.ios.js +1 -0
- package/lib/RadioGroup/RadioGroup.native.d.ts +18 -0
- package/lib/RadioGroup/RadioGroup.tuya.d.ts +4 -0
- package/lib/RadioGroup/RadioGroup.tuya.js +35 -0
- package/lib/RadioGroup/RadioGroup.web.js +9 -0
- package/lib/RadioGroup/index.android.js +1 -0
- package/lib/RadioGroup/index.ios.js +1 -0
- package/lib/RadioGroup/index.md +39 -0
- package/lib/RadioGroup/index.tuya.js +3 -0
- package/lib/RadioGroup/index.web.js +3 -0
- package/lib/RadioGroup/index.wechat.js +3 -0
- package/lib/RadioGroup/props.android.js +1 -0
- package/lib/RadioGroup/props.ios.js +1 -0
- package/lib/RadioGroup/props.tuya.js +1 -0
- package/lib/RadioGroup/props.web.js +1 -0
- package/lib/RadioGroup/props.wechat.js +1 -0
- package/lib/ScrollView/ScrollView.android.js +1 -0
- package/lib/ScrollView/ScrollView.ios.js +1 -0
- package/lib/ScrollView/ScrollView.native.d.ts +57 -0
- package/lib/ScrollView/ScrollView.tuya.d.ts +4 -0
- package/lib/ScrollView/ScrollView.tuya.js +20 -0
- package/lib/ScrollView/ScrollView.web.js +169 -0
- package/lib/ScrollView/index.android.js +1 -0
- package/lib/ScrollView/index.ios.js +1 -0
- package/lib/ScrollView/index.md +37 -0
- package/lib/ScrollView/index.tuya.js +3 -0
- package/lib/ScrollView/index.web.js +3 -0
- package/lib/ScrollView/index.wechat.js +3 -0
- package/lib/ScrollView/props.android.js +1 -0
- package/lib/ScrollView/props.d.ts +43 -0
- package/lib/ScrollView/props.ios.js +1 -0
- package/lib/ScrollView/props.js +5 -0
- package/lib/ScrollView/props.tuya.js +5 -0
- package/lib/ScrollView/props.web.js +5 -0
- package/lib/ScrollView/props.wechat.js +5 -0
- package/lib/Slider/Slider.android.js +1 -0
- package/lib/Slider/Slider.ios.js +1 -0
- package/lib/Slider/Slider.native.d.ts +21 -0
- package/lib/Slider/Slider.tuya.d.ts +4 -0
- package/lib/Slider/Slider.tuya.js +37 -0
- package/lib/Slider/Slider.web.js +20 -0
- package/lib/Slider/index.android.js +1 -0
- package/lib/Slider/index.ios.js +1 -0
- package/lib/Slider/index.md +63 -0
- package/lib/Slider/index.tuya.js +3 -0
- package/lib/Slider/index.web.js +3 -0
- package/lib/Slider/index.wechat.js +3 -0
- package/lib/Slider/props.android.js +1 -0
- package/lib/Slider/props.ios.js +1 -0
- package/lib/Slider/props.tuya.js +11 -0
- package/lib/Slider/props.web.js +11 -0
- package/lib/Slider/props.wechat.js +11 -0
- package/lib/Swiper/Swiper.android.js +1 -0
- package/lib/Swiper/Swiper.ios.js +1 -0
- package/lib/Swiper/Swiper.native.d.ts +6 -0
- package/lib/Swiper/Swiper.tuya.d.ts +7 -0
- package/lib/Swiper/Swiper.tuya.js +54 -0
- package/lib/Swiper/Swiper.web.js +10 -0
- package/lib/Swiper/index.android.js +1 -0
- package/lib/Swiper/index.ios.js +1 -0
- package/lib/Swiper/index.md +44 -0
- package/lib/Swiper/index.tuya.js +3 -0
- package/lib/Swiper/index.web.js +3 -0
- package/lib/Swiper/index.wechat.js +3 -0
- package/lib/Swiper/props.android.js +1 -0
- package/lib/Swiper/props.ios.js +1 -0
- package/lib/Swiper/props.tuya.js +16 -0
- package/lib/Swiper/props.web.js +16 -0
- package/lib/Swiper/props.wechat.js +16 -0
- package/lib/Switch/Switch.android.js +1 -0
- package/lib/Switch/Switch.ios.js +1 -0
- package/lib/Switch/Switch.native.d.ts +25 -0
- package/lib/Switch/Switch.tuya.d.ts +4 -0
- package/lib/Switch/Switch.tuya.js +35 -0
- package/lib/Switch/Switch.web.js +13 -0
- package/lib/Switch/index.android.js +1 -0
- package/lib/Switch/index.ios.js +1 -0
- package/lib/Switch/index.md +31 -0
- package/lib/Switch/index.tuya.js +3 -0
- package/lib/Switch/index.web.js +3 -0
- package/lib/Switch/index.wechat.js +3 -0
- package/lib/Switch/props.android.js +1 -0
- package/lib/Switch/props.ios.js +1 -0
- package/lib/Switch/props.tuya.js +5 -0
- package/lib/Switch/props.web.js +5 -0
- package/lib/Switch/props.wechat.js +5 -0
- package/lib/Text/Text.android.js +1 -0
- package/lib/Text/Text.ios.js +1 -0
- package/lib/Text/Text.native.d.ts +8 -0
- package/lib/Text/Text.tuya.d.ts +4 -0
- package/lib/Text/Text.tuya.js +8 -0
- package/lib/Text/Text.web.js +41 -0
- package/lib/Text/index.android.js +1 -0
- package/lib/Text/index.ios.js +1 -0
- package/lib/Text/index.md +29 -0
- package/lib/Text/index.tuya.js +3 -0
- package/lib/Text/index.web.js +3 -0
- package/lib/Text/index.wechat.js +3 -0
- package/lib/Text/props.android.js +1 -0
- package/lib/Text/props.ios.js +1 -0
- package/lib/Text/props.tuya.js +1 -0
- package/lib/Text/props.web.js +1 -0
- package/lib/Text/props.wechat.js +1 -0
- package/lib/Textarea/Textarea.android.js +1 -0
- package/lib/Textarea/Textarea.ios.js +1 -0
- package/lib/Textarea/Textarea.native.d.ts +4 -0
- package/lib/Textarea/Textarea.tuya.d.ts +4 -0
- package/lib/Textarea/Textarea.tuya.js +60 -0
- package/lib/Textarea/Textarea.web.js +120 -0
- package/lib/Textarea/index.android.js +1 -0
- package/lib/Textarea/index.ios.js +1 -0
- package/lib/Textarea/index.md +46 -0
- package/lib/Textarea/index.tuya.js +3 -0
- package/lib/Textarea/index.web.js +3 -0
- package/lib/Textarea/index.wechat.js +3 -0
- package/lib/Textarea/props.android.js +1 -0
- package/lib/Textarea/props.ios.js +1 -0
- package/lib/Textarea/props.tuya.js +1 -0
- package/lib/Textarea/props.web.js +1 -0
- package/lib/Textarea/props.wechat.js +1 -0
- package/lib/TimePicker/TimePicker.android.js +1 -0
- package/lib/TimePicker/TimePicker.d.ts +4 -0
- package/lib/TimePicker/TimePicker.ios.js +1 -0
- package/lib/TimePicker/TimePicker.js +10 -0
- package/lib/TimePicker/TimePicker.native.d.ts +39 -0
- package/lib/TimePicker/TimePicker.tuya.d.ts +4 -0
- package/lib/TimePicker/TimePicker.tuya.js +26 -0
- package/lib/TimePicker/TimePicker.web.js +10 -0
- package/lib/TimePicker/TimePicker.wechat.d.ts +4 -0
- package/lib/TimePicker/TimePicker.wechat.js +56 -0
- package/lib/TimePicker/index.android.js +1 -0
- package/lib/TimePicker/index.d.ts +3 -0
- package/lib/TimePicker/index.ios.js +1 -0
- package/lib/TimePicker/index.js +3 -0
- package/lib/TimePicker/index.md +35 -0
- package/lib/TimePicker/index.module.less +0 -0
- package/lib/TimePicker/index.tuya.js +3 -0
- package/lib/TimePicker/index.web.js +3 -0
- package/lib/TimePicker/index.wechat.js +3 -0
- package/lib/TimePicker/props.android.js +1 -0
- package/lib/TimePicker/props.d.ts +28 -0
- package/lib/TimePicker/props.ios.js +1 -0
- package/lib/TimePicker/props.js +6 -0
- package/lib/TimePicker/props.tuya.js +6 -0
- package/lib/TimePicker/props.web.js +6 -0
- package/lib/TimePicker/props.wechat.js +6 -0
- package/lib/View/View.android.js +1 -0
- package/lib/View/View.ios.js +1 -0
- package/lib/View/View.native.d.ts +2 -0
- package/lib/View/View.tuya.d.ts +4 -0
- package/lib/View/View.tuya.js +76 -0
- package/lib/View/View.web.js +70 -0
- package/lib/View/index.android.js +1 -0
- package/lib/View/index.ios.js +1 -0
- package/lib/View/index.md +33 -0
- package/lib/View/index.tuya.js +3 -0
- package/lib/View/index.web.js +3 -0
- package/lib/View/index.wechat.js +3 -0
- package/lib/View/props.android.js +1 -0
- package/lib/View/props.ios.js +1 -0
- package/lib/View/props.tuya.js +4 -0
- package/lib/View/props.web.js +4 -0
- package/lib/View/props.wechat.js +4 -0
- package/lib/assets/icons.android.js +1 -0
- package/lib/assets/icons.ios.js +1 -0
- package/lib/assets/icons.tuya.js +7 -0
- package/lib/assets/icons.web.js +7 -0
- package/lib/assets/icons.wechat.js +7 -0
- package/lib/core/index.android.js +1 -0
- package/lib/core/index.ios.js +1 -0
- package/lib/core/index.tuya.js +25 -0
- package/lib/core/index.web.js +25 -0
- package/lib/core/index.wechat.js +25 -0
- package/lib/index.android.js +1 -0
- package/lib/index.ios.js +1 -0
- package/lib/index.tuya.js +25 -0
- package/lib/index.web.js +25 -0
- package/lib/index.wechat.js +25 -0
- package/lib/types/event.android.js +0 -0
- package/lib/types/event.ios.js +0 -0
- package/lib/types/event.tuya.js +1 -0
- package/lib/types/event.web.js +1 -0
- package/lib/types/event.wechat.js +1 -0
- package/lib/types/index.android.js +1 -0
- package/lib/types/index.ios.js +1 -0
- package/lib/types/index.tuya.js +9 -0
- package/lib/types/index.web.js +9 -0
- package/lib/types/index.wechat.js +9 -0
- package/lib/utils/index.android.js +1 -0
- package/lib/utils/index.d.ts +10 -0
- package/lib/utils/index.ios.js +1 -0
- package/lib/utils/index.js +90 -0
- package/lib/utils/index.tuya.js +90 -0
- package/lib/utils/index.web.js +90 -0
- package/lib/utils/index.wechat.js +90 -0
- package/lib/utils/interface.android.js +1 -0
- package/lib/utils/interface.d.ts +20 -0
- package/lib/utils/interface.ios.js +1 -0
- package/lib/utils/interface.js +1 -0
- package/lib/utils/interface.tuya.js +1 -0
- package/lib/utils/interface.web.js +1 -0
- package/lib/utils/interface.wechat.js +1 -0
- package/package.json +5 -5
- package/LICENSE.md +0 -9
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["style", "className", "children", "show", "onShow", "onHide", "showDuration", "hideDuration", "delay", "initScale", "finalScale"];
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { inlineStyle } from '@ray-js/framework-shared';
|
|
7
|
+
import { View } from '@ray-js/components';
|
|
8
|
+
import { defaultMotionScaleFadeInProps } from '../props';
|
|
9
|
+
|
|
10
|
+
var ScaleFadeIn = function (props) {
|
|
11
|
+
var isPreShow = React.useRef(false);
|
|
12
|
+
|
|
13
|
+
var style = props.style,
|
|
14
|
+
className = props.className,
|
|
15
|
+
children = props.children,
|
|
16
|
+
show = props.show,
|
|
17
|
+
onShow = props.onShow,
|
|
18
|
+
onHide = props.onHide,
|
|
19
|
+
showDuration = props.showDuration,
|
|
20
|
+
hideDuration = props.hideDuration,
|
|
21
|
+
delay = props.delay,
|
|
22
|
+
initScale = props.initScale,
|
|
23
|
+
finalScale = props.finalScale,
|
|
24
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
25
|
+
|
|
26
|
+
var _React$useState = React.useState(false),
|
|
27
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
28
|
+
isAddNode = _React$useState2[0],
|
|
29
|
+
setIsAddNode = _React$useState2[1]; // 是否将节点渲染到页面上
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
var _React$useState3 = React.useState(undefined),
|
|
33
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
34
|
+
anim = _React$useState4[0],
|
|
35
|
+
setAnim = _React$useState4[1];
|
|
36
|
+
|
|
37
|
+
var animationRef = React.useRef(null);
|
|
38
|
+
var isFirstRenderRef = React.useRef(true);
|
|
39
|
+
React.useEffect(function () {
|
|
40
|
+
animationRef.current = wx.createAnimation({
|
|
41
|
+
duration: 0,
|
|
42
|
+
timingFunction: 'ease'
|
|
43
|
+
});
|
|
44
|
+
}, []);
|
|
45
|
+
React.useEffect(function () {
|
|
46
|
+
if (show) {
|
|
47
|
+
isPreShow.current = true;
|
|
48
|
+
setIsAddNode(true);
|
|
49
|
+
} else if (isPreShow.current) {
|
|
50
|
+
isPreShow.current = false;
|
|
51
|
+
setTimeout(function () {
|
|
52
|
+
setIsAddNode(false);
|
|
53
|
+
}, delay + hideDuration);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (isFirstRenderRef.current) {
|
|
57
|
+
isFirstRenderRef.current = false;
|
|
58
|
+
animationRef.current.scale(show ? 1 : initScale).opacity(show ? 1 : 0).step({
|
|
59
|
+
duration: 0
|
|
60
|
+
});
|
|
61
|
+
} else {
|
|
62
|
+
animationRef.current.scale(show ? 1 : finalScale).opacity(show ? 1 : 0).step({
|
|
63
|
+
duration: show ? showDuration : hideDuration,
|
|
64
|
+
delay: delay
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
var temp = animationRef.current.export();
|
|
69
|
+
setTimeout(function () {
|
|
70
|
+
setAnim(temp);
|
|
71
|
+
}, 20);
|
|
72
|
+
show && typeof onShow === 'function' && onShow();
|
|
73
|
+
!show && typeof onHide === 'function' && onHide();
|
|
74
|
+
}, [show]);
|
|
75
|
+
return isAddNode && /*#__PURE__*/React.createElement(View, _extends({
|
|
76
|
+
animation: anim,
|
|
77
|
+
style: inlineStyle(style),
|
|
78
|
+
className: className
|
|
79
|
+
}, restProps), children);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
ScaleFadeIn.defaultProps = defaultMotionScaleFadeInProps;
|
|
83
|
+
export default ScaleFadeIn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _tuyaPanelMotion=_interopRequireDefault(require("tuya-panel-motion"));var ScalePullDown=_tuyaPanelMotion.default.ScalePullDown;var _default=ScalePullDown;exports.default=_default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _tuyaPanelMotion=_interopRequireDefault(require("tuya-panel-motion"));var ScalePullDown=_tuyaPanelMotion.default.ScalePullDown;var _default=ScalePullDown;exports.default=_default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
var Fade = /*#__PURE__*/function (_React$Component) {
|
|
8
|
+
_inherits(Fade, _React$Component);
|
|
9
|
+
|
|
10
|
+
var _super = _createSuper(Fade);
|
|
11
|
+
|
|
12
|
+
function Fade() {
|
|
13
|
+
_classCallCheck(this, Fade);
|
|
14
|
+
|
|
15
|
+
return _super.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
_createClass(Fade, [{
|
|
19
|
+
key: "render",
|
|
20
|
+
value: function render() {
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("text", null, "\u672A\u5B9E\u73B0"));
|
|
22
|
+
}
|
|
23
|
+
}]);
|
|
24
|
+
|
|
25
|
+
return Fade;
|
|
26
|
+
}(React.Component);
|
|
27
|
+
|
|
28
|
+
export { Fade as default };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["style", "className", "children", "show", "onShow", "onHide", "showDuration", "hideDuration", "delay", "initScale", "dropHeight"];
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { inlineStyle } from '@ray-js/framework-shared';
|
|
7
|
+
import { View } from '@ray-js/components';
|
|
8
|
+
import { defaultMotionScalePullDownProps } from '../props';
|
|
9
|
+
|
|
10
|
+
var ScalePullDown = function (props) {
|
|
11
|
+
var isPreShow = React.useRef(false);
|
|
12
|
+
|
|
13
|
+
var style = props.style,
|
|
14
|
+
className = props.className,
|
|
15
|
+
children = props.children,
|
|
16
|
+
show = props.show,
|
|
17
|
+
onShow = props.onShow,
|
|
18
|
+
onHide = props.onHide,
|
|
19
|
+
showDuration = props.showDuration,
|
|
20
|
+
hideDuration = props.hideDuration,
|
|
21
|
+
delay = props.delay,
|
|
22
|
+
initScale = props.initScale,
|
|
23
|
+
dropHeight = props.dropHeight,
|
|
24
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
25
|
+
|
|
26
|
+
var _React$useState = React.useState(undefined),
|
|
27
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
28
|
+
anim = _React$useState2[0],
|
|
29
|
+
setAnim = _React$useState2[1];
|
|
30
|
+
|
|
31
|
+
var _React$useState3 = React.useState(false),
|
|
32
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
33
|
+
isAddNode = _React$useState4[0],
|
|
34
|
+
setIsAddNode = _React$useState4[1]; // 是否将节点渲染到页面上
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
var animationRef = React.useRef(null);
|
|
38
|
+
var isFirstRenderRef = React.useRef(true);
|
|
39
|
+
React.useEffect(function () {
|
|
40
|
+
animationRef.current = ty.createAnimation({
|
|
41
|
+
duration: 0,
|
|
42
|
+
timingFunction: 'ease'
|
|
43
|
+
});
|
|
44
|
+
}, []);
|
|
45
|
+
React.useEffect(function () {
|
|
46
|
+
if (show) {
|
|
47
|
+
isPreShow.current = true;
|
|
48
|
+
setIsAddNode(true);
|
|
49
|
+
} else if (isPreShow.current) {
|
|
50
|
+
isPreShow.current = false;
|
|
51
|
+
setTimeout(function () {
|
|
52
|
+
setIsAddNode(false);
|
|
53
|
+
}, delay + hideDuration);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (isFirstRenderRef.current) {
|
|
57
|
+
isFirstRenderRef.current = false;
|
|
58
|
+
animationRef.current.scale(show ? 1 : initScale).opacity(show ? 1 : 0).step({
|
|
59
|
+
duration: 0
|
|
60
|
+
});
|
|
61
|
+
var temp = animationRef.current.export();
|
|
62
|
+
setAnim(temp);
|
|
63
|
+
} else {
|
|
64
|
+
if (show) {
|
|
65
|
+
animationRef.current.scale(1).opacity(1).step({
|
|
66
|
+
duration: showDuration,
|
|
67
|
+
delay: delay
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
var _temp = animationRef.current.export();
|
|
71
|
+
|
|
72
|
+
setTimeout(function () {
|
|
73
|
+
setAnim(_temp);
|
|
74
|
+
}, 20);
|
|
75
|
+
} else {
|
|
76
|
+
animationRef.current.opacity(0).translateY(dropHeight).step({
|
|
77
|
+
duration: hideDuration,
|
|
78
|
+
delay: delay
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
var _temp2 = animationRef.current.export();
|
|
82
|
+
|
|
83
|
+
setAnim(_temp2);
|
|
84
|
+
setTimeout(function () {
|
|
85
|
+
setAnim(animationRef.current.translateY(0).scale(0).step({
|
|
86
|
+
duration: 0
|
|
87
|
+
}).export());
|
|
88
|
+
}, delay + hideDuration);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
show && typeof onShow === 'function' && onShow();
|
|
93
|
+
!show && typeof onHide === 'function' && onHide();
|
|
94
|
+
}, [show]);
|
|
95
|
+
return isAddNode && /*#__PURE__*/React.createElement(View, _extends({
|
|
96
|
+
animation: anim,
|
|
97
|
+
style: inlineStyle(style),
|
|
98
|
+
className: className
|
|
99
|
+
}, restProps), children);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
ScalePullDown.defaultProps = defaultMotionScalePullDownProps;
|
|
103
|
+
export default ScalePullDown;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
|
|
7
|
+
var Fade = /*#__PURE__*/function (_React$Component) {
|
|
8
|
+
_inherits(Fade, _React$Component);
|
|
9
|
+
|
|
10
|
+
var _super = _createSuper(Fade);
|
|
11
|
+
|
|
12
|
+
function Fade() {
|
|
13
|
+
_classCallCheck(this, Fade);
|
|
14
|
+
|
|
15
|
+
return _super.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
_createClass(Fade, [{
|
|
19
|
+
key: "render",
|
|
20
|
+
value: function render() {
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("text", null, "\u672A\u5B9E\u73B0"));
|
|
22
|
+
}
|
|
23
|
+
}]);
|
|
24
|
+
|
|
25
|
+
return Fade;
|
|
26
|
+
}(React.Component);
|
|
27
|
+
|
|
28
|
+
export { Fade as default };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
var _excluded = ["style", "className", "children", "show", "onShow", "onHide", "showDuration", "hideDuration", "delay", "initScale", "dropHeight"];
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { inlineStyle } from '@ray-js/framework-shared';
|
|
7
|
+
import { View } from '@ray-js/components';
|
|
8
|
+
import { defaultMotionScalePullDownProps } from '../props';
|
|
9
|
+
|
|
10
|
+
var ScalePullDown = function (props) {
|
|
11
|
+
var isPreShow = React.useRef(false);
|
|
12
|
+
|
|
13
|
+
var style = props.style,
|
|
14
|
+
className = props.className,
|
|
15
|
+
children = props.children,
|
|
16
|
+
show = props.show,
|
|
17
|
+
onShow = props.onShow,
|
|
18
|
+
onHide = props.onHide,
|
|
19
|
+
showDuration = props.showDuration,
|
|
20
|
+
hideDuration = props.hideDuration,
|
|
21
|
+
delay = props.delay,
|
|
22
|
+
initScale = props.initScale,
|
|
23
|
+
dropHeight = props.dropHeight,
|
|
24
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
25
|
+
|
|
26
|
+
var _React$useState = React.useState(undefined),
|
|
27
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
28
|
+
anim = _React$useState2[0],
|
|
29
|
+
setAnim = _React$useState2[1];
|
|
30
|
+
|
|
31
|
+
var _React$useState3 = React.useState(false),
|
|
32
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
33
|
+
isAddNode = _React$useState4[0],
|
|
34
|
+
setIsAddNode = _React$useState4[1]; // 是否将节点渲染到页面上
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
var animationRef = React.useRef(null);
|
|
38
|
+
var isFirstRenderRef = React.useRef(true);
|
|
39
|
+
React.useEffect(function () {
|
|
40
|
+
animationRef.current = wx.createAnimation({
|
|
41
|
+
duration: 0,
|
|
42
|
+
timingFunction: 'ease'
|
|
43
|
+
});
|
|
44
|
+
}, []);
|
|
45
|
+
React.useEffect(function () {
|
|
46
|
+
if (show) {
|
|
47
|
+
isPreShow.current = true;
|
|
48
|
+
setIsAddNode(true);
|
|
49
|
+
} else if (isPreShow.current) {
|
|
50
|
+
isPreShow.current = false;
|
|
51
|
+
setTimeout(function () {
|
|
52
|
+
setIsAddNode(false);
|
|
53
|
+
}, delay + hideDuration);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (isFirstRenderRef.current) {
|
|
57
|
+
isFirstRenderRef.current = false;
|
|
58
|
+
animationRef.current.scale(show ? 1 : initScale).opacity(show ? 1 : 0).step({
|
|
59
|
+
duration: 0
|
|
60
|
+
});
|
|
61
|
+
var temp = animationRef.current.export();
|
|
62
|
+
setAnim(temp);
|
|
63
|
+
} else {
|
|
64
|
+
if (show) {
|
|
65
|
+
animationRef.current.scale(1).opacity(1).step({
|
|
66
|
+
duration: showDuration,
|
|
67
|
+
delay: delay
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
var _temp = animationRef.current.export();
|
|
71
|
+
|
|
72
|
+
setTimeout(function () {
|
|
73
|
+
setAnim(_temp);
|
|
74
|
+
}, 20);
|
|
75
|
+
} else {
|
|
76
|
+
animationRef.current.opacity(0).translateY(dropHeight).step({
|
|
77
|
+
duration: hideDuration,
|
|
78
|
+
delay: delay
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
var _temp2 = animationRef.current.export();
|
|
82
|
+
|
|
83
|
+
setAnim(_temp2);
|
|
84
|
+
setTimeout(function () {
|
|
85
|
+
setAnim(animationRef.current.translateY(0).scale(0).step({
|
|
86
|
+
duration: 0
|
|
87
|
+
}).export());
|
|
88
|
+
}, delay + hideDuration);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
show && typeof onShow === 'function' && onShow();
|
|
93
|
+
!show && typeof onHide === 'function' && onHide();
|
|
94
|
+
}, [show]);
|
|
95
|
+
return isAddNode && /*#__PURE__*/React.createElement(View, _extends({
|
|
96
|
+
animation: anim,
|
|
97
|
+
style: inlineStyle(style),
|
|
98
|
+
className: className
|
|
99
|
+
}, restProps), children);
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
ScalePullDown.defaultProps = defaultMotionScalePullDownProps;
|
|
103
|
+
export default ScalePullDown;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};exports.default=void 0;var _Fade=_interopRequireDefault(require("./Fade"));var _PullUp=_interopRequireDefault(require("./PullUp"));var _ScaleFadeIn=_interopRequireDefault(require("./ScaleFadeIn"));var _ScalePullDown=_interopRequireDefault(require("./ScalePullDown"));var _PushDown=_interopRequireDefault(require("./PushDown"));var _props=require("./props");Object.keys(_props).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_props[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _props[key];}});});var Motion={Fade:_Fade.default,PullUp:_PullUp.default,ScaleFadeIn:_ScaleFadeIn.default,ScalePullDown:_ScalePullDown.default,PushDown:_PushDown.default};var _default=Motion;exports.default=_default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Fade from './Fade';
|
|
2
|
+
import PullUp from './PullUp';
|
|
3
|
+
import ScaleFadeIn from './ScaleFadeIn';
|
|
4
|
+
import ScalePullDown from './ScalePullDown';
|
|
5
|
+
import PushDown from './PushDown';
|
|
6
|
+
export * from './props';
|
|
7
|
+
declare const Motion: {
|
|
8
|
+
Fade: typeof Fade;
|
|
9
|
+
PullUp: typeof PullUp;
|
|
10
|
+
ScaleFadeIn: typeof ScaleFadeIn;
|
|
11
|
+
ScalePullDown: typeof ScalePullDown;
|
|
12
|
+
PushDown: typeof PushDown;
|
|
13
|
+
};
|
|
14
|
+
export default Motion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};exports.default=void 0;var _Fade=_interopRequireDefault(require("./Fade"));var _PullUp=_interopRequireDefault(require("./PullUp"));var _ScaleFadeIn=_interopRequireDefault(require("./ScaleFadeIn"));var _ScalePullDown=_interopRequireDefault(require("./ScalePullDown"));var _PushDown=_interopRequireDefault(require("./PushDown"));var _props=require("./props");Object.keys(_props).forEach(function(key){if(key==="default"||key==="__esModule")return;if(Object.prototype.hasOwnProperty.call(_exportNames,key))return;if(key in exports&&exports[key]===_props[key])return;Object.defineProperty(exports,key,{enumerable:true,get:function get(){return _props[key];}});});var Motion={Fade:_Fade.default,PullUp:_PullUp.default,ScaleFadeIn:_ScaleFadeIn.default,ScalePullDown:_ScalePullDown.default,PushDown:_PushDown.default};var _default=Motion;exports.default=_default;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Fade from './Fade';
|
|
2
|
+
import PullUp from './PullUp';
|
|
3
|
+
import ScaleFadeIn from './ScaleFadeIn';
|
|
4
|
+
import ScalePullDown from './ScalePullDown';
|
|
5
|
+
import PushDown from './PushDown';
|
|
6
|
+
export * from './props';
|
|
7
|
+
var Motion = {
|
|
8
|
+
Fade: Fade,
|
|
9
|
+
PullUp: PullUp,
|
|
10
|
+
ScaleFadeIn: ScaleFadeIn,
|
|
11
|
+
ScalePullDown: ScalePullDown,
|
|
12
|
+
PushDown: PushDown
|
|
13
|
+
};
|
|
14
|
+
export default Motion;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
nav:
|
|
3
|
+
title: 组件
|
|
4
|
+
path: /components
|
|
5
|
+
group:
|
|
6
|
+
title: 视图容器
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Motion
|
|
10
|
+
|
|
11
|
+
动效
|
|
12
|
+
|
|
13
|
+
## 导入
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { Motion } from '@ray-js/components';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 示例代码
|
|
20
|
+
|
|
21
|
+
<code src="./demos/fade.tsx" title="淡入淡出" background="#f2f4f6" />
|
|
22
|
+
<code src="./demos/pullUp.tsx" title="上拉下滑" background="#f2f4f6" />
|
|
23
|
+
<code src="./demos/scaleFadeIn.tsx" title="放大淡入/缩小淡出" background="#f2f4f6" />
|
|
24
|
+
<code src="./demos/scalePullDown.tsx" title="放大淡入/下滑淡出" background="#f2f4f6" />
|
|
25
|
+
<code src="./demos/pushDown.tsx" title="下拉上推" background="#f2f4f6" />
|
|
26
|
+
|
|
27
|
+
## 公共 props
|
|
28
|
+
|
|
29
|
+
| 属性 | 类型 | 默认值 | 必填 | 说明 | 支持平台 |
|
|
30
|
+
| ------------ | ----------- | ------ | ---- | ------------ | -------------- |
|
|
31
|
+
| show | boolean | false | 否 | 是否显示内容 | RN、涂鸦、微信 |
|
|
32
|
+
| showDuration | number | 300 | 否 | 动画显示时长 | RN、涂鸦、微信 |
|
|
33
|
+
| hideDuration | number | 300 | 否 | 动画隐藏时长 | RN、涂鸦、微信 |
|
|
34
|
+
| onShow | () => void; | | 否 | 动画显示回调 | RN、涂鸦、微信 |
|
|
35
|
+
| onHide | () => void; | | 否 | 动画隐藏回调 | RN、涂鸦、微信 |
|
|
36
|
+
| delay | number | 0 | 否 | 动画延迟时间 | RN、涂鸦、微信 |
|
|
37
|
+
|
|
38
|
+
## 淡入淡出 Fade
|
|
39
|
+
|
|
40
|
+
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|
|
41
|
+
| ----------- | ------ | ------ | ---- | ---------- |
|
|
42
|
+
| fadeOpacity | number | 1 | 否 | 动画透明度 |
|
|
43
|
+
|
|
44
|
+
## 下拉上滑 PullUp
|
|
45
|
+
|
|
46
|
+
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|
|
47
|
+
| ---------- | ------ | ------ | ---- | -------- |
|
|
48
|
+
| dropHeight | number | 200 | 否 | 下拉高度 |
|
|
49
|
+
|
|
50
|
+
## ScaleFadeIn 放大淡入,缩小淡出
|
|
51
|
+
|
|
52
|
+
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|
|
53
|
+
| ---------- | ------ | ------ | ---- | ---------------- |
|
|
54
|
+
| initScale | number | 0 | 否 | 初始缩放倍数 |
|
|
55
|
+
| finalScale | number | 0 | 否 | 动画结束缩放倍数 |
|
|
56
|
+
|
|
57
|
+
## ScalePullDown 放大淡入下滑淡出
|
|
58
|
+
|
|
59
|
+
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|
|
60
|
+
| ---------- | ------ | ------ | ---- | ------------ |
|
|
61
|
+
| initScale | number | 0 | 否 | 初始缩放倍数 |
|
|
62
|
+
| dropHeight | number | 200 | 否 | 下拉的高度 |
|
|
63
|
+
|
|
64
|
+
## PushDown 下拉上推
|
|
65
|
+
|
|
66
|
+
| 属性 | 类型 | 默认值 | 必填 | 说明 |
|
|
67
|
+
| ---------- | ------ | ------ | ---- | ---------- |
|
|
68
|
+
| dropHeight | number | 200 | 否 | 下拉的高度 |
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Fade from './Fade';
|
|
2
|
+
import PullUp from './PullUp';
|
|
3
|
+
import ScaleFadeIn from './ScaleFadeIn';
|
|
4
|
+
import ScalePullDown from './ScalePullDown';
|
|
5
|
+
import PushDown from './PushDown';
|
|
6
|
+
export * from './props';
|
|
7
|
+
var Motion = {
|
|
8
|
+
Fade: Fade,
|
|
9
|
+
PullUp: PullUp,
|
|
10
|
+
ScaleFadeIn: ScaleFadeIn,
|
|
11
|
+
ScalePullDown: ScalePullDown,
|
|
12
|
+
PushDown: PushDown
|
|
13
|
+
};
|
|
14
|
+
export default Motion;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Fade from './Fade';
|
|
2
|
+
import PullUp from './PullUp';
|
|
3
|
+
import ScaleFadeIn from './ScaleFadeIn';
|
|
4
|
+
import ScalePullDown from './ScalePullDown';
|
|
5
|
+
import PushDown from './PushDown';
|
|
6
|
+
export * from './props';
|
|
7
|
+
var Motion = {
|
|
8
|
+
Fade: Fade,
|
|
9
|
+
PullUp: PullUp,
|
|
10
|
+
ScaleFadeIn: ScaleFadeIn,
|
|
11
|
+
ScalePullDown: ScalePullDown,
|
|
12
|
+
PushDown: PushDown
|
|
13
|
+
};
|
|
14
|
+
export default Motion;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Fade from './Fade';
|
|
2
|
+
import PullUp from './PullUp';
|
|
3
|
+
import ScaleFadeIn from './ScaleFadeIn';
|
|
4
|
+
import ScalePullDown from './ScalePullDown';
|
|
5
|
+
import PushDown from './PushDown';
|
|
6
|
+
export * from './props';
|
|
7
|
+
var Motion = {
|
|
8
|
+
Fade: Fade,
|
|
9
|
+
PullUp: PullUp,
|
|
10
|
+
ScaleFadeIn: ScaleFadeIn,
|
|
11
|
+
ScalePullDown: ScalePullDown,
|
|
12
|
+
PushDown: PushDown
|
|
13
|
+
};
|
|
14
|
+
export default Motion;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.defaultMotionScalePullDownProps=exports.defaultMotionScaleFadeInProps=exports.defaultMotionPushDownProps=exports.defaultMotionPullUpProps=exports.defaultMotionFadeProps=void 0;var defaultMotionFadeProps={show:false,showDuration:300,hideDuration:300,fadeOpacity:1,onShow:function onShow(){},onHide:function onHide(){},delay:0};exports.defaultMotionFadeProps=defaultMotionFadeProps;var defaultMotionPullUpProps={show:false,showDuration:300,hideDuration:300,onShow:function onShow(){},onHide:function onHide(){},delay:0,dropHeight:200};exports.defaultMotionPullUpProps=defaultMotionPullUpProps;var defaultMotionScaleFadeInProps={show:false,showDuration:300,hideDuration:300,onShow:function onShow(){},onHide:function onHide(){},delay:0,initScale:0,finalScale:0};exports.defaultMotionScaleFadeInProps=defaultMotionScaleFadeInProps;var defaultMotionScalePullDownProps={show:false,showDuration:300,hideDuration:300,onShow:function onShow(){},onHide:function onHide(){},delay:0,initScale:0,dropHeight:200};exports.defaultMotionScalePullDownProps=defaultMotionScalePullDownProps;var defaultMotionPushDownProps={show:false,showDuration:300,hideDuration:300,onShow:function onShow(){},onHide:function onHide(){},delay:0,dropHeight:200};exports.defaultMotionPushDownProps=defaultMotionPushDownProps;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { BaseProps } from '../types';
|
|
2
|
+
export interface MotionProps extends BaseProps {
|
|
3
|
+
/**
|
|
4
|
+
* @description.zh 是否显示内容
|
|
5
|
+
* @description.en Display content?
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
8
|
+
show?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* @description.zh 动画显示时长
|
|
11
|
+
* @description.en Animation display duration
|
|
12
|
+
* @default 300
|
|
13
|
+
*/
|
|
14
|
+
showDuration?: number;
|
|
15
|
+
/**
|
|
16
|
+
* @description.zh 动画隐藏时长
|
|
17
|
+
* @description.en Animation hide duration
|
|
18
|
+
* @default 300
|
|
19
|
+
*/
|
|
20
|
+
hideDuration?: number;
|
|
21
|
+
/**
|
|
22
|
+
* @description.zh 动画显示回调
|
|
23
|
+
* @description.en Animation display callback
|
|
24
|
+
* @default () => {}
|
|
25
|
+
*/
|
|
26
|
+
onShow?: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* @description.zh 动画隐藏回调
|
|
29
|
+
* @description.en Animation hide callback
|
|
30
|
+
* @default () => {}
|
|
31
|
+
*/
|
|
32
|
+
onHide?: () => void;
|
|
33
|
+
delay: number;
|
|
34
|
+
children: any;
|
|
35
|
+
}
|
|
36
|
+
export interface MotionFadeProps extends MotionProps {
|
|
37
|
+
/**
|
|
38
|
+
* @description.zh 动画不透明度
|
|
39
|
+
* @description.en Animation opacity
|
|
40
|
+
* @default 1
|
|
41
|
+
*/
|
|
42
|
+
fadeOpacity?: number;
|
|
43
|
+
}
|
|
44
|
+
export declare const defaultMotionFadeProps: Partial<MotionFadeProps>;
|
|
45
|
+
export interface MotionPullUpProps extends MotionProps {
|
|
46
|
+
/**
|
|
47
|
+
* @description.zh 下拉的高度
|
|
48
|
+
* @description.en Height of pull down
|
|
49
|
+
* @default 200
|
|
50
|
+
*/
|
|
51
|
+
dropHeight?: number;
|
|
52
|
+
}
|
|
53
|
+
export declare const defaultMotionPullUpProps: Partial<MotionPullUpProps>;
|
|
54
|
+
export interface MotionScaleFadeInProps extends MotionProps {
|
|
55
|
+
/**
|
|
56
|
+
* @description.zh 初始缩放倍数
|
|
57
|
+
* @description.en Initial zoom factor
|
|
58
|
+
* @default 0
|
|
59
|
+
*/
|
|
60
|
+
initScale?: number;
|
|
61
|
+
/**
|
|
62
|
+
* @description.zh 动画结束缩放倍数
|
|
63
|
+
* @description.en Animation end zoom multiple
|
|
64
|
+
* @default 0
|
|
65
|
+
*/
|
|
66
|
+
finalScale?: number;
|
|
67
|
+
}
|
|
68
|
+
export declare const defaultMotionScaleFadeInProps: Partial<MotionScaleFadeInProps>;
|
|
69
|
+
export interface MotionScalePullDownProps extends MotionProps {
|
|
70
|
+
/**
|
|
71
|
+
* @description.zh 初始缩放倍数
|
|
72
|
+
* @description.en Initial zoom factor
|
|
73
|
+
* @default 0
|
|
74
|
+
*/
|
|
75
|
+
initScale?: number;
|
|
76
|
+
/**
|
|
77
|
+
* @description.zh 下拉的高度
|
|
78
|
+
* @description.en Height of pull down
|
|
79
|
+
* @default 100
|
|
80
|
+
*/
|
|
81
|
+
dropHeight?: number;
|
|
82
|
+
}
|
|
83
|
+
export declare const defaultMotionScalePullDownProps: Partial<MotionScalePullDownProps>;
|
|
84
|
+
export interface MotionPushDownProps extends MotionProps {
|
|
85
|
+
/**
|
|
86
|
+
* @description.zh 下拉的高度
|
|
87
|
+
* @description.en Height of pull down
|
|
88
|
+
* @default 200
|
|
89
|
+
*/
|
|
90
|
+
dropHeight?: number;
|
|
91
|
+
}
|
|
92
|
+
export declare const defaultMotionPushDownProps: Partial<MotionPushDownProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.defaultMotionScalePullDownProps=exports.defaultMotionScaleFadeInProps=exports.defaultMotionPushDownProps=exports.defaultMotionPullUpProps=exports.defaultMotionFadeProps=void 0;var defaultMotionFadeProps={show:false,showDuration:300,hideDuration:300,fadeOpacity:1,onShow:function onShow(){},onHide:function onHide(){},delay:0};exports.defaultMotionFadeProps=defaultMotionFadeProps;var defaultMotionPullUpProps={show:false,showDuration:300,hideDuration:300,onShow:function onShow(){},onHide:function onHide(){},delay:0,dropHeight:200};exports.defaultMotionPullUpProps=defaultMotionPullUpProps;var defaultMotionScaleFadeInProps={show:false,showDuration:300,hideDuration:300,onShow:function onShow(){},onHide:function onHide(){},delay:0,initScale:0,finalScale:0};exports.defaultMotionScaleFadeInProps=defaultMotionScaleFadeInProps;var defaultMotionScalePullDownProps={show:false,showDuration:300,hideDuration:300,onShow:function onShow(){},onHide:function onHide(){},delay:0,initScale:0,dropHeight:200};exports.defaultMotionScalePullDownProps=defaultMotionScalePullDownProps;var defaultMotionPushDownProps={show:false,showDuration:300,hideDuration:300,onShow:function onShow(){},onHide:function onHide(){},delay:0,dropHeight:200};exports.defaultMotionPushDownProps=defaultMotionPushDownProps;
|