@nutui/nutui-react-taro 3.0.12 → 3.0.13
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 +25 -9
- package/dist/cjs/packages/address/style/address.scss +2 -2
- package/dist/cjs/packages/address/style/style.css +2 -2
- package/dist/cjs/packages/address/style/style.harmony.css +2 -2
- package/dist/cjs/packages/address/style-jmapp/address.scss +2 -2
- package/dist/cjs/packages/address/style-jmapp/style.css +2 -2
- package/dist/cjs/packages/address/style-jrkf/address.scss +2 -2
- package/dist/cjs/packages/address/style-jrkf/style.css +2 -2
- package/dist/cjs/packages/avatar/avatar.js +1 -1
- package/dist/cjs/packages/button/style/button.scss +3 -3
- package/dist/cjs/packages/button/style/style.css +3 -3
- package/dist/cjs/packages/button/style/style.harmony.css +3 -3
- package/dist/cjs/packages/button/style-jmapp/button.scss +3 -3
- package/dist/cjs/packages/button/style-jmapp/style.css +3 -3
- package/dist/cjs/packages/button/style-jrkf/button.scss +3 -3
- package/dist/cjs/packages/button/style-jrkf/style.css +3 -3
- package/dist/cjs/packages/collapseitem/style/collapseitem.scss +2 -2
- package/dist/cjs/packages/collapseitem/style/style.css +2 -2
- package/dist/cjs/packages/collapseitem/style/style.harmony.css +2 -2
- package/dist/cjs/packages/collapseitem/style-jmapp/collapseitem.scss +2 -2
- package/dist/cjs/packages/collapseitem/style-jmapp/style.css +2 -2
- package/dist/cjs/packages/collapseitem/style-jrkf/collapseitem.scss +2 -2
- package/dist/cjs/packages/collapseitem/style-jrkf/style.css +2 -2
- package/dist/cjs/packages/dialog/style/dialog.scss +1 -1
- package/dist/cjs/packages/dialog/style/style.css +1 -1
- package/dist/cjs/packages/dialog/style/style.harmony.css +1 -1
- package/dist/cjs/packages/dialog/style-jmapp/dialog.scss +1 -1
- package/dist/cjs/packages/dialog/style-jmapp/style.css +1 -1
- package/dist/cjs/packages/dialog/style-jrkf/dialog.scss +1 -1
- package/dist/cjs/packages/dialog/style-jrkf/style.css +1 -1
- package/dist/cjs/packages/loading/loading.js +0 -4
- package/dist/cjs/packages/lottie/lottiemp.js +7 -6
- package/dist/cjs/packages/numberkeyboard/style/numberkeyboard.scss +2 -2
- package/dist/cjs/packages/numberkeyboard/style/style.css +2 -2
- package/dist/cjs/packages/numberkeyboard/style/style.harmony.css +2 -2
- package/dist/cjs/packages/numberkeyboard/style-jmapp/numberkeyboard.scss +2 -2
- package/dist/cjs/packages/numberkeyboard/style-jmapp/style.css +2 -2
- package/dist/cjs/packages/numberkeyboard/style-jrkf/numberkeyboard.scss +2 -2
- package/dist/cjs/packages/numberkeyboard/style-jrkf/style.css +2 -2
- package/dist/cjs/packages/pagination/pagination.js +3 -3
- package/dist/cjs/packages/pickerview/pickerroller.js +3 -3
- package/dist/cjs/packages/price/style/price.scss +9 -0
- package/dist/cjs/packages/price/style/style.css +9 -0
- package/dist/cjs/packages/price/style/style.harmony.css +9 -0
- package/dist/cjs/packages/price/style-jmapp/price.scss +9 -0
- package/dist/cjs/packages/price/style-jmapp/style.css +9 -0
- package/dist/cjs/packages/price/style-jrkf/price.scss +9 -0
- package/dist/cjs/packages/price/style-jrkf/style.css +9 -0
- package/dist/cjs/packages/steps/style/steps.scss +1 -1
- package/dist/cjs/packages/steps/style/style.css +1 -1
- package/dist/cjs/packages/steps/style/style.harmony.css +1 -1
- package/dist/cjs/packages/steps/style-jmapp/steps.scss +1 -1
- package/dist/cjs/packages/steps/style-jmapp/style.css +1 -1
- package/dist/cjs/packages/steps/style-jrkf/steps.scss +1 -1
- package/dist/cjs/packages/steps/style-jrkf/style.css +1 -1
- package/dist/cjs/packages/swiper/swiper.js +22 -21
- package/dist/cjs/packages/tabbaritem/style/style.css +4 -4
- package/dist/cjs/packages/tabbaritem/style/style.harmony.css +6 -6
- package/dist/cjs/packages/tabbaritem/style/tabbaritem.scss +4 -4
- package/dist/cjs/packages/tabbaritem/style-jmapp/style.css +4 -4
- package/dist/cjs/packages/tabbaritem/style-jmapp/tabbaritem.scss +4 -4
- package/dist/cjs/packages/tabbaritem/style-jrkf/style.css +4 -4
- package/dist/cjs/packages/tabbaritem/style-jrkf/tabbaritem.scss +4 -4
- package/dist/cjs/packages/tabs/style/style.css +2 -2
- package/dist/cjs/packages/tabs/style/style.harmony.css +2 -2
- package/dist/cjs/packages/tabs/style/tabs.scss +2 -2
- package/dist/cjs/packages/tabs/style-jmapp/style.css +2 -2
- package/dist/cjs/packages/tabs/style-jmapp/tabs.scss +2 -2
- package/dist/cjs/packages/tabs/style-jrkf/style.css +2 -2
- package/dist/cjs/packages/tabs/style-jrkf/tabs.scss +2 -2
- package/dist/cjs/packages/textarea/textarea.d.ts +2 -2
- package/dist/cjs/packages/textarea/textarea.js +27 -8
- package/dist/cjs/packages/toast/style/style.css +2 -2
- package/dist/cjs/packages/toast/style/style.harmony.css +2 -2
- package/dist/cjs/packages/toast/style/toast.scss +2 -2
- package/dist/cjs/packages/toast/style-jmapp/style.css +2 -2
- package/dist/cjs/packages/toast/style-jmapp/toast.scss +2 -2
- package/dist/cjs/packages/toast/style-jrkf/style.css +2 -2
- package/dist/cjs/packages/toast/style-jrkf/toast.scss +2 -2
- package/dist/cjs/packages/uploader/style/style.css +1 -0
- package/dist/cjs/packages/uploader/style/style.harmony.css +1 -0
- package/dist/cjs/packages/uploader/style/uploader.scss +1 -0
- package/dist/cjs/packages/uploader/style-jmapp/style.css +1 -0
- package/dist/cjs/packages/uploader/style-jmapp/uploader.scss +1 -0
- package/dist/cjs/packages/uploader/style-jrkf/style.css +1 -0
- package/dist/cjs/packages/uploader/style-jrkf/uploader.scss +1 -0
- package/dist/cjs/types/spec/lottie/taro.d.ts +1 -0
- package/dist/cjs/types/spec/swiper/base.d.ts +4 -0
- package/dist/cjs/types/spec/swiper/taro.d.ts +4 -0
- package/dist/cjs/utils/index.d.ts +0 -1
- package/dist/cjs/utils/index.js +0 -1
- package/dist/cjs/utils/taro/platform.d.ts +1 -0
- package/dist/cjs/utils/taro/platform.js +8 -0
- package/dist/cjs/utils/taro/px-transform.js +1 -1
- package/dist/es/packages/address/style/address.scss +2 -2
- package/dist/es/packages/address/style/style.css +2 -2
- package/dist/es/packages/address/style/style.harmony.css +2 -2
- package/dist/es/packages/address/style-jmapp/address.scss +2 -2
- package/dist/es/packages/address/style-jmapp/style.css +2 -2
- package/dist/es/packages/address/style-jrkf/address.scss +2 -2
- package/dist/es/packages/address/style-jrkf/style.css +2 -2
- package/dist/es/packages/avatar/avatar.js +2 -2
- package/dist/es/packages/button/style/button.scss +3 -3
- package/dist/es/packages/button/style/style.css +3 -3
- package/dist/es/packages/button/style/style.harmony.css +3 -3
- package/dist/es/packages/button/style-jmapp/button.scss +3 -3
- package/dist/es/packages/button/style-jmapp/style.css +3 -3
- package/dist/es/packages/button/style-jrkf/button.scss +3 -3
- package/dist/es/packages/button/style-jrkf/style.css +3 -3
- package/dist/es/packages/collapseitem/style/collapseitem.scss +2 -2
- package/dist/es/packages/collapseitem/style/style.css +2 -2
- package/dist/es/packages/collapseitem/style/style.harmony.css +2 -2
- package/dist/es/packages/collapseitem/style-jmapp/collapseitem.scss +2 -2
- package/dist/es/packages/collapseitem/style-jmapp/style.css +2 -2
- package/dist/es/packages/collapseitem/style-jrkf/collapseitem.scss +2 -2
- package/dist/es/packages/collapseitem/style-jrkf/style.css +2 -2
- package/dist/es/packages/dialog/style/dialog.scss +1 -1
- package/dist/es/packages/dialog/style/style.css +1 -1
- package/dist/es/packages/dialog/style/style.harmony.css +1 -1
- package/dist/es/packages/dialog/style-jmapp/dialog.scss +1 -1
- package/dist/es/packages/dialog/style-jmapp/style.css +1 -1
- package/dist/es/packages/dialog/style-jrkf/dialog.scss +1 -1
- package/dist/es/packages/dialog/style-jrkf/style.css +1 -1
- package/dist/es/packages/loading/loading.js +0 -4
- package/dist/es/packages/lottie/lottiemp.js +7 -6
- package/dist/es/packages/numberkeyboard/style/numberkeyboard.scss +2 -2
- package/dist/es/packages/numberkeyboard/style/style.css +2 -2
- package/dist/es/packages/numberkeyboard/style/style.harmony.css +2 -2
- package/dist/es/packages/numberkeyboard/style-jmapp/numberkeyboard.scss +2 -2
- package/dist/es/packages/numberkeyboard/style-jmapp/style.css +2 -2
- package/dist/es/packages/numberkeyboard/style-jrkf/numberkeyboard.scss +2 -2
- package/dist/es/packages/numberkeyboard/style-jrkf/style.css +2 -2
- package/dist/es/packages/pagination/pagination.js +4 -4
- package/dist/es/packages/pickerview/pickerroller.js +3 -3
- package/dist/es/packages/price/style/price.scss +9 -0
- package/dist/es/packages/price/style/style.css +9 -0
- package/dist/es/packages/price/style/style.harmony.css +9 -0
- package/dist/es/packages/price/style-jmapp/price.scss +9 -0
- package/dist/es/packages/price/style-jmapp/style.css +9 -0
- package/dist/es/packages/price/style-jrkf/price.scss +9 -0
- package/dist/es/packages/price/style-jrkf/style.css +9 -0
- package/dist/es/packages/steps/style/steps.scss +1 -1
- package/dist/es/packages/steps/style/style.css +1 -1
- package/dist/es/packages/steps/style/style.harmony.css +1 -1
- package/dist/es/packages/steps/style-jmapp/steps.scss +1 -1
- package/dist/es/packages/steps/style-jmapp/style.css +1 -1
- package/dist/es/packages/steps/style-jrkf/steps.scss +1 -1
- package/dist/es/packages/steps/style-jrkf/style.css +1 -1
- package/dist/es/packages/swiper/swiper.js +23 -22
- package/dist/es/packages/tabbaritem/style/style.css +4 -4
- package/dist/es/packages/tabbaritem/style/style.harmony.css +6 -6
- package/dist/es/packages/tabbaritem/style/tabbaritem.scss +4 -4
- package/dist/es/packages/tabbaritem/style-jmapp/style.css +4 -4
- package/dist/es/packages/tabbaritem/style-jmapp/tabbaritem.scss +4 -4
- package/dist/es/packages/tabbaritem/style-jrkf/style.css +4 -4
- package/dist/es/packages/tabbaritem/style-jrkf/tabbaritem.scss +4 -4
- package/dist/es/packages/tabs/style/style.css +2 -2
- package/dist/es/packages/tabs/style/style.harmony.css +2 -2
- package/dist/es/packages/tabs/style/tabs.scss +2 -2
- package/dist/es/packages/tabs/style-jmapp/style.css +2 -2
- package/dist/es/packages/tabs/style-jmapp/tabs.scss +2 -2
- package/dist/es/packages/tabs/style-jrkf/style.css +2 -2
- package/dist/es/packages/tabs/style-jrkf/tabs.scss +2 -2
- package/dist/es/packages/textarea/textarea.d.ts +2 -2
- package/dist/es/packages/textarea/textarea.js +28 -9
- package/dist/es/packages/toast/style/style.css +2 -2
- package/dist/es/packages/toast/style/style.harmony.css +2 -2
- package/dist/es/packages/toast/style/toast.scss +2 -2
- package/dist/es/packages/toast/style-jmapp/style.css +2 -2
- package/dist/es/packages/toast/style-jmapp/toast.scss +2 -2
- package/dist/es/packages/toast/style-jrkf/style.css +2 -2
- package/dist/es/packages/toast/style-jrkf/toast.scss +2 -2
- package/dist/es/packages/uploader/style/style.css +1 -0
- package/dist/es/packages/uploader/style/style.harmony.css +1 -0
- package/dist/es/packages/uploader/style/uploader.scss +1 -0
- package/dist/es/packages/uploader/style-jmapp/style.css +1 -0
- package/dist/es/packages/uploader/style-jmapp/uploader.scss +1 -0
- package/dist/es/packages/uploader/style-jrkf/style.css +1 -0
- package/dist/es/packages/uploader/style-jrkf/uploader.scss +1 -0
- package/dist/es/types/spec/input/base.d.ts +4 -1
- package/dist/es/types/spec/lottie/taro.d.ts +1 -0
- package/dist/es/types/spec/swiper/base.d.ts +5 -1
- package/dist/es/types/spec/swiper/taro.d.ts +4 -0
- package/dist/es/utils/index.d.ts +0 -1
- package/dist/es/utils/index.js +0 -1
- package/dist/es/utils/taro/platform.d.ts +1 -0
- package/dist/es/utils/taro/platform.js +5 -0
- package/dist/es/utils/taro/px-transform.js +3 -2
- package/dist/nutui.react.umd.js +72 -139
- package/dist/style-jmapp.css +1 -1
- package/dist/style-jmapp.scss +38 -38
- package/dist/style-jrkf.css +1 -1
- package/dist/style-jrkf.scss +35 -35
- package/dist/style.css +1 -1
- package/dist/style.scss +37 -37
- package/package.json +1 -1
- package/dist/cjs/utils/camel-case.d.ts +0 -1
- package/dist/cjs/utils/camel-case.js +0 -106
- package/dist/es/utils/camel-case.d.ts +0 -1
- package/dist/es/utils/camel-case.js +0 -96
|
@@ -77,6 +77,7 @@
|
|
|
77
77
|
height: 100%;
|
|
78
78
|
background: var(--nutui-uploader-preview-progress-background, var(--nutui-color-surface-overlay));
|
|
79
79
|
border-radius: var(--nutui-uploader-image-border-radius, var(--nutui-radius-xs));
|
|
80
|
+
z-index: 10;
|
|
80
81
|
}
|
|
81
82
|
.nut-uploader-preview-progress i {
|
|
82
83
|
margin-bottom: var(--nutui-uploader-image-icon-margin-bottom, 6px);
|
|
@@ -60,7 +60,10 @@ export interface BaseInput<INPUT_TYPE, CONFIRM_TYPE = InputConfirmType> extends
|
|
|
60
60
|
* 键盘右下角按钮的文字,仅在type='text'时生效,可选值 send:发送、search:搜索、next:下一个、go:前往、done:完成
|
|
61
61
|
*/
|
|
62
62
|
confirmType: CONFIRM_TYPE
|
|
63
|
-
|
|
63
|
+
/**
|
|
64
|
+
* 输入框是容器型还是文本型,容器型一般都是带外边框的
|
|
65
|
+
*/
|
|
66
|
+
plain: boolean
|
|
64
67
|
/**
|
|
65
68
|
* 输入内容格式化函数
|
|
66
69
|
*/
|
|
@@ -24,10 +24,14 @@ export interface BaseSwiper extends BaseProps {
|
|
|
24
24
|
*/
|
|
25
25
|
loop: boolean
|
|
26
26
|
duration: SimpleValue;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Please use `autoplay` prop instead.
|
|
29
|
+
*/
|
|
30
|
+
autoPlay: boolean | number;
|
|
27
31
|
/**
|
|
28
32
|
* 自动轮播
|
|
29
33
|
*/
|
|
30
|
-
|
|
34
|
+
autoplay: boolean | number
|
|
31
35
|
/**
|
|
32
36
|
* 初始化索引值
|
|
33
37
|
*/
|
|
@@ -9,7 +9,11 @@ export type TaroSwiperProps = Omit<BaseSwiper, OmittedKeys> & OmittedSwiperProps
|
|
|
9
9
|
height?: SimpleValue;
|
|
10
10
|
direction: Direction;
|
|
11
11
|
indicator: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Please use `autoplay` prop instead.
|
|
14
|
+
*/
|
|
12
15
|
autoPlay: boolean;
|
|
16
|
+
autoplay: boolean;
|
|
13
17
|
loop: boolean;
|
|
14
18
|
defaultValue: number;
|
|
15
19
|
};
|
package/dist/es/utils/index.d.ts
CHANGED
package/dist/es/utils/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { pxTransform as transform } from "@tarojs/taro";
|
|
2
|
-
import { harmony } from "./platform";
|
|
2
|
+
import { harmony, td } from "./platform";
|
|
3
|
+
// td todo
|
|
3
4
|
export function pxTransform(value, radix) {
|
|
4
5
|
// @ts-ignore
|
|
5
|
-
if (harmony()) return transform(value, radix || 375);
|
|
6
|
+
if (harmony() || td()) return transform(value, radix || 375);
|
|
6
7
|
return "".concat(value, "px");
|
|
7
8
|
}
|
package/dist/nutui.react.umd.js
CHANGED
|
@@ -455,6 +455,11 @@
|
|
|
455
455
|
"mini"
|
|
456
456
|
].includes(Taro.getEnv().toLowerCase());
|
|
457
457
|
};
|
|
458
|
+
var td = function() {
|
|
459
|
+
return [
|
|
460
|
+
"dynamic"
|
|
461
|
+
].includes(Taro.getEnv().toLowerCase());
|
|
462
|
+
};
|
|
458
463
|
var prefixCls$2 = "nut-button";
|
|
459
464
|
var defaultProps$1B = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
460
465
|
color: "",
|
|
@@ -1184,7 +1189,7 @@
|
|
|
1184
1189
|
};
|
|
1185
1190
|
ConfigProvider.displayName = "NutConfigProvider";
|
|
1186
1191
|
function pxTransform(value2, radix) {
|
|
1187
|
-
if (harmony()) return Taro.pxTransform(value2, radix || 375);
|
|
1192
|
+
if (harmony() || td()) return Taro.pxTransform(value2, radix || 375);
|
|
1188
1193
|
return "".concat(value2, "px");
|
|
1189
1194
|
}
|
|
1190
1195
|
var defaultProps$1z = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
@@ -8319,101 +8324,6 @@
|
|
|
8319
8324
|
}
|
|
8320
8325
|
return ret;
|
|
8321
8326
|
}
|
|
8322
|
-
var UPPERCASE = RegExp("[\\p{Lu}]", "u");
|
|
8323
|
-
var LOWERCASE = RegExp("[\\p{Ll}]", "u");
|
|
8324
|
-
var LEADING_CAPITAL = RegExp("^[\\p{Lu}](?![\\p{Lu}])", "gu");
|
|
8325
|
-
var IDENTIFIER = RegExp("([\\p{Alpha}\\p{N}_]|$)", "u");
|
|
8326
|
-
var SEPARATORS = /[_.\- ]+/;
|
|
8327
|
-
var LEADING_SEPARATORS = new RegExp("^".concat(SEPARATORS.source));
|
|
8328
|
-
var SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, "gu");
|
|
8329
|
-
var NUMBERS_AND_IDENTIFIER = new RegExp("\\d+".concat(IDENTIFIER.source), "gu");
|
|
8330
|
-
var preserveCamelCase = function(string2, toLowerCase, toUpperCase) {
|
|
8331
|
-
var isLastCharLower = false;
|
|
8332
|
-
var isLastCharUpper = false;
|
|
8333
|
-
var isLastLastCharUpper = false;
|
|
8334
|
-
for (var index2 = 0; index2 < string2.length; index2++) {
|
|
8335
|
-
var character = string2[index2];
|
|
8336
|
-
if (isLastCharLower && UPPERCASE.test(character)) {
|
|
8337
|
-
string2 = "".concat(string2.slice(0, index2), "-").concat(string2.slice(index2));
|
|
8338
|
-
isLastCharLower = false;
|
|
8339
|
-
isLastLastCharUpper = isLastCharUpper;
|
|
8340
|
-
isLastCharUpper = true;
|
|
8341
|
-
index2++;
|
|
8342
|
-
} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character)) {
|
|
8343
|
-
string2 = "".concat(string2.slice(0, index2 - 1), "-").concat(string2.slice(index2 - 1));
|
|
8344
|
-
isLastLastCharUpper = isLastCharUpper;
|
|
8345
|
-
isLastCharUpper = false;
|
|
8346
|
-
isLastCharLower = true;
|
|
8347
|
-
} else {
|
|
8348
|
-
isLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;
|
|
8349
|
-
isLastLastCharUpper = isLastCharUpper;
|
|
8350
|
-
isLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;
|
|
8351
|
-
}
|
|
8352
|
-
}
|
|
8353
|
-
return string2;
|
|
8354
|
-
};
|
|
8355
|
-
var preserveConsecutiveUppercase = function(input, toLowerCase) {
|
|
8356
|
-
LEADING_CAPITAL.lastIndex = 0;
|
|
8357
|
-
return input.replace(LEADING_CAPITAL, function(m1) {
|
|
8358
|
-
return toLowerCase(m1);
|
|
8359
|
-
});
|
|
8360
|
-
};
|
|
8361
|
-
var postProcess = function(input, toUpperCase) {
|
|
8362
|
-
SEPARATORS_AND_IDENTIFIER.lastIndex = 0;
|
|
8363
|
-
NUMBERS_AND_IDENTIFIER.lastIndex = 0;
|
|
8364
|
-
return input.replace(SEPARATORS_AND_IDENTIFIER, function(_, identifier) {
|
|
8365
|
-
return toUpperCase(identifier);
|
|
8366
|
-
}).replace(NUMBERS_AND_IDENTIFIER, function(m) {
|
|
8367
|
-
return toUpperCase(m);
|
|
8368
|
-
});
|
|
8369
|
-
};
|
|
8370
|
-
var camelCase = function(input, options) {
|
|
8371
|
-
if (!(typeof input === "string" || Array.isArray(input))) {
|
|
8372
|
-
throw new TypeError("Expected the input to be `string | string[]`");
|
|
8373
|
-
}
|
|
8374
|
-
options = _object_spread({
|
|
8375
|
-
pascalCase: false,
|
|
8376
|
-
preserveConsecutiveUppercase: false
|
|
8377
|
-
}, options);
|
|
8378
|
-
if (Array.isArray(input)) {
|
|
8379
|
-
input = input.map(function(x) {
|
|
8380
|
-
return x.trim();
|
|
8381
|
-
}).filter(function(x) {
|
|
8382
|
-
return x.length;
|
|
8383
|
-
}).join("-");
|
|
8384
|
-
} else {
|
|
8385
|
-
input = input.trim();
|
|
8386
|
-
}
|
|
8387
|
-
if (input.length === 0) {
|
|
8388
|
-
return "";
|
|
8389
|
-
}
|
|
8390
|
-
var toLowerCase = options.locale === false ? function(string2) {
|
|
8391
|
-
return string2.toLowerCase();
|
|
8392
|
-
} : function(string2) {
|
|
8393
|
-
return string2.toLocaleLowerCase(options.locale);
|
|
8394
|
-
};
|
|
8395
|
-
var toUpperCase = options.locale === false ? function(string2) {
|
|
8396
|
-
return string2.toUpperCase();
|
|
8397
|
-
} : function(string2) {
|
|
8398
|
-
return string2.toLocaleUpperCase(options.locale);
|
|
8399
|
-
};
|
|
8400
|
-
if (input.length === 1) {
|
|
8401
|
-
if (SEPARATORS.test(input)) {
|
|
8402
|
-
return "";
|
|
8403
|
-
}
|
|
8404
|
-
return options.pascalCase ? toUpperCase(input) : toLowerCase(input);
|
|
8405
|
-
}
|
|
8406
|
-
var hasUpperCase = input !== toLowerCase(input);
|
|
8407
|
-
if (hasUpperCase) {
|
|
8408
|
-
input = preserveCamelCase(input, toLowerCase, toUpperCase);
|
|
8409
|
-
}
|
|
8410
|
-
input = input.replace(LEADING_SEPARATORS, "");
|
|
8411
|
-
input = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);
|
|
8412
|
-
if (options.pascalCase) {
|
|
8413
|
-
input = toUpperCase(input.charAt(0)) + input.slice(1);
|
|
8414
|
-
}
|
|
8415
|
-
return postProcess(input, toUpperCase);
|
|
8416
|
-
};
|
|
8417
8327
|
var clamp = function(num, min, max) {
|
|
8418
8328
|
return Math.min(Math.max(num, min), max);
|
|
8419
8329
|
};
|
|
@@ -8796,7 +8706,7 @@
|
|
|
8796
8706
|
];
|
|
8797
8707
|
case 1:
|
|
8798
8708
|
placeholder = _state.sent();
|
|
8799
|
-
placeholderHeight = placeholder.height ||
|
|
8709
|
+
placeholderHeight = placeholder.height || 36;
|
|
8800
8710
|
return [
|
|
8801
8711
|
2,
|
|
8802
8712
|
placeholderHeight
|
|
@@ -8806,7 +8716,7 @@
|
|
|
8806
8716
|
console.error("获取高度失败:", error);
|
|
8807
8717
|
return [
|
|
8808
8718
|
2,
|
|
8809
|
-
|
|
8719
|
+
36
|
|
8810
8720
|
];
|
|
8811
8721
|
case 3:
|
|
8812
8722
|
return [
|
|
@@ -8828,7 +8738,7 @@
|
|
|
8828
8738
|
if (currentLineSpacing) {
|
|
8829
8739
|
lineSpacing.current = parseFloat(currentLineSpacing);
|
|
8830
8740
|
}
|
|
8831
|
-
} else {
|
|
8741
|
+
} else if (placeholderRef.current) {
|
|
8832
8742
|
getReactHeight().then(function(height2) {
|
|
8833
8743
|
currentLineSpacing = height2;
|
|
8834
8744
|
if (currentLineSpacing) {
|
|
@@ -13992,14 +13902,13 @@
|
|
|
13992
13902
|
defaultValue: "",
|
|
13993
13903
|
showCount: false,
|
|
13994
13904
|
maxLength: 140,
|
|
13995
|
-
placeholder: "",
|
|
13996
13905
|
readOnly: false,
|
|
13997
13906
|
disabled: false,
|
|
13998
13907
|
autoSize: false,
|
|
13999
13908
|
plain: false,
|
|
14000
13909
|
status: "default"
|
|
14001
13910
|
});
|
|
14002
|
-
var TextArea = function(props) {
|
|
13911
|
+
var TextArea = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
14003
13912
|
var locale = useConfig().locale;
|
|
14004
13913
|
var _ref = _object_spread({}, defaultProps$L, props), className = _ref.className, value2 = _ref.value, defaultValue = _ref.defaultValue, showCount = _ref.showCount, maxLength = _ref.maxLength, rows = _ref.rows, placeholder = _ref.placeholder, readOnly = _ref.readOnly, disabled = _ref.disabled, autoSize = _ref.autoSize, style = _ref.style, plain = _ref.plain, status = _ref.status, onChange = _ref.onChange, onBlur = _ref.onBlur, onFocus = _ref.onFocus, rest = _object_without_properties(_ref, [
|
|
14005
13914
|
"className",
|
|
@@ -14033,15 +13942,16 @@
|
|
|
14033
13942
|
defaultValue,
|
|
14034
13943
|
finalValue: format2(defaultValue),
|
|
14035
13944
|
onChange
|
|
14036
|
-
}), 2),
|
|
13945
|
+
}), 2), innerValue = _usePropsValue[0], setInnerValue = _usePropsValue[1];
|
|
13946
|
+
var textareaRef = React.useRef(null);
|
|
14037
13947
|
var handleChange = function(event) {
|
|
14038
13948
|
var _event_detail;
|
|
14039
13949
|
var text2 = event === null || event === void 0 ? void 0 : (_event_detail = event.detail) === null || _event_detail === void 0 ? void 0 : _event_detail.value;
|
|
14040
13950
|
if (text2) {
|
|
14041
13951
|
var value3 = compositionRef.current ? text2 : format2(text2);
|
|
14042
|
-
|
|
13952
|
+
setInnerValue(value3);
|
|
14043
13953
|
} else {
|
|
14044
|
-
|
|
13954
|
+
setInnerValue("");
|
|
14045
13955
|
}
|
|
14046
13956
|
};
|
|
14047
13957
|
var isDisabled = function() {
|
|
@@ -14055,10 +13965,29 @@
|
|
|
14055
13965
|
if (isDisabled()) return;
|
|
14056
13966
|
onBlur === null || onBlur === void 0 ? void 0 : onBlur(event);
|
|
14057
13967
|
};
|
|
13968
|
+
React.useImperativeHandle(ref, function() {
|
|
13969
|
+
return {
|
|
13970
|
+
clear: function() {
|
|
13971
|
+
setInnerValue("");
|
|
13972
|
+
},
|
|
13973
|
+
focus: function() {
|
|
13974
|
+
var _textareaRef_current;
|
|
13975
|
+
return (_textareaRef_current = textareaRef.current) === null || _textareaRef_current === void 0 ? void 0 : _textareaRef_current.focus();
|
|
13976
|
+
},
|
|
13977
|
+
blur: function() {
|
|
13978
|
+
var _textareaRef_current;
|
|
13979
|
+
return (_textareaRef_current = textareaRef.current) === null || _textareaRef_current === void 0 ? void 0 : _textareaRef_current.blur();
|
|
13980
|
+
},
|
|
13981
|
+
get nativeElement() {
|
|
13982
|
+
return textareaRef.current;
|
|
13983
|
+
}
|
|
13984
|
+
};
|
|
13985
|
+
});
|
|
14058
13986
|
var _obj;
|
|
14059
13987
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(components.View, {
|
|
14060
13988
|
className: classNames(classPrefix2, (_obj = {}, _define_property(_obj, "".concat(classPrefix2, "-disabled"), disabled), _define_property(_obj, "".concat(classPrefix2, "-readonly"), readOnly), _define_property(_obj, "".concat(classPrefix2, "-rtl"), rtl), _define_property(_obj, "".concat(classPrefix2, "-plain"), plain), _define_property(_obj, "".concat(classPrefix2, "-container"), !plain), _define_property(_obj, "".concat(classPrefix2, "-").concat(status), status), _obj), className)
|
|
14061
13989
|
}, /* @__PURE__ */ React.createElement(components.Textarea, _object_spread_props(_object_spread({}, rest), {
|
|
13990
|
+
ref: textareaRef,
|
|
14062
13991
|
nativeProps: {
|
|
14063
13992
|
style,
|
|
14064
13993
|
readOnly,
|
|
@@ -14074,7 +14003,7 @@
|
|
|
14074
14003
|
style: Taro.getEnv() === "WEB" ? void 0 : style,
|
|
14075
14004
|
disabled: Taro.getEnv() === "WEB" ? disabled : disabled || readOnly,
|
|
14076
14005
|
// @ts-ignore
|
|
14077
|
-
value:
|
|
14006
|
+
value: innerValue,
|
|
14078
14007
|
onInput: handleChange,
|
|
14079
14008
|
onBlur: handleBlur,
|
|
14080
14009
|
onFocus: handleFocus,
|
|
@@ -14083,8 +14012,8 @@
|
|
|
14083
14012
|
placeholder: placeholder !== void 0 ? placeholder : locale.placeholder
|
|
14084
14013
|
})), showCount && /* @__PURE__ */ React.createElement(components.View, {
|
|
14085
14014
|
className: classNames("".concat(classPrefix2, "-limit"), _define_property({}, "".concat(classPrefix2, "-limit-disabled"), disabled))
|
|
14086
|
-
},
|
|
14087
|
-
};
|
|
14015
|
+
}, innerValue.length, "/", maxLength < 0 ? 0 : maxLength)));
|
|
14016
|
+
});
|
|
14088
14017
|
TextArea.displayName = "NutTextArea";
|
|
14089
14018
|
var defaultProps$K = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
14090
14019
|
percent: 0,
|
|
@@ -17689,7 +17618,7 @@
|
|
|
17689
17618
|
};
|
|
17690
17619
|
AvatarGroup.displayName = "NutAvatarGroup";
|
|
17691
17620
|
var defaultProps$p = _object_spread_props(_object_spread({}, ComponentDefaults), {
|
|
17692
|
-
size: harmony() ? "40" : "",
|
|
17621
|
+
size: harmony() || td() ? "40" : "",
|
|
17693
17622
|
shape: "round",
|
|
17694
17623
|
icon: "",
|
|
17695
17624
|
background: "#eee",
|
|
@@ -18713,15 +18642,18 @@
|
|
|
18713
18642
|
direction: "horizontal",
|
|
18714
18643
|
indicator: false,
|
|
18715
18644
|
autoPlay: false,
|
|
18645
|
+
autoplay: false,
|
|
18716
18646
|
loop: false,
|
|
18717
18647
|
defaultValue: 0,
|
|
18718
18648
|
style: {}
|
|
18719
18649
|
};
|
|
18720
18650
|
var classPrefix$4 = "nut-swiper";
|
|
18721
18651
|
var Swiper = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
18722
|
-
var _ref = _object_spread({}, defaultProps$i, props), width2 = _ref.width, height2 = _ref.height, className = _ref.className, children = _ref.children, indicator = _ref.indicator,
|
|
18652
|
+
var _ref = _object_spread({}, defaultProps$i, props), width2 = _ref.width, height2 = _ref.height, className = _ref.className, children = _ref.children, indicator = _ref.indicator, indicatorDots = _ref.indicatorDots, loop = _ref.loop;
|
|
18653
|
+
_ref.circular;
|
|
18654
|
+
var autoPlay = _ref.autoPlay, autoplay = _ref.autoplay;
|
|
18723
18655
|
_ref.duration;
|
|
18724
|
-
var direction = _ref.direction, defaultValue = _ref.defaultValue;
|
|
18656
|
+
var vertical = _ref.vertical, direction = _ref.direction, defaultValue = _ref.defaultValue, current = _ref.current;
|
|
18725
18657
|
_ref.onChange;
|
|
18726
18658
|
var style = _ref.style, rest = _object_without_properties(_ref, [
|
|
18727
18659
|
"width",
|
|
@@ -18729,15 +18661,20 @@
|
|
|
18729
18661
|
"className",
|
|
18730
18662
|
"children",
|
|
18731
18663
|
"indicator",
|
|
18664
|
+
"indicatorDots",
|
|
18732
18665
|
"loop",
|
|
18666
|
+
"circular",
|
|
18733
18667
|
"autoPlay",
|
|
18668
|
+
"autoplay",
|
|
18734
18669
|
"duration",
|
|
18670
|
+
"vertical",
|
|
18735
18671
|
"direction",
|
|
18736
18672
|
"defaultValue",
|
|
18673
|
+
"current",
|
|
18737
18674
|
"onChange",
|
|
18738
18675
|
"style"
|
|
18739
18676
|
]);
|
|
18740
|
-
var _useState = _sliced_to_array(React.useState(defaultValue), 2),
|
|
18677
|
+
var _useState = _sliced_to_array(React.useState(current || defaultValue), 2), innerValue = _useState[0], setInnerValue = _useState[1];
|
|
18741
18678
|
var childrenCount = React.useMemo(function() {
|
|
18742
18679
|
var c = 0;
|
|
18743
18680
|
React.Children.map(children, function(child, index2) {
|
|
@@ -18747,47 +18684,42 @@
|
|
|
18747
18684
|
}, [
|
|
18748
18685
|
children
|
|
18749
18686
|
]);
|
|
18750
|
-
React.useEffect(function() {
|
|
18751
|
-
setCurrent(defaultValue);
|
|
18752
|
-
}, [
|
|
18753
|
-
defaultValue
|
|
18754
|
-
]);
|
|
18755
18687
|
var renderIndicator = function() {
|
|
18756
18688
|
if (/* @__PURE__ */ React.isValidElement(indicator)) return indicator;
|
|
18757
|
-
if (indicator) {
|
|
18689
|
+
if (indicator || indicatorDots) {
|
|
18758
18690
|
var _obj;
|
|
18759
18691
|
return /* @__PURE__ */ React.createElement(components.View, {
|
|
18760
|
-
className: classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix$4, "-indicator"), true), _define_property(_obj, "".concat(classPrefix$4, "-indicator-vertical"), direction === "vertical"), _obj))
|
|
18692
|
+
className: classNames((_obj = {}, _define_property(_obj, "".concat(classPrefix$4, "-indicator"), true), _define_property(_obj, "".concat(classPrefix$4, "-indicator-vertical"), direction === "vertical" || vertical), _obj))
|
|
18761
18693
|
}, /* @__PURE__ */ React.createElement(Indicator, {
|
|
18762
|
-
current,
|
|
18694
|
+
current: innerValue,
|
|
18763
18695
|
total: childrenCount,
|
|
18764
|
-
direction
|
|
18696
|
+
direction: vertical ? "vertical" : direction
|
|
18765
18697
|
}));
|
|
18766
18698
|
}
|
|
18767
18699
|
return null;
|
|
18768
18700
|
};
|
|
18769
18701
|
var handleOnChange = function(value2) {
|
|
18770
|
-
|
|
18702
|
+
setInnerValue(value2.detail.current);
|
|
18771
18703
|
};
|
|
18772
18704
|
React.useImperativeHandle(ref, function() {
|
|
18773
18705
|
return {
|
|
18774
18706
|
to: function(value2) {
|
|
18775
|
-
|
|
18707
|
+
setInnerValue(value2);
|
|
18776
18708
|
},
|
|
18777
18709
|
next: function() {
|
|
18778
18710
|
if (loop) {
|
|
18779
|
-
|
|
18711
|
+
setInnerValue((innerValue + 1) % childrenCount);
|
|
18780
18712
|
} else {
|
|
18781
|
-
|
|
18713
|
+
setInnerValue(innerValue + 1 >= childrenCount ? innerValue : innerValue + 1);
|
|
18782
18714
|
}
|
|
18783
18715
|
},
|
|
18784
18716
|
prev: function() {
|
|
18785
18717
|
if (loop) {
|
|
18786
|
-
var next =
|
|
18718
|
+
var next = innerValue - 1;
|
|
18787
18719
|
next = next < 0 ? childrenCount + next : next;
|
|
18788
|
-
|
|
18720
|
+
setInnerValue(next % childrenCount);
|
|
18789
18721
|
} else {
|
|
18790
|
-
|
|
18722
|
+
setInnerValue(innerValue - 1 <= 0 ? 0 : innerValue - 1);
|
|
18791
18723
|
}
|
|
18792
18724
|
}
|
|
18793
18725
|
};
|
|
@@ -18805,10 +18737,10 @@
|
|
|
18805
18737
|
height: !height2 ? pxTransform(150) : height2
|
|
18806
18738
|
}
|
|
18807
18739
|
}, /* @__PURE__ */ React.createElement(components.Swiper, _object_spread({
|
|
18808
|
-
current,
|
|
18740
|
+
current: innerValue,
|
|
18809
18741
|
circular: loop,
|
|
18810
|
-
autoplay: autoPlay,
|
|
18811
|
-
vertical: direction === "vertical",
|
|
18742
|
+
autoplay: autoplay || autoPlay,
|
|
18743
|
+
vertical: direction === "vertical" || vertical,
|
|
18812
18744
|
indicatorDots: false,
|
|
18813
18745
|
onChange: function(e) {
|
|
18814
18746
|
var _props_onChange;
|
|
@@ -39518,7 +39450,7 @@
|
|
|
39518
39450
|
var id = "nutLottie-".concat(uuid);
|
|
39519
39451
|
var animation = React.useRef();
|
|
39520
39452
|
var inited = React.useRef(false);
|
|
39521
|
-
var source = props.source, _props_loop = props.loop, loop = _props_loop === void 0 ? true : _props_loop, _props_autoPlay = props.autoPlay, autoPlay = _props_autoPlay === void 0 ? true : _props_autoPlay, onComplete = props.onComplete, style = props.style, _props_speed = props.speed, speed = _props_speed === void 0 ? 1 : _props_speed;
|
|
39453
|
+
var source = props.source, _props_loop = props.loop, loop = _props_loop === void 0 ? true : _props_loop, _props_autoPlay = props.autoPlay, autoPlay = _props_autoPlay === void 0 ? true : _props_autoPlay, onComplete = props.onComplete, style = props.style, _props_speed = props.speed, speed = _props_speed === void 0 ? 1 : _props_speed, _props_dpr = props.dpr, dpr = _props_dpr === void 0 ? true : _props_dpr;
|
|
39522
39454
|
var setSpeed = function() {
|
|
39523
39455
|
if (animation.current) {
|
|
39524
39456
|
animation.current.setSpeed(Math.abs(speed));
|
|
@@ -39528,7 +39460,7 @@
|
|
|
39528
39460
|
React.useImperativeHandle(ref, function() {
|
|
39529
39461
|
return animation.current || {};
|
|
39530
39462
|
});
|
|
39531
|
-
var
|
|
39463
|
+
var pixelRatio = React.useRef(getWindowInfo().pixelRatio);
|
|
39532
39464
|
Taro.useReady(function() {
|
|
39533
39465
|
Taro.createSelectorQuery().select("#".concat(id)).fields({
|
|
39534
39466
|
node: true,
|
|
@@ -39538,9 +39470,10 @@
|
|
|
39538
39470
|
var canvas = res.node;
|
|
39539
39471
|
var context2 = canvas.getContext("2d");
|
|
39540
39472
|
if (style && style.width !== void 0 && style.height !== void 0) {
|
|
39541
|
-
|
|
39542
|
-
canvas.
|
|
39543
|
-
|
|
39473
|
+
var finalDpr = dpr ? pixelRatio.current : 1;
|
|
39474
|
+
canvas.width = parseFloat(style.width.toString()) * finalDpr;
|
|
39475
|
+
canvas.height = parseFloat(style.height.toString()) * finalDpr;
|
|
39476
|
+
context2.scale(finalDpr, finalDpr);
|
|
39544
39477
|
}
|
|
39545
39478
|
lottie.setup(canvas);
|
|
39546
39479
|
animation.current = lottie.loadAnimation({
|
|
@@ -39756,11 +39689,11 @@
|
|
|
39756
39689
|
}
|
|
39757
39690
|
}, addColorForHarmony(next || locale.pagination.next, current >= pageCount ? "#c2c4cc" : "#ff0f23"))), mode === "lite" && /* @__PURE__ */ React.createElement(components.View, {
|
|
39758
39691
|
className: "".concat(classPrefix2, "-lite")
|
|
39759
|
-
}, /* @__PURE__ */ React.createElement(components.
|
|
39692
|
+
}, /* @__PURE__ */ React.createElement(components.Text, {
|
|
39760
39693
|
className: "".concat(classPrefix2, "-lite-active")
|
|
39761
|
-
}, current), /* @__PURE__ */ React.createElement(components.
|
|
39694
|
+
}, current), /* @__PURE__ */ React.createElement(components.Text, {
|
|
39762
39695
|
className: "".concat(classPrefix2, "-lite-spliterator")
|
|
39763
|
-
}, "/"), /* @__PURE__ */ React.createElement(components.
|
|
39696
|
+
}, "/"), /* @__PURE__ */ React.createElement(components.Text, {
|
|
39764
39697
|
className: "".concat(classPrefix2, "-lite-default")
|
|
39765
39698
|
}, pageCount)));
|
|
39766
39699
|
};
|
|
@@ -42125,7 +42058,6 @@
|
|
|
42125
42058
|
exports.WaterMark = WaterMark;
|
|
42126
42059
|
exports.addColorForHarmony = addColorForHarmony;
|
|
42127
42060
|
exports.bound = bound;
|
|
42128
|
-
exports.camelCase = camelCase;
|
|
42129
42061
|
exports.canUseDom = canUseDom;
|
|
42130
42062
|
exports.cancelRaf = cancelRaf;
|
|
42131
42063
|
exports.clamp = clamp;
|
|
@@ -42172,6 +42104,7 @@
|
|
|
42172
42104
|
exports.rubberbandIfOutOfBounds = rubberbandIfOutOfBounds;
|
|
42173
42105
|
exports.setDefaultConfig = setDefaultConfig;
|
|
42174
42106
|
exports.sleep = sleep;
|
|
42107
|
+
exports.td = td;
|
|
42175
42108
|
exports.toArray = toArray;
|
|
42176
42109
|
exports.unmount = unmount;
|
|
42177
42110
|
exports.upperCaseFirst = upperCaseFirst;
|