@ray-js/components 1.4.0-alpha.1 → 1.4.0-alpha.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (141) hide show
  1. package/lib/Button/Button.js +1 -3
  2. package/lib/Button/Button.thing.js +15 -17
  3. package/lib/Button/Button.wechat.js +15 -17
  4. package/lib/Button/props.js +1 -1
  5. package/lib/Camera/Camera.d.ts +2 -1
  6. package/lib/Camera/Camera.js +3 -3
  7. package/lib/Camera/Camera.thing.js +1 -3
  8. package/lib/Camera/Camera.wechat.d.ts +2 -1
  9. package/lib/Camera/Camera.wechat.js +2 -2
  10. package/lib/Checkbox/Checkbox.js +1 -3
  11. package/lib/Checkbox/Checkbox.thing.js +8 -9
  12. package/lib/Checkbox/Checkbox.wechat.js +9 -10
  13. package/lib/CheckboxGroup/CheckboxGroup.js +15 -19
  14. package/lib/CheckboxGroup/CheckboxGroup.thing.js +12 -17
  15. package/lib/CheckboxGroup/CheckboxGroup.wechat.js +12 -17
  16. package/lib/CheckboxGroup/props.d.ts +1 -1
  17. package/lib/CoverView/CoverView.js +1 -3
  18. package/lib/CoverView/CoverView.thing.js +1 -3
  19. package/lib/CoverView/CoverView.wechat.d.ts +2 -1
  20. package/lib/CoverView/CoverView.wechat.js +0 -2
  21. package/lib/CoverView/props.d.ts +1 -1
  22. package/lib/CoverView/props.js +1 -1
  23. package/lib/Form/Form.js +12 -12
  24. package/lib/Form/Form.thing.js +1 -3
  25. package/lib/Form/Form.wechat.js +20 -25
  26. package/lib/Form/props.d.ts +1 -1
  27. package/lib/Icon/Icon.js +7 -7
  28. package/lib/Icon/Icon.thing.js +7 -7
  29. package/lib/Icon/Icon.wechat.js +7 -7
  30. package/lib/Icon/iconfont/iconfont.js +13 -20
  31. package/lib/Icon/props.d.ts +1 -1
  32. package/lib/Icon/props.js +1 -1
  33. package/lib/Iframe/Iframe.d.ts +2 -1
  34. package/lib/Iframe/Iframe.js +3 -3
  35. package/lib/Iframe/Iframe.thing.js +1 -3
  36. package/lib/Iframe/Iframe.wechat.d.ts +2 -1
  37. package/lib/Iframe/Iframe.wechat.js +3 -3
  38. package/lib/Image/Image.js +6 -8
  39. package/lib/Image/Image.thing.js +8 -10
  40. package/lib/Image/Image.wechat.js +26 -32
  41. package/lib/Input/Input.js +29 -26
  42. package/lib/Input/Input.thing.js +36 -36
  43. package/lib/Input/Input.wechat.js +47 -47
  44. package/lib/Input/props.d.ts +11 -21
  45. package/lib/Input/props.js +1 -3
  46. package/lib/IpcPlayer/IpcPlayer.d.ts +2 -1
  47. package/lib/IpcPlayer/IpcPlayer.js +3 -3
  48. package/lib/IpcPlayer/IpcPlayer.thing.js +1 -3
  49. package/lib/IpcPlayer/IpcPlayer.wechat.d.ts +2 -1
  50. package/lib/IpcPlayer/IpcPlayer.wechat.js +2 -2
  51. package/lib/Label/Label.js +7 -8
  52. package/lib/Label/Label.thing.js +8 -8
  53. package/lib/Label/Label.wechat.js +8 -8
  54. package/lib/Map/Map.js +1 -3
  55. package/lib/Map/Map.thing.js +1 -3
  56. package/lib/Map/Map.wechat.js +1 -3
  57. package/lib/Modal/index.js +4 -2
  58. package/lib/Modal/index.web.js +6 -4
  59. package/lib/MovableArea/MovableArea.js +5 -4
  60. package/lib/MovableArea/MovableArea.thing.js +1 -3
  61. package/lib/MovableArea/MovableArea.wechat.js +1 -3
  62. package/lib/MovableView/MovableView.js +12 -11
  63. package/lib/MovableView/MovableView.thing.js +1 -3
  64. package/lib/MovableView/MovableView.wechat.js +1 -3
  65. package/lib/NativeVideo/NativeVideo.d.ts +2 -1
  66. package/lib/NativeVideo/NativeVideo.js +3 -3
  67. package/lib/NativeVideo/NativeVideo.thing.js +1 -3
  68. package/lib/NativeVideo/NativeVideo.wechat.d.ts +2 -1
  69. package/lib/NativeVideo/NativeVideo.wechat.js +2 -2
  70. package/lib/PageContainer/PageContainer.js +12 -19
  71. package/lib/PageContainer/PageContainer.thing.d.ts +2 -1
  72. package/lib/PageContainer/PageContainer.thing.js +0 -2
  73. package/lib/PageContainer/PageContainer.wechat.d.ts +2 -1
  74. package/lib/PageContainer/PageContainer.wechat.js +0 -2
  75. package/lib/PageContainer/props.d.ts +2 -2
  76. package/lib/PageContainer/props.js +3 -3
  77. package/lib/Picker/Picker.js +23 -31
  78. package/lib/Picker/Picker.thing.js +26 -31
  79. package/lib/Picker/Picker.wechat.js +26 -31
  80. package/lib/PickerView/PickerView.js +23 -34
  81. package/lib/PickerView/PickerView.thing.js +16 -19
  82. package/lib/PickerView/PickerView.wechat.js +16 -19
  83. package/lib/PickerViewColumn/PickerViewColumn.js +4 -4
  84. package/lib/PickerViewColumn/PickerViewColumn.thing.js +6 -7
  85. package/lib/PickerViewColumn/PickerViewColumn.wechat.js +6 -7
  86. package/lib/Progress/Progress.js +1 -3
  87. package/lib/Progress/Progress.thing.js +6 -7
  88. package/lib/Progress/Progress.wechat.js +6 -7
  89. package/lib/Radio/Radio.js +1 -3
  90. package/lib/Radio/Radio.thing.js +8 -9
  91. package/lib/Radio/Radio.wechat.js +9 -10
  92. package/lib/RadioGroup/RadioGroup.js +12 -18
  93. package/lib/RadioGroup/RadioGroup.thing.js +15 -21
  94. package/lib/RadioGroup/RadioGroup.wechat.js +12 -17
  95. package/lib/RadioGroup/props.d.ts +1 -1
  96. package/lib/RichText/RichText.js +1 -1
  97. package/lib/RichText/RichText.thing.js +1 -3
  98. package/lib/RichText/RichText.wechat.js +1 -3
  99. package/lib/ScrollView/ScrollView.js +12 -13
  100. package/lib/ScrollView/ScrollView.thing.js +6 -7
  101. package/lib/ScrollView/ScrollView.wechat.js +6 -7
  102. package/lib/Slider/Slider.js +4 -8
  103. package/lib/Slider/Slider.thing.js +13 -14
  104. package/lib/Slider/Slider.wechat.js +14 -15
  105. package/lib/Slider/props.js +1 -1
  106. package/lib/Swiper/Swiper.d.ts +1 -1
  107. package/lib/Swiper/Swiper.js +24 -33
  108. package/lib/Swiper/Swiper.thing.d.ts +1 -1
  109. package/lib/Swiper/Swiper.thing.js +18 -24
  110. package/lib/Swiper/Swiper.wechat.d.ts +1 -1
  111. package/lib/Swiper/Swiper.wechat.js +18 -24
  112. package/lib/Swiper/props.d.ts +1 -1
  113. package/lib/Swiper/props.js +2 -2
  114. package/lib/SwiperItem/SwiperItem.js +4 -4
  115. package/lib/SwiperItem/SwiperItem.thing.js +8 -9
  116. package/lib/SwiperItem/SwiperItem.wechat.js +8 -9
  117. package/lib/Switch/Switch.js +5 -8
  118. package/lib/Switch/Switch.thing.js +12 -14
  119. package/lib/Switch/Switch.wechat.js +12 -14
  120. package/lib/Switch/props.js +1 -1
  121. package/lib/Text/Text.js +1 -3
  122. package/lib/Text/Text.thing.js +1 -3
  123. package/lib/Text/Text.wechat.js +20 -25
  124. package/lib/Textarea/Textarea.js +13 -24
  125. package/lib/Textarea/Textarea.thing.js +26 -30
  126. package/lib/Textarea/Textarea.wechat.js +26 -30
  127. package/lib/Textarea/props.d.ts +4 -10
  128. package/lib/View/View.js +29 -32
  129. package/lib/View/View.thing.js +34 -35
  130. package/lib/View/View.wechat.js +34 -35
  131. package/lib/View/props.js +1 -1
  132. package/lib/WebView/WebView.js +1 -3
  133. package/lib/WebView/WebView.thing.js +1 -3
  134. package/lib/WebView/WebView.wechat.js +1 -3
  135. package/lib/assets/icons.js +1 -1
  136. package/lib/core/index.js +4 -11
  137. package/lib/types/event.d.ts +1 -1
  138. package/lib/types/index.js +1 -0
  139. package/lib/utils/handleProps.js +26 -40
  140. package/package.json +25 -25
  141. package/lib/Modal/index.web.d.ts +0 -2
@@ -20,4 +20,4 @@ export interface IconProps extends BaseProps {
20
20
  color?: string;
21
21
  }
22
22
  export declare const defaultIconProps: IconProps;
23
- 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';
23
+ export 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';
package/lib/Icon/props.js CHANGED
@@ -1,4 +1,4 @@
1
- export var defaultIconProps = {
1
+ export const defaultIconProps = {
2
2
  size: 16,
3
3
  type: 'icon-warning',
4
4
  color: '#333333'
@@ -1,2 +1,3 @@
1
- declare const Iframe: () => JSX.Element;
1
+ import React from 'react';
2
+ declare const Iframe: () => React.JSX.Element;
2
3
  export default Iframe;
@@ -1,7 +1,7 @@
1
- import React from 'react'; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
1
+ import React from 'react';
2
2
 
3
- var Iframe = function () {
3
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
4
+ const Iframe = () => {
4
5
  return /*#__PURE__*/React.createElement("div", null, "web \u7AEF\u6682\u672A\u5B9E\u73B0");
5
6
  };
6
-
7
7
  export default Iframe;
@@ -1,8 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { Iframe as RemaxIframe } from '@ray-js/adapter';
3
-
4
- var Iframe = function (props) {
3
+ const Iframe = props => {
5
4
  return /*#__PURE__*/React.createElement(RemaxIframe, props);
6
5
  };
7
-
8
6
  export default Iframe;
@@ -1,2 +1,3 @@
1
- declare const Iframe: () => JSX.Element;
1
+ import React from 'react';
2
+ declare const Iframe: () => React.JSX.Element;
2
3
  export default Iframe;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
- import { View as RemaxView } from '@ray-core/wechat'; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
2
+ import { View as RemaxView } from '@ray-core/wechat';
3
3
 
4
- var Iframe = function () {
4
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
5
+ const Iframe = () => {
5
6
  return /*#__PURE__*/React.createElement(RemaxView, null, "wechat \u7AEF\u4E0D\u652F\u6301");
6
7
  };
7
-
8
8
  export default Iframe;
@@ -3,26 +3,24 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
3
3
  import * as React from 'react';
4
4
  import { useEventListener } from 'ahooks';
5
5
  import handleProps from '../utils/handleProps';
6
- var Image = /*#__PURE__*/React.forwardRef(function (props, ref) {
7
- var currentNode = ref || React.useRef(null);
8
- useEventListener('load', function (e) {
6
+ const Image = /*#__PURE__*/React.forwardRef((props, ref) => {
7
+ const currentNode = ref || React.useRef(null);
8
+ useEventListener('load', e => {
9
9
  var _props$onLoad;
10
-
11
10
  (_props$onLoad = props.onLoad) === null || _props$onLoad === void 0 ? void 0 : _props$onLoad.call(props, _objectSpread(_objectSpread({
12
11
  type: e.type
13
12
  }, e.detail), {}, {
14
- origin: origin
13
+ origin
15
14
  }));
16
15
  }, {
17
16
  target: currentNode
18
17
  });
19
- useEventListener('error', function (e) {
18
+ useEventListener('error', e => {
20
19
  var _props$onError;
21
-
22
20
  (_props$onError = props.onError) === null || _props$onError === void 0 ? void 0 : _props$onError.call(props, _objectSpread(_objectSpread({
23
21
  type: e.type
24
22
  }, e.detail), {}, {
25
- origin: origin
23
+ origin
26
24
  }));
27
25
  }, {
28
26
  target: currentNode
@@ -1,23 +1,21 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["style", "className", "mode"];
3
+ const _excluded = ["style", "className", "mode"];
4
4
  import clsx from 'clsx';
5
5
  import * as React from 'react';
6
6
  import { inlineStyle } from '@ray-js/framework-shared';
7
7
  import { Image as RemaxImage } from '@ray-js/adapter';
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
-
8
+ const Image = props => {
9
+ const {
10
+ style,
11
+ className,
12
+ mode = 'scaleToFill'
13
+ } = props,
14
+ restProps = _objectWithoutProperties(props, _excluded);
16
15
  return /*#__PURE__*/React.createElement(RemaxImage, _extends({
17
16
  style: inlineStyle(style),
18
17
  className: clsx('ray-image', className),
19
18
  mode: mode
20
19
  }, restProps));
21
20
  };
22
-
23
21
  export default Image;
@@ -1,44 +1,39 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["style", "className", "onClick", "onLongClick", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart", "onLoad", "onError", "mode"];
3
+ const _excluded = ["style", "className", "onClick", "onLongClick", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart", "onLoad", "onError", "mode"];
4
+ import "core-js/modules/web.dom-collections.iterator.js";
5
5
  import clsx from 'clsx';
6
6
  import * as React from 'react';
7
7
  import { inlineStyle, useTouch } from '@ray-js/framework-shared';
8
8
  import { Image as RemaxImage } from '@ray-core/wechat';
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
-
9
+ const Image = props => {
10
+ const {
11
+ style,
12
+ className,
13
+ onClick,
14
+ onLongClick,
15
+ onTouchCancel,
16
+ onTouchEnd,
17
+ onTouchMove,
18
+ onTouchStart,
19
+ onLoad,
20
+ onError,
21
+ mode = 'scaleToFill'
22
+ } = props,
23
+ restProps = _objectWithoutProperties(props, _excluded);
24
+ const [touching, handlers] = useTouch({
25
+ onLongClick,
26
+ onTouchStart,
27
+ onTouchMove,
28
+ onTouchEnd,
29
+ onTouchCancel,
30
+ onClick
31
+ });
37
32
  return /*#__PURE__*/React.createElement(RemaxImage, _extends({
38
33
  style: inlineStyle(style),
39
34
  className: clsx('ray-image', className),
40
35
  mode: mode,
41
- onLoad: function handleOnload(e) {
36
+ onLoad: e => {
42
37
  onLoad === null || onLoad === void 0 ? void 0 : onLoad({
43
38
  width: e.detail.width,
44
39
  height: e.detail.height,
@@ -47,5 +42,4 @@ var Image = function (props) {
47
42
  }
48
43
  }, handlers, restProps));
49
44
  };
50
-
51
45
  export default Image;
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["placeholderStyle", "className", "maxLength", "onBlur", "onFocus", "onConfirm"];
3
+ const _excluded = ["placeholderStyle", "className", "maxLength", "onBlur", "onFocus", "onConfirm"];
4
+ import "core-js/modules/web.dom-collections.iterator.js";
5
5
  import * as React from 'react';
6
6
  import clsx from 'clsx';
7
7
  import { useEventListener } from 'ahooks';
@@ -9,21 +9,19 @@ import { inlineStyle, useStylesheet } from '@ray-js/framework-shared';
9
9
  import { defaultInputProps } from './props';
10
10
  import styles from './index.module.less';
11
11
  import handleProps from '../utils/handleProps';
12
- var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
13
- var placeholderStyle = props.placeholderStyle,
14
- className = props.className,
15
- maxLength = props.maxLength,
16
- onBlur = props.onBlur,
17
- onFocus = props.onFocus,
18
- onConfirm = props.onConfirm,
19
- restProps = _objectWithoutProperties(props, _excluded);
20
-
21
- var _useStylesheet = useStylesheet(inlineStyle(placeholderStyle)),
22
- _useStylesheet2 = _slicedToArray(_useStylesheet, 1),
23
- placeholderStyleClassName = _useStylesheet2[0];
24
-
25
- var currentNode = ref || React.useRef(null);
26
- useEventListener('focus', function (e) {
12
+ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
13
+ const {
14
+ placeholderStyle,
15
+ className,
16
+ maxLength,
17
+ onBlur,
18
+ onFocus,
19
+ onConfirm
20
+ } = props,
21
+ restProps = _objectWithoutProperties(props, _excluded);
22
+ const [placeholderStyleClassName] = useStylesheet(inlineStyle(placeholderStyle));
23
+ const currentNode = ref || React.useRef(null);
24
+ useEventListener('focus', e => {
27
25
  onFocus === null || onFocus === void 0 ? void 0 : onFocus({
28
26
  type: 'focus',
29
27
  value: e.detail.value,
@@ -32,21 +30,25 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
32
30
  }, {
33
31
  target: currentNode
34
32
  });
35
- useEventListener('blur', function (e) {
36
- var value = e.target.value;
33
+ useEventListener('blur', e => {
34
+ const {
35
+ value
36
+ } = e.target;
37
37
  onBlur === null || onBlur === void 0 ? void 0 : onBlur({
38
38
  type: 'blur',
39
- value: value,
39
+ value,
40
40
  origin: e
41
41
  });
42
42
  }, {
43
43
  target: currentNode
44
44
  });
45
- useEventListener('confirm', function (e) {
46
- var value = e.target.value;
45
+ useEventListener('confirm', e => {
46
+ const {
47
+ value
48
+ } = e.target;
47
49
  onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm({
48
50
  type: 'confirm',
49
- value: value,
51
+ value,
50
52
  origin: e
51
53
  });
52
54
  }, {
@@ -59,11 +61,12 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
59
61
  maxlength: maxLength,
60
62
  onInput: function (e) {
61
63
  var _props$onInput;
62
-
63
- var value = e.target.value;
64
+ const {
65
+ value
66
+ } = e.target;
64
67
  (_props$onInput = props.onInput) === null || _props$onInput === void 0 ? void 0 : _props$onInput.call(props, {
65
68
  type: 'input',
66
- value: value,
69
+ value,
67
70
  origin: e
68
71
  });
69
72
  },
@@ -1,55 +1,52 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["name", "id", "className", "style", "disabled", "type", "value", "focus", "maxLength", "onBlur", "onConfirm", "onFocus", "onInput", "password", "placeholder", "placeholderStyle"];
3
+ const _excluded = ["name", "id", "className", "style", "disabled", "type", "value", "focus", "maxLength", "onBlur", "onConfirm", "onFocus", "onInput", "password", "placeholder", "placeholderStyle"];
4
+ import "core-js/modules/web.dom-collections.iterator.js";
5
5
  import * as React from 'react';
6
6
  import clsx from 'clsx';
7
7
  import { Input as RemaxInput } from '@ray-js/adapter';
8
8
  import { inlineStyle } from '@ray-js/framework-shared';
9
9
  import { nextFrame } from '../core';
10
10
  import styles from './index.module.less';
11
- var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
12
- var name = props.name,
13
- id = props.id,
14
- className = props.className,
15
- style = props.style,
16
- disabled = props.disabled,
17
- _props$type = props.type,
18
- type = _props$type === void 0 ? 'text' : _props$type,
19
- value = props.value,
20
- focus = props.focus,
21
- maxLength = props.maxLength,
22
- onBlur = props.onBlur,
23
- onConfirm = props.onConfirm,
24
- onFocus = props.onFocus,
25
- onInput = props.onInput,
26
- password = props.password,
27
- placeholder = props.placeholder,
28
- placeholderStyle = props.placeholderStyle,
29
- restProps = _objectWithoutProperties(props, _excluded);
30
-
31
- var _React$useState = React.useState(value),
32
- _React$useState2 = _slicedToArray(_React$useState, 2),
33
- internalValue = _React$useState2[0],
34
- setInternalValue = _React$useState2[1];
35
-
36
- var bufferValue = React.useRef(value);
37
- React.useEffect(function () {
11
+ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
12
+ const {
13
+ name,
14
+ id,
15
+ className,
16
+ style,
17
+ disabled,
18
+ type = 'text',
19
+ value,
20
+ focus,
21
+ maxLength,
22
+ onBlur,
23
+ onConfirm,
24
+ onFocus,
25
+ onInput,
26
+ password,
27
+ placeholder,
28
+ placeholderStyle
29
+ } = props,
30
+ restProps = _objectWithoutProperties(props, _excluded);
31
+ const [internalValue, setInternalValue] = React.useState(value);
32
+ const bufferValue = React.useRef(value);
33
+ React.useEffect(() => {
38
34
  if (value !== bufferValue.current) {
39
35
  // HACK: 避免重复设置相同 value 不渲染的问题
40
36
  setInternalValue(bufferValue.current);
41
- nextFrame(1).then(function () {
37
+ nextFrame(1).then(() => {
42
38
  bufferValue.current = value;
43
39
  setInternalValue(value);
44
40
  });
45
41
  }
46
42
  }, [value]);
47
- var selection = focus ? {
43
+ const selection = focus ? {
48
44
  selectionStart: (internalValue === null || internalValue === void 0 ? void 0 : internalValue.length) || -1,
49
45
  selectionEnd: (internalValue === null || internalValue === void 0 ? void 0 : internalValue.length) || -1
50
46
  } : undefined;
51
47
  return /*#__PURE__*/React.createElement(RemaxInput, _extends({
52
- name: name //@ts-ignore
48
+ name: name
49
+ //@ts-ignore
53
50
  ,
54
51
  ref: ref,
55
52
  id: id,
@@ -63,16 +60,19 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
63
60
  placeholderStyle: inlineStyle(placeholderStyle),
64
61
  maxlength: maxLength,
65
62
  onInput: function (event) {
66
- var value = event.detail.value; // 内部 value 管控
67
-
63
+ const {
64
+ value
65
+ } = event.detail;
66
+ // 内部 value 管控
68
67
  bufferValue.current = value;
69
68
  event.value = value;
70
69
  onInput === null || onInput === void 0 ? void 0 : onInput(event);
71
70
  },
72
71
  onBlur: onBlur,
73
72
  onConfirm: function (event) {
74
- var _event$detail$value = event.detail.value,
75
- value = _event$detail$value === void 0 ? '' : _event$detail$value;
73
+ const {
74
+ value = ''
75
+ } = event.detail;
76
76
  setInternalValue(value);
77
77
  onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(event);
78
78
  },
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
2
  import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["name", "id", "className", "style", "disabled", "type", "value", "focus", "maxLength", "onBlur", "onConfirm", "onFocus", "onInput", "password", "placeholder", "placeholderStyle"];
3
+ const _excluded = ["name", "id", "className", "style", "disabled", "type", "value", "focus", "maxLength", "onBlur", "onConfirm", "onFocus", "onInput", "password", "placeholder", "placeholderStyle"];
4
+ import "core-js/modules/web.dom-collections.iterator.js";
5
5
  import * as React from 'react';
6
6
  import clsx from 'clsx';
7
7
  import { Input as RemaxInput } from '@ray-core/wechat';
@@ -9,48 +9,45 @@ import { inlineStyle } from '@ray-js/framework-shared';
9
9
  import { defaultInputProps } from './props';
10
10
  import { nextFrame } from '../core';
11
11
  import styles from './index.module.less';
12
- var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
13
- var name = props.name,
14
- id = props.id,
15
- className = props.className,
16
- style = props.style,
17
- disabled = props.disabled,
18
- _props$type = props.type,
19
- type = _props$type === void 0 ? 'text' : _props$type,
20
- value = props.value,
21
- focus = props.focus,
22
- maxLength = props.maxLength,
23
- onBlur = props.onBlur,
24
- onConfirm = props.onConfirm,
25
- onFocus = props.onFocus,
26
- onInput = props.onInput,
27
- password = props.password,
28
- placeholder = props.placeholder,
29
- placeholderStyle = props.placeholderStyle,
30
- restProps = _objectWithoutProperties(props, _excluded);
31
-
32
- var _React$useState = React.useState(value),
33
- _React$useState2 = _slicedToArray(_React$useState, 2),
34
- internalValue = _React$useState2[0],
35
- setInternalValue = _React$useState2[1];
36
-
37
- var bufferValue = React.useRef(value);
38
- React.useEffect(function () {
12
+ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
13
+ const {
14
+ name,
15
+ id,
16
+ className,
17
+ style,
18
+ disabled,
19
+ type = 'text',
20
+ value,
21
+ focus,
22
+ maxLength,
23
+ onBlur,
24
+ onConfirm,
25
+ onFocus,
26
+ onInput,
27
+ password,
28
+ placeholder,
29
+ placeholderStyle
30
+ } = props,
31
+ restProps = _objectWithoutProperties(props, _excluded);
32
+ const [internalValue, setInternalValue] = React.useState(value);
33
+ const bufferValue = React.useRef(value);
34
+ React.useEffect(() => {
39
35
  if (value !== bufferValue.current) {
40
36
  // HACK: 避免重复设置相同 value 不渲染的问题
41
37
  setInternalValue(bufferValue.current);
42
- nextFrame(1).then(function () {
38
+ nextFrame(1).then(() => {
43
39
  bufferValue.current = value;
44
40
  setInternalValue(value);
45
41
  });
46
42
  }
47
43
  }, [value]);
48
- var selection = focus ? {
44
+ const selection = focus ? {
49
45
  selectionStart: (internalValue === null || internalValue === void 0 ? void 0 : internalValue.length) || -1,
50
46
  selectionEnd: (internalValue === null || internalValue === void 0 ? void 0 : internalValue.length) || -1
51
47
  } : undefined;
52
48
  return /*#__PURE__*/React.createElement(RemaxInput, _extends({
53
- name: name //@ts-ignore
49
+ name: name
50
+ //@ts-ignore
54
51
  ,
55
52
  ref: ref,
56
53
  id: id,
@@ -64,41 +61,44 @@ var Input = /*#__PURE__*/React.forwardRef(function (props, ref) {
64
61
  placeholderStyle: inlineStyle(placeholderStyle),
65
62
  maxlength: maxLength,
66
63
  onInput: function (event) {
67
- var value = event.detail.value; // 内部 value 管控
68
-
64
+ const {
65
+ value
66
+ } = event.detail;
67
+ // 内部 value 管控
69
68
  bufferValue.current = value;
70
69
  onInput === null || onInput === void 0 ? void 0 : onInput({
71
70
  type: 'input',
72
- value: value,
71
+ value,
73
72
  origin: event
74
73
  });
75
74
  },
76
75
  onBlur: function (event) {
77
- var _event$detail$value3 = event.detail.value,
78
- value = _event$detail$value3 === void 0 ? '' : _event$detail$value3;
76
+ const {
77
+ value = ''
78
+ } = event.detail;
79
79
  onBlur === null || onBlur === void 0 ? void 0 : onBlur({
80
80
  type: 'blur',
81
- value: value,
81
+ value,
82
82
  origin: event
83
83
  });
84
84
  },
85
85
  onConfirm: function (event) {
86
- var _event$detail$value = event.detail.value,
87
- value = _event$detail$value === void 0 ? '' : _event$detail$value;
86
+ const {
87
+ value = ''
88
+ } = event.detail;
88
89
  setInternalValue(value);
89
90
  onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(event);
90
91
  },
91
92
  onFocus: function (event) {
92
- var _event$detail = event.detail,
93
- _event$detail$value2 = _event$detail.value,
94
- value = _event$detail$value2 === void 0 ? '' : _event$detail$value2,
95
- _event$detail$height = _event$detail.height,
96
- height = _event$detail$height === void 0 ? 0 : _event$detail$height;
93
+ const {
94
+ value = '',
95
+ height = 0
96
+ } = event.detail;
97
97
  setInternalValue(value);
98
98
  onFocus === null || onFocus === void 0 ? void 0 : onFocus({
99
99
  type: 'focus',
100
- value: value,
101
- height: height,
100
+ value,
101
+ height,
102
102
  origin: event
103
103
  });
104
104
  },
@@ -1,6 +1,6 @@
1
1
  import { BaseProps } from '../types';
2
2
  import { GenericEvent as WxEvent } from '@ray-core/wechat';
3
- export declare type InputType = 'text' | 'number' | 'digit' | 'idcard';
3
+ export type InputType = 'text' | 'number' | 'digit' | 'idcard';
4
4
  export interface InputProps extends BaseProps {
5
5
  /**
6
6
  * @description.en content
@@ -26,6 +26,12 @@ export interface InputProps extends BaseProps {
26
26
  * @default undefined
27
27
  */
28
28
  placeholder?: string;
29
+ /**
30
+ * @description.en placeholder
31
+ * @description.zh 占位符的样式
32
+ * @default undefined
33
+ */
34
+ placeholderStyle?: string;
29
35
  /**
30
36
  * @description.en disabled
31
37
  * @description.zh 是否禁用
@@ -38,12 +44,6 @@ export interface InputProps extends BaseProps {
38
44
  * @default undefined
39
45
  */
40
46
  maxLength?: number;
41
- /**
42
- * @description.en 获Get focus取焦点
43
- * @description.zh 获取焦点
44
- * @default false
45
- */
46
- focus?: boolean;
47
47
  /**
48
48
  * @description.en Set the text of the button in the lower right corner of the keyboard, effective only when type='text'
49
49
  * @description.zh 设置键盘右下角按钮的文字,仅在type='text'时生效
@@ -51,23 +51,13 @@ export interface InputProps extends BaseProps {
51
51
  */
52
52
  confirmType?: 'send' | 'search' | 'next' | 'go' | 'done';
53
53
  /**
54
- * @description.en Start position of the cursor. This parameter is valid for automatic clustering and must be used with Selection End
55
- * @description.zh 光标起始位置,自动聚集时有效,需与 selectionEnd 搭配使用
56
- * @default -1
54
+ * @description 输入框内容左侧内容缩进,仅在涂鸦小程序有效
57
55
  */
58
- selectionStart?: number;
56
+ indentStart?: string | number;
59
57
  /**
60
- * @description.en End cursor position. This parameter is valid for automatic clustering and must be used with Selection Start
61
- * @description.zh 光标结束位置,自动聚集时有效,需与 selectionStart 搭配使用
62
- * @default -1
63
- */
64
- selectionEnd?: number;
65
- /**
66
- * @description.en Specifies the cursor position for focus
67
- * @description.zh 指定 focus 时的光标位置
68
- * @default false
58
+ * @description 输入框内容右侧内容缩进,仅在涂鸦小程序有效
69
59
  */
70
- cursor?: number;
60
+ indentEnd?: string | number;
71
61
  /**
72
62
  * @description.en Input events
73
63
  * @description.zh 输入事件
@@ -1,6 +1,4 @@
1
- export var defaultInputProps = {
2
- selectionEnd: -1,
3
- selectionStart: -1,
1
+ export const defaultInputProps = {
4
2
  type: 'text',
5
3
  maxLength: 140,
6
4
  confirmType: 'done'