@ray-js/components 0.3.0-beta.1c347991
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.d.ts +4 -0
- package/lib/Button/Button.ios.js +1 -0
- package/lib/Button/Button.js +57 -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/Button.wechat.d.ts +4 -0
- package/lib/Button/Button.wechat.js +44 -0
- package/lib/Button/index.android.js +1 -0
- package/lib/Button/index.d.ts +3 -0
- package/lib/Button/index.ios.js +1 -0
- package/lib/Button/index.js +3 -0
- package/lib/Button/index.md +41 -0
- package/lib/Button/index.module.less +129 -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.d.ts +18 -0
- package/lib/Button/props.ios.js +1 -0
- package/lib/Button/props.js +10 -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.d.ts +5 -0
- package/lib/Checkbox/Checkbox.ios.js +1 -0
- package/lib/Checkbox/Checkbox.js +36 -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/Checkbox.wechat.d.ts +4 -0
- package/lib/Checkbox/Checkbox.wechat.js +24 -0
- package/lib/Checkbox/index.android.js +1 -0
- package/lib/Checkbox/index.d.ts +3 -0
- package/lib/Checkbox/index.ios.js +1 -0
- package/lib/Checkbox/index.js +3 -0
- package/lib/Checkbox/index.md +33 -0
- package/lib/Checkbox/index.module.less +11 -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.d.ts +7 -0
- package/lib/Checkbox/props.ios.js +1 -0
- package/lib/Checkbox/props.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.d.ts +4 -0
- package/lib/CheckboxGroup/CheckboxGroup.ios.js +1 -0
- package/lib/CheckboxGroup/CheckboxGroup.js +9 -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/CheckboxGroup.wechat.d.ts +4 -0
- package/lib/CheckboxGroup/CheckboxGroup.wechat.js +35 -0
- package/lib/CheckboxGroup/index.android.js +1 -0
- package/lib/CheckboxGroup/index.d.ts +3 -0
- package/lib/CheckboxGroup/index.ios.js +1 -0
- package/lib/CheckboxGroup/index.js +3 -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.d.ts +13 -0
- package/lib/CheckboxGroup/props.ios.js +1 -0
- package/lib/CheckboxGroup/props.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.d.ts +5 -0
- package/lib/Icon/Icon.ios.js +1 -0
- package/lib/Icon/Icon.js +23 -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/Icon.wechat.d.ts +5 -0
- package/lib/Icon/Icon.wechat.js +23 -0
- package/lib/Icon/iconfont/iconfont.android.js +1 -0
- package/lib/Icon/iconfont/iconfont.css +765 -0
- package/lib/Icon/iconfont/iconfont.ios.js +1 -0
- package/lib/Icon/iconfont/iconfont.js +47 -0
- package/lib/Icon/iconfont/iconfont.json +1318 -0
- package/lib/Icon/iconfont/iconfont.ttf +0 -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/iconfont.woff +0 -0
- package/lib/Icon/iconfont/iconfont.woff2 +0 -0
- package/lib/Icon/iconfont-rn/iconfont.json +189 -0
- package/lib/Icon/index.android.js +1 -0
- package/lib/Icon/index.d.ts +3 -0
- package/lib/Icon/index.ios.js +1 -0
- package/lib/Icon/index.js +3 -0
- package/lib/Icon/index.less +5 -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.d.ts +9 -0
- package/lib/Icon/props.ios.js +1 -0
- package/lib/Icon/props.js +5 -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.d.ts +4 -0
- package/lib/Image/Image.ios.js +1 -0
- package/lib/Image/Image.js +92 -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/Image.wechat.d.ts +4 -0
- package/lib/Image/Image.wechat.js +51 -0
- package/lib/Image/index.android.js +1 -0
- package/lib/Image/index.d.ts +3 -0
- package/lib/Image/index.ios.js +1 -0
- package/lib/Image/index.js +3 -0
- package/lib/Image/index.md +50 -0
- package/lib/Image/index.module.less +6 -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.d.ts +24 -0
- package/lib/Image/props.ios.js +1 -0
- package/lib/Image/props.js +4 -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.d.ts +4 -0
- package/lib/Input/Input.ios.js +1 -0
- package/lib/Input/Input.js +100 -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/Input.wechat.d.ts +4 -0
- package/lib/Input/Input.wechat.js +110 -0
- package/lib/Input/index.android.js +1 -0
- package/lib/Input/index.d.ts +3 -0
- package/lib/Input/index.ios.js +1 -0
- package/lib/Input/index.js +3 -0
- package/lib/Input/index.md +43 -0
- package/lib/Input/index.module.less +17 -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.d.ts +36 -0
- package/lib/Input/props.ios.js +1 -0
- package/lib/Input/props.js +7 -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.d.ts +4 -0
- package/lib/Label/Label.ios.js +1 -0
- package/lib/Label/Label.js +24 -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/Label.wechat.d.ts +4 -0
- package/lib/Label/Label.wechat.js +21 -0
- package/lib/Label/index.android.js +1 -0
- package/lib/Label/index.d.ts +3 -0
- package/lib/Label/index.ios.js +1 -0
- package/lib/Label/index.js +3 -0
- package/lib/Label/index.module.less +4 -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.d.ts +4 -0
- package/lib/Label/props.ios.js +1 -0
- package/lib/Label/props.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.d.ts +3 -0
- package/lib/Modal/index.ios.js +1 -0
- package/lib/Modal/index.js +3 -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.web.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/Picker/Picker.android.js +1 -0
- package/lib/Picker/Picker.d.ts +4 -0
- package/lib/Picker/Picker.ios.js +1 -0
- package/lib/Picker/Picker.js +11 -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/Picker.wechat.d.ts +4 -0
- package/lib/Picker/Picker.wechat.js +70 -0
- package/lib/Picker/index.android.js +1 -0
- package/lib/Picker/index.d.ts +3 -0
- package/lib/Picker/index.ios.js +1 -0
- package/lib/Picker/index.js +3 -0
- package/lib/Picker/index.md +35 -0
- package/lib/Picker/index.module.less +0 -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.d.ts +4 -0
- package/lib/PickerView/PickerView.ios.js +1 -0
- package/lib/PickerView/PickerView.js +11 -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/PickerView.wechat.d.ts +4 -0
- package/lib/PickerView/PickerView.wechat.js +72 -0
- package/lib/PickerView/index.android.js +1 -0
- package/lib/PickerView/index.d.ts +3 -0
- package/lib/PickerView/index.ios.js +1 -0
- package/lib/PickerView/index.js +3 -0
- package/lib/PickerView/index.md +32 -0
- package/lib/PickerView/index.module.less +8 -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.d.ts +10 -0
- package/lib/PickerView/props.ios.js +1 -0
- package/lib/PickerView/props.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.d.ts +4 -0
- package/lib/Radio/Radio.ios.js +1 -0
- package/lib/Radio/Radio.js +13 -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/Radio.wechat.d.ts +4 -0
- package/lib/Radio/Radio.wechat.js +24 -0
- package/lib/Radio/index.android.js +1 -0
- package/lib/Radio/index.d.ts +3 -0
- package/lib/Radio/index.ios.js +1 -0
- package/lib/Radio/index.js +3 -0
- package/lib/Radio/index.md +30 -0
- package/lib/Radio/index.module.less +0 -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.d.ts +7 -0
- package/lib/Radio/props.ios.js +1 -0
- package/lib/Radio/props.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.d.ts +4 -0
- package/lib/RadioGroup/RadioGroup.ios.js +1 -0
- package/lib/RadioGroup/RadioGroup.js +9 -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/RadioGroup.wechat.d.ts +4 -0
- package/lib/RadioGroup/RadioGroup.wechat.js +35 -0
- package/lib/RadioGroup/index.android.js +1 -0
- package/lib/RadioGroup/index.d.ts +3 -0
- package/lib/RadioGroup/index.ios.js +1 -0
- package/lib/RadioGroup/index.js +3 -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.d.ts +14 -0
- package/lib/RadioGroup/props.ios.js +1 -0
- package/lib/RadioGroup/props.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.d.ts +4 -0
- package/lib/ScrollView/ScrollView.ios.js +1 -0
- package/lib/ScrollView/ScrollView.js +169 -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/ScrollView.wechat.d.ts +4 -0
- package/lib/ScrollView/ScrollView.wechat.js +20 -0
- package/lib/ScrollView/index.android.js +1 -0
- package/lib/ScrollView/index.d.ts +3 -0
- package/lib/ScrollView/index.ios.js +1 -0
- package/lib/ScrollView/index.js +3 -0
- package/lib/ScrollView/index.md +37 -0
- package/lib/ScrollView/index.module.less +6 -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.d.ts +4 -0
- package/lib/Slider/Slider.ios.js +1 -0
- package/lib/Slider/Slider.js +20 -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/Slider.wechat.d.ts +4 -0
- package/lib/Slider/Slider.wechat.js +40 -0
- package/lib/Slider/index.android.js +1 -0
- package/lib/Slider/index.d.ts +3 -0
- package/lib/Slider/index.ios.js +1 -0
- package/lib/Slider/index.js +3 -0
- package/lib/Slider/index.md +42 -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.d.ts +34 -0
- package/lib/Slider/props.ios.js +1 -0
- package/lib/Slider/props.js +11 -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.d.ts +7 -0
- package/lib/Swiper/Swiper.ios.js +1 -0
- package/lib/Swiper/Swiper.js +10 -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/Swiper.wechat.d.ts +7 -0
- package/lib/Swiper/Swiper.wechat.js +55 -0
- package/lib/Swiper/index.android.js +1 -0
- package/lib/Swiper/index.d.ts +3 -0
- package/lib/Swiper/index.ios.js +1 -0
- package/lib/Swiper/index.js +3 -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.d.ts +44 -0
- package/lib/Swiper/props.ios.js +1 -0
- package/lib/Swiper/props.js +16 -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.d.ts +4 -0
- package/lib/Switch/Switch.ios.js +1 -0
- package/lib/Switch/Switch.js +13 -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/Switch.wechat.d.ts +5 -0
- package/lib/Switch/Switch.wechat.js +36 -0
- package/lib/Switch/index.android.js +1 -0
- package/lib/Switch/index.d.ts +3 -0
- package/lib/Switch/index.ios.js +1 -0
- package/lib/Switch/index.js +3 -0
- package/lib/Switch/index.md +31 -0
- package/lib/Switch/index.module.less +7 -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.d.ts +20 -0
- package/lib/Switch/props.ios.js +1 -0
- package/lib/Switch/props.js +5 -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.d.ts +4 -0
- package/lib/Text/Text.ios.js +1 -0
- package/lib/Text/Text.js +41 -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/Text.wechat.d.ts +4 -0
- package/lib/Text/Text.wechat.js +33 -0
- package/lib/Text/index.android.js +1 -0
- package/lib/Text/index.d.ts +3 -0
- package/lib/Text/index.ios.js +1 -0
- package/lib/Text/index.js +3 -0
- package/lib/Text/index.md +29 -0
- package/lib/Text/index.module.less +3 -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.d.ts +14 -0
- package/lib/Text/props.ios.js +1 -0
- package/lib/Text/props.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.d.ts +4 -0
- package/lib/Textarea/Textarea.ios.js +1 -0
- package/lib/Textarea/Textarea.js +120 -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/Textarea.wechat.d.ts +4 -0
- package/lib/Textarea/Textarea.wechat.js +60 -0
- package/lib/Textarea/index.android.js +1 -0
- package/lib/Textarea/index.d.ts +3 -0
- package/lib/Textarea/index.ios.js +1 -0
- package/lib/Textarea/index.js +3 -0
- package/lib/Textarea/index.md +46 -0
- package/lib/Textarea/index.module.less +12 -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.d.ts +21 -0
- package/lib/Textarea/props.ios.js +1 -0
- package/lib/Textarea/props.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.d.ts +4 -0
- package/lib/View/View.ios.js +1 -0
- package/lib/View/View.js +70 -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/View.wechat.d.ts +4 -0
- package/lib/View/View.wechat.js +76 -0
- package/lib/View/index.android.js +1 -0
- package/lib/View/index.d.ts +3 -0
- package/lib/View/index.ios.js +1 -0
- package/lib/View/index.js +3 -0
- package/lib/View/index.md +33 -0
- package/lib/View/index.module.less +10 -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.d.ts +11 -0
- package/lib/View/props.ios.js +1 -0
- package/lib/View/props.js +4 -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/back.png +0 -0
- package/lib/assets/edit.png +0 -0
- package/lib/assets/icons.android.js +1 -0
- package/lib/assets/icons.d.ts +7 -0
- package/lib/assets/icons.ios.js +1 -0
- package/lib/assets/icons.js +7 -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/assets/loading-warn.png +0 -0
- package/lib/assets/loading.png +0 -0
- package/lib/assets/success_no_circle.png +0 -0
- package/lib/core/index.android.js +1 -0
- package/lib/core/index.d.ts +6 -0
- package/lib/core/index.ios.js +1 -0
- package/lib/core/index.js +25 -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.d.ts +24 -0
- package/lib/index.ios.js +1 -0
- package/lib/index.js +24 -0
- package/lib/index.tuya.js +24 -0
- package/lib/index.web.js +24 -0
- package/lib/index.wechat.js +24 -0
- package/lib/style/var.less +26 -0
- package/lib/types/event.android.js +0 -0
- package/lib/types/event.d.ts +3 -0
- package/lib/types/event.ios.js +0 -0
- package/lib/types/event.js +1 -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.d.ts +54 -0
- package/lib/types/index.ios.js +1 -0
- package/lib/types/index.js +9 -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 +61 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};exports.default=void 0;var _Icon=_interopRequireDefault(require("./Icon"));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 _default=_Icon.default;exports.default=_default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};exports.default=void 0;var _Icon=_interopRequireDefault(require("./Icon"));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 _default=_Icon.default;exports.default=_default;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
nav:
|
|
3
|
+
title: 组件
|
|
4
|
+
path: /components
|
|
5
|
+
group:
|
|
6
|
+
title: 基础组件
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Icon
|
|
10
|
+
|
|
11
|
+
图标
|
|
12
|
+
|
|
13
|
+
## 导入
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { Icon } from '@ray-js/components';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 示例代码
|
|
20
|
+
|
|
21
|
+
<code src="./demos/basic.tsx" title="基本用法" background="#f2f4f6"/>
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| 属性 | 类型 | 默认值 | 说明 | 支持平台 |
|
|
26
|
+
| --- | --- | --- | --- | --- |
|
|
27
|
+
| type | string | | 图标类型,类型名等于 https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=3149224 iconfont 的 font class 名 | 涂鸦、微信、RN |
|
|
28
|
+
| size | number | 16 | 图标大小,单位 px | 涂鸦、微信、RN |
|
|
29
|
+
| color | string | #333333 | 图标颜色 | 涂鸦、微信、RN |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.defaultIconProps=void 0;var defaultIconProps={size:16,type:'icon-warning',color:'#333333'};exports.defaultIconProps=defaultIconProps;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseProps } from '../types';
|
|
2
|
+
import { TouchEventHandler } from '@ray-js/framework-shared';
|
|
3
|
+
export interface IconProps extends BaseProps, TouchEventHandler {
|
|
4
|
+
type: IconFontName;
|
|
5
|
+
size?: number;
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const defaultIconProps: IconProps;
|
|
9
|
+
export declare type IconFontName = 'icon-warning' | 'icon-right' | 'icon-up' | 'icon-down' | 'icon-right-copy' | 'icon-right-copy1' | 'icon-a-cloudsunboltfill' | 'icon-a-cloudhailfill' | 'icon-a-cloudrainfill' | 'icon-deskclock' | 'icon-a-cloudsleetfill' | 'icon-a-arrowtrianglecapsulepath' | 'icon-a-cloudfogfill' | 'icon-a-clouddrizzlefill' | 'icon-a-cloudsunrainfill' | 'icon-a-crownfill' | 'icon-a-deskclockfill' | 'icon-a-envelopeopenfill' | 'icon-a-desktopcomputerandarrowdown' | 'icon-a-ferryfill' | 'icon-a-dropfill' | 'icon-a-cloudmoonfill' | 'icon-a-icloudandarrowdownfill' | 'icon-a-heartfill' | 'icon-a-icloudcirclefill' | 'icon-a-giftfill' | 'icon-a-handpointupleftfill' | 'icon-icon' | 'icon-a-exclamationmarkicloudfill' | 'icon-a-facesmilingfill' | 'icon-a-cloudsunfill' | 'icon-a-figurewalk' | 'icon-a-envelopebadge' | 'icon-a-locationnorthfill' | 'icon-a-minussquarefill' | 'icon-a-icloudslashfill' | 'icon-a-lockicloudfill' | 'icon-a-flamefill' | 'icon-left' | 'icon-a-linkicloudfill' | 'icon-a-micfill' | 'icon-icon-2' | 'icon-a-latch2casefill' | 'icon-a-exclamationmarkbubblefill' | 'icon-a-pausefill' | 'icon-a-paintbrushfill' | 'icon-a-moonfill' | 'icon-a-keyicloudfill' | 'icon-a-messagefill' | 'icon-a-envelopefill' | 'icon-a-moonstarsfill' | 'icon-a-icloudandarrowupfill' | 'icon-checkmark-3' | 'icon-a-locationcirclefill' | 'icon-a-forwardendaltfill' | 'icon-a-clockfill' | 'icon-bonjour' | 'icon-a-icloudcircle' | 'icon-a-leaffill' | 'icon-a-paintbrushpointedfill' | 'icon-a-cloudsnowfill' | 'icon-a-playfill' | 'icon-a-plussquarefill' | 'icon-a-minuscirclefill' | 'icon-a-personicloudfill' | 'icon-a-phonefill' | 'icon-a-pawprintfill' | 'icon-plus' | 'icon-a-scribblevariable' | 'icon-a-phoneandwaveformfill' | 'icon-a-phonedownfill' | 'icon-a-pluscirclefill' | 'icon-a-repeat1' | 'icon-a-printerfillandpaperfill' | 'icon-a-scrollfill' | 'icon-snow' | 'icon-a-speakerwave1fill' | 'icon-scissors' | 'icon-a-playrectanglefill' | 'icon-a-globeamericasfill' | 'icon-a-dotradiowavesleftandright' | 'icon-minus' | 'icon-a-stopfill' | 'icon-a-suitcasefill' | 'icon-a-sunrisefill' | 'icon-a-thermometersunfill' | 'icon-a-trainsidefrontcar' | 'icon-a-speakerwave3fill' | 'icon-a-cloudheavyrainfill' | 'icon-a-eyedropperhalffull' | 'icon-a-sunminfill' | 'icon-a-sunsetfill' | 'icon-a-timersquare' | 'icon-stopwatch' | 'icon-thermometer' | 'icon-repeat' | 'icon-a-stopwatchfill' | 'icon-a-sunmaxfill' | 'icon-a-icloudfill' | 'icon-a-tramfill' | 'icon-tornado' | 'icon-a-videoslashfill' | 'icon-personalhotspot' | 'icon-a-thermometersnowflake' | 'icon-a-sunhazefill' | 'icon-a-videofill' | 'icon-sparkles' | 'icon-a-facemaskfill' | 'icon-a-wave3backwardcirclefill' | 'icon-a-wave3leftcirclefill' | 'icon-a-wandandstarsinverse' | 'icon-a-wave3rightcirclefill' | 'icon-xmark' | 'icon-a-wave3right' | 'icon-a-waveformandmic' | 'icon-a-wifiexclamationmark' | 'icon-wifi' | 'icon-a-xmarkicloudfill' | 'icon-wind' | 'icon-timer' | 'icon-a-wrenchandscrewdriverfill' | 'icon-a-wave3forwardcirclefill' | 'icon-a-lockfill' | 'icon-a-wifislash' | 'icon-a-windsnow' | 'icon-a-wave3forward' | 'icon-cancel' | 'icon-a-arrowbackward' | 'icon-a-arrowdown' | 'icon-alarm' | 'icon-a-alarmfill' | 'icon-a-airplanedeparture' | 'icon-a-arrowlefttolinealt' | 'icon-a-arrowforward' | 'icon-airplane' | 'icon-a-arrow2squarepath' | 'icon-a-antennaradiowavesleftandright' | 'icon-a-arrowshapeturnuprightfill' | 'icon-a-arrowcounterclockwise' | 'icon-a-arrowturndownleft' | 'icon-a-arrowturnupleft' | 'icon-a-airplanearrival' | 'icon-a-boltfill' | 'icon-a-arrowturnrightup' | 'icon-a-arrowcounterclockwiseicloudfill' | 'icon-a-bellfill' | 'icon-a-arrowupanddownandarrowleftandright' | 'icon-a-beddoublefill' | 'icon-a-arrowshapeturnupleft2fill' | 'icon-a-arrowtrianglerightfillandlineverticalandarr' | 'icon-a-bolthorizontalicloudfill' | 'icon-a-boltheartfill' | 'icon-a-arrowupleftanddownrightandarrowuprightan' | 'icon-a-arrowclockwiseicloudfill' | 'icon-a-arrowupbackwardandarrowdownforward' | 'icon-a-arrowturndownright' | 'icon-bold' | 'icon-a-arrowleftarrowright' | 'icon-a-bolthorizontalfill' | 'icon-checkmark' | 'icon-a-arrowrighttolinealt' | 'icon-a-bubblerightfill' | 'icon-checkmark-2' | 'icon-clock' | 'icon-a-carfill' | 'icon-a-backwardendaltfill' | 'icon-checkmark-4' | 'icon-a-chevronright2' | 'icon-a-cloudboltrainfill' | 'icon-a-bolthorizontalcirclefill' | 'icon-a-chevronleft2' | 'icon-a-chevroncompactdown' | 'icon-a-briefcasefill' | 'icon-a-arrowturnupright' | 'icon-a-cloudboltfill' | 'icon-a-cloudfill' | 'icon-a-bubbleleftandbubblerightfill' | 'icon-a-bellbadgefill' | 'icon-checkmark-1' | 'icon-a-cloudmoonrainfill' | 'icon-a-chevroncompactright' | 'icon-a-crossfill' | 'icon-a-busfill' | 'icon-a-arrowturnleftup' | 'icon-a-cloudmoonboltfill' | 'icon-a-arrowtriangleleftfillandlineverticalandarro' | 'icon-a-checkmarkicloudfill';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.defaultIconProps=void 0;var defaultIconProps={size:16,type:'icon-warning',color:'#333333'};exports.defaultIconProps=defaultIconProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports._Image=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _props=require("./props");var _jsxFileName="/drone/src/packages/components/src/Image/Image.native.tsx";var _excluded=["src","mode","style"];function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var resizeModeMap={scaleToFill:'stretch',aspectFit:'contain',aspectFill:'cover',center:'center'};var _Image=function(_React$Component){(0,_inherits2.default)(_Image,_React$Component);var _super=_createSuper(_Image);function _Image(){var _this;(0,_classCallCheck2.default)(this,_Image);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.state={ratio:0,layoutWidth:0};_this.hasLayout=false;_this._onLoad=function(){var _this$props=_this.props,onLoad=_this$props.onLoad,src=_this$props.src;if(typeof onLoad==='function'){if(typeof src==='string'){_reactNative.Image.getSize(src,function(width,height){onLoad({width:width,height:height,origin:null});},function(){onLoad({width:0,height:0,origin:null});});}else{var iras=_reactNative.Image.resolveAssetSource(typeof src==='string'?{uri:src}:src);var _ref=iras||{width:0,height:0},width=_ref.width,height=_ref.height;onLoad({width:width,height:height,origin:null});}}};_this._onError=function(){var onError=_this.props.onError;!!onError&&onError({errMsg:'Image is on error',origin:null});};_this.onLayout=function(event){var _this$props2=_this.props,mode=_this$props2.mode,style=_this$props2.style;var layoutWidth=event.nativeEvent.layout.width;var flattenStyle=_reactNative.StyleSheet.flatten(style)||{};if(mode==='widthFix'&&typeof flattenStyle.width==='string'){if(_this.hasLayout)return;_this.setState({layoutWidth:layoutWidth});}if(_this.state.ratio){_this.hasLayout=true;}};_this.loadImg=function(props){var mode=props.mode,src=props.src;if(mode!=='widthFix')return;if(typeof src==='string'){_reactNative.Image.getSize(props.src,function(width,height){if(_this.hasLayout)return;_this.setState({ratio:height/width});});}else{var source=typeof props.src==='string'?{uri:props.src}:props.src;var _ref2=_reactNative.Image.resolveAssetSource(source)||{},width=_ref2.width,height=_ref2.height;if(_this.hasLayout&&!!_this.state.ratio)return;_this.setState({ratio:height/width});}};return _this;}(0,_createClass2.default)(_Image,[{key:"componentDidMount",value:function componentDidMount(){this.loadImg(this.props);}},{key:"shouldComponentUpdate",value:function shouldComponentUpdate(nextProps){if(nextProps.src!==this.props.src){this.hasLayout=false;}return true;}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){if(prevProps.src!==this.props.src){this.loadImg(this.props);}}},{key:"render",value:function render(){var _this2=this;var _this$props3=this.props,_this$props3$src=_this$props3.src,src=_this$props3$src===void 0?'':_this$props3$src,_this$props3$mode=_this$props3.mode,mode=_this$props3$mode===void 0?'scaleToFill':_this$props3$mode,style=_this$props3.style,rest=(0,_objectWithoutProperties2.default)(_this$props3,_excluded);var source=typeof src==='string'?{uri:src}:src;var resizeMode=resizeModeMap[mode];var flattenStyle=_reactNative.StyleSheet.flatten(style)||{};var defaultHeight=flattenStyle.height||225;var imageHeight=function(){if(mode==='widthFix'){if(typeof flattenStyle.width==='string'){return _this2.state.layoutWidth*_this2.state.ratio;}else if(typeof flattenStyle.width==='number'){return flattenStyle.width*_this2.state.ratio;}else{return 300*_this2.state.ratio;}}else{return defaultHeight;}}();return _react.default.createElement(_reactNative.Image,(0,_extends2.default)({},rest,{source:source,resizeMode:resizeMode,onLoad:this._onLoad,onError:this._onError,style:[{width:300},style,{height:imageHeight}],__self:this,__source:{fileName:_jsxFileName,lineNumber:177,columnNumber:12}}));}}]);return _Image;}(_react.default.Component);exports._Image=_Image;_Image.defaultProps=_props.defaultImageProps;var _default=_Image;exports.default=_default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports._Image=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _props=require("./props");var _jsxFileName="/drone/src/packages/components/src/Image/Image.native.tsx";var _excluded=["src","mode","style"];function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var resizeModeMap={scaleToFill:'stretch',aspectFit:'contain',aspectFill:'cover',center:'center'};var _Image=function(_React$Component){(0,_inherits2.default)(_Image,_React$Component);var _super=_createSuper(_Image);function _Image(){var _this;(0,_classCallCheck2.default)(this,_Image);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.state={ratio:0,layoutWidth:0};_this.hasLayout=false;_this._onLoad=function(){var _this$props=_this.props,onLoad=_this$props.onLoad,src=_this$props.src;if(typeof onLoad==='function'){if(typeof src==='string'){_reactNative.Image.getSize(src,function(width,height){onLoad({width:width,height:height,origin:null});},function(){onLoad({width:0,height:0,origin:null});});}else{var iras=_reactNative.Image.resolveAssetSource(typeof src==='string'?{uri:src}:src);var _ref=iras||{width:0,height:0},width=_ref.width,height=_ref.height;onLoad({width:width,height:height,origin:null});}}};_this._onError=function(){var onError=_this.props.onError;!!onError&&onError({errMsg:'Image is on error',origin:null});};_this.onLayout=function(event){var _this$props2=_this.props,mode=_this$props2.mode,style=_this$props2.style;var layoutWidth=event.nativeEvent.layout.width;var flattenStyle=_reactNative.StyleSheet.flatten(style)||{};if(mode==='widthFix'&&typeof flattenStyle.width==='string'){if(_this.hasLayout)return;_this.setState({layoutWidth:layoutWidth});}if(_this.state.ratio){_this.hasLayout=true;}};_this.loadImg=function(props){var mode=props.mode,src=props.src;if(mode!=='widthFix')return;if(typeof src==='string'){_reactNative.Image.getSize(props.src,function(width,height){if(_this.hasLayout)return;_this.setState({ratio:height/width});});}else{var source=typeof props.src==='string'?{uri:props.src}:props.src;var _ref2=_reactNative.Image.resolveAssetSource(source)||{},width=_ref2.width,height=_ref2.height;if(_this.hasLayout&&!!_this.state.ratio)return;_this.setState({ratio:height/width});}};return _this;}(0,_createClass2.default)(_Image,[{key:"componentDidMount",value:function componentDidMount(){this.loadImg(this.props);}},{key:"shouldComponentUpdate",value:function shouldComponentUpdate(nextProps){if(nextProps.src!==this.props.src){this.hasLayout=false;}return true;}},{key:"componentDidUpdate",value:function componentDidUpdate(prevProps){if(prevProps.src!==this.props.src){this.loadImg(this.props);}}},{key:"render",value:function render(){var _this2=this;var _this$props3=this.props,_this$props3$src=_this$props3.src,src=_this$props3$src===void 0?'':_this$props3$src,_this$props3$mode=_this$props3.mode,mode=_this$props3$mode===void 0?'scaleToFill':_this$props3$mode,style=_this$props3.style,rest=(0,_objectWithoutProperties2.default)(_this$props3,_excluded);var source=typeof src==='string'?{uri:src}:src;var resizeMode=resizeModeMap[mode];var flattenStyle=_reactNative.StyleSheet.flatten(style)||{};var defaultHeight=flattenStyle.height||225;var imageHeight=function(){if(mode==='widthFix'){if(typeof flattenStyle.width==='string'){return _this2.state.layoutWidth*_this2.state.ratio;}else if(typeof flattenStyle.width==='number'){return flattenStyle.width*_this2.state.ratio;}else{return 300*_this2.state.ratio;}}else{return defaultHeight;}}();return _react.default.createElement(_reactNative.Image,(0,_extends2.default)({},rest,{source:source,resizeMode:resizeMode,onLoad:this._onLoad,onError:this._onError,style:[{width:300},style,{height:imageHeight}],__self:this,__source:{fileName:_jsxFileName,lineNumber:177,columnNumber:12}}));}}]);return _Image;}(_react.default.Component);exports._Image=_Image;_Image.defaultProps=_props.defaultImageProps;var _default=_Image;exports.default=_default;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["id", "className", "src", "style", "mode", "onClick", "onLoad", "onError"];
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { inlineStyle } from '@ray-js/framework-shared';
|
|
7
|
+
import styles from './index.module.less';
|
|
8
|
+
var modeStyle = {
|
|
9
|
+
scaleToFill: {
|
|
10
|
+
backgroundSize: '100% 100%'
|
|
11
|
+
},
|
|
12
|
+
aspectFit: {
|
|
13
|
+
backgroundSize: 'contain',
|
|
14
|
+
backgroundPosition: 'center'
|
|
15
|
+
},
|
|
16
|
+
widthFix: {
|
|
17
|
+
backgroundSize: '100% 100%',
|
|
18
|
+
height: 'auto',
|
|
19
|
+
lineHeight: 0
|
|
20
|
+
},
|
|
21
|
+
heightFix: {
|
|
22
|
+
backgroundSize: '100% 100%',
|
|
23
|
+
width: 'auto',
|
|
24
|
+
lineHeight: 0
|
|
25
|
+
},
|
|
26
|
+
aspectFill: {
|
|
27
|
+
backgroundSize: 'cover',
|
|
28
|
+
backgroundPosition: 'center'
|
|
29
|
+
},
|
|
30
|
+
top: {
|
|
31
|
+
backgroundPosition: 'top'
|
|
32
|
+
},
|
|
33
|
+
bottom: {
|
|
34
|
+
backgroundPosition: 'bottom'
|
|
35
|
+
},
|
|
36
|
+
center: {
|
|
37
|
+
backgroundPosition: 'center'
|
|
38
|
+
},
|
|
39
|
+
left: {
|
|
40
|
+
backgroundPosition: 'center left'
|
|
41
|
+
},
|
|
42
|
+
right: {
|
|
43
|
+
backgroundPosition: 'center right'
|
|
44
|
+
},
|
|
45
|
+
'top left': {
|
|
46
|
+
backgroundPosition: 'top left'
|
|
47
|
+
},
|
|
48
|
+
'top right': {
|
|
49
|
+
backgroundPosition: 'top right'
|
|
50
|
+
},
|
|
51
|
+
'bottom left': {
|
|
52
|
+
backgroundPosition: 'bottom left'
|
|
53
|
+
},
|
|
54
|
+
'bottom right': {
|
|
55
|
+
backgroundPosition: 'bottom right'
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
var Image = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
59
|
+
var id = props.id,
|
|
60
|
+
className = props.className,
|
|
61
|
+
src = props.src,
|
|
62
|
+
style = props.style,
|
|
63
|
+
_props$mode = props.mode,
|
|
64
|
+
mode = _props$mode === void 0 ? 'scaleToFill' : _props$mode,
|
|
65
|
+
onClick = props.onClick,
|
|
66
|
+
onLoad = props.onLoad,
|
|
67
|
+
onError = props.onError,
|
|
68
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
69
|
+
|
|
70
|
+
var isWidthFixMode = mode === 'widthFix';
|
|
71
|
+
var isHeightFixMode = mode === 'heightFix';
|
|
72
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
73
|
+
onClick: onClick,
|
|
74
|
+
className: clsx('ray-image', styles.image, className),
|
|
75
|
+
style: inlineStyle(style, {
|
|
76
|
+
backgroundImage: "url(".concat(src, ")"),
|
|
77
|
+
backgroundRepeat: "no-repeat"
|
|
78
|
+
}, modeStyle[mode])
|
|
79
|
+
}, restProps), /*#__PURE__*/React.createElement("img", {
|
|
80
|
+
ref: ref,
|
|
81
|
+
src: src,
|
|
82
|
+
style: {
|
|
83
|
+
visibility: 'hidden',
|
|
84
|
+
width: isWidthFixMode ? '100%' : isHeightFixMode ? 'auto' : undefined,
|
|
85
|
+
height: isWidthFixMode ? 'auto' : isHeightFixMode ? '100%' : '0px'
|
|
86
|
+
},
|
|
87
|
+
onLoad: onLoad,
|
|
88
|
+
onError: onError
|
|
89
|
+
}));
|
|
90
|
+
});
|
|
91
|
+
Image.displayName = 'Image';
|
|
92
|
+
export default Image;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { LayoutChangeEvent, StyleProp, ImageStyle } from 'react-native';
|
|
3
|
+
import { ImageProps } from './props';
|
|
4
|
+
interface IProps extends Omit<ImageProps, 'mode' | 'style'> {
|
|
5
|
+
mode?: 'aspectFit' | 'aspectFill' | 'scaleToFill' | 'widthFix';
|
|
6
|
+
style?: StyleProp<ImageStyle>;
|
|
7
|
+
}
|
|
8
|
+
export interface ImageState {
|
|
9
|
+
ratio: number;
|
|
10
|
+
layoutWidth: number;
|
|
11
|
+
}
|
|
12
|
+
export declare class _Image extends React.Component<IProps, ImageState> {
|
|
13
|
+
static defaultProps: {
|
|
14
|
+
src: string;
|
|
15
|
+
mode: string;
|
|
16
|
+
};
|
|
17
|
+
state: ImageState;
|
|
18
|
+
hasLayout: boolean;
|
|
19
|
+
_onLoad: () => void;
|
|
20
|
+
_onError: () => void;
|
|
21
|
+
onLayout: (event: LayoutChangeEvent) => void;
|
|
22
|
+
loadImg: (props: IProps) => void;
|
|
23
|
+
componentDidMount(): void;
|
|
24
|
+
shouldComponentUpdate(nextProps: IProps): boolean;
|
|
25
|
+
componentDidUpdate(prevProps: IProps): void;
|
|
26
|
+
render(): JSX.Element;
|
|
27
|
+
}
|
|
28
|
+
export default _Image;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["style", "className", "mode"];
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { inlineStyle } from '@ray-js/framework-shared';
|
|
7
|
+
import { Image as RemaxImage } from '@ray-js/remax-tuya';
|
|
8
|
+
|
|
9
|
+
var Image = function (props) {
|
|
10
|
+
var style = props.style,
|
|
11
|
+
className = props.className,
|
|
12
|
+
_props$mode = props.mode,
|
|
13
|
+
mode = _props$mode === void 0 ? 'scaleToFill' : _props$mode,
|
|
14
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
15
|
+
|
|
16
|
+
return /*#__PURE__*/React.createElement(RemaxImage, _extends({
|
|
17
|
+
style: inlineStyle(style),
|
|
18
|
+
className: clsx('ray-image', className),
|
|
19
|
+
mode: mode
|
|
20
|
+
}, restProps));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export default Image;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
var _excluded = ["id", "className", "src", "style", "mode", "onClick", "onLoad", "onError"];
|
|
4
|
+
import clsx from 'clsx';
|
|
5
|
+
import * as React from 'react';
|
|
6
|
+
import { inlineStyle } from '@ray-js/framework-shared';
|
|
7
|
+
import styles from './index.module.less';
|
|
8
|
+
var modeStyle = {
|
|
9
|
+
scaleToFill: {
|
|
10
|
+
backgroundSize: '100% 100%'
|
|
11
|
+
},
|
|
12
|
+
aspectFit: {
|
|
13
|
+
backgroundSize: 'contain',
|
|
14
|
+
backgroundPosition: 'center'
|
|
15
|
+
},
|
|
16
|
+
widthFix: {
|
|
17
|
+
backgroundSize: '100% 100%',
|
|
18
|
+
height: 'auto',
|
|
19
|
+
lineHeight: 0
|
|
20
|
+
},
|
|
21
|
+
heightFix: {
|
|
22
|
+
backgroundSize: '100% 100%',
|
|
23
|
+
width: 'auto',
|
|
24
|
+
lineHeight: 0
|
|
25
|
+
},
|
|
26
|
+
aspectFill: {
|
|
27
|
+
backgroundSize: 'cover',
|
|
28
|
+
backgroundPosition: 'center'
|
|
29
|
+
},
|
|
30
|
+
top: {
|
|
31
|
+
backgroundPosition: 'top'
|
|
32
|
+
},
|
|
33
|
+
bottom: {
|
|
34
|
+
backgroundPosition: 'bottom'
|
|
35
|
+
},
|
|
36
|
+
center: {
|
|
37
|
+
backgroundPosition: 'center'
|
|
38
|
+
},
|
|
39
|
+
left: {
|
|
40
|
+
backgroundPosition: 'center left'
|
|
41
|
+
},
|
|
42
|
+
right: {
|
|
43
|
+
backgroundPosition: 'center right'
|
|
44
|
+
},
|
|
45
|
+
'top left': {
|
|
46
|
+
backgroundPosition: 'top left'
|
|
47
|
+
},
|
|
48
|
+
'top right': {
|
|
49
|
+
backgroundPosition: 'top right'
|
|
50
|
+
},
|
|
51
|
+
'bottom left': {
|
|
52
|
+
backgroundPosition: 'bottom left'
|
|
53
|
+
},
|
|
54
|
+
'bottom right': {
|
|
55
|
+
backgroundPosition: 'bottom right'
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
var Image = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
59
|
+
var id = props.id,
|
|
60
|
+
className = props.className,
|
|
61
|
+
src = props.src,
|
|
62
|
+
style = props.style,
|
|
63
|
+
_props$mode = props.mode,
|
|
64
|
+
mode = _props$mode === void 0 ? 'scaleToFill' : _props$mode,
|
|
65
|
+
onClick = props.onClick,
|
|
66
|
+
onLoad = props.onLoad,
|
|
67
|
+
onError = props.onError,
|
|
68
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
69
|
+
|
|
70
|
+
var isWidthFixMode = mode === 'widthFix';
|
|
71
|
+
var isHeightFixMode = mode === 'heightFix';
|
|
72
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
73
|
+
onClick: onClick,
|
|
74
|
+
className: clsx('ray-image', styles.image, className),
|
|
75
|
+
style: inlineStyle(style, {
|
|
76
|
+
backgroundImage: "url(".concat(src, ")"),
|
|
77
|
+
backgroundRepeat: "no-repeat"
|
|
78
|
+
}, modeStyle[mode])
|
|
79
|
+
}, restProps), /*#__PURE__*/React.createElement("img", {
|
|
80
|
+
ref: ref,
|
|
81
|
+
src: src,
|
|
82
|
+
style: {
|
|
83
|
+
visibility: 'hidden',
|
|
84
|
+
width: isWidthFixMode ? '100%' : isHeightFixMode ? 'auto' : undefined,
|
|
85
|
+
height: isWidthFixMode ? 'auto' : isHeightFixMode ? '100%' : '0px'
|
|
86
|
+
},
|
|
87
|
+
onLoad: onLoad,
|
|
88
|
+
onError: onError
|
|
89
|
+
}));
|
|
90
|
+
});
|
|
91
|
+
Image.displayName = 'Image';
|
|
92
|
+
export default Image;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Image as _Image } from "@remax/wechat/esm/hostComponents/Image/index";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
+
var _excluded = ["style", "className", "onClick", "onLongClick", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart", "onLoad", "onError", "mode"];
|
|
6
|
+
import clsx from 'clsx';
|
|
7
|
+
import * as React from 'react';
|
|
8
|
+
import { inlineStyle, useTouch } from '@ray-js/framework-shared';
|
|
9
|
+
|
|
10
|
+
var Image = function (props) {
|
|
11
|
+
var style = props.style,
|
|
12
|
+
className = props.className,
|
|
13
|
+
onClick = props.onClick,
|
|
14
|
+
onLongClick = props.onLongClick,
|
|
15
|
+
onTouchCancel = props.onTouchCancel,
|
|
16
|
+
onTouchEnd = props.onTouchEnd,
|
|
17
|
+
onTouchMove = props.onTouchMove,
|
|
18
|
+
onTouchStart = props.onTouchStart,
|
|
19
|
+
onLoad = props.onLoad,
|
|
20
|
+
onError = props.onError,
|
|
21
|
+
_props$mode = props.mode,
|
|
22
|
+
mode = _props$mode === void 0 ? 'scaleToFill' : _props$mode,
|
|
23
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
24
|
+
|
|
25
|
+
var _useTouch = useTouch({
|
|
26
|
+
onLongClick: onLongClick,
|
|
27
|
+
onTouchStart: onTouchStart,
|
|
28
|
+
onTouchMove: onTouchMove,
|
|
29
|
+
onTouchEnd: onTouchEnd,
|
|
30
|
+
onTouchCancel: onTouchCancel,
|
|
31
|
+
onClick: onClick
|
|
32
|
+
}),
|
|
33
|
+
_useTouch2 = _slicedToArray(_useTouch, 2),
|
|
34
|
+
touching = _useTouch2[0],
|
|
35
|
+
handlers = _useTouch2[1];
|
|
36
|
+
|
|
37
|
+
return /*#__PURE__*/React.createElement(_Image, _extends({
|
|
38
|
+
style: inlineStyle(style),
|
|
39
|
+
className: clsx('ray-image', className),
|
|
40
|
+
mode: mode,
|
|
41
|
+
onLoad: function handleOnload(e) {
|
|
42
|
+
onLoad === null || onLoad === void 0 ? void 0 : onLoad({
|
|
43
|
+
width: e.detail.width,
|
|
44
|
+
height: e.detail.height,
|
|
45
|
+
origin: e
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}, handlers, restProps));
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default Image;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};exports.default=void 0;var _Image=_interopRequireDefault(require("./Image"));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 _default=_Image.default;exports.default=_default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});var _exportNames={};exports.default=void 0;var _Image=_interopRequireDefault(require("./Image"));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 _default=_Image.default;exports.default=_default;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
nav:
|
|
3
|
+
title: 组件
|
|
4
|
+
path: /components
|
|
5
|
+
group:
|
|
6
|
+
title: 基础组件
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Image
|
|
10
|
+
|
|
11
|
+
图片
|
|
12
|
+
|
|
13
|
+
## 导入
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
import { Image } from '@ray-js/components';
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## 示例代码
|
|
20
|
+
|
|
21
|
+
<code src="./demos/aspectFill.tsx" title="基本使用" background="#f2f4f6"/>
|
|
22
|
+
|
|
23
|
+
## Props
|
|
24
|
+
|
|
25
|
+
| 属性 | 类型 | 默认值 | 说明 | 支持平台 |
|
|
26
|
+
| --- | --- | --- | --- | --- | --- |
|
|
27
|
+
| className | string | | 样式名 | RN、涂鸦、微信 |
|
|
28
|
+
| src | string | | 图片地址 | RN、涂鸦、微信 |
|
|
29
|
+
| mode | string | 'scaleToFill' | 图片裁剪、缩放的模式,RN 支持部分模式,具体见下表 | RN、涂鸦、微信 |
|
|
30
|
+
| onLoad | (e: { width: number; height: number; origin: RnLoadEvent | WxEvent }) => void | 'scaleToFill' | 图片裁剪、缩放的模式 | RN、涂鸦、微信 |
|
|
31
|
+
| onError | (e: { errMsg: string; origin: null | WxEvent }) => void | 'scaleToFill' | 图片裁剪、缩放的模式 | RN、涂鸦、微信 |
|
|
32
|
+
|
|
33
|
+
## mode 合法值
|
|
34
|
+
|
|
35
|
+
| 值 | 说明 | 支持平台 |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| scaleToFill | 缩放模式,不保持纵横比缩放图片,使图片的宽高完全拉伸至填满 image 元素 | RN、涂鸦、微信 |
|
|
38
|
+
| aspectFit | 缩放模式,保持纵横比缩放图片,使图片的长边能完全显示出来。也就是说,可以完整地将图片显示出来。 | RN、涂鸦、微信 |
|
|
39
|
+
| aspectFill | 缩放模式,保持纵横比缩放图片,只保证图片的短边能完全显示出来。也就是说,图片通常只在水平或垂直方向是完整的,另一个方向将会发生截取。 | RN、涂鸦、微信 |
|
|
40
|
+
| widthFix | 缩放模式,宽度不变,高度自动变化,保持原图宽高比不变 | RN、涂鸦、微信 |
|
|
41
|
+
| heightFix | 缩放模式,高度不变,宽度自动变化,保持原图宽高比不变 | 涂鸦、微信 |
|
|
42
|
+
| top | 裁剪模式,不缩放图片,只显示图片的顶部区域 | 涂鸦、微信 |
|
|
43
|
+
| bottom | 裁剪模式,不缩放图片,只显示图片的底部区域 | 涂鸦、微信 |
|
|
44
|
+
| center | 裁剪模式,不缩放图片,只显示图片的中间区域 | 涂鸦、微信 |
|
|
45
|
+
| left | 裁剪模式,不缩放图片,只显示图片的左边区域 | 涂鸦、微信 |
|
|
46
|
+
| right | 裁剪模式,不缩放图片,只显示图片的右边区域 | 涂鸦、微信 |
|
|
47
|
+
| top left | 裁剪模式,不缩放图片,只显示图片的左上边区域 | 涂鸦、微信 |
|
|
48
|
+
| top right | 裁剪模式,不缩放图片,只显示图片的右上边区域 | 涂鸦、微信 |
|
|
49
|
+
| bottom left | 裁剪模式,不缩放图片,只显示图片的左下边区域 | 涂鸦、微信 |
|
|
50
|
+
| bottom right | 裁剪模式,不缩放图片,只显示图片的右下边区域 | 涂鸦、微信 |
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.defaultImageProps=void 0;var defaultImageProps={src:'',mode:'scaleToFill'};exports.defaultImageProps=defaultImageProps;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BaseProps } from '../types';
|
|
2
|
+
import { TouchEventHandler } from '@ray-js/framework-shared';
|
|
3
|
+
import { GenericEvent as WxEvent } from '@remax/wechat';
|
|
4
|
+
import { ImageLoadEventData as RnLoadEvent } from 'react-native';
|
|
5
|
+
export interface ImageProps extends BaseProps, TouchEventHandler {
|
|
6
|
+
/** 文本是否可选 */
|
|
7
|
+
src: string;
|
|
8
|
+
mode?: 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'heightFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom right' | 'bottom left';
|
|
9
|
+
/** 当图片载入完毕时触发 */
|
|
10
|
+
onLoad?: (e: {
|
|
11
|
+
width: number;
|
|
12
|
+
height: number;
|
|
13
|
+
origin: RnLoadEvent | WxEvent;
|
|
14
|
+
}) => any;
|
|
15
|
+
/** 当错误发生时触发 */
|
|
16
|
+
onError?: (e: {
|
|
17
|
+
errMsg: string;
|
|
18
|
+
origin: null | WxEvent;
|
|
19
|
+
}) => any;
|
|
20
|
+
}
|
|
21
|
+
export declare const defaultImageProps: {
|
|
22
|
+
src: string;
|
|
23
|
+
mode: string;
|
|
24
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.defaultImageProps=void 0;var defaultImageProps={src:'',mode:'scaleToFill'};exports.defaultImageProps=defaultImageProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _props=require("./props");var _jsxFileName="/drone/src/packages/components/src/Input/Input.native.tsx";var _excluded=["style","value","type","password","placeholder","disabled","maxLength","focus","confirmType","selectionStart","selectionEnd","cursor","_multiline","_autoHeight"];function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);enumerableOnly&&(symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;})),keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ownKeys(Object(source),!0).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(target,Object.getOwnPropertyDescriptors(source)):ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}return target;}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function(){var Super=(0,_getPrototypeOf2.default)(Derived),result;if(hasNativeReflectConstruct){var NewTarget=(0,_getPrototypeOf2.default)(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return(0,_possibleConstructorReturn2.default)(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}var keyboardTypeMap={text:'default',number:'numeric',idcard:'default',digit:_reactNative.Platform.select({ios:'decimal-pad',android:'numeric'})||''};var Checkbox=function(_React$Component){(0,_inherits2.default)(Checkbox,_React$Component);var _super=_createSuper(Checkbox);function Checkbox(){var _this;(0,_classCallCheck2.default)(this,Checkbox);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_super.call.apply(_super,[this].concat(args));_this.state={returnValue:undefined,height:0,value:undefined};_this._handleChangeText=function(text){var onInput=_this.props.onInput;_this.tmpValue=text||'';_this.setState({returnValue:text});typeof onInput==='function'&&onInput({type:'input',value:text,origin:null});};_this._handleSubmitEditing=function(event){var _this$props=_this.props,onConfirm=_this$props.onConfirm,_multiline=_this$props._multiline;if(_multiline)return;typeof onConfirm==='function'&&onConfirm({type:'confirm',value:_this.tmpValue,origin:event});};_this._handleBlur=function(event){var onBlur=_this.props.onBlur;typeof onBlur==='function'&&onBlur({type:'blur',value:_this.tmpValue,origin:event});};_this._handleFocus=function(event){var onFocus=_this.props.onFocus;var returnValue=_this.state.returnValue;_this.tmpValue=returnValue||'';typeof onFocus==='function'&&onFocus({type:'focus',value:_this.tmpValue,origin:event});};_this.onContentSizeChange=function(event){var _event$nativeEvent$co=event.nativeEvent.contentSize,width=_event$nativeEvent$co.width,height=_event$nativeEvent$co.height;if(width&&height){var _this$props2=_this.props,_multiline=_this$props2._multiline,_autoHeight=_this$props2._autoHeight,_onLineChange=_this$props2._onLineChange;if(!_multiline||!_autoHeight||height===_this.state.height)return;_this.lineCount+=height>_this.state.height?1:-1;console.log('lineCount',_this.lineCount,height);_onLineChange({height:height,lineCount:_this.lineCount,type:'linechange'});_this.setState({height:height});}};_this._handleKeyPress=function(event){var onConfirm=_this.props.onConfirm;var keyValue=event.nativeEvent.key;if(keyValue!=='Enter')return;typeof onConfirm==='function'&&onConfirm({type:'confirm',value:_this.tmpValue,origin:event});};return _this;}(0,_createClass2.default)(Checkbox,[{key:"render",value:function render(){var _this$props3=this.props,style=_this$props3.style,value=_this$props3.value,type=_this$props3.type,password=_this$props3.password,placeholder=_this$props3.placeholder,disabled=_this$props3.disabled,maxLength=_this$props3.maxLength,focus=_this$props3.focus,confirmType=_this$props3.confirmType,selectionStart=_this$props3.selectionStart,selectionEnd=_this$props3.selectionEnd,cursor=_this$props3.cursor,_multiline=_this$props3._multiline,_autoHeight=_this$props3._autoHeight,rest=(0,_objectWithoutProperties2.default)(_this$props3,_excluded);var selection=function(){if(selectionStart>=0&&selectionEnd>=0){return{start:selectionStart,end:selectionEnd};}else if(typeof cursor==='number'){return{start:cursor,end:cursor};}}();var textAlignVertical=_multiline?'top':'auto';return _react.default.createElement(_reactNative.TextInput,(0,_extends2.default)({},rest,{style:[{padding:4,backgroundColor:'#FFF'},style,_multiline&&_autoHeight&&{height:Math.max(35,this.state.height)}],defaultValue:value,secureTextEntry:!!password,placeholder:placeholder,editable:!disabled,maxLength:maxLength===-1?undefined:maxLength,returnKeyType:confirmType,keyboardType:keyboardTypeMap[type],autoFocus:!!focus,selection:selection,value:this.state.returnValue,onChangeText:this._handleChangeText,onBlur:this._handleBlur,onKeyPress:this._handleKeyPress,onFocus:this._handleFocus,multiline:!!_multiline,onEndEditing:this._handleSubmitEditing,onSubmitEditing:this._handleSubmitEditing,textAlignVertical:textAlignVertical,onContentSizeChange:this.onContentSizeChange,underlineColorAndroid:"rgba(0,0,0,0)",__self:this,__source:{fileName:_jsxFileName,lineNumber:169,columnNumber:12}}));}}],[{key:"getDerivedStateFromProps",value:function getDerivedStateFromProps(props,state){return props.value!==state.value?_objectSpread(_objectSpread({},state),{},{returnValue:props.value}):null;}}]);return Checkbox;}(_react.default.Component);exports.default=Checkbox;Checkbox.defaultProps=_props.defaultInputProps;
|