@nutui/nutui-react-taro 2.0.0-alpha.8 → 2.0.0-alpha.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/dist/esm/Address.js +2 -2
- package/dist/esm/Card.js +5 -5
- package/dist/esm/DatePicker.js +2 -3
- package/dist/esm/Elevator.js +1 -1
- package/dist/esm/ImagePreview.js +4 -7
- package/dist/esm/Indicator.js +1 -1
- package/dist/esm/InputNumber.js +1 -1
- package/dist/esm/Notify.js +2 -3
- package/dist/esm/NumberKeyboard.js +3 -5
- package/dist/esm/Picker.js +1 -2
- package/dist/esm/Price.js +2 -3
- package/dist/esm/PullToRefresh.js +4 -6
- package/dist/esm/Radio.js +3 -3
- package/dist/esm/RadioGroup.js +3 -3
- package/dist/esm/Step.js +1 -1
- package/dist/esm/Steps.js +1 -1
- package/dist/esm/Sticky.js +1 -2
- package/dist/esm/Swiper.js +3 -5
- package/dist/esm/SwiperItem.js +1 -5
- package/dist/esm/{address.taro-1c534feb.js → address.taro-1a8ab3f1.js} +1 -1
- package/dist/esm/{card.taro-a46fdf25.js → card.taro-2080f4d2.js} +1 -1
- package/dist/esm/{datepicker.taro-3f718964.js → datepicker.taro-65dbeceb.js} +1 -1
- package/dist/esm/{elevator.taro-bc162e4f.js → elevator.taro-df8fde9d.js} +20 -15
- package/dist/esm/{imagepreview.taro-8832dc01.js → imagepreview.taro-2508d412.js} +8 -5
- package/dist/esm/{indicator.taro-f2bd212f.js → indicator.taro-edbc71df.js} +3 -3
- package/dist/esm/{inputnumber.taro-877dc947.js → inputnumber.taro-6657d2c1.js} +1 -1
- package/dist/esm/{notify.taro-6b6eb6bf.js → notify.taro-5768403d.js} +11 -18
- package/dist/esm/numberkeyboard.taro-ad8afaf9.js +136 -0
- package/dist/esm/nutui-react.es.js +16 -21
- package/dist/esm/{picker.taro-a5603921.js → picker.taro-0570ec32.js} +14 -1
- package/dist/esm/{price.taro-c4f45310.js → price.taro-479f1b82.js} +17 -17
- package/dist/esm/pulltorefresh.taro-6afe4805.js +138 -0
- package/dist/esm/radio.taro-5d6ca4ad.js +153 -0
- package/dist/esm/step.taro-3bc01c0c.js +1 -1
- package/dist/esm/steps.taro-77e301ab.js +1 -1
- package/dist/esm/{sticky.taro-3c03eb0a.js → sticky.taro-f8ae8d5e.js} +21 -1
- package/dist/esm/swiper.taro-53a36427.js +83 -0
- package/dist/esm/swiperitem.taro-ef7342e8.js +14 -0
- package/dist/locales/base.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/id-ID.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/locales/zh-TW.js +1 -1
- package/dist/locales/zh-UG.js +1 -1
- package/dist/nutui.react.mjs +1162 -6119
- package/dist/nutui.react.umd.js +1546 -6519
- package/dist/packages/imagepreview/imagepreview.scss +5 -0
- package/dist/packages/notify/notify.scss +1 -1
- package/dist/packages/numberkeyboard/numberkeyboard.scss +29 -77
- package/dist/packages/price/price.scss +8 -0
- package/dist/packages/pulltorefresh/pulltorefresh.scss +0 -8
- package/dist/packages/radio/radio.scss +13 -32
- package/dist/packages/radiogroup/radiogroup.scss +17 -51
- package/dist/packages/swiper/swiper.scss +0 -15
- package/dist/style.css +1 -1
- package/dist/style.mjs +1 -1
- package/dist/styles/variables-jmapp.scss +50 -44
- package/dist/styles/variables.scss +50 -46
- package/dist/types/index.d.ts +63 -92
- package/package.json +1 -1
- package/dist/esm/UserContext-735db09f.js +0 -5
- package/dist/esm/get-scroll-parent-8da04f2e.js +0 -24
- package/dist/esm/numberkeyboard.taro-0a0e866a.js +0 -183
- package/dist/esm/pulltorefresh.taro-c611fd92.js +0 -179
- package/dist/esm/radio.taro-3a54f4c8.js +0 -152
- package/dist/esm/supports-passive-aaaf0eff.js +0 -17
- package/dist/esm/swiper.taro-74cf9306.js +0 -430
- package/dist/esm/swiperitem-80df464a.js +0 -29
package/dist/style.mjs
CHANGED
|
@@ -673,22 +673,18 @@ $numberkeyboard-key-font-color: var(
|
|
|
673
673
|
--nutui-numberkeyboard-key-font-color,
|
|
674
674
|
#333
|
|
675
675
|
) !default;
|
|
676
|
-
$numberkeyboard-key-
|
|
677
|
-
--nutui-numberkeyboard-key-
|
|
676
|
+
$numberkeyboard-key-confirm-font-size: var(
|
|
677
|
+
--nutui-numberkeyboard-key-confirm-font-size,
|
|
678
678
|
16px
|
|
679
679
|
) !default;
|
|
680
|
-
$numberkeyboard-key-
|
|
681
|
-
--nutui-numberkeyboard-key-
|
|
680
|
+
$numberkeyboard-key-confirm-font-color: var(
|
|
681
|
+
--nutui-numberkeyboard-key-confirm-font-color,
|
|
682
682
|
#fff
|
|
683
683
|
) !default;
|
|
684
|
-
$numberkeyboard-key-
|
|
685
|
-
--nutui-numberkeyboard-key-
|
|
684
|
+
$numberkeyboard-key-confirm-background-color: var(
|
|
685
|
+
--nutui-numberkeyboard-key-confirm-background-color,
|
|
686
686
|
#1989fa
|
|
687
687
|
) !default;
|
|
688
|
-
$numberkeyboard-key-activeFinsh-background-color: var(
|
|
689
|
-
--nutui-numberkeyboard-key-activeFinsh-background-color,
|
|
690
|
-
#0570db
|
|
691
|
-
) !default;
|
|
692
688
|
|
|
693
689
|
// countdown(✅)
|
|
694
690
|
$countdown-display: var(--nutui-countdown-display, flex) !default;
|
|
@@ -696,11 +692,17 @@ $countdown-color: var(--nutui-countdown-color, inherit) !default;
|
|
|
696
692
|
$countdown-font-size: var(--nutui-countdown-font-size, initial) !default;
|
|
697
693
|
|
|
698
694
|
//large price(✅)
|
|
695
|
+
$price-symbol-padding-right: var(
|
|
696
|
+
--nutui-price-symbol-padding-right,
|
|
697
|
+
1px
|
|
698
|
+
) !default;
|
|
699
699
|
$price-symbol-big-size: var(--nutui-price-symbol-big-size, 18px) !default;
|
|
700
700
|
$price-integer-big-size: var(--nutui-price-integer-big-size, 24px) !default;
|
|
701
701
|
$price-decimal-big-size: var(--nutui-price-decimal-big-size, 18px) !default;
|
|
702
702
|
|
|
703
703
|
//normal price(✅)
|
|
704
|
+
$price-line-color: var(--nutui-price-line-color, $gray2) !default;
|
|
705
|
+
$price-line-font-size: var(--nutui-price-line-font-size, 12px) !default;
|
|
704
706
|
$price-symbol-medium-size: var(--nutui-price-symbol-medium-size, 14px) !default;
|
|
705
707
|
$price-integer-medium-size: var(
|
|
706
708
|
--nutui-price-integer-medium-size,
|
|
@@ -830,31 +832,31 @@ $notify-padding: var(--nutui-notify-padding, 12px 0) !default;
|
|
|
830
832
|
$notify-font-size: var(--nutui-notify-font-size, 14px) !default;
|
|
831
833
|
$notify-height: var(--nutui-notify-height, 44px) !default;
|
|
832
834
|
$notify-line-height: var(--nutui-notify-line-height, auto) !default;
|
|
833
|
-
$notify-base-background-color:
|
|
834
|
-
|
|
835
|
-
$primary-color 0%,
|
|
836
|
-
$primary-color-end 100%
|
|
835
|
+
$notify-base-background-color: var(
|
|
836
|
+
--nutui-notify-base-background-color,
|
|
837
|
+
linear-gradient(135deg, $primary-color 0%, $primary-color-end 100%)
|
|
837
838
|
) !default;
|
|
838
|
-
$notify-primary-background-color:
|
|
839
|
-
|
|
840
|
-
rgba(73, 143, 242, 1) 0%,
|
|
841
|
-
rgba(73, 101, 242, 1) 100%
|
|
839
|
+
$notify-primary-background-color: var(
|
|
840
|
+
--nutui-notify-primary-background-color,
|
|
841
|
+
linear-gradient(315deg, rgba(73, 143, 242, 1) 0%, rgba(73, 101, 242, 1) 100%)
|
|
842
842
|
) !default;
|
|
843
|
-
$notify-success-background-color:
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
843
|
+
$notify-success-background-color: var(
|
|
844
|
+
--nutui-notify-success-background-color,
|
|
845
|
+
linear-gradient(
|
|
846
|
+
135deg,
|
|
847
|
+
rgba(38, 191, 38, 1) 0%,
|
|
848
|
+
rgba(39, 197, 48, 1) 45%,
|
|
849
|
+
rgba(40, 207, 63, 1) 83%,
|
|
850
|
+
rgba(41, 212, 70, 1) 100%
|
|
851
|
+
)
|
|
849
852
|
) !default;
|
|
850
853
|
$notify-danger-background-color: var(
|
|
851
854
|
--nutui-notify-danger-background-color,
|
|
852
855
|
rgba(250, 50, 25, 1)
|
|
853
856
|
) !default;
|
|
854
|
-
$notify-warning-background-color:
|
|
855
|
-
|
|
856
|
-
rgba(255, 93, 13, 1) 0%,
|
|
857
|
-
rgba(255, 154, 13, 1) 100%
|
|
857
|
+
$notify-warning-background-color: var(
|
|
858
|
+
--nutui-notify-warning-background-color,
|
|
859
|
+
linear-gradient(135deg, rgba(255, 93, 13, 1) 0%, rgba(255, 154, 13, 1) 100%)
|
|
858
860
|
) !default;
|
|
859
861
|
|
|
860
862
|
// rate(✅)
|
|
@@ -916,22 +918,6 @@ $swiper-pagination-item-background-color: var(
|
|
|
916
918
|
--nutui-swiper-pagination-item-background-color,
|
|
917
919
|
#ddd
|
|
918
920
|
) !default;
|
|
919
|
-
$swiper-pagination-item-width: var(
|
|
920
|
-
--nutui-swiper-pagination-item-width,
|
|
921
|
-
8px
|
|
922
|
-
) !default;
|
|
923
|
-
$swiper-pagination-item-height: var(
|
|
924
|
-
--nutui-swiper-pagination-item-height,
|
|
925
|
-
3px
|
|
926
|
-
) !default;
|
|
927
|
-
$swiper-pagination-item-margin-right: var(
|
|
928
|
-
--nutui-swiper-pagination-item-margin-right,
|
|
929
|
-
7px
|
|
930
|
-
) !default;
|
|
931
|
-
$swiper-pagination-item-border-radius: var(
|
|
932
|
-
--nutui-swiper-pagination-item-border-radius,
|
|
933
|
-
2px
|
|
934
|
-
) !default;
|
|
935
921
|
|
|
936
922
|
//address
|
|
937
923
|
$address-region-tab-line: linear-gradient(
|
|
@@ -1226,6 +1212,26 @@ $radio-icon-disable-color2: var(
|
|
|
1226
1212
|
--nutui-radio-icon-disable-color2,
|
|
1227
1213
|
$gray3
|
|
1228
1214
|
) !default;
|
|
1215
|
+
$radiogroup-radio-margin: var(
|
|
1216
|
+
--nutui-radiogroup-radio-margin,
|
|
1217
|
+
0 20px 5px 0
|
|
1218
|
+
) !default;
|
|
1219
|
+
$radiogroup-radio-label-margin: var(
|
|
1220
|
+
--nutui-radiogroup-radio-label-margin,
|
|
1221
|
+
0 5px 0 5px
|
|
1222
|
+
) !default;
|
|
1223
|
+
$radio-button-disabled-active-background: var(
|
|
1224
|
+
--nutui-radio-button-disabled-active-background,
|
|
1225
|
+
rgba(0, 0, 0, 0.15)
|
|
1226
|
+
) !default;
|
|
1227
|
+
$radio-button-disabled-active-color: var(
|
|
1228
|
+
--nutui-radio-button-disabled-active-color,
|
|
1229
|
+
rgba(0, 0, 0, 0.25)
|
|
1230
|
+
) !default;
|
|
1231
|
+
$radio-button-disabled-active-border-color: var(
|
|
1232
|
+
--nutui-radio-button-disabled-active-border-color,
|
|
1233
|
+
rgba(211, 211, 211, 0.15)
|
|
1234
|
+
) !default;
|
|
1229
1235
|
|
|
1230
1236
|
// signature(✅)
|
|
1231
1237
|
$signature-border-color: #dadada;
|
|
@@ -656,20 +656,16 @@ $numberkeyboard-key-font-color: var(
|
|
|
656
656
|
--nutui-numberkeyboard-key-font-color,
|
|
657
657
|
#333
|
|
658
658
|
) !default;
|
|
659
|
-
$numberkeyboard-key-
|
|
660
|
-
--nutui-numberkeyboard-key-
|
|
659
|
+
$numberkeyboard-key-confirm-font-size: var(
|
|
660
|
+
--nutui-numberkeyboard-key-confirm-font-size,
|
|
661
661
|
16px
|
|
662
662
|
) !default;
|
|
663
|
-
$numberkeyboard-key-
|
|
664
|
-
--nutui-numberkeyboard-key-
|
|
663
|
+
$numberkeyboard-key-confirm-font-color: var(
|
|
664
|
+
--nutui-numberkeyboard-key-confirm-font-color,
|
|
665
665
|
#fff
|
|
666
666
|
) !default;
|
|
667
|
-
$numberkeyboard-key-
|
|
668
|
-
--nutui-numberkeyboard-key-
|
|
669
|
-
$brand-color
|
|
670
|
-
) !default;
|
|
671
|
-
$numberkeyboard-key-activeFinsh-background-color: var(
|
|
672
|
-
--nutui-numberkeyboard-key-activeFinsh-background-color,
|
|
667
|
+
$numberkeyboard-key-confirm-background-color: var(
|
|
668
|
+
--nutui-numberkeyboard-key-confirm-background-color,
|
|
673
669
|
$brand-color
|
|
674
670
|
) !default;
|
|
675
671
|
|
|
@@ -679,11 +675,17 @@ $countdown-color: var(--nutui-countdown-color, inherit) !default;
|
|
|
679
675
|
$countdown-font-size: var(--nutui-countdown-font-size, initial) !default;
|
|
680
676
|
|
|
681
677
|
//large price(✅)
|
|
678
|
+
$price-symbol-padding-right: var(
|
|
679
|
+
--nutui-price-symbol-padding-right,
|
|
680
|
+
1px
|
|
681
|
+
) !default;
|
|
682
682
|
$price-symbol-big-size: var(--nutui-price-symbol-big-size, 18px) !default;
|
|
683
683
|
$price-integer-big-size: var(--nutui-price-integer-big-size, 24px) !default;
|
|
684
684
|
$price-decimal-big-size: var(--nutui-price-decimal-big-size, 18px) !default;
|
|
685
685
|
|
|
686
686
|
//normal price(✅)
|
|
687
|
+
$price-line-color: var(--nutui-price-line-color, $gray2) !default;
|
|
688
|
+
$price-line-font-size: var(--nutui-price-line-font-size, 12px) !default;
|
|
687
689
|
$price-symbol-medium-size: var(--nutui-price-symbol-medium-size, 14px) !default;
|
|
688
690
|
$price-integer-medium-size: var(
|
|
689
691
|
--nutui-price-integer-medium-size,
|
|
@@ -814,33 +816,31 @@ $notify-padding: var(--nutui-notify-padding, 12px 0) !default;
|
|
|
814
816
|
$notify-font-size: var(--nutui-notify-font-size, 14px) !default;
|
|
815
817
|
$notify-height: var(--nutui-notify-height, 44px) !default;
|
|
816
818
|
$notify-line-height: var(--nutui-notify-line-height, auto) !default;
|
|
817
|
-
$notify-base-background-color:
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
rgba(250, 63, 25, 1) 45%,
|
|
821
|
-
rgba(250, 89, 25, 1) 83%,
|
|
822
|
-
rgba(250, 100, 25, 1) 100%
|
|
819
|
+
$notify-base-background-color: var(
|
|
820
|
+
--nutui-notify-base-background-color,
|
|
821
|
+
linear-gradient(135deg, $primary-color 0%, $primary-color-end 100%)
|
|
823
822
|
) !default;
|
|
824
|
-
$notify-primary-background-color:
|
|
825
|
-
|
|
826
|
-
rgba(73, 143, 242, 1) 0%,
|
|
827
|
-
rgba(73, 101, 242, 1) 100%
|
|
823
|
+
$notify-primary-background-color: var(
|
|
824
|
+
--nutui-notify-primary-background-color,
|
|
825
|
+
linear-gradient(315deg, rgba(73, 143, 242, 1) 0%, rgba(73, 101, 242, 1) 100%)
|
|
828
826
|
) !default;
|
|
829
|
-
$notify-success-background-color:
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
827
|
+
$notify-success-background-color: var(
|
|
828
|
+
--nutui-notify-success-background-color,
|
|
829
|
+
linear-gradient(
|
|
830
|
+
135deg,
|
|
831
|
+
rgba(38, 191, 38, 1) 0%,
|
|
832
|
+
rgba(39, 197, 48, 1) 45%,
|
|
833
|
+
rgba(40, 207, 63, 1) 83%,
|
|
834
|
+
rgba(41, 212, 70, 1) 100%
|
|
835
|
+
)
|
|
835
836
|
) !default;
|
|
836
837
|
$notify-danger-background-color: var(
|
|
837
838
|
--nutui-notify-danger-background-color,
|
|
838
839
|
rgba(250, 50, 25, 1)
|
|
839
840
|
) !default;
|
|
840
|
-
$notify-warning-background-color:
|
|
841
|
-
|
|
842
|
-
rgba(255, 93, 13, 1) 0%,
|
|
843
|
-
rgba(255, 154, 13, 1) 100%
|
|
841
|
+
$notify-warning-background-color: var(
|
|
842
|
+
--nutui-notify-warning-background-color,
|
|
843
|
+
linear-gradient(135deg, rgba(255, 93, 13, 1) 0%, rgba(255, 154, 13, 1) 100%)
|
|
844
844
|
) !default;
|
|
845
845
|
|
|
846
846
|
// rate(✅)
|
|
@@ -902,22 +902,6 @@ $swiper-pagination-item-background-color: var(
|
|
|
902
902
|
--nutui-swiper-pagination-item-background-color,
|
|
903
903
|
#ddd
|
|
904
904
|
) !default;
|
|
905
|
-
$swiper-pagination-item-width: var(
|
|
906
|
-
--nutui-swiper-pagination-item-width,
|
|
907
|
-
8px
|
|
908
|
-
) !default;
|
|
909
|
-
$swiper-pagination-item-height: var(
|
|
910
|
-
--nutui-swiper-pagination-item-height,
|
|
911
|
-
3px
|
|
912
|
-
) !default;
|
|
913
|
-
$swiper-pagination-item-margin-right: var(
|
|
914
|
-
--nutui-swiper-pagination-item-margin-right,
|
|
915
|
-
7px
|
|
916
|
-
) !default;
|
|
917
|
-
$swiper-pagination-item-border-radius: var(
|
|
918
|
-
--nutui-swiper-pagination-item-border-radius,
|
|
919
|
-
2px
|
|
920
|
-
) !default;
|
|
921
905
|
|
|
922
906
|
//address
|
|
923
907
|
$address-region-tab-line: linear-gradient(
|
|
@@ -1220,6 +1204,26 @@ $radio-icon-disable-color2: var(
|
|
|
1220
1204
|
--nutui-radio-icon-disable-color2,
|
|
1221
1205
|
$gray3
|
|
1222
1206
|
) !default;
|
|
1207
|
+
$radiogroup-radio-margin: var(
|
|
1208
|
+
--nutui-radiogroup-radio-margin,
|
|
1209
|
+
0 20px 5px 0
|
|
1210
|
+
) !default;
|
|
1211
|
+
$radiogroup-radio-label-margin: var(
|
|
1212
|
+
--nutui-radiogroup-radio-label-margin,
|
|
1213
|
+
0 5px 0 5px
|
|
1214
|
+
) !default;
|
|
1215
|
+
$radio-button-disabled-active-background: var(
|
|
1216
|
+
--nutui-radio-button-disabled-active-background,
|
|
1217
|
+
rgba(0, 0, 0, 0.15)
|
|
1218
|
+
) !default;
|
|
1219
|
+
$radio-button-disabled-active-color: var(
|
|
1220
|
+
--nutui-radio-button-disabled-active-color,
|
|
1221
|
+
rgba(0, 0, 0, 0.25)
|
|
1222
|
+
) !default;
|
|
1223
|
+
$radio-button-disabled-active-border-color: var(
|
|
1224
|
+
--nutui-radio-button-disabled-active-border-color,
|
|
1225
|
+
rgba(211, 211, 211, 0.15)
|
|
1226
|
+
) !default;
|
|
1223
1227
|
|
|
1224
1228
|
// signature(✅)
|
|
1225
1229
|
$signature-border-color: #dadada;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { CSSProperties, ReactNode, FunctionComponent, MouseEvent as MouseEvent$1,
|
|
3
|
-
import { ButtonProps as ButtonProps$1, ITouchEvent, InputProps as InputProps$1, TextareaProps } from '@tarojs/components';
|
|
2
|
+
import React__default, { CSSProperties, ReactNode, FunctionComponent, MouseEvent as MouseEvent$1, HTMLInputTypeAttribute, ChangeEvent, FocusEvent, RefObject, Component } from 'react';
|
|
3
|
+
import { ButtonProps as ButtonProps$1, ITouchEvent, InputProps as InputProps$1, TextareaProps, SwiperProps as SwiperProps$1 } from '@tarojs/components';
|
|
4
4
|
import Taro, { InnerAudioContext } from '@tarojs/taro';
|
|
5
5
|
|
|
6
6
|
interface BasicComponent {
|
|
@@ -304,7 +304,7 @@ interface ElevatorProps extends BasicComponent {
|
|
|
304
304
|
sticky: boolean;
|
|
305
305
|
spaceHeight: number;
|
|
306
306
|
titleHeight: number;
|
|
307
|
-
|
|
307
|
+
showKeys: boolean;
|
|
308
308
|
children: React__default.ReactNode;
|
|
309
309
|
onClickItem: (key: string, item: ElevatorData) => void;
|
|
310
310
|
onClickIndex: (key: string) => void;
|
|
@@ -636,7 +636,7 @@ interface RadioGroupOptionType {
|
|
|
636
636
|
label: string;
|
|
637
637
|
value: string;
|
|
638
638
|
disabled?: boolean;
|
|
639
|
-
onChange?:
|
|
639
|
+
onChange?: (checked: boolean) => void;
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
type CheckboxLabelPosition = 'left' | 'right';
|
|
@@ -867,22 +867,39 @@ interface MenuItemProps extends BasicComponent {
|
|
|
867
867
|
}
|
|
868
868
|
declare const MenuItem: React__default.ForwardRefExoticComponent<Partial<MenuItemProps> & React__default.RefAttributes<unknown>>;
|
|
869
869
|
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
870
|
+
type Teleport = HTMLElement | (() => HTMLElement) | null;
|
|
871
|
+
interface PopupProps extends OverlayProps {
|
|
872
|
+
position: string;
|
|
873
|
+
transition: string;
|
|
874
|
+
overlayStyle: React__default.CSSProperties;
|
|
875
|
+
overlayClassName: string;
|
|
876
|
+
closeable: boolean;
|
|
877
|
+
closeIconPosition: string;
|
|
878
|
+
closeIcon: React__default.ReactNode;
|
|
879
|
+
destroyOnClose: boolean;
|
|
880
|
+
portal: Teleport;
|
|
874
881
|
overlay: boolean;
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
882
|
+
round: boolean;
|
|
883
|
+
onOpen: () => void;
|
|
884
|
+
onClose: () => void;
|
|
885
|
+
onClickOverlay: (e: ITouchEvent) => boolean | void;
|
|
886
|
+
onClickCloseIcon: (e: ITouchEvent) => boolean | void;
|
|
887
|
+
}
|
|
888
|
+
declare const Popup: FunctionComponent<Partial<PopupProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
889
|
+
|
|
890
|
+
interface NumberKeyboardProps extends PopupProps {
|
|
891
|
+
visible: boolean;
|
|
892
|
+
title?: ReactNode;
|
|
893
|
+
confirmText?: string;
|
|
894
|
+
type: 'default' | 'rightColumn';
|
|
895
|
+
custom: Array<string>;
|
|
896
|
+
random: boolean;
|
|
881
897
|
onChange?: (value: string) => void;
|
|
882
898
|
onDelete?: () => void;
|
|
883
899
|
onClose: () => void;
|
|
900
|
+
onConfirm?: () => void;
|
|
884
901
|
}
|
|
885
|
-
declare const NumberKeyboard: FunctionComponent<Partial<NumberKeyboardProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
|
902
|
+
declare const NumberKeyboard: FunctionComponent<Partial<NumberKeyboardProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange' | 'onClick' | 'title'>>;
|
|
886
903
|
|
|
887
904
|
interface PickerOption {
|
|
888
905
|
text: string | number;
|
|
@@ -910,31 +927,31 @@ declare const Picker: React__default.ForwardRefExoticComponent<Partial<PickerPro
|
|
|
910
927
|
type Position$1 = 'left' | 'right';
|
|
911
928
|
type Direction$1 = 'horizontal' | 'vertical';
|
|
912
929
|
interface RadioGroupProps {
|
|
913
|
-
value
|
|
914
|
-
|
|
930
|
+
value?: string | number;
|
|
931
|
+
defaultValue?: string | number;
|
|
932
|
+
labelPosition: Position$1;
|
|
915
933
|
direction: Direction$1;
|
|
916
|
-
|
|
934
|
+
disabled?: boolean;
|
|
917
935
|
options: RadioGroupOptionType[];
|
|
936
|
+
onChange: (value: string | number) => void;
|
|
918
937
|
}
|
|
919
938
|
declare const RadioGroup: React__default.ForwardRefExoticComponent<Partial<RadioGroupProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, "onChange"> & React__default.RefAttributes<unknown>>;
|
|
920
939
|
|
|
921
940
|
type Shape = 'button' | 'round';
|
|
922
941
|
type Position = 'right' | 'left';
|
|
923
942
|
interface RadioProps extends BasicComponent {
|
|
924
|
-
className: string;
|
|
925
|
-
style: React__default.CSSProperties;
|
|
926
943
|
disabled: boolean;
|
|
927
944
|
checked: boolean;
|
|
945
|
+
defaultChecked: boolean;
|
|
928
946
|
shape: Shape;
|
|
929
|
-
|
|
930
|
-
value: string | number | boolean;
|
|
947
|
+
labelPosition: Position;
|
|
931
948
|
icon: React__default.ReactNode;
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
onChange:
|
|
949
|
+
activeIcon: React__default.ReactNode;
|
|
950
|
+
value: string | number;
|
|
951
|
+
onChange: (checked: boolean) => void;
|
|
935
952
|
}
|
|
936
|
-
declare const Radio: FunctionComponent<Partial<RadioProps> & React__default.HTMLAttributes<HTMLDivElement>> & {
|
|
937
|
-
|
|
953
|
+
declare const Radio: FunctionComponent<Partial<RadioProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange'>> & {
|
|
954
|
+
Group: typeof RadioGroup;
|
|
938
955
|
};
|
|
939
956
|
|
|
940
957
|
type RangeValue = number | number[];
|
|
@@ -1329,19 +1346,13 @@ interface NoticeBarProps extends BasicComponent {
|
|
|
1329
1346
|
}
|
|
1330
1347
|
declare const NoticeBar: FunctionComponent<Partial<NoticeBarProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
1331
1348
|
|
|
1332
|
-
interface NotifyProps {
|
|
1349
|
+
interface NotifyProps extends BasicComponent {
|
|
1333
1350
|
id?: string;
|
|
1334
|
-
style?: React__default.CSSProperties;
|
|
1335
|
-
msg: string;
|
|
1336
|
-
color: string;
|
|
1337
1351
|
duration: number;
|
|
1338
1352
|
type: string;
|
|
1339
|
-
className: string;
|
|
1340
|
-
background: string;
|
|
1341
1353
|
position: string;
|
|
1342
|
-
isWrapTeleport: boolean;
|
|
1343
1354
|
visible: boolean;
|
|
1344
|
-
|
|
1355
|
+
onClose: () => void;
|
|
1345
1356
|
onClick: () => void;
|
|
1346
1357
|
}
|
|
1347
1358
|
declare const Notify: FunctionComponent<Partial<NotifyProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
@@ -1368,9 +1379,7 @@ interface PopoverProps extends BasicComponent {
|
|
|
1368
1379
|
declare const Popover: FunctionComponent<Partial<PopoverProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1369
1380
|
|
|
1370
1381
|
type PullStatus = 'pulling' | 'canRelease' | 'refreshing' | 'complete';
|
|
1371
|
-
interface PullToRefreshProps {
|
|
1372
|
-
className: string;
|
|
1373
|
-
style: React__default.CSSProperties;
|
|
1382
|
+
interface PullToRefreshProps extends BasicComponent {
|
|
1374
1383
|
onRefresh: () => Promise<any>;
|
|
1375
1384
|
pullingText: ReactNode;
|
|
1376
1385
|
canReleaseText: ReactNode;
|
|
@@ -1380,8 +1389,8 @@ interface PullToRefreshProps {
|
|
|
1380
1389
|
headHeight: number;
|
|
1381
1390
|
threshold: number;
|
|
1382
1391
|
disabled: boolean;
|
|
1392
|
+
scrollTop: number;
|
|
1383
1393
|
renderText: (status: PullStatus) => ReactNode;
|
|
1384
|
-
children: React__default.ReactNode;
|
|
1385
1394
|
}
|
|
1386
1395
|
declare const PullToRefresh: FunctionComponent<Partial<PullToRefreshProps>>;
|
|
1387
1396
|
|
|
@@ -1442,26 +1451,6 @@ interface SwipeProps {
|
|
|
1442
1451
|
}
|
|
1443
1452
|
declare const Swipe: React__default.ForwardRefExoticComponent<Partial<SwipeProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, "onTouchStart" | "onTouchMove" | "onTouchEnd"> & React__default.RefAttributes<SwipeInstance>>;
|
|
1444
1453
|
|
|
1445
|
-
type Teleport = HTMLElement | (() => HTMLElement) | null;
|
|
1446
|
-
interface PopupProps extends OverlayProps {
|
|
1447
|
-
position: string;
|
|
1448
|
-
transition: string;
|
|
1449
|
-
overlayStyle: React__default.CSSProperties;
|
|
1450
|
-
overlayClassName: string;
|
|
1451
|
-
closeable: boolean;
|
|
1452
|
-
closeIconPosition: string;
|
|
1453
|
-
closeIcon: React__default.ReactNode;
|
|
1454
|
-
destroyOnClose: boolean;
|
|
1455
|
-
portal: Teleport;
|
|
1456
|
-
overlay: boolean;
|
|
1457
|
-
round: boolean;
|
|
1458
|
-
onOpen: () => void;
|
|
1459
|
-
onClose: () => void;
|
|
1460
|
-
onClickOverlay: (e: ITouchEvent) => boolean | void;
|
|
1461
|
-
onClickCloseIcon: (e: ITouchEvent) => boolean | void;
|
|
1462
|
-
}
|
|
1463
|
-
declare const Popup: FunctionComponent<Partial<PopupProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onClick'>>;
|
|
1464
|
-
|
|
1465
1454
|
interface ToastProps {
|
|
1466
1455
|
id?: string;
|
|
1467
1456
|
style?: React__default.CSSProperties;
|
|
@@ -1644,7 +1633,7 @@ interface ImagePreviewProps {
|
|
|
1644
1633
|
};
|
|
1645
1634
|
}>;
|
|
1646
1635
|
show: boolean;
|
|
1647
|
-
|
|
1636
|
+
autoPlay: boolean;
|
|
1648
1637
|
initNo: number;
|
|
1649
1638
|
contentClose: boolean;
|
|
1650
1639
|
paginationVisible: boolean;
|
|
@@ -1691,16 +1680,14 @@ interface PaginationProps extends BasicComponent {
|
|
|
1691
1680
|
}
|
|
1692
1681
|
declare const Pagination: FunctionComponent<Partial<PaginationProps> & Omit<React__default.HTMLAttributes<HTMLDivElement>, 'onChange'>>;
|
|
1693
1682
|
|
|
1694
|
-
interface PriceProps {
|
|
1683
|
+
interface PriceProps extends BasicComponent {
|
|
1695
1684
|
price: number | string;
|
|
1696
|
-
needSymbol: boolean;
|
|
1697
1685
|
symbol: string;
|
|
1698
|
-
|
|
1686
|
+
digits: number;
|
|
1699
1687
|
thousands: boolean;
|
|
1700
1688
|
position: string;
|
|
1701
1689
|
size: string;
|
|
1702
|
-
|
|
1703
|
-
style: React__default.CSSProperties;
|
|
1690
|
+
line: boolean;
|
|
1704
1691
|
}
|
|
1705
1692
|
declare const Price: FunctionComponent<Partial<PriceProps>>;
|
|
1706
1693
|
|
|
@@ -1736,38 +1723,22 @@ interface StepsProps {
|
|
|
1736
1723
|
}
|
|
1737
1724
|
declare const Steps: FunctionComponent<Partial<StepsProps> & React__default.HTMLAttributes<HTMLDivElement>>;
|
|
1738
1725
|
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
prev: () => void;
|
|
1743
|
-
};
|
|
1744
|
-
interface SwiperProps {
|
|
1745
|
-
width: number | string;
|
|
1746
|
-
height: number | string;
|
|
1747
|
-
duration: number | string;
|
|
1748
|
-
initPage: number | string;
|
|
1749
|
-
autoPlay: number | string;
|
|
1726
|
+
interface SwiperProps extends Omit<SwiperProps$1, 'ref'> {
|
|
1727
|
+
width: number;
|
|
1728
|
+
height: number;
|
|
1750
1729
|
direction: 'horizontal' | 'vertical';
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
paginationVisible: boolean;
|
|
1730
|
+
indicator: ReactNode;
|
|
1731
|
+
autoPlay: boolean;
|
|
1754
1732
|
loop: boolean;
|
|
1755
|
-
|
|
1756
|
-
isPreventDefault: boolean;
|
|
1757
|
-
isStopPropagation: boolean;
|
|
1758
|
-
isCenter: boolean;
|
|
1759
|
-
className?: string;
|
|
1760
|
-
style?: React__default.CSSProperties;
|
|
1761
|
-
pageContent?: React__default.ReactNode;
|
|
1762
|
-
onChange?: (currPage: number) => void;
|
|
1733
|
+
defaultValue: number;
|
|
1763
1734
|
}
|
|
1764
|
-
declare const Swiper: React__default.ForwardRefExoticComponent<Partial<SwiperProps> &
|
|
1735
|
+
declare const Swiper: React__default.ForwardRefExoticComponent<Partial<SwiperProps> & React__default.RefAttributes<unknown>>;
|
|
1765
1736
|
|
|
1766
|
-
interface SwiperItemProps {
|
|
1767
|
-
|
|
1768
|
-
|
|
1737
|
+
interface SwiperItemProps extends BasicComponent {
|
|
1738
|
+
itemId?: string;
|
|
1739
|
+
skipHiddenItemLayout?: boolean;
|
|
1769
1740
|
}
|
|
1770
|
-
declare const SwiperItem:
|
|
1741
|
+
declare const SwiperItem: FunctionComponent<Partial<SwiperItemProps>>;
|
|
1771
1742
|
|
|
1772
1743
|
interface BasicTableProps extends BasicComponent {
|
|
1773
1744
|
columns: Array<TableColumnProps>;
|
package/package.json
CHANGED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { c as canUseDom } from "./can-use-dom-0e539bd3.js";
|
|
2
|
-
const defaultRoot = canUseDom ? window : void 0;
|
|
3
|
-
const overflowStylePatterns = ["scroll", "auto", "overlay"];
|
|
4
|
-
function isElement(node) {
|
|
5
|
-
const ELEMENT_NODE_TYPE = 1;
|
|
6
|
-
return node.nodeType === ELEMENT_NODE_TYPE;
|
|
7
|
-
}
|
|
8
|
-
function getScrollParent(el, root = defaultRoot) {
|
|
9
|
-
let node = el;
|
|
10
|
-
while (node && node !== root && isElement(node)) {
|
|
11
|
-
if (node === document.body) {
|
|
12
|
-
return root;
|
|
13
|
-
}
|
|
14
|
-
const { overflowY } = window.getComputedStyle(node);
|
|
15
|
-
if (overflowStylePatterns.includes(overflowY) && node.scrollHeight > node.clientHeight) {
|
|
16
|
-
return node;
|
|
17
|
-
}
|
|
18
|
-
node = node.parentNode;
|
|
19
|
-
}
|
|
20
|
-
return root;
|
|
21
|
-
}
|
|
22
|
-
export {
|
|
23
|
-
getScrollParent as g
|
|
24
|
-
};
|